:root {
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto, 'Helvetica Neue', Arial, sans-serif;
}
/* ============================================================
   AMP Client Portal — Design System
   Asset Management Professionals LLC
   Dark theme: bg=#0a1117, card=#0f1923, teal=#00c2a8
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

/* ---- Design Tokens ---- */
:root {
  /* Surfaces */
  --bg: #0a1117;
  --bg-subtle: #0d151d;
  --card: #0f1923;
  --card-hover: #131f2b;
  --card-border: #1a2736;
  --card-border-hover: #243445;
  --surface-raised: #162231;

  /* Accent */
  --teal: #00c2a8;
  --teal-hover: #00d4b8;
  --teal-dim: rgba(0, 194, 168, 0.12);
  --teal-glow: rgba(0, 194, 168, 0.08);

  /* Status Colors */
  --red: #ff4d6a;
  --red-dim: rgba(255, 77, 106, 0.12);
  --orange: #ff8a3d;
  --orange-dim: rgba(255, 138, 61, 0.12);
  --amber: #ffc246;
  --amber-dim: rgba(255, 194, 70, 0.12);
  --green: #34d399;
  --green-dim: rgba(52, 211, 153, 0.12);
  --blue: #60a5fa;
  --blue-dim: rgba(96, 165, 250, 0.12);
  --purple: #a78bfa;
  --purple-dim: rgba(167, 139, 250, 0.12);
  --slate: #64748b;
  --slate-dim: rgba(100, 116, 139, 0.12);

  /* Text */
  --text-primary: #e8ecf1;
  --text-secondary: #8899aa;
  --text-muted: #506070;
  --text-inverse: #0a1117;

  /* Type Scale */
  --text-xs: clamp(0.6875rem, 0.65rem + 0.15vw, 0.75rem);
  --text-sm: clamp(0.8125rem, 0.78rem + 0.15vw, 0.875rem);
  --text-base: 0.9375rem;
  --text-lg: clamp(1.0625rem, 1rem + 0.25vw, 1.25rem);
  --text-xl: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
  --text-2xl: clamp(1.5rem, 1.2rem + 1vw, 2rem);

  /* Spacing (4px grid) */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.25rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-20: 5rem;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.25rem;
  --radius-full: 9999px;

  /* Transitions */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 150ms var(--ease);
  --t-normal: 250ms var(--ease);
  --t-slow: 400ms var(--ease);

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.35);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.45);
  --shadow-glow: 0 0 24px rgba(0, 194, 168, 0.15);

  /* Layout */
  --content-max: 1360px;
  --nav-height: 64px;
}

body {
  min-height: 100dvh;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto, 'Helvetica Neue', Arial, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: var(--text-base);
  color: var(--text-primary);
  background: var(--bg);
  line-height: 1.6;
}

a { color: var(--teal); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--teal-hover); }
button { cursor: pointer; background: none; border: none; font: inherit; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }
img, svg { display: block; max-width: 100%; }
table { border-collapse: collapse; width: 100%; }
ul, ol { list-style: none; }

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

::selection {
  background: rgba(0, 194, 168, 0.25);
  color: var(--text-primary);
}

/* ---- Utility Classes ---- */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--sp-6);
}

@media (max-width: 640px) {
  .container { padding: 0 var(--sp-4); }
}

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

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-5);
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-lg);
  transition: all var(--t-fast);
  white-space: nowrap;
  line-height: 1.4;
}

.btn-primary {
  background: var(--teal);
  color: var(--text-inverse);
}
.btn-primary:hover {
  background: var(--teal-hover);
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

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

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover { color: var(--text-primary); background: var(--teal-dim); }

.btn-danger {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid rgba(255, 77, 106, 0.2);
}
.btn-danger:hover { background: rgba(255, 77, 106, 0.18); }

.btn-lg {
  padding: var(--sp-4) var(--sp-8);
  font-size: var(--text-base);
  border-radius: var(--radius-xl);
}

.btn-sm {
  padding: var(--sp-1) var(--sp-3);
  font-size: var(--text-xs);
  border-radius: var(--radius-md);
}

.btn-icon {
  width: 40px; height: 40px;
  padding: 0; display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-md);
}

