/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: white;
  border-radius: 4px;
  width: 90%;
  max-width: 400px;
  max-height: 80vh;
  overflow: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e5e5e5;
}

.modal-header h2 {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 400;
  color: #666;
}

.close-modal {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: #999;
  padding: 0;
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.close-modal:hover {
  color: #666;
}

.modal-body {
  padding: 0.75rem 1rem;
}

/* Task Creation Modal */
.task-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  z-index: 10000;
  animation: fadeIn 0.2s ease-out;
}

.task-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  width: 90%;
  max-width: 520px;
  max-height: 90vh;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  animation: modalSlideIn 0.2s ease-out;
}

/* Workspace Settings Modal */
.workspace-settings-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  z-index: 10000;
  animation: fadeIn 0.2s ease-out;
}

.workspace-settings-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  animation: modalSlideIn 0.2s ease-out;
}

.workspace-settings-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1.5rem;
  border-bottom: 1px solid #e5e5e5;
  flex-shrink: 0;
}

.workspace-settings-header-content {
  flex: 1;
  min-width: 0;
}

.workspace-settings-title {
  margin: 0 0 0.5rem 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-settings-badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.workspace-settings-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #999;
  padding: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  flex-shrink: 0;
  margin-left: 1rem;
  border-radius: 4px;
  transition: all 0.2s;
}

.workspace-settings-close:hover {
  background: #f5f5f5;
  color: #666;
}

.workspace-settings-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translate(-50%, -48%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

.task-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e5e5e5;
  flex-shrink: 0;
}

.task-modal-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: #333;
  margin: 0;
  letter-spacing: -0.01em;
}

.task-modal-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #999;
  padding: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border-radius: 4px;
  transition: all 0.2s;
}

.task-modal-close:hover {
  color: #666;
  background: #f5f5f5;
}

.task-modal-body {
  padding: 1.25rem;
  overflow-y: auto;
  flex: 1;
}

.task-modal-section {
  margin-bottom: 1.25rem;
}

.task-modal-section:last-child {
  margin-bottom: 0;
}

.task-modal-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: #666;
  margin-bottom: 0.5rem;
}

.task-modal-input,
.task-modal-textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  font-size: 0.875rem;
  font-family: inherit;
  color: #333;
  background: white;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.task-modal-input:focus,
.task-modal-textarea:focus {
  outline: none;
  border-color: #1976d2;
}

.task-modal-textarea {
  resize: vertical;
  min-height: 60px;
}

/* Template Chips */
.task-template-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.task-template-chip {
  padding: 0.5rem 1rem;
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  border-radius: 20px;
  font-size: 0.8rem;
  color: #666;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.task-template-chip:hover {
  background: #e8e8e8;
  border-color: #ddd;
  color: #333;
}

.task-template-chip.active {
  background: #1976d2;
  border-color: #1976d2;
  color: white;
}

/* Recurrence Chips */
.task-recurrence-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.task-recurrence-chip {
  padding: 0.4rem 0.75rem;
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 16px;
  font-size: 0.75rem;
  color: #666;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.task-recurrence-chip:hover {
  background: #e8e8e8;
  border-color: #ddd;
  color: #333;
}

.task-modal-expand-btn {
  width: 100%;
  padding: 0.625rem 1rem;
  border: 1px dashed #d0d0d0;
  border-radius: 6px;
  background: #fafafa;
  color: #666;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.task-modal-expand-btn:hover {
  border-color: #1976d2;
  color: #1976d2;
  background: #f0f7ff;
  border-style: solid;
}

.task-modal-expand-btn:active {
  transform: scale(0.98);
}

.task-modal-expand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  font-size: 1.25rem;
  line-height: 1;
  transition: transform 0.2s ease;
}

.task-modal-expand-btn[data-expanded="true"] .task-modal-expand-icon {
  transform: rotate(0deg);
}

.task-modal-advanced {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #f0f0f0;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.2s ease, margin-top 0.3s ease, padding-top 0.3s ease, border-top 0.3s ease;
  max-height: 5000px;
  opacity: 1;
}

.task-modal-advanced.collapsed {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  padding-top: 0;
  border-top: none;
  overflow: hidden;
}

