/* =====================================================
   ARTIST OS — UNTZIG  |  Design System v3.0
   Token source of truth: design-tokens.json
   ===================================================== */

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

/* ── Structural Tokens (theme-independent) ── */
:root {
  --sidebar-w:   56px;
  --topbar-h:    56px;

  /* Spacing Scale */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  /* Radius */
  --radius:    8px;
  --radius-sm: 6px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Typography */
  --font:      'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Mono', 'Consolas', monospace;

  /* Motion Library */
  --ease-spring: cubic-bezier(.34,1.56,.64,1);
  --ease-out:    cubic-bezier(.4,0,.2,1);
  --ease-linear: linear;
  --dur-fast:    120ms;
  --dur-base:    200ms;
  --dur-slow:    320ms;
}

/* ── Dark Theme (default) ── */
:root[data-theme="dark"] {
  --bg:          #0A0B0E;
  --surface:     #111318;
  --surface-2:   #181B22;
  --surface-3:   #1E2130;
  --border:      rgba(255,255,255,.07);
  --border-2:    rgba(255,255,255,.12);

  --accent:      #7B5EF8;
  --accent-2:    #3B86CC;
  --accent-dim:  rgba(123,94,248,.14);
  --accent-hover:#6A4EE0;

  --text:        #F2F4F8;
  --text-2:      #8891A8;
  --text-3:      #5C6485;

  --green:       #22D3A0;
  --yellow:      #F0A500;
  --red:         #F23645;
  --blue:        #3B86CC;
  --purple:      #7B5EF8;

  --green-dim:   rgba(34,211,160,.10);
  --yellow-dim:  rgba(240,165,0,.10);
  --red-dim:     rgba(242,54,69,.10);
  --blue-dim:    rgba(59,134,204,.10);
  --purple-dim:  rgba(123,94,248,.10);

  --shadow-sm:   0 1px 3px rgba(0,0,0,.30), 0 1px 2px rgba(0,0,0,.20);
  --shadow:      0 4px 16px rgba(0,0,0,.40), 0 1px 4px rgba(0,0,0,.20);
  --shadow-lg:   0 10px 40px rgba(0,0,0,.50), 0 2px 8px rgba(0,0,0,.20);
}

/* ── Grey Theme ── */
:root[data-theme="grey"] {
  --bg:          #1C1E24;
  --surface:     #25282F;
  --surface-2:   #2C2F38;
  --surface-3:   #33363F;
  --border:      #3A3D47;
  --border-2:    #444752;

  --accent:      #7B5EF8;
  --accent-2:    #3B86CC;
  --accent-dim:  rgba(123,94,248,.12);
  --accent-hover:#6A4EE0;

  --text:        #E8EAF0;
  --text-2:      #9EA3B0;
  --text-3:      #6B6F7C;

  --green:       #22D3A0;
  --yellow:      #F0A500;
  --red:         #F23645;
  --blue:        #3B86CC;
  --purple:      #7B5EF8;

  --green-dim:   rgba(34,211,160,.10);
  --yellow-dim:  rgba(240,165,0,.10);
  --red-dim:     rgba(242,54,69,.10);
  --blue-dim:    rgba(59,134,204,.10);
  --purple-dim:  rgba(123,94,248,.10);

  --shadow-sm:   0 1px 3px rgba(0,0,0,.25), 0 1px 2px rgba(0,0,0,.15);
  --shadow:      0 4px 16px rgba(0,0,0,.32), 0 1px 4px rgba(0,0,0,.16);
  --shadow-lg:   0 10px 40px rgba(0,0,0,.40), 0 2px 8px rgba(0,0,0,.16);
}

/* ── Light Theme ── */
:root[data-theme="light"] {
  --bg:          #F4F5F7;
  --surface:     #FFFFFF;
  --surface-2:   #F8F9FB;
  --surface-3:   #EEF0F4;
  --border:      #E3E6EC;
  --border-2:    #D0D5E0;

  --accent:      #6B4FE0;
  --accent-2:    #2563EB;
  --accent-dim:  rgba(107,79,224,.08);
  --accent-hover:#5A3FCA;

  --text:        #111827;
  --text-2:      #4B5563;
  --text-3:      #9CA3AF;

  --green:       #16A34A;
  --yellow:      #D97706;
  --red:         #DC2626;
  --blue:        #2563EB;
  --purple:      #7C3AED;

  --green-dim:   rgba(22,163,74,.08);
  --yellow-dim:  rgba(217,119,6,.08);
  --red-dim:     rgba(220,38,38,.08);
  --blue-dim:    rgba(37,99,235,.08);
  --purple-dim:  rgba(124,58,237,.08);

  --shadow-sm:   0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow:      0 4px 16px rgba(0,0,0,.10), 0 1px 4px rgba(0,0,0,.06);
  --shadow-lg:   0 10px 40px rgba(0,0,0,.14), 0 2px 8px rgba(0,0,0,.06);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; }
body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  background: var(--bg);
  color: var(--text);
  height: 100%;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
input, select, textarea {
  font: inherit;
  font-size: max(16px, 1em); /* prevents iOS auto-zoom on focus */
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
  width: 100%;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input[type="checkbox"], input[type="radio"] {
  width: auto;
  height: auto;
  padding: 0;
  border: none;
  background: none;
  font-size: inherit;
  flex-shrink: 0;
  cursor: pointer;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(107,79,224,.12);
}
textarea { resize: vertical; min-height: 80px; }
select option { background: var(--surface); }
img { display: block; max-width: 100%; }

/* ── Shell Layout ── */
#shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  height: 100vh;
  height: 100dvh; /* mobile browsers: excludes collapsing chrome bar */
}
#content { display: flex; flex-direction: column; overflow: hidden; }

/* ── Sidebar / Icon Rail ── */
#sidebar {
  background: var(--surface);
  border-right: 1.5px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 0 0 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  width: 56px;
  min-width: 56px;
  transition: width var(--dur-base) var(--ease-out);
  position: relative;
  z-index: 50;
}
#sidebar:hover {
  width: 220px;
  overflow-y: auto;
  box-shadow: 4px 0 32px rgba(0,0,0,.5);
}

/* ── Desktop: Sidebar always expanded ── */
@media (min-width: 901px) {
  :root { --sidebar-w: 220px; }
  #shell { grid-template-columns: 220px 1fr; }
  #sidebar {
    width: 220px;
    min-width: 220px;
    overflow-y: auto;
  }
  #sidebar:hover { box-shadow: var(--shadow-sm); }
  #sidebar .sidebar-logo { padding: 30px 18px 28px; justify-content: flex-start; }
  #sidebar .sidebar-logo-sub { display: block; }
  #sidebar .sidebar-section-label { display: block; }
  #sidebar .nav-item {
    justify-content: flex-start;
    padding: 8px 12px 8px 16px;
    width: calc(100% - 16px);
    margin: 1px 8px;
    overflow: visible;
  }
  #sidebar .nav-item > span:not(.nav-icon) { max-width: 160px; opacity: 1; }
  #sidebar .nav-badge { display: inline-block; }
  #sidebar .sidebar-bottom { display: block; }
}
.sidebar-logo {
  padding: 30px 0 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-bottom: 1.5px solid var(--border);
  margin-bottom: 10px;
  overflow: hidden;
  white-space: nowrap;
  transition: padding var(--dur-base) var(--ease-out);
}
#sidebar:hover .sidebar-logo {
  padding: 30px 18px 28px;
  justify-content: flex-start;
}
.sidebar-logo-img {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.sidebar-logo-svg {
  height: 22px;
  width: auto;
  display: block;
  max-width: 140px;
  color: var(--text);
}
.sidebar-logo-text {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #ffffff;
  line-height: 1;
}
.inv-logo-text {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #000;
  line-height: 1;
}
.sidebar-logo-sub {
  font-size: 10px;
  color: var(--text-3);
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 500;
  /* Hidden when rail is collapsed */
  display: none;
}
#sidebar:hover .sidebar-logo-sub { display: block; }

.sidebar-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 10px 20px 4px;
  display: none;
  white-space: nowrap;
}
#sidebar:hover .sidebar-section-label { display: block; }
/* Rail: icon-only in collapsed state */
.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 0;
  margin: 2px auto;
  border-radius: var(--radius);
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 500;
  transition: background .1s, color .1s;
  position: relative;
  width: 40px;
  justify-content: center;
  overflow: hidden;
  text-align: left;
}
.nav-item:hover { background: var(--surface-3); color: var(--text); }
.nav-item.is-active { background: var(--accent-dim); color: var(--accent); font-weight: 600; }

