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

html {
  min-height: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: #f4f7fb;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: #f4f7fb;
  color: #071d36;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  touch-action: manipulation;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button {
  border: 0;
  background: transparent;
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled,
[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.65;
}

input,
select,
textarea {
  outline: none;
}

textarea {
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #94a3b8;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: #061f3f;
  text-decoration: underline;
  text-underline-offset: 3px;
}

img,
picture,
svg,
canvas,
video {
  display: block;
  max-width: 100%;
}

img,
video {
  height: auto;
}

svg {
  flex-shrink: 0;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

ul,
ol {
  padding-left: 1.25rem;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

p {
  line-height: 1.6;
}

strong {
  font-weight: 800;
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 3px solid rgba(6, 31, 63, 0.28);
  outline-offset: 2px;
}

::selection {
  background: rgba(6, 31, 63, 0.16);
  color: #071d36;
}

[hidden] {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
:root {
  color-scheme: light;

  /* Color system - Premium HSL tailored colors */
  --navy: #0f172a;
  --navy-900: #020617;
  --navy-800: #0f172a;
  --navy-700: #1e293b;
  --navy-soft: rgba(15, 23, 42, 0.05);
  --navy-subtle: rgba(15, 23, 42, 0.02);

  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-soft: #f5f3ff;

  --success: #10b981;
  --success-soft: #ecfdf5;
  --success-border: #a7f3d0;
  --warning: #f59e0b;
  --warning-soft: #fffbeb;
  --warning-border: #fde68a;
  --danger: #ef4444;
  --danger-hover: #dc2626;
  --danger-soft: #fef2f2;
  --danger-border: #fca5a5;
  --info: #06b6d4;
  --info-soft: #ecfeff;
  --info-border: #a5f3fc;

  --white: #ffffff;
  --surface: #ffffff;
  --surface-raised: #f8fafc;
  --surface-muted: #f1f5f9;
  --soft: #f8fafc;
  --soft-hover: #f1f5f9;
  --text: #1e293b;
  --text-heading: #0f172a;
  --text-soft: #475569;
  --muted: #64748b;
  --muted-soft: #cbd5e1;
  --border: #e2e8f0;
  --border-strong: #94a3b8;
  --line: #f1f5f9;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;

  /* Shape and elevation */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius: 10px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 999px;

  /* Premium Box Shadows */
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
  --shadow-focus: 0 0 0 4px rgba(79, 70, 229, 0.15);

  /* Typography */
  --font-sans: Calibri, "Segoe UI", Arial, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-size-xs: 12px;
  --font-size-sm: 13px;
  --font-size-md: 14px;
  --font-size-base: 16px;
  --font-size-lg: 18px;
  --font-size-xl: 22px;

  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

body {
  font-feature-settings: "kern";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

.brand,
.header-brand,
.topbar-left {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}

.brand-mark {
  position: relative;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: var(--radius-md);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent 44%),
    var(--navy);
  color: var(--white);
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), var(--shadow-sm);
  user-select: none;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: calc(var(--radius-md) - 3px);
  pointer-events: none;
}

.brand-mark.small {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  font-size: 18px;
}

.brand-mark.small::after {
  inset: 3px;
  border-radius: calc(var(--radius) - 3px);
}

a .brand-mark,
button .brand-mark {
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

a:hover .brand-mark,
button:hover .brand-mark {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.icon {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  color: currentColor;
}

.error-banner,
.empty-state {
  border-radius: var(--radius-md);
  padding: var(--space-4);
  font-size: var(--font-size-md);
  line-height: 1.55;
}

.error-banner {
  position: relative;
  margin-bottom: var(--space-4);
  border: 1px solid var(--danger-border);
  background: linear-gradient(180deg, #fffafa, var(--danger-soft));
  color: var(--danger);
  font-weight: 800;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.error-banner::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: var(--radius-pill);
  background: var(--danger);
}

.empty-state {
  display: grid;
  min-height: 190px;
  place-items: center;
  border: 1px dashed var(--border-strong);
  background: linear-gradient(180deg, var(--surface), var(--surface-raised));
  color: var(--muted);
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.empty-state strong {
  display: block;
  margin-bottom: var(--space-1);
  color: var(--text-heading);
  font-size: 15px;
  font-weight: 850;
}

.empty-state span,
.empty-state p {
  max-width: 440px;
  margin: 0;
  color: var(--muted);
  font-size: var(--font-size-md);
  line-height: 1.55;
}

.brand-mark:focus-visible,
.error-banner:focus-visible,
.empty-state:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus), var(--shadow-sm);
}

@media (max-width: 520px) {
  .brand,
  .header-brand,
  .topbar-left {
    gap: 10px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .brand-mark.small {
    width: 34px;
    height: 34px;
    font-size: 17px;
  }

  .error-banner,
  .empty-state {
    border-radius: var(--radius);
    padding: var(--space-3);
  }

  .empty-state {
    min-height: 160px;
  }
}

@media (prefers-reduced-motion: reduce) {
  a .brand-mark,
  button .brand-mark {
    transition: none;
  }

  a:hover .brand-mark,
  button:hover .brand-mark {
    transform: none;
  }
}
button {
  font: inherit;
}

.primary-btn,
.primary-action,
.secondary-btn,
.approve-btn,
.danger-btn,
.topbar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border-radius: var(--radius-md);
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  transition:
    transform var(--transition-spring),
    background var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.primary-btn,
.primary-action {
  border: none;
  background: var(--accent);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.22), 0 2px 4px rgba(79, 70, 229, 0.12);
  position: relative;
  overflow: hidden;
}

.primary-btn {
  width: 100%;
  padding: 0 20px;
  min-height: 46px;
}

.primary-action {
  padding: 0 20px;
}

.secondary-btn,
.approve-btn,
.danger-btn,
.topbar button {
  padding: 0 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

.approve-btn {
  border: none;
  background: #047857;
  color: var(--white);
  box-shadow: 0 4px 12px rgba(4, 120, 87, 0.2);
}

.danger-btn {
  border: none;
  background: #be123c;
  color: var(--white);
  box-shadow: 0 4px 12px rgba(190, 18, 60, 0.2);
}

.compact {
  min-height: 32px;
  padding-inline: 12px;
  border-radius: var(--radius-sm);
  font-size: var(--font-size-xs);
}

.primary-btn:hover,
.primary-action:hover {
  background: var(--accent-hover);
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.26), 0 4px 12px rgba(79, 70, 229, 0.16);
  transform: translateY(-2px);
}

.secondary-btn:hover,
.topbar button:hover {
  border-color: var(--accent);
  background: var(--surface-raised);
  color: var(--accent-hover);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.approve-btn:hover {
  background: #065f46;
  box-shadow: 0 8px 24px rgba(4, 120, 87, 0.28);
  transform: translateY(-2px);
}

.danger-btn:hover {
  background: #9f1239;
  box-shadow: 0 8px 24px rgba(190, 18, 60, 0.28);
  transform: translateY(-2px);
}

.primary-btn:active,
.primary-action:active,
.secondary-btn:active,
.approve-btn:active,
.danger-btn:active,
.topbar button:active {
  transform: translateY(1px);
  box-shadow: var(--shadow);
}

.primary-btn:focus-visible,
.primary-action:focus-visible,
.secondary-btn:focus-visible,
.approve-btn:focus-visible,
.danger-btn:focus-visible,
.link:focus-visible,
.switch-text button:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}

.primary-btn:disabled,
.primary-action:disabled,
.secondary-btn:disabled,
.approve-btn:disabled,
.danger-btn:disabled {
  box-shadow: none;
  transform: none;
}

.link,
.switch-text button {
  border: 0;
  padding: 0;
  background: none;
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.link:hover,
.switch-text button:hover {
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 700px) {
  .user-form button[type="submit"],
  .daily-update-form button[type="submit"],
  .designation-form button[type="submit"],
  .settings-form button[type="submit"],
  .mobile-block {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .primary-btn,
  .primary-action,
  .secondary-btn,
  .approve-btn,
  .danger-btn,
  .topbar button {
    transition: none;
  }

  .primary-btn:hover,
  .primary-action:hover,
  .secondary-btn:hover,
  .approve-btn:hover,
  .danger-btn:hover,
  .topbar button:hover {
    transform: none;
  }
}
.auth-form label,
.user-form label,
.settings-form label,
.daily-update-form label,
.designation-form label,
.profile-edit-form label {
  display: grid;
  gap: 8px;
  color: var(--text-heading);
  font-size: var(--font-size-md);
  font-weight: 800;
  line-height: 1.35;
}

.auth-form input,
.user-form input,
.user-form select,
.user-form textarea,
.settings-form input,
.profile-edit-form input,
.profile-edit-form textarea,
.daily-update-form input,
.daily-update-form select,
.daily-update-form textarea,
.designation-form input,
.table-select {
  width: 100%;
  min-height: 44px;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  line-height: 1.4;
  outline: none;
  box-shadow: inset 0 1px 2px rgba(10, 37, 64, 0.02);
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast),
    color var(--transition-fast);
}

.auth-form input:hover,
.user-form input:hover,
.user-form select:hover,
.user-form textarea:hover,
.settings-form input:hover,
.profile-edit-form input:hover,
.profile-edit-form textarea:hover,
.daily-update-form input:hover,
.daily-update-form select:hover,
.daily-update-form textarea:hover,
.designation-form input:hover,
.table-select:hover {
  border-color: var(--accent);
  background: var(--surface-raised);
}

.auth-form input:focus,
.user-form input:focus,
.user-form select:focus,
.user-form textarea:focus,
.settings-form input:focus,
.profile-edit-form input:focus,
.profile-edit-form textarea:focus,
.daily-update-form input:focus,
.daily-update-form select:focus,
.daily-update-form textarea:focus,
.designation-form input:focus,
.table-select:focus {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: var(--shadow-focus), inset 0 1px 2px rgba(10, 37, 64, 0.02);
}

.auth-form input::placeholder,
.user-form input::placeholder,
.user-form textarea::placeholder,
.settings-form input::placeholder,
.profile-edit-form input::placeholder,
.daily-update-form input::placeholder,
.daily-update-form textarea::placeholder,
.designation-form input::placeholder {
  color: var(--muted-soft);
}

.auth-form input:disabled,
.user-form input:disabled,
.user-form select:disabled,
.user-form textarea:disabled,
.settings-form input:disabled,
.profile-edit-form input:disabled,
.profile-edit-form textarea:disabled,
.daily-update-form input:disabled,
.daily-update-form select:disabled,
.daily-update-form textarea:disabled,
.designation-form input:disabled,
.table-select:disabled {
  background: var(--surface-muted);
  color: var(--muted);
}

.user-form select,
.daily-update-form select,
.table-select {
  cursor: pointer;
  appearance: none;
  padding-right: 36px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 13px) 50%;
  background-size:
    5px 5px,
    5px 5px;
  background-repeat: no-repeat;
}

.filter-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  align-items: end;
  margin-bottom: var(--space-4);
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, var(--surface-raised), var(--surface));
}

.filter-bar label {
  display: grid;
  gap: 7px;
  color: var(--text-heading);
  font-size: var(--font-size-xs);
  font-weight: 850;
  line-height: 1.2;
  text-transform: uppercase;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: var(--font-size-sm);
  font-weight: 650;
  text-transform: none;
  outline: none;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast);
}

.filter-bar input:hover,
.filter-bar select:hover,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--accent);
  background: var(--surface-raised);
}

.filter-bar input:focus,
.filter-bar select:focus {
  box-shadow: var(--shadow-focus);
}

.filter-check {
  min-height: 40px;
  align-content: center;
  text-transform: none !important;
}

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-width: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

.auth-form,
.user-form,
.settings-form,
.daily-update-form,
.designation-form {
  display: grid;
  gap: var(--space-4);
}

.user-form textarea,
.profile-edit-form textarea,
.daily-update-form textarea {
  min-height: 112px;
  resize: vertical;
  line-height: 1.55;
}

.daily-update-form textarea {
  min-height: 132px;
}

.check {
  display: flex !important;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px !important;
  color: var(--muted) !important;
  font-size: var(--font-size-md) !important;
  font-weight: 600 !important;
  line-height: 1.4;
  cursor: pointer;
}

.check input {
  width: 16px;
  height: 16px;
  min-height: 16px;
  padding: 0;
  margin: 0;
  cursor: pointer;
  accent-color: var(--accent);
}

.check:hover {
  color: var(--text-heading) !important;
}

.check:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.65;
}

.settings-message,
.feedback-message {
  border-radius: var(--radius);
  padding: 13px 14px;
  color: var(--text);
  font-size: var(--font-size-md);
  font-weight: 800;
  line-height: 1.45;
}

.settings-message {
  margin-top: var(--space-4);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface), var(--surface-muted));
}

.feedback-message {
  border: 1px solid var(--border);
  background: var(--surface-muted);
  animation: feedbackSlideIn 280ms ease both;
}