/* ---- Cards ---- */
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  padding: var(--sp-6);
  transition: all var(--t-normal);
}
.card:hover {
  border-color: var(--card-border-hover);
}
.card-compact { padding: var(--sp-4); border-radius: var(--radius-lg); }

/* ---- Badges ---- */
.badge {
  display: inline-flex; align-items: center; gap: var(--sp-1);
  padding: 2px var(--sp-2);
  font-size: var(--text-xs);
  font-weight: 600;
  border-radius: var(--radius-full);
  line-height: 1.6;
  letter-spacing: 0.02em;
}
.badge-p1 { background: var(--red-dim); color: var(--red); }
.badge-p2 { background: var(--orange-dim); color: var(--orange); }
.badge-p3 { background: var(--amber-dim); color: var(--amber); }
.badge-p4 { background: var(--slate-dim); color: var(--slate); }
.badge-active { background: var(--green-dim); color: var(--green); }
.badge-risk { background: var(--red-dim); color: var(--red); }
.badge-complete { background: var(--blue-dim); color: var(--blue); }
.badge-teal { background: var(--teal-dim); color: var(--teal); }

/* ---- Avatar ---- */
.avatar {
  width: 36px; height: 36px;
  border-radius: var(--radius-full);
  background: var(--teal-dim);
  color: var(--teal);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: var(--text-xs);
  font-weight: 700;
  flex-shrink: 0;
}
.avatar-sm { width: 28px; height: 28px; font-size: 10px; }
.avatar-lg { width: 48px; height: 48px; font-size: var(--text-sm); }

/* ---- Navigation ---- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-height);
  background: rgba(10, 17, 23, 0.85);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--card-border);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--sp-6);
}
.nav-left { display: flex; align-items: center; gap: var(--sp-4); }
.nav-right { display: flex; align-items: center; gap: var(--sp-3); }
.nav-user {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-1) var(--sp-3) var(--sp-1) var(--sp-1);
  border-radius: var(--radius-full);
  background: var(--card);
  border: 1px solid var(--card-border);
}
.nav-user-name {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-primary);
}
.nav-user-org {
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

/* Mobile hamburger */
.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  border-radius: var(--radius-md);
}
.nav-toggle:hover { background: var(--card); }

@media (max-width: 768px) {
  .nav-toggle { display: inline-flex; }
  .nav-user-name, .nav-user-org { display: none; }
  .nav-inner { padding: 0 var(--sp-4); }
}

/* ---- Main Content ---- */
.main {
  padding-top: calc(var(--nav-height) + var(--sp-8));
  padding-bottom: var(--sp-16);
}

/* ---- Hero Welcome Banner ---- */
.hero {
  background: linear-gradient(135deg, rgba(0,194,168,0.15) 0%, rgba(0,194,168,0.03) 60%, transparent 100%);
  border: 1px solid rgba(0,194,168,0.2);
  border-radius: var(--radius-2xl);
  padding: var(--sp-8) var(--sp-8);
  margin-bottom: var(--sp-8);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(0,194,168,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero-greeting {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--sp-2);
  line-height: 1.2;
}
.hero-subtitle {
  font-size: var(--text-base);
  color: var(--text-secondary);
  margin-bottom: var(--sp-5);
}
.hero-contracts {
  display: flex; flex-wrap: wrap; gap: var(--sp-2);
}

@media (max-width: 640px) {
  .hero { padding: var(--sp-6) var(--sp-5); }
  .hero-greeting { font-size: var(--text-xl); }
}

/* ---- Stat Cards ---- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-4);
  margin-bottom: var(--sp-8);
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  padding: var(--sp-5) var(--sp-5);
  transition: all var(--t-normal);
}
.stat-card:hover {
  border-color: var(--card-border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.stat-label {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--sp-2);
}
.stat-value {
  font-size: var(--text-2xl);
  font-weight: 800;
  line-height: 1;
  margin-bottom: var(--sp-1);
}
.stat-change {
  font-size: var(--text-xs);
  color: var(--text-muted);
}
.stat-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--sp-3);
}

@media (max-width: 900px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
  .stat-card { padding: var(--sp-4); }
}

/* ---- Section Headers ---- */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--sp-5);
  gap: var(--sp-4);
}
.section-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
}
.section-subtitle {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-top: var(--sp-1);
}

