@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css');

:root {
  --app-light: #e9ecef;
  --app-dark: #343a40;
  --theme-accent-soft: #e5e5e5;
  --theme-accent: #343a40;
  --theme-accent-light: #5c6670;
  --theme-accent-dark: #23272b;
  --theme-accent-contrast: #ffffff;
  --primary: #343a40;
  --primary-light: #5c6670;
  --primary-dark: #23272b;
  --secondary: #0ea5e9;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  --dark: #343a40;
  --gray-50: #f8f9fa;
  --gray-100: #e9ecef;
  --gray-200: #dee2e6;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --surface: #ffffff;
  --surface-muted: #f8f9fa;
  --surface-elevated: #ffffff;
  --surface-active: #dee2e6;
  --page-bg: #e9ecef;
  --text-on-primary: #ffffff;
  --color-bg: var(--page-bg);
  --color-surface: var(--surface);
  --color-surface-elevated: var(--surface-elevated);
  --color-card-bg: var(--surface);
  --color-border: var(--gray-200);
  --color-divider: var(--gray-100);
  --color-text-primary: var(--gray-800);
  --color-text-secondary: var(--gray-600);
  --color-text-muted: var(--gray-500);
  --color-heading: var(--gray-900);
  --color-link: var(--primary);
  --color-input-bg: var(--surface);
  --color-input-border: var(--gray-300);
  --color-input-text: var(--gray-900);
  --color-placeholder: var(--gray-400);
  --color-button-text: var(--text-on-primary);
  --color-disabled-text: var(--gray-400);
  --color-badge-text: var(--gray-700);
  --color-notification-text: var(--gray-800);
  --sidebar-width: 260px;
  --header-height: 64px;
  --radius: 8px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  --transition: all 0.2s ease;
}

html[data-accent='default'],
html[data-accent='gray'] {
  --theme-accent-soft: #e5e5e5;
  --theme-accent: #343a40;
  --theme-accent-light: #5c6670;
  --theme-accent-dark: #23272b;
}

html[data-accent='charcoal'],
html[data-accent='slate'] {
  --theme-accent-soft: #e5e7eb;
  --theme-accent: #111827;
  --theme-accent-light: #374151;
  --theme-accent-dark: #030712;
}

html[data-accent='blue'] {
  --theme-accent-soft: #dbeafe;
  --theme-accent: #2563eb;
  --theme-accent-light: #60a5fa;
  --theme-accent-dark: #1d4ed8;
}

html[data-accent='purple'] {
  --theme-accent-soft: #ede9fe;
  --theme-accent: #7c3aed;
  --theme-accent-light: #a78bfa;
  --theme-accent-dark: #6d28d9;
}

html[data-accent='green'] {
  --theme-accent-soft: #dcfce7;
  --theme-accent: #16a34a;
  --theme-accent-light: #4ade80;
  --theme-accent-dark: #15803d;
}

html[data-accent='amber'],
html[data-accent='yellow'] {
  --theme-accent-soft: #fef3c7;
  --theme-accent: #d97706;
  --theme-accent-light: #fbbf24;
  --theme-accent-dark: #b45309;
}

html[data-accent='roseGold'],
html[data-accent='red'] {
  --theme-accent-soft: #ffe4e6;
  --theme-accent: #be5f6d;
  --theme-accent-light: #fb7185;
  --theme-accent-dark: #9f4252;
}

html[data-accent] {
  --primary: var(--theme-accent);
  --primary-light: var(--theme-accent-light);
  --primary-dark: var(--theme-accent-dark);
  --secondary: var(--theme-accent-light);
  --info: var(--theme-accent);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 14px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Vazirmatn', sans-serif;
  background: var(--color-bg);
  color: var(--color-text-primary);
  line-height: 1.6;
  direction: rtl;
}

html[data-theme='dark'] {
  color-scheme: dark;
  --gray-50: #1f252c;
  --gray-100: #2a313a;
  --gray-200: #39424d;
  --gray-300: #52606f;
  --gray-400: #94a3b8;
  --gray-500: #cbd5e1;
  --gray-600: #dbe4ee;
  --gray-700: #e7edf5;
  --gray-800: #f1f5f9;
  --gray-900: #ffffff;
  --surface: #222a33;
  --surface-muted: #182028;
  --surface-elevated: #2b3440;
  --surface-active: #364250;
  --page-bg: #111820;
  --text-on-primary: #ffffff;
  --color-bg: var(--page-bg);
  --color-surface: var(--surface);
  --color-surface-elevated: var(--surface-elevated);
  --color-card-bg: var(--surface);
  --color-border: var(--gray-200);
  --color-divider: var(--gray-100);
  --color-text-primary: var(--gray-800);
  --color-text-secondary: var(--gray-600);
  --color-text-muted: var(--gray-500);
  --color-heading: var(--gray-900);
  --color-link: var(--primary-light);
  --color-input-bg: #182028;
  --color-input-border: #4b5563;
  --color-input-text: #f8fafc;
  --color-placeholder: #aab6c5;
  --color-button-text: #ffffff;
  --color-disabled-text: #8a97a8;
  --color-badge-text: #e7edf5;
  --color-notification-text: #f1f5f9;
  --shadow: 0 1px 3px rgba(0,0,0,0.32), 0 1px 2px rgba(0,0,0,0.28);
  --shadow-md: 0 4px 8px rgba(0,0,0,0.35);
  --shadow-lg: 0 10px 20px rgba(0,0,0,0.4);
}

html[data-theme='dark'][data-accent] {
  --primary: var(--theme-accent);
  --primary-light: color-mix(in srgb, var(--theme-accent-light), #ffffff 8%);
  --primary-dark: color-mix(in srgb, var(--theme-accent-dark), #000000 8%);
  --secondary: var(--theme-accent-light);
  --info: var(--theme-accent-light);
}

html[data-theme='dark'] body { color: var(--color-text-primary); }

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, textarea, select { font-family: inherit; outline: none; }

input, textarea, select {
  font-family: 'Vazirmatn', sans-serif;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

.card {
  background: var(--color-card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); }

html[data-theme='dark'] .card,
html[data-theme='dark'] .modal,
html[data-theme='dark'] .drawer,
html[data-theme='dark'] .form-input,
html[data-theme='dark'] .form-select,
html[data-theme='dark'] .form-textarea {
  background: var(--color-input-bg);
  color: var(--color-input-text);
}

html[data-theme='dark'] .card,
html[data-theme='dark'] .modal,
html[data-theme='dark'] .drawer {
  background: var(--color-card-bg);
  border-color: var(--color-border);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.875rem;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-primary { background: var(--primary); color: var(--color-button-text); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--gray-100); color: var(--gray-700); }
.btn-secondary:hover { background: var(--gray-200); }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-outline { border: 1px solid var(--gray-300); color: var(--gray-700); background: transparent; }
.btn-outline:hover { background: var(--gray-50); border-color: var(--gray-400); }
.btn:disabled,
button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.8125rem; }
.btn-lg { padding: 0.75rem 1.5rem; font-size: 1rem; }

.theme-accent-picker {
  display: grid;
  gap: 0.45rem;
  color: var(--gray-600);
  font-size: 0.82rem;
  font-weight: 800;
}

.theme-accent-picker > div {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.theme-accent-picker.compact {
  display: flex;
  align-items: center;
}

.theme-accent-picker button {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--accent-swatch);
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 1px var(--gray-200), var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.theme-accent-picker button.active {
  transform: translateY(-1px) scale(1.05);
  box-shadow: 0 0 0 2px var(--primary), var(--shadow-md);
}

.theme-mode-toggle {
  min-height: 42px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  background: var(--surface-muted);
  color: var(--gray-700);
  border: 1px solid var(--gray-200);
  padding: 0 0.85rem;
  font-weight: 800;
  transition: var(--transition);
}

.theme-mode-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.theme-mode-toggle.compact {
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  gap: 0.25rem;
}
.badge-primary { background: #eef2ff; color: var(--primary); }
.badge-success { background: #f0fdf4; color: var(--success); }
.badge-warning { background: #fffbeb; color: var(--warning); }
.badge-danger { background: #fef2f2; color: var(--danger); }
.badge-info { background: #eff6ff; color: var(--info); }
.badge-gray { background: var(--gray-100); color: var(--gray-600); }

html[data-theme='dark'] .badge-primary { background: rgba(14, 165, 233, 0.18); color: #bae6fd; }
html[data-theme='dark'] .badge-success { background: rgba(34, 197, 94, 0.18); color: #bbf7d0; }
html[data-theme='dark'] .badge-warning { background: rgba(245, 158, 11, 0.18); color: #fde68a; }
html[data-theme='dark'] .badge-danger { background: rgba(239, 68, 68, 0.18); color: #fecaca; }
html[data-theme='dark'] .badge-info { background: rgba(59, 130, 246, 0.18); color: #bfdbfe; }
html[data-theme='dark'] .badge-gray { background: var(--gray-100); color: var(--gray-700); }

.page-container { padding: 1.5rem; max-width: 1400px; margin: 0 auto; }
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.page-title { font-size: 1.5rem; font-weight: 700; color: var(--gray-900); }

.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1200px) { .grid-4 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 992px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.form-group { margin-bottom: 1rem; }
.form-label { display: block; font-size: 0.875rem; font-weight: 500; color: var(--gray-700); margin-bottom: 0.375rem; }
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--color-input-border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  transition: var(--transition);
  background: var(--color-input-bg);
  color: var(--color-input-text);
}

.form-input::placeholder,
.form-textarea::placeholder,
input::placeholder,
textarea::placeholder {
  color: var(--color-placeholder);
  opacity: 1;
}
.form-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--gray-500) 50%), linear-gradient(135deg, var(--gray-500) 50%, transparent 50%);
  background-position: left 5px center, left 10px center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-left: 1.5rem;
}
.form-select[multiple] {
  background-image: none;
  padding-left: 0.875rem;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}
.form-textarea { min-height: 100px; resize: vertical; }
.form-error { font-size: 0.75rem; color: var(--danger); margin-top: 0.25rem; }
.persian-date-picker { position: relative; width: 100%; }
.persian-date-input {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  text-align: right;
  color: var(--gray-900);
}
.persian-date-input span { flex: 1; color: inherit; }
.persian-date-clear { color: var(--gray-400); flex-shrink: 0; }
.persian-date-popover {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 292px;
  background: var(--surface);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 0.75rem;
  z-index: 130;
}
.persian-date-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  color: var(--gray-900);
}
.persian-date-head button {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-600);
}
.persian-date-head button:hover { background: var(--gray-100); }
.persian-date-weekdays,
.persian-date-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.25rem;
}
.persian-date-weekdays span {
  text-align: center;
  font-size: 0.75rem;
  color: var(--gray-500);
  padding-bottom: 0.25rem;
}
.persian-date-grid button,
.persian-date-grid span {
  height: 34px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  color: var(--gray-700);
}
.persian-date-grid button:hover { background: var(--gray-100); }
.persian-date-grid button.today { border: 1px solid var(--primary); }
.persian-date-grid button.selected { background: var(--primary); color: var(--text-on-primary); }
.persian-date-footer {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.75rem;
  border-top: 1px solid var(--gray-100);
  padding-top: 0.75rem;
}

.table-container { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th {
  text-align: right;
  padding: 0.75rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  border-bottom: 2px solid var(--gray-200);
  white-space: nowrap;
}
tbody td {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}
tbody tr:hover { background: var(--surface-muted); }

.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--gray-400);
}
.empty-state-icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.5; }
.empty-state-text { font-size: 1rem; font-weight: 500; margin-bottom: 0.5rem; }
.empty-state-desc { font-size: 0.875rem; }

.skeleton {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  overflow: hidden;
}
.modal {
  background: var(--surface);
  border-radius: 20px;
  width: 100%;
  max-width: 520px;
  max-height: calc(100dvh - 2rem);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-200);
  isolation: isolate;
}
.modal-lg { max-width: 720px; }
.modal-sm { max-width: 400px; }
.modal-xl { max-width: 920px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--gray-200); border-radius: 20px 20px 0 0; }
.modal-title { font-size: 1.125rem; font-weight: 600; }
.modal-body { min-height: 0; padding: 1.5rem; overflow: hidden; }
.modal-footer { display: flex; justify-content: flex-end; gap: 0.75rem; padding: 1rem 1.5rem; border-top: 1px solid var(--gray-200); border-radius: 0 0 20px 20px; }
.modal-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fef2f2;
  color: var(--danger);
  font-size: 1.35rem;
  line-height: 1;
  border: 1px solid #fecaca;
  transition: var(--transition);
}
.modal-close:hover {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
  transform: rotate(90deg);
}

.project-modal-form,
.compact-modal-form { display: grid; gap: 0.75rem; }
.project-modal-form .form-group,
.compact-modal-form .form-group { margin-bottom: 0; }
.project-modal-form .form-textarea,
.compact-modal-form .form-textarea { min-height: 72px; max-height: 92px; }
.project-modal-grid,
.compact-modal-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
.project-modal-grid .wide,
.compact-modal-grid .wide { grid-column: span 2; }
.compact-modal-grid .full { grid-column: 1 / -1; }
.compact-modal-form .form-select[multiple] { min-height: 86px; }

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
}
.drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 480px;
  max-width: 90vw;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.drawer-header { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--gray-200); }
