/* ============================================================================
   Settings Page Styles
   Extracted from styles.css for better organization
   ============================================================================ */

/* Settings Modal/Page Container */
.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: 10002;
  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-search-container {
  background: white;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e5e5e5;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

.settings-search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.settings-search-icon {
  position: absolute;
  left: 0.5rem;
  width: 16px;
  height: 16px;
  color: #999;
  pointer-events: none;
  z-index: 1;
}

.settings-search-input {
  width: 100%;
  padding: 0.5rem 2rem 0.5rem 2rem;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  font-size: 0.8125rem;
  color: #1a1a1a;
  background: #fafafa;
  letter-spacing: -0.01em;
  transition: all 0.2s;
  font-family: inherit;
  font-weight: 400;
  box-sizing: border-box;
}

.settings-search-input:focus {
  outline: none;
  background: white;
  border-color: #ddd;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
}

.settings-search-input::placeholder {
  color: #999;
}

.settings-search-clear {
  position: absolute;
  right: 0.5rem;
  background: transparent;
  border: none;
  border-radius: 50%;
  font-size: 1.125rem;
  color: #999;
  cursor: pointer;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  line-height: 1;
  z-index: 1;
}

.settings-search-clear:hover {
  background: #f0f0f0;
  color: #666;
}

.settings-search-no-results {
  padding: 2rem 1rem;
  text-align: center;
  font-size: 0.8125rem;
  color: #999;
  background: white;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  margin: 1rem 0;
}

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

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

.settings-section:not(:first-child) {
  margin-top: 0;
  padding-top: 0.75rem;
}

.settings-section:not(:first-child)::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(39, 174, 96, 0.3) 20%, rgba(39, 174, 96, 0.5) 50%, rgba(39, 174, 96, 0.3) 80%, transparent 100%);
}

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

/* Reduce spacing when section is collapsed */
.settings-section:has(.collapsible-content.collapsed) {
  padding: 0.375rem 0;
}

.settings-section:has(.collapsible-content.collapsed):not(:first-child) {
  padding-top: 0.375rem;
}

/* Collapsible Header */
.collapsible-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.25rem 0;
  cursor: pointer;
  transition: none;
  user-select: none;
}

.collapsible-header:hover {
  opacity: 0.8;
}

.settings-section-header-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}

.settings-section-icon {
  width: 16px;
  height: 16px;
  color: #999;
  flex-shrink: 0;
}

.settings-section-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  flex: 1;
  min-width: 0;
}

.settings-section-subtext {
  font-size: 0.6875rem;
  color: #999;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.collapsible-icon {
  width: 16px;
  height: 16px;
  color: #999;
  transition: none;
  flex-shrink: 0;
}

.settings-section-header {
  margin-bottom: 0;
  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-preview {
  font-size: 0.75rem;
  color: #999;
  font-weight: 400;
  margin-left: auto;
  margin-right: 0.5rem;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Hide preview when section is expanded */
.settings-section:has(.collapsible-content:not(.collapsed)) .settings-section-preview {
  display: none;
}

.account-preview-avatar {
  width: 20px;
  height: 20px;
  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;
}

.account-preview-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Account Profile Header */
.account-profile-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  background: white;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.account-profile-avatar-large {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1.5rem;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(25, 118, 210, 0.2);
}

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

.account-profile-name {
  font-size: 1rem;
  font-weight: 600;
  color: #1a1a1a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.account-profile-email {
  font-size: 0.8125rem;
  color: #666;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.account-fields {
  padding: 0;
}

.account-field {
  padding: 0.75rem 0;
  margin-bottom: 0;
}

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

.account-actions-section {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e5e5;
}

/* Collapsible Content */
.collapsible-content {
  max-height: none;
  overflow: visible;
  opacity: 1;
  padding-top: 0.75rem;
}

.collapsible-content.collapsed {
  display: none;
  padding-top: 0;
}

/* Subsections */
.settings-subsection {
  padding: 0;
  margin-bottom: 1rem;
}

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

.settings-subsection-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0;
  margin-bottom: 0.5rem;
  background: transparent;
  border-bottom: none;
}

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

.settings-subsection-subtitle {
  font-size: 0.75rem;
  font-weight: 500;
  color: #999;
  margin: 0.75rem 0 0.375rem 0;
  letter-spacing: -0.01em;
}

.settings-subsection-content {
  padding: 0;
}

.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;
}

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

/* Settings Buttons */
.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 Fields */
.settings-field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 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;
}

/* Backup Section */
.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: 1.5rem 0 0.75rem 0;
  margin-top: 1.5rem;
  border-top: 1px solid #e5e5e5;
}

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

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

#settingsModal .plugin-item,
.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,
.plugin-item:hover {
  border-color: #ddd;
  background: #f5f5f5;
}

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

#settingsModal .plugin-toggle,
.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,
.plugin-toggle:hover {
  color: #333;
  border-color: #d0d0d0;
  background: #fafafa;
}

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

/* Category Management */
.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;
}