/* Expanded state: full label */
#sidebar:hover .nav-item {
  justify-content: flex-start;
  padding: 8px 12px 8px 16px;
  width: calc(100% - 16px);
  margin: 1px 8px;
  overflow: visible;
}

/* Text label: hidden when collapsed */
.nav-item > span:not(.nav-icon) {
  white-space: nowrap;
  overflow: hidden;
  max-width: 0;
  opacity: 0;
  transition: opacity .1s, max-width .0s;
}
#sidebar:hover .nav-item > span:not(.nav-icon) {
  max-width: 160px;
  opacity: 1;
  transition: opacity .15s .1s;
}

.nav-icon { width: 20px; height: 20px; opacity: .7; flex-shrink: 0; }
.nav-item.is-active .nav-icon { opacity: 1; }

.nav-badge {
  margin-left: auto;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 99px;
  padding: 1px 6px;
  min-width: 18px;
  text-align: center;
  display: none;
}
#sidebar:hover .nav-badge { display: inline-block; }
.sidebar-bottom {
  margin-top: auto;
  padding: 16px 10px 8px;
  border-top: 1.5px solid var(--border);
  display: none;
  overflow: visible;
  flex-shrink: 0;
}
#sidebar:hover .sidebar-bottom { display: block; }
.mode-toggle { display: flex; background: var(--surface-3); border-radius: var(--radius); padding: 3px; gap: 2px; }
.mode-btn {
  flex: 1; padding: 6px 8px; border-radius: 6px;
  font-size: 11.5px; font-weight: 600; color: var(--text-2);
  text-align: center; transition: all .12s;
}
.mode-btn.is-active { background: var(--surface); color: var(--accent); box-shadow: var(--shadow-sm); }

/* ── Topbar ── */
#topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 12px;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}
.topbar-title { font-size: 15px; font-weight: 700; flex: 1; color: var(--text); }
.topbar-artist {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 12px;
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: border-color .12s;
}
.topbar-artist:hover { border-color: var(--accent); }
.topbar-artist-dot { width: 8px; height: 8px; background: var(--green); border-radius: 50%; flex-shrink: 0; }

/* Hamburger + Back — hidden on desktop, shown on mobile */
.hamburger-btn, .back-btn {
  display: none;
  align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: var(--radius);
  color: var(--text-2); flex-shrink: 0;
  transition: background .12s, color .12s;
}
.hamburger-btn:hover, .back-btn:hover { background: var(--surface-3); color: var(--text); }

/* Sidebar close button */
.sidebar-close-btn {
  display: none;
  align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: var(--radius);
  color: var(--text-3); margin-left: auto; flex-shrink: 0;
  transition: background .12s, color .12s;
}
.sidebar-close-btn:hover { background: var(--surface-3); color: var(--text); }

/* ── Main ── */
#main { flex: 1; overflow-y: auto; padding: 24px; -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain; }

/* ── Page Header ── */
.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 24px; gap: 16px; flex-wrap: wrap;
}
.page-header-left { flex: 1; }
.page-title { font-size: 22px; font-weight: 800; line-height: 1.2; color: var(--text); }
.page-sub { font-size: 13px; color: var(--text-3); margin-top: 3px; font-weight: 500; }
.page-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--radius);
  font-size: 13px; font-weight: 600; transition: all .12s; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 1px 4px rgba(107,79,224,.3); }
.btn-primary:hover { background: var(--accent-hover); box-shadow: 0 2px 8px rgba(107,79,224,.4); }
.btn-secondary { background: var(--surface); color: var(--text); border: 1.5px solid var(--border); box-shadow: var(--shadow-sm); }
.btn-secondary:hover { background: var(--surface-2); border-color: var(--border-2); }
.btn-ghost { background: transparent; color: var(--text-2); border: 1.5px solid var(--border); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-danger { background: var(--red-dim); color: var(--red); border: 1.5px solid rgba(220,38,38,.15); }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-sm  { padding: 6px 12px; font-size: 12.5px; }
.btn-xs  { padding: 3px 9px; font-size: 11.5px; border-radius: 6px; }
.btn-icon { padding: 7px; border-radius: var(--radius); }

/* ── Badges ── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px; border-radius: 99px; font-size: 11px; font-weight: 600; letter-spacing: .01em;
}
.badge-green  { background: var(--green-dim);  color: var(--green); }
.badge-yellow { background: var(--yellow-dim); color: var(--yellow); }
.badge-red    { background: var(--red-dim);    color: var(--red); }
.badge-blue   { background: var(--blue-dim);   color: var(--blue); }
.badge-purple { background: var(--purple-dim); color: var(--purple); }
.badge-grey   { background: var(--surface-3);  color: var(--text-2); border: 1px solid var(--border); }

/* ── Tag Toggles ── */
.tag-toggles { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tag-toggle-btn {
  display: inline-flex; align-items: center;
  padding: 4px 10px; border-radius: 99px;
  font-size: 11px; font-weight: 600; letter-spacing: .01em;
  background: var(--surface-3); color: var(--text-3);
  border: 1.5px solid var(--border);
  cursor: pointer; transition: all .12s;
}
.tag-toggle-btn:hover { border-color: var(--border-2); color: var(--text-2); }
.tag-toggle-btn.is-active { border-color: transparent; }
.tag-active-green  { background: var(--green-dim);  color: var(--green);  border-color: var(--green) !important; }
.tag-active-blue   { background: var(--blue-dim);   color: var(--blue);   border-color: var(--blue) !important; }
.tag-active-yellow { background: var(--yellow-dim); color: var(--yellow); border-color: var(--yellow) !important; }
.tag-active-purple { background: var(--purple-dim); color: var(--purple); border-color: var(--purple) !important; }

/* ── Stat Cards ── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 12px; margin-bottom: 24px;
}
.stat-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 16px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .15s, border-color .15s;
}
.stat-card:hover { box-shadow: var(--shadow); border-color: var(--border-2); }
.stat-label { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: .07em; font-weight: 700; }
.stat-value { font-size: 22px; font-weight: 700; margin: 5px 0 3px; line-height: 1; color: var(--text); font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.stat-note  { font-size: 11.5px; color: var(--text-3); font-weight: 500; }
.stat-card.accent { border-color: var(--accent); background: var(--accent-dim); }
.stat-card.accent .stat-value { color: var(--accent); }

/* ── Cards ── */
.card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.card + .card { margin-top: 12px; }
.card-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .09em; color: var(--text-3); margin-bottom: 16px;
  display: flex; align-items: center; justify-content: space-between;
}
.card-title-count {
  background: var(--surface-3); color: var(--text-2); border-radius: 99px;
  font-size: 11px; font-weight: 700; padding: 2px 8px;
}

/* ── Table ── */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
  text-align: left; padding: 10px 14px;
  font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--text-3);
  border-bottom: 1.5px solid var(--border);
  background: var(--surface-2);
  white-space: nowrap;
}
.data-table th:first-child { border-radius: var(--radius-lg) 0 0 0; }
.data-table th:last-child  { border-radius: 0 var(--radius-lg) 0 0; }
.data-table td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr { cursor: pointer; transition: background .08s; }
.data-table tbody tr:hover { background: var(--surface-2); }
.cell-strong { font-weight: 600; color: var(--text); }
.cell-sub { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.cell-mono { font-family: var(--font-mono); font-size: 12px; color: var(--text-2); }

/* ── Tabs ── */
.tabs {
  display: flex; gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 22px; overflow-x: auto;
}
.tab {
  padding: 10px 16px; font-size: 13px; font-weight: 500;
  color: var(--text-2); border-bottom: 2px solid transparent;
  margin-bottom: -2px; white-space: nowrap;
  transition: color .12s, border-color .12s;
}
.tab:hover { color: var(--text); }
.tab.is-active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

/* ── Info Grid ── */
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.info-card {
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.info-card-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .09em; color: var(--text-3); margin-bottom: 5px;
}
.info-card-value { font-size: 13.5px; color: var(--text); line-height: 1.5; font-weight: 500; }
.info-card-value a { color: var(--accent-2); }

/* ── Timeline ── */
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-item {
  display: grid; grid-template-columns: 104px 1fr; gap: 12px;
  padding: 11px 0; border-bottom: 1px solid var(--border); align-items: flex-start;
}
.timeline-item:last-child { border-bottom: none; }
.timeline-time {
  font-size: 12px; font-weight: 600; color: var(--accent-2);
  padding-top: 2px; font-family: var(--font-mono); white-space: nowrap;
}
.timeline-content strong { display: block; font-size: 13.5px; font-weight: 600; }
.timeline-content small { font-size: 12px; color: var(--text-3); }

/* ── Warning List ── */
.warning-list { display: flex; flex-direction: column; gap: 6px; }
.warning-item {
  display: flex; align-items: flex-start; gap: 10px;
  background: #FFFBF0; border: 1.5px solid #FDE68A;
  border-radius: var(--radius); padding: 10px 14px; font-size: 13px;
}
.warning-item.is-danger { background: #FFF5F5; border-color: #FECACA; }
.warning-item-icon { flex-shrink: 0; margin-top: 1px; color: var(--yellow); }
.warning-item.is-danger .warning-item-icon { color: var(--red); }
.warning-item-body strong { display: block; font-size: 12.5px; font-weight: 600; color: var(--text); }
.warning-item-body small { color: var(--text-3); font-size: 11.5px; }

/* ── Forms / Fields ── */
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--text-2); }