.drawer-title { font-size: 1.125rem; font-weight: 600; }
.drawer-body { flex: 1; overflow-y: auto; padding: 1.5rem; }
.drawer-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--gray-200); display: flex; justify-content: flex-end; gap: 0.75rem; }

.tabs { display: flex; border-bottom: 2px solid var(--gray-200); margin-bottom: 1.5rem; gap: 0; }
.tab { padding: 0.75rem 1.25rem; font-size: 0.875rem; font-weight: 500; color: var(--gray-500); border-bottom: 2px solid transparent; margin-bottom: -2px; transition: var(--transition); cursor: pointer; }
.tab:hover { color: var(--gray-700); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }

.progress-bar { height: 8px; background: var(--gray-200); border-radius: 9999px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 9999px; transition: width 0.5s ease; background: var(--primary); }

.avatar {
  width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 1rem;
  background: var(--primary-light); color: #fff;
  flex-shrink: 0;
}
.avatar-sm { width: 32px; height: 32px; font-size: 0.8125rem; }
.avatar-lg { width: 48px; height: 48px; font-size: 1.25rem; }
.avatar-xl { width: 64px; height: 64px; font-size: 1.5rem; }
.avatar-img { object-fit: cover; padding: 0; }
.profile-avatar-wrap {
  position: relative;
  width: 88px;
  height: 88px;
  flex-shrink: 0;
  display: block;
  cursor: pointer;
}
.profile-avatar-wrap.uploading {
  opacity: 0.72;
  cursor: wait;
}
.profile-avatar-input { display: none; }
.profile-avatar-img {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 3px solid var(--gray-100);
}
.header-bell {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
}
.header-bell:hover { background: var(--gray-100); color: var(--gray-800); }
.header-bell-dot {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--danger);
  border: 2px solid var(--surface);
}
.notification-popover {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  width: 340px;
  max-width: calc(100vw - 2rem);
  background: var(--surface);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 120;
  overflow: hidden;
}
.notification-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--gray-100);
}
.notification-item {
  width: 100%;
  display: grid;
  gap: 0.25rem;
  padding: 0.85rem 1rem;
  text-align: right;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-700);
}
.notification-item.unread { background: var(--surface-muted); color: var(--gray-900); font-weight: 600; }
.notification-item:hover { background: var(--gray-50); }
.notification-item small, .notification-empty { color: var(--gray-500); font-size: 0.75rem; }
.notification-empty { padding: 1rem; text-align: center; }
.notification-all-link {
  display: block;
  padding: 0.85rem 1rem;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.85rem;
  text-align: center;
}

