/* Material Design 3 - Complete System for Key Projects Panel */
@import url('https://fonts.googleapis.com/css2?family=Geist+Mono:wght@400;500&family=Geist:wght@300;400;500;600;700&display=swap');

:root {
  /* Brand Colors */
  --primary: #0b7a3a;
  --primary-dark: #05522a;
  --primary-light: #e8f5ef;
  --primary-lighter: #f0faf7;
  --accent: #d97706;
  --accent-light: #fef3c7;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #dc2626;
  --error-light: #fee2e2;
  
  /* Text Colors */
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --text-tertiary: #6b7280;
  
  /* Background Colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --bg-tertiary: #f3f4f6;
  
  /* Border Colors */
  --border-light: #e5e7eb;
  --border-default: #d1d5db;
  --divider: #e5e7eb;
  
  /* Typography */
  --mono: 'Geist Mono', monospace;
  --sans: 'Geist', sans-serif;
  
  /* Shadows */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  
  /* Radius */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 20px;
  
  /* Transitions */
  --transition-fast: 0.1s ease;
  --transition: 0.15s ease;
  --transition-slow: 0.2s ease;
  
  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  
  /* M3 Motion */
  --md-motion-short: 100ms;
  --md-motion-standard: 200ms;
  --md-motion-long: 300ms;
  --md-motion-ease: cubic-bezier(0.2, 0, 0, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

h1 { font-size: 28px; font-weight: 700; }
h2 { font-size: 20px; font-weight: 600; }
h3 { font-size: 16px; font-weight: 600; }
h4 { font-size: 14px; font-weight: 600; }

p { margin: 0; color: var(--text-secondary); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hidden { display: none !important; }
.invisible { visibility: hidden; }

/* === BUTTONS === */
.btn-m3-filled {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.5rem;
  border: none;
  border-radius: 0.5rem;
  background: var(--primary);
  color: #ffffff;
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--md-motion-standard) var(--md-motion-ease);
  box-shadow: var(--shadow-sm);
}

.btn-m3-filled:hover {
  box-shadow: var(--shadow-md);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.btn-m3-filled:active {
  transform: scale(0.98);
}

.btn-m3-filled:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.btn-m3-outlined {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.5rem;
  border: 1.5px solid var(--border-default);
  border-radius: 0.5rem;
  background: transparent;
  color: var(--primary);
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--md-motion-standard) var(--md-motion-ease);
}

.btn-m3-outlined:hover {
  background: rgba(11, 122, 58, 0.08);
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.btn-m3-outlined:active {
  background: rgba(11, 122, 58, 0.12);
  transform: scale(0.98);
}

.btn-m3-outlined:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.btn-m3-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: none;
  background: transparent;
  color: var(--primary);
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--md-motion-standard) var(--md-motion-ease);
  text-decoration: none;
}

.btn-m3-text:hover {
  background: rgba(11, 122, 58, 0.08);
}

.btn-m3-text:active {
  background: rgba(11, 122, 58, 0.12);
  transform: scale(0.98);
}

.btn-m3-text:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.btn-m3-compact {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  min-width: 2rem;
}

.btn-compact {
  padding: 0.375rem 0.875rem;
  font-size: 0.8125rem;
  min-height: 2.25rem;
}

/* Tab Buttons */
.btn-m3-outlined.tab-btn {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  border-top: 0;
  border-left: 0;
  border-right: 0;
  transition: all var(--md-motion-standard) var(--md-motion-ease);
}

.btn-m3-outlined.tab-btn:hover {
  background: rgba(11, 122, 58, 0.08);
  border-bottom-color: var(--primary);
}

.btn-m3-outlined.tab-btn.active {
  background: transparent;
  border-bottom: 2px solid var(--primary);
  color: var(--primary);
  font-weight: 700;
}

/* === CARDS & SURFACES === */
.card-m3-filled {
  background: var(--bg-secondary);
  border: none;
  border-radius: 0.75rem;
  box-shadow: var(--shadow-xs);
  transition: all var(--md-motion-standard) var(--md-motion-ease);
  padding: 1.5rem;
}

.card-m3-filled:hover {
  box-shadow: var(--shadow-sm);
}

.card-m3-outlined {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: 0.75rem;
  padding: 1.5rem;
  transition: all var(--md-motion-standard) var(--md-motion-ease);
}

.card-m3-outlined:hover {
  border-color: var(--border-default);
  box-shadow: var(--shadow-xs);
}

.card-m3-elevated {
  background: var(--bg-primary);
  border: none;
  border-radius: 0.75rem;
  box-shadow: var(--shadow-md);
  transition: all var(--md-motion-standard) var(--md-motion-ease);
  padding: 1.5rem;
}

.card-m3-elevated:hover {
  box-shadow: var(--shadow-lg);
}

/* === TABLES === */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  background: var(--bg-primary);
}

.table-wrap {
  overflow-x: auto;
  border-radius: inherit;
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
  font-size: 14px;
}

th {
  padding: 1rem;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-weight: 700;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
}

td {
  padding: 1rem;
  border-bottom: 1px solid var(--divider);
  color: var(--text-secondary);
}

tbody tr {
  background: var(--bg-primary);
  transition: background-color var(--transition);
}

tbody tr:hover {
  background: var(--bg-secondary);
}

tbody tr:nth-child(even) {
  background: var(--bg-secondary);
}

tbody tr:nth-child(even):hover {
  background: var(--bg-tertiary);
}

/* === FORMS & INPUTS === */
.input, .input-date, .input-select {
  width: 100%;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.875rem;
  font-size: 14px;
  font-family: var(--sans);
  transition: all var(--transition-fast);
  background: var(--bg-primary);
  color: var(--text-primary);
}

.input::placeholder, .input-date::placeholder {
  color: var(--text-tertiary);
}

.input:focus, .input-date:focus, .input-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(11, 122, 58, 0.1);
}

.form-group {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.form-label {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 14px;
}

/* === DIALOGS & MODALS === */
.dialog-m3-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.32);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.dialog-m3 {
  background: var(--bg-primary);
  border-radius: 1.75rem;
  box-shadow: var(--shadow-xl);
  padding: 1.5rem;
  max-width: 28rem;
  width: 100%;
}

.dialog-m3-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* === SNACKBARS === */
.snackbar-m3 {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 2000;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-radius: 0.5rem;
  background: #323232;
  color: #ffffff;
  box-shadow: var(--shadow-lg);
  font-size: 0.875rem;
  font-weight: 500;
  max-width: 22rem;
  animation: snackbar-slide-in var(--md-motion-standard) var(--md-motion-ease);
}

@keyframes snackbar-slide-in {
  from { transform: translateX(400px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* === CHIPS & BADGES === */
.chip-m3 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: none;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--md-motion-short) var(--md-motion-ease);
}

.chip-m3:hover {
  background: var(--border-light);
}

.chip-m3.active {
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary);
}

.badge-m3 {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.badge-primary {
  background: var(--primary-light);
  color: var(--primary);
}

.badge-success {
  background: #dcfce7;
  color: var(--success);
}

.badge-warning {
  background: var(--accent-light);
  color: var(--warning);
}

.badge-error {
  background: var(--error-light);
  color: var(--error);
}

/* === LAYOUT === */
.page {
  display: flex;
  flex-direction: column;
  width: auto;
  max-width: none;
  margin: 1rem 1rem 2rem calc(250px + 1rem);
  min-height: calc(100vh - 3rem);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-light);
  box-shadow: var(--shadow-xs);
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
}

.panel {
  margin-bottom: 2rem;
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.panel-head {
  margin-bottom: 1.5rem;
}

.section-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--text-primary);
}

.section-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

.section-head-copy {
  display: grid;
  gap: 0.625rem;
  min-width: 0;
}

.section-title-row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-width: 0;
}

.section-title-row .section-title {
  margin: 0;
}

.section-info-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 1px solid var(--border-default);
  border-radius: 999px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.section-info-content {
  display: none;
  gap: 0.5rem;
}

.section-info-content.is-open {
  display: grid;
}

/* === TABS === */
.tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-light);
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 4px;
  margin-left: 0.5rem;
  border-radius: 999px;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
}

.btn-m3-outlined.tab-btn .tab-badge {
  background: var(--primary-light);
  color: var(--primary);
}

/* === GRID & UTILITIES === */
.overview-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  margin-bottom: 1.5rem;
}

.overview-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
}

.overview-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
}

.overview-note {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0.5rem 0 0;
}

.m3-center { display: flex; align-items: center; justify-content: center; }
.m3-flex-between { display: flex; align-items: center; justify-content: space-between; }
.m3-gap-1 { gap: 0.5rem; }
.m3-gap-2 { gap: 1rem; }
.m3-gap-3 { gap: 1.5rem; }
.m3-shadow-sm { box-shadow: var(--shadow-sm); }
.m3-shadow-md { box-shadow: var(--shadow-md); }
.m3-shadow-lg { box-shadow: var(--shadow-lg); }