@keyframes feedbackSlideIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.feedback-message.info {
  border-color: var(--info-border);
  background: linear-gradient(180deg, #f0fffe, var(--info-soft));
  color: #047857;
}

.feedback-message.error {
  border-color: var(--danger-border);
  background: linear-gradient(180deg, #fffafa, var(--danger-soft));
  color: var(--danger);
}

.feedback-message.success {
  border-color: var(--success-border);
  background: linear-gradient(180deg, #f7fff9, var(--success-soft));
  color: #047857;
}

.settings-message:focus-visible,
.feedback-message:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}

@media (max-width: 700px) {
  .form-grid {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .form-row {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .auth-form input,
  .user-form input,
  .user-form select,
  .user-form textarea,
  .settings-form input,
  .profile-edit-form input,
  .profile-edit-form textarea,
  .daily-update-form input,
  .daily-update-form select,
  .daily-update-form textarea,
  .designation-form input,
  .table-select {
    border-radius: 14px;
  }
}

@media (max-width: 520px) {
  .auth-form label,
  .user-form label,
  .settings-form label,
  .daily-update-form label,
  .designation-form label {
    font-size: var(--font-size-sm);
  }

  .auth-form input,
  .user-form input,
  .user-form select,
  .user-form textarea,
  .settings-form input,
  .profile-edit-form input,
  .profile-edit-form textarea,
  .daily-update-form input,
  .daily-update-form select,
  .daily-update-form textarea,
  .designation-form input,
  .table-select {
    min-height: 46px;
    padding: 11px 12px;
  }

  .settings-message,
  .feedback-message {
    padding: 12px;
    font-size: var(--font-size-sm);
  }

  .filter-bar {
    grid-template-columns: 1fr;
    padding: 10px;
    gap: 10px;
  }
}
.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(180deg, #eef4fb 0, var(--soft) 260px);
}

.auth-card {
  width: 100%;
  max-width: 430px;
  padding: 36px 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  animation: authCardIn 400ms ease both;
}

@keyframes authCardIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.brand {
  margin-bottom: 32px;
}

.auth-brand {
  justify-content: center;
}

.auth-logo {
  display: block;
  width: min(100%, 320px);
  height: auto;
  max-height: 118px;
  object-fit: contain;
}

.form-header h2,
.form-header p,
.switch-text {
  margin: 0;
}

.form-header p,
.switch-text {
  color: var(--muted);
}

.auth-form,
.form-header {
  display: grid;
  gap: 18px;
}

.form-header {
  gap: 6px;
}

.form-header h2 {
  color: var(--text-heading);
  font-size: 24px;
  line-height: 1.2;
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  padding-right: 46px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.password-toggle:hover,
.password-toggle:focus-visible {
  background: var(--accent-soft);
  color: var(--accent);
}

.password-toggle:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}

.switch-text {
  text-align: center;
  font-size: var(--font-size-md);
}

@media (max-width: 520px) {
  .auth-page {
    padding: 16px;
  }

  .auth-card {
    padding: 22px 18px;
    border-radius: var(--radius-md);
  }

  .brand {
    margin-bottom: 24px;
  }

  .auth-logo {
    max-width: 270px;
    max-height: 100px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-card {
    animation: none;
  }
}
.app-shell {
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: var(--soft);
  overflow: hidden;
}

.app-loading {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  align-content: center;
  place-items: center;
  background: var(--soft);
  color: var(--navy);
  font-size: var(--font-size-md);
  font-weight: 800;
  gap: 16px;
}

.app-loading-icon {
  width: 76px;
  height: 76px;
  border-radius: var(--radius-md);
  object-fit: contain;
  box-shadow: var(--shadow-md);
  animation: loadingPulse 1.6s ease-in-out infinite;
}

.panel-loading {
  min-height: 220px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 850;
}

.section-error-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  border-color: rgba(255, 92, 117, 0.24);
  background: linear-gradient(180deg, var(--danger-soft), var(--surface));
}

.section-error-panel h2,
.section-error-panel p {
  margin: 0;
}

.section-error-panel h2 {
  color: var(--text-heading);
  font-size: 20px;
  line-height: 1.2;
}

.section-error-panel p {
  max-width: 680px;
  margin-top: 6px;
  color: var(--text-soft);
  font-size: var(--font-size-sm);
  line-height: 1.55;
}

.section-error-actions {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.avatar-image {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
  object-fit: cover;
}

.profile-photo-editor-spaced,
.form-feedback-block {
  margin-bottom: var(--space-4);
}

.profile-photo-remove-spaced {
  margin-top: var(--space-2);
}

@keyframes loadingPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: 0.85; }
}

.dashboard-body {
  min-height: 0;
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  background: transparent;
  overflow: hidden;
}

.main-area {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(100, 116, 139, 0.45) transparent;
}

.main-area::-webkit-scrollbar {
  width: 10px;
}

.main-area::-webkit-scrollbar-track {
  background: transparent;
}

.main-area::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: var(--radius-pill);
  background-color: rgba(100, 116, 139, 0.46);
  background-clip: content-box;
}

.main-area::-webkit-scrollbar-thumb:hover {
  background-color: rgba(100, 116, 139, 0.72);
}

.dashboard-content {
  width: min(100%, 1440px);
  display: grid;
  gap: var(--space-6);
  margin-inline: auto;
  padding: var(--space-7);
  background: transparent;
  animation: contentFadeIn 320ms ease both;
}

@keyframes contentFadeIn {
  from { opacity: 0; transform: translateY(12px) scale(0.995); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.page-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-5);
  min-width: 0;
}

.page-title > div {
  min-width: 0;
}

.page-title span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  border: 1px solid rgba(79, 70, 229, 0.12);
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent);
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.page-title h1 {
  margin: 10px 0 6px;
  color: var(--text-heading);
  font-size: 34px;
  line-height: 1.08;
  letter-spacing: 0;
}

.page-title p,
.panel-heading p {
  margin: 0;
  color: var(--muted);
  font-size: var(--font-size-md);
  line-height: 1.6;
}

.page-title p {
  max-width: 780px;
}

.page-title > :last-child {
  flex: 0 0 auto;
}

@media (max-width: 1100px) {
  .app-shell {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: visible;
  }

  .dashboard-body {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .main-area {
    overflow: visible;
  }

  .dashboard-content {
    padding: 22px 18px;
  }
}

@media (max-width: 700px) {
  .app-shell {
    min-height: 100dvh;
  }

  .main-area {
    min-height: 0;
    overflow: visible;
  }

  .dashboard-content {
    gap: 18px;
    width: 100%;
    padding: 16px 14px calc(88px + env(safe-area-inset-bottom));
  }

  .section-error-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-error-actions,
  .section-error-actions button {
    width: 100%;
  }

  .page-title {
    position: relative;
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 14px 14px 2px;
  }

  .page-title > :last-child {
    width: 100%;
  }

  .page-title h1 {
    margin: 6px 0 4px;
    font-size: 26px;
    line-height: 1.12;
  }

  .page-title p {
    font-size: var(--font-size-sm);
    line-height: 1.5;
  }
}

@media (max-width: 520px) {
  .dashboard-content {
    gap: 14px;
    padding: 12px 10px calc(88px + env(safe-area-inset-bottom));
  }

  .page-title span {
    font-size: 10px;
  }

  .page-title {
    padding-inline: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .main-area {
    scroll-behavior: auto;
  }
}
/* =========================================================
   HEADER — Premium Glassmorphic Redesign
   ========================================================= */

/* Accent gradient bar at the very top */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
}

.topbar-accent {
  height: 3px;
  flex: 0 0 3px;
  background: linear-gradient(
    90deg,
    #4f46e5 0%,
    #7c3aed 25%,
    #ec4899 50%,
    #f59e0b 75%,
    #4f46e5 100%
  );
  background-size: 200% 100%;
  animation: accentShimmer 6s linear infinite;
}

@keyframes accentShimmer {
  0%   { background-position: 0% 0; }
  100% { background-position: 200% 0; }
}

/* Inner bar — glassmorphism */
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 64px;
  padding: 0 clamp(16px, 3vw, 32px);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid rgba(226, 232, 240, 0.65);
  box-shadow:
    0 1px 0 rgba(15, 23, 42, 0.03),
    0 8px 32px rgba(15, 23, 42, 0.05);
}

/* =========================================================
   Left Section
   ========================================================= */

.topbar-left {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1 1 auto;
}

.header-brand {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}

.header-logo {
  display: block;
  width: clamp(120px, 13vw, 168px);
  height: 40px;
  object-fit: contain;
  object-position: left center;
  transition: opacity var(--transition-fast);
}

.header-divider {
  width: 1px;
  height: 32px;
  flex: 0 0 auto;
  background: linear-gradient(
    180deg,
    transparent 8%,
    rgba(203, 213, 225, 0.8) 50%,
    transparent 92%
  );
}

.header-title {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.header-title strong {
  max-width: 300px;
  color: var(--text-heading);
  font-size: clamp(14px, 1.3vw, 16px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-title span {
  max-width: 320px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* =========================================================
   Right Actions
   ========================================================= */

.topbar-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  position: relative;
}

/* Shared icon buttons (calendar, bell) */
.header-icon-btn {
  width: 50px;
  min-width: 50px;
  height: 50px;
  min-height: 50px;
  padding: 0;
  position: relative;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--text-soft);
  box-shadow: none;
  outline: none;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    color var(--transition-fast),
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

.header-icon-btn svg {
  width: 32px;
  height: 32px;
  stroke-width: 2.4;
  transition:
    transform var(--transition-fast),
    color var(--transition-fast);
}

.header-icon-btn:hover {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: rgba(79, 70, 229, 0.12);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.1);
}

.header-icon-btn:hover svg {
  transform: scale(1.05);
}

.header-icon-btn:active {
  transform: translateY(0) scale(0.97);
  box-shadow: none;
}

.header-icon-btn:focus-visible {
  border-color: var(--accent);
  box-shadow: var(--shadow-focus);
}

/* =========================================================
   Notification Dot & Count
   ========================================================= */

.notification-menu {
  position: relative;
  display: flex;
  align-items: center;
}

.notification-dot {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 8px;
  height: 8px;
  border: 2px solid var(--white);
  border-radius: var(--radius-pill);
  background: var(--accent);
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.15);
  animation: pulseGlow 2s ease-in-out infinite;
}

.notification-count {
  position: absolute;
  top: -5px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--white);
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: var(--white);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}

@keyframes pulseGlow {
  0% {
    box-shadow:
      0 0 0 0 rgba(79, 70, 229, 0.4),
      0 0 0 2px rgba(79, 70, 229, 0.15);
  }
  70% {
    box-shadow:
      0 0 0 6px rgba(79, 70, 229, 0),
      0 0 0 2px rgba(79, 70, 229, 0.15);
  }
  100% {
    box-shadow:
      0 0 0 0 rgba(79, 70, 229, 0),
      0 0 0 2px rgba(79, 70, 229, 0.15);
  }
}

/* =========================================================
   Profile Button
   ========================================================= */

.profile-menu {
  position: relative;
}

.profile-trigger {
  height: 44px;
  min-height: 44px;
  padding: 4px 14px 4px 4px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 14px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.95),
    rgba(248, 250, 252, 0.9)
  );
  color: var(--text);
  cursor: pointer;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 4px 16px rgba(15, 23, 42, 0.04);
  transition:
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
}

.profile-trigger:hover {
  border-color: rgba(79, 70, 229, 0.3);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 1),
    rgba(245, 243, 255, 0.95)
  );
  box-shadow:
    0 8px 24px rgba(15, 23, 42, 0.08),
    0 0 0 3px rgba(79, 70, 229, 0.06);
  transform: translateY(-1px);
}

.profile-trigger:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--shadow-focus);
}

.profile-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 10px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.3), transparent 40%),
    linear-gradient(135deg, #4f46e5, #7c3aed);
  color: var(--white);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.04em;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.2),
    0 2px 8px rgba(79, 70, 229, 0.25);
}

.avatar-image {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
  object-fit: cover;
}

.profile-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  text-align: left;
}