/* ── Sections ── */
.section { margin-bottom: 26px; }
.section-title {
  font-size: 13px; font-weight: 700; margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px; color: var(--text);
}
.divider { border: none; border-top: 1.5px solid var(--border); margin: 20px 0; }

/* ── Empty State ── */
.empty-state {
  text-align: center; padding: 48px 24px;
  color: var(--text-3); font-size: 14px; font-weight: 500;
}

/* ── Gig Row ── */
.gig-row {
  display: grid; grid-template-columns: 80px 1fr auto; gap: 12px; align-items: center;
  background: var(--surface); border: 1.5px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: var(--radius); padding: 12px 16px;
  cursor: pointer; transition: all .12s; width: 100%; text-align: left;
  box-shadow: var(--shadow-sm);
}
.gig-row:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.gig-row.is-active { border-color: var(--accent); background: var(--accent-dim); }

/* Status-Farbe als linker Border-Accent — per :has(), kein JS nötig */
.gig-row:has(.badge-green)  { border-left-color: var(--green); }
.gig-row:has(.badge-yellow) { border-left-color: var(--yellow); }
.gig-row:has(.badge-red)    { border-left-color: var(--red); }
.gig-row:has(.badge-grey)   { border-left-color: var(--text-3); }
.gig-row:has(.badge-blue)   { border-left-color: var(--blue); }
.gig-row:has(.badge-purple) { border-left-color: var(--purple); }

/* Status-Farbe auch in Tabellen — box-shadow als Border weil border-collapse:collapse */
.data-table tbody tr:has(.badge-green)  td:first-child { box-shadow: inset 3px 0 0 var(--green); }
.data-table tbody tr:has(.badge-yellow) td:first-child { box-shadow: inset 3px 0 0 var(--yellow); }
.data-table tbody tr:has(.badge-red)    td:first-child { box-shadow: inset 3px 0 0 var(--red); }
.data-table tbody tr:has(.badge-purple) td:first-child { box-shadow: inset 3px 0 0 var(--purple); }
.gig-row-date { font-size: 12px; font-weight: 600; color: var(--accent-2); font-family: var(--font-mono); }
.gig-row-body strong { font-size: 14px; display: block; color: var(--text); }
.gig-row-body small { font-size: 12px; color: var(--text-3); }
.gig-row-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }

/* ── Dashboard Grid ── */
.dashboard-grid { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; }
.dashboard-col { display: flex; flex-direction: column; gap: 14px; }

/* ── Role Pill ── */
.role-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: var(--radius-full);
  font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}
.role-pill-mgmt {
  background: var(--accent-dim); color: var(--accent);
  border: 1px solid rgba(123,94,248,.20);
}
.role-pill-artist {
  background: var(--green-dim); color: var(--green);
  border: 1px solid rgba(34,211,160,.20);
}

/* ── Artist Today View ── */
.artist-today-wrap .today-header { margin-bottom: 20px; }
.artist-today-greeting {
  font-size: 22px; font-weight: 800; letter-spacing: -.02em; color: var(--text);
}
.artist-today-badge {
  display: inline-flex; align-items: center;
  padding: 4px 12px; border-radius: var(--radius-full);
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  background: var(--green-dim); color: var(--green);
  border: 1px solid rgba(34,211,160,.20);
}
.artist-today-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.artist-next-gig { border-left: 3px solid var(--green); }

.artist-info-card {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border-radius: var(--radius-lg);
  border: 1.5px solid var(--border); background: var(--surface);
}
.artist-info-warn  { border-color: var(--yellow); background: var(--yellow-dim); }
.artist-info-ok    { border-color: var(--green);  background: var(--green-dim); }
.artist-info-neutral { border-color: var(--border); }
.artist-info-body { flex: 1; min-width: 0; }
.artist-info-title { font-size: 13px; font-weight: 600; color: var(--text); }
.artist-info-sub { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.artist-info-badge { font-size: 11px; font-weight: 700; white-space: nowrap; }

.artist-fee-note {
  display: flex; align-items: center; gap: 6px;
  margin-top: 24px; padding: 10px 14px; border-radius: var(--radius-lg);
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: 12px; color: var(--text-3);
}

/* ── Management Fee Widget (Finance Bento) ── */
.money-mgmt-fee-card {
  grid-column: 1 / -1;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
}

/* ── Management Fee Settings ── */
.fee-model-option {
  flex: 1; cursor: pointer; padding: 12px 14px;
  border: 1.5px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface); transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.fee-model-option.is-selected {
  border-color: var(--accent); background: var(--accent-dim);
}
.fee-model-label { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.fee-model-desc  { font-size: 11px; color: var(--text-3); }

/* ── Finance Money Board ── */
.money-bento {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}
.money-forecast-card {
  grid-column: 3 / 4;
  grid-row: 2 / span 3;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
}
.money-hero-card {
  grid-column: 1 / 3;
  background: linear-gradient(135deg, var(--surface) 0%, rgba(123,94,248,.08) 100%);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px 28px;
}
.money-hero-value {
  font-size: 40px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text);
  line-height: 1;
  margin: 6px 0 16px;
}
.money-hero-progress {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 8px;
}
.money-progress-bar {
  height: 100%;
  background: var(--green);
  border-radius: 2px;
  transition: width .5s ease;
}
.money-hero-sub { font-size: 12px; color: var(--text-3); }
.money-stat-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.money-stat-card.money-stat-alert {
  border-color: rgba(240,165,0,.5);
  background: rgba(240,165,0,.04);
}
.money-stat-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--text-3);
  margin-bottom: 4px;
}
.money-stat-value {
  font-size: 22px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text);
  line-height: 1.1;
}
.money-stat-note { font-size: 11px; color: var(--text-3); margin-top: 3px; }
.money-action-card {
  grid-column: span 2;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
}
.money-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}
.money-action-row:last-of-type { border-bottom: none; }
.money-action-gig { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
/* ── Finance Timeline ── */
.money-timeline-wrap { margin-bottom: 24px; }
.money-timeline {
  position: relative;
  height: 36px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: visible;
}
.money-timeline::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 16px; right: 16px;
  height: 1px;
  background: var(--border-2);
  transform: translateY(-50%);
}
.money-tl-dot {
  position: absolute;
  top: 50%;
  width: 12px; height: 12px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  cursor: pointer;
  border: 2px solid var(--bg);
  transition: transform .15s;
  z-index: 2;
}
.money-tl-dot:hover { transform: translate(-50%, -50%) scale(1.6); z-index: 10; }
.money-tl-tooltip {
  display: none;
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 11px;
  white-space: nowrap;
  color: var(--text);
  z-index: 20;
  pointer-events: none;
}
.money-tl-dot:hover .money-tl-tooltip { display: block; }
.money-timeline-now {
  position: absolute;
  top: 0; bottom: 0;
  transform: translateX(-50%);
  z-index: 5;
  pointer-events: none;
}
.money-timeline-now-line {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 2px;
  background: var(--accent);
  opacity: .5;
}
.money-timeline-now-dot {
  position: absolute;
  top: 50%; left: 50%;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  transform: translate(-50%, -50%);
}
@media (max-width: 900px) {
  .money-bento { grid-template-columns: 1fr 1fr; }
  .money-hero-card { grid-column: 1 / 3; }
  .money-forecast-card { grid-column: 1 / 3; grid-row: auto; }
  .money-action-card { grid-column: 1 / 3; }
}
/* ── Finance ── */
.finance-grid { display: grid; grid-template-columns: 1fr 400px; gap: 20px; align-items: start; }