/* === TEXT & TYPOGRAPHY === */
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }
.text-xs { font-size: 12px; }
.text-sm { font-size: 13px; }
.text-base { font-size: 14px; }
.text-lg { font-size: 16px; }
.text-xl { font-size: 20px; }

/* === SPACING === */
.p-1 { padding: var(--space-1); }
.p-2 { padding: var(--space-2); }
.p-3 { padding: var(--space-3); }
.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }

.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }

.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .page {
    width: calc(100vw - 1rem);
    margin: 0.5rem auto 1rem;
    margin-left: 0.5rem;
    margin-right: 0.5rem;
  }

  .page {
    margin-left: calc(72px + 0.5rem);
  }

  .sidebar--collapsed ~ .page {
    margin-left: calc(72px + 0.5rem);
  }

  .topbar {
    padding: 0.5rem 0.75rem;
    margin-bottom: 1rem;
  }

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

  .overview-columns--ai {
    grid-template-columns: 1fr;
  }

  th, td {
    padding: 0.75rem;
    font-size: 12px;
  }

  .btn-m3-filled, .btn-m3-outlined {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
  }

  .forecast-controls {
    align-items: stretch;
    gap: 0.75rem;
  }

  .forecast-controls .th-filter-wrap,
  .forecast-count,
  .forecast-sort,
  .forecast-custom-period {
    width: 100%;
    min-height: auto;
  }

  .forecast-reset-btn {
    margin-left: 0;
    width: fit-content;
  }

  .forecast-custom-period {
    display: grid;
    grid-template-columns: auto 1fr;
  }

  .forecast-custom-period .btn-m3-filled {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .section-title-row {
    align-items: flex-start;
  }

  .section-info-toggle {
    margin-top: 0.125rem;
  }

  .section-info-content {
    gap: 0.625rem;
  }

  .table-wrapper,
  .table-wrap {
    overflow: visible;
    border-radius: 0;
    border: none;
    background: transparent;
  }

  .dashboard-table,
  .dashboard-table thead,
  .dashboard-table tbody,
  .dashboard-table tr,
  .dashboard-table th,
  .dashboard-table td {
    display: block;
    width: 100%;
  }

  .dashboard-table thead {
    display: none;
  }

  .dashboard-table tbody {
    display: grid;
    gap: 0.875rem;
  }

  .dashboard-table tbody tr {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    background: var(--bg-primary) !important;
    box-shadow: var(--shadow-xs);
    overflow: hidden;
  }

  .dashboard-table tbody td {
    display: grid;
    grid-template-columns: minmax(112px, 40%) 1fr;
    gap: 0.75rem;
    align-items: start;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.8125rem;
  }

  .dashboard-table tbody td::before {
    content: attr(data-label);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    white-space: normal;
  }

  .dashboard-table tbody tr:last-child td:last-child {
    border-bottom: none;
  }

  .stats-table tbody td {
    width: 100% !important;
    grid-template-columns: minmax(132px, 42%) minmax(0, 1fr);
  }

  .stats-table tbody td::before {
    overflow-wrap: normal;
    word-break: normal;
  }

  .dashboard-table .cell-amount,
  .dashboard-table .cell-rate {
    text-align: left;
  }

  .login-shell {
    padding: 1rem 0.75rem;
  }

  .login-card {
    max-width: 100%;
    padding: 1rem;
    border-radius: 1.25rem;
  }

  .login-brand {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .login-title {
    font-size: 1.625rem;
  }

  .users-page {
    width: calc(100vw - 1rem);
    margin: 0.5rem auto 1rem;
  }

  .users-topbar {
    border-radius: 1rem;
    padding: 0.875rem 1rem;
  }

  .users-topbar-main {
    grid-template-columns: 1fr;
    gap: 0.875rem;
  }

  .topbar-divider,
  .topbar-spacer {
    display: none;
  }

  .topbar-meta--inline-stack {
    justify-self: start;
    width: 100%;
  }

  .topbar-meta {
    width: 100%;
    flex-direction: column;
  }

  .meta-card {
    min-width: 0;
  }

  .section-main-title {
    font-size: 1.5rem;
  }

  .section-heading {
    align-items: flex-start;
  }

  .users-grid,
  .admin-overview-columns {
    grid-template-columns: 1fr;
  }

  .inline-form,
  .personal-tabs,
  .overview-actions,
  .users-nav {
    width: 100%;
  }

  .users-nav .tab-btn,
  .overview-actions .tab-btn,
  .inline-form .btn-m3-filled,
  .inline-form .btn-m3-outlined {
    width: 100%;
    justify-content: center;
  }

  .field-inline {
    width: 100%;
  }

  .field-inline .input,
  .field-inline .input-select,
  .field-inline .input-compact {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* === SIDEBAR === */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  width: 250px;
  background: var(--bg-primary);
  border-right: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  overflow-y: auto;
  z-index: 99;
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  padding: 1rem;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
}

.sidebar-brand {
  display: flex;
  align-items: center;
}

.sidebar-logo {
  max-width: 100%;
  height: auto;
  max-height: 44px;
  object-fit: contain;
}

.sidebar-logo--mini {
  display: none;
  max-height: 38px;
}

.sidebar-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sidebar-user {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  padding: 0.5rem 1rem;
}

.sidebar-user-email {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  word-break: break-all;
}

.sidebar-user-role {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
}

.sidebar-logout {
  color: var(--error);
}

.sidebar-logout:hover {
  background: var(--error-light);
  color: var(--error);
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all var(--md-motion-standard) var(--md-motion-ease);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.sidebar-item:hover {
  background: rgba(11, 122, 58, 0.08);
  color: var(--primary);
}

.sidebar-item.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

.sidebar-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* === DROPDOWNS & FILTERS === */
.filter-dropdown {
  position: absolute;
  z-index: 1000;
  min-width: 200px;
  max-height: 320px;
  overflow-y: auto;
  padding: 0.5rem 0;
  background: var(--bg-primary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: background-color var(--transition);
  font-size: 14px;
}

.filter-option:hover {
  background: var(--bg-secondary);
}

.filter-option input[type="checkbox"],
.filter-option input[type="radio"] {
  accent-color: var(--primary);
  cursor: pointer;
}

.filter-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--md-motion-short) var(--md-motion-ease);
}

.filter-icon-btn:hover {
  color: var(--primary);
}

.filter-icon-btn--active {
  color: var(--primary);
}

/* === PERIOD CONTROLS === */
.forecast-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.absences-controls {
  margin-top: 1.25rem;
}

.absences-table-wrapper {
  margin-top: 1.25rem;
}

.forecast-controls > * {
  min-height: 2.5rem;
}

.forecast-controls .th-filter-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.5rem;
  align-self: center;
}

.forecast-period-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1;
}

.forecast-count {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

.forecast-custom-period {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  flex-wrap: wrap;
}

.custom-period-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-tertiary);
}

.forecast-sort {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.5rem;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.forecast-sort-label {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
}

.forecast-reset-btn {
  margin-left: 0.5rem;
  min-height: 2.25rem;
  padding-inline: 0.875rem;
}

/* === PAGINATION === */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.pagination-info {
  font-size: 13px;
  color: var(--text-secondary);
  margin-right: 1rem;
}

.pagination-buttons {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.pagination-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--bg-secondary);
}

.pagination-panel .pagination-info {
  margin-right: 0;
}

.pagination-panel .pagination-buttons {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pagination-dots {
  padding: 0 0.5rem;
  color: var(--text-tertiary);
}

.pf1c-summary-grid {
  margin-bottom: 1.5rem;
}

.pf1c-subpane + .pf1c-subpane {
  margin-top: 1rem;
}

.pf1c-manager-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.pf1c-manager-option .filter-option {
  flex: 1;
}

.pf1c-compare-btn {
  padding: 0.25rem 0.5rem;
  white-space: nowrap;
  color: var(--text-secondary);
}

.pf1c-compare-btn svg {
  flex-shrink: 0;
}

.pf1c-compare-btn--active {
  background: rgba(11, 122, 58, 0.1);
  color: var(--primary);
}

.pf1c-compare-grid {
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.pf1c-compare-card {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.pf1c-compare-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.pf1c-compare-card-title {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pf1c-remove-compare-btn {
  flex-shrink: 0;
}

.pf1c-compare-metric {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.pf1c-compare-bar {
  width: 100%;
  height: 0.75rem;
  border-radius: 999px;
  background: var(--bg-tertiary);
  overflow: hidden;
}

.pf1c-compare-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--success) 100%);
}

.pf1c-compare-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.8125rem;
}

/* === COMMENTS & EXPANDABLE === */
.comment-cell {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.comment-preview {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
  line-height: 1.4;
}

.comment-preview--expanded {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}

.comment-toggle {
  align-self: flex-start;
  padding: 0.25rem 0.5rem;
  background: transparent;
  border: none;
  color: var(--primary);
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
}

.comment-toggle:hover {
  color: var(--primary-dark);
}

.person-two-lines {
  display: inline-block;
  white-space: pre-line;
  line-height: 1.3;
}

/* === STATUS & STATES === */
.empty-state {
  text-align: center;
  padding: 3rem 2rem;
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.empty-state-message {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 400px;
  margin: 0 auto 1.5rem;
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* === ALERTS === */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  border: 1px solid;
}

.alert-success {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}

.alert-warning {
  background: #fffbeb;
  border-color: #fed7aa;
  color: #78350f;
}

.alert-error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.alert-info {
  background: var(--primary-lighter);
  border-color: var(--primary-light);
  color: var(--primary);
}

/* === ANALYTICS & STATS === */
.analytics-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
}

.analytics-row:last-child {
  border-bottom: none;
}

.analytics-row--compact {
  font-size: 12px;
  padding: 0.5rem 0;
}

.analytics-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 1.5rem;
}

.overview-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

/* === FORMS - RATES === */
.rates-form {
  display: grid;
  gap: 1.5rem;
}

.rates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.rates-card {
  padding: 2rem;
  border-radius: 1.5rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 248, 252, 0.94)),
    var(--bg-secondary);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.06);
}