.profile-text strong {
  max-width: 120px;
  color: var(--text-heading);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-text span {
  max-width: 120px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-chevron {
  flex: 0 0 auto;
  color: var(--muted);
  opacity: 0.65;
  transition: transform var(--transition-fast);
}

.profile-trigger[aria-expanded="true"] .profile-chevron {
  transform: rotate(180deg);
}

/* =========================================================
   Profile Dropdown
   ========================================================= */

.profile-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 260px;
  padding: 6px;
  z-index: 220;
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(24px) saturate(190%);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  box-shadow:
    0 20px 60px rgba(15, 23, 42, 0.14),
    0 4px 12px rgba(15, 23, 42, 0.05);
  transform-origin: top right;
  animation: dropdownSlideIn 200ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.profile-dropdown::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 18px;
  width: 11px;
  height: 11px;
  border-left: 1px solid rgba(226, 232, 240, 0.8);
  border-top: 1px solid rgba(226, 232, 240, 0.8);
  background: rgba(255, 255, 255, 0.95);
  transform: rotate(45deg);
}

.profile-dropdown-header {
  display: grid;
  gap: 3px;
  padding: 12px 10px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
}

.profile-dropdown-header strong {
  color: var(--text-heading);
  font-size: var(--font-size-md);
  font-weight: 800;
  line-height: 1.2;
}

.profile-dropdown-header span {
  color: var(--muted);
  font-size: var(--font-size-xs);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.profile-dropdown button {
  width: 100%;
  min-height: 42px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  text-align: left;
  font-weight: 700;
  cursor: pointer;
  transition:
    background-color var(--transition-fast),
    color var(--transition-fast),
    transform var(--transition-fast);
}

.profile-dropdown button:hover {
  background: var(--accent-soft);
  color: var(--accent);
  transform: translateX(2px);
}

.profile-dropdown button.profile-logout-btn {
  color: var(--danger);
}

.profile-dropdown button.profile-logout-btn:hover {
  background: var(--danger-soft);
  color: var(--danger-hover);
}

@keyframes dropdownSlideIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* =========================================================
   Notification Dropdown Position Fix
   ========================================================= */

/* =========================================================
   RESPONSIVE — Tablet (≤ 900px)
   ========================================================= */

@media (max-width: 900px) {
  .topbar-inner {
    min-height: 60px;
    padding: 0 16px;
    gap: 14px;
  }

  .topbar-left {
    gap: 12px;
  }

  .header-logo {
    width: clamp(110px, 20vw, 148px);
    height: 36px;
  }

  .header-title strong {
    max-width: 200px;
  }

  .header-title span {
    max-width: 200px;
  }

  .topbar-actions {
    gap: 6px;
  }
}

/* =========================================================
   RESPONSIVE — Small Tablet / Large Phone (≤ 700px)
   ========================================================= */

@media (max-width: 700px) {
  .topbar-accent {
    height: 2px;
    flex: 0 0 2px;
  }

  .topbar-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 56px;
    padding: max(8px, env(safe-area-inset-top)) 14px 8px;
    background: rgba(248, 250, 252, 0.95);
    border-bottom: 0;
    box-shadow: 0 6px 24px rgba(15, 23, 42, 0.07);
  }

  .header-divider {
    display: none;
  }

  .header-title span {
    display: none;
  }

  .header-title strong {
    max-width: 42vw;
    font-size: 13.5px;
    line-height: 1.2;
  }

  .header-icon-btn {
    width: 46px;
    min-width: 46px;
    height: 46px;
    min-height: 46px;
    border-radius: 10px;
  }

  .header-icon-btn svg {
    width: 30px;
    height: 30px;
  }

  .profile-trigger {
    height: 40px;
    min-height: 40px;
    padding: 3px 10px 3px 3px;
    border-radius: 12px;
  }

  .profile-avatar {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    font-size: 11px;
  }
}

/* =========================================================
   RESPONSIVE — Phone (≤ 520px)
   ========================================================= */

@media (max-width: 520px) {
  .topbar-inner {
    min-height: 54px;
    padding-inline: 12px;
    gap: 10px;
  }

  .topbar-left {
    flex: 1 1 auto;
    min-width: 0;
    gap: 8px;
  }

  .header-title,
  .header-divider {
    display: none;
  }

  .header-logo {
    width: clamp(100px, 30vw, 124px);
    height: 30px;
  }

  .topbar-actions {
    gap: 4px;
  }

  .header-icon-btn {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    border-radius: 10px;
  }

  .header-icon-btn svg {
    width: 29px;
    height: 29px;
  }

  .notification-dot {
    top: 4px;
    right: 4px;
    width: 7px;
    height: 7px;
  }

  .notification-count {
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    font-size: 9px;
  }

  /* Collapse profile to avatar-only */
  .profile-trigger {
    width: 38px;
    min-width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 3px;
    justify-content: center;
    border-color: transparent;
    border-radius: 12px;
    background: transparent;
    box-shadow: none;
  }

  .profile-trigger:hover {
    background: var(--accent-soft);
    box-shadow: none;
    transform: none;
  }

  .profile-avatar {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    font-size: 10px;
  }

  .profile-text,
  .profile-chevron {
    display: none;
  }

  /* Full-width dropdown on mobile */
  .profile-dropdown {
    position: fixed;
    top: calc(54px + env(safe-area-inset-top));
    right: 12px;
    width: min(280px, calc(100vw - 24px));
    border-radius: 14px;
    animation-name: mobileDropdownIn;
  }

  .profile-dropdown::before {
    display: none;
  }

}

@keyframes mobileDropdownIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* =========================================================
   RESPONSIVE — Compact Phone (≤ 380px)
   ========================================================= */

@media (max-width: 380px) {
  .topbar-accent {
    height: 2px;
    flex: 0 0 2px;
  }

  .topbar-inner {
    min-height: 50px;
    padding: 0 10px;
  }

  .header-logo {
    width: 100px;
    height: 28px;
  }

  .topbar-actions {
    gap: 3px;
  }

  .header-icon-btn {
    width: 42px;
    min-width: 42px;
    height: 42px;
    min-height: 42px;
  }

  .header-icon-btn svg {
    width: 28px;
    height: 28px;
  }

  .profile-trigger {
    width: 36px;
    min-width: 36px;
    height: 36px;
    min-height: 36px;
  }

  .profile-avatar {
    width: 28px;
    height: 28px;
    font-size: 10px;
  }

  .profile-dropdown {
    top: 54px;
    left: 8px;
    right: 8px;
    width: auto;
  }
}

/* =========================================================
   Touch Devices
   ========================================================= */

@media (hover: none) {
  .header-icon-btn:hover,
  .profile-trigger:hover,
  .profile-dropdown button:hover {
    transform: none;
  }

  .header-icon-btn,
  .profile-trigger,
  .profile-dropdown button {
    min-height: 44px;
  }

  .header-icon-btn {
    min-width: 42px;
  }
}

/* =========================================================
   Reduced Motion
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  .topbar-accent {
    animation: none;
  }

  .header-icon-btn,
  .header-icon-btn svg,
  .profile-trigger,
  .profile-dropdown,
  .profile-dropdown button,
  .profile-chevron,
  .notification-dot {
    transition: none;
    animation: none;
  }

  .header-icon-btn:hover,
  .profile-trigger:hover,
  .profile-dropdown button:hover {
    transform: none;
  }
}
.sidebar {
  min-height: 0;
  height: 100%;
  padding: 18px;
  border-right: 1px solid rgba(226, 232, 240, 0.92);
  background:
    linear-gradient(180deg, rgba(6, 31, 63, 0.035), transparent 220px),
    rgba(255, 255, 255, 0.9);
  color: var(--text);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(100, 116, 139, 0.45) transparent;
}

.sidebar::-webkit-scrollbar {
  width: 8px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  background-color: rgba(100, 116, 139, 0.46);
  background-clip: content-box;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background-color: rgba(100, 116, 139, 0.72);
}

.sidebar-nav {
  display: grid;
  gap: 7px;
}

.sidebar-nav button {
  position: relative;
  width: 100%;
  min-height: 44px;
  padding: 11px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--font-size-md);
  font-weight: 750;
  text-align: left;
  line-height: 1.25;
  transition:
    transform var(--transition-spring),
    background var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.sidebar-nav .icon {
  color: currentColor;
  flex: 0 0 auto;
  opacity: 0.86;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.sidebar-nav button:hover {
  transform: translateX(4px);
  border-color: rgba(79, 70, 229, 0.12);
  background: var(--accent-soft);
  color: var(--accent);
}

.sidebar-nav button:hover .icon {
  opacity: 1;
  transform: scale(1.1);
}

.sidebar-nav button.active {
  border-color: rgba(79, 70, 229, 0.1);
  background: rgba(79, 70, 229, 0.06);
  color: var(--accent);
  box-shadow: inset 4px 0 0 var(--accent), var(--shadow);
}

.sidebar-nav button.active .icon {
  opacity: 1;
  color: var(--accent);
}

.sidebar-nav button.active::after {
  content: "";
  width: 6px;
  height: 6px;
  margin-left: auto;
  border-radius: var(--radius-pill);
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

.sidebar-nav button:focus-visible {
  outline: none;
  border-color: rgba(79, 70, 229, 0.34);
  box-shadow: var(--shadow-focus);
}

.sidebar-nav button:disabled {
  transform: none;
}

.sidebar-nav button:disabled .icon {
  opacity: 0.7;
  transform: none;
}

@media (max-width: 1100px) {
  .sidebar {
    height: auto;
    padding: 14px 18px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
  }

  .sidebar-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .sidebar-nav::-webkit-scrollbar {
    display: none;
  }

  .sidebar-nav button {
    width: auto;
    min-width: max-content;
    flex: 0 0 auto;
    white-space: nowrap;
    scroll-snap-align: start;
  }

  .sidebar-nav button.active {
    box-shadow: inset 0 -3px 0 var(--navy), var(--shadow);
  }
}

@media (max-width: 700px) {
  .sidebar {
    padding: 12px 16px;
  }
}

@media (max-width: 520px) {
  .sidebar {
    padding: 12px;
  }

  .sidebar-nav {
    gap: 6px;
  }

  .sidebar-nav button {
    min-height: 40px;
    padding: 9px 11px;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
  }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar-nav button,
  .sidebar-nav .icon {
    transition: none;
  }

  .sidebar-nav button:hover,
  .sidebar-nav button:hover .icon {
    transform: none;
  }
}
.panel,
.project-card,
.module-list > div,
.role-list div,
.workflow-list div,
.daily-summary-grid div,
.profile-summary div,
.role-metric,
.dashboard-alert,
.quick-action-list button {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--transition-spring),
    box-shadow var(--transition-fast),
    border-color var(--transition-fast),
    background var(--transition-fast);
}

.project-card:hover,
.quick-action-list button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(10, 37, 64, 0.16);
}

.module-list > div:hover,
.role-list div:hover,
.workflow-list div:hover {
  transform: translateX(2px);
  box-shadow: var(--shadow-sm);
  border-color: rgba(10, 37, 64, 0.14);
  background: var(--surface-raised);
}

.dashboard-grid,
.management-grid,
.user-crud-grid,
.daily-update-grid,
.role-dashboard-grid,
.analytics-grid {
  display: grid;
  gap: 18px;
  align-items: start;
}

.dashboard-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
}

.management-grid {
  grid-template-columns: minmax(300px, 0.42fr) minmax(0, 0.58fr);
}

.management-grid.full-width-grid,
.management-grid.single-form-grid {
  grid-template-columns: minmax(0, 1fr);
}

.management-grid.full-width-grid > .wide-panel,
.management-grid.single-form-grid > .panel {
  width: 100%;
  max-width: none;
  grid-column: 1 / -1;
}

.user-crud-grid {
  grid-template-columns: 1fr;
}

.daily-update-grid {
  grid-template-columns: minmax(320px, 0.45fr) minmax(0, 0.55fr);
}

.role-dashboard-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
}

.analytics-grid {
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.55fr);
}

.profile-detail-grid,
.profile-page {
  display: grid;
  gap: 18px;
  align-items: start;
}

.profile-detail-grid {
  grid-template-columns: minmax(0, 0.95fr) minmax(340px, 0.65fr);
}

.profile-page {
  grid-template-columns: 1fr;
}

.panel {
  min-width: 0;
  padding: var(--space-6);
}

.wide-panel {
  min-width: 0;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.panel-heading h2 {
  margin: 0 0 6px;
  color: var(--text-heading);
  font-size: 19px;
  line-height: 1.25;
}

.settings-panel {
  max-width: 680px;
}

.daily-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.daily-summary-grid div,
.role-metric,
.profile-summary div {
  background: linear-gradient(180deg, var(--surface-raised), var(--surface));
  padding: var(--space-4);
}

.daily-summary-grid span,
.role-metric span,
.profile-summary span {
  display: block;
  color: var(--muted);
  font-size: var(--font-size-xs);
  font-weight: 850;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.daily-summary-grid strong,
.role-metric strong {
  color: var(--text-heading);
  font-size: 26px;
  line-height: 1;
}

.daily-date-window {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: var(--space-5);
}

.daily-update-rules {
  display: grid;
  gap: 9px;
  margin-bottom: var(--space-5);
  padding: 13px 14px;
  border: 1px solid color-mix(in srgb, var(--info) 26%, var(--border));
  border-radius: var(--radius-md);
  background: var(--info-soft);
  color: var(--text);
}

.daily-update-rules strong {
  color: var(--text-heading);
  font-size: var(--font-size-sm);
  line-height: 1.3;
}

.daily-update-rules ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
}

.daily-update-rules li {
  color: var(--text-soft);
  font-size: var(--font-size-sm);
  font-weight: 650;
  line-height: 1.45;
}

.optional-field {
  color: var(--muted);
  font-size: var(--font-size-xs);
  font-weight: 750;
}

.daily-date-option {
  min-width: 0;
  min-height: 92px;
  display: grid;
  align-content: start;
  gap: 7px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  padding: 10px;
  text-align: left;
  cursor: pointer;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
}

.daily-date-option:hover:not(:disabled),
.daily-date-option:focus-visible {
  border-color: rgba(79, 70, 229, 0.35);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.daily-date-option.selected {
  border-color: var(--accent);
  box-shadow: var(--shadow-focus);
}

.daily-date-option.absent {
  border-color: color-mix(in srgb, var(--danger) 34%, var(--border));
  background: var(--danger-soft);
}

.daily-date-option.locked {
  background: var(--surface-muted);
}

.daily-date-option:disabled {
  cursor: not-allowed;
  opacity: 0.78;
}

.daily-date-option span,
.daily-date-option small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.daily-date-option span {
  color: var(--muted);
  font-size: var(--font-size-xs);
  font-weight: 850;
}

.daily-date-option strong {
  color: var(--text-heading);
  font-size: var(--font-size-md);
  line-height: 1.2;
}

.daily-date-option small {
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
}

.daily-updates-review-panel {
  min-width: 0;
}

.daily-update-view-toolbar {
  padding-top: var(--space-1);
}

.daily-updates-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-4);
}

.daily-update-card {
  min-width: 0;
  display: grid;
  gap: 14px;
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface-raised), var(--surface));
  box-shadow: var(--shadow-sm);
}

.daily-update-card.submitted {
  border-color: color-mix(in srgb, var(--warning) 34%, var(--border));
}

.daily-update-card.reviewed {
  border-color: color-mix(in srgb, var(--success) 30%, var(--border));
}

.daily-update-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}

.daily-update-card-header div {
  min-width: 0;
}

.daily-update-card-header span:first-child,
.daily-update-card-header small,
.daily-update-card-section span,
.daily-update-card-footer label {
  color: var(--muted);
  font-size: var(--font-size-xs);
  font-weight: 850;
}

.daily-update-card h3,
.daily-update-card p {
  margin: 0;
}

.daily-update-card h3 {
  margin-top: 4px;
  color: var(--text-heading);
  font-size: var(--font-size-md);
  line-height: 1.25;
}

.daily-update-card-header small,
.daily-update-card p {
  overflow-wrap: anywhere;
}

.daily-update-card-section {
  display: grid;
  gap: 6px;
}

.daily-update-card-section p {
  color: var(--text-soft);
  font-size: var(--font-size-sm);
  line-height: 1.5;
}

.daily-update-card-section.has-blocker {
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--warning) 34%, var(--border));
  border-radius: var(--radius-md);
  background: var(--warning-soft);
}

.daily-update-card-footer {
  display: grid;
  gap: 10px;
}

.daily-update-card-footer label {
  display: grid;
  gap: 7px;
}

.role-list,
.workflow-list,
.profile-summary,
.project-grid,
.module-list {
  display: grid;
  gap: 14px;
}

.workflow-stack {
  display: grid;
  gap: 20px;
}

.role-list div,
.workflow-list div,
.module-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: 15px;
  background: var(--surface-raised);
}

.role-list span,
.workflow-list span,
.module-list span {
  color: var(--muted);
  font-size: var(--font-size-sm);
  font-weight: 700;
}

.role-list strong,
.workflow-list strong {
  color: var(--text-heading);
  font-size: 22px;
}

.role-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.role-metric {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 13px;
}

.role-metric > div:last-child {
  min-width: 0;
}

.role-metric span,
.role-metric strong,
.role-metric small,
.quick-action-list strong,
.quick-action-list small,
.workflow-list span,
.workflow-list strong,
.role-list span,
.role-list strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.metric-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(79, 70, 229, 0.12);
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--accent);
}

.role-metric small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: var(--font-size-xs);
  line-height: 1.45;
}

.stat-card {
  min-width: 0;
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface-raised), var(--surface));
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--transition-spring),
    box-shadow var(--transition-fast),
    border-color var(--transition-fast);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(10, 37, 64, 0.16);
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: var(--font-size-xs);
  font-weight: 850;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.stat-card strong {
  display: block;
  color: var(--text-heading);
  font-size: 26px;
  line-height: 1;
}

.task-mobile-grid {
  display: none;
}

.task-mobile-card {
  min-width: 0;
  display: grid;
  gap: 12px;
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface-raised), var(--surface));
  box-shadow: var(--shadow-sm);
}

.task-card-status-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  min-height: 28px;
}

.task-mobile-card.overdue {
  border-color: color-mix(in srgb, var(--danger) 32%, var(--border));
}

.task-mobile-card.completed {
  opacity: 0.82;
}

.task-mobile-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}

.task-mobile-card-header div {
  min-width: 0;
}

.task-mobile-card-header span:first-child,
.task-mobile-meta span,
.task-mobile-controls label {
  color: var(--muted);
  font-size: var(--font-size-xs);
  font-weight: 850;
}

.task-mobile-card h3,
.task-mobile-card p {
  margin: 0;
}

.task-mobile-card h3 {
  margin-top: 4px;
  color: var(--text-heading);
  font-size: var(--font-size-md);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.task-mobile-card p {
  color: var(--text-soft);
  font-size: var(--font-size-sm);
  line-height: 1.45;
}

.task-mobile-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.task-mobile-meta div {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.task-mobile-meta strong {
  color: var(--text-heading);
  font-size: var(--font-size-sm);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.task-mobile-controls {
  display: grid;
  gap: 10px;
}

.task-mobile-controls label {
  display: grid;
  gap: 7px;
}

.leave-mobile-grid {
  display: none;
}

.leave-page {
  --leave-accent: #2563eb;
  --leave-accent-soft: rgba(37, 99, 235, 0.1);
}

.leave-hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.34fr);
  gap: var(--space-5);
  align-items: stretch;
  padding: clamp(18px, 2.5vw, 28px);
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(0, 212, 178, 0.08)),
    var(--surface);
}

.leave-hero-copy {
  min-width: 0;
  display: grid;
  gap: 8px;
  align-content: center;
}

.leave-hero-copy > span {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 10px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.75);
  color: var(--leave-accent);
  font-size: var(--font-size-xs);
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.leave-hero-copy h2,
.leave-hero-copy p {
  margin: 0;
}

.leave-hero-copy h2 {
  color: var(--text-heading);
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.08;
}

.leave-hero-copy p {
  max-width: 720px;
  color: var(--text-soft);
  font-size: var(--font-size-md);
  line-height: 1.6;
}

.leave-hero-status {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.leave-hero-status div {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: var(--space-4);
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.8);
}

.leave-hero-status span,
.leave-stat-card span:not(.leave-stat-icon) {
  color: var(--muted);
  font-size: var(--font-size-xs);
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}

.leave-hero-status strong {
  color: var(--text-heading);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1;
}

.leave-stat-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 132px;
  overflow: hidden;
}

.leave-stat-card small {
  color: var(--text-soft);
  font-size: var(--font-size-xs);
  font-weight: 750;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.leave-stat-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: var(--radius-md);
  background: var(--leave-accent-soft);
  color: var(--leave-accent);
}

.leave-stat-card.pending-review .leave-stat-icon {
  background: var(--warning-soft);
  color: var(--warning);
  border-color: rgba(245, 166, 35, 0.2);
}

.leave-stat-card.approved .leave-stat-icon {
  background: var(--success-soft);
  color: var(--success);
  border-color: rgba(0, 212, 178, 0.2);
}

.leave-stat-card.declined .leave-stat-icon {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: rgba(255, 92, 117, 0.2);
}

.leave-management-panel {
  display: grid;
  gap: var(--space-4);
}

.leave-management-panel .filter-bar {
  grid-template-columns: minmax(220px, 1.3fr) repeat(3, minmax(150px, 0.7fr));
}

.leave-management-panel .panel-heading {
  align-items: flex-start;
}

.leave-view-toolbar {
  margin-top: 0;
}

.leave-management-panel.view-grid .leave-mobile-grid {
  display: grid;
}

.leave-management-panel.view-grid .leave-table-wrap,
.leave-management-panel.view-list .leave-mobile-grid {
  display: none;
}

.leave-mobile-card {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 14px;
  padding: var(--space-5);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, var(--surface-raised), var(--surface));
  box-shadow: var(--shadow-sm);
}

.leave-mobile-card.approved {
  border-color: color-mix(in srgb, var(--success) 30%, var(--border));
}

.leave-mobile-card.pending {
  border-color: color-mix(in srgb, var(--warning) 34%, var(--border));
}

.leave-mobile-card.rejected,
.leave-mobile-card.cancelled {
  border-color: color-mix(in srgb, var(--danger) 30%, var(--border));
}

.leave-mobile-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}

.leave-mobile-card-header div {
  min-width: 0;
}

.leave-mobile-card-header span:first-child,
.leave-mobile-card-header small,
.leave-mobile-meta span,
.leave-mobile-actions label {
  color: var(--muted);
  font-size: var(--font-size-xs);
  font-weight: 850;
}

.leave-mobile-card h3,
.leave-mobile-card p {
  margin: 0;
}

.leave-mobile-card h3 {
  margin-top: 4px;
  color: var(--text-heading);
  font-size: var(--font-size-lg);
  line-height: 1.25;
}

.leave-mobile-card-header small,
.leave-mobile-card p {
  overflow-wrap: anywhere;
}

.leave-mobile-card p {
  color: var(--text-soft);
  font-size: var(--font-size-sm);
  line-height: 1.45;
}

.leave-mobile-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.leave-mobile-meta div {
  min-width: 0;
  display: grid;
  gap: 4px;
  align-content: start;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-raised);
}

.leave-mobile-meta strong {
  color: var(--text-heading);
  font-size: var(--font-size-sm);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.leave-mobile-actions {
  display: grid;
  gap: 10px;
}

.leave-mobile-actions label {
  display: grid;
  gap: 7px;
}

.leave-submit-panel {
  max-width: 920px;
  margin-inline: auto;
}

.leave-submit-panel .user-form {
  gap: var(--space-5);
}

.leave-submit-panel textarea {
  min-height: 140px;
}

.leave-table-wrap table {
  min-width: 980px;
}

.expense-mobile-grid {
  display: none;
}

.expense-management-panel.view-grid .expense-mobile-grid {
  display: grid;
}

.expense-management-panel.view-grid .expense-table-wrap,
.expense-management-panel.view-list .expense-mobile-grid {
  display: none;
}

.expense-mobile-card {
  min-width: 0;
  display: grid;
  gap: 12px;
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface-raised), var(--surface));
  box-shadow: var(--shadow-sm);
}

.expense-mobile-card.submitted {
  border-color: color-mix(in srgb, var(--warning) 34%, var(--border));
}

.expense-mobile-card.approved,
.expense-mobile-card.paid {
  border-color: color-mix(in srgb, var(--success) 30%, var(--border));
}

.expense-mobile-card.rejected {
  border-color: color-mix(in srgb, var(--danger) 30%, var(--border));
}

.expense-mobile-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}

.expense-mobile-card-header div {
  min-width: 0;
}

.expense-mobile-card-header span:first-child,
.expense-mobile-card-header small,
.expense-mobile-meta span,
.expense-mobile-actions label {
  color: var(--muted);
  font-size: var(--font-size-xs);
  font-weight: 850;
}

.expense-mobile-card h3,
.expense-mobile-card p {
  margin: 0;
}

.expense-mobile-card h3 {
  margin-top: 4px;
  color: var(--text-heading);
  font-size: var(--font-size-md);
  line-height: 1.25;
}

.expense-mobile-card-header small,
.expense-mobile-card p {
  overflow-wrap: anywhere;
}

.expense-mobile-card p {
  color: var(--text-soft);
  font-size: var(--font-size-sm);
  line-height: 1.45;
}

.expense-mobile-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.expense-mobile-meta div {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.expense-mobile-meta strong,
.expense-mobile-meta a {
  color: var(--text-heading);
  font-size: var(--font-size-sm);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.expense-mobile-actions {
  display: grid;
  gap: 10px;
}

.expense-mobile-actions label {
  display: grid;
  gap: 7px;
}

.profile-summary strong {
  color: var(--text-heading);
  font-size: 15px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.profile-hero-panel {
  display: grid;
  gap: 18px;
}

.profile-hero {
  display: flex;
  align-items: flex-start;
  gap: clamp(16px, 3vw, 28px);
}

.profile-hero h2,
.profile-hero p {
  margin: 0;
}

.profile-hero h2 {
  margin-top: 10px;
  color: var(--text-heading);
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.05;
}

.profile-hero p {
  margin-top: 8px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.profile-avatar-large {
  width: clamp(92px, 11vw, 124px);
  height: clamp(92px, 11vw, 124px);
  flex: 0 0 auto;
  border-radius: 28px;
  display: grid;
  place-items: center;
  object-fit: cover;
  background:
    linear-gradient(135deg, rgba(79, 70, 229, 0.16), rgba(0, 212, 178, 0.18)),
    var(--surface-muted);
  border: 1px solid var(--border);
  color: var(--navy);
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 900;
}

.profile-avatar-shell {
  flex: 0 0 auto;
  padding: 6px;
  border: 1px solid rgba(79, 70, 229, 0.12);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: var(--shadow-sm);
}

.profile-header-card {
  position: relative;
  overflow: hidden;
  padding: clamp(20px, 3vw, 34px);
  background:
    linear-gradient(135deg, rgba(10, 37, 64, 0.04), rgba(79, 70, 229, 0.07)),
    var(--surface);
}

.profile-header-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, var(--accent), var(--success));
}

.profile-header-card .profile-hero {
  position: relative;
  padding-bottom: 0;
  border-bottom: 0;
}

.profile-header-content {
  display: grid;
  gap: 9px;
  min-width: 0;
  flex: 1 1 auto;
}

.profile-header-content h2,
.profile-header-content p,
.profile-header-content span {
  margin: 0;
}

.profile-header-content h2 {
  color: var(--text-heading);
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.04;
  letter-spacing: 0;
}

.profile-header-content p {
  color: var(--text);
  font-size: var(--font-size-md);
  font-weight: 750;
  overflow-wrap: anywhere;
}

.profile-header-content > span {
  color: var(--muted);
  font-size: var(--font-size-sm);
  font-weight: 700;
}

.profile-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: var(--space-2);
}

.profile-hero-actions button {
  min-height: 40px;
}

.profile-hero-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: var(--space-2);
}

.profile-hero-facts div {
  min-width: 0;
  display: grid;
  gap: 4px;
  min-height: 74px;
  align-content: center;
  padding: 12px 14px;
  border: 1px solid rgba(79, 70, 229, 0.12);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.82);
}

.profile-hero-facts span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.profile-hero-facts strong {
  color: var(--text-heading);
  font-size: var(--font-size-sm);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.profile-role-badge,
.profile-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 11px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-size: var(--font-size-xs);
  font-weight: 900;
  line-height: 1;
}

.profile-role-badge {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: rgba(79, 70, 229, 0.18);
}

.profile-status-badge.active,
.profile-status-card.active {
  color: var(--success);
  background: var(--success-soft);
  border-color: rgba(0, 212, 178, 0.2);
}

.profile-status-badge.pending,
.profile-status-card.pending {
  color: var(--warning);
  background: var(--warning-soft);
  border-color: rgba(245, 166, 35, 0.24);
}

.profile-status-badge.suspended,
.profile-status-card.suspended {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: rgba(255, 92, 117, 0.22);
}

.profile-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.profile-stat-card {
  min-width: 0;
  min-height: 118px;
  display: grid;
  align-content: space-between;
  gap: 14px;
  padding: var(--space-5);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, var(--surface-raised), var(--surface));
  box-shadow: var(--shadow-sm);
}

.profile-stat-card span {
  display: block;
  color: var(--muted);
  font-size: var(--font-size-xs);
  font-weight: 900;
  line-height: 1.25;
  text-transform: uppercase;
}

.profile-stat-card strong {
  display: block;
  color: var(--text-heading);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1;
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 18px;
  align-items: start;
}

.profile-panel {
  min-height: 100%;
}

.profile-details-panel,
.profile-edit-panel {
  grid-row: span 2;
}

.profile-info-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.profile-info-list div {
  display: grid;
  grid-template-columns: minmax(130px, 0.38fr) minmax(0, 0.62fr);
  gap: 14px;
  align-items: start;
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-raised);
}

.profile-info-list dt {
  color: var(--muted);
  font-size: var(--font-size-xs);
  font-weight: 900;
  text-transform: uppercase;
}

.profile-info-list dd {
  margin: 0;
  color: var(--text-heading);
  font-size: var(--font-size-sm);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.profile-panel-copy {
  margin: 0 0 16px;
  color: var(--text-soft);
  font-size: var(--font-size-md);
  line-height: 1.65;
}

.profile-quick-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.profile-quick-links button {
  justify-content: center;
  min-width: 0;
}

.profile-status-card {
  display: grid;
  gap: 8px;
  padding: var(--space-5);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.profile-status-card strong {
  color: currentColor;
  font-size: 22px;
  line-height: 1.1;
}

.profile-status-card span {
  color: var(--text-soft);
  font-weight: 700;
  line-height: 1.55;
}

.profile-edit-form {
  display: grid;
  gap: var(--space-4);
}

.profile-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

.profile-photo-editor {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-4);
  align-items: center;
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-raised);
}

.profile-photo-preview {
  width: 88px;
  height: 88px;
  border: 1px solid var(--border);
  border-radius: 22px;
  object-fit: cover;
  background: var(--surface-muted);
  box-shadow: var(--shadow);
}

.profile-photo-preview.empty {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--navy), var(--accent));
  color: var(--white);
  font-size: 22px;
  font-weight: 900;
}

.profile-photo-upload {
  width: fit-content;
  min-height: 38px;
  cursor: pointer;
}

.profile-photo-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.profile-photo-upload:focus-within {
  box-shadow: var(--shadow-focus);
}

.profile-photo-help {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: var(--font-size-xs);
  font-weight: 700;
  line-height: 1.4;
}

.profile-photo-remove {
  display: inline-flex;
  width: fit-content;
  margin-top: 8px;
}

.profile-empty,
.profile-error {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.profile-empty h2,
.profile-empty p,
.profile-error h2,
.profile-error p {
  margin: 0;
}

.profile-empty h2,
.profile-error h2 {
  color: var(--text-heading);
  font-size: 22px;
}

.profile-empty p,
.profile-error p {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.55;
}

.profile-error {
  border-color: rgba(255, 92, 117, 0.22);
  background: linear-gradient(180deg, var(--danger-soft), var(--surface));
}

.user-detail-page,
.user-detail-grid {
  display: grid;
  gap: 18px;
}

.user-detail-grid {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.75fr);
}

.user-detail-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.user-detail-header h3,
.user-detail-header p {
  margin: 0;
}

.user-detail-header h3 {
  color: var(--text-heading);
  font-size: 24px;
  line-height: 1.2;
}

.user-detail-header p {
  margin-top: 4px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.user-detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.user-detail-summary {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.horizontal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.panel .form-grid label,
.panel .designation-form label {
  display: grid;
  gap: 8px;
  color: var(--text-heading);
  font-size: var(--font-size-md);
  font-weight: 800;
}

.pending-registration-panel {
  display: grid;
  gap: 5px;
  margin-bottom: var(--space-4);
  border: 1px solid rgba(6, 31, 63, 0.16);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(6, 31, 63, 0.055), rgba(6, 31, 63, 0.02));
  color: var(--text);
  padding: 15px;
}

.pending-registration-panel strong {
  color: var(--text-heading);
  font-size: var(--font-size-md);
}

.pending-registration-panel span {
  color: var(--muted);
  font-size: var(--font-size-sm);
  line-height: 1.45;
}

.user-view-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.user-view-toolbar > div:first-child {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--muted);
  font-size: var(--font-size-sm);
  font-weight: 800;
}

.user-view-toolbar strong {
  color: var(--text-heading);
  font-size: var(--font-size-lg);
}

.segmented-control {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface-muted);
}

.segmented-control button {
  min-height: 34px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--muted);
  padding: 0 14px;
  font-size: var(--font-size-sm);
  font-weight: 850;
  cursor: pointer;
}

.segmented-control button.active {
  background: var(--surface);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.user-list-wrap table {
  min-width: 1040px;
}

.user-list-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 260px;
}

.user-list-identity > div:last-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.user-list-identity strong,
.user-list-identity span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-list-identity span {
  color: var(--muted);
  font-size: var(--font-size-xs);
}

.confirm-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(6, 31, 63, 0.42);
  backdrop-filter: blur(8px);
}

.confirm-modal {
  width: min(480px, 100%);
  display: grid;
  gap: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xl);
  padding: var(--space-6);
}

.confirm-modal-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  font-size: var(--font-size-lg);
  font-weight: 950;
}

.confirm-modal-icon.danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.confirm-modal h2,
.confirm-modal p {
  margin: 0;
}

.confirm-modal h2 {
  color: var(--text-heading);
  font-size: var(--font-size-xl);
  line-height: 1.2;
}

.confirm-modal p {
  margin-top: 8px;
  color: var(--text-soft);
  font-size: var(--font-size-sm);
  line-height: 1.55;
}

.confirm-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
}

.empty-section {
  min-height: 300px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 12px;
  text-align: center;
  border: 1px dashed rgba(6, 31, 63, 0.18);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface), var(--surface-raised));
  padding: var(--space-8);
}

.empty-section h2,
.empty-section p {
  margin: 0;
}

.empty-section h2 {
  color: var(--text-heading);
  font-size: 22px;
}

.empty-section p {
  max-width: 560px;
  color: var(--muted);
  line-height: 1.6;
}

.dashboard-alert {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  background: var(--surface-raised);
  padding: 15px;
}

.dashboard-alert > div:nth-child(2) {
  flex: 1 1 auto;
  min-width: 0;
}

.dashboard-alert-icon,
.quick-action-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(79, 70, 229, 0.12);
  background: var(--accent-soft);
  color: var(--accent);
}

.dashboard-alert-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
}

.dashboard-alert strong,
.dashboard-alert span {
  display: block;
}

.dashboard-alert strong {
  color: var(--text-heading);
  font-size: var(--font-size-md);
}

.dashboard-alert span {
  margin-top: 4px;
  color: var(--muted);
  font-size: var(--font-size-sm);
  line-height: 1.45;
}

.dashboard-alert.warning {
  border-color: var(--warning-border);
  background: linear-gradient(180deg, #fffdf4, var(--warning-soft));
}

.dashboard-alert.success {
  border-color: var(--success-border);
  background: linear-gradient(180deg, #f7fff9, var(--success-soft));
}

.quick-action-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.quick-action-list button {
  width: 100%;
  min-height: 78px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 14px;
  text-align: left;
  color: var(--text);
}

.quick-action-list button > span:last-child {
  min-width: 0;
}

.quick-action-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
}

.quick-action-list button:hover {
  background: var(--surface-muted);
}

.quick-action-list button:focus-visible,
.tab-navigation button:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}

.quick-action-list strong,
.quick-action-list small {
  display: block;
}

.quick-action-list strong {
  margin-bottom: 5px;
  color: var(--text-heading);
  font-size: var(--font-size-md);
}

.quick-action-list small {
  color: var(--muted);
  font-size: var(--font-size-xs);
  line-height: 1.45;
}

.summary-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tab-navigation {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.tab-navigation button {
  min-height: 40px;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--muted);
  padding: 0 16px;
  font-weight: 850;
  white-space: nowrap;
  transition:
    background-color var(--transition),
    color var(--transition),
    border-color var(--transition),
    box-shadow var(--transition);
}

.tab-navigation button:hover {
  background: var(--surface-muted);
  color: var(--text-heading);
}

.tab-navigation button.active {
  border-color: var(--navy);
  background: var(--navy);
  color: var(--white);
  box-shadow: 0 10px 20px rgba(6, 31, 63, 0.18);
}

.project-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.project-card,
.module-list > div {
  padding: 18px;
}

.project-card {
  display: grid;
  gap: var(--space-4);
}

.project-card-open-area {
  display: grid;
  gap: var(--space-4);
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.project-card-open-area:disabled {
  cursor: default;
}

.project-card-open-area:focus-visible {
  outline: 3px solid rgba(6, 31, 63, 0.22);
  outline-offset: 4px;
  border-radius: var(--radius-md);
}

.project-card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.project-card h3,
.project-card p {
  margin: 0;
}

.project-card h3 {
  margin-top: 10px;
  color: var(--text-heading);
  font-size: 17px;
  overflow-wrap: anywhere;
}

.project-card p,
.project-card-footer,
.module-list span {
  color: var(--muted);
  font-size: var(--font-size-sm);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.project-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.project-card-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.project-edit-modal {
  width: min(620px, 100%);
  gap: 18px;
}

.project-edit-modal label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: var(--font-size-sm);
  font-weight: 850;
}

.project-edit-modal input,
.project-edit-modal select,
.project-edit-modal textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  padding: 11px 12px;
  font: inherit;
}

.project-edit-modal textarea {
  min-height: 104px;
  resize: vertical;
}

.project-edit-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.project-edit-header h2,
.project-edit-header p,
.project-form-section p {
  margin: 0;
}

.project-edit-header h2 {
  margin-top: 8px;
}

.project-edit-summary {
  display: grid;
  justify-items: end;
  gap: 8px;
  min-width: 180px;
  color: var(--muted);
  font-size: var(--font-size-sm);
  text-align: right;
}

.project-edit-form {
  gap: 16px;
}

.project-form-section {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-raised);
  padding: 14px;
}

.project-form-section > span {
  color: var(--text-heading);
  font-size: var(--font-size-sm);
  font-weight: 900;
}

.project-form-hint {
  color: var(--muted);
  font-size: var(--font-size-sm);
  line-height: 1.45;
}

.project-detail-panel {
  display: grid;
  gap: var(--space-5);
}

.project-detail-heading {
  align-items: flex-start;
}

.project-detail-heading h2,
.project-detail-heading p,
.project-detail-section h3 {
  margin: 0;
}

.project-detail-heading h2 {
  margin-top: 10px;
  overflow-wrap: anywhere;
}

.project-detail-description {
  max-width: 78ch;
  overflow-wrap: anywhere;
}

.project-detail-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.project-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.42fr);
  gap: var(--space-4);
  align-items: start;
}

.project-detail-main,
.project-detail-sidebar {
  display: grid;
  gap: var(--space-4);
  min-width: 0;
}

.project-detail-section {
  display: grid;
  gap: 14px;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-raised);
  padding: 16px;
}

.project-detail-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.project-detail-section-heading h3 {
  color: var(--text-heading);
  font-size: 17px;
}

.project-detail-section-heading span,
.project-detail-field-grid span,
.project-team-member span,
.project-task-row span,
.project-owner-select,
.project-team-form label {
  color: var(--muted);
  font-size: var(--font-size-sm);
  line-height: 1.45;
}

.project-detail-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.project-detail-field-grid div {
  display: grid;
  gap: 5px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 11px;
}

.project-detail-field-grid strong,
.project-team-member strong,
.project-task-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.project-owner-select,
.project-team-form label,
.project-team-picker legend {
  display: grid;
  gap: 7px;
  font-weight: 850;
}

.project-owner-select select,
.project-team-form input,
.project-team-form select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  padding: 11px 12px;
  font: inherit;
}

.project-team-list,
.project-task-list,
.project-team-form {
  display: grid;
  gap: 10px;
}

.project-team-picker {
  display: grid;
  gap: 10px;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 12px;
}

.project-team-picker legend {
  padding: 0 4px;
  color: var(--muted);
  font-size: var(--font-size-sm);
}

.project-team-picker > span {
  color: var(--muted);
  font-size: var(--font-size-sm);
}

.project-team-picker-list {
  display: grid;
  gap: 8px;
  max-height: 230px;
  overflow: auto;
  padding-right: 2px;
}

.project-team-picker-list label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-raised);
  padding: 10px;
  cursor: pointer;
}

.project-team-picker-list label.selected {
  border-color: rgba(6, 31, 63, 0.32);
  background: rgba(6, 31, 63, 0.06);
}

.project-team-picker-list label:has(input:disabled) {
  cursor: wait;
  opacity: 0.72;
}

.project-team-picker-list input {
  width: 18px;
  height: 18px;
  accent-color: var(--navy);
}

.project-team-picker-list span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.project-team-picker-list strong,
.project-team-picker-list small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-team-picker-list small {
  color: var(--muted);
  font-size: var(--font-size-xs);
}

.project-team-member,
.project-task-row {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 12px;
}

.project-team-member {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.project-team-member div,
.project-task-row > div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.project-task-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(320px, 0.85fr);
  gap: 12px;
  align-items: center;
}

.project-task-row > div:first-child span {
  overflow-wrap: anywhere;
}

.project-task-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.compact-empty {
  padding: 18px;
}

.task-detail-modal,
.task-edit-modal {
  width: min(680px, 100%);
}

.task-edit-modal {
  gap: 16px;
  max-height: min(88vh, 780px);
  overflow: auto;
}

.task-detail-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
}

.task-detail-heading h2,
.task-detail-heading p {
  margin: 0;
}

.task-detail-heading h2 {
  margin-top: 10px;
}

.task-detail-heading p {
  margin-top: 8px;
  color: var(--text-soft);
  line-height: 1.55;
}

.task-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.task-detail-grid div {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-raised);
}

.task-detail-grid span,
.task-edit-modal label {
  color: var(--muted);
  font-size: var(--font-size-sm);
  font-weight: 850;
}

.task-detail-grid strong {
  color: var(--text-heading);
  font-size: var(--font-size-sm);
  overflow-wrap: anywhere;
}

.task-edit-modal label {
  display: grid;
  gap: 7px;
}

.task-edit-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.task-edit-header h2,
.task-edit-header p {
  margin: 0;
}

.task-edit-header h2 {
  margin-top: 4px;
}

.task-edit-header p {
  margin-top: 7px;
  color: var(--text-soft);
  line-height: 1.45;
}

.task-edit-eyebrow,
.task-edit-section > span {
  color: var(--muted);
  font-size: var(--font-size-xs);
  font-weight: 900;
  text-transform: uppercase;
}

.task-edit-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.task-edit-section {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-raised);
}

.task-edit-modal input,
.task-edit-modal select,
.task-edit-modal textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  padding: 11px 12px;
  font: inherit;
}

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

.project-progress {
  height: 8px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: var(--surface-muted);
}

.project-progress progress,
.progress-cell progress {
  width: 100%;
  overflow: hidden;
  border: 0;
  border-radius: inherit;
  background: var(--surface-muted);
  appearance: none;
}

.project-progress progress {
  display: block;
  height: 100%;
}

.project-progress progress::-webkit-progress-bar,
.progress-cell progress::-webkit-progress-bar {
  border-radius: inherit;
  background: var(--surface-muted);
}

.project-progress progress::-webkit-progress-value,
.progress-cell progress::-webkit-progress-value {
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--success));
}

.project-progress progress::-moz-progress-bar,
.progress-cell progress::-moz-progress-bar {
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--success));
}

.progress-cell {
  min-width: 150px;
  display: grid;
  gap: 7px;
}

.progress-cell progress {
  height: 8px;
}

.progress-cell strong {
  color: var(--text-heading);
  font-size: var(--font-size-xs);
  line-height: 1.2;
}

.analytics-page .role-metric {
  min-height: 118px;
}

.analytics-table-wrap table {
  min-width: 1120px;
}

.analytics-card-list {
  display: none;
  gap: 12px;
}

.reports-view-grid .analytics-card-list {
  display: grid;
}

.reports-view-grid .analytics-table-wrap,
.reports-view-list .analytics-card-list {
  display: none;
}

.analytics-person-card {
  display: grid;
  gap: 14px;
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.analytics-person-card .status-pill {
  width: fit-content;
  max-width: 100%;
  line-height: 1.35;
  white-space: normal;
}

.analytics-person-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.analytics-person-card-header div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.analytics-person-card-header strong {
  color: var(--text-heading);
  font-size: var(--font-size-md);
  line-height: 1.25;
}

.analytics-person-card-header span:not(.role-badge) {
  color: var(--muted);
  font-size: var(--font-size-xs);
  overflow-wrap: anywhere;
}

.analytics-person-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.analytics-person-stats div {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-raised);
}

.analytics-person-stats span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}

.analytics-person-stats strong {
  color: var(--text-heading);
  font-size: var(--font-size-lg);
  line-height: 1;
}

.reports-result-count {
  min-width: 0;
  display: grid;
  gap: 4px;
  align-content: end;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-raised);
}

.reports-result-count strong {
  color: var(--text-heading);
  font-size: var(--font-size-lg);
  line-height: 1;
}

.reports-result-count span {
  color: var(--muted);
  font-size: var(--font-size-xs);
  font-weight: 850;
}

.notifications-page-heading {
  align-items: center;
}

.notification-page-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.notification-page-summary div {
  min-width: 0;
  display: grid;
  gap: 8px;
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, var(--surface-raised), var(--surface));
  box-shadow: var(--shadow-sm);
}

.notification-page-summary span,
.notification-page-meta,
.notification-page-footer {
  color: var(--muted);
  font-size: var(--font-size-xs);
  font-weight: 850;
}

.notification-page-summary span {
  text-transform: uppercase;
}

.notification-page-summary strong {
  color: var(--text-heading);
  font-size: clamp(25px, 3vw, 34px);
  line-height: 1;
}

.notification-push-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  margin-top: var(--space-4);
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-raised);
}

.notification-push-panel strong,
.notification-push-panel p {
  margin: 0;
}

.notification-push-panel strong {
  color: var(--text-heading);
  font-size: var(--font-size-md);
}

.notification-push-panel p {
  margin-top: 5px;
  color: var(--text-soft);
  font-size: var(--font-size-sm);
  line-height: 1.5;
}

.notification-push-message {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: var(--font-size-xs);
  font-weight: 850;
}

.notification-push-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.notifications-list-panel {
  display: grid;
  gap: 16px;
}

.notifications-toolbar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.notifications-toolbar::-webkit-scrollbar {
  display: none;
}

.notifications-toolbar button {
  min-height: 38px;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--muted);
  padding: 0 15px;
  font-size: var(--font-size-sm);
  font-weight: 850;
  cursor: pointer;
  transition:
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.notifications-toolbar button:hover,
.notifications-toolbar button.active {
  border-color: rgba(79, 70, 229, 0.22);
  background: var(--accent-soft);
  color: var(--accent);
}

.notifications-toolbar button:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}

.notification-page-list {
  display: grid;
  gap: 12px;
}

.notification-page-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-left-width: 4px;
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
}

.notification-page-item:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.notification-page-item.unread {
  background: linear-gradient(180deg, rgba(79, 70, 229, 0.06), var(--surface));
  border-color: rgba(79, 70, 229, 0.2);
}

.notification-page-item.danger {
  border-left-color: var(--danger);
}

.notification-page-item.warning {
  border-left-color: var(--warning);
}

.notification-page-item.info {
  border-left-color: var(--accent);
}

.notification-page-item.success {
  border-left-color: var(--success);
}

.notification-page-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--accent);
}

.notification-page-icon.danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.notification-page-icon.warning {
  background: var(--warning-soft);
  color: var(--warning);
}

.notification-page-icon.success {
  background: var(--success-soft);
  color: var(--success);
}

.notification-page-content {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.notification-page-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  line-height: 1.2;
}

.notification-page-meta > span:not(.notification-badge),
.notification-page-meta time {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-pill);
  background: var(--surface-muted);
  padding: 0 8px;
}

.notification-page-content h3,
.notification-page-content p {
  margin: 0;
}

.notification-page-content h3 {
  color: var(--text-heading);
  font-size: var(--font-size-lg);
  line-height: 1.25;
}

.notification-page-content p {
  color: var(--text-soft);
  font-size: var(--font-size-sm);
  line-height: 1.55;
}

.notification-page-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.notification-page-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}

.notification-page-empty {
  min-height: 320px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 10px;
  border: 1px dashed rgba(6, 31, 63, 0.18);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface), var(--surface-raised));
  color: var(--muted);
  padding: var(--space-8);
  text-align: center;
}

.notification-page-empty svg {
  color: var(--accent);
}

.notification-page-empty strong {
  color: var(--text-heading);
  font-size: var(--font-size-lg);
}

.notification-page-empty span {
  max-width: 360px;
  line-height: 1.55;
}

.project-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.project-meta-grid-expanded {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.project-meta-grid div {
  display: grid;
  gap: 4px;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-raised);
}

.project-meta-grid span {
  color: var(--muted);
  font-size: var(--font-size-xs);
  font-weight: 850;
  text-transform: uppercase;
}

.project-meta-grid strong {
  color: var(--text-heading);
  font-size: var(--font-size-md);
}

.work-summary-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.work-metric-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
}

.work-metric-card.danger {
  border-color: color-mix(in srgb, var(--danger) 22%, var(--border));
  background: linear-gradient(180deg, color-mix(in srgb, var(--danger) 6%, var(--surface-raised)), var(--surface));
}

.work-metric-card.warning {
  border-color: color-mix(in srgb, #d97706 24%, var(--border));
  background: linear-gradient(180deg, color-mix(in srgb, #d97706 7%, var(--surface-raised)), var(--surface));
}

.work-metric-icon {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--muted);
}

.work-metric-card.danger .work-metric-icon {
  color: var(--danger);
}

.work-metric-card.warning .work-metric-icon {
  color: #b45309;
}

.work-filter-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-raised);
}

.work-filter-heading div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.work-filter-heading strong {
  color: var(--text-heading);
  font-size: var(--font-size-sm);
}

.work-filter-heading span {
  color: var(--muted);
  font-size: var(--font-size-xs);
  line-height: 1.45;
}

.work-filter-bar {
  align-items: end;
}

.project-health-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  width: fit-content;
  max-width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--text-soft);
  font-size: var(--font-size-xs);
  font-weight: 900;
  line-height: 1;
}

.project-health-badge.timeline-risk,
.project-health-badge.task-risk {
  border-color: color-mix(in srgb, var(--danger) 24%, var(--border));
  background: color-mix(in srgb, var(--danger) 8%, var(--surface));
  color: var(--danger);
}

.project-health-badge.completed {
  border-color: rgba(22, 163, 74, 0.22);
  background: rgba(22, 163, 74, 0.08);
  color: #15803d;
}

.project-health-timeline-risk,
.project-health-task-risk {
  border-color: color-mix(in srgb, var(--danger) 20%, var(--border));
}

.work-empty-state {
  gap: 6px;
}

.work-empty-state strong {
  color: var(--text-heading);
}

.work-empty-state span {
  color: var(--muted);
  font-size: var(--font-size-sm);
}

.compact-empty {
  min-height: auto;
  padding: 14px;
}

.inline-alert {
  padding: 11px 12px;
  border: 1px solid color-mix(in srgb, var(--danger) 24%, var(--border));
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--danger) 8%, var(--surface));
  color: var(--danger);
  font-size: var(--font-size-sm);
  font-weight: 750;
}

.task-detail-tabs {
  display: flex;
  gap: 8px;
  padding-bottom: 4px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.task-detail-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  cursor: pointer;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--muted);
  padding: 0 14px;
  font-weight: 850;
  white-space: nowrap;
}

.task-detail-tabs button.active {
  border-color: var(--navy);
  background: var(--navy);
  color: var(--white);
}

.task-detail-tabs button em {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: var(--radius-pill);
  background: var(--surface-muted);
  color: var(--muted);
  font-style: normal;
  font-size: 11px;
  font-weight: 900;
}

.task-detail-tabs button.active em {
  background: rgba(255, 255, 255, 0.2);
  color: var(--white);
}

.task-collaboration-panel {
  display: grid;
  gap: 12px;
}

.inline-create-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.inline-create-form input,
.inline-create-form textarea,
.file-upload-control {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  padding: 11px 12px;
  font: inherit;
}

.comment-form {
  grid-template-columns: minmax(0, 1fr);
}

.comment-form button {
  justify-self: end;
}

.comment-form textarea {
  min-height: 92px;
  resize: vertical;
}

.file-upload-control {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: var(--font-size-sm);
  font-weight: 850;
}

.collaboration-list {
  display: grid;
  gap: 10px;
}

.collaboration-row,
.comment-row,
.activity-row {
  min-width: 0;
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-raised);
}

.collaboration-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
}

.collaboration-row a,
.collaboration-row span,
.comment-row p,
.activity-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.comment-row strong,
.activity-row strong {
  color: var(--text-heading);
  font-size: var(--font-size-sm);
}

.comment-row p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.5;
}

.comment-row span,
.activity-row span,
.collaboration-row span {
  color: var(--muted);
  font-size: var(--font-size-xs);
}

.module-list strong {
  display: block;
  color: var(--text-heading);
  margin-bottom: 4px;
}

.detail-actions {
  display: grid;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.designation-form {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.compact-list {
  gap: 10px;
}

.compact-list div {
  padding: 12px;
}

@media (max-width: 1100px) {
  .dashboard-grid,
  .management-grid,
  .user-crud-grid,
  .daily-update-grid,
  .role-dashboard-grid,
  .analytics-grid,
  .user-detail-grid {
    grid-template-columns: 1fr;
  }

  .settings-panel {
    max-width: none;
  }

  .work-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .daily-summary-grid,
  .role-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .daily-date-window {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .panel {
    padding: 18px;
  }

  .panel-heading,
  .dashboard-alert {
    width: 100%;
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .dashboard-alert,
  .user-detail-header,
  .role-list div,
  .workflow-list div,
  .module-list > div,
  .project-card-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .project-card-actions {
    width: 100%;
  }

  .project-card-actions button {
    flex: 1 1 120px;
  }

  .task-detail-heading {
    flex-direction: column;
  }

  .task-edit-header {
    flex-direction: column;
  }

  .task-edit-badges {
    justify-content: flex-start;
  }

  .task-detail-grid {
    grid-template-columns: 1fr;
  }

  .project-meta-grid-expanded {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inline-create-form,
  .collaboration-row {
    grid-template-columns: 1fr;
  }

  .comment-form button {
    justify-self: stretch;
  }

  .dashboard-alert {
    position: relative;
  }

  .dashboard-alert-icon {
    position: absolute;
    top: 15px;
    right: 15px;
  }

  .dashboard-alert > div:nth-child(2) {
    padding-right: 48px;
  }

  .user-view-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .segmented-control {
    width: 100%;
  }

  .segmented-control button {
    flex: 1 1 0;
  }

  .daily-updates-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .daily-update-card {
    padding: 12px;
    border-radius: var(--radius-md);
  }

  .daily-update-card-header {
    flex-direction: column;
  }

  .quick-action-list {
    grid-template-columns: 1fr;
  }

  .reports-view-grid .analytics-table-wrap {
    display: none;
  }

  .reports-view-grid .analytics-card-list {
    display: grid;
  }

  .notification-page-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .notification-page-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .notification-page-actions {
    grid-column: 1 / -1;
    flex-direction: row;
  }

  .notification-page-actions button {
    flex: 1 1 0;
  }

  .work-filter-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .work-filter-heading button {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .panel {
    padding: var(--space-4);
    border-radius: var(--radius);
  }

  .profile-header-card {
    padding: var(--space-5);
  }

  .profile-header-card .profile-hero {
    align-items: flex-start;
    flex-direction: column;
    text-align: left;
  }

  .profile-avatar-large {
    width: 76px;
    height: 76px;
    border-radius: 20px;
    font-size: 22px;
  }

  .profile-header-content h2 {
    font-size: 26px;
  }

  .profile-hero-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .daily-summary-grid,
  .role-metric-grid {
    grid-template-columns: 1fr;
  }

  .task-queue-panel .task-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .task-queue-panel .task-summary-grid div {
    min-height: 86px;
    padding: 12px;
  }

  .task-queue-panel .task-summary-grid strong {
    font-size: 22px;
  }

  .task-queue-panel .filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .task-queue-panel .filter-bar label:first-child,
  .task-queue-panel .filter-check {
    grid-column: 1 / -1;
  }

  .task-mobile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .task-detail-tabs {
    margin-inline: -4px;
    padding-inline: 4px;
  }

  .task-table-wrap {
    display: none;
  }

  .leave-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .leave-summary-grid .stat-card {
    min-height: 86px;
    padding: 12px;
  }

  .leave-summary-grid .stat-card strong {
    font-size: 22px;
  }

  .leave-management-panel .filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .leave-management-panel .filter-bar label:first-child {
    grid-column: 1 / -1;
  }

  .leave-management-panel.view-grid .leave-mobile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .leave-management-panel.view-grid .leave-table-wrap {
    display: none;
  }

  .expense-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .expense-summary-grid .stat-card {
    min-height: 86px;
    padding: 12px;
  }

  .expense-summary-grid .stat-card strong {
    font-size: 22px;
  }

  .expense-management-panel .filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .expense-management-panel .filter-bar label:first-child {
    grid-column: 1 / -1;
  }

  .expense-management-panel.view-grid .expense-mobile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .expense-management-panel.view-grid .expense-table-wrap {
    display: none;
  }

  .daily-date-window {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .daily-date-option {
    min-height: 78px;
  }

  .daily-summary-grid strong,
  .role-metric strong {
    font-size: 24px;
  }

  .tab-navigation button {
    min-height: 38px;
    padding: 0 13px;
    font-size: var(--font-size-sm);
  }

  .empty-section {
    min-height: 240px;
    padding: 24px 18px;
  }

  .analytics-person-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .notification-page-summary {
    grid-template-columns: 1fr;
  }

  .notification-push-panel {
    grid-template-columns: 1fr;
  }

  .notification-push-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .notification-push-actions button {
    width: 100%;
  }

  .notification-page-item {
    grid-template-columns: 1fr;
  }

  .notification-page-icon {
    width: 40px;
    height: 40px;
  }

  .notification-page-actions {
    flex-direction: column;
  }

  .notification-page-empty {
    min-height: 260px;
    padding: 24px 18px;
  }

  .confirm-modal-backdrop {
    align-items: end;
    padding: 12px;
  }

  .confirm-modal {
    padding: var(--space-5);
  }

  .confirm-modal-actions {
    flex-direction: column-reverse;
  }

  .confirm-modal-actions button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .panel,
  .project-card,
  .module-list > div,
  .role-list div,
  .workflow-list div,
  .daily-summary-grid div,
  .profile-summary div,
  .role-metric,
  .dashboard-alert,
  .quick-action-list button,
  .tab-navigation button {
    transition: none;
  }

  .project-card:hover,
  .module-list > div:hover,
  .role-list div:hover,
  .workflow-list div:hover,
  .quick-action-list button:hover,
  .user-card:hover {
    transform: none;
  }
}

/* KMS User Card Grid & Profile Displays */
.user-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-5);
  margin-top: var(--space-4);
}