/* ---- Table ---- */
.table-wrap {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: var(--sp-8);
}
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table-scroll::-webkit-scrollbar { height: 6px; }
.table-scroll::-webkit-scrollbar-track { background: var(--bg); }
.table-scroll::-webkit-scrollbar-thumb { background: var(--card-border); border-radius: 3px; }

.data-table {
  min-width: 800px;
}
.data-table th {
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: left;
  border-bottom: 1px solid var(--card-border);
  background: rgba(0,0,0,0.15);
  white-space: nowrap;
}
.data-table td {
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--text-sm);
  color: var(--text-primary);
  border-bottom: 1px solid rgba(26, 39, 54, 0.5);
  white-space: nowrap;
  vertical-align: middle;
}
.data-table tbody tr {
  cursor: pointer;
  transition: background var(--t-fast);
}
.data-table tbody tr:hover {
  background: rgba(0, 194, 168, 0.04);
}
.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* SLA */
.sla { font-weight: 600; font-variant-numeric: tabular-nums; }
.sla-ok { color: var(--green); }
.sla-warning { color: var(--amber); }
.sla-critical { color: var(--orange); }
.sla-breached { color: var(--red); font-weight: 700; animation: pulse-red 1.5s ease-in-out infinite; }
@keyframes pulse-red { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* Status chips in table */
.status-chip {
  display: inline-flex; align-items: center; gap: var(--sp-1);
  padding: 2px var(--sp-2);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 500;
}
.status-new { background: var(--blue-dim); color: var(--blue); }
.status-in-progress { background: var(--teal-dim); color: var(--teal); }
.status-assigned { background: var(--purple-dim); color: var(--purple); }
.status-pending { background: var(--amber-dim); color: var(--amber); }
.status-resolved { background: var(--green-dim); color: var(--green); }

/* ---- Slide Panel ---- */
.panel-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-normal), visibility var(--t-normal);
}
.panel-overlay.active { opacity: 1; visibility: visible; }

.slide-panel {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(560px, 90vw);
  background: var(--bg-subtle);
  border-left: 1px solid var(--card-border);
  z-index: 201;
  transform: translateX(100%);
  transition: transform var(--t-slow);
  display: flex; flex-direction: column;
  overflow-y: auto;
}
.slide-panel.active { transform: translateX(0); }

.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-5) var(--sp-6);
  border-bottom: 1px solid var(--card-border);
  flex-shrink: 0;
  background: var(--card);
}
.panel-header h2 {
  font-size: var(--text-lg);
  font-weight: 700;
}
.panel-close {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  transition: all var(--t-fast);
}
.panel-close:hover { background: var(--card-hover); color: var(--text-primary); }

.panel-body {
  flex: 1;
  padding: var(--sp-6);
  overflow-y: auto;
}
.panel-body::-webkit-scrollbar { width: 5px; }
.panel-body::-webkit-scrollbar-track { background: transparent; }
.panel-body::-webkit-scrollbar-thumb { background: var(--card-border); border-radius: 3px; }

.panel-section {
  margin-bottom: var(--sp-6);
}
.panel-section-title {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--sp-3);
}

/* ---- Timeline ---- */
.timeline { position: relative; padding-left: var(--sp-6); }
.timeline::before {
  content: '';
  position: absolute; left: 7px; top: 4px; bottom: 4px;
  width: 2px;
  background: var(--card-border);
}
.timeline-item {
  position: relative;
  padding-bottom: var(--sp-5);
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: calc(-1 * var(--sp-6) + 3px);
  top: 4px;
  width: 10px; height: 10px;
  border-radius: var(--radius-full);
  background: var(--card-border);
  border: 2px solid var(--bg-subtle);
}
.timeline-dot.active { background: var(--teal); box-shadow: 0 0 8px rgba(0,194,168,0.4); }
.timeline-time {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-bottom: var(--sp-1);
}
.timeline-text {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ---- Project Cards ---- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: var(--sp-4);
  margin-bottom: var(--sp-8);
}
.project-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  padding: var(--sp-5);
  transition: all var(--t-normal);
}
.project-card:hover {
  border-color: var(--card-border-hover);
  box-shadow: var(--shadow-md);
}
.project-card-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: var(--sp-3);
}
.project-card-title {
  font-size: var(--text-base);
  font-weight: 700;
}
.project-card-phase {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--sp-3);
  line-height: 1.5;
}
.project-card-meta {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: var(--sp-3);
  border-top: 1px solid var(--card-border);
  gap: var(--sp-3);
}
.project-card-link {
  display: inline-flex; align-items: center; gap: var(--sp-1);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--teal);
  transition: all var(--t-fast);
}
.project-card-link:hover { color: var(--teal-hover); }
.project-card-link svg { width: 14px; height: 14px; }