.task-detail-modal { display: grid; gap: 0.75rem; }
.task-detail-head { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--gray-100); }
.task-detail-head h2 { margin: 0 0 0.35rem; font-size: 1.2rem; color: var(--gray-900); }
.task-detail-head p { color: var(--gray-500); font-size: 0.875rem; }
.task-detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
.task-detail-grid.compact { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.5rem; }
.task-detail-info { background: var(--surface-muted); border: 1px solid var(--gray-100); border-radius: var(--radius-sm); padding: 0.75rem; display: grid; gap: 0.25rem; }
.task-detail-grid.compact .task-detail-info { padding: 0.55rem; }
.task-detail-info span { color: var(--gray-500); font-size: 0.78rem; }
.task-detail-info strong { color: var(--gray-900); font-size: 0.9rem; }
.task-detail-two-col { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 0.75rem; }
.task-detail-section { padding: 0.85rem; box-shadow: none; border: 1px solid var(--gray-100); }
.task-detail-section .form-group { margin-bottom: 0.55rem; }
.task-detail-section h3, .task-notes h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.75rem; color: var(--gray-900); }
.task-note-input { min-height: 62px; max-height: 72px; }
.task-notes { display: grid; gap: 0.5rem; max-height: 170px; overflow: auto; padding-left: 0.25rem; }
.task-note { display: flex; gap: 0.65rem; border: 1px solid var(--gray-100); border-radius: var(--radius-sm); padding: 0.6rem; background: var(--surface); }
.task-note div:last-child { display: grid; gap: 0.2rem; }
.task-note p { color: var(--gray-700); font-size: 0.875rem; }
.task-note span { color: var(--gray-400); font-size: 0.75rem; }
.task-detail-wizard-panel { min-height: 280px; align-content: center; }
.task-notes-wizard { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.task-notes-wizard .task-notes { max-height: none; overflow: hidden; align-content: start; }
.modal-step-footer { width: 100%; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .75rem; }
.modal-step-footer > span { color: var(--gray-500); font-size: .8rem; text-align: center; }

@media (max-width: 768px) {
  .task-detail-head { flex-direction: column; }
  .task-detail-grid,
  .task-detail-grid.compact,
  .task-detail-two-col { grid-template-columns: 1fr; }
  .project-modal-grid,
  .compact-modal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-modal-grid .wide,
  .compact-modal-grid .wide,
  .compact-modal-grid .full { grid-column: 1 / -1; }
  .task-notes-wizard { grid-template-columns: 1fr; }
  .task-detail-wizard-panel { min-height: 0; }
}

.filter-bar { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; margin-bottom: 1.5rem; }
.filter-bar .form-input, .filter-bar .form-select { width: auto; min-width: 160px; }

.org-summary-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.75rem; margin-bottom: 1rem; }
.org-stat { padding: 1rem; display: grid; gap: 0.35rem; }
.org-stat svg { color: var(--primary); }
.org-stat span { color: var(--gray-500); font-size: 0.8125rem; }
.org-stat strong { font-size: 1.35rem; color: var(--gray-900); }
.org-alerts { display: grid; gap: 0.5rem; margin-bottom: 1rem; }
.org-alert { display: flex; align-items: center; gap: 0.75rem; width: 100%; text-align: right; background: #fffbeb; border: 1px solid #fde68a; color: #92400e; border-radius: var(--radius-sm); padding: 0.75rem 1rem; cursor: pointer; transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease; }
.org-alert:hover { border-color: #f59e0b; box-shadow: 0 10px 22px rgba(146, 64, 14, 0.1); transform: translateY(-1px); }
.org-alert span { flex: 1; }
.org-alert em { font-style: normal; font-size: 0.8rem; font-weight: 700; background: #ffffff; border: 1px solid #f59e0b; color: #78350f; border-radius: 999px; padding: 0.35rem 0.65rem; }
.org-alert.seen { opacity: 0.72; }
.org-alert .btn-outline { background: #ffffff; border-color: #f59e0b; color: #78350f; }
.org-alert .btn-outline:hover { background: #fffbeb; }
.org-highlight { animation: orgTargetPulse 2.1s ease; }
@keyframes orgTargetPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); border-color: var(--gray-200); }
  18%, 72% { box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.22); border-color: #f59e0b; background: #fffbeb; }
}
html[data-theme='dark'] .org-alert {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.45);
  color: #fde68a;
}
html[data-theme='dark'] .org-alert .btn-outline {
  background: var(--surface);
  border-color: #f59e0b;
  color: #fef3c7;
}
html[data-theme='dark'] .org-alert .btn-outline:hover {
  background: rgba(245, 158, 11, 0.18);
}
.org-toolbar { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; padding: 1rem; }
.org-search { flex: 1; position: relative; }
.org-search svg { position: absolute; right: 0.75rem; top: 50%; transform: translateY(-50%); color: var(--gray-400); }
.org-search .form-input { padding-right: 2.2rem; }
.org-view-toggle { display: inline-flex; border: 1px solid var(--gray-200); border-radius: var(--radius-sm); overflow: hidden; }
.org-view-toggle button { width: 38px; height: 36px; display: inline-flex; align-items: center; justify-content: center; color: var(--gray-500); }
.org-view-toggle button.active { background: var(--primary); color: var(--text-on-primary); }
.org-layout { display: grid; grid-template-columns: minmax(340px, 0.9fr) minmax(0, 1.45fr); gap: 1rem; align-items: start; }
.org-tree-panel, .org-detail-panel { padding: 1rem; }
.org-tree-node { position: relative; display: flex; align-items: center; gap: 0.5rem; min-height: 48px; padding: 0.5rem; border-radius: var(--radius-sm); cursor: pointer; border: 1px solid transparent; }
.org-tree-node:hover, .org-tree-node.active { background: var(--surface-muted); border-color: var(--gray-200); }
.org-icon-btn { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; color: var(--gray-500); border-radius: var(--radius-sm); }
.org-icon-btn:hover { background: var(--gray-100); }
.org-node-icon { width: 32px; height: 32px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; color: var(--primary); background: var(--gray-100); flex-shrink: 0; }
.org-node-title { flex: 1; min-width: 0; display: grid; gap: 0.1rem; }
.org-node-title strong, .org-section-card h3 { color: var(--gray-900); font-size: 0.95rem; }
.org-node-title span, .org-section-card p, .org-child-card span, .org-member-row span { color: var(--gray-500); font-size: 0.78rem; }
.org-menu-wrap { position: relative; }
.org-action-menu { position: absolute; left: 0; top: 34px; width: 190px; background: var(--surface); border: 1px solid var(--gray-200); box-shadow: var(--shadow-lg); border-radius: var(--radius-sm); padding: 0.35rem; z-index: 10; }
.org-action-menu button { width: 100%; display: flex; align-items: center; gap: 0.45rem; padding: 0.55rem; border-radius: 6px; color: var(--gray-700); text-align: right; }
.org-action-menu button:hover { background: var(--gray-50); }
.org-action-menu button.danger { color: var(--danger); }
.org-detail-head { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--gray-100); padding-bottom: 1rem; margin-bottom: 1rem; }
.org-detail-head h2 { margin: 0.5rem 0 0.25rem; font-size: 1.25rem; color: var(--gray-900); }
.org-detail-head p { color: var(--gray-500); font-size: 0.875rem; }
.org-detail-actions { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; justify-content: flex-end; }
.org-detail-action-btn {
  height: 40px;
  min-width: 104px;
  padding: 0 1.25rem;
  line-height: 1;
  flex: 0 0 auto;
  justify-content: center;
  white-space: nowrap;
}
.org-info-grid, .org-performance, .org-report-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin-bottom: 1rem; }
.org-info { background: var(--surface-muted); border: 1px solid var(--gray-100); border-radius: var(--radius-sm); padding: 0.75rem; display: grid; gap: 0.25rem; }
.org-info span { color: var(--gray-500); font-size: 0.78rem; }
.org-info strong { color: var(--gray-900); font-size: 0.9rem; }
.org-tabs { overflow-x: auto; margin-bottom: 1rem; }
.org-member-list, .org-history { display: grid; gap: 0.65rem; }
.org-member-row { display: grid; grid-template-columns: auto minmax(150px, 1fr) auto auto auto auto auto auto auto; align-items: center; gap: 0.65rem; border: 1px solid var(--gray-100); border-radius: var(--radius-sm); padding: 0.75rem; }
.org-member-row > div:nth-child(2) { display: grid; gap: 0.15rem; }
.org-child-card { padding: 1rem; display: grid; gap: 0.5rem; }
.org-section-card { cursor: pointer; display: grid; gap: 0.65rem; }
.org-section-card-head, .org-mini-stats { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.org-mini-stats span { font-size: 0.8rem; color: var(--gray-500); }
.org-settings { display: grid; gap: 1rem; color: var(--gray-600); }
.org-history div { border: 1px solid var(--gray-100); border-radius: var(--radius-sm); padding: 0.75rem; display: grid; gap: 0.25rem; }
.org-history span { color: var(--gray-500); font-size: 0.8rem; }
.org-check { display: inline-flex; align-items: center; gap: 0.5rem; margin: 0 0 1rem; color: var(--gray-700); }

@media (max-width: 1200px) {
  .org-summary-grid { grid-template-columns: repeat(3, 1fr); }
  .org-layout { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .org-summary-grid, .org-info-grid, .org-performance, .org-report-row { grid-template-columns: 1fr; }
  .org-toolbar, .org-detail-head, .org-alert { flex-direction: column; align-items: stretch; }
  .org-detail-actions { justify-content: flex-start; align-items: center; }
  .org-member-row { grid-template-columns: auto 1fr; }
}

.meeting-form-compact .form-group { margin-bottom: 0.5rem; }
.meeting-form-compact .form-input,
.meeting-form-compact .form-select {
  padding: 0.5rem 0.75rem;
}
.meeting-form-compact .form-textarea {
  min-height: 72px;
  max-height: 96px;
}

.layout { display: flex; min-height: 100vh; }
.main-content { flex: 1; min-width: 0; margin-right: var(--sidebar-width); transition: margin-right .2s ease; }
.main-content.sidebar-collapsed { margin-right: 72px; }
.main-inner { padding-top: var(--header-height); }

@media (max-width: 768px) {
  .main-content, .main-content.sidebar-collapsed { margin-right: 0; }
  .page-container { padding: 1rem; }
  .filter-bar { flex-direction: column; }
  .filter-bar .form-input, .filter-bar .form-select { width: 100%; }
}

.settings-page { max-width: 1480px; }
.settings-header { align-items: flex-start; }
.settings-subtitle { color: var(--gray-500); font-size: 0.875rem; margin-top: 0.25rem; }
.settings-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.settings-appearance-panel {
  background: var(--surface);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  display: grid;
  gap: 1rem;
}
.settings-appearance-panel strong {
  color: var(--gray-900);
  font-size: 1rem;
}
.settings-appearance-panel span {
  color: var(--gray-500);
  font-size: 0.8125rem;
}
.settings-appearance-controls {
  display: grid;
  grid-template-columns: minmax(180px, 0.45fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: end;
}
.settings-appearance-controls label {
  display: grid;
  gap: 0.35rem;
}
.settings-appearance-controls .theme-accent-picker {
  align-self: stretch;
  justify-content: end;
}
.settings-stat {
  background: var(--surface);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
  display: grid;
  gap: 0.35rem;
}
.settings-stat svg { color: var(--primary); }
.settings-stat span { color: var(--gray-500); font-size: 0.8125rem; }
.settings-stat strong { color: var(--gray-900); font-size: 1.35rem; }
.settings-shell {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}
.settings-nav {
  background: var(--surface);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.5rem;
  display: grid;
  gap: 0.25rem;
  position: sticky;
  top: calc(var(--header-height) + 1rem);
}
.settings-nav-item {
  width: 100%;
  min-height: 42px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  color: var(--gray-600);
  text-align: right;
}
.settings-nav-item span { display: inline-flex; align-items: center; gap: 0.5rem; min-width: 0; }
.settings-nav-item strong {
  min-width: 28px;
  height: 24px;
  border-radius: 999px;
  background: var(--gray-100);
  color: var(--gray-600);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}
.settings-nav-item:hover { background: var(--gray-50); color: var(--gray-900); }
.settings-nav-item.active { background: var(--primary); color: var(--text-on-primary); }
.settings-nav-item.active strong { background: rgba(255,255,255,0.18); color: var(--text-on-primary); }
.settings-main { display: grid; gap: 1rem; min-width: 0; }
.settings-toolbar {
  background: var(--surface);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.settings-toolbar h2 { color: var(--gray-900); font-size: 1.1rem; margin-bottom: 0.15rem; }
.settings-toolbar span { color: var(--gray-500); font-size: 0.8125rem; }
.settings-search { position: relative; width: min(360px, 100%); }
.settings-search svg {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
}
.settings-search .form-input { padding-right: 2.25rem; }
.settings-list { display: grid; gap: 0.75rem; }
.settings-skeleton { height: 170px; }
.settings-item {
  background: var(--surface);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
  display: grid;
  gap: 1rem;
}
.settings-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--gray-100);
  padding-bottom: 0.85rem;
}
.settings-item-title { display: grid; gap: 0.15rem; min-width: 0; }
.settings-item-title strong { color: var(--gray-900); font-size: 1rem; }
.settings-item-title span { color: var(--gray-500); font-size: 0.78rem; overflow-wrap: anywhere; direction: ltr; text-align: right; }
.settings-item-meta { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; justify-content: flex-end; }
.settings-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 1rem;
  align-items: start;
}
.settings-side-fields {
  background: var(--surface-muted);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
}
.settings-side-fields .form-group:last-child { margin-bottom: 0; }
.settings-textarea { min-height: 118px; }
.settings-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  border-top: 1px solid var(--gray-100);
  padding-top: 0.85rem;
}
.settings-toggle {
  display: inline-flex;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface);
}
.settings-toggle button {
  min-width: 92px;
  height: 38px;
  padding: 0 0.9rem;
  color: var(--gray-600);
  border-left: 1px solid var(--gray-200);
}
.settings-toggle button:last-child { border-left: 0; }
.settings-toggle button.active { background: var(--primary); color: var(--text-on-primary); }
.settings-list-editor,
.settings-object-editor { display: grid; gap: 0.5rem; }
.settings-list-row,
.settings-object-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
  align-items: center;
}
.settings-object-row { grid-template-columns: minmax(110px, 0.45fr) auto minmax(140px, 1fr) auto; }
.settings-object-row svg { color: var(--gray-400); }
.settings-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
  border: 1px solid var(--gray-200);
  background: var(--surface);
}
.settings-icon-btn:hover { background: var(--gray-50); color: var(--gray-800); }
.settings-icon-btn.danger { color: var(--danger); }
.settings-add-row {
  min-height: 38px;
  border: 1px dashed var(--gray-300);
  border-radius: var(--radius-sm);
  color: var(--gray-600);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.45rem 0.75rem;
}
.settings-add-row:hover { border-color: var(--primary); color: var(--primary); background: var(--gray-50); }
.settings-empty {
  background: var(--surface);
  border: 1px dashed var(--gray-300);
  border-radius: var(--radius);
  padding: 3rem 1rem;
  display: grid;
  justify-items: center;
  gap: 0.5rem;
  color: var(--gray-500);
}
.settings-empty strong { color: var(--gray-800); }
.settings-drawer { width: 520px; }
.settings-unsaved-bar {
  position: sticky; bottom: .75rem; z-index: 35; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .7rem .85rem; margin-top: .85rem; color: var(--gray-800); background: color-mix(in srgb,var(--surface) 94%,transparent);
  border: 1px solid color-mix(in srgb,var(--warning) 45%,var(--gray-200)); border-radius: 12px; box-shadow: var(--shadow-lg); backdrop-filter: blur(12px);
}
.settings-unsaved-bar > div { display: flex; align-items: center; gap: .55rem; }
.settings-unsaved-bar > div:first-child { display: grid; gap: 0; }
.settings-unsaved-bar span { color: var(--gray-500); font-size: .72rem; }
.settings-drawer .drawer-body {
  display: flex;
  flex-direction: column;
  padding-bottom: 0;
}
.settings-add-form .drawer-footer {
  margin: auto -1.5rem 0;
  position: sticky;
  bottom: 0;
  background: var(--surface);
}