/* Calendar Settings */
.calendar-settings-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.calendar-setting-item {
  display: flex;
  align-items: flex-start;
  padding: 0.75rem;
  background: #fafafa;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  transition: all 0.2s;
}

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

.calendar-setting-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  width: 100%;
}

.calendar-setting-checkbox {
  margin-top: 0.125rem;
  cursor: pointer;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.calendar-setting-info {
  flex: 1;
  min-width: 0;
}

.calendar-setting-name {
  font-size: 0.8125rem;
  color: #666;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 0.25rem;
}

.calendar-setting-description {
  font-size: 0.75rem;
  color: #999;
  line-height: 1.4;
}

.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;
}

/* Workspace Management */
.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-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  min-width: 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-meta {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.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-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 Badges */
.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 Sharing UI */
.workspace-sharing-content {
  padding: 0;
}

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

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

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

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

.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.375rem;
}

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

.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);
}

/* 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;
}

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

.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;
}

.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;
}

/* Member Management */
.members-list,
.members-list-settings {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.member-item,
.member-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;
  font-size: 0.75rem;
  transition: all 0.2s;
}

.member-item {
  padding: 0.75rem;
  border-radius: 4px;
}

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

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

.member-avatar,
.member-avatar-minimal {
  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-avatar-minimal {
  width: 24px;
  height: 24px;
  font-size: 0.6875rem;
}

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

.member-details {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  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,
.member-actions-minimal {
  display: flex;
  gap: 0.25rem;
  flex-shrink: 0;
}

.member-actions button,
.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 button:hover,
.member-actions-minimal button:hover {
  background: #f5f5f5;
  border-color: #ddd;
  color: #333;
}

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

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

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

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

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

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

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

/* Invite Forms */
.invite-form,
.invite-form-settings {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.invite-form-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid #e5e5e5;
}

.invite-tab {
  padding: 0.5rem 1rem;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-size: 0.75rem;
  color: #999;
  transition: all 0.2s;
}

.invite-tab:hover {
  color: #666;
}

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

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

.invite-inputs-group {
  flex-direction: column;
}

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

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

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

.invite-message-settings {
  padding: 0.375rem 0.5rem;
}

.invite-message-minimal {
  padding: 0.375rem 0.5rem;
  border-radius: 4px;
}

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

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

/* Invite Links */
.invite-links-list,
.invite-links-list-settings {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.invite-link-item,
.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 {
  border-radius: 4px;
}

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

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

.invite-link-url {
  flex: 1;
}

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

.invite-link-input {
  padding: 0.25rem 0.5rem;
  border: 1px solid #e0e0e0;
  border-radius: 2px;
  font-size: 0.75rem;
}

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

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

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

.expired-links-header {
  font-size: 0.75rem;
  color: #999;
  font-weight: 500;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid #e5e5e5;
}

/* Utility Classes */
.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,
.no-permission-minimal {
  font-size: 0.75rem;
  color: #999;
  padding: 0.5rem;
}

.empty-state-settings {
  text-align: center;
}

.workspace-sharing-error {
  font-size: 0.75rem;
  color: #c62828;
  padding: 0.5rem;
  background: #ffebee;
  border-radius: 2px;
}

/* Workspace Header Info */
.workspace-header-info {
  padding: 0.5rem 0;
  border-bottom: 1px solid #e5e5e5;
  margin-bottom: 0.75rem;
}

.workspace-header-main {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.workspace-icon-box {
  width: 50px;
  height: 50px;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 3px 6px rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.15);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.workspace-icon-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.1) 50%, rgba(168, 85, 247, 0.08) 100%);
  border-radius: 10px;
}

.workspace-icon-box svg {
  position: relative;
  z-index: 1;
  color: #6366f1;
  filter: drop-shadow(0 0 4px rgba(99, 102, 241, 0.3));
}

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

.workspace-name-header {
  font-size: 0.875rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.25rem;
}

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

.workspace-owner-info {
  font-size: 0.75rem;
  color: #999;
}

.workspace-sharing-inline {
  padding: 0;
}

.workspace-sharing-inline-content {
  padding: 0;
}

/* Backup Controls */
.backup-downloads-list {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e5e5e5;
}

.backup-downloads {
  margin-top: 0.375rem;
}

.backup-settings {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e5e5e5;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.settings-toggle-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.8125rem;
  color: #666;
}

.settings-toggle-input {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.settings-toggle-label-text {
  user-select: none;
}

/* Calendar Settings Container */
.calendar-settings-container {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e5e5e5;
}

/* App Info */
.app-info-content {
  padding: 0.5rem 0;
}

.app-version-info {
  margin-bottom: 0.5rem;
}

.app-info-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.app-info-link {
  font-size: 0.8125rem;
  color: #1976d2;
  text-decoration: none;
  transition: color 0.2s;
}

.app-info-link:hover {
  color: #1565c0;
  text-decoration: underline;
}

/* Route-based Settings Page (non-modal) */
#settings-route {
  width: 100%;
  min-height: 100vh;
  background: #fafafa;
}

#settings-route .settings-modal-header {
  position: relative;
  background: white;
}

#settings-route .settings-modal-body {
  background: #fafafa;
}

