/* ==========================================================================
   B. Braun Time Tracker — Enterprise Design System
   ========================================================================== */

/* ---- Design tokens ------------------------------------------------------- */
:root {
  /* Brand */
  --brand-50:  #E6F6EF;
  --brand-100: #C2EAD6;
  --brand-200: #8FD7B5;
  --brand-300: #5BC393;
  --brand-400: #2BB079;
  --brand-500: #009A66;
  --brand-600: #008558;
  --brand-700: #00704A;
  --brand-800: #005C3D;
  --brand-900: #003D29;
  --brand: var(--brand-500);

  /* Neutral scale */
  --gray-25:  #FBFBFC;
  --gray-50:  #F7F8FA;
  --gray-100: #EEF0F3;
  --gray-200: #E3E6EB;
  --gray-300: #CBD0D8;
  --gray-400: #98A1AE;
  --gray-500: #6B7380;
  --gray-600: #4B5260;
  --gray-700: #353A45;
  --gray-800: #1F242E;
  --gray-900: #0F1218;

  /* Semantic */
  --success-50:  #ECFDF3;
  --success-500: #12B76A;
  --success-700: #027A48;
  --warning-50:  #FFFAEB;
  --warning-500: #F79009;
  --warning-700: #B54708;
  --danger-50:   #FEF3F2;
  --danger-500:  #F04438;
  --danger-700:  #B42318;
  --info-50:     #EFF8FF;
  --info-500:    #2E90FA;
  --info-700:    #175CD3;

  /* Surfaces */
  --surface:        var(--gray-50);
  --surface-card:   #FFFFFF;
  --surface-raised: #FFFFFF;
  --border:         var(--gray-200);
  --border-strong:  var(--gray-300);

  /* Effects */
  --shadow-xs: 0 1px 2px 0 rgb(16 24 40 / 0.05);
  --shadow-sm: 0 1px 3px 0 rgb(16 24 40 / 0.08), 0 1px 2px 0 rgb(16 24 40 / 0.05);
  --shadow-md: 0 4px 8px -2px rgb(16 24 40 / 0.10), 0 2px 4px -2px rgb(16 24 40 / 0.06);
  --shadow-lg: 0 12px 24px -6px rgb(16 24 40 / 0.10), 0 4px 8px -4px rgb(16 24 40 / 0.04);
  --ring: 0 0 0 3px rgb(0 154 102 / 0.18);

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-pill: 999px;

  /* Layout */
  --sidebar-width: 248px;
  --sidebar-collapsed: 72px;
  --topbar-height: 60px;

  /* Typography */
  --font-sans: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Code", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

/* ---- Base ---------------------------------------------------------------- */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--gray-800);
  background: var(--surface);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.5;
}

a { color: var(--brand-700); text-decoration: none; }
a:hover { color: var(--brand-800); }

code, pre, .font-mono { font-family: var(--font-mono); }

::selection { background: var(--brand-100); color: var(--brand-900); }

/* Custom scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); background-clip: content-box; border: 2px solid transparent; }

/* ---- App shell (sidebar + content) -------------------------------------- */
.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  min-height: 100vh;
}

/* Sidebar */
.app-sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  background: #FFFFFF;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border);
  height: var(--topbar-height);
  flex-shrink: 0;
}
.sidebar-brand img {
  height: 40px;
  width: auto;
  display: block;
}
.sidebar-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.sidebar-brand-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-900);
  letter-spacing: -0.01em;
}
.sidebar-brand-sub {
  font-size: 0.68rem;
  color: var(--gray-500);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.sidebar-section {
  padding: 20px 12px 8px;
}
.sidebar-section-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0 12px 8px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 12px;
  flex: 1;
  overflow-y: auto;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  color: var(--gray-600);
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
  cursor: pointer;
}
.nav-item:hover {
  background: var(--gray-100);
  color: var(--gray-900);
}
.nav-item.active {
  background: transparent;
  color: var(--brand-700);
  font-weight: 600;
}
.nav-item.active svg { color: var(--brand-600); }
.nav-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--gray-500);
}
.nav-item.active svg { color: var(--brand-600); }
.nav-item-badge {
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--brand-50);
  color: var(--brand-700);
}

