:root {
  /* Brand Colors */
  --color-primary: #2563eb;
  --color-primary-light: #60a5fa;
  --color-primary-dark: #1e40af;
  --color-secondary: #10b981;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;
  --color-info: #0ea5e9;
  
  /* permanent White/Light Theme Backgrounds & Surfaces */
  --bg-body: #cbd5e1;
  --bg-card: #ffffff;
  --bg-surface: #ffffff;
  --bg-surface-alt: #f8fafc;
  --bg-surface-hover: #f1f5f9;
  --bg-glass: rgba(255, 255, 255, 0.85);
  --bg-glass-strong: rgba(255, 255, 255, 0.98);
  --overlay-bg: rgba(15, 23, 42, 0.4);
  
  /* Text Colors */
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --text-inverse: #ffffff;
  
  /* Borders */
  --border-color: #e2e8f0;
  --border-color-light: #cbd5e1;
  --border-radius: 8px;
  
  /* Semantic Status Colors */
  --status-success-bg: #ecfdf5;
  --status-success-border: #a7f3d0;
  --status-success-text: #059669;
  
  --status-danger-bg: #fef2f2;
  --status-danger-border: #fecaca;
  --status-danger-text: #dc2626;
  
  --status-warning-bg: #fef3c7;
  --status-warning-border: #fde68a;
  --status-warning-text: #b45309;
  
  --status-info-bg: #eff6ff;
  --status-info-border: #bfdbfe;
  --status-info-text: #1e40af;

  /* Elevation / Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -1px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.04);

  /* Scrollbar - Restored for Mouse Interaction */
  --scrollbar-bg: transparent;
  --scrollbar-thumb: rgba(100, 116, 139, 0.2);
  --scrollbar-thumb-hover: rgba(100, 116, 139, 0.4);
}

html {
  scroll-behavior: smooth;
}

* { 
  box-sizing: border-box; 
  -webkit-font-smoothing: antialiased; 
  -moz-osx-font-smoothing: grayscale; 
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-bg);
}

/* Custom Scrollbar Styles for Webkit */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--scrollbar-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 10px;
  transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

body { 
  margin: 0; 
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; 
  background: var(--bg-body); 
  color: var(--text-primary); 
  line-height: 1.5;
}

.container { max-width: 1100px; margin: 24px auto; padding: 12px; }

.card { 
  background: var(--bg-card); 
  border-radius: var(--border-radius); 
  box-shadow: var(--shadow-sm); 
  padding: 16px; 
  border: 1px solid var(--border-color);
  transition: box-shadow 0.2s ease;
}

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

.auth-page { 
  min-height: 100vh; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%); 
}

.auth-container { width: 100%; max-width: 420px; padding: 12px; }
.auth-wide { max-width: 680px; }

.auth-card { 
  background: var(--bg-card); 
  border-radius: 12px; 
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); 
  padding: 24px; 
  border: 1px solid rgba(255, 255, 255, 0.1);
}

label { 
  display: block; 
  margin-top: 10px; 
  margin-bottom: 4px; 
  font-size: 0.9rem; 
  font-weight: 500;
  color: var(--text-primary);
}

input, button, select, textarea { 
  width: 100%; 
  padding: 10px 14px; 
  border-radius: 6px; 
  border: 1px solid var(--border-color); 
  font: inherit; 
  background-color: var(--bg-surface);
  color: var(--text-primary);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--color-primary-light);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