.health-dot {
  width: 8px; height: 8px;
  border-radius: var(--radius-full);
  display: inline-block;
  flex-shrink: 0;
}
.health-up { background: var(--green); box-shadow: 0 0 6px rgba(52, 211, 153, 0.5); }
.health-down { background: var(--red); box-shadow: 0 0 6px rgba(255, 77, 106, 0.5); }

/* ---- Activity Feed ---- */
.activity-feed {
  margin-bottom: var(--sp-8);
}
.activity-item {
  display: flex; align-items: flex-start; gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid rgba(26, 39, 54, 0.4);
  transition: background var(--t-fast);
}
.activity-item:last-child { border-bottom: none; }
.activity-item:hover { background: rgba(0, 194, 168, 0.02); }
.activity-icon {
  width: 32px; height: 32px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: var(--text-sm);
}
.activity-content { flex: 1; min-width: 0; }
.activity-text { font-size: var(--text-sm); color: var(--text-primary); line-height: 1.5; }
.activity-time { font-size: var(--text-xs); color: var(--text-muted); margin-top: var(--sp-1); }

/* ---- Form Styles ---- */
.form-group { margin-bottom: var(--sp-5); }
.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--sp-2);
}
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: var(--sp-3) var(--sp-4);
  background: var(--bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-size: var(--text-sm);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0, 194, 168, 0.12);
}
.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
}
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23506070' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}
.form-textarea {
  resize: vertical;
  min-height: 100px;
}
.form-hint {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: var(--sp-1);
}

/* ---- Modal ---- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 300;
  display: flex; align-items: center; justify-content: center;
  padding: var(--sp-4);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-normal), visibility var(--t-normal);
}
.modal-overlay.active { opacity: 1; visibility: visible; }

.modal {
  background: var(--bg-subtle);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-2xl);
  width: min(600px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px) scale(0.97);
  transition: transform var(--t-slow);
}
.modal-overlay.active .modal {
  transform: translateY(0) scale(1);
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-5) var(--sp-6);
  border-bottom: 1px solid var(--card-border);
}
.modal-header h2 { font-size: var(--text-lg); font-weight: 700; }
.modal-body { padding: var(--sp-6); }
.modal-footer {
  display: flex; align-items: center; justify-content: flex-end; gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-6);
  border-top: 1px solid var(--card-border);
}

/* ---- Mobile Nav Menu ---- */
.mobile-menu {
  position: fixed; inset: 0;
  background: rgba(10, 17, 23, 0.95);
  backdrop-filter: blur(16px);
  z-index: 150;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: var(--sp-6);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-normal), visibility var(--t-normal);
}
.mobile-menu.active { opacity: 1; visibility: visible; }
.mobile-menu-item {
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--text-primary);
  padding: var(--sp-3) var(--sp-6);
  border-radius: var(--radius-lg);
  transition: all var(--t-fast);
}
.mobile-menu-item:hover { background: var(--teal-dim); color: var(--teal); }
.mobile-menu-close {
  position: absolute; top: var(--sp-4); right: var(--sp-4);
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
}
.mobile-menu-close:hover { color: var(--text-primary); }

/* ---- Login Page ---- */
.login-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--sp-6);
  position: relative;
  overflow: hidden;
}
.login-page::before {
  content: '';
  position: absolute;
  top: -200px; left: 50%; transform: translateX(-50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(0,194,168,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.login-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-2xl);
  padding: var(--sp-10) var(--sp-8);
  width: min(420px, 100%);
  text-align: center;
  position: relative;
  z-index: 1;
}
.login-logo { margin: 0 auto var(--sp-6); }
.login-title {
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--sp-2);
}
.login-subtitle {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--sp-8);
}
.login-divider {
  display: flex; align-items: center; gap: var(--sp-3);
  margin: var(--sp-5) 0;
  color: var(--text-muted);
  font-size: var(--text-xs);
}
.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--card-border);
}
.login-footer {
  position: absolute;
  bottom: var(--sp-8);
  left: 50%;
  transform: translateX(-50%);
  font-size: var(--text-xs);
  color: var(--text-muted);
  white-space: nowrap;
}