.rate-card {
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 1.25rem;
  padding: 1.25rem;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.rate-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-light);
  gap: 0.75rem;
}

.rate-updated {
  font-size: 12px;
  color: var(--text-tertiary);
  text-align: right;
}

.rate-field {
  display: grid;
  gap: 0.5rem;
}

.rate-field > span {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.rates-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.rates-note {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin: 0;
}

.rates-actions .btn-m3-filled {
  width: 100%;
  min-height: 3rem;
  border-radius: 0.875rem;
  font-size: 1rem;
}

/* === CURRENCY BADGES === */
.currency-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.5rem;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-radius: 0.25rem;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.currency-badge--foreign {
  background: var(--accent-light);
  color: var(--accent);
}

/* === TABLE HEADER FILTERS === */
.th-filter-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.th-filter-wrap--nowrap {
  gap: 0.375rem;
}

/* === FOOTER === */
.page-footer {
  margin-top: auto;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
  font-size: 12px;
  color: var(--text-tertiary);
  text-align: center;
}

.page-footer-row {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.page-footer-divider {
  color: var(--border-default);
}

/* === VISIBILITY & UTILITIES === */
.text-center { text-align: center; }
.text-right { text-align: right; }
.no-select { user-select: none; }
.cursor-pointer { cursor: pointer; }
.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }

/* === ACCESSIBILITY === */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

button:disabled,
a[aria-disabled="true"] {
  opacity: 0.6;
  cursor: not-allowed;
}

a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

a:hover {
  text-decoration: underline;
}

/* === LOGIN PAGE === */
.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
  background:
    radial-gradient(circle at top left, rgba(11, 122, 58, 0.08), transparent 32%),
    radial-gradient(circle at top right, rgba(217, 119, 6, 0.08), transparent 28%),
    linear-gradient(180deg, #f6f8fb 0%, #eef3f8 100%);
}

.login-card {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem 1.25rem;
  border-radius: 1.5rem;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
}

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.875rem;
  padding: 0.25rem 0 0.5rem;
}

.login-logo {
  max-height: 64px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.login-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1.15;
  text-align: center;
}

.login-form-panel {
  padding: 1.375rem;
  border-radius: 1.375rem;
  border: 1px solid rgba(11, 122, 58, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 248, 252, 0.92)),
    var(--bg-secondary);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    0 10px 28px rgba(15, 23, 42, 0.04);
}

.login-form-head {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 1.125rem;
  align-items: center;
  text-align: center;
}

.login-form-title {
  margin: 0;
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.login-actions {
  margin-top: 0.75rem;
}

.login-actions .btn-m3-filled {
  width: 100%;
  min-height: 3.25rem;
  border-radius: 1rem;
  font-size: 1rem;
}

.error-text {
  color: var(--error);
  font-size: 13px;
  margin: 0.25rem 0 0;
}

/* === FORM ROWS === */
.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  margin-bottom: 1rem;
}

.form-row label,
.form-row > span {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-row label,
.form-row > span {
  letter-spacing: 0.01em;
}

.input,
.input-date,
.input-select {
  border-radius: 1rem;
  min-height: 3.25rem;
  padding: 0.875rem 1rem;
  border-width: 1.5px;
  background: rgba(255, 255, 255, 0.92);
}

.input:focus,
.input-date:focus,
.input-select:focus {
  box-shadow: 0 0 0 4px rgba(11, 122, 58, 0.08);
}

.input-compact {
  min-height: 2.625rem;
  padding: 0.625rem 0.875rem;
  border-radius: 0.875rem;
  font-size: 0.875rem;
}

/* === GENERIC CARD (alias for plain .card usages) === */
.card {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: box-shadow var(--md-motion-standard) var(--md-motion-ease);
}

.card:hover {
  box-shadow: var(--shadow-xs);
}

/* === OVERVIEW CARDS === */
.overview-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.overview-card .overview-label,
.overview-card .overview-value {
  display: block;
}

.overview-value {
  display: block;
  word-break: break-word;
  line-height: 1.15;
}

/* Значение метрики на отдельной строке, полностью видно */
.overview-card--metric .overview-value {
  font-size: 26px;
  margin-top: 0.125rem;
}

.overview-ai-focus {
  margin-top: 2rem;
}

.overview-analytics {
  margin-top: 2.75rem;
}

.overview-analytics .panel-head {
  padding-top: 0.5rem;
}

.overview-columns--ai {
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.85fr);
  align-items: start;
}

.overview-columns--ai > * {
  min-width: 0;
}

.ai-focus-card {
  min-width: 0;
  min-height: 100%;
  overflow: hidden;
}

.ai-focus-summary {
  margin: 0;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-primary);
}

.ai-focus-highlight {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.375rem 0.75rem;
  align-items: start;
}

.ai-focus-highlight small {
  grid-column: 1 / -1;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  line-height: 1.45;
}

.ai-focus-brief-list {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.75rem;
  color: var(--text-primary);
}

.ai-focus-brief-list li {
  line-height: 1.55;
}

.updates-daily-history {
  display: grid;
  gap: 16px;
}

.updates-daily-report {
  overflow: hidden;
}

.updates-daily-report__summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.updates-daily-report__summary::-webkit-details-marker {
  display: none;
}

.updates-daily-report__title {
  margin: 0;
}

.updates-daily-report__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
}

.updates-daily-report__toggle .material-symbols-outlined {
  font-size: 1.375rem;
  transition: transform 0.2s ease;
}

.updates-daily-report[open] .updates-daily-report__toggle .material-symbols-outlined {
  transform: rotate(180deg);
}

.updates-daily-report__content {
  margin-top: 16px;
}

@media (max-width: 768px) {
  .updates-daily-report__summary {
    flex-direction: column;
    align-items: flex-start;
  }

  .updates-daily-report__toggle {
    width: 100%;
    justify-content: space-between;
  }
}

.overview-amount {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

/* Иконка валюты рубля вместо текста RUB */
.currency-rub-icon {
  font-size: 22px;
  line-height: 1;
  vertical-align: -0.15em;
  color: inherit;
}

.currency-rub-icon--sm {
  font-size: 16px;
}

/* === ATTENTION BLOCK (Требуют внимания) === */
.overview-attention {
  margin-top: 2rem;
}

.overview-attention .panel-head {
  padding: 0.5rem 0.5rem 0;
  margin-bottom: 1.25rem;
}

.overview-columns--attention {
  margin-top: 0;
}

.analytics-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.analytics-sublist {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* === ADMIN / STATS NAV === */
.admin-nav {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-light);
  overflow-x: auto;
  scrollbar-width: none;
  flex-wrap: wrap;
}

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

/* === ADMIN PAGE === */
.users-page {
  width: min(1520px, calc(100vw - 2rem));
  margin: 1rem auto 2rem;
  min-height: calc(100vh - 3rem);
}

.users-topbar {
  position: relative;
  border-radius: 1.5rem;
  padding: 1rem 1.25rem;
  background:
    linear-gradient(135deg, rgba(11, 122, 58, 0.06), rgba(255, 255, 255, 0) 40%),
    var(--bg-primary);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.05);
}

.users-topbar-main {
  display: grid;
  grid-template-columns: auto auto minmax(220px, 1fr) auto;
  align-items: center;
  gap: 1rem;
}

.topbar-brand {
  display: flex;
  align-items: center;
}

.brand-logo {
  max-height: 44px;
  width: auto;
  object-fit: contain;
}

.topbar-divider {
  width: 1px;
  height: 2.75rem;
  background: var(--border-light);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--text-primary);
}