/* ── Invoice Paper (App preview) ── */
.invoice-paper {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  font-size: 13px;
  line-height: 1.7;
  box-shadow: var(--shadow);
}
.invoice-paper h3 { font-size: 16px; font-weight: 700; margin: 8px 0 14px; }
.invoice-address { margin: 12px 0; font-size: 13px; }
.invoice-lines {
  display: grid; grid-template-columns: 28px 1fr auto;
  gap: 4px 12px; margin: 12px 0; padding: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius); align-items: center;
  font-size: 13px;
}
.invoice-total { font-size: 17px; font-weight: 700; margin-top: 12px; padding-top: 12px; border-top: 1.5px solid var(--border-2); }
.invoice-cmd {
  background: #F0F9FF; border: 1px solid #BAE6FD;
  border-radius: var(--radius); padding: 10px 14px;
  font-family: var(--font-mono); font-size: 11px; color: #0369A1; margin-top: 12px; word-break: break-all;
}

/* ── UNTZIG Invoice Print Layout ── */
.invoice-print-container {
  background: #fff;
  max-width: 740px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 13px;
  color: #111;
  line-height: 1.6;
  padding: 40px;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-lg);
}
.inv-header { margin-bottom: 40px; }
.inv-logo {
  display: block;
  margin-bottom: 36px;
}
.inv-addresses {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 32px;
  font-size: 13px;
}
.inv-address-block { line-height: 1.8; }
.inv-address-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: #777; margin-bottom: 4px; }
.inv-title-block { margin-bottom: 20px; }
.inv-title { font-size: 15px; font-weight: 700; color: #111; padding-bottom: 8px; border-bottom: 1.5px solid #ddd; margin-bottom: 10px; }
.inv-meta-grid { display: grid; grid-template-columns: 120px 1fr; gap: 2px 12px; font-size: 13px; }
.inv-meta-label { color: #555; }
.inv-meta-value { color: #111; }
.inv-table { width: 100%; border-collapse: collapse; margin: 24px 0 16px; font-size: 13px; }
.inv-table th {
  background: #F3F4F6; text-align: left;
  padding: 9px 12px; font-weight: 700; font-size: 12px;
  border-bottom: 1.5px solid #ddd;
}
.inv-table th:last-child { text-align: right; }
.inv-table td { padding: 9px 12px; border-bottom: 1px solid #eee; }
.inv-table td:last-child { text-align: right; font-weight: 600; }
.inv-table .inv-total td { font-weight: 800; font-size: 14px; background: #F9FAFB; border-top: 1.5px solid #ddd; }
.inv-bank-section { margin-top: 24px; padding-top: 20px; border-top: 1.5px solid #ddd; }
.inv-bank-title { font-size: 13px; font-weight: 700; color: #111; margin-bottom: 10px; }
.inv-abrech { font-size: 13px; margin-bottom: 16px; color: #111; }
.inv-bank-grid { display: grid; grid-template-columns: 140px 1fr; gap: 4px 12px; font-size: 13px; }
.inv-bank-label { color: #555; }
.inv-bank-value { color: #111; font-weight: 500; }
.inv-footer { margin-top: 40px; padding-top: 16px; border-top: 1px solid #eee; font-size: 12px; color: #555; }

/* ── CRM ── */
.crm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.crm-card {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px;
  cursor: pointer; transition: all .12s; box-shadow: var(--shadow-sm);
}
.crm-card:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.crm-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.crm-card-name { font-size: 15px; font-weight: 700; color: var(--text); }
.crm-card-meta { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--text-2); }

/* ── Artist Profile ── */
.artist-card {
  display: grid; grid-template-columns: 180px 1fr; gap: 24px;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius-xl); padding: 24px; margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.artist-photo-placeholder {
  width: 180px; height: 180px;
  background: linear-gradient(135deg, var(--accent-dim), var(--surface-3));
  border-radius: var(--radius-lg); display: flex;
  align-items: center; justify-content: center;
  font-size: 48px; color: var(--text-3); border: 1.5px solid var(--border);
}
.artist-name { font-size: 24px; font-weight: 800; color: var(--text); }
.artist-tagline { font-size: 13.5px; color: var(--text-2); margin-top: 6px; line-height: 1.7; }
.artist-socials { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.social-pill {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--surface-2); border: 1.5px solid var(--border);
  border-radius: 99px; padding: 5px 12px; font-size: 12px; font-weight: 600; color: var(--text);
  transition: all .12s;
}
.social-pill:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* ── Vertical Timeline ── */
.tl-wrap { max-width: 700px; }
.tl-month { margin-bottom: 32px; }
.tl-month-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.tl-month-name {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-3);
}
.tl-month-name.is-current { color: var(--accent); }
.tl-month-count { font-size: 11px; color: var(--text-3); }
.tl-events { position: relative; padding-left: 28px; }
.tl-spine {
  position: absolute;
  left: 7px;
  top: 0; bottom: 0;
  width: 2px;
  background: var(--border);
}
.tl-event {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 10px 12px 10px 0;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: background .12s;
  margin-bottom: 2px;
}
.tl-event:hover { background: var(--surface); }
.tl-event.tl-past { opacity: .5; }
.tl-event.tl-today-event { opacity: 1; }
.tl-event-dot {
  position: absolute;
  left: -24px;
  top: 14px;
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  z-index: 1;
}
.tl-event-body { flex: 1; min-width: 0; }
.tl-event-date { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
.tl-event-title { font-size: 14px; font-weight: 700; color: var(--text); }
.tl-event.tl-past .tl-event-title { color: var(--text-2); }
.tl-event-meta { font-size: 12px; color: var(--text-3); margin-top: 1px; }
.tl-event-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}
.tl-event-fee {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-2);
}
/* Now marker */
.tl-now {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 8px -28px;
  z-index: 2;
}
.tl-now-line {
  flex: 0 0 28px;
  height: 2px;
  background: var(--accent);
}
.tl-now-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--accent);
  white-space: nowrap;
  background: var(--bg);
  padding-right: 8px;
}

/* ── Calendar ── */
.calendar-month { margin-bottom: 24px; }
.calendar-month-title {
  font-size: 11px; font-weight: 700; margin-bottom: 10px;
  color: var(--text-3); text-transform: uppercase; letter-spacing: .09em;
  display: flex; align-items: center; gap: 8px;
}
.calendar-list { display: flex; flex-direction: column; gap: 6px; }

/* ── Social / Monthly ── */
.monthly-caption {
  width: 100%; font-size: 13px; min-height: 200px;
  background: var(--surface-2); border: 1.5px solid var(--border);
  color: var(--text); border-radius: var(--radius); padding: 16px;
  font-family: inherit; line-height: 1.7;
}
.social-task-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.social-task-row:last-child { border-bottom: none; }
.social-task-status { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.social-task-status.done    { background: var(--green); }
.social-task-status.pending { background: var(--yellow); }
.social-task-status.skipped { background: var(--text-3); }

/* ── Analytics Charts ── */
.chart-bars { display: flex; align-items: flex-end; gap: 6px; height: 120px; margin-top: 8px; }
.chart-bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.chart-bar-fill { background: var(--accent); border-radius: 4px 4px 0 0; width: 100%; min-height: 4px; opacity: .75; transition: opacity .1s; }
.chart-bar-fill:hover { opacity: 1; }
.chart-bar-label { font-size: 9px; color: var(--text-3); text-align: center; font-weight: 600; }

/* ── Upload ── */
.upload-zone {
  border: 2px dashed var(--border-2); border-radius: var(--radius-lg);
  padding: 32px; text-align: center; cursor: pointer;
  transition: all .12s; display: block; background: var(--surface-2);
}
.upload-zone:hover { border-color: var(--accent); background: var(--accent-dim); }
.upload-zone input { display: none; }
.upload-zone strong { display: block; font-size: 14px; font-weight: 600; }
.upload-zone span { font-size: 12px; color: var(--text-3); margin-top: 4px; display: block; }
.upload-list { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.upload-row {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 8px 12px; font-size: 12px; gap: 12px;
}
.upload-row strong { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-row span { color: var(--accent-2); font-family: var(--font-mono); font-size: 11px; }

/* ── File List ── */
.file-list { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.file-btn {
  display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center;
  background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius);
  padding: 10px 14px; text-align: left; cursor: pointer; transition: all .12s; width: 100%;
  box-shadow: var(--shadow-sm);
}
.file-btn:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.file-btn strong { display: block; font-size: 13px; font-weight: 600; }
.file-btn small { color: var(--text-3); font-size: 11.5px; }
.file-btn-action { color: var(--accent); font-size: 12px; font-weight: 600; flex-shrink: 0; }

/* ── Detail Layout ── */
.gig-detail-hero {
  background: linear-gradient(135deg, var(--surface) 0%, #F5F3FF 100%);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  margin-bottom: 20px;
  display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: start;
  box-shadow: var(--shadow);
}
.gig-hero-event { font-size: 22px; font-weight: 800; color: var(--text); }
.gig-hero-venue { font-size: 14px; color: var(--text-2); margin-top: 4px; font-weight: 500; }
.gig-hero-date  { font-size: 22px; font-weight: 800; color: var(--accent); }
.gig-hero-slot  { font-size: 13px; color: var(--text-2); margin-top: 4px; }
.gig-hero-fee   { font-size: 22px; font-weight: 800; color: var(--green); }
.detail-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }

.contact-card {
  background: var(--surface-2); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 14px; margin-bottom: 8px;
}
.contact-role { font-size: 10px; color: var(--text-3); text-transform: uppercase; letter-spacing: .09em; font-weight: 700; margin-bottom: 4px; }
.contact-name { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.contact-detail { font-size: 12.5px; color: var(--text-2); display: flex; flex-direction: column; gap: 2px; }

/* ── Search & Filter ── */
.filter-bar { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }
.search-input {
  flex: 1; min-width: 200px;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 8px 14px; font-size: 13px; color: var(--text);
  box-shadow: var(--shadow-sm); transition: all .12s;
}
.search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); outline: none; }
.filter-select {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 8px 12px; font-size: 12.5px; color: var(--text-2);
  cursor: pointer;
}

/* ── Checklist ── */
.checklist { display: flex; flex-direction: column; gap: 4px; }
.checklist label {
  display: flex; align-items: center; gap: 10px; font-size: 13px; cursor: pointer;
  padding: 7px 10px; border-radius: var(--radius); transition: background .1s;
}
.checklist label:hover { background: var(--surface-2); }
.checklist input[type="checkbox"] { width: auto; padding: 0; accent-color: var(--accent); }

/* ── Edit Panel ── */
.edit-panel {
  background: #F5F3FF; border: 1.5px solid rgba(107,79,224,.25);
  border-radius: var(--radius-lg); padding: 20px; margin-bottom: 16px;
}
.edit-panel-title {
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  color: var(--accent); margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between;
}
.edit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }

/* ── Invoice Modal ── */
#modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  z-index: 100; display: flex; align-items: flex-start;
  justify-content: center; overflow-y: auto; padding: 40px 20px;
  backdrop-filter: blur(4px);
}
#modal-overlay.hidden { display: none !important; }
.modal-box {
  background: var(--surface); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg); max-width: 780px; width: 100%;
  position: relative;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px; border-bottom: 1.5px solid var(--border);
}
.modal-header h2 { font-size: 16px; font-weight: 700; }
.modal-body { padding: 24px; }
.modal-footer {
  display: flex; gap: 8px; justify-content: flex-end;
  padding: 16px 24px; border-top: 1.5px solid var(--border);
  background: var(--surface-2); border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

/* ── Misc Utilities ── */
.eyebrow {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--text-3); margin-bottom: 3px;
}
.chf { font-weight: 700; font-variant-numeric: tabular-nums; font-family: var(--font-mono); }
.text-green  { color: var(--green); }
.text-yellow { color: var(--yellow); }
.text-red    { color: var(--red); }
.text-blue   { color: var(--blue); }
.text-accent { color: var(--accent); }
.text-dim    { color: var(--text-2); }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.flex  { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.gap-6  { gap: 6px; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.hidden { display: none !important; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Print styles for Invoice ── */
@media print {
  #shell, #topbar, #sidebar, .modal-footer, .modal-header, .btn, .page-header, .tabs, .filter-bar, .stat-grid { display: none !important; }
  #modal-overlay { position: static !important; background: none !important; padding: 0 !important; display: block !important; }
  .modal-box { box-shadow: none !important; border: none !important; max-width: 100%; }
  body { background: #fff !important; overflow: visible !important; }
  .invoice-print-container { box-shadow: none !important; border: none !important; max-width: 100%; padding: 24px; border-radius: 0; }
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* ── Contract Pipeline ── */
.contract-pipeline {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 4px;
}
.pipeline-col { display: flex; flex-direction: column; gap: 8px; }
.pipeline-col-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; border-radius: var(--radius); font-size: 12px;
  font-weight: 700; letter-spacing: .02em;
}
.pipeline-grey   { background: var(--surface-3); color: var(--text-2); }
.pipeline-blue   { background: var(--blue-dim);   color: var(--blue); }
.pipeline-yellow { background: var(--yellow-dim); color: var(--yellow); }
.pipeline-green  { background: var(--green-dim);  color: var(--green); }
.pipeline-red    { background: var(--red-dim);    color: var(--red); }
.pipeline-count {
  background: rgba(0,0,0,.08); border-radius: 99px;
  padding: 1px 6px; font-size: 11px;
}
.pipeline-card {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 10px 12px;
  cursor: pointer; transition: border-color .12s, box-shadow .12s;
}
.pipeline-card:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.pipeline-card-title { font-size: 12.5px; font-weight: 600; color: var(--text); line-height: 1.3; }
.pipeline-card-sub   { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.pipeline-card-inv   { font-size: 10px; color: var(--text-3); margin-top: 4px; font-family: var(--font-mono); }
.pipeline-empty { color: var(--text-3); font-size: 12px; padding: 8px 12px; }

/* ── Transport Cards ── */
.transport-card {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px; margin-bottom: 10px;
}
.transport-card-type {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 99px; margin-bottom: 12px;
}
.transport-card-route {
  display: flex; align-items: center; gap: 12px;
}
.transport-city { min-width: 90px; }
.transport-city-right { text-align: right; }
.transport-time { font-size: 22px; font-weight: 800; color: var(--text); line-height: 1; }
.transport-loc  { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.transport-arrow { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.transport-arrow-line { height: 2px; width: 100%; background: var(--border-2); border-radius: 2px; }
.transport-ref { font-size: 10px; font-weight: 700; color: var(--accent); }
.transport-arrow-head { font-size: 18px; color: var(--border-2); }
.transport-card-meta {
  display: flex; gap: 16px; flex-wrap: wrap;
  margin-top: 12px; padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 12px; color: var(--text-2);
}
.transport-card-meta strong { color: var(--text); }

/* ── Reminders ── */
.reminder-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius);
  background: var(--surface-2); border: 1.5px solid var(--border);
  transition: border-color .12s;
}
.reminder-done { opacity: .5; }
.reminder-overdue { background: var(--red-dim) !important; border-color: var(--red) !important; }

/* ── Document Templates ── */
.template-card {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
}
.template-card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.template-preview {
  font-size: 11px; color: var(--text-3); line-height: 1.5;
  padding: 10px 16px; max-height: 80px; overflow: hidden;
  font-family: var(--font-mono);
  white-space: pre-wrap; word-break: break-word;
}

/* ── Responsive: Tablet + Mobile → Burger Menu + Bottom Nav ── */
@media (max-width: 900px) {
  #shell { grid-template-columns: 1fr; }

  #sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: 280px;
    z-index: 200; transform: translateX(-100%);
    transition: transform var(--dur-base) var(--ease-out) !important;
    box-shadow: 4px 0 24px rgba(0,0,0,.18);
    overflow-y: auto !important;
    overflow-x: hidden !important;
    width: 280px !important;
  }
  #sidebar:hover { width: 280px !important; box-shadow: 4px 0 24px rgba(0,0,0,.18) !important; overflow-y: auto !important; }
  #sidebar.mob-open { transform: translateX(0); }

  .mob-backdrop {
    display: block; position: fixed; inset: 0;
    background: rgba(0,0,0,.4); z-index: 199;
    opacity: 0; pointer-events: none;
    transition: opacity .25s;
  }
  .mob-backdrop.mob-open { opacity: 1; pointer-events: auto; }

  .hamburger-btn { display: flex !important; }
  .back-btn { display: flex !important; }

  /* Restore full sidebar nav items on mobile */
  .nav-item {
    justify-content: flex-start !important;
    padding: 12px 16px !important;
    width: calc(100% - 12px) !important;
    overflow: visible !important;
  }
  .nav-item > span:not(.nav-icon) { max-width: none !important; opacity: 1 !important; }
  .nav-badge { display: inline-block !important; }
  .sidebar-logo-sub,
  .sidebar-section-label { display: block !important; }
  .sidebar-logo-svg { max-width: 140px !important; }
  .mode-btn span { display: inline !important; }
  .sidebar-logo { justify-content: flex-start !important; padding: 24px 16px !important; }
  .sidebar-close-btn { display: flex !important; }
  .sidebar-bottom { display: block !important; }

  .mode-toggle { gap: 6px; }
  .mode-btn { padding: 12px 16px; font-size: 14px; flex: 1; }

  .dashboard-grid, .finance-grid { grid-template-columns: 1fr; }
  .artist-card { grid-template-columns: 1fr; }
  .contract-pipeline { grid-template-columns: repeat(3, 1fr); }

  /* Bottom Nav visible on mobile */
  #bottom-nav {
    display: flex !important;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 60px;
    background: var(--surface);
    border-top: 1px solid var(--border);
    z-index: 100;
    padding: 0 4px;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  #main { padding-bottom: 70px; }
}

/* ── Bottom Nav Tab styles (hidden on desktop) ── */
#bottom-nav { display: none; }
.bnav-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px 0;
  background: none;
  border: none;
  color: var(--text-3);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .02em;
  cursor: pointer;
  transition: color .12s;
  text-transform: uppercase;
}
.bnav-tab.is-active { color: var(--accent); }
.bnav-tab:hover { color: var(--text); }

/* ── Finance responsive layout ── */
.finance-cards-mobile { display: none; flex-direction: column; gap: 10px; }
.finance-table-desktop { display: block; }
.finance-gig-card { padding: 14px 16px; cursor: pointer; transition: background .12s; }
.finance-gig-card:hover { background: var(--surface-2); }

/* ── Responsive: Mobile only extras ── */
@media (max-width: 640px) {
  /* Prevent iOS Safari zoom on any focused input/select/textarea */
  input, select, textarea {
    font-size: 16px !important;
  }

  #topbar { padding: 0 12px; gap: 8px; }
  .topbar-title { font-size: 15px; }
  .topbar-artist { font-size: 12px; padding: 5px 8px; }

  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .data-table { min-width: 520px; }
  .contract-pipeline { grid-template-columns: repeat(3, 1fr); overflow-x: auto; }
  .transport-card-route { gap: 6px; }
  .transport-time { font-size: 18px; }

  .finance-grid, .dashboard-grid { grid-template-columns: 1fr; gap: 12px; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 8px; }

  .gig-detail-header { flex-direction: column; align-items: flex-start; gap: 8px; }
  .gig-tabs { overflow-x: auto; white-space: nowrap; }
  .filter-tabs { overflow-x: auto; white-space: nowrap; gap: 6px; }
  .filter-tab { flex-shrink: 0; }

  /* Finance: show cards, hide table */
  .finance-cards-mobile { display: flex; }
  .finance-table-desktop { display: none; }

  /* Finance bento: single column on mobile — override all explicit placements */
  .money-bento { grid-template-columns: 1fr; }
  .money-hero-card,
  .money-action-card,
  .money-forecast-card,
  .money-mgmt-fee-card { grid-column: 1 / -1; grid-row: auto; }
  .money-hero-value { font-size: 28px; }
}

/* ── CALENDAR ENHANCED ─────────────────────────── */
.cal-event-row {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background .12s;
}
.cal-event-row:hover { background: var(--hover); }
.cal-event-row:last-child { border-bottom: none; }
.cal-date-col { text-align: center; }
.cal-day-num { font-size: 20px; font-weight: 700; line-height: 1.1; color: var(--text); }
.cal-day-name { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; }
.cal-event-title { font-size: 14px; font-weight: 600; color: var(--text); }
.cal-event-meta { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.cal-event-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }

/* ── FILTER TABS ─────────────────────────────── */
.filter-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.filter-tab {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
  transition: all .15s;
}
.filter-tab:hover { background: var(--hover); color: var(--text); }
.filter-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ── ADVANCING FIELDS ─────────────────────────── */
.adv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.adv-section {
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
}
.adv-section-title {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--text-3); margin-bottom: 8px;
  user-select: none;
}
.adv-section-title:hover { color: var(--text-2); }
.adv-section-body { }
.adv-row {
  display: grid;
  grid-template-columns: 18px 56px 1fr;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}
.adv-row:last-child { margin-bottom: 0; }
.adv-row label {
  font-size: 10.5px; color: var(--text-3); font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.adv-input {
  width: 100%; padding: 4px 8px; font-size: 12px;
  border: 1.5px solid var(--border); border-radius: 5px;
  background: var(--surface); color: var(--text);
  transition: border-color .12s;
  font-family: var(--font);
}
.adv-input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 2px rgba(107,79,224,.1); }
.adv-input::placeholder { color: var(--text-3); font-size: 11px; }
.adv-card { transition: border-color .15s; }

/* Disable button */
.adv-dis-btn {
  width: 16px; height: 16px; border-radius: 3px;
  border: 1px solid var(--border); background: transparent;
  cursor: pointer; color: var(--text-3); font-size: 9px;
  display: flex; align-items: center; justify-content: center;
  padding: 0; line-height: 1; transition: background .1s, color .1s;
}
.adv-dis-btn:hover { background: var(--surface-2); color: var(--text); }
.adv-field-disabled { opacity: .45; }
.adv-field-disabled .adv-input { text-decoration: line-through; }
.adv-disabled-label {
  font-size: 11px; color: var(--text-3); font-style: italic;
}

/* Artist card rows */
.artist-card-row {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 10px; border-radius: 8px;
  text-decoration: none; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--border);
  transition: background .12s;
}
.artist-card-row:hover { background: var(--surface-3, var(--border)); }

@media (max-width: 640px) {
  .adv-grid { grid-template-columns: 1fr; }
  .adv-row { grid-template-columns: 18px 52px 1fr; }
}

/* ── Payment Row (Artist Fee / Mgmt Fee / Booking Fee) ── */
.payment-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--surface-2);
  border-radius: var(--radius);
  gap: 8px;
}
.payment-row-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.payment-row-left input[type="checkbox"] { flex-shrink: 0; cursor: pointer; }
.payment-row-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
@media (max-width: 640px) {
  .payment-row {
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .payment-row-left { flex: 1 1 100%; }
  .payment-row-right { flex: 0 0 100%; padding-left: 26px; margin-top: 4px; }
}

/* ── PROMOTER FIELD OPTION ──────────────────────── */
.promoter-field-option {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; background: var(--surface-2);
  border: 1.5px solid var(--border); border-radius: 8px;
  cursor: pointer; font-size: 13px; font-weight: 500;
  transition: border-color .12s, background .12s;
  user-select: none;
}
.promoter-field-option:hover { border-color: var(--accent); background: var(--surface); }
.promoter-field-option.is-selected { border-color: var(--accent); background: rgba(107,79,224,.06); }

/* ── SETTINGS CARDS ──────────────────────────────── */
.settings-section { display: grid; gap: 14px; }
.settings-field { display: grid; gap: 4px; }
.settings-field label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); }
.settings-field input, .settings-field textarea, .settings-field select {
  padding: 8px 12px; border: 1.5px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--text); font-size: 13px;
  font-family: var(--font); transition: border-color .12s;
}
.settings-field input:focus, .settings-field textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 2px rgba(107,79,224,.1); }
.settings-field textarea { resize: vertical; min-height: 64px; }

/* ── WORKSPACE SELECTOR ─────────────────────────── */
.workspace-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border: 1.5px solid var(--border);
  border-radius: 10px; cursor: pointer;
  transition: border-color .12s, background .12s;
}
.workspace-item:hover { border-color: var(--accent); }
.workspace-item.is-active { border-color: var(--accent); background: rgba(107,79,224,.06); }
.workspace-avatar {
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--accent); display: flex; align-items: center;
  justify-content: center; font-weight: 800; color: #fff; font-size: 15px;
  flex-shrink: 0;
}