/* Collapsible nav group */
.nav-group { display: flex; flex-direction: column; }
.nav-group > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  color: var(--gray-600);
  font-size: 0.875rem;
  font-weight: 500;
  user-select: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary:hover { background: var(--gray-100); color: var(--gray-900); }
.nav-group > summary svg.nav-icon { width: 18px; height: 18px; color: var(--gray-500); flex-shrink: 0; }
.nav-group > summary .nav-caret {
  margin-left: auto;
  width: 14px; height: 14px;
  color: var(--gray-400);
  transition: transform 0.15s ease;
}
.nav-group[open] > summary .nav-caret { transform: rotate(90deg); }
.nav-group[open] > summary { color: var(--gray-900); }
.nav-group.has-active > summary { color: var(--brand-700); font-weight: 600; }
.nav-group.has-active > summary svg.nav-icon { color: var(--brand-600); }
.nav-sub {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 2px 0 4px 30px;
  margin: 2px 0 4px;
  border-left: 1px solid var(--border);
  margin-left: 21px;
}
.nav-sub .nav-item {
  padding: 6px 10px;
  font-size: 0.82rem;
  font-weight: 500;
  gap: 0;
}
.nav-sub .nav-item.active {
  background: transparent;
  color: var(--brand-700);
  font-weight: 600;
}

.sidebar-foot {
  border-top: 1px solid var(--border);
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-foot .avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand-500);
  color: #fff;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.sidebar-foot .avatar img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-foot-info {
  flex: 1;
  min-width: 0;
}
.sidebar-foot-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-foot-sub {
  font-size: 0.72rem;
  color: var(--gray-500);
  font-family: var(--font-mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Main column */
.app-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Top bar (within main column) */
.app-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--topbar-height);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  gap: 16px;
}
.topbar-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gray-900);
  display: flex;
  align-items: center;
  gap: 10px;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Content container — fills full width of .app-main so .page-actions can hug the right edge */
.app-content {
  padding: 28px;
  width: 100%;
}

/* Page header — grid keeps the title block on the left and pins .page-actions to the right edge */
.page-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  column-gap: 16px;
  margin-bottom: 24px;
  margin-right: -28px;
  padding-right: 28px;
}
.page-header > :first-child { min-width: 0; }
.page-title {
  font-size: 1.625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--gray-900);
  line-height: 1.2;
  margin: 0;
}
.page-subtitle {
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-top: 4px;
}
.page-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: nowrap;
  justify-content: flex-end;
  white-space: nowrap;
  justify-self: end;
}
.page-actions > * { flex-shrink: 0; }

/* ---- Cards & sections --------------------------------------------------- */
.card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.card-elevated { box-shadow: var(--shadow-sm); }
.card:hover { box-shadow: var(--shadow-sm); }
.card-pad { padding: 20px; }
.card-pad-lg { padding: 24px; }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
}
.section-head > .page-actions { flex-wrap: nowrap; flex-shrink: 0; }
.section-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-900);
  margin: 0;
}
.section-sub {
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-top: 2px;
}