button { 
  margin-top: 12px; 
  background: var(--color-primary); 
  color: var(--text-inverse); 
  border: none; 
  cursor: pointer; 
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

button:hover { 
  background: var(--color-primary-dark); 
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

button:active {
  transform: translateY(0);
  box-shadow: none;
}

a { 
  color: var(--color-primary); 
  transition: color 0.2s ease;
}

a:hover { color: var(--color-primary-dark); }

.muted { color: var(--text-secondary); font-size: 0.9rem; }
ul { padding-left: 20px; }
hr { border: 0; border-top: 1px solid var(--border-color); margin: 16px 0; }

.topbar { 
  background: var(--bg-glass); 
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color); 
  box-shadow: var(--shadow-sm); 
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-inner { max-width: 1200px; margin: 0 auto; padding: 8px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.topbar-inner.topbar-compact { padding: 8px 12px; gap: 8px; }
.brand-wrap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.brand-wrap-compact { min-width: 0; }
.brand { font-weight: 700; color: var(--color-primary-dark); font-size: 1.05rem; letter-spacing: -0.01em; }
.topnav { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

.topnav a { 
  text-decoration: none; 
  padding: 6px 12px; 
  border-radius: 999px; 
  border: 1px solid transparent; 
  background: transparent; 
  color: var(--text-secondary);
  font-weight: 500;
  transition: all 0.2s ease;
}

.topnav a:hover { 
  background: var(--bg-surface-hover); 
  color: var(--text-primary);
}

.topnav .logout-link { 
  background: var(--status-danger-bg); 
  border-color: var(--status-danger-border); 
  color: var(--status-danger-text); 
}

.topnav .logout-link:hover { 
  background: var(--color-danger); 
  color: var(--text-inverse); 
  border-color: var(--color-danger);
}

.panel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 16px; }
.panel-grid.two-col { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.mini-card { 
  background: var(--bg-surface); 
  border: 1px solid var(--border-color); 
  border-radius: var(--border-radius); 
  padding: 12px; 
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.mini-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-head.compact { align-items: center; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.link-btn, .small-btn { 
  display: inline-flex; 
  align-items: center;
  justify-content: center;
  padding: 8px 14px; 
  border-radius: 6px; 
  border: 1px solid var(--border-color); 
  text-decoration: none; 
  background: var(--bg-surface); 
  color: var(--text-primary); 
  font-weight: 500;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.link-btn:hover, .small-btn:hover {
  background: var(--bg-surface-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.small-btn { width: auto; margin-top: 0; background: var(--color-primary); color: var(--text-inverse); border: none; }
.small-btn:hover { background: var(--color-primary-dark); }
.danger-btn { background: var(--color-danger); color: var(--text-inverse); border: none; }
.danger-btn:hover { background: var(--color-danger); opacity: 0.9; }

.margin-top { margin-top: 16px; }

.result-box { margin-top: 10px; padding: 12px; border-radius: var(--border-radius); background: var(--bg-surface-alt); border: 1px solid var(--border-color); }
.success-box { background: var(--status-success-bg); border-color: var(--status-success-border); color: var(--status-success-text); }
.error-box { background: var(--status-danger-bg); border-color: var(--status-danger-border); color: var(--status-danger-text); }

.simple-table-wrap { overflow: auto; border-radius: 8px; border: 1px solid var(--border-color); background: var(--bg-surface); }
.simple-table { width: 100%; border-collapse: collapse; margin-top: 0; }
.simple-table th { 
  background: var(--bg-surface-alt);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  font-weight: 600;
  border-bottom: 2px solid var(--border-color); 
  padding: 10px 12px; 
  text-align: left; 
}
.simple-table td { 
  border-bottom: 1px solid var(--border-color); 
  padding: 12px; 
  text-align: left; 
  vertical-align: top; 
  transition: background-color 0.2s ease;
}
.simple-table tbody tr:last-child td { border-bottom: none; }
.simple-table tbody tr:hover td { background-color: var(--bg-surface-hover); }

.search-results { display: grid; gap: 6px; margin-top: 8px; }
.search-choice { margin-top: 0; background: var(--bg-surface); color: var(--text-primary); border: 1px solid var(--border-color); text-align: left; box-shadow: none; font-weight: normal; }
.search-choice:hover { background: var(--bg-surface-alt); border-color: var(--color-primary-light); }

.line-item-card { 
  border: 1px solid var(--border-color); 
  border-radius: var(--border-radius); 
  padding: 16px; 
  margin-top: 12px; 
  background: var(--bg-surface); 
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease;
}
.line-item-card:hover { box-shadow: var(--shadow-md); }

.line-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.line-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.assessment-total { margin-top: 16px; font-size: 1.1rem; font-weight: 600; color: var(--color-primary-dark); }

@media (max-width: 768px) {
  .container { margin: 12px auto; padding: 8px; }
  .topbar-inner { align-items: center; }
  .topbar-inner.topbar-compact { flex-wrap: nowrap; }
  .brand { font-size: 1rem; }
  .topnav { width: 100%; }
}

.notice-list { display: grid; gap: 8px; margin-top: 12px; }
.notice-card { 
  border: 1px solid var(--border-color); 
  border-radius: var(--border-radius); 
  background: var(--bg-surface); 
  padding: 16px; 
  box-shadow: var(--shadow-sm);
}
.notice-card h3 { margin: 0 0 6px; color: var(--text-primary); }
.notice-card small { color: var(--text-secondary); font-weight: 500; }
.notice-read { background: var(--bg-surface-alt); border-color: var(--border-color); opacity: 0.85; }
.notice-sent, .notice-pending { background: var(--bg-surface); border-left: 4px solid var(--color-primary); }

.compact-list { margin: 0; padding-left: 20px; }
.compact-list li { margin-bottom: 8px; }
.receipt-panel h3 { margin-top: 0; }
.receipt-header-row .small-btn { width: auto; }

.search-row { gap: 8px; align-items: stretch; display: flex; }
.search-row input { flex: 1; margin-top: 0; }

.assessment-pick-list { display: grid; gap: 8px; }
.assessment-pick-card { 
  width: 100%; 
  text-align: left; 
  background: var(--bg-surface); 
  border: 1px solid var(--border-color); 
  border-radius: 8px; 
  padding: 12px 16px; 
  cursor: pointer; 
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); 
  box-shadow: var(--shadow-sm);
  margin-top: 0;
  font-weight: normal;
}
.assessment-pick-card:hover { 
  border-color: var(--color-primary); 
  box-shadow: var(--shadow-md); 
  transform: translateY(-2px); 
}
.assessment-pick-top, .assessment-pick-meta { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.assessment-pick-top { font-weight: 600; color: var(--text-primary); }
.assessment-pick-meta { margin-top: 6px; font-size: 0.9rem; color: var(--text-secondary); }

.pill-status.warning { display: inline-flex; padding: 4px 12px; border-radius: 999px; background: var(--status-warning-bg); color: var(--status-warning-text); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; border: 1px solid var(--status-warning-border); }
.small { font-size: 0.88rem; }
.empty-list { padding: 16px; border: 2px dashed var(--border-color); border-radius: 8px; background: var(--bg-surface-alt); color: var(--text-secondary); text-align: center; }

.error { color: var(--color-danger); font-weight: 500; font-size: 0.9rem; }
.inline-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; align-items: center; }
.inline-actions button { width: auto; margin-top: 0; }

.disputes-page textarea { min-height: 100px; resize: vertical; }
.disputes-page .simple-table td form { min-width: 260px; }
.disputes-page .notice-card p { margin-bottom: 12px; line-height: 1.6; }
.disputes-page .notice-card h3 { margin-top: 0; }

.topnav-shell { position: relative; display: flex; align-items: center; gap: 12px; margin-left: auto; }
.public-nav { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.menu-toggle { 
  width: auto; 
  margin-top: 0; 
  display: inline-flex; 
  align-items: center; 
  gap: 8px; 
  padding: 8px 14px; 
  border-radius: 999px; 
  background: var(--color-primary); 
  color: var(--text-inverse); 
  box-shadow: var(--shadow-sm); 
  font-weight: 600;
}
.menu-toggle:hover { background: var(--color-primary-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.menu-toggle-icon, .menu-toggle-icon::before, .menu-toggle-icon::after { display: block; width: 18px; height: 2px; border-radius: 999px; background: var(--text-inverse); content: ''; transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease; }
.menu-toggle-icon { position: relative; }
.menu-toggle-icon::before, .menu-toggle-icon::after { position: absolute; left: 0; }
.menu-toggle-icon::before { top: -6px; }
.menu-toggle-icon::after { top: 6px; }
.menu-toggle[aria-expanded='true'] .menu-toggle-icon { background: transparent; }
.menu-toggle[aria-expanded='true'] .menu-toggle-icon::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded='true'] .menu-toggle-icon::after { transform: translateY(-6px) rotate(-45deg); }

.mega-menu { 
  position: absolute; 
  right: 0; 
  top: calc(100% + 12px); 
  min-width: min(92vw, 520px); 
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  background: var(--bg-glass-strong); 
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color); 
  border-radius: 16px; 
  box-shadow: var(--shadow-lg); 
  padding: 16px; 
  z-index: 1200; 
  transform-origin: top right;
  animation: menuFadeIn 0.2s ease-out forwards;
}

@keyframes menuFadeIn {
  from { opacity: 0; transform: scale(0.98) translateY(-10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.mega-menu-grid { display: grid; grid-template-columns: repeat(2, minmax(220px, 1fr)); gap: 12px; }
.mega-menu-profile { 
  margin-bottom: 16px; 
  padding: 12px; 
  border-radius: 12px; 
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%); 
  color: var(--text-inverse); 
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.2);
}
.mega-menu-profile strong { display: block; font-size: 1.05rem; }
.mega-menu-profile span { display: block; margin-top: 4px; font-size: 0.85rem; color: rgba(255,255,255,0.85); }

.mega-menu-backdrop { position: fixed; inset: 0; background: var(--overlay-bg); backdrop-filter: blur(2px); z-index: 1190; animation: backdropFade 0.2s ease-out; }
@keyframes backdropFade { from { opacity: 0; } to { opacity: 1; } }

body.menu-open { overflow: hidden; }

.mega-group { padding: 10px; border-radius: 12px; background: var(--bg-surface-alt); border: 1px solid var(--border-color); }
.mega-group h3 { margin: 0 0 8px; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-secondary); }
.mega-group a, .mega-group .mega-muted { display: block; text-decoration: none; padding: 8px 12px; border-radius: 8px; color: var(--text-primary); font-weight: 500; transition: all 0.2s ease; }
.mega-group a:hover { background: var(--bg-surface); box-shadow: var(--shadow-sm); color: var(--color-primary); }
.mega-group .mega-muted { color: var(--text-secondary); font-size: 0.9rem; font-weight: normal; }
.mega-group .menu-danger { color: var(--color-danger); }
.mega-group .menu-danger:hover { background: var(--status-danger-bg); color: var(--status-danger-text); box-shadow: none; }

@media (max-width: 768px) {
  .topnav-shell { width: auto; justify-content: flex-end; margin-left: auto; }
  .menu-toggle { margin-left: auto; padding: 8px 14px; }
  .mega-menu { position: fixed; left: 50%; right: auto; top: 70px; transform: translateX(-50%); width: min(94vw, 460px); max-width: 460px; min-width: 0; max-height: calc(100vh - 90px); overflow: auto; animation: mobileMenuFade 0.2s ease-out forwards; }
  @keyframes mobileMenuFade { from { opacity: 0; transform: translate(-50%, -10px); } to { opacity: 1; transform: translate(-50%, 0); } }
  .mega-menu-grid { grid-template-columns: 1fr; }
  .mega-group { padding: 12px; }
}

.notifications-shell { display: grid; gap: 16px; }
.notifications-hero {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 20px 24px;
  border-radius: 16px;
  background: linear-gradient(135deg, #0f172a 0%, #1e40af 50%, #3b82f6 100%);
  color: var(--text-inverse);
  box-shadow: 0 15px 30px -10px rgba(37, 99, 235, 0.25);
}
.notifications-hero h1 { margin: 0 0 8px; font-size: clamp(1.8rem, 2vw + 1rem, 2.4rem); letter-spacing: -0.02em; }
.notifications-hero .eyebrow { margin: 0 0 8px; font-size: 0.85rem; letter-spacing: 0.15em; text-transform: uppercase; color: rgba(255,255,255,0.7); font-weight: 600; }
.notifications-hero .hero-copy { margin: 0; max-width: 640px; color: rgba(255,255,255,0.9); font-size: 1.05rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.hero-actions form { margin: 0; }
.notifications-hero .btn, .notifications-hero .btn:hover { box-shadow: none; }
.notifications-hero .btn-ghost { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); color: var(--text-inverse); border-radius: 6px; padding: 8px 14px; transition: all 0.2s ease; backdrop-filter: blur(4px); }
.notifications-hero .btn-ghost:hover { background: rgba(255,255,255,0.2); }

.notifications-stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.notification-stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.notification-stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.notification-stat-card strong { display: block; margin: 6px 0 4px; font-size: 1.8rem; font-weight: 700; color: var(--text-primary); letter-spacing: -0.02em; }
.notification-stat-card small, .notification-stat-card .stat-label { color: var(--text-secondary); font-weight: 500; }
.notification-stat-card.active { border-top: 4px solid var(--color-primary); }
.notification-stat-card.unread { border-top: 4px solid var(--color-info); }
.notification-stat-card.read { border-top: 4px solid var(--text-secondary); }

.notifications-panel { border-radius: 16px; border: 1px solid var(--border-color); box-shadow: var(--shadow-md); background: var(--bg-surface); padding: 16px; }
.notification-toolbar.modern { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.notification-toolbar.modern .filter-chip {
  padding: 8px 14px;
  border-radius: 999px;
  min-width: 120px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-weight: 600;
  transition: all 0.2s ease;
  cursor: pointer;
}
.notification-toolbar.modern .filter-chip:hover { background: var(--bg-surface-hover); color: var(--text-primary); }
.notification-toolbar.modern .filter-chip.active { background: var(--status-info-bg); color: var(--status-info-text); border-color: var(--status-info-border); box-shadow: inset 0 0 0 1px var(--status-info-border); }
.notification-toolbar.modern .chip-title { font-size: 0.9rem; }
.notification-toolbar.modern .chip-count { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; border-radius: 999px; background: var(--bg-surface); font-size: 0.75rem; box-shadow: var(--shadow-sm); }

.notification-list-modern { display: grid; gap: 12px; }
.notification-item {
  position: relative;
  display: grid;
  grid-template-columns: 6px 1fr auto;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-surface);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.notification-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-color-light); }
.notification-item.is-unread { background: var(--bg-surface-alt); }
.notification-item.is-read { background: var(--bg-surface); opacity: 0.85; }
.notification-item-accent { border-radius: 999px; background: linear-gradient(180deg, var(--color-primary-light) 0%, var(--color-primary) 100%); }
.notification-item.is-read .notification-item-accent { background: linear-gradient(180deg, var(--border-color) 0%, var(--border-color-light) 100%); }
.notification-item-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 8px; }
.notification-badges { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.status-indicator { width: 8px; height: 8px; border-radius: 50%; }
.status-indicator.unread { background: var(--color-primary); box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15); }
.status-indicator.read { background: var(--border-color-light); }
.type-pill, .channel-pill { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; background: var(--bg-surface-hover); color: var(--text-secondary); font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; border: 1px solid var(--border-color); }
.notification-item h3 { margin: 0 0 6px; font-size: 1.05rem; color: var(--text-primary); }
.notification-item p { margin: 0 0 12px; line-height: 1.5; color: var(--text-secondary); }
.notification-item-footer { display: flex; flex-wrap: wrap; gap: 12px; font-size: 0.85rem; color: var(--text-secondary); font-weight: 500; }
.notification-item-actions { display: flex; flex-direction: column; gap: 8px; min-width: 120px; }
.notification-item-actions form { margin: 0; }
.notifications-empty-state { text-align: center; padding: 32px 16px; }
.empty-icon { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; background: var(--bg-surface-alt); border: 1px solid var(--border-color); color: var(--text-secondary); }

.btn-soft { background: var(--status-info-bg); color: var(--status-info-text); border: 1px solid var(--status-info-border); font-weight: 600; }
.btn-soft:hover { background: var(--bg-surface-hover); border-color: var(--color-primary); }
.btn-danger-ghost { background: var(--status-danger-bg); color: var(--status-danger-text); border: 1px solid var(--status-danger-border); font-weight: 600; }
.btn-danger-ghost:hover { background: var(--color-danger); color: var(--text-inverse); border-color: var(--color-danger); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

@media (max-width: 900px) {
  .notifications-hero, .notification-item { grid-template-columns: 1fr; }
  .notifications-hero { padding: 16px 20px; }
  .hero-actions { justify-content: flex-start; }
  .notifications-stats-grid { grid-template-columns: 1fr; }
  .notification-item { padding: 16px; }
  .notification-item-accent { height: 4px; width: 100%; margin-bottom: 10px; }
  .notification-item-actions { min-width: 0; flex-direction: row; flex-wrap: wrap; }
}

@media (max-width: 640px) {
  .notifications-shell { gap: 12px; }
  .notifications-panel { padding: 12px; }
  .notification-toolbar.modern .filter-chip { width: 100%; }
  .hero-actions { width: 100%; }
  .hero-actions .btn, .hero-actions button, .notification-item-actions button { width: 100%; }
  .notification-item-top { flex-direction: column; }
}

.btn-secondary { background: var(--bg-surface); color: var(--text-primary); border: 1px solid var(--border-color); }
.btn-secondary:hover { background: var(--bg-surface-alt); color: var(--text-primary); }

.reports-page { display: grid; gap: 16px; }
.reports-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 24px;
  border-radius: 16px;
  background: linear-gradient(135deg, #020617 0%, #1e40af 55%, #3b82f6 100%);
  color: var(--text-inverse);
  box-shadow: 0 15px 30px -10px rgba(37, 99, 235, 0.25);
}
.reports-hero h1 { margin: 0 0 8px; font-size: clamp(1.8rem, 2vw + 1rem, 2.4rem); letter-spacing: -0.02em; }
.reports-hero .hero-copy { margin: 0; max-width: 680px; color: rgba(255,255,255,0.9); font-size: 1.05rem; }
.reports-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; align-items: center; }
.role-chip, .status-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 28px; padding: 4px 12px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
}
.role-chip { background: rgba(255,255,255,0.15); color: var(--text-inverse); border: 1px solid rgba(255,255,255,0.2); backdrop-filter: blur(4px); }
.status-badge.danger { background: var(--status-danger-bg); color: var(--status-danger-text); border: 1px solid var(--status-danger-border); margin-left: 6px; }

.report-filters-card { padding: 16px; border-radius: 16px; }
.report-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: end; }
.report-filters label { display: grid; gap: 6px; }
.report-filters label span { font-size: 0.8rem; color: var(--text-secondary); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.report-filters input, .report-filters select { width: 100%; min-height: 40px; padding: 0 12px; border: 1px solid var(--border-color); border-radius: 8px; background: var(--bg-surface); box-shadow: inset 0 2px 4px rgba(0,0,0,0.02); }
.filter-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filter-actions .btn { width: auto; margin-top: 0; padding: 10px 20px; border-radius: 8px; }

.report-grid { display: grid; gap: 16px; }
.report-grid > .card, .report-grid > .metric-card { min-width: 0; }
.report-kpis, .report-callouts, .report-top-row, .report-operations-row, .report-mid-row, .report-bottom-row { align-items: stretch; gap: 16px; }
.report-panel, .metric-card, .report-callout { height: 100%; box-sizing: border-box; }
.table-scroll, .aging-list, .report-split-stack { min-width: 0; }
.panel-head { flex-wrap: wrap; }
.panel-head > div { min-width: 0; flex: 1 1 240px; }
.panel-head .text-link, .panel-head .muted { flex: 0 0 auto; }
@media (max-width: 992px) { .report-callouts { grid-template-columns: 1fr; } }

.report-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); display: grid; }
.metric-card {
  border-radius: 16px; padding: 16px; color: var(--text-primary); background: var(--bg-surface); border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm); transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.metric-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.metric-card span { display: block; font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-secondary); margin-bottom: 8px; }
.metric-card strong { display: block; font-size: 1.8rem; font-weight: 700; margin-bottom: 6px; letter-spacing: -0.02em; }
.metric-card small { color: var(--text-secondary); font-weight: 500; }
.metric-card.accent-blue { border-top: 4px solid var(--color-primary); }
.metric-card.accent-green { border-top: 4px solid var(--color-secondary); }
.metric-card.accent-amber { border-top: 4px solid var(--color-warning); }
.metric-card.accent-purple { border-top: 4px solid #8b5cf6; }

.report-top-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr); }
.report-mid-row, .report-bottom-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.report-panel { padding: 20px; border-radius: 16px; background: var(--bg-surface); border: 1px solid var(--border-color); box-shadow: var(--shadow-sm); }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.panel-head h2 { margin: 0; font-size: 1.15rem; color: var(--text-primary); letter-spacing: -0.01em; }
.table-scroll { overflow: auto; border-radius: 8px; border: 1px solid var(--border-color); }
.compact-table th, .compact-table td { white-space: nowrap; padding: 10px 12px; }
.empty-state { margin: 0; padding: 24px 16px; border: 2px dashed var(--border-color); border-radius: 12px; background: var(--bg-surface-alt); color: var(--text-secondary); text-align: center; font-weight: 500; }

.trend-bars {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); gap: 12px;
  align-items: end; min-height: 200px; margin-top: 12px;
}
.trend-group { display: grid; gap: 8px; justify-items: center; text-align: center; font-size: 0.8rem; color: var(--text-secondary); font-weight: 500; }
.bar-stack { display: flex; gap: 6px; align-items: flex-end; justify-content: center; min-height: 160px; width: 100%; }
.bar {
  display: block; width: 22px; border-radius: 4px 4px 2px 2px;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.bar:hover { transform: scaleY(1.05); transform-origin: bottom; opacity: 0.9; }
.bar.initiated { background: var(--color-primary-light); opacity: 0.7; }
.bar.confirmed { background: var(--color-primary); box-shadow: inset 0 -6px 12px rgba(0,0,0,0.1); }
.legend-inline { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 16px; color: var(--text-secondary); font-size: 0.85rem; font-weight: 500; }
.legend-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 8px; vertical-align: middle; }
.legend-swatch.initiated { background: var(--color-primary-light); opacity: 0.7; }
.legend-swatch.confirmed { background: var(--color-primary); }

.aging-list { display: grid; gap: 12px; }
.aging-item {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 16px; border: 1px solid var(--border-color); border-radius: 12px; background: var(--bg-surface-alt);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.aging-item:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); border-color: var(--border-color-light); background: var(--bg-surface); }
.aging-item strong { display: block; margin-bottom: 2px; color: var(--text-primary); font-size: 1rem; }
.aging-item small { color: var(--text-secondary); font-weight: 500; }

@media (max-width: 1100px) {
  .report-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-top-row, .report-mid-row, .report-bottom-row { grid-template-columns: 1fr; }
  .report-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .reports-hero { padding: 16px 20px; flex-direction: column; }
  .hero-actions { width: 100%; justify-content: flex-start; }
  .report-filters { grid-template-columns: 1fr; }
  .report-kpis { grid-template-columns: 1fr; }
  .report-panel { padding: 16px; }
  .trend-bars { grid-template-columns: repeat(auto-fit, minmax(54px, 1fr)); }
}

.report-callouts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 16px; gap: 16px; }
.report-callout { padding: 16px; border-radius: 16px; background: var(--bg-surface); border: 1px solid var(--border-color); box-shadow: var(--shadow-sm); transition: transform 0.2s ease; }
.report-callout:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.report-callout strong { display: block; font-size: 1.6rem; font-weight: 700; margin: 8px 0 6px; letter-spacing: -0.02em; }
.report-callout small { color: var(--text-secondary); font-weight: 500; font-size: 0.85rem; }
.report-anchor-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.report-anchor-nav a {
  display: inline-flex; align-items: center; justify-content: center; padding: 10px 16px; border-radius: 999px;
  background: var(--bg-surface); border: 1px solid var(--border-color); color: var(--text-primary); font-weight: 600; text-decoration: none;
  box-shadow: var(--shadow-sm); transition: all 0.2s ease;
}
.report-anchor-nav a:hover { background: var(--bg-surface-alt); border-color: var(--color-primary-light); color: var(--color-primary); transform: translateY(-1px); }