.user-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--space-5);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-spring), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.user-card-body {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.user-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(79, 70, 229, 0.18);
}

.user-card.pending-card {
  border-color: rgba(245, 166, 35, 0.2);
  background: linear-gradient(180deg, var(--surface), var(--warning-soft));
}

.user-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: var(--space-4);
}

.user-card-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--navy), var(--accent));
  color: var(--white);
  font-size: 16px;
  font-weight: 900;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-sm);
}

.user-card-identity {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.user-card-identity strong {
  color: var(--text-heading);
  font-size: var(--font-size-md);
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-card-identity span {
  color: var(--muted);
  font-size: var(--font-size-xs);
  font-weight: 750;
  text-transform: uppercase;
}

.user-card-status-badge {
  margin-left: auto;
  align-self: flex-start;
}

.user-card-info {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-4) 0;
  border-block: 1px solid var(--line);
  margin-bottom: var(--space-4);
}

.user-card-info-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--font-size-sm);
}

.user-card-info-item span {
  color: var(--muted);
  font-weight: 700;
}

.user-card-info-item strong {
  color: var(--text);
  font-weight: 750;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-card-selectors {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.user-card-select-group {
  display: grid;
  gap: var(--space-2);
}

.user-card-select-group span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.user-card-select {
  width: 100%;
  min-height: 38px;
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
}

.user-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-3);
  margin-top: auto;
  padding-top: 12px;
}