/* Microsoft button */
.btn-microsoft {
  display: inline-flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-6);
  background: #fff;
  color: #1a1a1a;
  font-weight: 600;
  font-size: var(--text-sm);
  border-radius: var(--radius-lg);
  width: 100%;
  justify-content: center;
  transition: all var(--t-fast);
  border: 1px solid rgba(255,255,255,0.1);
}
.btn-microsoft:hover {
  background: #f0f0f0;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-microsoft svg { flex-shrink: 0; }

/* Demo selector */
.demo-grid {
  display: flex; flex-direction: column; gap: var(--sp-2);
  text-align: left;
}
.demo-option {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--t-fast);
  width: 100%;
  text-align: left;
}
.demo-option:hover {
  border-color: var(--teal);
  background: var(--teal-dim);
}
.demo-option-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
}
.demo-option-org {
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--card-border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--card-border-hover); }

/* ---- Animations ---- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-in {
  animation: fadeUp 0.5s var(--ease) both;
}
.delay-1 { animation-delay: 0.05s; }
.delay-2 { animation-delay: 0.1s; }
.delay-3 { animation-delay: 0.15s; }
.delay-4 { animation-delay: 0.2s; }
.delay-5 { animation-delay: 0.25s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---- Submit Form Page ---- */
.form-page {
  max-width: 640px;
  margin: 0 auto;
}

/* ---- Responsive helpers ---- */
.hide-mobile { display: block; }
.show-mobile { display: none; }
@media (max-width: 768px) {
  .hide-mobile { display: none !important; }
  .show-mobile { display: block !important; }
}

/* Assignee in table */
.assignee {
  display: inline-flex; align-items: center; gap: var(--sp-2);
}

/* Priority dot for compact mobile */
.priority-dot {
  width: 8px; height: 8px;
  border-radius: var(--radius-full);
  display: inline-block;
  flex-shrink: 0;
}

/* Comment input area */
.comment-area {
  display: flex; gap: var(--sp-3);
  margin-top: var(--sp-4);
}
.comment-area .form-input {
  flex: 1;
}

/* SLA bar */
.sla-bar {
  height: 4px;
  border-radius: 2px;
  background: var(--card-border);
  overflow: hidden;
  margin-top: var(--sp-2);
}
.sla-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 1s ease;
}

/* Toast */
.toast {
  position: fixed;
  bottom: var(--sp-6);
  right: var(--sp-6);
  background: var(--card);
  border: 1px solid var(--teal);
  border-radius: var(--radius-xl);
  padding: var(--sp-4) var(--sp-5);
  display: flex; align-items: center; gap: var(--sp-3);
  box-shadow: var(--shadow-lg);
  z-index: 500;
  transform: translateY(100px);
  opacity: 0;
  transition: all var(--t-slow);
}
.toast.active {
  transform: translateY(0);
  opacity: 1;
}
.toast-icon {
  width: 24px; height: 24px;
  color: var(--teal);
}
.toast-text {
  font-size: var(--text-sm);
  font-weight: 500;
}