.topbar-subtitle {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.topbar-spacer {
  min-width: 0;
}

.topbar-meta {
  display: flex;
  gap: 0.75rem;
  align-items: stretch;
}

.topbar-meta--inline-stack {
  justify-self: end;
}

.meta-card {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 140px;
  padding: 0.75rem 0.875rem;
  border-radius: 1rem;
  background: color-mix(in srgb, var(--primary-light) 28%, white 72%);
  border: 1px solid rgba(11, 122, 58, 0.08);
}

.meta-card strong {
  font-size: 0.9375rem;
  color: var(--text-primary);
}

.meta-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.section-shell {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.section-heading-main {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.section-main-title {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.section-metrics {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.section-metric {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0.875rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
}

.section-metric strong {
  font-size: 0.9375rem;
}

.section-metric-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.users-nav,
.overview-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.overview-actions .tab-btn,
.users-nav .tab-btn {
  border-radius: 999px;
}

.admin-overview-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.admin-overview-columns {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.overview-list {
  display: grid;
  gap: 0.875rem;
  margin: 0;
}

.overview-list div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.875rem;
  border-top: 1px solid var(--border-light);
}

.overview-list dt {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
}

.overview-list dd {
  margin: 0;
  font-weight: 600;
  color: var(--text-primary);
  text-align: right;
}

.users-status {
  padding: 1rem 1.125rem;
}

.users-status--success {
  background: #eefbf3;
  color: #166534;
}

.users-status--error {
  background: #fff1f2;
  color: #b42318;
}

.users-panel {
  border: 1px solid var(--border-light);
  border-radius: 1.5rem;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.04);
}

.users-panel .admin-nav {
  margin-bottom: 1.75rem;
}

.users-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
}

.users-card {
  border-radius: 1.5rem;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.04);
}

.panel-head--compact {
  margin-bottom: 1rem;
}

.users-form {
  display: grid;
  gap: 0.875rem;
}

.field-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.user-actions {
  display: grid;
  gap: 0.75rem;
}

.inline-form {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex-wrap: wrap;
}

.personal-tabs {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex-wrap: wrap;
}

.users-table td,
.users-table th {
  vertical-align: top;
}

.cell-mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.cell-email {
  word-break: break-word;
}

.muted {
  color: var(--text-tertiary);
}

.users-hint {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
}

.admin-sync-card {
  display: grid;
  gap: 1rem;
}

.admin-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.admin-summary-card {
  padding: 1rem 1.125rem;
  border-radius: 1.25rem;
  background: color-mix(in srgb, var(--bg-secondary) 82%, white 18%);
  border: 1px solid var(--border-light);
}

.rates-status {
  margin: 0;
  font-weight: 600;
  color: var(--text-secondary);
}

/* === DASHBOARD TABLE POLISH (M3) === */
.dashboard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  table-layout: fixed;
  background: var(--bg-primary);
}

.dashboard-table thead th {
  background: color-mix(in srgb, var(--bg-tertiary) 78%, white 22%);
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: left;
  padding: 1rem 1.125rem;
  border-bottom: 1px solid var(--border-light);
  white-space: normal;
  vertical-align: middle;
}

.dashboard-table tbody td {
  padding: 1rem 1.125rem;
  border-bottom: 1px solid var(--divider);
  color: var(--text-primary);
  vertical-align: top;
  overflow-wrap: anywhere;
}

.dashboard-table tbody tr:last-child td {
  border-bottom: none;
}

.dashboard-table tbody tr {
  transition: background-color var(--md-motion-short) var(--md-motion-ease);
}

.dashboard-table tbody tr:nth-child(even) {
  background: color-mix(in srgb, var(--bg-secondary) 72%, white 28%);
}

.dashboard-table tbody tr:hover {
  background: color-mix(in srgb, var(--primary-light) 38%, white 62%);
}

.cell-amount {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
  text-align: right;
}

.cell-rate,
.cell-currency {
  white-space: nowrap;
}

.cell-date--stacked {
  white-space: normal;
}

.date-stack {
  display: inline-flex;
  flex-direction: column;
  gap: 0.125rem;
  line-height: 1.3;
  white-space: normal;
}

.date-stack-primary,
.date-stack-secondary {
  display: block;
}

.date-stack-secondary {
  color: var(--text-secondary);
}

.cell-comment,
.cell-wrap {
  min-width: 0;
}

.stats-table .cell-amount,
.stats-table td:last-child {
  font-variant-numeric: tabular-nums;
}

.stats-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.875rem;
}

.stats-table-badges {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.stats-table-actions {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.stats-filter-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.625rem;
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
}

.stats-sort-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.stats-sort-caption {
  color: var(--on-surface-variant);
}

.stats-sort-label {
  color: var(--primary);
  font-weight: 700;
}

.stats-table {
  table-layout: fixed;
}

.stats-table thead th:nth-child(1),
.stats-table tbody td:nth-child(1) {
  width: 25%;
}

.stats-table thead th:nth-child(2),
.stats-table tbody td:nth-child(2) {
  width: 35%;
}

.stats-table thead th:nth-child(3),
.stats-table tbody td:nth-child(3) {
  width: 14%;
}

.stats-table thead th:nth-child(4),
.stats-table tbody td:nth-child(4) {
  width: 26%;
}

.stats-table thead th:nth-child(3),
.stats-table thead th:nth-child(4),
.stats-table tbody td:nth-child(3),
.stats-table tbody td:nth-child(4) {
  text-align: right;
}

/* === TRIPS TABLE === */
#trips-table {
  table-layout: auto;
  font-size: 13px;
}

/* Wide business tables use explicit column proportions on desktop.
   This keeps them full-width without horizontal scroll. */
#sales-pane-key .dashboard-table,
#forecast-table,
#projects .dashboard-table,
#planfact-table,
#reclamations .dashboard-table,
#trips-table {
  table-layout: fixed;
}

#sales-pane-key col.col-department { width: 10%; }
#sales-pane-key col.col-name { width: 12%; }
#sales-pane-key col.col-company { width: 7%; }
#sales-pane-key col.col-owner { width: 12%; }
#sales-pane-key col.col-date { width: 7.5%; }
#sales-pane-key col.col-stage { width: 12%; }
#sales-pane-key col.col-amount { width: 9%; }
#sales-pane-key col.col-currency { width: 7%; }
#sales-pane-key col.col-rate { width: 5%; }
#sales-pane-key col.col-comment { width: 10%; }

#forecast-table col.col-department { width: 10%; }
#forecast-table col.col-name { width: 15%; }
#forecast-table col.col-company { width: 10%; }
#forecast-table col.col-owner { width: 12%; }
#forecast-table col.col-date { width: 8%; }
#forecast-table col.col-stage { width: 12%; }
#forecast-table col.col-amount { width: 9%; }
#forecast-table col.col-currency { width: 7%; }
#forecast-table col.col-rate { width: 5%; }
#forecast-table col.col-comment { width: 12%; }

#projects col.col-department { width: 10%; }
#projects col.col-company { width: 12%; }
#projects col.col-project-number { width: 8%; }
#projects col.col-name { width: 16%; }
#projects col.col-date { width: 9%; }
#projects col.col-date-contract { width: 9%; }
#projects col.col-stage { width: 12%; }
#projects col.col-amount { width: 8%; }
#projects col.col-currency { width: 6%; }
#projects col.col-rate { width: 5%; }
#projects col.col-amount-rub { width: 9%; }
#projects col.col-owner { width: 10%; }
#projects col.col-comment { width: 11%; }

#planfact-table col.col-owner { width: 14%; }
#planfact-table col.col-company { width: 13%; }
#planfact-table col.col-project-number { width: 9%; }
#planfact-table col.col-amount { width: 8.5%; }
#planfact-table col.col-date { width: 8.5%; }

#reclamations col.col-department { width: 10%; }
#reclamations col.col-owner { width: 14%; }
#reclamations col.col-name { width: 20%; }
#reclamations col.col-company { width: 14%; }
#reclamations col.col-date { width: 11%; }
#reclamations col.col-amount { width: 10%; }
#reclamations col.col-currency { width: 8%; }
#reclamations col.col-rate { width: 4%; }

#sales-pane-key .cell-comment,
#forecast-table .cell-comment,
#projects .cell-comment,
#planfact-table .cell-comment,
#reclamations .cell-comment,
#trips-table .cell-comment {
  overflow-wrap: break-word;
  word-break: normal;
}

.projects-rub-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
}

.projects-rub-th {
  min-width: 9rem;
}

.projects-financial-toggle {
  border: 1px solid var(--outline);
  border-radius: 0.5rem;
  background: var(--surface-container-low);
  color: var(--on-surface);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  min-width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  cursor: pointer;
  flex: 0 0 auto;
}

.projects-financial-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.sales-key-rub-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
}

.sales-key-rub-th {
  min-width: 9rem;
}