@media (max-width: 1100px) {
  .settings-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-shell { grid-template-columns: 1fr; }
  .settings-nav { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .settings-header,
  .settings-toolbar,
  .settings-item-head,
  .settings-actions { flex-direction: column; align-items: stretch; }
  .settings-summary,
  .settings-nav,
  .settings-editor-grid,
  .settings-appearance-controls,
  .settings-object-row { grid-template-columns: 1fr; }
  .settings-search { width: 100%; }
  .settings-item-meta { justify-content: flex-start; }
}

.access-page { max-width: 1480px; }
.access-header { align-items: flex-start; }
.access-subtitle { color: var(--gray-500); font-size: 0.875rem; margin-top: 0.25rem; }
.access-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.access-stat,
.access-card,
.access-roles-panel {
  background: var(--surface);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.access-stat {
  padding: 1rem;
  display: grid;
  gap: 0.35rem;
}
.access-stat svg { color: var(--primary); }
.access-stat span { color: var(--gray-500); font-size: 0.8125rem; }
.access-stat strong { color: var(--gray-900); font-size: 1.35rem; }
.access-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}
.access-roles-panel {
  padding: 0.75rem;
  position: sticky;
  top: calc(var(--header-height) + 1rem);
  display: grid;
  gap: 0.75rem;
}
.access-panel-head,
.access-section-head,
.access-detail-head,
.access-save-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.access-panel-head strong,
.access-section-head h3 {
  color: var(--gray-900);
  font-size: 1rem;
}
.access-panel-head span,
.access-section-head span,
.access-detail-head p {
  color: var(--gray-500);
  font-size: 0.8125rem;
}
.access-search { position: relative; }
.access-search svg {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
}
.access-search .form-input { padding-right: 2.2rem; }
.access-search.compact { width: min(330px, 100%); }
.access-role-list { display: grid; gap: 0.35rem; max-height: 620px; overflow: auto; padding-left: 0.15rem; }
.access-role-item {
  min-height: 62px;
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  text-align: right;
  color: var(--gray-700);
  border: 1px solid transparent;
}
.access-role-item span { display: grid; gap: 0.15rem; min-width: 0; }
.access-role-item strong { color: inherit; font-size: 0.92rem; }
.access-role-item small {
  color: var(--gray-500);
  font-size: 0.75rem;
  direction: ltr;
  text-align: right;
  overflow-wrap: anywhere;
}
.access-role-item em {
  min-width: 30px;
  height: 26px;
  border-radius: 999px;
  background: var(--gray-100);
  color: var(--gray-600);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
  font-size: 0.75rem;
}
.access-role-item:hover { background: var(--gray-50); border-color: var(--gray-200); }
.access-role-item.active { background: var(--primary); color: var(--text-on-primary); }
.access-role-item.active small,
.access-role-item.active em { color: var(--text-on-primary); }
.access-role-item.active em { background: rgba(255,255,255,0.18); }
.access-main { display: grid; gap: 1rem; min-width: 0; }
.access-card { padding: 1rem; }
.access-detail-head {
  align-items: flex-start;
  border-bottom: 1px solid var(--gray-100);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}
.access-detail-head h2 {
  margin: 0.45rem 0 0.2rem;
  color: var(--gray-900);
  font-size: 1.25rem;
}
.access-detail-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: flex-end; }
.access-role-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}
.access-info {
  background: var(--surface-muted);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  display: grid;
  gap: 0.25rem;
}
.access-info span { color: var(--gray-500); font-size: 0.78rem; }
.access-info strong { color: var(--gray-900); font-size: 0.95rem; }
.access-section-head { margin-bottom: 1rem; align-items: flex-start; }
.access-section-head.tight { margin-bottom: 0.75rem; }
.access-permission-groups { display: grid; gap: 0.85rem; }
.access-permission-module {
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.access-module-head {
  background: var(--surface-muted);
  border-bottom: 1px solid var(--gray-100);
  padding: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.access-module-head div { display: grid; gap: 0.1rem; }
.access-module-head strong { color: var(--gray-900); font-size: 0.9rem; }
.access-module-head span { color: var(--gray-500); font-size: 0.75rem; }
.access-module-toggle {
  min-height: 34px;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  padding: 0.25rem 0.35rem 0.25rem 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--gray-600);
  background: var(--surface);
  font-size: 0.78rem;
  font-weight: 700;
}
.access-module-toggle strong {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-100);
  color: var(--gray-500);
}
.access-module-toggle.checked {
  border-color: var(--primary);
  color: var(--primary);
}
.access-module-toggle.checked strong {
  background: var(--primary);
  color: var(--text-on-primary);
}
.access-permission-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  padding: 0.75rem;
}
.access-permission {
  min-height: 52px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  color: var(--gray-700);
  background: var(--surface);
  text-align: right;
  justify-content: flex-start;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.access-permission:hover { border-color: var(--primary); transform: translateY(-1px); }
.access-toggle-indicator {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-100);
  color: var(--gray-500);
  flex: 0 0 auto;
}
.access-permission span { font-size: 0.88rem; color: var(--gray-800); font-weight: 600; }
.access-permission.checked {
  border-color: var(--primary);
  background: var(--gray-50);
}
.access-permission.checked .access-toggle-indicator {
  background: var(--primary);
  color: var(--text-on-primary);
}
.access-permission.checked > span:not(.access-toggle-indicator) { color: var(--primary); }
.access-permission.danger.checked {
  border-color: var(--danger);
  background: rgba(239, 68, 68, 0.08);
}
.access-permission.danger.checked .access-toggle-indicator {
  background: var(--danger);
}
.access-permission.danger.checked > span:not(.access-toggle-indicator) { color: var(--danger); }
.access-save-bar {
  margin-top: 1rem;
  border-top: 1px solid var(--gray-100);
  padding-top: 0.85rem;
  justify-content: flex-end;
}
.access-user-list { display: grid; gap: 0.65rem; }
.access-user-row {
  display: grid;
  grid-template-columns: auto minmax(170px, 0.5fr) minmax(260px, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
}
.access-user-title { display: grid; gap: 0.1rem; min-width: 0; }
.access-user-title strong { color: var(--gray-900); }
.access-user-title span {
  color: var(--gray-500);
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}
.access-user-roles { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.access-chip {
  min-height: 30px;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  display: inline-flex;
  align-items: center;
  color: var(--gray-600);
  background: var(--surface);
  font-size: 0.78rem;
  cursor: pointer;
}
.access-chip.checked {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--text-on-primary);
}
.access-empty {
  border: 1px dashed var(--gray-300);
  border-radius: var(--radius-sm);
  padding: 2rem;
  display: grid;
  justify-items: center;
  gap: 0.5rem;
  color: var(--gray-500);
}
.access-role-form { display: grid; gap: 0.25rem; }
.access-form-permissions {
  border-top: 1px solid var(--gray-100);
  padding-top: 1rem;
  margin-top: 0.25rem;
}

@media (max-width: 1200px) {
  .access-permission-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .access-user-row { grid-template-columns: auto minmax(160px, 1fr); }
  .access-user-roles,
  .access-user-row .btn { grid-column: 1 / -1; }
}

@media (max-width: 992px) {
  .access-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .access-layout { grid-template-columns: 1fr; }
  .access-roles-panel { position: static; }
  .access-role-list { max-height: none; }
}

@media (max-width: 768px) {
  .access-header,
  .access-panel-head,
  .access-section-head,
  .access-detail-head,
  .access-save-bar { flex-direction: column; align-items: stretch; }
  .access-summary,
  .access-role-stats,
  .access-permission-grid { grid-template-columns: 1fr; }
  .access-search.compact { width: 100%; }
  .access-detail-actions { justify-content: flex-start; }
}

/* Application shell, calendar and notification command surfaces */
.sidebar-brand-mark { width: 34px; height: 34px; border-radius: 9px; object-fit: cover; flex-shrink: 0; box-shadow: 0 5px 14px rgba(14,165,233,.22); }
.app-header {
  position: fixed; inset-block-start: 0; left: 0; height: var(--header-height); z-index: 50;
  display: grid; grid-template-columns: minmax(120px,auto) minmax(240px,420px) auto;
  align-items: center; gap: 1rem; padding: 0 1.5rem;
  background: color-mix(in srgb,var(--surface) 94%,transparent); border-bottom: 1px solid var(--gray-200);
  backdrop-filter: blur(14px); transition: right .2s ease;
}
.app-header h1 { font-size: 1.125rem; color: var(--gray-900); white-space: nowrap; }
.header-search { position: relative; min-width: 0; }
.header-search .form-input { width: 100%; padding-right: 2.5rem; }
.header-search > svg { position: absolute; right: .8rem; top: 50%; transform: translateY(-50%); color: var(--gray-400); pointer-events: none; }
.header-searching { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: var(--gray-400); }
.header-search-results {
  position: absolute; top: calc(100% + 8px); inset-inline: 0; z-index: 130; max-height: 320px; overflow: hidden;
  background: var(--surface-elevated); border: 1px solid var(--gray-200); border-radius: 12px; box-shadow: var(--shadow-lg);
}
.header-search-results a { display: flex; justify-content: space-between; gap: 1rem; padding: .75rem 1rem; border-bottom: 1px solid var(--gray-100); }
.header-search-results a:hover { background: var(--gray-50); }
.header-search-results small { color: var(--gray-500); }
.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: .5rem; min-width: 0; }
.mobile-nav-toggle { display: none; }
.mobile-sidebar-overlay { display: none; }
.sidebar-mobile-close { display: none; }
.header-layer { position: relative; }
.header-icon-button,.app-header .theme-mode-toggle.compact {
  width: 44px; height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center;
  color: var(--gray-600); background: transparent; border: 1px solid transparent; border-radius: 11px;
  transition: background .18s ease,color .18s ease,border-color .18s ease;
}
.header-icon-button:hover,.header-icon-button.active,.app-header .theme-mode-toggle.compact:hover {
  color: var(--primary); background: var(--surface-active); border-color: var(--gray-200);
}
.header-badge {
  position: absolute; top: 2px; left: 1px; min-width: 18px; height: 18px; display: grid; place-items: center;
  padding: 0 4px; color: #fff; background: var(--danger); border: 2px solid var(--surface); border-radius: 999px;
  font-size: .65rem; font-weight: 800;
}
.header-profile { min-height: 44px; display: flex; align-items: center; gap: .55rem; padding: .25rem .45rem .25rem .75rem; color: var(--gray-700); border: 1px solid transparent; border-radius: 12px; }
.header-profile:hover,.header-profile.active { background: var(--gray-50); border-color: var(--gray-200); }
.header-profile > span:last-child { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.header-popover {
  position: absolute; top: calc(100% + 10px); left: 0; z-index: 120; overflow: hidden;
  background: var(--surface-elevated); border: 1px solid var(--gray-200); border-radius: 16px;
  box-shadow: 0 24px 70px rgba(15,23,42,.2); transform-origin: top left; animation: popover-in .18s ease-out;
}
.calendar-layer { width: min(430px,calc(100vw - 24px)); }
.notification-layer { width: min(440px,calc(100vw - 24px)); }
.profile-layer { min-width: 210px; display: grid; padding: .45rem; }
.profile-layer a,.profile-layer button { min-height: 44px; display: flex; align-items: center; padding: 0 .85rem; color: var(--gray-700); border-radius: 9px; text-align: right; }
.profile-layer a:hover,.profile-layer button:hover { background: var(--gray-50); color: var(--gray-900); }
.profile-layer button:last-child { color: var(--danger); }
.profile-modal-content { display: grid; gap: 1rem; }
.profile-modal-content .profile-section {
  padding: 0!important;
  margin: 0!important;
}
.profile-modal-content .profile-section + .profile-section {
  padding-top: 1.25rem!important;
  border-top: 1px solid var(--gray-200);
}
.profile-modal-actions { width: 100%; display: flex; justify-content: space-between; gap: .75rem; }
.profile-modal-actions .btn { display: inline-flex; align-items: center; gap: .45rem; }
.profile-logout-button { margin-inline-start: auto; }
.profile-identity { display: flex; align-items: center; gap: 1.25rem; min-height: 100px; }
.profile-identity > div:last-child { flex: 1; min-width: 0; }
.profile-identity h2 { margin: 0 0 .25rem; color: var(--gray-900); font-size: 1.2rem; }
.profile-identity > div:last-child > div { color: var(--gray-500); font-size: .875rem; }
.profile-identity small { display: block; margin-top: .25rem; color: var(--gray-400); }
.profile-wizard { height: 100%; display: grid; grid-template-rows: auto minmax(0,1fr) auto; gap: 1rem; }
.modal-wizard-steps { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .5rem; }
.modal-wizard-steps button {
  min-height: 46px; display: flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .45rem .65rem; color: var(--gray-500); background: var(--gray-50);
  border: 1px solid var(--gray-200); border-radius: 12px; font-weight: 650;
}
.modal-wizard-steps button span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; background: var(--surface); }
.modal-wizard-steps button.active { color: var(--primary); background: var(--surface-active); border-color: color-mix(in srgb,var(--primary) 40%,var(--gray-200)); }
.modal-wizard-steps button.complete { color: var(--success); }
.modal-wizard-steps-two { grid-template-columns: repeat(2,minmax(0,1fr)); }
.profile-wizard-panel { min-height: 0; display: grid; align-content: center; }
.profile-step-form { display: grid; gap: 1rem; }
.profile-step-form .form-group { margin-bottom: 0; }
.profile-step-form .form-textarea { min-height: 84px; max-height: 110px; resize: none; }
.profile-step-form > .btn { justify-self: start; }
.profile-wizard-navigation { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .75rem; padding-top: .75rem; border-top: 1px solid var(--gray-200); }
.profile-wizard-navigation > span { color: var(--gray-500); font-size: .8rem; text-align: center; }
.profile-wizard-navigation .btn { min-height: 44px; display: inline-flex; align-items: center; gap: .35rem; }
.password-input-wrap { position: relative; }
.password-input-wrap .form-input { padding-left: 3.25rem; }
.password-visibility-toggle {
  position: absolute; top: 50%; left: .25rem; width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--gray-500); background: transparent; border-radius: 10px;
  transform: translateY(-50%); transition: color .18s ease,background .18s ease;
}
.password-visibility-toggle:hover,
.password-visibility-toggle[aria-pressed="true"] { color: var(--primary); background: var(--surface-active); }
.password-visibility-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.schedule-wizard-navigation { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .75rem; }
.schedule-wizard-navigation > span { color: var(--gray-500); font-size: .8rem; text-align: center; }
.wizard-empty-state { min-height: 170px; display: grid; place-items: center; padding: 1rem; color: var(--gray-500); background: var(--gray-50); border: 1px dashed var(--gray-300); border-radius: 12px; text-align: center; }
.role-wizard-details { min-height: 260px; display: grid; align-content: center; gap: .75rem; }
.role-permission-wizard { min-height: 0; display: grid; gap: .75rem; padding-top: .75rem; }
.role-permission-wizard .access-permission-groups { min-height: 220px; align-content: start; }
@keyframes popover-in { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.calendar-popover { display: grid; max-height: min(720px,calc(100dvh - 84px)); }
.calendar-popover-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1rem .75rem; }
.calendar-popover-head > div:first-child { display: grid; }
.calendar-popover-head strong { color: var(--gray-900); font-size: 1rem; }
.calendar-popover-head span { color: var(--gray-500); font-size: .75rem; }
.calendar-controls { display: flex; align-items: center; gap: .25rem; }
.calendar-controls button { min-width: 36px; height: 36px; display: grid; place-items: center; color: var(--gray-600); border-radius: 9px; }
.calendar-controls button:hover { background: var(--gray-100); }
.calendar-controls .calendar-today { padding: 0 .55rem; color: var(--primary); font-size: .78rem; font-weight: 700; }
.calendar-weekdays,.calendar-grid { display: grid; grid-template-columns: repeat(7,1fr); padding-inline: .8rem; }
.calendar-weekdays span { padding: .35rem; color: var(--gray-500); font-size: .72rem; text-align: center; }
.calendar-day { position: relative; min-height: 44px; display: grid; place-items: center; color: var(--gray-700); border: 1px solid transparent; border-radius: 10px; }
.calendar-day:hover { background: var(--gray-50); }
.calendar-day.today { color: var(--primary); font-weight: 800; border-color: color-mix(in srgb,var(--primary) 30%,transparent); }
.calendar-day.selected { color: var(--text-on-primary); background: var(--primary); }
.calendar-day.blank { pointer-events: none; }
.calendar-day i { position: absolute; bottom: 4px; display: flex; gap: 2px; }
.calendar-day i b { width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.calendar-day.selected i b { color: #fff!important; }
.tone-primary { color: var(--primary); }.tone-secondary { color: var(--secondary); }.tone-info { color: var(--info); }
.tone-success { color: var(--success); }.tone-warning { color: var(--warning); }.tone-danger { color: var(--danger); }
.calendar-filters { display: flex; gap: .35rem; overflow-x: auto; padding: .75rem .9rem; border-top: 1px solid var(--gray-100); border-bottom: 1px solid var(--gray-100); }
.calendar-filters button { min-height: 32px; display: inline-flex; align-items: center; gap: .35rem; flex: 0 0 auto; padding: 0 .55rem; color: var(--gray-500); border: 1px solid var(--gray-200); border-radius: 999px; font-size: .72rem; }
.calendar-filters button.active { color: var(--primary); background: var(--surface-active); border-color: color-mix(in srgb,var(--primary) 35%,var(--gray-200)); }
.calendar-agenda { min-height: 130px; max-height: 245px; overflow: hidden; padding: .75rem; }
.calendar-agenda-title { display: flex; justify-content: space-between; padding: 0 .25rem .55rem; }
.calendar-agenda-title span { color: var(--gray-500); font-size: .75rem; }
.calendar-event { width: 100%; min-height: 54px; display: flex; align-items: center; gap: .65rem; padding: .55rem; color: var(--gray-700); border-radius: 10px; text-align: right; }
.calendar-event:hover { background: var(--gray-50); }
.calendar-event > i { width: 4px; height: 32px; flex: 0 0 auto; border-radius: 4px; background: currentColor; }
.calendar-event > span { flex: 1; min-width: 0; display: grid; }
.calendar-event strong { overflow: hidden; color: var(--gray-900); text-overflow: ellipsis; white-space: nowrap; }
.calendar-event small { color: var(--gray-500); }
.calendar-state { min-height: 90px; display: flex; align-items: center; justify-content: center; gap: .5rem; color: var(--gray-500); }
.calendar-state.error { width: 100%; color: var(--danger); }
.notification-center { display: grid; max-height: min(650px,calc(100dvh - 84px)); }
.notification-center-head { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 1rem; border-bottom: 1px solid var(--gray-100); }
.notification-center-head > div { display: grid; }
.notification-center-head strong { color: var(--gray-900); font-size: 1rem; }
.notification-center-head span { color: var(--gray-500); font-size: .75rem; }
.notification-center-tabs { display: grid; grid-template-columns: repeat(3,1fr); padding: .45rem; background: var(--gray-50); }
.notification-center-tabs button { min-height: 38px; color: var(--gray-500); border-radius: 8px; font-size: .8rem; }
.notification-center-tabs button.active { color: var(--primary); background: var(--surface); box-shadow: var(--shadow); font-weight: 700; }
.notification-center-list { min-height: 180px; overflow: hidden; padding: .55rem; }
.notification-swipe-row { position: relative; overflow: hidden; margin-bottom: .4rem; border-radius: 12px; touch-action: pan-y; }
.notification-swipe-action { position: absolute; inset-block: 0; width: 105px; display: flex; align-items: center; justify-content: center; gap: .35rem; color: #fff; opacity: calc(.5 + var(--notification-progress) * .5); }
.notification-swipe-action.archive { right: 0; background: var(--info); }
.notification-swipe-action.delete { left: 0; background: var(--danger); }
.notification-center-item {
  position: relative; z-index: 1; min-height: 72px; display: flex; align-items: center; background: var(--surface);
  border: 1px solid var(--gray-100); border-radius: 12px; transform: translate3d(var(--notification-translate),0,0);
  transition: transform .25s ease;
}
.notification-swipe-row.dragging .notification-center-item { transition: none; }
.notification-swipe-row.exiting .notification-center-item { transition-duration: .38s; }
.notification-center-item.unread { background: color-mix(in srgb,var(--primary) 7%,var(--surface)); border-color: color-mix(in srgb,var(--primary) 22%,var(--gray-100)); }
.notification-center-main { min-width: 0; flex: 1; min-height: 70px; display: flex; align-items: center; gap: .65rem; padding: .65rem; text-align: right; }
.notification-center-icon { width: 36px; height: 36px; display: grid; place-items: center; flex: 0 0 auto; color: var(--primary); background: var(--surface-active); border-radius: 10px; }
.notification-center-main > span:last-child { min-width: 0; display: grid; }
.notification-center-main strong,.notification-center-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notification-center-main strong { color: var(--gray-900); }.notification-center-main small { color: var(--gray-500); }
.notification-center-actions { display: flex; gap: .15rem; padding-left: .45rem; }
.notification-center-actions button { width: 34px; height: 34px; display: grid; place-items: center; color: var(--gray-500); border-radius: 8px; }
.notification-center-actions button:hover { color: var(--primary); background: var(--gray-100); }.notification-center-actions button.danger:hover { color: var(--danger); }
.notification-center-skeleton { height: 72px; margin-bottom: .4rem; border-radius: 12px; }
.notification-center-empty { min-height: 180px; display: grid; place-content: center; justify-items: center; gap: .5rem; color: var(--gray-500); }
.notification-center-hint { padding: .55rem .8rem; color: var(--gray-500); background: var(--gray-50); border-top: 1px solid var(--gray-100); font-size: .68rem; text-align: center; }
.popover-pagination {
  min-height: 38px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .5rem;
  margin-top: .45rem; padding-top: .45rem; border-top: 1px solid var(--gray-100);
}
.popover-pagination button { min-height: 34px; display: inline-flex; align-items: center; justify-content: center; gap: .2rem; padding: 0 .55rem; color: var(--primary); background: var(--surface-active); border-radius: 9px; font-size: .72rem; font-weight: 700; }
.popover-pagination button:disabled { opacity: .4; cursor: not-allowed; }
.popover-pagination > span { color: var(--gray-500); font-size: .72rem; text-align: center; }
.notification-pagination { margin: 0 .55rem .45rem; }
.entity-preview { display: grid; justify-items: center; gap: 1rem; text-align: center; }
.entity-preview-icon { width: 54px; height: 54px; display: grid; place-items: center; background: var(--surface-active); border-radius: 16px; }
.entity-preview-heading { display: grid; justify-items: center; gap: .45rem; }.entity-preview-heading h2 { color: var(--gray-900); font-size: 1.15rem; }
.entity-preview-heading p { max-width: 52ch; color: var(--gray-600); }
.entity-preview-meta { width: 100%; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .5rem; }
.entity-preview-meta > div { min-height: 42px; display: flex; align-items: center; gap: .5rem; padding: .55rem .7rem; color: var(--gray-600); background: var(--gray-50); border-radius: 9px; text-align: right; }
.entity-preview-details { width: 100%; display: grid; gap: .35rem; }.entity-preview-details > div { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid var(--gray-100); text-align: right; }
.entity-preview-details dt { color: var(--gray-500); }.entity-preview-details dd { color: var(--gray-900); font-weight: 600; }
.spin { animation: spin .9s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } }
@media (max-width:900px) {
  .app-header { grid-template-columns: auto 1fr; padding-inline: .8rem; }.app-header h1 { display: none; }
  .header-search { grid-column: 1; grid-row: 1; }.header-actions { grid-column: 2; grid-row: 1; }.header-profile > span:last-child { display: none; }
}
@media (max-width:768px) {
  .app-sidebar { width: min(86vw,280px)!important; transform: translateX(105%); box-shadow: -20px 0 60px rgba(15,23,42,.24); }
  .app-sidebar.mobile-open { transform: translateX(0); }
  .mobile-nav-toggle { display: inline-flex; }
  .sidebar-collapse-toggle { display: none!important; }
  .sidebar-mobile-close {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    color: var(--gray-600);
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: 11px;
  }
  .mobile-sidebar-overlay { position: fixed; inset: 0; z-index: 90; display: block; background: rgba(2,6,23,.48); backdrop-filter: blur(2px); }
}
@media (max-width:640px) {
  .app-header { right: 0!important; grid-template-columns: 1fr auto; height: 60px; gap: .45rem; }
  .header-search .form-input { padding-inline: 2.2rem .55rem; font-size: .78rem; }
  .header-icon-button,.app-header .theme-mode-toggle.compact { width: 40px; min-width: 40px; height: 40px; }
  .header-actions { gap: .1rem; }.header-profile { width: 40px; min-width: 40px; height: 40px; padding: 0; justify-content: center; }
  .calendar-layer,.notification-layer { position: fixed; top: 68px; right: 8px; left: 8px; width: auto; }.profile-layer { position: fixed; top: 68px; right: auto; left: 8px; }
  .entity-preview-meta { grid-template-columns: 1fr; }
  .profile-modal-actions { flex-direction: column; }
  .profile-modal-actions .btn { width: 100%; justify-content: center; }
  .profile-logout-button { margin-inline-start: 0; }
  .modal-overlay { padding: .5rem; }
  .modal { max-height: calc(100dvh - 1rem); border-radius: 18px; }
  .modal-header { padding: .75rem 1rem; border-radius: 18px 18px 0 0; }
  .modal-body { padding: .85rem; }
  .modal-footer { padding: .75rem 1rem; border-radius: 0 0 18px 18px; }
  .modal-wizard-steps button { padding-inline: .35rem; font-size: .72rem; }
  .modal-wizard-steps button span { width: 24px; height: 24px; }
  .profile-identity { min-height: 76px; gap: .75rem; }
  .profile-identity .profile-avatar-wrap,
  .profile-identity .profile-avatar-img,
  .profile-identity .avatar-xl { width: 68px!important; height: 68px!important; }
  .profile-step-form .grid-2,
  .profile-step-form .grid-3 { grid-template-columns: 1fr; gap: .6rem; }
  .profile-step-form { gap: .65rem; }
  .profile-step-form .form-label { margin-bottom: .2rem; }
}
@media (prefers-reduced-motion:reduce) { .header-popover { animation: none; }.notification-center-item { transition: none; } }

/* Professional monitoring dashboard */
.monitor-page { max-width: 1600px; }
.monitor-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.monitor-toolbar > div:first-child p { margin-top: .25rem; color: var(--gray-500); }
.monitor-live { display: flex; align-items: center; gap: .5rem; color: var(--gray-900); font-size: 1.15rem; font-weight: 800; }
.monitor-live i { width: 9px; height: 9px; background: var(--success); border-radius: 50%; box-shadow: 0 0 0 5px color-mix(in srgb,var(--success) 16%,transparent); }
.monitor-toolbar-actions { display: flex; align-items: center; gap: .65rem; }
.monitor-toolbar-actions .form-select { min-width: 170px; }
.monitor-updated { color: var(--gray-500); font-size: .75rem; }
.monitor-metrics { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: .75rem; margin-bottom: .85rem; }
.monitor-metric { min-height: 112px; display: flex; align-items: flex-start; gap: .75rem; padding: 1rem; background: var(--surface); border: 1px solid var(--gray-200); border-radius: 14px; box-shadow: var(--shadow); }
.monitor-metric-icon { width: 40px; height: 40px; display: grid; place-items: center; flex: 0 0 auto; color: currentColor; background: color-mix(in srgb,currentColor 12%,transparent); border-radius: 11px; }
.monitor-metric > div { min-width: 0; display: grid; }.monitor-metric > div > span { color: var(--gray-500); font-size: .75rem; }
.monitor-metric strong { color: var(--gray-900); font-size: 1.65rem; line-height: 1.25; font-variant-numeric: tabular-nums; }
.monitor-metric small { overflow: hidden; color: var(--gray-500); font-size: .69rem; text-overflow: ellipsis; white-space: nowrap; }
.monitor-metric.tone-primary { color: var(--primary); }.monitor-metric.tone-info { color: var(--info); }.monitor-metric.tone-danger { color: var(--danger); }
.monitor-metric.tone-success { color: var(--success); }.monitor-metric.tone-secondary { color: var(--secondary); }.monitor-metric.tone-warning { color: var(--warning); }
.monitor-primary-grid { display: grid; grid-template-columns: minmax(0,1.7fr) minmax(320px,.8fr); gap: .85rem; margin-bottom: .85rem; }
.monitor-panel { min-width: 0; padding: 1rem; background: var(--surface); border: 1px solid var(--gray-200); border-radius: 14px; box-shadow: var(--shadow); margin-bottom: .85rem; }
.monitor-panel-head { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: .85rem; }
.monitor-panel-head h2 { color: var(--gray-900); font-size: .95rem; }.monitor-panel-head p { margin-top: .15rem; color: var(--gray-500); font-size: .72rem; }
.monitor-chart { height: 270px; direction: ltr; }
.attention-list { display: grid; gap: .35rem; max-height: 270px; overflow: auto; }
.attention-item { min-height: 54px; display: flex; align-items: center; gap: .6rem; padding: .55rem; border-radius: 10px; }
.attention-item:hover { background: var(--gray-50); }.attention-item > span { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 9px; }
.attention-item.overdue > span,.attention-item.blocker > span { color: var(--danger); background: color-mix(in srgb,var(--danger) 12%,transparent); }
.attention-item.deadline > span { color: var(--warning); background: color-mix(in srgb,var(--warning) 12%,transparent); }
.attention-item > div { min-width: 0; display: grid; }.attention-item strong { overflow: hidden; color: var(--gray-900); text-overflow: ellipsis; white-space: nowrap; }
.attention-item small { color: var(--gray-500); }
.monitor-empty { min-height: 120px; display: flex; align-items: center; justify-content: center; gap: .5rem; color: var(--gray-500); text-align: center; }
.monitor-empty.success { color: var(--success); }
.project-health-table { overflow-x: auto; }
.project-health-head,.project-health-row { min-width: 760px; display: grid; grid-template-columns: minmax(240px,1.6fr) 130px minmax(180px,1fr) 70px 70px; align-items: center; gap: .75rem; }
.project-health-head { min-height: 36px; padding: 0 .75rem; color: var(--gray-500); font-size: .7rem; border-bottom: 1px solid var(--gray-100); }
.project-health-row { min-height: 64px; padding: .55rem .75rem; border-bottom: 1px solid var(--gray-100); border-radius: 9px; }
.project-health-row:hover { background: var(--gray-50); }.project-health-row > div:first-child { min-width: 0; display: grid; }
.project-health-row > div:first-child strong { overflow: hidden; color: var(--gray-900); text-overflow: ellipsis; white-space: nowrap; }
.project-health-row small { color: var(--gray-500); }
.health-chip { width: fit-content; display: inline-flex; align-items: center; min-height: 28px; padding: 0 .55rem; border-radius: 999px; font-size: .7rem; font-weight: 700; }
.health-chip.success { color: var(--success); background: color-mix(in srgb,var(--success) 12%,transparent); }
.health-chip.warning { color: #b77900; background: color-mix(in srgb,var(--warning) 15%,transparent); }
.health-chip.danger { color: var(--danger); background: color-mix(in srgb,var(--danger) 12%,transparent); }
.health-progress { display: flex; align-items: center; gap: .55rem; }.health-progress > span { height: 7px; flex: 1; overflow: hidden; background: var(--gray-100); border-radius: 99px; }
.health-progress i { display: block; height: 100%; background: linear-gradient(90deg,var(--primary),var(--secondary)); border-radius: inherit; }.health-progress strong { min-width: 38px; font-size: .75rem; }
.text-danger { color: var(--danger)!important; }
.monitor-secondary-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .85rem; }
.sprint-health-list,.workload-list,.upcoming-meeting-list { display: grid; gap: .5rem; }
.sprint-health-card { display: grid; grid-template-columns: 1fr auto; gap: .55rem; padding: .7rem; border: 1px solid var(--gray-100); border-radius: 11px; }
.sprint-health-card:hover { border-color: var(--gray-300); background: var(--gray-50); }.sprint-health-card > div:first-child { display: grid; }
.sprint-health-card strong { color: var(--gray-900); }.sprint-health-card small { color: var(--gray-500); }
.sprint-health-bars { grid-column: 1/-1; display: grid; gap: .3rem; }.sprint-health-bars label { display: grid; grid-template-columns: 42px 1fr 34px; align-items: center; gap: .35rem; color: var(--gray-500); font-size: .65rem; }
.sprint-health-bars label > span { height: 5px; overflow: hidden; background: var(--gray-100); border-radius: 99px; }.sprint-health-bars i { display: block; height: 100%; background: var(--primary); border-radius: inherit; }
.sprint-health-bars i.expected { background: var(--gray-400); }.sprint-health-bars b { color: var(--gray-700); font-variant-numeric: tabular-nums; }
.workload-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .55rem; min-height: 48px; }.workload-row > div { display: grid; gap: .2rem; }
.workload-row > div > span { height: 5px; overflow: hidden; background: var(--gray-100); border-radius: 99px; }.workload-row i { display: block; height: 100%; background: var(--success); border-radius: inherit; }
.workload-row i.high { background: var(--warning); }.workload-row i.overloaded { background: var(--danger); }.workload-row b { color: var(--gray-900); font-variant-numeric: tabular-nums; }
.workload-row small { grid-column: 2/-1; color: var(--danger); font-size: .65rem; }
.upcoming-meeting-list > a { min-height: 54px; display: flex; align-items: center; gap: .65rem; padding: .45rem; border-radius: 9px; }
.upcoming-meeting-list > a:hover { background: var(--gray-50); }.meeting-date { min-width: 78px; display: grid; padding: .35rem .45rem; color: var(--primary); background: var(--surface-active); border-radius: 8px; text-align: center; }
.meeting-date b { font-size: .7rem; }.meeting-date small { font-size: .65rem; }.upcoming-meeting-list > a > div { min-width: 0; display: grid; }
.upcoming-meeting-list strong { overflow: hidden; color: var(--gray-900); text-overflow: ellipsis; white-space: nowrap; }.upcoming-meeting-list small { color: var(--gray-500); }
.monitor-loading { display: grid; grid-template-columns: repeat(3,1fr); gap: .75rem; }.monitor-loading .skeleton { height: 130px; border-radius: 14px; }
.monitor-error { min-height: 420px; display: grid; place-content: center; justify-items: center; gap: .75rem; color: var(--danger); text-align: center; }
.sr-only-table { position: absolute!important; width: 1px!important; height: 1px!important; overflow: hidden!important; clip: rect(0,0,0,0)!important; white-space: nowrap!important; }
@media (max-width:1280px) { .monitor-metrics { grid-template-columns: repeat(3,1fr); }.monitor-secondary-grid { grid-template-columns: repeat(2,1fr); }.monitor-secondary-grid > :last-child { grid-column: 1/-1; } }
@media (max-width:900px) { .monitor-toolbar { align-items: stretch; flex-direction: column; }.monitor-toolbar-actions { flex-wrap: wrap; }.monitor-primary-grid,.monitor-secondary-grid { grid-template-columns: 1fr; }.monitor-secondary-grid > :last-child { grid-column: auto; } }
@media (max-width:640px) { .monitor-metrics { grid-template-columns: repeat(2,1fr); }.monitor-metric { min-height: 100px; padding: .75rem; }.monitor-toolbar-actions .form-select { flex: 1; min-width: 140px; }.monitor-updated { width: 100%; }.monitor-chart { height: 220px; } }

/* Sprint and meeting command workspaces */
.workspace-page { max-width: 1600px; padding-bottom: 92px; }
.workspace-hero { position: relative; display: grid; gap: .85rem; padding: 1.2rem; margin-bottom: .85rem; overflow: hidden; color: #eaf5ff; background: linear-gradient(135deg,#061a3a 0%,#0a3268 56%,#075d7b 100%); border: 1px solid rgba(56,189,248,.22); border-radius: 18px; box-shadow: 0 20px 45px rgba(6,26,58,.2); }
.workspace-hero::after { content: ""; position: absolute; left: -60px; bottom: -100px; width: 280px; height: 280px; background: radial-gradient(circle,rgba(34,211,238,.2),transparent 68%); pointer-events: none; }
.workspace-breadcrumb { display: flex; align-items: center; gap: .45rem; color: #a9c6e8; font-size: .75rem; }
.workspace-breadcrumb a { display: inline-flex; align-items: center; gap: .3rem; }.workspace-breadcrumb a:hover { color: #fff; }
.workspace-hero-main { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }.workspace-title-row { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.workspace-title-row h1 { color: #fff; font-size: 1.55rem; }.workspace-hero > p,.workspace-hero-main p { max-width: 75ch; color: #c6d9ee; }
.workspace-context { display: flex; align-items: center; gap: .45rem 1rem; flex-wrap: wrap; margin-top: .65rem; color: #a9c6e8; font-size: .76rem; }
.workspace-context > span,.workspace-context > a { position: relative; }.workspace-context > span:not(:last-child)::after,.workspace-context > a:not(:last-child)::after { content: ""; position: absolute; left: -.55rem; top: 50%; width: 3px; height: 3px; background: #6d96c0; border-radius: 50%; }
.workspace-progress-ring { --progress: 0%; width: 94px; height: 94px; display: grid; place-content: center; justify-items: center; flex: 0 0 auto; background: radial-gradient(circle at center,#0a3268 56%,transparent 57%),conic-gradient(#22d3ee var(--progress),rgba(255,255,255,.14) 0); border-radius: 50%; }
.workspace-progress-ring strong { color: #fff; font-size: 1.25rem; font-variant-numeric: tabular-nums; }.workspace-progress-ring span { color: #a9c6e8; font-size: .65rem; }
.workspace-quick-actions { display: flex; gap: .5rem; flex-wrap: wrap; }.workspace-hero .btn-outline { color: #d8eaff; border-color: rgba(255,255,255,.25); background: rgba(255,255,255,.04); }.workspace-hero .btn-outline:hover { background: rgba(255,255,255,.12); }
.workspace-kpis { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: .65rem; margin-bottom: .85rem; }
.workspace-kpis article { min-height: 84px; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: .2rem .55rem; padding: .75rem; color: var(--primary); background: var(--surface); border: 1px solid var(--gray-200); border-radius: 12px; }
.workspace-kpis article > svg { grid-row: 1/3; }.workspace-kpis article span { color: var(--gray-500); font-size: .7rem; }.workspace-kpis article strong { color: var(--gray-900); font-size: 1.35rem; }
.workspace-kpis article.danger { color: var(--danger); }.workspace-kpis article.warning { color: var(--warning); }
.workspace-tabs,.meeting-stage-tabs { display: flex; gap: .2rem; overflow-x: auto; padding: .35rem; margin-bottom: .85rem; background: var(--surface); border: 1px solid var(--gray-200); border-radius: 12px; }
.workspace-tabs button,.meeting-stage-tabs button { min-height: 40px; flex: 0 0 auto; padding: 0 .8rem; color: var(--gray-500); border-radius: 9px; }
.workspace-tabs button.active,.meeting-stage-tabs button.active { color: var(--text-on-primary); background: var(--primary); font-weight: 700; }
.workspace-content { min-height: 360px; }.sprint-overview-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .75rem; }
.workspace-card { min-width: 0; padding: 1rem; background: var(--surface); border: 1px solid var(--gray-200); border-radius: 14px; box-shadow: var(--shadow); }
.workspace-card.span-2 { grid-column: span 2; }.workspace-card > header { display: flex; justify-content: space-between; align-items: center; gap: .75rem; margin-bottom: .8rem; }
.workspace-card > header > div { display: flex; align-items: center; gap: .45rem; }.workspace-card h2 { color: var(--gray-900); font-size: .9rem; }.workspace-card h3 { color: var(--gray-900); font-size: .85rem; margin-bottom: .75rem; }
.workspace-card > header > div > svg { color: var(--primary); }.workspace-card > header > button { color: var(--primary); font-size: .72rem; }
.health-comparison { display: grid; gap: .65rem; }.health-comparison label { display: grid; grid-template-columns: 120px 1fr 45px; align-items: center; gap: .6rem; color: var(--gray-500); font-size: .75rem; }
.health-comparison label > span { height: 8px; overflow: hidden; background: var(--gray-100); border-radius: 99px; }.health-comparison i { display: block; height: 100%; background: linear-gradient(90deg,var(--primary),var(--secondary)); border-radius: inherit; }.health-comparison i.expected { background: var(--gray-400); }
.health-comparison b { color: var(--gray-800); font-variant-numeric: tabular-nums; }.workspace-alert { display: flex; align-items: center; gap: .45rem; padding: .65rem; margin-top: .75rem; color: #9a6700; background: color-mix(in srgb,var(--warning) 14%,var(--surface)); border-radius: 9px; font-size: .75rem; }
.upcoming-workspace-meeting { min-height: 115px; display: grid; place-content: center; justify-items: center; gap: .25rem; padding: .75rem; color: var(--primary); background: linear-gradient(135deg,var(--surface-active),var(--gray-50)); border: 1px dashed color-mix(in srgb,var(--primary) 35%,var(--gray-200)); border-radius: 11px; text-align: center; }
.upcoming-workspace-meeting strong { color: var(--gray-900); }.upcoming-workspace-meeting span,.upcoming-workspace-meeting small { color: var(--gray-500); }
.workspace-list-item { min-height: 45px; display: flex; align-items: center; gap: .55rem; padding: .35rem; border-bottom: 1px solid var(--gray-100); }.workspace-list-item > div { display: grid; min-width: 0; }
.workspace-list-item strong { overflow: hidden; color: var(--gray-900); text-overflow: ellipsis; white-space: nowrap; }.workspace-list-item small { color: var(--gray-500); }
.severity { width: 8px; height: 8px; background: var(--warning); border-radius: 50%; }.severity.critical,.severity.high { background: var(--danger); }.severity.low { background: var(--success); }
.workspace-empty { min-height: 110px; display: flex; align-items: center; justify-content: center; gap: .5rem; color: var(--gray-500); text-align: center; }
.workspace-board { display: grid; grid-template-columns: repeat(5,minmax(230px,1fr)); gap: .65rem; overflow-x: auto; padding-bottom: .4rem; }
.workspace-board > section { min-height: 380px; padding: .6rem; background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: 12px; }.workspace-board > section > header { display: flex; justify-content: space-between; margin-bottom: .55rem; color: var(--gray-700); }
.workspace-board > section > header span { min-width: 24px; height: 24px; display: grid; place-items: center; background: var(--surface); border-radius: 7px; }.workspace-board article { display: grid; gap: .35rem; padding: .65rem; margin-bottom: .45rem; background: var(--surface); border: 1px solid var(--gray-200); border-radius: 9px; box-shadow: var(--shadow); }
.workspace-board article strong { color: var(--gray-900); }.workspace-board article small { color: var(--gray-500); }
.workspace-collection { display: grid; gap: .4rem; }.workspace-data-row { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .55rem .65rem; border: 1px solid var(--gray-100); border-radius: 9px; }
.workspace-data-row:hover { background: var(--gray-50); }.workspace-data-row > div { min-width: 0; display: grid; }.workspace-data-row strong { overflow: hidden; color: var(--gray-900); text-overflow: ellipsis; white-space: nowrap; }.workspace-data-row small { color: var(--gray-500); }
.metrics-placeholder { display: grid; grid-template-columns: repeat(3,auto 1fr); align-items: center; gap: .75rem; padding: 1.5rem; }.metrics-placeholder strong { color: var(--primary); font-size: 1.4rem; }.metrics-placeholder span { color: var(--gray-500); }
.workspace-loading { display: grid; grid-template-columns: repeat(3,1fr); gap: .75rem; }.workspace-loading .skeleton { min-height: 130px; border-radius: 14px; }
.meeting-status { min-height: 30px; display: inline-flex; align-items: center; padding: 0 .6rem; border-radius: 999px; color: #dbeafe; background: rgba(59,130,246,.2); font-size: .72rem; }
.meeting-status.status-in_progress { color: #bbf7d0; background: rgba(34,197,94,.2); }.meeting-status.status-completed { color: #e2e8f0; background: rgba(148,163,184,.2); }
.meeting-stage-tabs { width: min(560px,100%); margin-inline: auto; grid-template-columns: repeat(3,1fr); display: grid; }
.meeting-stage-tabs button { width: 100%; }.meeting-workspace-layout { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: .75rem; }
.meeting-stage-content { display: grid; gap: .75rem; }.meeting-stage-content .form-textarea { min-height: 110px; }.meeting-agenda-input { min-height: 180px!important; }.meeting-summary-input { min-height: 220px!important; }
.participant-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .5rem; }.participant-grid > div { min-height: 48px; display: flex; align-items: center; gap: .5rem; padding: .45rem; background: var(--gray-50); border-radius: 9px; }
.live-notes-card textarea { min-height: 300px!important; }.live-indicator { display: flex; align-items: center; gap: .35rem; color: var(--success); font-size: .7rem; }.live-indicator i { width: 7px; height: 7px; background: currentColor; border-radius: 50%; box-shadow: 0 0 0 5px color-mix(in srgb,currentColor 14%,transparent); }
.meeting-capture-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: .65rem; }.meeting-capture-grid button { min-height: 125px; display: grid; place-content: center; justify-items: center; gap: .25rem; padding: .75rem; color: var(--primary); background: var(--surface); border: 1px solid var(--gray-200); border-radius: 13px; }
.meeting-capture-grid button:hover { border-color: var(--primary); background: var(--surface-active); transform: translateY(-1px); }.meeting-capture-grid strong { color: var(--gray-900); }.meeting-capture-grid span { color: var(--gray-500); font-size: .7rem; }
.meeting-context-panel { display: grid; align-content: start; gap: .75rem; position: sticky; top: calc(var(--header-height) + 14px); }.meeting-context-panel dl { display: grid; gap: .5rem; }.meeting-context-panel dl > div { display: flex; justify-content: space-between; gap: .75rem; padding-bottom: .45rem; border-bottom: 1px solid var(--gray-100); }
.meeting-context-panel dt { color: var(--gray-500); }.meeting-context-panel dd { color: var(--gray-900); font-weight: 600; text-align: left; }
.meeting-sticky-controls { position: fixed; left: 1.2rem; bottom: 1.2rem; z-index: 42; display: flex; gap: .5rem; padding: .55rem; background: color-mix(in srgb,var(--surface) 94%,transparent); border: 1px solid var(--gray-200); border-radius: 13px; box-shadow: var(--shadow-lg); backdrop-filter: blur(12px); }
@media (max-width:1200px) { .workspace-kpis { grid-template-columns: repeat(3,1fr); }.sprint-overview-grid { grid-template-columns: repeat(2,1fr); }.meeting-workspace-layout { grid-template-columns: 1fr; }.meeting-context-panel { position: static; grid-template-columns: repeat(2,1fr); } }
@media (max-width:768px) { .workspace-hero-main { align-items: flex-start; }.workspace-progress-ring { width: 78px; height: 78px; }.workspace-kpis { grid-template-columns: repeat(2,1fr); }.sprint-overview-grid { grid-template-columns: 1fr; }.workspace-card.span-2 { grid-column: auto; }.participant-grid,.meeting-capture-grid { grid-template-columns: 1fr; }.meeting-context-panel { grid-template-columns: 1fr; }.metrics-placeholder { grid-template-columns: auto 1fr; }.meeting-sticky-controls { right: .6rem; left: .6rem; bottom: .6rem; justify-content: flex-end; } }
.sprint-meeting-setup { display: grid; gap: .75rem; padding: .85rem; margin-top: .25rem; background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: 12px; }
.sprint-meeting-setup-head { display: flex; justify-content: space-between; align-items: center; gap: .75rem; }
.sprint-meeting-setup-head > div { display: flex; align-items: center; gap: .55rem; color: var(--primary); }.sprint-meeting-setup-head > div > span { display: grid; }
.sprint-meeting-setup-head strong { color: var(--gray-900); }.sprint-meeting-setup-head small { color: var(--gray-500); font-size: .7rem; }
.sprint-meeting-type-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .45rem; }
.sprint-meeting-type-grid button { min-height: 56px; display: flex; align-items: center; gap: .5rem; padding: .5rem; color: var(--gray-500); background: var(--surface); border: 1px solid var(--gray-200); border-radius: 9px; text-align: right; }
.sprint-meeting-type-grid button.active { color: var(--primary); background: var(--surface-active); border-color: color-mix(in srgb,var(--primary) 45%,var(--gray-200)); }
.sprint-meeting-type-grid button > span { width: 28px; height: 28px; display: grid; place-items: center; flex: 0 0 auto; background: var(--gray-100); border-radius: 8px; }
.sprint-meeting-type-grid button > div { display: grid; }.sprint-meeting-type-grid strong { color: var(--gray-900); font-size: .75rem; }.sprint-meeting-type-grid small { color: var(--gray-500); font-size: .65rem; }
.sprint-meeting-schedule { display: grid; gap: .4rem; }.sprint-meeting-schedule > div { display: grid; grid-template-columns: minmax(150px,1fr) 170px 120px 100px; align-items: center; gap: .45rem; padding: .45rem; background: var(--surface); border: 1px solid var(--gray-200); border-radius: 9px; }
.sprint-meeting-schedule strong { color: var(--gray-800); font-size: .75rem; }
@media (max-width:900px) { .sprint-meeting-type-grid { grid-template-columns: repeat(2,1fr); }.sprint-meeting-schedule > div { grid-template-columns: 1fr 1fr; } }
@media (max-width:560px) { .sprint-meeting-type-grid,.sprint-meeting-schedule > div { grid-template-columns: 1fr; } }
@media (max-width:640px) { .settings-unsaved-bar { align-items: stretch; flex-direction: column; }.settings-unsaved-bar > div:last-child { justify-content: flex-end; } }

/* Backlog lifecycle, member dropdown and theme-safe data surfaces */
.table-card { padding: 0; overflow: hidden; }
.muted-cell { color: var(--color-text-muted); font-size: .875rem; }
.table-actions { display: flex; align-items: center; gap: .35rem; }
.table-actions .btn { min-width: 36px; min-height: 36px; justify-content: center; padding: .4rem; }
.backlog-page-header { gap: 1rem; flex-wrap: wrap; }
.backlog-view-switch { display: inline-flex; gap: .25rem; padding: .3rem; background: var(--surface); border: 1px solid var(--color-border); border-radius: var(--radius); box-shadow: var(--shadow); }
.backlog-view-switch button { min-height: 40px; display: inline-flex; align-items: center; gap: .45rem; padding: 0 .9rem; color: var(--color-text-secondary); border-radius: var(--radius-sm); transition: var(--transition); }
.backlog-view-switch button:hover { color: var(--color-heading); background: var(--surface-muted); }
.backlog-view-switch button.active { color: var(--text-on-primary); background: var(--primary); font-weight: 700; }
.backlog-title-cell,.backlog-task-cell { min-width: 160px; display: grid; gap: .2rem; }
.backlog-title-cell strong,.backlog-task-cell strong { color: var(--color-heading); font-weight: 700; }
.backlog-title-cell small { max-width: 42ch; overflow: hidden; color: var(--color-text-muted); text-overflow: ellipsis; white-space: nowrap; }
.backlog-task-cell small { display: inline-flex; align-items: center; gap: .3rem; color: var(--color-text-muted); }
.conversion-form { display: grid; gap: 1rem; }
.conversion-summary { display: flex; align-items: center; gap: .75rem; padding: .85rem; color: var(--primary); background: var(--surface-muted); border: 1px solid var(--color-border); border-radius: var(--radius); }
.conversion-summary > div { display: grid; }
.conversion-summary strong { color: var(--color-heading); }
.conversion-summary span,.form-helper { color: var(--color-text-muted); font-size: .78rem; }
.form-group > .form-helper { display: block; margin-top: .3rem; }

.multi-select { position: relative; width: 100%; }
.modal-body:has(.multi-select.open),.modal-body:has(.persian-date-popover) { overflow: visible; }
.multi-select-trigger { width: 100%; min-height: 44px; display: flex; align-items: center; gap: .5rem; padding: .45rem .75rem; color: var(--color-input-text); background: var(--color-input-bg); border: 1px solid var(--color-input-border); border-radius: var(--radius-sm); text-align: right; transition: var(--transition); }
.multi-select.open .multi-select-trigger,.multi-select-trigger:focus-visible { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb,var(--primary) 18%,transparent); outline: none; }
.multi-select-value { flex: 1; min-width: 0; display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.multi-select-placeholder { color: var(--color-placeholder); }
.multi-select-chip { min-height: 28px; display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .5rem; color: var(--color-text-primary); background: var(--surface-active); border: 1px solid var(--color-border); border-radius: 999px; }
.multi-select-chip svg { color: var(--color-text-muted); }
.multi-select-chevron { flex: 0 0 auto; color: var(--color-text-muted); transition: transform .2s ease; }
.multi-select.open .multi-select-chevron { transform: rotate(180deg); }
.multi-select-menu { position: absolute; z-index: 180; top: calc(100% + 6px); right: 0; left: 0; min-width: 260px; padding: .5rem; background: var(--surface-elevated); border: 1px solid var(--color-border); border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.multi-select-search { min-height: 40px; display: flex; align-items: center; gap: .45rem; padding: 0 .65rem; color: var(--color-text-muted); background: var(--color-input-bg); border: 1px solid var(--color-input-border); border-radius: var(--radius-sm); }
.multi-select-search:focus-within { border-color: var(--primary); }
.multi-select-search input { width: 100%; color: var(--color-input-text); background: transparent; border: 0; }
.multi-select-options { max-height: 220px; overflow-y: auto; display: grid; gap: .2rem; margin-top: .45rem; }
.multi-select-options > button { min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: 0 .65rem; color: var(--color-text-primary); border-radius: var(--radius-sm); text-align: right; }
.multi-select-options > button:hover,.multi-select-options > button.selected { background: var(--surface-active); }
.multi-select-options > button.selected { color: var(--primary-light); font-weight: 700; }
.multi-select-check { width: 22px; height: 22px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid var(--color-input-border); border-radius: 6px; }
.multi-select-options > button.selected .multi-select-check { color: var(--text-on-primary); background: var(--primary); border-color: var(--primary); }
.multi-select-empty { padding: 1rem; color: var(--color-text-muted); text-align: center; }
.multi-select-clear { width: 100%; min-height: 36px; margin-top: .35rem; color: var(--danger); border-top: 1px solid var(--color-divider); }

html[data-theme='dark'] table { color: var(--color-text-primary); background: var(--color-card-bg); }
html[data-theme='dark'] thead th { color: var(--color-text-secondary); background: var(--surface-muted); border-color: var(--color-border); }
html[data-theme='dark'] tbody td { color: var(--color-text-primary); border-color: var(--color-divider); }
html[data-theme='dark'] tbody tr:hover { background: var(--surface-elevated); }
html[data-theme='dark'] select option { color: var(--color-input-text); background: var(--color-input-bg); }
html[data-theme='dark'] .modal-overlay,html[data-theme='dark'] .drawer-overlay { background: rgba(0,0,0,.68); }
html[data-theme='dark'] .modal-header,html[data-theme='dark'] .modal-footer,html[data-theme='dark'] .drawer-header,html[data-theme='dark'] .drawer-footer { border-color: var(--color-border); }
html[data-theme='dark'] .modal-close { color: #fecaca; background: rgba(239,68,68,.16); border-color: rgba(248,113,113,.45); }
html[data-theme='dark'] .modal-close:hover { color: #fff; background: var(--danger); }
html[data-theme='dark'] input[type='date'],html[data-theme='dark'] input[type='time'],html[data-theme='dark'] input[type='number'] { color-scheme: dark; }
html[data-theme='dark'] .app-toast { color: var(--color-text-primary)!important; background: var(--surface-elevated)!important; border: 1px solid var(--color-border)!important; }

@media (max-width: 640px) {
  .backlog-page-header { align-items: stretch; }
  .backlog-view-switch { width: 100%; }
  .backlog-view-switch button { flex: 1; justify-content: center; }
  .compact-modal-grid { grid-template-columns: 1fr; }
  .compact-modal-grid .wide { grid-column: auto; }
  .multi-select-menu { min-width: 100%; }
}