.user-card-actions button {
  min-height: 36px;
  padding: 0 var(--space-4);
  font-size: var(--font-size-xs);
}

/* Calendar workspace */
.calendar-page {
  gap: clamp(14px, 2vw, 20px);
}

.calendar-page .role-metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.calendar-page .stat-card {
  min-height: 104px;
  overflow: hidden;
}

.calendar-toolbar-panel {
  overflow: hidden;
}

.calendar-toolbar-panel .panel-heading {
  align-items: center;
}

.calendar-toolbar-panel .panel-heading > div:first-child {
  min-width: min(100%, 360px);
}

.calendar-month-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  min-width: min(100%, 560px);
}

.calendar-month-actions strong {
  min-width: 170px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface-raised);
  color: var(--text-heading);
  font-size: var(--font-size-md);
  font-weight: 900;
  text-align: center;
}

.calendar-filters {
  margin-top: 0;
  max-width: 100%;
}

.calendar-view-row {
  display: grid;
  grid-template-columns: auto minmax(240px, 420px);
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.calendar-search-field {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--muted);
  padding: 0 13px;
}

.calendar-search-field input {
  width: 100%;
  min-height: 40px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: var(--font-size-sm);
}

.calendar-search-field input::placeholder {
  color: var(--muted);
}

.calendar-layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(330px, 0.58fr);
  gap: clamp(14px, 2vw, 20px);
  align-items: start;
}