/* ── COMMAND PALETTE ──────────────────────────── */
#cmd-palette-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.55);
  z-index: 9000; display: flex; align-items: flex-start;
  justify-content: center; padding-top: 80px;
  backdrop-filter: blur(6px);
  animation: fadeIn .12s ease;
}
#cmd-palette-overlay.hidden { display: none !important; }
#cmd-palette {
  width: 100%; max-width: 560px; margin: 0 16px;
  background: var(--surface); border-radius: var(--radius-xl);
  box-shadow: 0 24px 64px rgba(0,0,0,.22), 0 4px 16px rgba(0,0,0,.1);
  border: 1.5px solid var(--border); overflow: hidden;
  animation: slideDown var(--dur-fast) var(--ease-spring);
}
#cmd-input-wrap {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px; border-bottom: 1.5px solid var(--border);
}
#cmd-input-icon { color: var(--text-3); flex-shrink: 0; }
#cmd-input {
  flex: 1; background: none; border: none; outline: none;
  font-size: 16px; color: var(--text); font-family: var(--font);
  padding: 0;
}
#cmd-input::placeholder { color: var(--text-3); }
.cmd-kbd {
  font-size: 11px; color: var(--text-3); background: var(--surface-3);
  border: 1px solid var(--border-2); border-radius: 5px;
  padding: 2px 7px; font-family: var(--font-mono); flex-shrink: 0;
}
#cmd-results { max-height: 380px; overflow-y: auto; padding: 8px 0; }
.cmd-section-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--text-3); padding: 8px 20px 4px;
}
.cmd-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 20px; cursor: pointer; transition: background .08s;
  font-size: 13.5px; color: var(--text);
}
.cmd-item:hover, .cmd-item.is-active { background: var(--accent-dim); color: var(--accent); }
.cmd-item-icon { width: 32px; height: 32px; border-radius: var(--radius); background: var(--surface-3); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--text-2); }
.cmd-item.is-active .cmd-item-icon { background: var(--accent-dim); color: var(--accent); }
.cmd-item-body { flex: 1; min-width: 0; }
.cmd-item-title { font-weight: 600; }
.cmd-item-sub { font-size: 11.5px; color: var(--text-3); margin-top: 1px; }
.cmd-item-tag { font-size: 10.5px; color: var(--text-3); background: var(--surface-3); border-radius: 4px; padding: 2px 7px; white-space: nowrap; }
#cmd-footer {
  border-top: 1.5px solid var(--border); padding: 8px 16px;
  display: flex; gap: 16px; font-size: 11px; color: var(--text-3);
}
#cmd-footer span { display: flex; align-items: center; gap: 5px; }