.sales-key-financial-toggle {
  border: 1px solid var(--outline);
  border-radius: 0.5rem;
  background: var(--surface-container-low);
  color: var(--on-surface);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  min-width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  cursor: pointer;
  flex: 0 0 auto;
}

.sales-key-financial-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.sales-forecast-rub-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
}

.sales-forecast-rub-th {
  min-width: 9rem;
}

.sales-forecast-financial-toggle {
  border: 1px solid var(--outline);
  border-radius: 0.5rem;
  background: var(--surface-container-low);
  color: var(--on-surface);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  min-width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  cursor: pointer;
  flex: 0 0 auto;
}

.sales-forecast-financial-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.reclamations-rub-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
}

.reclamations-rub-th {
  min-width: 9rem;
}

.reclamations-financial-toggle {
  border: 1px solid var(--outline);
  border-radius: 0.5rem;
  background: var(--surface-container-low);
  color: var(--on-surface);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  min-width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  cursor: pointer;
  flex: 0 0 auto;
}

.reclamations-financial-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
}

#trips-table col.col-name { width: 11%; }
#trips-table col.col-owner { width: 8%; }
#trips-table col.col-company { width: 9%; }
#trips-table col.col-stage { width: 7%; }
#trips-table col.col-comment { width: 10%; }
#trips-table col.col-date { width: 8%; }
#trips-table col.col-amount { width: 8%; }

#trips-table thead th,
#trips-table tbody td {
  padding: 0.875rem 0.75rem;
  vertical-align: top;
}

#trips-table .cell-date,
#trips-table td:last-child {
  white-space: nowrap;
}

#trips-table .cell-destination,
#trips-table .cell-comment,
#trips-table td:nth-child(1),
#trips-table td:nth-child(3),
#trips-table td:nth-child(4),
#trips-table td:nth-child(6),
#trips-table td:nth-child(7),
#trips-table td:nth-child(11) {
  overflow-wrap: break-word;
  word-break: normal;
}

#trips-table .comment-preview {
  -webkit-line-clamp: 2;
}

.trip-daterange {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  line-height: 1.35;
}

.trip-daterange-from,
.trip-daterange-to {
  display: block;
}

.trip-money {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  align-items: flex-end;
}

.trip-money-line {
  display: inline-flex;
  align-items: baseline;
  gap: 0.25rem;
  white-space: nowrap;
}

.trip-money-label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
}

.trip-money-value {
  display: inline-flex;
  align-items: center;
  gap: 0.125rem;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.trip-money-amount {
  display: inline-block;
}

.trip-money-currency {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.trip-currency-icon {
  font-size: 1rem;
  line-height: 1;
  color: var(--text-secondary);
}

.panel-summary {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.125rem;
}

.summary-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
}

/* === SIDEBAR COLLAPSIBLE === */
.sidebar--collapsed {
  width: 72px;
}

.sidebar--collapsed .sidebar-label,
.sidebar--collapsed .sidebar-title,
.sidebar--collapsed .sidebar-user {
  display: none;
}

.sidebar--collapsed .sidebar-header {
  align-items: center;
  padding: 1rem 0.5rem;
}

.sidebar--collapsed .sidebar-logo {
  max-height: 36px;
}

.sidebar--collapsed .sidebar-logo--full {
  display: none;
}

.sidebar--collapsed .sidebar-logo--mini {
  display: block;
  max-height: 34px;
}

.sidebar--collapsed .sidebar-item {
  justify-content: center;
  padding: 0.75rem;
}

.sidebar--collapsed .sidebar-footer {
  align-items: center;
}

.sidebar--collapsed ~ .page {
  width: auto;
  margin-left: calc(72px + 1rem);
}


/* ПФ/Отчет 1С - карточка "В реализации" */
.pf1c-in-progress-card {
  background-color: #323232 !important;
  background: #323232 !important;
  color: #ffffff !important;
}

.pf1c-in-progress-card.card-m3-filled {
  background-color: #323232 !important;
  background: #323232 !important;
}

.pf1c-in-progress-card .overview-label {
  color: #ffffff !important;
}

.pf1c-in-progress-card .overview-value {
  color: #ffffff !important;
}

.pf1c-in-progress-card .overview-note {
  color: #e0e0e0 !important;
}

/* === Отчет РП (вкладка pm_report) === */
.pm-focus-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(280px, 0.9fr);
  gap: 20px;
  margin-bottom: 20px;
  padding: 24px 28px;
  border: 1px solid rgba(11, 122, 58, 0.12);
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(217, 119, 6, 0.12), transparent 32%),
    linear-gradient(135deg, #f4fbf7 0%, #ffffff 62%);
  overflow: hidden;
}

.pm-focus-hero::after {
  content: "";
  position: absolute;
  right: -48px;
  top: -48px;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background: rgba(11, 122, 58, 0.08);
  filter: blur(4px);
}

.pm-focus-copy,
.pm-focus-highlight {
  position: relative;
  z-index: 1;
}

.pm-focus-copy {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pm-focus-eyebrow {
  display: inline-flex;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(11, 122, 58, 0.10);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pm-focus-name {
  font-size: 34px;
  line-height: 1;
}

.pm-focus-description {
  max-width: 760px;
  font-size: 15px;
  line-height: 1.6;
}

.pm-focus-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pm-focus-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid rgba(11, 122, 58, 0.14);
  color: var(--text-primary);
  font-weight: 600;
  box-shadow: var(--shadow-xs);
}

.pm-focus-chip--muted {
  color: var(--text-secondary);
}

.pm-focus-highlight {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(11, 122, 58, 0.96) 0%, rgba(5, 82, 42, 0.96) 100%);
  color: #ffffff;
  box-shadow: var(--shadow-lg);
}

.pm-focus-highlight-label {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pm-focus-highlight-value {
  font-size: 36px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.pm-focus-highlight-note {
  color: rgba(255, 255, 255, 0.84);
  font-size: 14px;
}

.pm-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.pm-summary-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  border: 1px solid var(--border-light);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbfa 100%);
}