.calendar-grid-panel,
.calendar-detail-panel,
.calendar-form-panel {
  min-width: 0;
}

.calendar-weekdays,
.calendar-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-weekdays {
  gap: 8px;
  margin-bottom: 10px;
}

.calendar-weekdays span {
  color: var(--muted);
  font-size: var(--font-size-xs);
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.calendar-month-grid {
  gap: 8px;
  min-width: 0;
}

.calendar-day {
  position: relative;
  min-height: clamp(82px, 8.5vw, 104px);
  display: grid;
  align-content: start;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  text-align: left;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.calendar-day:hover,
.calendar-day:focus-visible {
  border-color: rgba(79, 70, 229, 0.35);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.calendar-day.muted {
  background: var(--surface-muted);
  color: var(--muted);
  opacity: 0.68;
}

.calendar-day.today {
  border-color: rgba(16, 185, 129, 0.34);
  background: linear-gradient(180deg, var(--success-soft), var(--surface));
}

.calendar-day.selected {
  border-color: var(--accent);
  box-shadow: var(--shadow-focus);
}

.calendar-day span {
  min-width: 0;
  color: inherit;
  font-size: var(--font-size-sm);
  font-weight: 900;
}

.calendar-day strong {
  min-width: 26px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: var(--font-size-xs);
  font-weight: 900;
}

.calendar-event-list {
  display: grid;
  gap: 12px;
}

.calendar-event-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-md);
  background: var(--surface-raised);
  box-shadow: var(--shadow-sm);
}

.calendar-event-card.missing-updates {
  border-left-color: var(--warning);
}

.calendar-event-card.absentees {
  border-left-color: var(--danger);
}

.calendar-event-card.tasks {
  border-left-color: var(--info);
}

.calendar-event-card.compact {
  padding: 12px;
}

.calendar-event-content {
  min-width: 0;
}

.calendar-event-card h3,
.calendar-event-card p {
  margin: 0;
}

.calendar-event-card h3 {
  color: var(--text-heading);
  font-size: var(--font-size-md);
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.calendar-event-card p {
  margin-top: 5px;
  color: var(--text-soft);
  font-size: var(--font-size-sm);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.calendar-event-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--accent);
}

.calendar-event-card.missing-updates .calendar-event-icon {
  background: var(--warning-soft);
  color: var(--warning);
}

.calendar-event-card.absentees .calendar-event-icon {
  background: var(--danger-soft);
  color: var(--danger);
}

.calendar-event-card.tasks .calendar-event-icon {
  background: var(--info-soft);
  color: var(--info);
}

.calendar-event-meta,
.calendar-event-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.calendar-event-meta {
  margin-bottom: 6px;
}

.calendar-event-meta span,
.calendar-event-meta time {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--muted);
  padding: 0 8px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.calendar-event-meta .meeting-mode-pill {
  border: 1px solid rgba(79, 70, 229, 0.16);
  background: var(--accent-soft);
  color: var(--accent);
}

.calendar-event-meta .meeting-mode-pill.offline {
  border-color: rgba(16, 185, 129, 0.2);
  background: var(--success-soft);
  color: #047857;
}

.calendar-event-actions {
  margin-top: 10px;
}

.calendar-event-detail-list,
.calendar-day-counts {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.calendar-event-detail-list {
  margin-top: 10px;
}

.calendar-event-detail-list span,
.calendar-event-detail-list a,
.calendar-day-counts span {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--text-soft);
  padding: 0 9px;
  font-size: var(--font-size-xs);
  font-weight: 800;
}

.calendar-event-detail-list a {
  border-color: rgba(79, 70, 229, 0.2);
  background: var(--accent-soft);
  color: var(--accent);
  text-decoration: none;
}

.calendar-event-detail-list a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.calendar-day-counts {
  margin: -6px 0 14px;
}

.calendar-day-counts strong {
  margin-left: 4px;
  color: var(--text-heading);
}

.calendar-agenda-panel {
  min-width: 0;
}

.calendar-agenda-list {
  display: grid;
  gap: 16px;
}

.calendar-agenda-group {
  display: grid;
  grid-template-columns: minmax(130px, 0.18fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.calendar-agenda-date {
  position: sticky;
  top: 84px;
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-raised);
}

.calendar-agenda-date strong {
  color: var(--text-heading);
  font-size: var(--font-size-sm);
  line-height: 1.25;
}

.calendar-agenda-date span {
  color: var(--muted);
  font-size: var(--font-size-xs);
  font-weight: 850;
}

.calendar-detail-panel .empty-state,
.calendar-grid-panel .empty-state {
  min-height: 180px;
}

.calendar-setup-note {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--info) 28%, var(--border));
  border-radius: var(--radius-md);
  background: var(--info-soft);
  color: var(--text);
  font-size: var(--font-size-sm);
  line-height: 1.5;
}