.report-operations-row { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; }
.report-split-stack { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.report-impact-strip {
  margin-top: 16px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px;
  padding-top: 16px; border-top: 1px solid var(--border-color);
}
.report-impact-strip div { background: var(--bg-surface-alt); border: 1px solid var(--border-color); border-radius: 12px; padding: 12px; }
.report-impact-strip span { display: block; color: var(--text-secondary); font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; }
.report-impact-strip strong { font-size: 1.15rem; font-weight: 700; color: var(--text-primary); }
.subsection-title { margin: 0 0 12px; font-size: 1.05rem; font-weight: 600; }
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.status-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--bg-surface); border: 1px solid var(--border-color); font-size: 0.8rem; font-weight: 600; box-shadow: var(--shadow-sm); }

@media (max-width: 992px) {
  .report-callouts, .report-operations-row, .report-split-stack, .report-impact-strip { grid-template-columns: 1fr; }
}

/* Explicitly overriding to white/black for print views to ensure standard rendering */
@media print {
  .topbar, .hero-actions, .report-filters-card { display: none !important; }
  body { background: #fff; color: #000; }
  .container.reports-page { max-width: none; padding: 0; }
  .card, .report-panel, .metric-card, .report-callout { box-shadow: none !important; border: 1px solid #cbd5e1; break-inside: avoid; }
  .reports-hero { margin-top: 0; background: none; color: #000; padding: 0 0 16px; border-bottom: 2px solid #000; box-shadow: none; border-radius: 0; }
  .reports-hero .hero-copy { color: #333; }
  .report-grid, .report-top-row, .report-mid-row, .report-bottom-row, .report-operations-row, .report-callouts { gap: 12px; }
  .trend-bars { overflow: visible; }
  a[href]:after { content: ''; }
}

.user-pill-visible { display: flex; }
.inline-check { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.inline-check input { width: auto; margin: 0; transform: scale(1.1); cursor: pointer; }
.filters-stack .inline-actions .link-btn, .filters-stack .inline-actions button { width: auto; margin-top: 0; }
.user-management-page .inline-editor summary { cursor: pointer; color: var(--color-primary); font-weight: 600; transition: color 0.2s ease; outline: none; }
.user-management-page .inline-editor summary:hover { color: var(--color-primary-dark); }
.user-management-page .inline-editor[open] { padding-top: 10px; }
.user-management-page .inline-editor form { display: grid; gap: 10px; margin-top: 10px; min-width: 280px; }
.user-management-page .user-table td { vertical-align: top; }
.profile-page .form-message, .user-management-page .form-message { min-height: 1.5rem; margin-top: 10px; font-weight: 500; font-size: 0.9rem; }
.success-text { color: var(--status-success-text); }
.error-text { color: var(--status-danger-text); }

@media (max-width: 768px) { 
  .user-management-page .simple-table, .user-management-page .simple-table thead, .user-management-page .simple-table tbody, .user-management-page .simple-table th, .user-management-page .simple-table td, .user-management-page .simple-table tr { display: block; } 
  .user-management-page .simple-table thead { display: none; } 
  .user-management-page .simple-table tr { padding: 16px 0; border-bottom: 1px solid var(--border-color); } 
  .user-management-page .simple-table td { border: none; padding: 8px 0; } 
}

.user-scope-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 12px 16px; border: 1px solid var(--border-color); border-radius: 12px; background: var(--bg-surface-alt); box-shadow: inset 0 2px 4px rgba(0,0,0,0.02); }
.scope-copy { display: flex; flex-direction: column; gap: 4px; }
.scope-badges { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.scope-pill { display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border-radius: 999px; background: var(--bg-surface); border: 1px solid var(--border-color); color: var(--text-primary); font-size: 0.85rem; box-shadow: var(--shadow-sm); }
.scope-pill strong { font-weight: 700; color: var(--color-primary-dark); }
.scope-pill em { font-style: normal; color: var(--text-secondary); }
.status-chip { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 999px; font-size: 0.8rem; font-weight: 600; border: 1px solid transparent; }
.status-active { background: var(--status-success-bg); color: var(--status-success-text); border-color: var(--status-success-border); }
.status-inactive { background: var(--status-danger-bg); color: var(--status-danger-text); border-color: var(--status-danger-border); }
.status-mfa-on { background: var(--status-info-bg); color: var(--status-info-text); border-color: var(--status-info-border); }
.status-mfa-off { background: var(--bg-surface-alt); color: var(--text-secondary); border-color: var(--border-color); }
.small-note { font-size: 0.8rem; color: var(--text-secondary); }
.row-soft-deleted { opacity: 0.5; transition: opacity 0.3s ease; }
.row-soft-deleted:hover { opacity: 0.8; }
.user-table details[open] { background: var(--bg-surface-alt); border-radius: 10px; padding: 10px; border: 1px solid var(--border-color); margin-top: 6px; }

@media (max-width:768px) {
  .user-scope-bar { flex-direction: column; }
  .scope-badges { width: 100%; }
}

.report-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.preset-chip { border: 1px solid var(--border-color); background: var(--bg-surface); color: var(--text-primary); padding: 8px 14px; border-radius: 999px; font-weight: 600; cursor: pointer; transition: all 0.2s ease; box-shadow: var(--shadow-sm); }
.preset-chip:hover { background: var(--bg-surface-alt); border-color: var(--color-primary-light); transform: translateY(-1px); box-shadow: var(--shadow-md); color: var(--color-primary); }
.text-link { color: var(--color-primary); font-weight: 600; text-decoration: none; transition: color 0.2s ease; }
.text-link:hover { color: var(--color-primary-dark); text-decoration: underline; }
.panel-copy { margin: 6px 0 0; color: var(--text-secondary); max-width: 42rem; line-height: 1.5; }
.compact-hero { padding: 20px 24px; }
.report-detail-page .detail-table td, .report-detail-page .detail-table th { white-space: nowrap; }
.print-layout .hero-actions { gap: 10px; }
.print-list { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.report-print-page { background: var(--bg-surface); }
.report-print-page .container { max-width: 1100px; }
.no-print { display: flex; }

@media (max-width:768px) {
  .report-presets { overflow: auto; padding-bottom: 6px; scrollbar-width: none; }
  .report-presets::-webkit-scrollbar { display: none; }
  .preset-chip { white-space: nowrap; }
  .panel-head { align-items: flex-start; }
  .panel-head .text-link { margin-top: 6px; }
}

@media print {
  .no-print, .report-presets, .report-anchor-nav { display: none !important; }
  .report-print-page .reports-hero, .report-print-page .card, .report-print-page .report-panel, .report-print-page .metric-card { box-shadow: none !important; border-color: #e2e8f0; }
}

.detail-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.detail-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--bg-surface); border: 1px solid var(--border-color); font-size: 0.85rem; color: var(--text-primary); box-shadow: var(--shadow-sm); }
.detail-pill strong { font-size: 0.9rem; color: var(--text-primary); }
.hero-actions.wrap { flex-wrap: wrap; }
.inline-link-list { display: flex; flex-wrap: wrap; gap: 8px; }

@media (max-width:768px) {
  .hero-actions.wrap { width: 100%; }
  .hero-actions.wrap .btn { flex: 1 1 auto; }
  .detail-pills { overflow: auto; padding-bottom: 6px; scrollbar-width: none; }
  .detail-pills::-webkit-scrollbar { display: none; }
  .detail-pill { white-space: nowrap; }
}

.form-grid { display: grid; gap: 14px; }
.form-grid.two-up { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.three-up { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.register-card h2 { margin-bottom: 6px; }
.register-header .eyebrow, .result-content .eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.75rem; font-weight: 700; margin: 0 0 8px; color: var(--text-secondary); }
.register-actions { margin-top: 10px; }
.registration-feedback { margin-bottom: 18px; }
.result-card { display: grid; grid-template-columns: auto 1fr; gap: 16px; padding: 18px; border-radius: 12px; border: 1px solid var(--border-color); background: var(--bg-surface-alt); }
.result-card.success { background: var(--status-success-bg); border-color: var(--status-success-border); }
.result-card.error { background: var(--status-danger-bg); border-color: var(--status-danger-border); }
.result-icon { width: 52px; height: 52px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; font-weight: 800; font-size: 1.4rem; color: var(--text-inverse); background: var(--color-primary); }
.result-card.success .result-icon { background: var(--color-secondary); }
.result-card.error .result-icon { background: var(--color-danger); }
.result-content h2 { margin: 0 0 10px; }
.success-text { color: var(--status-success-text) !important; }
.error-text { color: var(--status-danger-text) !important; }
.result-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 14px 0; }
.result-meta div { background: rgba(255,255,255,0.65); border: 1px solid rgba(255,255,255,0.6); border-radius: 10px; padding: 12px; }
.result-meta span { display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-secondary); margin-bottom: 6px; }
.result-meta strong { display: block; font-size: 1rem; }
.result-steps ul { margin: 8px 0 0 18px; }
.result-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.result-actions .small-btn, .result-actions .btn-secondary { width: auto; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.error-detail { margin-top: 12px; padding: 12px; border-radius: 10px; background: rgba(255,255,255,0.65); }
@media (max-width: 768px) {
  .form-grid.two-up, .form-grid.three-up, .result-meta { grid-template-columns: 1fr; }
  .result-card { grid-template-columns: 1fr; }
  .result-icon { width: 44px; height: 44px; }
  .result-actions { flex-direction: column; }
  .result-actions .small-btn, .result-actions .btn-secondary { width: 100%; }
}