.pm-summary-card-label {
  color: var(--text-tertiary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pm-summary-card-value {
  font-size: 28px;
  line-height: 1;
}

.pm-summary-card-note {
  color: var(--text-secondary);
  font-weight: 500;
}

.pm-toolbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  align-items: end;
  margin-bottom: 20px;
}
.pm-toolbar-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pm-toolbar-reset {
  justify-self: start;
}
.pm-table-block {
  margin-top: 24px;
}
.pm-table-block--spaced {
  margin-top: 40px;
}
.pm-table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.pm-table-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pm-table-summary {
  color: var(--text-secondary);
  font-size: 13px;
}

.pm-kpi-card {
  position: relative;
  overflow: hidden;
}

.pm-kpi-card::after {
  content: "";
  position: absolute;
  inset: auto -40px -60px auto;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: rgba(11, 122, 58, 0.08);
  opacity: 0;
  transition: opacity var(--md-motion-standard) var(--md-motion-ease);
}

.pm-kpi-card--accent {
  background: linear-gradient(145deg, #0b7a3a 0%, #0f8c45 100%);
  color: #ffffff;
  box-shadow: 0 16px 36px rgba(11, 122, 58, 0.22);
}

.pm-kpi-card--accent::after {
  opacity: 1;
  background: rgba(255, 255, 255, 0.12);
}

.pm-kpi-card--accent .overview-label,
.pm-kpi-card--accent .overview-note,
.pm-kpi-card--accent .overview-value {
  color: #ffffff;
}

.pm-empty-cell {
  padding: 0 !important;
}

.pm-empty-state {
  display: grid;
  gap: 8px;
  place-items: center;
  min-height: 160px;
  padding: 24px;
  text-align: center;
  background: linear-gradient(180deg, rgba(11, 122, 58, 0.03) 0%, rgba(11, 122, 58, 0.00) 100%);
}

.pm-empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(11, 122, 58, 0.08);
  color: var(--primary);
  font-size: 24px;
  font-weight: 700;
}

.pm-empty-state strong {
  font-size: 16px;
}

.pm-empty-state p {
  max-width: 520px;
}

.pm-report--employee-focused .pm-focus-hero {
  border-color: rgba(11, 122, 58, 0.18);
  box-shadow: var(--shadow-md);
}

@media (max-width: 1180px) {
  .pm-focus-hero,
  .pm-summary-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .pm-focus-hero {
    padding: 20px;
    border-radius: 20px;
  }

  .pm-focus-name {
    font-size: 28px;
  }
}

@media print {
  @page {
    size: A4 landscape;
    margin: 10mm;
  }

  body.pm-report-print-mode,
  body.sales-key-print-mode,
  body.sales-closed-print-mode,
  body.projects-key-print-mode {
    background: #ffffff;
  }

  body.pm-report-print-mode #update-toast,
  body.pm-report-print-mode .snackbar-m3,
  body.sales-key-print-mode #update-toast,
  body.sales-key-print-mode .snackbar-m3,
  body.sales-closed-print-mode #update-toast,
  body.sales-closed-print-mode .snackbar-m3,
  body.projects-key-print-mode #update-toast,
  body.projects-key-print-mode .snackbar-m3 {
    display: none !important;
  }

  body.pm-report-print-mode .mobile-page-bar,
  body.pm-report-print-mode .mobile-ui-backdrop,
  body.pm-report-print-mode .mobile-sidebar-shell,
  body.pm-report-print-mode .mobile-sidebar-utilities,
  body.pm-report-print-mode .mobile-sidebar-head,
  body.pm-report-print-mode .mobile-sidebar-scroll,
  body.sales-key-print-mode .mobile-page-bar,
  body.sales-key-print-mode .mobile-ui-backdrop,
  body.sales-key-print-mode .mobile-sidebar-shell,
  body.sales-key-print-mode .mobile-sidebar-utilities,
  body.sales-key-print-mode .mobile-sidebar-head,
  body.sales-key-print-mode .mobile-sidebar-scroll,
  body.sales-closed-print-mode .mobile-page-bar,
  body.sales-closed-print-mode .mobile-ui-backdrop,
  body.sales-closed-print-mode .mobile-sidebar-shell,
  body.sales-closed-print-mode .mobile-sidebar-utilities,
  body.sales-closed-print-mode .mobile-sidebar-head,
  body.sales-closed-print-mode .mobile-sidebar-scroll,
  body.projects-key-print-mode .mobile-page-bar,
  body.projects-key-print-mode .mobile-ui-backdrop,
  body.projects-key-print-mode .mobile-sidebar-shell,
  body.projects-key-print-mode .mobile-sidebar-utilities,
  body.projects-key-print-mode .mobile-sidebar-head,
  body.projects-key-print-mode .mobile-sidebar-scroll {
    display: none !important;
  }

  body.pm-report-print-mode > .sidebar,
  body.pm-report-print-mode > .page > .section-shell > :not(#pm_report),
  body.sales-key-print-mode > .sidebar,
  body.sales-key-print-mode > .page > .section-shell > :not(#sales),
  body.sales-closed-print-mode > .sidebar,
  body.sales-closed-print-mode > .page > .section-shell > :not(#sales),
  body.projects-key-print-mode > .sidebar,
  body.projects-key-print-mode > .page > .section-shell > :not(#projects) {
    display: none !important;
  }

  body.pm-report-print-mode > .page,
  body.sales-key-print-mode > .page,
  body.sales-closed-print-mode > .page,
  body.projects-key-print-mode > .page {
    display: block;
    width: auto;
    min-height: auto;
    margin: 0;
  }

  body.pm-report-print-mode > .page > .section-shell,
  body.sales-key-print-mode > .page > .section-shell,
  body.sales-closed-print-mode > .page > .section-shell,
  body.projects-key-print-mode > .page > .section-shell {
    display: block;
  }

  body.pm-report-print-mode > .page > .section-shell > #pm_report {
    display: block !important;
    margin: 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
  }

  body.sales-key-print-mode > .page > .section-shell > #sales,
  body.sales-closed-print-mode > .page > .section-shell > #sales,
  body.projects-key-print-mode > .page > .section-shell > #projects {
    display: block !important;
    margin: 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
  }

  body.pm-report-print-mode #pm_report .panel-head,
  body.pm-report-print-mode #pm_report .pm-toolbar,
  body.pm-report-print-mode #pm_report .forecast-controls,
  body.pm-report-print-mode #pm_report .pagination-panel,
  body.pm-report-print-mode #pm_report .pm-print-btn {
    display: none !important;
  }

  body.sales-closed-print-mode #sales #sales-pane-key,
  body.sales-closed-print-mode #sales #sales-pane-forecast,
  body.sales-closed-print-mode #sales #closed-pagination-panel,
  body.sales-closed-print-mode #sales .sales-closed-print-btn,
  body.sales-closed-print-mode #sales #table-sort-sales-closed-date,
  body.sales-closed-print-mode #sales #table-sort-sales-closed,
  body.sales-closed-print-mode #sales #sales-pane-closed .filter-icon-btn {
    display: none !important;
  }

  body.sales-closed-print-mode #sales #sales-pane-closed {
    display: block !important;
    margin: 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
  }

  body.sales-closed-print-mode #sales #sales-pane-closed .table-wrapper {
    overflow: visible;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    zoom: 0.82;
  }

  body.sales-closed-print-mode #sales #sales-pane-closed .dashboard-table {
    width: 100%;
    border-collapse: collapse;
  }

  body.sales-closed-print-mode #sales #sales-pane-closed .dashboard-table,
  body.sales-closed-print-mode #sales #sales-pane-closed .dashboard-table thead,
  body.sales-closed-print-mode #sales #sales-pane-closed .dashboard-table tbody {
    display: table;
    width: 100%;
  }

  body.sales-closed-print-mode #sales #sales-pane-closed .dashboard-table thead {
    display: table-header-group !important;
  }

  body.sales-closed-print-mode #sales #sales-pane-closed .dashboard-table tbody {
    display: table-row-group !important;
  }

  body.sales-closed-print-mode #sales #sales-pane-closed .dashboard-table tr {
    display: table-row !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  body.sales-closed-print-mode #sales #sales-pane-closed .dashboard-table th,
  body.sales-closed-print-mode #sales #sales-pane-closed .dashboard-table td {
    display: table-cell !important;
    width: auto !important;
    padding: 8px 9px;
    font-size: 11px;
    line-height: 1.3;
    vertical-align: top;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
  }

  body.sales-closed-print-mode #sales #sales-pane-closed .dashboard-table tbody tr {
    border: none;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none;
    overflow: visible;
  }

  body.sales-closed-print-mode #sales #sales-pane-closed .dashboard-table tbody td {
    display: table-cell !important;
    grid-template-columns: none;
    gap: 0;
    align-items: initial;
    border-bottom: 1px solid var(--border-light);
  }

  body.sales-closed-print-mode #sales #sales-pane-closed .dashboard-table tbody td::before {
    content: none !important;
    display: none !important;
  }

  body.sales-closed-print-mode #sales #sales-pane-closed .dashboard-table col {
    display: table-column !important;
  }

  body.sales-closed-print-mode #sales #sales-pane-closed .comment-toggle,
  body.sales-closed-print-mode #sales #sales-pane-closed .comment-source-badge,
  body.sales-closed-print-mode #sales #sales-pane-closed .sales-closed-financial-toggle {
    display: none !important;
  }

  body.sales-closed-print-mode #sales #sales-pane-closed .dashboard-table th {
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
  }

  body.sales-closed-print-mode #sales #sales-pane-closed .cell-amount,
  body.sales-closed-print-mode #sales #sales-pane-closed .cell-rate {
    white-space: nowrap;
  }

  body.sales-closed-print-mode #sales .panel-head,
  body.sales-closed-print-mode #sales .admin-nav,
  body.sales-closed-print-mode #sales .forecast-controls {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  body.sales-closed-print-mode #sales .panel-head {
    display: flex !important;
    margin-bottom: 16px;
  }

  body.sales-closed-print-mode #sales .panel-head .section-info-toggle,
  body.sales-closed-print-mode #sales .admin-nav .filter-icon-btn,
  body.sales-closed-print-mode #sales .forecast-controls .filter-icon-btn,
  body.sales-closed-print-mode #sales .forecast-controls .input,
  body.sales-closed-print-mode #sales .forecast-controls .btn-m3-filled,
  body.sales-closed-print-mode #sales .forecast-controls .filter-dropdown {
    display: none !important;
  }

  body.sales-closed-print-mode #sales .admin-nav {
    display: flex !important;
    margin-bottom: 12px;
    padding-bottom: 0;
    overflow: visible;
  }

  body.sales-closed-print-mode #sales .admin-nav .tab-btn {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 18px 0 0;
    min-height: auto;
  }

  body.sales-closed-print-mode #sales .admin-nav .tab-badge {
    box-shadow: none;
  }

  body.sales-closed-print-mode #sales .forecast-controls {
    display: flex !important;
    justify-content: flex-start;
    gap: 12px;
    margin-bottom: 12px;
  }

  body.pm-report-print-mode #pm-report-printable {
    position: static;
    width: auto;
  }

  body.pm-report-print-mode #pm-report-printable .pm-focus-hero {
    display: flex;
    align-items: stretch;
    gap: 16px;
    padding: 18px 20px;
    margin-bottom: 16px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: none;
  }

  body.pm-report-print-mode #pm-report-printable .pm-focus-copy {
    flex: 1 1 auto;
    min-width: 0;
    gap: 10px;
  }

  body.pm-report-print-mode #pm-report-printable .pm-focus-name {
    font-size: 28px;
  }

  body.pm-report-print-mode #pm-report-printable .pm-focus-description {
    max-width: none;
    font-size: 13px;
    line-height: 1.45;
  }

  body.pm-report-print-mode #pm-report-printable .pm-focus-chips {
    gap: 8px;
  }

  body.pm-report-print-mode #pm-report-printable .pm-focus-chip {
    min-height: 28px;
    padding: 0 10px;
    font-size: 12px;
    box-shadow: none;
  }

  body.pm-report-print-mode #pm-report-printable .pm-focus-highlight {
    flex: 0 0 31%;
    min-width: 250px;
    align-self: stretch;
    padding: 16px 18px;
    border-radius: 16px;
    box-shadow: none;
  }

  body.pm-report-print-mode #pm-report-printable .pm-focus-highlight-value {
    font-size: 30px;
    line-height: 1.05;
  }

  body.pm-report-print-mode #pm-report-printable .pm-focus-highlight-note {
    font-size: 12px;
  }

  body.pm-report-print-mode #pm-report-printable .pm-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
  }

  body.pm-report-print-mode #pm-report-printable .pm-kpi-card {
    width: auto !important;
    min-width: 0 !important;
    padding: 16px 18px;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    box-shadow: none;
    background: #ffffff !important;
  }

  body.pm-report-print-mode #pm-report-printable .pm-kpi-card::after {
    display: none !important;
  }

  body.pm-report-print-mode #pm-report-printable .pm-kpi-card--accent {
    color: var(--text-primary);
    border-color: rgba(11, 122, 58, 0.22);
    background: #f4fbf7 !important;
  }

  body.pm-report-print-mode #pm-report-printable .pm-kpi-card--accent .overview-label,
  body.pm-report-print-mode #pm-report-printable .pm-kpi-card--accent .overview-note,
  body.pm-report-print-mode #pm-report-printable .pm-kpi-card--accent .overview-value {
    color: var(--text-primary);
  }

  body.pm-report-print-mode #pm-report-printable .table-wrapper {
    overflow: visible;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body.pm-report-print-mode #pm-report-printable .dashboard-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
  }

  body.pm-report-print-mode #pm-report-printable .dashboard-table,
  body.pm-report-print-mode #pm-report-printable .dashboard-table thead,
  body.pm-report-print-mode #pm-report-printable .dashboard-table tbody {
    display: table;
    width: 100%;
  }

  body.pm-report-print-mode #pm-report-printable .dashboard-table thead {
    display: table-header-group !important;
  }

  body.pm-report-print-mode #pm-report-printable .dashboard-table tbody {
    display: table-row-group !important;
  }

  body.pm-report-print-mode #pm-report-printable .dashboard-table tr {
    display: table-row !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  body.pm-report-print-mode #pm-report-printable .dashboard-table th,
  body.pm-report-print-mode #pm-report-printable .dashboard-table td {
    display: table-cell !important;
    width: auto !important;
    padding: 10px 12px;
    font-size: 12px;
    vertical-align: top;
    white-space: normal;
    word-break: break-word;
  }

  body.pm-report-print-mode #pm-report-printable .dashboard-table tbody tr {
    border: none;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none;
    overflow: visible;
  }

  body.pm-report-print-mode #pm-report-printable .dashboard-table tbody td {
    display: table-cell !important;
    grid-template-columns: none;
    gap: 0;
    align-items: initial;
    border-bottom: 1px solid var(--border-light);
  }

  body.pm-report-print-mode #pm-report-printable .dashboard-table tbody td::before {
    content: none !important;
    display: none !important;
  }

  body.pm-report-print-mode #pm-report-printable .pm-table-block,
  body.pm-report-print-mode #pm-report-printable .overview-grid,
  body.pm-report-print-mode #pm-report-printable .card-m3-filled,
  body.pm-report-print-mode #pm-report-printable .pm-focus-hero,
  body.pm-report-print-mode #pm-report-printable .pm-summary-strip {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  body.sales-key-print-mode #sales .panel-head,
  body.sales-key-print-mode #sales .admin-nav,
  body.sales-key-print-mode #sales #sales-pane-forecast,
  body.sales-key-print-mode #sales #sales-pane-closed,
  body.sales-key-print-mode #sales .sales-key-print-btn,
  body.sales-key-print-mode #sales #table-sort-sales-key,
  body.sales-key-print-mode #sales #table-sort-sales-key-date {
    display: none !important;
  }

  body.sales-key-print-mode #sales #sales-pane-key {
    display: block !important;
    margin: 0;
    padding: 0;
  }

  body.sales-key-print-mode #sales #sales-pane-key .table-wrapper {
    overflow: visible;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    zoom: 0.82;
  }

  body.sales-key-print-mode #sales #sales-pane-key .dashboard-table,
  body.projects-key-print-mode #projects #projects-pane-key .dashboard-table {
    width: 100%;
    border-collapse: collapse;
  }

  body.sales-key-print-mode #sales #sales-pane-key .dashboard-table col,
  body.projects-key-print-mode #projects #projects-pane-key .dashboard-table col {
    display: table-column !important;
  }

  body.sales-key-print-mode #sales #sales-pane-key .dashboard-table,
  body.sales-key-print-mode #sales #sales-pane-key .dashboard-table thead,
  body.sales-key-print-mode #sales #sales-pane-key .dashboard-table tbody,
  body.projects-key-print-mode #projects #projects-pane-key .dashboard-table,
  body.projects-key-print-mode #projects #projects-pane-key .dashboard-table thead,
  body.projects-key-print-mode #projects #projects-pane-key .dashboard-table tbody {
    display: table;
    width: 100%;
  }

  body.sales-key-print-mode #sales #sales-pane-key .dashboard-table thead,
  body.projects-key-print-mode #projects #projects-pane-key .dashboard-table thead {
    display: table-header-group !important;
  }

  body.sales-key-print-mode #sales #sales-pane-key .dashboard-table tbody,
  body.projects-key-print-mode #projects #projects-pane-key .dashboard-table tbody {
    display: table-row-group !important;
  }

  body.sales-key-print-mode #sales #sales-pane-key .dashboard-table tr,
  body.projects-key-print-mode #projects #projects-pane-key .dashboard-table tr {
    display: table-row !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  body.sales-key-print-mode #sales #sales-pane-key .dashboard-table th,
  body.sales-key-print-mode #sales #sales-pane-key .dashboard-table td,
  body.projects-key-print-mode #projects #projects-pane-key .dashboard-table th,
  body.projects-key-print-mode #projects #projects-pane-key .dashboard-table td {
    display: table-cell !important;
    width: auto !important;
    padding: 8px 9px;
    font-size: 11px;
    line-height: 1.3;
    vertical-align: top;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
  }

  body.sales-key-print-mode #sales #sales-pane-key .dashboard-table tbody tr,
  body.projects-key-print-mode #projects #projects-pane-key .dashboard-table tbody tr {
    border: none;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none;
    overflow: visible;
  }

  body.sales-key-print-mode #sales #sales-pane-key .dashboard-table tbody td,
  body.projects-key-print-mode #projects #projects-pane-key .dashboard-table tbody td {
    display: table-cell !important;
    grid-template-columns: none;
    gap: 0;
    align-items: initial;
    border-bottom: 1px solid var(--border-light);
  }

  body.sales-key-print-mode #sales #sales-pane-key .dashboard-table tbody td::before,
  body.projects-key-print-mode #projects #projects-pane-key .dashboard-table tbody td::before {
    content: none !important;
    display: none !important;
  }

  body.sales-key-print-mode #sales #sales-pane-key .filter-icon-btn,
  body.sales-key-print-mode #sales #sales-pane-key .sales-key-financial-toggle,
  body.sales-key-print-mode #sales #sales-pane-key .comment-toggle,
  body.sales-key-print-mode #sales #sales-pane-key .comment-source-badge,
  body.projects-key-print-mode #projects #projects-pane-key .filter-icon-btn,
  body.projects-key-print-mode #projects #projects-pane-key .projects-financial-toggle,
  body.projects-key-print-mode #projects #projects-pane-key .comment-toggle {
    display: none !important;
  }

  body.sales-key-print-mode #sales #sales-pane-key .dashboard-table th,
  body.projects-key-print-mode #projects #projects-pane-key .dashboard-table th {
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
  }

  body.sales-key-print-mode #sales #sales-pane-key .cell-amount,
  body.sales-key-print-mode #sales #sales-pane-key .cell-rate,
  body.projects-key-print-mode #projects #projects-pane-key .cell-amount,
  body.projects-key-print-mode #projects #projects-pane-key .cell-rate {
    white-space: nowrap;
  }

  body.projects-key-print-mode #projects .panel-head,
  body.projects-key-print-mode #projects .admin-nav,
  body.projects-key-print-mode #projects .forecast-controls,
  body.projects-key-print-mode #projects #projects-pane-delivery,
  body.projects-key-print-mode #projects #projects-pane-smr,
  body.projects-key-print-mode #projects .projects-key-print-btn,
  body.projects-key-print-mode #projects #table-sort-projects-date,
  body.projects-key-print-mode #projects #table-sort-projects {
    display: none !important;
  }

  body.projects-key-print-mode #projects #projects-pane-key {
    display: block !important;
    margin: 0;
    padding: 0;
  }

  body.projects-key-print-mode #projects #projects-pane-key .table-wrapper {
    overflow: visible;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    zoom: 0.78;
  }
}