/* ── All Requests Grid ── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-4);
  flex-wrap: wrap;
  gap: var(--sp-3);
}
.grid-controls {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
}
.grid-search {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1.5px solid rgba(255,255,255,0.2);
  background: #1e2d3d;
  color: #e2e8f0;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  outline: none;
  width: 200px;
  transition: border-color 0.15s;
}
.grid-search:focus { border-color: var(--teal); border-color: var(--teal); background: #243447; }
.grid-search::placeholder { color: #64748b; }
.grid-filter {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1.5px solid rgba(255,255,255,0.2);
  background: #1e2d3d;
  color: #e2e8f0;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2300c2a8' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
  min-width: 130px;
}
.grid-filter:focus {
  border-color: var(--teal);
  background-color: #243447;
}
.grid-filter option {
  background: #1e2d3d;
  color: #e2e8f0;
  font-weight: 500;
  padding: 8px;
}
.requests-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.requests-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.requests-table thead tr {
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--border);
}
.requests-table th {
  padding: 10px 14px;
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  white-space: nowrap;
}
.requests-table th.sortable {
  cursor: pointer;
  user-select: none;
}
.requests-table th.sortable:hover { color: var(--white); }
.requests-table th.sorted { color: var(--teal); }
.sort-icon { opacity: 0.4; font-size: 9px; }
.requests-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
  cursor: pointer;
}
.requests-table tbody tr:last-child { border-bottom: none; }
.requests-table tbody tr:hover { background: rgba(255,255,255,0.03); }
.requests-table td {
  padding: 11px 14px;
  color: var(--muted);
  vertical-align: middle;
}
.td-id { font-family: monospace; color: var(--teal); font-size: 11px; }
.td-subject { color: var(--white); font-weight: 600; max-width: 280px; }
.td-subject .sub-desc { font-size: 11px; color: var(--slate); font-weight: 400; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.td-assignee { display: flex; align-items: center; gap: 6px; }
.td-assignee .mini-avatar { width: 22px; height: 22px; border-radius: 6px; background: rgba(0,194,168,0.15); color: var(--teal); display: flex; align-items: center; justify-content: center; font-size: 8px; font-weight: 700; flex-shrink: 0; }
.sla-cell { font-size: 11px; font-weight: 700; white-space: nowrap; }
.sla-ok { color: #22c55e; }
.sla-warn { color: #f59e0b; }
.sla-breach { color: #ef4444; }
.sla-done { color: var(--slate); }
.grid-empty {
  padding: 40px;
  text-align: center;
  color: var(--slate);
  font-size: 13px;
}
.grid-empty.hidden { display: none; }
@media (max-width: 600px) {
  .grid-controls { flex-direction: column; }
  .grid-search { width: 100%; }
}

/* ── Client AI Assistant ── */
.ai-trigger-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 40px;
  border: none;
  background: var(--teal);
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 24px rgba(0,194,168,0.35);
  transition: all 0.2s;
  z-index: 900;
}
.ai-trigger-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,194,168,0.45);
}
.ai-trigger-label { white-space: nowrap; }

.ai-panel {
  position: fixed;
  bottom: 88px;
  right: 28px;
  width: 380px;
  max-height: 560px;
  background: var(--card);
  border: 1px solid rgba(0,194,168,0.3);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 48px rgba(0,0,0,0.6);
  z-index: 901;
  overflow: hidden;
  animation: slideUpIn 0.2s ease;
}
.ai-panel.hidden { display: none !important; }

@keyframes slideUpIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.ai-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(0,194,168,0.04);
}
.ai-panel-title { display: flex; align-items: center; gap: 10px; }
.ai-avatar-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(0,194,168,0.15);
  color: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.ai-close-btn {
  background: transparent;
  border: none;
  color: var(--slate);
  cursor: pointer;
  font-size: 14px;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s;
}
.ai-close-btn:hover { background: rgba(255,255,255,0.06); color: var(--white); }

.ai-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 280px;
  max-height: 360px;
}
.ai-msg { display: flex; }
.ai-msg--user { justify-content: flex-end; }
.ai-msg--assistant { justify-content: flex-start; }
.ai-msg-bubble {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.55;
}
.ai-msg--user .ai-msg-bubble {
  background: var(--teal);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.ai-msg--assistant .ai-msg-bubble {
  background: rgba(255,255,255,0.05);
  color: var(--white);
  border-bottom-left-radius: 4px;
  border: 1px solid var(--border);
}
.ai-msg--thinking .ai-msg-bubble {
  background: rgba(255,255,255,0.03);
  color: var(--slate);
  font-style: italic;
}
.ai-input-row {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}
.ai-input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--card2);
  color: var(--white);
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s;
}
.ai-input:focus { border-color: var(--teal); }
.ai-send-btn {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: none;
  background: var(--teal);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: opacity 0.15s;
}
.ai-send-btn:hover { opacity: 0.88; }
.ai-safety-note {
  padding: 6px 16px 10px;
  font-size: 10px;
  color: var(--slate);
  text-align: center;
}

@media (max-width: 480px) {
  .ai-panel { width: calc(100vw - 32px); right: 16px; bottom: 80px; }
  .ai-trigger-label { font-size: 13px; }
  .ai-trigger-btn { padding: 12px 18px; border-radius: 40px; width: auto; height: auto; }
}