/* ── TOAST SYSTEM ─────────────────────────────── */
#toast-container {
  position: fixed; bottom: 24px; right: 24px; z-index: 8000;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius-lg); padding: 12px 16px;
  box-shadow: var(--shadow-lg); font-size: 13px; font-weight: 500;
  pointer-events: auto; max-width: 340px;
  animation: slideUp var(--dur-base) var(--ease-spring);
  transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
.toast.removing { opacity: 0; transform: translateX(20px); }
.toast-icon { flex-shrink: 0; width: 20px; height: 20px; }
.toast-success { border-color: var(--green); }
.toast-success .toast-icon { color: var(--green); }
.toast-error   { border-color: var(--red);   }
.toast-error   .toast-icon { color: var(--red);   }
.toast-info    { border-color: var(--accent); }
.toast-info    .toast-icon { color: var(--accent); }

/* ── SMART STAT CARDS ─────────────────────────── */
.stat-card-trend {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 10.5px; font-weight: 700; margin-left: 6px;
  border-radius: 4px; padding: 1px 5px;
}
.trend-up   { background: var(--green-dim); color: var(--green); }
.trend-down { background: var(--red-dim); color: var(--red); }
.trend-flat { background: var(--surface-3); color: var(--text-3); }
.stat-progress {
  margin-top: 8px; height: 3px; background: var(--surface-3);
  border-radius: 2px; overflow: hidden;
}
.stat-progress-bar {
  height: 100%; background: var(--accent); border-radius: 2px;
  transition: width .6s var(--ease-spring);
}
.stat-progress-bar.bar-green  { background: var(--green); }
.stat-progress-bar.bar-yellow { background: var(--yellow); }
.stat-progress-bar.bar-red    { background: var(--red); }