.mobile-page-bar,
.mobile-ui-backdrop {
  display: none;
}

.mobile-sidebar-shell,
.mobile-sidebar-utilities {
  display: none;
}

.mobile-sidebar-head,
.mobile-sidebar-scroll {
  display: none;
}

.mobile-sidebar-user {
  display: none;
}

body.mobile-ui-lock {
  overflow: hidden;
}

@media (max-width: 768px) {
  html,
  body {
    overflow-x: hidden;
  }

  body {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    padding-bottom: env(safe-area-inset-bottom);
  }

  .mobile-page-bar {
    position: fixed;
    top: 0;
    left: max(0.5rem, env(safe-area-inset-left));
    right: max(0.5rem, env(safe-area-inset-right));
    z-index: 130;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: calc(0.5rem + env(safe-area-inset-top)) 0.875rem 0.75rem;
    border-radius: 1.125rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(18px);
  }

  .mobile-page-icon-button,
  .mobile-nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2.75rem;
    height: 2.75rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
  }

  .mobile-page-brand {
    display: flex;
    flex: 1;
    justify-content: center;
  }

  .mobile-page-brand-logo {
    width: 2.25rem;
    height: 2.25rem;
    object-fit: contain;
  }

  .mobile-ui-backdrop {
    position: fixed;
    inset: 0;
    z-index: 145;
    display: block;
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(2px);
  }

  .page {
    width: auto;
    margin: 0;
    min-height: 100vh;
    padding: calc(5rem + env(safe-area-inset-top)) 0.5rem calc(1rem + env(safe-area-inset-bottom));
  }

  .sidebar {
    width: min(84vw, 320px);
    max-width: 320px;
    padding: 0;
    transform: translateX(calc(-100% - 16px));
    transition: transform var(--md-motion-long) var(--md-motion-ease);
    z-index: 160;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
    overflow: hidden;
  }

  .sidebar > .sidebar-header,
  .sidebar > .sidebar-nav,
  .sidebar > .sidebar-footer {
    display: none !important;
  }

  body.mobile-sidebar-open .sidebar {
    transform: translateX(0);
  }

  .sidebar--collapsed {
    width: min(86vw, 340px);
  }

  .sidebar--collapsed ~ .page {
    margin-left: 0;
  }

  .sidebar-toggle-item {
    display: none;
  }

  .sidebar-nav {
    display: none;
  }

  .mobile-sidebar-shell {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 1rem;
    min-height: 100%;
    padding:
      calc(1rem + env(safe-area-inset-top))
      1rem
      calc(1rem + env(safe-area-inset-bottom));
  }

  .mobile-sidebar-head,
  .mobile-sidebar-scroll {
    display: block;
  }

  .mobile-sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
  }

  .mobile-sidebar-branding {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
  }

  .mobile-sidebar-head-logo {
    width: 2rem;
    height: 2rem;
    object-fit: contain;
    flex: 0 0 auto;
  }

  .mobile-sidebar-head-copy {
    display: grid;
    gap: 0.125rem;
    min-width: 0;
  }

  .mobile-sidebar-head-copy strong {
    font-size: 1rem;
    line-height: 1.1;
    color: var(--text-primary);
  }

  .mobile-sidebar-head-copy span {
    font-size: 0.8125rem;
    color: var(--text-secondary);
  }

  .mobile-sidebar-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    flex: 0 0 auto;
  }

  .mobile-sidebar-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
  }

  .mobile-sidebar-section-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-tertiary);
    padding: 0 0.5rem;
  }

  .mobile-nav-group {
    display: grid;
    gap: 0.4rem;
  }

  .mobile-nav-group-trigger,
  .mobile-nav-subitem {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: 3.25rem;
    padding: 0.95rem 1rem;
    border: 0;
    border-radius: 1rem;
    background: transparent;
    color: var(--text-primary);
    font: inherit;
    text-align: left;
    cursor: pointer;
  }

  .mobile-nav-group-trigger.active,
  .mobile-nav-subitem.active {
    background: var(--primary-light);
    color: var(--primary-dark);
    font-weight: 600;
  }

  .mobile-nav-group-label {
    display: inline-flex;
    align-items: center;
    min-width: 0;
  }

  .mobile-nav-group-chevron {
    margin-left: auto;
    font-size: 1.25rem;
    line-height: 1;
    color: var(--text-tertiary);
  }

  .mobile-nav-subgroups {
    display: grid;
    gap: 0.25rem;
    padding-left: 0.9rem;
    padding-bottom: 0.2rem;
  }

  .mobile-nav-subitem {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    font-size: 0.9375rem;
    border-radius: 0.875rem;
  }

  .section-shell {
    gap: 1rem;
  }

  .panel {
    padding: 1rem;
    border-radius: 1rem;
  }

  .panel-head,
  .section-heading {
    gap: 0.75rem;
  }

  .panel-summary {
    align-items: flex-start;
  }

  .topbar {
    position: relative;
    top: auto;
  }

  .users-page {
    width: auto;
    margin: 0;
    padding: 0.5rem 0.5rem calc(1rem + env(safe-area-inset-bottom));
  }

  .users-topbar {
    padding-top: calc(0.875rem + env(safe-area-inset-top));
  }

  .forecast-controls,
  .pm-toolbar,
  .admin-summary-grid,
  .overview-actions,
  .users-nav,
  .pagination-panel {
    gap: 0.75rem;
  }

  .forecast-controls > *,
  .pm-toolbar > *,
  .pagination-panel > * {
    width: 100%;
  }

  .forecast-controls .btn-m3-filled,
  .forecast-controls .btn-m3-outlined,
  .pm-toolbar .btn-m3-filled,
  .pm-toolbar .btn-m3-outlined,
  .overview-actions .btn-m3-filled,
  .overview-actions .btn-m3-outlined,
  .users-nav .btn-m3-filled,
  .users-nav .btn-m3-outlined {
    width: 100%;
    justify-content: center;
  }

  .forecast-custom-period {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .forecast-custom-period .custom-period-label {
    align-self: center;
  }

  .forecast-custom-period .btn-m3-filled {
    grid-column: 1 / -1;
    width: 100%;
  }

  .admin-nav {
    flex-wrap: nowrap;
  }

  .dashboard-table tbody td {
    grid-template-columns: minmax(104px, 38%) 1fr;
    gap: 0.625rem;
    padding: 0.875rem;
  }

  .dashboard-table tbody td::before {
    overflow-wrap: anywhere;
  }

  .stats-table tbody td::before {
    overflow-wrap: normal;
  }

  .dashboard-table .cell-amount,
  .dashboard-table .cell-rate,
  .dashboard-table .cell-currency {
    white-space: normal;
    text-align: left;
  }

  .page-footer {
    padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
  }

  .sidebar-user {
    padding: 0;
  }

  .mobile-sidebar-utilities {
    display: grid;
    gap: 0.625rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-light);
  }

  .mobile-sidebar-user {
    display: grid;
    gap: 0.25rem;
    padding: 0 0.25rem;
  }

  .mobile-sidebar-user-email {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    word-break: break-word;
  }

  .mobile-sidebar-user-role {
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
  }

  .mobile-sidebar-utility-btn {
    display: inline-flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-default);
    border-radius: 999px;
    background: transparent;
    color: var(--text-primary);
    font-weight: 600;
    text-decoration: none;
  }

  .sidebar-footer {
    gap: 0.875rem;
    padding: 1rem;
  }

  .sidebar-logout {
    display: none;
  }

  .filter-dropdown--mobile {
    position: fixed !important;
    left: max(12px, env(safe-area-inset-left)) !important;
    right: max(12px, env(safe-area-inset-right)) !important;
    top: auto !important;
    bottom: max(12px, env(safe-area-inset-bottom)) !important;
    width: auto !important;
    min-width: 0 !important;
    max-height: min(68vh, 34rem);
    border-radius: 1.25rem;
    padding: 0.625rem 0;
    overscroll-behavior: contain;
    z-index: 1900;
  }

  .filter-dropdown--mobile .filter-option {
    min-height: 2.875rem;
    padding: 0.875rem 1rem;
  }

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

  .pm-focus-highlight {
    width: 100%;
    min-width: 0;
    align-self: start;
  }

  .pm-focus-highlight-value {
    font-size: clamp(2.5rem, 11vw, 3.5rem);
    line-height: 0.95;
    word-break: break-word;
  }

  .pm-focus-highlight-note {
    line-height: 1.45;
  }
}