.task-modal-recurrence-summary {
  font-size: 0.8rem;
  color: #1976d2;
}

.task-modal-recurrence-summary strong {
  font-weight: 600;
}

.task-modal-error {
  font-size: 0.75rem;
  color: #dc3545;
  margin-top: 0.25rem;
  padding: 0.25rem 0;
}

/* Recurrence Section Styles */
.task-modal-recurrence-container {
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 0.75rem;
  background: #fafafa;
}

.task-modal-recurrence-row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.task-modal-recurrence-row:last-child {
  margin-bottom: 0;
}

.task-modal-recurrence-field {
  flex: 1;
  min-width: 120px;
}

.task-modal-recurrence-section {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e0e0e0;
}

.task-modal-label-small {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  color: #666;
  margin-bottom: 0.35rem;
}

.task-modal-select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  font-size: 0.875rem;
  font-family: inherit;
  color: #333;
  background: white;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.task-modal-select:focus {
  outline: none;
  border-color: #1976d2;
}

.task-modal-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.task-modal-checkbox {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #1976d2;
}

.task-modal-weekday-grid,
.task-modal-monthday-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.25rem;
  margin-top: 0.5rem;
}

.task-modal-month-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.25rem;
  margin-top: 0.5rem;
}

.task-modal-weekday {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: #666;
  cursor: pointer;
  padding: 0.25rem 0.35rem;
  border-radius: 4px;
  transition: background 0.2s;
}

.task-modal-weekday:hover {
  background: #f0f0f0;
}

.task-modal-weekday input[type="checkbox"] {
  width: 14px;
  height: 14px;
  cursor: pointer;
  accent-color: #1976d2;
}

.task-modal-weekday input[type="checkbox"]:checked + span {
  font-weight: 500;
  color: #1976d2;
}

.task-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid #e5e5e5;
  flex-shrink: 0;
}

.task-modal-btn {
  background: 
    linear-gradient(135deg, rgba(255, 255, 255, 0.5) 0%, rgba(250, 250, 250, 0.4) 100%);
  color: #666;
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 0.3rem 0.75rem;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  border-radius: 6px;
  backdrop-filter: blur(10px) saturate(1.1);
  letter-spacing: 0.01em;
  font-feature-settings: 'kern' 1, 'liga' 1, 'tnum' 1;
  outline: none;
  box-shadow: 
    0 1px 3px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.task-modal-btn:focus {
  border-color: rgba(200, 190, 180, 0.4);
  box-shadow: 0 0 0 2px rgba(200, 190, 180, 0.2), 0 2px 4px rgba(0, 0, 0, 0.05);
}

.task-modal-btn:hover {
  color: #1a1a1a;
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.task-modal-btn-cancel {
  background: 
    linear-gradient(135deg, rgba(255, 255, 255, 0.5) 0%, rgba(250, 250, 250, 0.4) 100%);
}

.task-modal-btn-primary {
  background: #27ae60;
  color: white;
  border-color: #229954;
}

.task-modal-btn-primary:hover {
  background: #229954;
  border-color: #1e8449;
  color: white;
}

.task-modal-btn-primary:disabled {
  background: #ccc;
  border-color: #ccc;
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
}

@media (max-width: 600px) {
  .task-modal {
    width: 95%;
    max-height: 95vh;
  }
  
  .task-modal-body {
    padding: 1rem;
  }
  
  .task-modal-footer {
    padding: 0.625rem 1rem;
  }
  
  .task-template-chips,
  .task-recurrence-chips {
    gap: 0.375rem;
  }
  
  .task-template-chip,
  .task-recurrence-chip {
    font-size: 0.75rem;
    padding: 0.4rem 0.75rem;
  }
}

.btn-primary {
  padding: 0.5rem 1rem;
  background: transparent;
  color: #666;
  border: 1px solid #e0e0e0;
  border-radius: 2px;
  cursor: pointer;
  font-size: 0.75rem;
  width: 100%;
  margin-bottom: 0.75rem;
}

.btn-primary:hover {
  color: #999;
  border-color: #ddd;
}

.workspace-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.workspace-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem;
  border: 1px solid #e5e5e5;
  border-radius: 2px;
  background: #fafafa;
}

.workspace-item.active {
  background: #f5f5f5;
  border-color: #ddd;
}

.workspace-name-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.25rem;
  font-size: 0.75rem;
  color: #666;
}