/* ── KEYBOARD SHORTCUT HINT ───────────────────── */
.shortcut-pill {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; color: var(--text-3); background: var(--surface-3);
  border: 1px solid var(--border); border-radius: 5px;
  padding: 2px 7px; font-family: var(--font-mono);
}

/* ── PAGE TRANSITION ──────────────────────────── */
@keyframes fadeIn   { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideUp   { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes popIn     { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: scale(1); } }

#main > * { animation: popIn .18s var(--ease-spring); }

/* ── ITINERARY TIMELINE ───────────────────────── */
.itinerary-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 4px;
}
.itinerary-item {
  display: grid;
  grid-template-columns: 52px 24px 1fr;
  gap: 0 12px;
  align-items: flex-start;
  min-height: 52px;
}
.itinerary-time {
  padding-top: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.itinerary-dot-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 6px;
}
.itinerary-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  box-shadow: 0 0 0 3px var(--bg);
}
.itinerary-line {
  width: 2px;
  flex: 1;
  min-height: 30px;
  background: var(--border);
  margin-top: 4px;
}
.itinerary-body {
  padding-top: 2px;
  padding-bottom: 16px;
}
.itinerary-icon-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.itinerary-sub {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 3px;
  padding-left: 24px;
}

/* ── Login Screen ── */
#login-screen {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}
#login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 400px;
  padding: 36px 32px 32px;
}
.login-logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 28px;
}
.login-logo-sub {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-3);
}
.login-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--surface-3);
  border-radius: 8px;
  padding: 3px;
  margin-bottom: 24px;
  gap: 2px;
}
.login-tab {
  background: transparent;
  border: none;
  border-radius: 6px;
  padding: 7px 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-3);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.login-tab.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.login-panel { display: block; }
.login-panel.hidden { display: none; }
.login-field {
  margin-bottom: 14px;
}
.login-field label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-3);
  margin-bottom: 5px;
}
.login-field input,
.login-field select {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 16px; /* 16px minimum prevents iOS Safari auto-zoom on focus */
  font-family: var(--font);
  background: var(--surface);
  color: var(--text);
  transition: border-color .15s;
  outline: none;
}
.login-field input:focus,
.login-field select:focus {
  border-color: var(--accent);
}
.login-error {
  font-size: 12px;
  color: var(--red);
  margin-bottom: 12px;
  padding: 8px 12px;
  background: var(--red-dim);
  border-radius: 6px;
  display: none;
}
.login-error.visible { display: block; }
.login-btn {
  width: 100%;
  padding: 11px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
  margin-top: 6px;
}
.login-btn:hover { background: var(--accent-hover); }
.login-divider {
  text-align: center;
  font-size: 11px;
  color: var(--text-3);
  margin: 14px 0;
}