/* ---- KPI cards ---------------------------------------------------------- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.kpi {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
}
.kpi::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--brand-500);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.kpi-accent::before { opacity: 1; }
.kpi-label {
  font-size: 0.78rem;
  color: var(--gray-500);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 6px;
}
.kpi-value {
  margin-top: 6px;
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--gray-900);
  font-feature-settings: "tnum";
  line-height: 1.1;
}
.kpi-value-brand { color: var(--brand-700); }
.kpi-value-warn  { color: var(--warning-700); }
.kpi-value-danger{ color: var(--danger-700); }
.kpi-meta {
  margin-top: 4px;
  font-size: 0.78rem;
  color: var(--gray-500);
}
.kpi-icon {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--brand-50);
  color: var(--brand-700);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid transparent;
  background: transparent;
  color: var(--gray-700);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
  line-height: 1;
}
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn-sm { padding: 6px 10px; font-size: 0.8rem; }
.btn-lg { padding: 11px 20px; font-size: 0.95rem; }

.btn-primary {
  background: var(--brand-500);
  color: #fff;
  border-color: var(--brand-500);
}
.btn-primary:hover:not(:disabled) { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }

.btn-secondary {
  background: #fff;
  color: var(--gray-800);
  border-color: var(--border-strong);
}
.btn-secondary:hover:not(:disabled) { background: var(--gray-50); border-color: var(--gray-400); }

.btn-ghost {
  background: transparent;
  color: var(--gray-700);
}
.btn-ghost:hover:not(:disabled) { background: var(--gray-100); color: var(--gray-900); }

.btn-danger {
  background: #fff;
  color: var(--danger-700);
  border-color: var(--danger-500);
}
.btn-danger:hover:not(:disabled) { background: var(--danger-50); }

.btn-danger-solid {
  background: var(--danger-500);
  color: #fff;
  border-color: var(--danger-500);
}
.btn-danger-solid:hover:not(:disabled) { background: var(--danger-700); border-color: var(--danger-700); color: #fff; }

.btn-link {
  background: transparent;
  color: var(--brand-700);
  padding: 4px 6px;
}
.btn-link:hover:not(:disabled) { color: var(--brand-800); text-decoration: underline; }

/* ---- Inputs ------------------------------------------------------------- */
.input,
input[type="text"].input,
input[type="email"].input,
input[type="password"].input,
input[type="month"].input,
input[type="datetime-local"].input,
select.input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-family: inherit;
  background: #fff;
  color: var(--gray-900);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input:focus,
.input:focus-visible {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: var(--ring);
}
.input::placeholder { color: var(--gray-400); }

.field { display: block; }
.field-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 6px;
}
.field-help {
  font-size: 0.75rem;
  color: var(--gray-500);
  margin-top: 6px;
}

/* ---- Badges & pills ----------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
}
.badge-brand   { background: var(--brand-50);   color: var(--brand-700);   border-color: var(--brand-100); }
.badge-success { background: var(--success-50); color: var(--success-700); border-color: #B6E7CB; }
.badge-warning { background: var(--warning-50); color: var(--warning-700); border-color: #FEDF89; }
.badge-danger  { background: var(--danger-50);  color: var(--danger-700);  border-color: #FECDCA; }
.badge-info    { background: var(--info-50);    color: var(--info-700);    border-color: #B2DDFF; }
.badge-neutral { background: var(--gray-100);   color: var(--gray-700);    border-color: var(--gray-200); }

.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ---- Banners / alerts --------------------------------------------------- */
.banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  border: 1px solid;
  margin-bottom: 16px;
}
.banner-icon { flex-shrink: 0; width: 18px; height: 18px; margin-top: 1px; }
.banner-body { flex: 1; }
.banner-actions { display: flex; gap: 8px; align-items: center; }
.banner-info    { background: var(--info-50);    color: var(--info-700);    border-color: #B2DDFF; }
.banner-success { background: var(--success-50); color: var(--success-700); border-color: #B6E7CB; }
.banner-warning { background: var(--warning-50); color: var(--warning-700); border-color: #FEDF89; }
.banner-danger  { background: var(--danger-50);  color: var(--danger-700);  border-color: #FECDCA; }
.banner-brand   { background: var(--brand-50);   color: var(--brand-800);   border-color: var(--brand-100); }

/* ---- Tables ------------------------------------------------------------- */
.table-wrap {
  overflow: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: #fff;
}
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.875rem;
}
.table thead th {
  position: sticky;
  top: 0;
  background: var(--gray-50);
  text-align: left;
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-500);
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  z-index: 1;
}
.table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-800);
  vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: var(--gray-50); }
.table .num { font-variant-numeric: tabular-nums; text-align: right; font-family: var(--font-mono); }