.calendar-setup-note.danger {
  border-color: color-mix(in srgb, var(--danger) 30%, var(--border));
  background: var(--danger-soft);
  color: var(--danger);
  font-weight: 850;
}

.calendar-event-fieldset {
  display: grid;
  gap: var(--space-4);
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.calendar-event-fieldset:disabled {
  opacity: 0.68;
}

.calendar-meeting-mode-group {
  display: grid;
  gap: 8px;
}

.calendar-meeting-mode-group > span {
  color: var(--muted);
  font-size: var(--font-size-sm);
  font-weight: 850;
}

.calendar-meeting-mode-group .segmented-control {
  width: fit-content;
  max-width: 100%;
}

.calendar-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: block;
  overflow: auto;
  padding: clamp(16px, 3vw, 32px);
  background: rgba(248, 250, 252, 0.92);
  backdrop-filter: blur(12px);
}

.calendar-event-modal {
  width: min(1180px, 100%);
  min-height: calc(100vh - clamp(32px, 6vw, 64px));
  display: grid;
  align-content: start;
  gap: var(--space-5);
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xl);
  padding: clamp(18px, 3vw, 32px);
}

.calendar-modal-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.calendar-modal-heading h2,
.calendar-modal-heading p {
  margin: 0;
}

.calendar-modal-heading h2 {
  color: var(--text-heading);
  font-size: var(--font-size-xl);
  line-height: 1.2;
}

.calendar-modal-heading p {
  margin-top: 6px;
  color: var(--text-soft);
  font-size: var(--font-size-sm);
  line-height: 1.5;
}

.calendar-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
  padding-top: var(--space-2);
}

@media (max-width: 1180px) {
  .calendar-page .role-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .calendar-layout-grid {
    grid-template-columns: 1fr;
  }

  .calendar-toolbar-panel .panel-heading {
    align-items: flex-start;
  }

  .calendar-agenda-group {
    grid-template-columns: 1fr;
  }

  .calendar-agenda-date {
    position: static;
  }
}

@media (max-width: 700px) {
  .calendar-page .role-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .calendar-page .stat-card {
    min-height: 84px;
    padding: 12px;
  }

  .calendar-page .stat-card span {
    font-size: 10px;
    line-height: 1.25;
  }

  .calendar-page .stat-card strong {
    font-size: 23px;
  }

  .calendar-toolbar-panel .panel-heading {
    gap: 14px;
  }

  .calendar-view-row {
    grid-template-columns: 1fr;
  }

  .calendar-view-row .segmented-control,
  .calendar-search-field {
    width: 100%;
  }

  .calendar-month-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-content: stretch;
  }

  .calendar-month-actions .primary-btn {
    order: 1;
    grid-column: 1 / -1;
    width: 100%;
  }

  .calendar-month-actions strong {
    order: 2;
    grid-column: 1 / -1;
    min-width: 0;
    width: 100%;
  }

  .calendar-month-actions button {
    order: 3;
    min-width: 0;
    padding-inline: 8px;
  }

  .calendar-weekdays {
    gap: 4px;
    margin-bottom: 6px;
  }

  .calendar-month-grid {
    gap: 4px;
  }

  .calendar-day {
    min-height: 58px;
    align-content: space-between;
    gap: 4px;
    padding: 7px;
    border-radius: var(--radius-sm);
  }

  .calendar-day:hover {
    transform: none;
  }

  .calendar-day span {
    font-size: 12px;
  }

  .calendar-day strong {
    min-width: 21px;
    height: 20px;
    font-size: 10px;
    padding: 0 6px;
  }

  .calendar-event-card {
    grid-template-columns: 1fr;
    padding: 12px;
    border-radius: var(--radius-md);
  }

  .calendar-event-icon {
    width: 34px;
    height: 34px;
  }

  .calendar-event-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .calendar-event-actions button {
    width: 100%;
  }

  .calendar-event-detail-list span,
  .calendar-event-detail-list a,
  .calendar-day-counts span {
    width: 100%;
    justify-content: space-between;
  }

  .calendar-agenda-list {
    gap: 14px;
  }

  .calendar-modal-backdrop {
    padding: 0;
    background: var(--surface);
  }

  .calendar-event-modal {
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 18px;
  }

  .calendar-modal-heading {
    gap: var(--space-3);
  }

  .calendar-modal-actions {
    flex-direction: column-reverse;
  }

  .calendar-modal-actions button {
    width: 100%;
  }

  .calendar-meeting-mode-group .segmented-control {
    width: 100%;
  }

  .calendar-meeting-mode-group .segmented-control button {
    flex: 1 1 0;
  }
}

@media (max-width: 420px) {
  .task-mobile-grid,
  .task-mobile-meta,
  .leave-mobile-grid,
  .leave-mobile-meta,
  .expense-mobile-grid,
  .expense-mobile-meta,
  .daily-updates-card-grid {
    grid-template-columns: 1fr;
  }

  .leave-summary-grid,
  .expense-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .leave-summary-grid .stat-card,
  .expense-summary-grid .stat-card {
    min-height: 78px;
    padding: 10px;
  }

  .leave-summary-grid .stat-card span,
  .expense-summary-grid .stat-card span {
    font-size: 10px;
  }

  .leave-summary-grid .stat-card strong,
  .expense-summary-grid .stat-card strong {
    font-size: 20px;
  }

  .task-queue-panel .task-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .task-queue-panel .task-summary-grid div {
    min-height: 78px;
    padding: 10px;
  }

  .task-queue-panel .task-summary-grid span {
    font-size: 10px;
  }

  .task-queue-panel .task-summary-grid strong {
    font-size: 20px;
  }

  .calendar-weekdays span {
    font-size: 9px;
  }

  .calendar-day {
    min-height: 50px;
    padding: 5px;
  }

  .calendar-day strong {
    min-width: 18px;
    height: 18px;
    font-size: 9px;
  }

  .calendar-month-actions {
    grid-template-columns: 1fr 1fr;
  }

  .calendar-month-actions .primary-btn,
  .calendar-month-actions strong {
    grid-column: 1 / -1;
  }
}
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow);
  scrollbar-width: thin;
  scrollbar-color: rgba(100, 116, 139, 0.45) transparent;
}

.table-wrap:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus), var(--shadow);
}

.table-wrap::-webkit-scrollbar {
  height: 10px;
}

.table-wrap::-webkit-scrollbar-track {
  background: transparent;
}

.table-wrap::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: var(--radius-pill);
  background-color: rgba(100, 116, 139, 0.46);
  background-clip: content-box;
}

.table-wrap::-webkit-scrollbar-thumb:hover {
  background-color: rgba(100, 116, 139, 0.72);
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: separate;
  border-spacing: 0;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: var(--font-size-md);
  vertical-align: middle;
}

th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: var(--font-size-xs);
  font-weight: 900;
  line-height: 1.3;
  text-transform: uppercase;
  white-space: nowrap;
}

td {
  color: var(--text);
  line-height: 1.45;
  background: var(--surface);
}

tbody tr {
  transition: background-color var(--transition-fast), box-shadow var(--transition-fast);
}

tbody tr:hover td {
  background: var(--surface-raised);
}

tbody tr:last-child td {
  border-bottom: 0;
}

.pending-row td {
  background: var(--navy-subtle);
}

.pending-row:hover td {
  background: rgba(6, 31, 63, 0.065);
}

.selected-row td {
  background: rgba(6, 31, 63, 0.055);
  box-shadow: inset 3px 0 0 var(--navy);
}

.selected-row:hover td {
  background: rgba(6, 31, 63, 0.075);
}

.completed-row td {
  background: rgba(0, 212, 178, 0.035);
}

.completed-row strong {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.overdue-row td {
  background: var(--danger-soft);
}

.user-cell {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.user-cell > span:last-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.user-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--navy), var(--accent));
  color: var(--white);
  font-size: var(--font-size-xs);
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.user-avatar.large {
  width: 58px;
  height: 58px;
  border-radius: var(--radius-md);
  font-size: 18px;
}

.user-cell strong,
td > strong {
  color: var(--text-heading);
  font-weight: 850;
  line-height: 1.3;
}

.user-cell span {
  color: var(--muted);
  font-size: var(--font-size-sm);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.table-subtext {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: var(--font-size-xs);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.table-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 5px;
  border: 0;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--accent);
  padding: 0;
  font-size: var(--font-size-xs);
  font-weight: 850;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
}

.table-link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.table-link:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}

.table-select {
  min-width: 128px;
  background-color: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.user-access-table {
  min-width: 980px;
}

.user-table-wrap {
  border-radius: var(--radius-lg);
}

.user-access-table th {
  background: linear-gradient(180deg, var(--surface-muted), #f1f5f9);
}

.user-access-table td {
  padding-top: 16px;
  padding-bottom: 16px;
}

.table-select.active {
  border-color: var(--success-border);
  background-color: var(--success-soft);
  color: var(--success);
}

.table-select.pending,
.table-select.unassigned {
  border-color: var(--warning-border);
  background-color: var(--warning-soft);
  color: var(--warning);
}

.table-select.suspended {
  border-color: var(--danger-border);
  background-color: var(--danger-soft);
  color: var(--danger);
}

.compact-select {
  min-width: 116px;
  min-height: 34px;
  border-radius: var(--radius-sm);
  padding-top: 6px;
  padding-bottom: 6px;
  font-size: var(--font-size-xs);
}

.long-cell {
  max-width: 320px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.status,
.role-badge,
.status-pill,
.priority-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 5px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-size: var(--font-size-xs);
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

.role-badge {
  border-color: rgba(6, 31, 63, 0.1);
  background: var(--navy-soft);
  color: var(--navy);
}

.status.completed,
.status-pill.active,
.status-pill.approved,
.status-pill.paid,
.status-pill.reviewed,
.status-pill.completed {
  background: var(--success-soft);
  color: var(--success);
}

.status.pending,
.status-pill.pending,
.status-pill.submitted,
.status-pill.in-progress,
.status-pill.in-review {
  background: var(--info-soft);
  color: var(--info);
}

.status-pill.rejected,
.status-pill.cancelled {
  background: var(--danger-soft);
  color: var(--danger);
}

.status-pill.suspended,
.status-pill.overdue,
.status-pill.not-started,
.status-pill.todo,
.status-pill.paused,
.status-pill.planning {
  background: #f3f4f6;
  color: #374151;
}

.status-pill.overdue {
  margin-top: 6px;
  background: var(--danger-soft);
  color: var(--danger);
}

.blocker-cell {
  color: var(--danger);
  font-weight: 750;
}

.priority-pill.high,
.priority-pill.urgent {
  background: var(--danger-soft);
  color: var(--danger);
}

.priority-pill.medium {
  background: var(--warning-soft);
  color: var(--warning);
}

.priority-pill.low {
  background: var(--success-soft);
  color: var(--success);
}

.approval-status {
  display: inline-flex;
  align-items: center;
  color: var(--success);
  font-size: var(--font-size-sm);
  font-weight: 850;
  line-height: 1.3;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.row-actions button,
.row-actions a {
  min-height: 32px;
  border-radius: var(--radius-sm);
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.table-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: var(--font-size-xs);
  font-weight: 850;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.table-action-btn:active {
  transform: translateY(1px);
}

.table-action-btn.edit {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text);
}

.table-action-btn.edit:hover {
  border-color: var(--accent);
  background: var(--surface-raised);
  color: var(--accent-hover);
}

.table-action-btn.delete {
  background: var(--danger-soft);
  color: var(--danger);
}

.table-action-btn.delete:hover {
  background: #be123c;
  color: var(--white);
}

.table-action-locked {
  font-size: var(--font-size-xs);
  color: var(--muted);
  font-style: italic;
}

@media (max-width: 700px) {
  .table-wrap {
    border-radius: 18px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  th,
  td {
    padding: 13px 12px;
    vertical-align: top;
  }

  table {
    min-width: 680px;
  }

  th {
    position: sticky;
    top: 0;
    z-index: 1;
  }

  .table-actions {
    gap: 8px;
  }

  .table-action-btn {
    min-height: 36px;
    padding-inline: 11px;
  }

  .long-cell {
    max-width: 260px;
  }
}

@media (max-width: 520px) {
  th,
  td {
    padding: 12px 11px;
    font-size: var(--font-size-sm);
  }

  .table-wrap {
    margin-inline: -2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  tbody tr,
  .table-link {
    transition: none;
  }
}
/* Premium Bottom Navigation styles for Mobile Viewports */

@media (max-width: 700px) {
  .bottom-nav {
    position: fixed;
    bottom: max(8px, env(safe-area-inset-bottom));
    left: 10px;
    right: 10px;
    height: 66px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(18px) saturate(180%);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: 22px;
    z-index: 998;
    box-shadow:
      0 16px 44px rgba(15, 23, 42, 0.16),
      0 2px 8px rgba(15, 23, 42, 0.06);
    padding: 6px;
    box-sizing: border-box;
  }

  .bottom-nav-item {
    position: relative;
    border: none;
    background: transparent;
    padding: 0;
    margin: 0;
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--muted);
    cursor: pointer;
    outline: none;
    transition: color var(--transition-fast), transform var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
  }

  .bottom-nav-item::before {
    content: "";
    position: absolute;
    inset: 5px 7px;
    border-radius: 17px;
    background: transparent;
    transition: background var(--transition-fast), box-shadow var(--transition-fast);
    z-index: -1;
  }

  .bottom-nav-item:focus-visible {
    color: var(--accent);
  }

  .bottom-nav-item .icon {
    color: currentColor;
    opacity: 0.82;
    transition: transform var(--transition-spring), opacity var(--transition-fast), color var(--transition-fast);
  }

  .bottom-nav-item.active {
    color: var(--accent);
    font-weight: 800;
  }

  .bottom-nav-item.active::before {
    background: var(--accent-soft);
    box-shadow: inset 0 0 0 1px rgba(79, 70, 229, 0.12);
  }

  .bottom-nav-item.active .icon {
    opacity: 1;
    transform: scale(1.18) translateY(-2px);
  }

  .bottom-nav-label {
    max-width: 100%;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.1;
    text-transform: capitalize;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Backdrop Blur Overlay */
  .bottom-nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 999;
    animation: bottomNavFadeIn 220ms ease-out both;
  }

  /* Bottom Drawer Modal Sheet */
  .bottom-nav-drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-top-left-radius: 26px;
    border-top-right-radius: 26px;
    z-index: 1000;
    padding: 16px 20px calc(24px + env(safe-area-inset-bottom));
    box-shadow: 0 -18px 52px rgba(15, 23, 42, 0.18);
    box-sizing: border-box;
    animation: bottomNavSlideUp 320ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .bottom-nav-drawer-handle {
    width: 42px;
    height: 5px;
    background: var(--muted-soft);
    border-radius: var(--radius-pill);
    margin: 0 auto 14px;
    cursor: pointer;
    transition: background var(--transition-fast);
  }

  .bottom-nav-drawer-handle:hover {
    background: var(--muted);
  }

  .bottom-nav-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-inline: 4px;
  }

  .bottom-nav-drawer-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 900;
    color: var(--text-heading);
    letter-spacing: 0;
  }

  .bottom-nav-drawer-close {
    border: none;
    background: var(--soft);
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: var(--radius-pill);
    font-size: 20px;
    line-height: 1;
    color: var(--muted);
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
    outline: none;
  }

  .bottom-nav-drawer-close:hover {
    background: var(--soft-hover);
    color: var(--text-heading);
  }

  .bottom-nav-drawer-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    max-height: 55dvh;
    overflow-y: auto;
    padding-bottom: 8px;
    scrollbar-width: none; /* Hide scrollbar for clean view */
  }

  .bottom-nav-drawer-grid::-webkit-scrollbar {
    display: none;
  }

  .drawer-grid-item {
    border: 1px solid var(--border);
    min-height: 92px;
    border-radius: 18px;
    background: linear-gradient(180deg, var(--surface), var(--surface-raised));
    color: var(--text-soft);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    cursor: pointer;
    transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    -webkit-tap-highlight-color: transparent;
  }

  .drawer-grid-item:hover,
  .drawer-grid-item:focus-visible {
    background: var(--soft-hover);
    border-color: rgba(79, 70, 229, 0.15);
    transform: translateY(-2px);
  }

  .drawer-grid-item.active {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent);
    font-weight: 800;
  }

  .drawer-item-icon-wrapper {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: var(--radius-md);
    background: var(--soft);
    color: inherit;
    margin-bottom: 6px;
    transition: all var(--transition-fast);
  }

  .drawer-grid-item.active .drawer-item-icon-wrapper {
    background: var(--accent);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.24);
  }

  .drawer-item-label {
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    line-height: 1.25;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

@media (max-width: 380px) {
  .bottom-nav {
    left: 8px;
    right: 8px;
    height: 64px;
    border-radius: 20px;
  }

  .bottom-nav-label {
    font-size: 10px;
  }

  .bottom-nav-drawer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 701px) {
  .bottom-nav,
  .bottom-nav-backdrop,
  .bottom-nav-drawer {
    display: none;
  }
}

/* Animations */
@keyframes bottomNavFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes bottomNavSlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
/* Shared responsive compatibility rules for the dashboard shell. */

.table-wrap {
  position: relative;
  background:
    linear-gradient(to right, var(--surface) 30%, rgba(255, 255, 255, 0)),
    linear-gradient(to right, rgba(255, 255, 255, 0), var(--surface) 70%) 100% 0,
    radial-gradient(farthest-side at 0 50%, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0)),
    radial-gradient(farthest-side at 100% 50%, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0)) 100% 0;
  background-attachment: local, local, scroll, scroll;
  background-repeat: no-repeat;
  background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%;
}