.workspace-name-input:focus {
  outline: none;
  background: white;
}

.workspace-actions {
  display: flex;
  gap: 0.25rem;
}

.btn-small {
  padding: 0.125rem 0.5rem;
  font-size: 0.625rem;
  border: none;
  background: transparent;
  color: #999;
  cursor: pointer;
}

.btn-small:hover {
  color: #666;
}

.btn-danger {
  color: #999;
}

.btn-danger:hover {
  color: #e74c3c;
}

/* Section Toggle (Settings/Backup below h1) */
.section-toggle {
  background: #eeeeee;
  padding: 0.75rem 0;
  margin-bottom: 1rem;
  position: relative;
}

.section-toggle::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(to right, transparent 0%, #27ae60 50%, transparent 100%);
}

.section-content {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1rem;
}

.section-content > .section-row:not(:first-child) {
  margin-top: 3rem;
  padding-top: 3rem;
  border-top: 1px solid #e5e5e5;
}

.section-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.section-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #666;
  letter-spacing: -0.01em;
}

.section-value {
  font-size: 0.8125rem;
  font-weight: 400;
  color: #1a1a1a;
  letter-spacing: -0.01em;
}

.section-btn {
  padding: 0.5rem 1rem;
  background: transparent;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 500;
  color: #666;
  transition: all 0.2s;
  letter-spacing: -0.01em;
}

.section-btn:hover {
  background: #f8f9fa;
  color: #2a2a2a;
  border-color: #ddd;
}

.section-btn.btn-danger {
  color: #e74c3c;
}

.section-btn.btn-danger:hover {
  color: white;
  background: #e74c3c;
  border-color: #e74c3c;
}

/* Plugin controls in settings */
#settingsSection .plugin-controls {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

#settingsSection .plugin-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0;
}

#settingsSection .plugin-name {
  font-size: 0.75rem;
  color: #666;
  min-width: 100px;
}

#settingsSection .plugin-toggle {
  padding: 0.25rem 0.5rem;
  background: transparent;
  border: 1px solid #e0e0e0;
  border-radius: 2px;
  cursor: pointer;
  font-size: 0.625rem;
  color: #999;
  transition: all 0.2s;
}

#settingsSection .plugin-toggle:hover {
  color: #666;
  border-color: #ddd;
}

#settingsSection .plugin-toggle:disabled {
  color: #ccc;
  cursor: not-allowed;
}

/* Workspace list in settings */
.workspace-list-minimal {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  width: 100%;
}

.workspace-item-minimal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  background: #fafafa;
  border: 1px solid #e5e5e5;
  border-radius: 2px;
  transition: all 0.2s;
}

.workspace-item-minimal:hover {
  background: #f5f5f5;
  border-color: #ddd;
}

.workspace-item-minimal.active {
  background: #f5f5f5;
  border-color: #ddd;
}

.workspace-sno {
  font-size: 0.75rem;
  color: #999;
  min-width: 20px;
  font-weight: 400;
  flex-shrink: 0;
}

.workspace-name-minimal {
  flex: 1;
  padding: 0;
  font-size: 0.75rem;
  color: #666;
  cursor: pointer;
  font-weight: 400;
  transition: color 0.2s;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-name-minimal:hover {
  color: #999;
}

.workspace-name-input-minimal {
  flex: 1;
  border: 1px solid #e0e0e0;
  border-radius: 2px;
  background: white;
  padding: 0.25rem;
  font-size: 0.75rem;
  color: #666;
  font-family: inherit;
  font-weight: 400;
  min-width: 0;
}

.workspace-name-input-minimal:focus {
  outline: none;
  background: white;
  border-color: #ddd;
  box-shadow: none;
}

.workspace-actions-minimal {
  display: flex;
  gap: 0.25rem;
  align-items: center;
  flex-shrink: 0;
}

.workspace-actions-minimal .section-btn {
  min-width: auto;
  padding: 0.125rem 0.5rem;
  font-size: 0.625rem;
  white-space: nowrap;
}

.workspace-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  min-width: 0;
}