/* ---- Tabs / segmented control ------------------------------------------ */
.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--gray-100);
  border-radius: var(--radius-md);
  width: fit-content;
}
.tab-btn {
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-600);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tab-btn:hover { color: var(--gray-900); }
.tab-btn.active {
  background: #fff;
  color: var(--brand-700);
  box-shadow: var(--shadow-xs);
  font-weight: 600;
}

/* ---- Empty state -------------------------------------------------------- */
.empty {
  text-align: center;
  padding: 40px 24px;
  color: var(--gray-500);
}
.empty-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  border-radius: var(--radius-lg);
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
}
.empty-title { color: var(--gray-800); font-weight: 600; font-size: 0.95rem; margin-bottom: 4px; }
.empty-sub { font-size: 0.85rem; }

/* ---- Tile (metric / project tile) -------------------------------------- */
.tile {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
  position: relative;
}
.tile:hover { border-color: var(--brand-300); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.tile-head { font-size: 0.78rem; color: var(--gray-500); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.tile-key  { display: block; font-size: 0.95rem; font-weight: 700; color: var(--brand-700); font-family: var(--font-mono); }
.tile-name { font-size: 0.75rem; color: var(--gray-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.tile-value { font-size: 1.4rem; font-weight: 700; color: var(--gray-900); margin-top: 6px; font-feature-settings: "tnum"; }
.tile-sub  { font-size: 0.72rem; color: var(--gray-500); margin-top: 2px; }

/* ---- Auth / public layout ---------------------------------------------- */
.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  background: #fff;
}
.auth-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 64px;
}
.auth-form-wrap {
  max-width: 440px;
  width: 100%;
  margin: 0 auto;
}
.auth-logo img { height: 64px; width: auto; display: block; }
.auth-side {
  background: linear-gradient(135deg, var(--brand-700) 0%, var(--brand-500) 60%, var(--brand-400) 100%);
  color: #fff;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  overflow: hidden;
}
.auth-side::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,0.15) 0, transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(255,255,255,0.10) 0, transparent 40%);
  pointer-events: none;
}
.auth-side-content { position: relative; z-index: 1; max-width: 440px; }
.auth-side h2 { font-size: 1.875rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 12px; }
.auth-side p  { font-size: 0.95rem; opacity: 0.92; line-height: 1.55; }
.auth-feature {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 20px;
  font-size: 0.9rem;
}
.auth-feature-bullet {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
@media (max-width: 960px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-side  { display: none; }
  .auth-panel { padding: 40px 24px; }
}

/* ---- Utilities ---------------------------------------------------------- */
.flex-row { display: flex; align-items: center; gap: 8px; }
.flex-col { display: flex; flex-direction: column; gap: 8px; }
.spacer   { flex: 1; }
.hidden   { display: none !important; }

/* Spinner */
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-bottom-color: transparent;
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Progress bar */
.progress {
  width: 100%;
  height: 6px;
  background: var(--gray-100);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: var(--brand-500);
  border-radius: inherit;
  transition: width 0.3s ease;
}
.progress-bar.indeterminate {
  width: 40% !important;
  animation: indet 1.4s ease-in-out infinite;
}
@keyframes indet {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

/* Mobile: collapse sidebar */
@media (max-width: 1024px) {
  .app-shell { grid-template-columns: var(--sidebar-collapsed) 1fr; }
  .app-sidebar .sidebar-text,
  .app-sidebar .sidebar-brand-text,
  .app-sidebar .sidebar-foot-info,
  .app-sidebar .sidebar-section-label,
  .app-sidebar .nav-item-badge { display: none; }
  .app-sidebar .nav-item { justify-content: center; padding: 10px; }
  .app-sidebar .sidebar-brand { justify-content: center; padding: 12px; }
  .app-sidebar .sidebar-foot { justify-content: center; }
  .app-content { padding: 20px; }
  .app-topbar { padding: 0 20px; }
}
@media (max-width: 640px) {
  .app-shell { grid-template-columns: 1fr; }
  .app-sidebar { display: none; }
  .app-content { padding: 16px; }
  .app-topbar  { padding: 0 16px; }
}