@media (max-width: 1100px) {
  .dashboard-grid,
  .management-grid,
  .daily-update-grid,
  .role-dashboard-grid,
  .analytics-grid,
  .profile-detail-grid,
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .profile-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  body {
    background:
      linear-gradient(180deg, #eef4fb 0, #f8fafc 260px),
      var(--soft);
  }

  .app-shell {
    min-height: 100dvh;
    background: transparent;
  }

  .sidebar,
  .sidebar-nav {
    display: none;
  }

  .workflow-stack {
    gap: 14px;
  }

  .panel,
  .project-card,
  .user-card,
  .analytics-person-card,
  .stat-card,
  .role-metric,
  .dashboard-alert,
  .quick-action-list button,
  .task-mobile-card,
  .leave-mobile-card,
  .expense-mobile-card {
    border-color: rgba(226, 232, 240, 0.95);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.07);
  }

  .panel,
  .project-card,
  .user-card,
  .analytics-person-card,
  .task-mobile-card,
  .leave-mobile-card,
  .expense-mobile-card {
    background: rgba(255, 255, 255, 0.98);
  }

  .daily-summary-grid,
  .role-metric-grid,
  .profile-stat-grid,
  .task-mobile-grid,
  .leave-mobile-grid,
  .expense-mobile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .task-mobile-grid,
  .leave-management-panel.view-grid .leave-mobile-grid,
  .expense-management-panel.view-grid .expense-mobile-grid {
    display: grid;
  }

  .project-detail-summary-grid,
  .project-detail-layout,
  .project-task-row {
    grid-template-columns: 1fr;
  }

  .project-detail-section,
  .project-team-member,
  .project-task-row {
    border-radius: 14px;
  }

  .project-task-controls {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .project-task-controls select {
    width: 100%;
  }

  .project-team-picker-list {
    max-height: 280px;
  }

  .project-edit-header {
    display: grid;
  }

  .project-edit-summary {
    justify-items: start;
    min-width: 0;
    text-align: left;
  }

  .task-table-wrap {
    display: none;
  }

  .task-mobile-card,
  .leave-mobile-card,
  .expense-mobile-card,
  .daily-update-card,
  .project-card,
  .user-card {
    min-width: 0;
    overflow: hidden;
  }

  .task-mobile-controls,
  .leave-mobile-actions,
  .expense-mobile-actions,
  .user-card-actions,
  .project-card-actions,
  .horizontal-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .task-mobile-controls button,
  .leave-mobile-actions button,
  .expense-mobile-actions button,
  .user-card-actions button,
  .project-card-footer button,
  .horizontal-actions button {
    width: 100%;
  }

  .filter-bar {
    border-radius: var(--radius-md);
    padding: 12px;
  }

  .leave-hero-panel {
    grid-template-columns: 1fr;
  }

  .leave-hero-status {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .leave-management-panel .filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .leave-management-panel .filter-bar label:first-child {
    grid-column: 1 / -1;
  }

  .leave-view-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .leave-view-toolbar .segmented-control {
    width: 100%;
  }

  .leave-mobile-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .table-wrap {
    border-radius: 16px;
  }

  .table-wrap::before {
    content: "Swipe table \2194";
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 10px 12px 4px;
    padding: 4px 8px;
    border-radius: var(--radius-xs);
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
  }

  .profile-info-list div {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .profile-photo-editor {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .profile-form-grid {
    grid-template-columns: 1fr;
  }

  .profile-quick-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-quick-links button,
  .profile-hero-actions button,
  .profile-edit-form button,
  .profile-photo-upload,
  .profile-empty button,
  .profile-error button {
    width: 100%;
  }

  .profile-header-card .profile-hero {
    gap: 16px;
  }

  .profile-avatar-large {
    width: 82px;
    height: 82px;
    border-radius: 22px;
    font-size: 24px;
  }

  .profile-avatar-shell {
    border-radius: 26px;
    padding: 4px;
  }

  .profile-hero-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .role-dashboard-page .role-metric-grid,
  .role-dashboard-page .workflow-list,
  .role-dashboard-page .role-list,
  .role-dashboard-page .profile-summary,
  .role-dashboard-page .quick-action-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .role-dashboard-page .role-metric,
  .role-dashboard-page .workflow-list div,
  .role-dashboard-page .role-list div,
  .role-dashboard-page .profile-summary div,
  .role-dashboard-page .quick-action-list button {
    min-width: 0;
    min-height: 96px;
    align-items: flex-start;
    justify-content: flex-start;
    flex-direction: column;
    gap: 9px;
    padding: 12px;
  }

  .role-dashboard-page .role-metric {
    grid-template-columns: 1fr;
  }

  .role-dashboard-page .profile-summary strong {
    font-size: var(--font-size-sm);
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  .role-dashboard-page .metric-icon,
  .role-dashboard-page .quick-action-icon {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-md);
  }
}

@media (max-width: 520px) {
  body {
    font-size: 15px;
  }

  input,
  select,
  textarea {
    font-size: 16px;
  }

  .dashboard-content {
    padding-inline: 10px;
  }

  .panel,
  .project-card,
  .user-card {
    padding: 15px;
  }

  .daily-summary-grid,
  .role-metric-grid,
  .task-mobile-grid,
  .leave-mobile-grid,
  .expense-mobile-grid {
    grid-template-columns: 1fr;
  }

  .profile-stat-grid,
  .profile-hero-facts,
  .leave-summary-grid,
  .expense-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .leave-hero-copy h2 {
    font-size: 25px;
  }

  .leave-hero-status div,
  .leave-stat-card,
  .leave-mobile-card {
    padding: 12px;
  }

  .stat-card strong,
  .role-metric strong,
  .daily-summary-grid strong {
    font-size: 22px;
  }

  .user-card-selectors {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

@media (max-width: 380px) {
  .role-dashboard-page .role-metric-grid,
  .role-dashboard-page .workflow-list,
  .role-dashboard-page .role-list,
  .role-dashboard-page .profile-summary,
  .role-dashboard-page .quick-action-list,
  .profile-stat-grid,
  .profile-hero-facts,
  .profile-quick-links,
  .profile-hero-actions,
  .leave-hero-status,
  .leave-management-panel .filter-bar,
  .leave-mobile-meta,
  .leave-summary-grid,
  .expense-summary-grid {
    grid-template-columns: 1fr;
  }
}
/* Premium scoped styling for PWA Installation Route */

.install-page {
  background: linear-gradient(180deg, var(--surface-raised) 0%, var(--soft) 100%);
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font-sans);
  padding: 0 0 80px 0;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Header Styling */
.install-header-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.install-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
  color: var(--text-heading);
}

.install-logo-small {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.back-btn {
  background: var(--soft);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
}

.back-btn:hover {
  background: var(--soft-hover);
  color: var(--text-heading);
  transform: translateY(-1px);
}

/* Page Container */
.install-container {
  max-width: 900px;
  margin: 40px auto 0 auto;
  padding: 0 20px;
  width: 100%;
}

/* Hero section with Wow-factor */
.install-hero {
  text-align: center;
  margin-bottom: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.install-app-icon-wrapper {
  position: relative;
  margin-bottom: 24px;
}

.install-app-icon {
  width: 110px;
  height: 110px;
  border-radius: 28px;
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--border);
  transition: transform var(--transition-spring);
}

.install-app-icon:hover {
  transform: scale(1.05) rotate(2deg);
}

.installed-badge {
  position: absolute;
  bottom: -5px;
  right: -5px;
  background: var(--success);
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
  border: 3px solid var(--surface);
  box-shadow: var(--shadow-md);
}

.install-hero h1 {
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: -1px;
  background: linear-gradient(135deg, var(--text-heading) 30%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 16px;
}

.install-lead {
  font-size: 1.15rem;
  color: var(--text-soft);
  max-width: 620px;
  line-height: 1.6;
  margin-bottom: 32px;
}

.install-action-block {
  width: 100%;
  max-width: 500px;
  display: flex;
  justify-content: center;
}

/* Custom CTA Button */
.install-cta-btn {
  background: linear-gradient(135deg, var(--accent) 0%, #6366f1 100%);
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  padding: 16px 36px;
  border-radius: var(--radius-lg);
  border: none;
  box-shadow: 0 10px 25px -5px rgba(79, 70, 229, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: var(--transition-spring);
}

.install-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px -5px rgba(79, 70, 229, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.install-cta-btn:active {
  transform: translateY(1px);
}

.pulse-anim {
  animation: install-cta-pulse 2s infinite;
}

@keyframes install-cta-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.6), 0 10px 25px -5px rgba(79, 70, 229, 0.5);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(79, 70, 229, 0), 0 10px 25px -5px rgba(79, 70, 229, 0.5);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(79, 70, 229, 0), 0 10px 25px -5px rgba(79, 70, 229, 0.5);
  }
}

/* Status Banner boxes */
.status-banner {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 24px;
  border-radius: var(--radius-lg);
  text-align: left;
  width: 100%;
}

.status-banner.success {
  background: var(--success-soft);
  border: 1px solid var(--success-border);
  color: var(--success);
}

.status-banner.info {
  background: var(--accent-soft);
  border: 1px solid rgba(79, 70, 229, 0.25);
  color: var(--accent);
}

.status-icon {
  font-size: 1.4rem;
  font-weight: bold;
}

.status-banner strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 4px;
  color: var(--text-heading);
}

.status-banner p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--text-soft);
}

/* Tabs Section */
.install-tabs-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  margin-bottom: 50px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-lg);
}

.install-tabs-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 24px;
  text-align: center;
  color: var(--text-heading);
}

.install-tabs-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: var(--surface-muted);
  padding: 6px;
  border-radius: var(--radius-md);
  margin-bottom: 28px;
  border: 1px solid var(--border);
}

.install-tab-trigger {
  background: transparent;
  border: none;
  color: var(--muted);
  font-weight: 600;
  padding: 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
  font-size: 0.95rem;
  text-align: center;
}

.install-tab-trigger.active {
  background: var(--surface);
  color: var(--text-heading);
  box-shadow: var(--shadow-sm);
}

.install-tab-trigger:hover:not(.active) {
  color: var(--text-soft);
}

/* Steps list */
.instruction-steps {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.step-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--surface-raised);
  border: 1px solid var(--border);
}

.step-number {
  background: linear-gradient(135deg, var(--accent) 0%, #818cf8 100%);
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.step-detail {
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--text);
}

.step-detail strong {
  color: var(--text-heading);
}

.safari-icon {
  background: var(--surface-muted);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 14px;
  margin: 0 2px;
  color: var(--accent);
}

/* Benefits Section */
.benefits-section {
  margin-bottom: 60px;
  text-align: center;
}

.benefits-section h2, .comparison-section h2 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 32px;
  letter-spacing: -0.5px;
  color: var(--text-heading);
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.benefit-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: left;
  transition: transform var(--transition);
}

.benefit-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}

.benefit-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.benefit-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-heading);
}

.benefit-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-soft);
  line-height: 1.5;
}

/* Comparison Section Table */
.comparison-section {
  text-align: center;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  text-align: left;
}

.comparison-table th {
  background: var(--surface-raised);
  font-weight: 700;
  color: var(--text-heading);
  padding: 16px 24px;
  border-bottom: 1.5px solid var(--border);
  font-size: 0.95rem;
}

.comparison-table td {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
  color: var(--text);
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

.comparison-table tr:hover td {
  background: var(--soft);
}

.comparison-table td.worse {
  color: var(--danger);
  font-weight: 600;
}

.comparison-table td.better {
  color: var(--success);
  font-weight: 600;
}

/* Responsive adjustment */
@media (max-width: 768px) {
  .install-header-nav {
    padding: 16px 20px;
  }
  
  .install-hero h1 {
    font-size: 2.1rem;
  }
  
  .install-lead {
    font-size: 1rem;
  }
  
  .install-tabs-section {
    padding: 20px;
  }
  
  .install-tabs-list {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  
  .benefits-grid {
    grid-template-columns: 1fr;
  }
  
  .comparison-table th, .comparison-table td {
    padding: 12px 14px;
    font-size: 0.85rem;
  }
}