.workspace-meta {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.shared-badge-small, .member-count-badge, .role-badge-small {
  font-size: 0.625rem;
  padding: 0.125rem 0.375rem;
  border-radius: 2px;
  font-weight: 500;
  white-space: nowrap;
}

.shared-badge-small {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  color: #1565c0;
  border: 1px solid #90caf9;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(25, 118, 210, 0.15);
}

.private-badge-small {
  background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
  color: #424242;
  border: 1px solid #bdbdbd;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.member-count-badge {
  background: #f5f5f5;
  color: #666;
}

.role-badge-small {
  background: #f5f5f5;
  color: #666;
}

.role-badge-small.admin {
  background: #fff3e0;
  color: #e65100;
}

.workspace-action-group {
  display: flex;
  gap: 0.25rem;
  align-items: center;
  flex-wrap: wrap;
}

.workspace-selected-text {
  font-size: 0.625rem;
  color: #1976d2;
  font-weight: 500;
  padding: 0.125rem 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Workspace Settings - Standard Design */
.workspace-sharing-content {
  padding: 0;
}

.workspace-info-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e5e5e5;
}

.workspace-name-display {
  font-size: 0.875rem;
  font-weight: 600;
  color: #333;
}

.shared-badge-small,
.private-badge-small {
  font-size: 0.625rem;
  padding: 0.125rem 0.5rem;
  border-radius: 2px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.shared-badge-small {
  background: #e3f2fd;
  color: #1976d2;
}

.private-badge-small {
  background: #f5f5f5;
  color: #666;
}

.workspace-sharing-subsections {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.workspace-subsection {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.workspace-subsection-title {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #666;
  margin: 0;
  letter-spacing: -0.01em;
}

.workspace-subsection-header-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.workspace-subsection-header-action .workspace-subsection-title {
  margin: 0;
}

.members-list-settings {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.member-item-minimal {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  background: #fafafa;
  border: 1px solid #e5e5e5;
  border-radius: 2px;
  font-size: 0.75rem;
  transition: all 0.2s;
}

.member-item-minimal:hover {
  background: #f5f5f5;
  border-color: #ddd;
}

.member-avatar-minimal {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #1976d2;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.6875rem;
  flex-shrink: 0;
}

.member-name-minimal {
  flex: 1;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.role-badge-minimal {
  font-size: 0.625rem;
  padding: 0.125rem 0.375rem;
  border-radius: 2px;
  font-weight: 500;
}

.role-badge-minimal.owner {
  background: #fff3e0;
  color: #e65100;
}

.role-badge-minimal.admin {
  background: #e3f2fd;
  color: #1976d2;
}

.member-actions-minimal {
  display: flex;
  gap: 0.25rem;
  flex-shrink: 0;
}

.member-actions-minimal button {
  padding: 0.25rem 0.5rem;
  background: transparent;
  border: 1px solid #e0e0e0;
  border-radius: 2px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  color: #666;
}

.member-actions-minimal button:hover {
  background: #f5f5f5;
  border-color: #ddd;
  color: #333;
}

.member-actions-minimal button.btn-minimal-danger {
  color: #c62828;
  border-color: #ffcdd2;
}

.member-actions-minimal button.btn-minimal-danger:hover {
  background: #ffebee;
  border-color: #ef9a9a;
}

.invite-form-settings {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.invite-inputs-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.invite-input-wrapper {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.invite-input-wrapper .settings-input {
  flex: 1;
}

.invite-message-settings {
  font-size: 0.75rem;
  padding: 0.5rem;
  border-radius: 2px;
  display: none;
}

.invite-message-settings.success {
  background: #e8f5e9;
  color: #2e7d32;
  display: block;
}

.invite-message-settings.error {
  background: #ffebee;
  color: #c62828;
  display: block;
}

.invite-links-list-settings {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.invite-link-item-settings {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.5rem;
  background: #fafafa;
  border: 1px solid #e5e5e5;
  border-radius: 2px;
}

.invite-link-item-settings.expired {
  opacity: 0.6;
}

.invite-link-url-settings {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.invite-link-url-settings .settings-input {
  flex: 1;
  font-family: monospace;
  font-size: 0.6875rem;
}

.invite-link-input {
  background: #f5f5f5;
}

.invite-link-input:read-only {
  cursor: text;
}

.invite-link-expired {
  flex: 1;
  font-size: 0.75rem;
  color: #999;
  font-style: italic;
}

.invite-link-meta-settings {
  font-size: 0.75rem;
  color: #999;
  padding-left: 0;
}

.btn-minimal {
  padding: 0.25rem 0.5rem;
  background: transparent;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-minimal:hover {
  background: #f5f5f5;
  border-color: #ddd;
}

.btn-minimal-danger {
  color: #c62828;
  border-color: #ffcdd2;
}

.btn-minimal-danger:hover {
  background: #ffebee;
  border-color: #ef9a9a;
}

.empty-state-settings {
  font-size: 0.75rem;
  color: #999;
  padding: 0.5rem;
  text-align: center;
}

.no-permission-minimal {
  font-size: 0.75rem;
  color: #999;
  padding: 0.5rem;
}

.workspace-status-text {
  font-size: 0.75rem;
  color: #666;
  padding: 0.5rem 0;
  font-style: italic;
}

.workspace-status-badge {
  font-size: 0.625rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
  background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
  color: #424242;
  border: 1px solid #bdbdbd;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.workspace-status-badge.shared {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  color: #1565c0;
  border: 1px solid #90caf9;
  box-shadow: 0 1px 2px rgba(25, 118, 210, 0.15);
}

.no-permission-minimal {
  font-size: 0.75rem;
  color: #999;
  padding: 0.5rem;
}

/* Legacy support for full modal invite form */
.invite-message-minimal {
  font-size: 0.75rem;
  padding: 0.375rem 0.5rem;
  border-radius: 4px;
  display: none;
}

.invite-message-minimal.success {
  background: #e8f5e9;
  color: #2e7d32;
  display: block;
}

.invite-message-minimal.error {
  background: #ffebee;
  color: #c62828;
  display: block;
}

/* Workspace Sharing UI */
.workspace-sharing-panel {
  padding: 0;
}

.workspace-sharing-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.workspace-sharing-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.shared-badge {
  background: #e3f2fd;
  color: #1976d2;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

.workspace-sharing-section {
  margin-bottom: 1.5rem;
}

.workspace-sharing-section h4 {
  margin: 0 0 0.75rem 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: #333;
}

.section-header-with-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.section-header-with-action h4 {
  margin: 0;
}

.members-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.member-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: #fafafa;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
}

.member-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

.member-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #1976d2;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.member-details {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.member-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-meta {
  font-size: 0.75rem;
  color: #999;
}

.member-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-shrink: 0;
}

.role-badge {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

.role-badge.owner {
  background: #fff3e0;
  color: #e65100;
}

.role-badge.admin {
  background: #e3f2fd;
  color: #1976d2;
}

.role-badge.member {
  background: #f5f5f5;
  color: #666;
}

.btn-small {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
}

.invite-links-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.invite-link-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: #fafafa;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
}

.invite-link-item.expired {
  opacity: 0.6;
}

.invite-link-info {
  flex: 1;
  min-width: 0;
}

.invite-link-url {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.invite-link-input {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  font-size: 0.75rem;
  font-family: monospace;
  background: white;
}

.invite-link-input:read-only {
  background: #f5f5f5;
  cursor: text;
}

.invite-link-meta {
  font-size: 0.75rem;
  color: #999;
}

.expired-links-header {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #999;
}

.invite-form {
  margin-top: 0.75rem;
}

.invite-form-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.invite-tab {
  padding: 0.5rem 1rem;
  background: transparent;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.2s;
}

.invite-tab:hover {
  background: #f5f5f5;
}

.invite-tab.active {
  background: #1976d2;
  color: white;
  border-color: #1976d2;
}

.invite-input-group {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.invite-input-group input {
  flex: 1;
}

.invite-message {
  margin-top: 0.75rem;
  padding: 0.5rem;
  border-radius: 4px;
  font-size: 0.875rem;
  display: none;
}

.invite-message.success {
  background: #e8f5e9;
  color: #2e7d32;
  display: block;
}

.invite-message.error {
  background: #ffebee;
  color: #c62828;
  display: block;
}

.empty-state {
  padding: 1rem;
  text-align: center;
  color: #999;
  font-size: 0.875rem;
}

.no-permission {
  padding: 0.75rem;
  background: #fff3e0;
  color: #e65100;
  border-radius: 4px;
  font-size: 0.875rem;
}

/* Settings Modal - Full Page Popup */
.settings-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.settings-modal-header {
  background: white;
  padding: 2.5rem 1rem 0.75rem 1rem;
  border-bottom: 1px solid #e5e5e5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 10001;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

.settings-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: #666;
  margin: 0;
  letter-spacing: -0.01em;
}

.settings-close-btn {
  background: transparent;
  border: 1px solid #e0e0e0;
  border-radius: 2px;
  font-size: 1.25rem;
  color: #999;
  cursor: pointer;
  padding: 0;
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  line-height: 1;
}

.settings-close-btn:hover {
  background: #fafafa;
  color: #666;
  border-color: #ddd;
}

.settings-modal-body {
  background: #fafafa;
  flex: 1;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  padding: 1rem;
  box-sizing: border-box;
}

/* Settings Sections */
.settings-section {
  margin-bottom: 1rem;
  padding: 0.75rem 0;
  background: transparent;
  border-radius: 0;
  border: none;
}

.settings-section:not(:first-child) {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #e5e5e5;
}

.settings-section:last-child {
  margin-bottom: 0;
}

.settings-section-header {
  margin-bottom: 0.75rem;
  padding-bottom: 0;
  border-bottom: none;
}

.settings-section-title {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #666;
  margin: 0;
  letter-spacing: -0.01em;
}

.settings-section-description {
  font-size: 0.75rem;
  color: #999;
  margin: 0.25rem 0 0 0;
  line-height: 1.5;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.settings-section-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Settings Buttons - Match Calendar Nav Button Size */
.settings-btn {
  padding: 0.5rem 1rem;
  background: transparent;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 500;
  color: #666;
  transition: all 0.2s;
  letter-spacing: -0.01em;
  white-space: nowrap;
  min-width: auto;
  height: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
}

.settings-btn:hover {
  background: #f8f9fa;
  color: #2a2a2a;
  border-color: #ddd;
  transform: none;
  box-shadow: none;
}

.settings-btn:active {
  transform: none;
}

.settings-btn-secondary {
  background: transparent;
  color: #999;
  border-color: #e0e0e0;
}

.settings-btn-secondary:hover {
  background: #fafafa;
  color: #666;
  border-color: #ddd;
}

.settings-btn-danger {
  color: #999;
  border-color: #e0e0e0;
}

.settings-btn-danger:hover {
  background: transparent;
  color: #e74c3c;
  border-color: #e0e0e0;
}

.settings-action-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.settings-backup-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
}

.settings-version {
  font-size: 0.75rem;
  color: #999;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.settings-version-footer {
  text-align: center;
  padding: 2rem 0 1rem 0;
  margin-top: 2rem;
  border-top: 1px solid #e5e5e5;
}

.settings-version-footer .settings-version {
  display: inline-block;
}

.settings-section-actions {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

/* Settings Fields - Match Todo App Style */
.settings-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.5rem 0;
  background: transparent;
  border: none;
  border-radius: 0;
  margin-bottom: 0.75rem;
  transition: none;
}

.settings-field:last-child {
  margin-bottom: 0;
}

.settings-field-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #666;
  margin: 0;
  letter-spacing: -0.01em;
}

.settings-field-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.settings-field-display {
  padding: 0.25rem 0.5rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: 0.8125rem;
  color: #1a1a1a;
  cursor: pointer;
  transition: all 0.2s;
  min-height: auto;
  display: flex;
  align-items: center;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.settings-field-display:hover {
  border-color: #e0e0e0;
  background: #fafafa;
  box-shadow: none;
}

.settings-field-edit {
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.settings-input {
  padding: 0.25rem 0.5rem;
  border: 1px solid #e0e0e0;
  border-radius: 2px;
  font-size: 0.8125rem;
  color: #1a1a1a;
  background: white;
  letter-spacing: -0.01em;
  transition: all 0.2s;
  font-family: inherit;
  font-weight: 400;
  flex: 1;
  min-width: 150px;
}

.settings-input:focus {
  outline: none;
  background: white;
  border-color: #ddd;
  box-shadow: none;
}

.settings-field-edit .section-btn {
  align-self: flex-start;
  min-width: auto;
  flex-shrink: 0;
}

.settings-field-actions {
  padding: 0;
  background: transparent;
  border: none;
  align-items: stretch;
  margin-top: 0;
}

.settings-field-actions .section-btn {
  width: 100%;
  min-width: auto;
}

/* Plugin controls in settings modal */
#settingsModal .plugin-controls {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#settingsModal .plugin-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem;
  background: #fafafa;
  border: 1px solid #e5e5e5;
  border-radius: 2px;
  transition: all 0.2s;
}

#settingsModal .plugin-item:hover {
  border-color: #ddd;
  background: #f5f5f5;
}

#settingsModal .plugin-name {
  font-size: 0.75rem;
  color: #666;
  font-weight: 400;
}

/* Category management styles */
.category-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.category-empty {
  font-size: 0.75rem;
  color: #999;
  padding: 0.5rem;
  text-align: center;
}

.category-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  background: #fafafa;
  border: 1px solid #e5e5e5;
  border-radius: 2px;
  transition: all 0.2s;
}

.category-item:hover {
  background: #f5f5f5;
  border-color: #ddd;
}

.category-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

.category-name {
  font-size: 0.75rem;
  color: #666;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.category-task-count {
  font-size: 0.75rem;
  color: #999;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.category-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.category-action-btn {
  padding: 0.25rem 0.75rem;
  background: transparent;
  border: 1px solid #ddd;
  border-radius: 2px;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 500;
  color: #666;
  transition: all 0.2s;
  letter-spacing: -0.01em;
  white-space: nowrap;
  font-family: inherit;
}

.category-action-btn:hover {
  background: #f8f9fa;
  color: #2a2a2a;
  border-color: #ddd;
}

.category-action-btn:active {
  transform: none;
}

  letter-spacing: 0;
}

#settingsModal .plugin-toggle {
  padding: 0.25rem 0.5rem;
  background: transparent;
  border: 1px solid #e0e0e0;
  border-radius: 2px;
  cursor: pointer;
  font-size: 0.625rem;
  color: #999;
  font-weight: 400;
  transition: all 0.2s;
}

#settingsModal .plugin-toggle:hover {
  color: #666;
  border-color: #ddd;
}

#settingsModal .plugin-toggle:hover {
  color: #333;
  border-color: #d0d0d0;
  background: #fafafa;
}

#settingsModal .plugin-toggle:disabled {
  color: #ccc;
  cursor: not-allowed;
  background: #f5f5f5;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.header h1 {
  font-size: 2rem;
  font-weight: 200;
  color: #1a1a1a;
  margin: 0;
  letter-spacing: -0.01em;
  line-height: 1.1;
  font-feature-settings: 'kern' 1, 'ss01' 1, 'ss02' 1;
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  font-variant-ligatures: common-ligatures;
}

.author-hint {
  font-size: 0.7rem;
  font-weight: 300;
  color: #999;
  letter-spacing: 0.02em;
  margin-left: 0.5rem;
  opacity: 0.6;
  font-style: italic;
  background: none;
  -webkit-background-clip: initial;
  -webkit-text-fill-color: initial;
  background-clip: initial;
  transition: opacity 0.3s ease;
  vertical-align: baseline;
  position: relative;
  top: 0.1rem;
  animation: fadeInAuthor 2.5s ease-out 1.5s both;
}

@keyframes fadeInAuthor {
  0% { opacity: 0; color: #999; }
  30% { opacity: 0.8; color: #666; }
  50% { opacity: 0.8; color: #666; }
  100% { opacity: 0.5; color: #999; }
}

.header:hover .author-hint {
  opacity: 0.7;
}