/* ── Sidebar user info + logout ── */
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface-2);
  border-radius: 10px;
  margin-bottom: 8px;
}
.sidebar-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user-role {
  font-size: 11px;
  color: var(--text-3);
  text-transform: capitalize;
}
.logout-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  margin-top: 4px;
}
.logout-btn:hover {
  background: var(--red-dim);
  border-color: var(--red);
  color: var(--red);
}

/* ── New Gig Modal ── */
.new-gig-modal {
  max-width: 520px;
  width: 100%;
}
.ng-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.ng-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ng-field.span-2 { grid-column: span 2; }
.ng-field label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-3);
}
.ng-field input,
.ng-field select,
.ng-field textarea {
  padding: 8px 10px;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  font-size: 13px;
  font-family: var(--font);
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color .15s;
}
.ng-field input:focus,
.ng-field select:focus,
.ng-field textarea:focus { border-color: var(--accent); }
.ng-field textarea { resize: vertical; min-height: 70px; }
.ng-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* ── Advancing Ops Mode ── */
.ops-mode {
  max-width: 580px;
  margin: 0 auto;
  padding: 0 0 40px;
}
.ops-mode-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0 12px;
}
.ops-mode-badge {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--yellow);
  display: flex;
  align-items: center;
  gap: 5px;
}
.ops-mode-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 20px 24px;
  margin-bottom: 16px;
}
.ops-days-pill {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  background: rgba(240,165,0,.15);
  color: var(--yellow);
  padding: 3px 10px;
  border-radius: 99px;
  margin-bottom: 8px;
}
.ops-days-pill.urgent {
  background: rgba(242,54,69,.15);
  color: var(--red);
}
.ops-gig-title {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 4px;
}
.ops-gig-meta {
  font-size: 13px;
  color: var(--text-2);
}
.ops-progress-ring {
  position: relative;
  flex-shrink: 0;
  width: 100px;
  height: 100px;
}
.ops-progress-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.ops-progress-num {
  font-size: 22px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text);
  line-height: 1;
}
.ops-progress-num span {
  font-size: 13px;
  color: var(--text-3);
}
.ops-progress-sub {
  font-size: 10px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-top: 3px;
}
.ops-checklist {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 16px;
}
.ops-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  transition: background .1s;
}
.ops-item:last-child { border-bottom: none; }
.ops-item.is-ok { background: rgba(22,163,74,.04); }
.ops-item.is-crit { background: rgba(242,54,69,.05); }
.ops-item-dot {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; flex-shrink: 0;
  background: var(--surface-2);
  color: var(--text-3);
}
.ops-item.is-ok .ops-item-dot {
  background: var(--green);
  color: #fff;
}
.ops-item.is-crit .ops-item-dot {
  background: rgba(242,54,69,.2);
  color: var(--red);
}
.ops-item-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  min-width: 140px;
  flex-shrink: 0;
}
.ops-item.is-ok .ops-item-label { color: var(--text); }
.ops-item-val {
  font-size: 12px;
  color: var(--text-2);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ops-fill-btn { margin-left: auto; flex-shrink: 0; }
.ops-mode-footer { margin-top: 4px; }

/* ── Gig Lifecycle Arc ── */
.lifecycle-arc {
  display: flex;
  align-items: flex-start;
  padding: 20px 0 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.lifecycle-arc::-webkit-scrollbar { display: none; }

.lifecycle-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 60px;
  position: relative;
}

/* Connecting line between stages */
.lifecycle-item:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 13px;
  left: calc(50% + 14px);
  right: calc(-50% + 14px);
  height: 2px;
  background: var(--border-2);
  z-index: 0;
}
.lifecycle-item.is-done:not(:last-child)::after { background: var(--green); }

.lifecycle-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border-2);
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 1;
  cursor: pointer;
  color: var(--text-3);
  transition: transform .15s, box-shadow .15s;
  padding: 0;
}
.lifecycle-dot:hover {
  transform: scale(1.15);
  box-shadow: 0 0 12px rgba(123,94,248,.3);
  border-color: var(--accent);
  color: var(--accent);
}
.lifecycle-item.is-done .lifecycle-dot {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.lifecycle-item.is-current .lifecycle-dot {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 16px rgba(123,94,248,.4);
}
.lifecycle-item.is-done .lifecycle-dot:hover {
  background: #19b575;
  border-color: #19b575;
}
.lifecycle-item.is-current .lifecycle-dot:hover { transform: scale(1.1); }

.lifecycle-dot.is-active {
  box-shadow: 0 0 0 3px rgba(123,94,248,.25), 0 0 16px rgba(123,94,248,.3);
}
.lifecycle-item.is-done .lifecycle-dot.is-active {
  box-shadow: 0 0 0 3px rgba(22,163,74,.25);
}

.lifecycle-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-3);
  margin-top: 7px;
  text-align: center;
  white-space: nowrap;
}
.lifecycle-item.is-done .lifecycle-label { color: var(--text-2); }
.lifecycle-item.is-current .lifecycle-label { color: var(--accent); font-weight: 700; }

/* Sub-tabs below arc (compact) */
.lifecycle-subtabs { border-top: none; margin-top: 12px; }

/* ── Today Command Surface ── */
.today-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 0 40px;
}
.today-header {
  padding: 32px 0 24px;
}
.today-headline {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.1;
  color: var(--text);
}
.today-date {
  font-size: 14px;
  color: var(--text-2);
  margin-top: 4px;
  font-weight: 500;
}

/* Next Gig Hero Card */
.today-next-gig {
  background: linear-gradient(135deg, var(--accent-dim) 0%, var(--surface) 70%);
  border: 1.5px solid rgba(123, 94, 248, .35);
  border-radius: var(--radius-xl);
  padding: 20px 24px;
  margin-bottom: 20px;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(123,94,248,.1), 0 8px 32px rgba(0,0,0,.3);
  transition: box-shadow .2s, border-color .2s;
}
.today-next-gig:hover {
  border-color: rgba(123,94,248,.6);
  box-shadow: 0 0 0 1px rgba(123,94,248,.2), 0 0 32px rgba(123,94,248,.15);
}
.today-next-gig-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.today-next-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .6; transform: scale(1.3); }
}
.today-next-gig-title {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text);
}
.today-next-gig-meta {
  font-size: 13px;
  color: var(--text-2);
  margin-top: 4px;
}
.today-empty-next {
  background: var(--surface-2);
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-xl);
  padding: 32px 24px;
  text-align: center;
  margin-bottom: 20px;
  color: var(--text-2);
}

/* Action Feed */
.today-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--text-3);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.today-crit-count {
  background: var(--red);
  color: #fff;
  font-size: 10px;
  padding: 1px 7px;
  border-radius: 99px;
  font-weight: 700;
}
.today-actions-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.today-action-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--border);
  background: var(--surface);
  transition: border-color .15s, background .15s;
}
.today-action-card:hover { background: var(--surface-2); }
.today-action-critical {
  border-color: rgba(242,54,69,.35);
  background: linear-gradient(135deg, var(--surface) 70%, rgba(242,54,69,.06));
}
.today-action-critical:hover { border-color: rgba(242,54,69,.55); }
.today-action-warn {
  border-color: rgba(240,165,0,.25);
}
.today-action-warn:hover { border-color: rgba(240,165,0,.45); }
.today-action-icon {
  width: 34px; height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.today-icon-critical {
  background: rgba(242,54,69,.15);
  color: var(--red);
}
.today-icon-warn {
  background: rgba(240,165,0,.12);
  color: var(--yellow);
}
.today-action-body { flex: 1; min-width: 0; }
.today-action-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.today-action-sub {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 2px;
}
.today-action-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

/* All good state */
.today-all-good {
  text-align: center;
  padding: 40px 24px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
}
.today-all-good-icon {
  font-size: 32px;
  color: var(--green);
  margin-bottom: 10px;
}
.today-all-good-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}
.today-all-good-sub {
  font-size: 13px;
  color: var(--text-3);
  margin-top: 4px;
}
