/* ─────────────────────────────────────────
   Fonts — @font-face
───────────────────────────────────────── */
@font-face {
  font-family: 'Druk Wide';
  src: url('../fonts/DrukWide-Medium-Trial.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Druk Wide';
  src: url('../fonts/DrukWide-Bold-Trial.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Suisse Intl';
  src: url('../fonts/SuisseIntl-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Suisse Intl';
  src: url('../fonts/SuisseIntl-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

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

:root {
  --bg:          #1C1917;
  --sidebar-bg:  #151210;
  --card-bg:     #242120;
  --stat-bg:     #2A2523;
  --text:        #F5F2EA;
  --muted:       #8C8580;
  --muted-3:     #5C5753;
  --border:      #3A3533;
  --accent:      #9BB4C8;
  --accent-hover: #B0C5D4;
  --progress-track: #3A3533;
  --progress-bar:   #F5F2EA;
  --radius:      12px;
  --radius-sm:   8px;
  --shadow:      0 1px 4px rgba(0,0,0,0.4);
  --sidebar-w:   220px;
}

html { -webkit-font-smoothing: antialiased; color-scheme: dark; }

body {
  font-family: 'Suisse Intl', sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
  display: flex;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); text-decoration: none; }
button { font-family: 'Suisse Intl', sans-serif; }

/* ─────────────────────────────────────────
   Scrollbars
───────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #4A4543; }

/* ─────────────────────────────────────────
   Sidebar
───────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 200;
  transition: transform 0.2s ease;
}

.sidebar-logo {
  padding: 24px 24px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.sidebar-logo img {
  width: 90px;
  height: auto;
  display: block;
}

.sidebar-logo-text {
  font-family: 'Druk Wide', sans-serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.1em;
  color: var(--text);
}

.sidebar-nav {
  flex: 1;
  padding: 12px 0;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 24px;
  color: var(--muted);
  text-decoration: none;
  font-family: 'Suisse Intl', sans-serif;
  font-size: 14px;
  font-weight: 400;
  transition: color 0.12s, background 0.12s;
  position: relative;
  cursor: pointer;
}

.nav-item:hover { color: var(--text); text-decoration: none; }

.nav-item.active {
  color: var(--text);
  font-weight: 600;
  background: var(--card-bg);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px; bottom: 6px;
  width: 2px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
}

.nav-item svg, .nav-item i { width: 16px; height: 16px; flex-shrink: 0; }

.nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: #1C1917;
  font-family: 'Suisse Intl', sans-serif;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 999px;
  line-height: 1.6;
}

.sidebar-bottom {
  padding: 12px 0;
  border-top: 1px solid var(--border);
}

/* ─────────────────────────────────────────
   Main layout
───────────────────────────────────────── */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.page-header {
  padding: 44px 44px 32px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.page-header-left {}

.page-title {
  font-family: 'Druk Wide', sans-serif;
  font-weight: 500;
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--text);
}

.page-subtitle {
  font-family: 'Suisse Intl', sans-serif;
  font-weight: 400;
  color: var(--muted);
  font-size: 14px;
  margin-top: 6px;
}

.page-content {
  padding: 0 44px 48px;
  flex: 1;
}

/* ─────────────────────────────────────────
   Stat cards
───────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--stat-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  position: relative;
}

.stat-icon {
  position: absolute;
  top: 22px; right: 22px;
  color: var(--muted);
  opacity: 0.45;
}
.stat-icon svg { width: 16px; height: 16px; }

.stat-label {
  font-family: 'Suisse Intl', sans-serif;
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.stat-value {
  font-family: 'Druk Wide', sans-serif;
  font-weight: 500;
  font-size: 34px;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--text);
}

.stat-context {
  font-family: 'Suisse Intl', sans-serif;
  font-weight: 400;
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}

/* ─────────────────────────────────────────
   Cards
───────────────────────────────────────── */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header-title {
  font-family: 'Suisse Intl', sans-serif;
  font-weight: 600;
  font-size: 14px;
}

.card-header-meta {
  font-family: 'Suisse Intl', sans-serif;
  font-weight: 400;
  font-size: 13px;
  color: var(--muted);
}

.card-body { padding: 24px; }

/* ─────────────────────────────────────────
   Progress
───────────────────────────────────────── */
.progress {
  background: var(--progress-track);
  border-radius: 999px;
  height: 4px;
  overflow: hidden;
}

.progress-bar {
  background: var(--progress-bar);
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease;
}

/* ─────────────────────────────────────────
   Inline contact fields
───────────────────────────────────────── */
.cf-field {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.cf-value,
.cf-value-link {
  font-size: 13px;
  color: var(--text);
  text-decoration: none;
  transition: color 0.1s;
}
.cf-value-link:hover { color: var(--accent); text-decoration: none; }
.cf-placeholder {
  font-size: 12px;
  color: var(--muted-3);
  transition: color 0.1s;
}
.cf-field:hover .cf-placeholder { color: var(--muted); }
.cf-input {
  height: 26px;
  padding: 3px 8px;
  font-size: 12px;
  width: 190px;
  border-radius: 6px;
}

/* ─────────────────────────────────────────
   Row action buttons (shared)
───────────────────────────────────────── */
.row-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.1s, border-color 0.1s, color 0.1s;
  flex-shrink: 0;
}
.row-action-btn:hover {
  background: var(--border);
  border-color: var(--border);
  color: var(--text);
  text-decoration: none;
}
.row-action-danger:hover {
  background: #2E1A1A;
  border-color: #4A2A2A;
  color: #C89B9B;
}

/* Delete confirmation popup (shared) */
.delete-confirm-popup {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: #242120;
  border: 1px solid #4A2A2A;
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.55);
  z-index: 110;
  min-width: 210px;
}
.delete-confirm-btn {
  flex: 1;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Suisse Intl', sans-serif;
  transition: background 0.1s;
}
.delete-confirm-btn-yes {
  background: #2E1A1A;
  border: 1px solid #4A2A2A;
  color: #C89B9B;
}
.delete-confirm-btn-yes:hover { background: #3A2020; }
.delete-confirm-btn-no {
  background: var(--border);
  border: 1px solid var(--border);
  color: var(--text);
}
.delete-confirm-btn-no:hover { background: #4A4543; }

/* ─────────────────────────────────────────
   Shared dropdown items
───────────────────────────────────────── */
.dd-item {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  padding: 7px 10px;
  font-size: 13px;
  color: #F5F2EA;
  font-family: 'Suisse Intl', sans-serif;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 6px;
  transition: background 0.08s;
}
.dd-item:hover { background: #3A3533; }

/* ─────────────────────────────────────────
   Badges
───────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-family: 'Suisse Intl', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* Client status */
.badge-active    { background: #1A2E1A; color: #6BCB6B; }
.badge-paused    { background: #2E2A1A; color: #C8B49B; }
.badge-archived  { background: #2A2A2A; color: #6C6C6C; }

/* Upload / misc */
.badge-pending   { background: #2A2A2A; color: #6C6C6C; }
.badge-completed { background: #1A2E1A; color: #6BCB6B; }
.badge-revision  { background: #2E1A1A; color: #C89B9B; }

/* Task status */
.badge-scheduled   { background: #1A2535; color: #9BB4C8; }
.badge-in_progress { background: #1A2535; color: #9BB4C8; }
.badge-cancelled   { background: #2A2A2A; color: #6C6C6C; }

/* Product order statuses */
.badge-booked    { background: #1A2535; color: #9BB4C8; }
.badge-shoot     { background: #1A2535; color: #9BB4C8; }
.badge-editing   { background: #1A1A3A; color: #9B8ED6; }
.badge-revision  { background: #2E1A1A; color: #C89B9B; }
.badge-delivered { background: #1A2E1A; color: #6BCB6B; }

/* Invoice statuses */
.badge-draft    { background: #2A2A2A; color: #8C8580; }
.badge-sent     { background: #1A2535; color: #9BB4C8; }
.badge-viewed   { background: #1A2535; color: #9B8ED6; }
.badge-paid     { background: #1A2E1A; color: #6BCB6B; }
.badge-overdue  { background: #2E1A1A; color: #C89B9B; }

/* Priority */
.badge-urgent { background: #2E1A1A; color: #C89B9B; }
.badge-high   { background: #1A2535; color: #9BB4C8; }
.badge-low    { background: #2A2A2A; color: #6C6C6C; }
.badge-normal { background: #2A2A2A; color: #8C8580; }

/* ─────────────────────────────────────────
   Buttons
───────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-family: 'Suisse Intl', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, opacity 0.15s;
  border: none;
  line-height: 1;
  white-space: nowrap;
}

.btn:hover { opacity: 0.85; text-decoration: none; }
.btn svg, .btn i { width: 14px; height: 14px; }

.btn-primary { background: #3A3533; color: #F5F2EA; }
.btn-primary:hover { background: #4A4543; opacity: 1; }
.btn-accent  { background: var(--accent); color: #1C1917; }
.btn-accent:hover { background: var(--accent-hover); opacity: 1; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { background: var(--stat-bg); opacity: 1; }
.btn-ghost   { background: transparent; color: var(--muted); }
.btn-danger  { background: #2E1A1A; color: #C89B9B; border: 1px solid #4A2A2A; }
.btn-danger:hover { background: #3A2020; opacity: 1; }

/* ─────────────────────────────────────────
   Inputs
───────────────────────────────────────── */
.input, .select {
  padding: 9px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Suisse Intl', sans-serif;
  font-size: 14px;
  font-weight: 400;
  background: var(--card-bg);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
  appearance: none;
  -webkit-appearance: none;
}

.input:focus, .select:focus { border-color: var(--accent); }

.input::placeholder { color: var(--muted-3); }

.select option { background: #242120; color: #F5F2EA; }

input[type="date"], input[type="time"] { color-scheme: dark; }

/* ─────────────────────────────────────────
   Row list items
───────────────────────────────────────── */
.row-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}

.row-item:last-child { border-bottom: none; }
.row-item:hover { background: var(--stat-bg); }

/* ─────────────────────────────────────────
   Avatar
───────────────────────────────────────── */
.avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: #3A3533;
  color: var(--text);
  display: grid;
  place-items: center;
  font-family: 'Suisse Intl', sans-serif;
  font-weight: 600;
  font-size: 13px;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

/* ─────────────────────────────────────────
   Client grid
───────────────────────────────────────── */
.client-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.client-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-shadow: var(--shadow);
}

.client-card:hover {
  border-color: #5A5350;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  text-decoration: none;
  color: inherit;
}

/* ─────────────────────────────────────────
   Tabs
───────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}

.tab-btn {
  padding: 12px 20px;
  font-family: 'Suisse Intl', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}

.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }

/* ─────────────────────────────────────────
   Client detail inner sidebar
───────────────────────────────────────── */
.client-detail-body {
  display: flex;
  align-items: stretch;
  min-height: 600px;
}

.client-inner-sidebar {
  width: 200px;
  flex-shrink: 0;
  background: #1A1A1A;
  border-right: 1px solid var(--border);
  padding: 12px 0;
  position: sticky;
  top: 0;
  align-self: flex-start;
  max-height: calc(100vh - 60px);
  overflow-y: auto;
}

.client-nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 16px;
  color: var(--muted);
  font-size: 13px;
  font-family: 'Suisse Intl', sans-serif;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  transition: color 0.12s, background 0.12s;
  border-radius: 0;
  position: relative;
  text-decoration: none;
}

.client-nav-item:hover {
  color: var(--text);
  background: rgba(255,255,255,0.04);
  text-decoration: none;
}

.client-nav-item.active {
  color: var(--text);
  font-weight: 600;
  background: rgba(155,180,200,0.08);
}

.client-nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px; bottom: 6px;
  width: 2px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
}

.client-nav-item i, .client-nav-item svg {
  width: 14px; height: 14px; flex-shrink: 0;
}

.client-nav-badge {
  margin-left: auto;
  background: var(--border);
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 999px;
  line-height: 1.6;
}

.client-content-area {
  flex: 1;
  min-width: 0;
  background: var(--bg);
}

/* Overview quick-link cards */
.overview-link-card {
  background: #252525;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  width: 100%;
}

.overview-link-card:hover {
  background: #2C2C2C;
  border-color: #444;
}

/* ─────────────────────────────────────────
   Dividers & helpers
───────────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 20px 0; }

.text-muted { color: var(--muted); }
.text-sm    { font-size: 12px; }
.text-semi  { font-family: 'Suisse Intl', sans-serif; font-weight: 600; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.sixty-forty { display: grid; grid-template-columns: 3fr 2fr; gap: 24px; }

.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-center  { display: flex; align-items: center; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }

.mb-3  { margin-bottom: 3px; }
.mb-4  { margin-bottom: 4px; }
.mb-6  { margin-bottom: 6px; }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.gap-4 { gap: 4px; }
.gap-6 { gap: 6px; }
.gap-10 { gap: 10px; }

/* ─────────────────────────────────────────
   Back link
───────────────────────────────────────── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-family: 'Suisse Intl', sans-serif;
  font-size: 13px;
  text-decoration: none;
  margin-bottom: 20px;
  transition: color 0.12s;
}

.back-link:hover { color: var(--text); text-decoration: none; }
.back-link svg { width: 14px; height: 14px; }

/* ─────────────────────────────────────────
   Search / filter bar
───────────────────────────────────────── */
.filter-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 20px;
}

.filter-bar .input { flex: 1; max-width: 320px; }

/* ─────────────────────────────────────────
   Notifications
───────────────────────────────────────── */
.notification-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
  cursor: pointer;
}

.notification-row:last-child { border-bottom: none; }
.notification-row:hover { background: var(--stat-bg); }
.notification-row.unread { background: #1F2835; }

.notif-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  margin-top: 6px;
}

.notif-dot.read { background: transparent; border: 1px solid var(--border); }

/* ─────────────────────────────────────────
   Mobile header
───────────────────────────────────────── */
.mobile-header {
  display: none;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--sidebar-bg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.mobile-logo {
  font-family: 'Druk Wide', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--text);
}

.mobile-logo img {
  height: 22px;
  width: auto;
  display: block;
}

.menu-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  display: flex;
  align-items: center;
  padding: 4px;
}

.menu-btn svg { width: 20px; height: 20px; }

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 150;
}

/* ─────────────────────────────────────────
   Alerts / messages
───────────────────────────────────────── */
.messages-container { padding: 16px 44px 0; }

.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-family: 'Suisse Intl', sans-serif;
  font-size: 14px;
  margin-bottom: 8px;
}

.alert-success { background: #1A2E1A; color: #6BCB6B; border: 1px solid #2A5A2A; }
.alert-error   { background: #2E1A1A; color: #C89B9B; border: 1px solid #4A2A2A; }
.alert-warning { background: #1A2535; color: #9BB4C8; border: 1px solid #2A3A4A; }

/* ─────────────────────────────────────────
   HTMX loading indicator
───────────────────────────────────────── */
.htmx-indicator { opacity: 0; transition: opacity 200ms; }
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator { opacity: 1; }

/* ─────────────────────────────────────────
   Login page
───────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--bg);
}

.login-card {
  width: 100%;
  max-width: 380px;
  padding: 16px;
}

.login-card .card-body { padding: 36px; }

/* ─────────────────────────────────────────
   Wizard (task creation)
───────────────────────────────────────── */
.wizard-steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 32px;
}

.wizard-step-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Suisse Intl', sans-serif;
  font-size: 13px;
  color: var(--muted);
}

.wizard-step-item.active { color: var(--text); font-weight: 600; }
.wizard-step-item.done   { color: var(--accent); }

.wizard-step-num {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--border);
  color: var(--muted);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

.wizard-step-item.active .wizard-step-num {
  background: var(--accent);
  color: #1C1917;
}

.wizard-step-item.done .wizard-step-num {
  background: #1A2E1A;
  color: #6BCB6B;
}

.wizard-step-connector {
  width: 32px;
  height: 1px;
  background: var(--border);
  margin: 0 4px;
}

.wizard-client-card {
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  text-align: left;
}

.wizard-client-card:hover {
  border-color: #5A5350;
  background: var(--stat-bg);
}

.wizard-client-card.selected {
  border-color: var(--accent);
  background: var(--stat-bg);
}

.wizard-type-card {
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.wizard-type-card:hover {
  border-color: #5A5350;
  background: var(--stat-bg);
}

.wizard-type-card.selected {
  border-color: var(--accent);
  background: var(--stat-bg);
}

.wizard-type-icon {
  width: 44px; height: 44px;
  background: var(--stat-bg);
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  color: var(--accent);
}

.wizard-type-icon svg { width: 20px; height: 20px; }

.priority-btn {
  flex: 1;
  padding: 8px 12px;
  font-family: 'Suisse Intl', sans-serif;
  font-size: 12px;
  font-weight: 600;
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.12s;
  text-align: center;
}

.priority-btn:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.priority-btn:last-child  { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

.priority-btn.active-low    { background: #2A2A28; color: #8C8580; border-color: #3A3A38; }
.priority-btn.active-normal { background: #2A2523; color: var(--text); border-color: var(--border); }
.priority-btn.active-high   { background: #1A2535; color: #9BB4C8; border-color: #2A3A4A; }
.priority-btn.active-urgent { background: #2E1A1A; color: #C89B9B; border-color: #4A2A2A; }

/* ─────────────────────────────────────────
   Workflow steps (packages page)
───────────────────────────────────────── */
.workflow-step-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}

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

.workflow-step-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--stat-bg);
  border: 1px solid var(--border);
  color: var(--muted);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

/* ─────────────────────────────────────────
   Responsive
───────────────────────────────────────── */
@media (max-width: 900px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .sixty-forty { grid-template-columns: 1fr; }
  .client-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: none;
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0,0,0,0.4);
  }

  .main { margin-left: 0; }

  .mobile-header { display: flex; }

  .page-header { padding: 24px 20px 20px; flex-direction: column; gap: 16px; }
  .page-content { padding: 0 20px 32px; }
  .messages-container { padding: 12px 20px 0; }

  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .client-grid { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .filter-bar { flex-wrap: wrap; }
  .filter-bar .input { max-width: 100%; }
}

@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr; }
}

/* ── Global modal system ────────────────────────────────────────────────── */
[x-cloak] { display: none !important; }

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  box-sizing: border-box;
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  background: #252525;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 28px;
  box-sizing: border-box;
}

/* ── Workflow tracker (horizontal step indicator) ─────────────────────────── */
.workflow-tracker {
  display: flex;
  align-items: flex-start;
  margin: 14px 0 6px;
  overflow-x: auto;
}

/* Each stage takes equal width */
.wf-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 52px;
}

/* Top row: left-line → dot → right-line */
.wf-step-track {
  display: flex;
  align-items: center;
  width: 100%;
  height: 28px;
}

.wf-line {
  flex: 1;
  height: 2px;
  transition: background 0.2s;
}
.wf-line.filled      { background: #9BB4C8; }
.wf-line.empty       { background: #333333; }
.wf-line.transparent { background: transparent; }

.wf-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: all 0.2s;
}
.wf-dot.complete {
  background: #9BB4C8;
  border: 2px solid #9BB4C8;
  box-shadow: none;
}
.wf-dot.current {
  background: #9BB4C8;
  border: 2px solid #9BB4C8;
  box-shadow: 0 0 0 4px rgba(155, 180, 200, 0.22);
  animation: wf-pulse 2s ease-in-out infinite;
}
.wf-dot.pending {
  background: transparent;
  border: 2px solid #333333;
}

@keyframes wf-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(155, 180, 200, 0.18); }
  50%       { box-shadow: 0 0 0 7px rgba(155, 180, 200, 0.06); }
}

.wf-step-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted-3);
  text-align: center;
  white-space: nowrap;
  margin-top: 5px;
  line-height: 1.2;
}
.wf-step-label.complete,
.wf-step-label.current { color: #9BB4C8; }

.wf-step-detail {
  font-size: 10px;
  color: var(--muted);
  text-align: center;
  margin-top: 3px;
  line-height: 1.3;
  white-space: nowrap;
}
/* ── Social Media platform badges ── */
.sm-platform {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
}
.sm-platform-instagram { background: #3A1A25; color: #C89BB0; }
.sm-platform-facebook  { background: #1A2535; color: #9BB4C8; }
.sm-platform-tiktok    { background: #2A2A2A; color: #EBEBEB; }
.sm-platform-linkedin  { background: #1A2535; color: #9BB4C8; }
.sm-platform-youtube   { background: #2E1A1A; color: #C89B9B; }
.sm-platform-twitter   { background: #1A2535; color: #9BB4C8; }
.sm-platform-other     { background: #2A2A2A; color: #888888; }

.cal-add-btn {
  width: 100%;
  margin-top: 5px;
  background: none;
  border: 1px dashed #2A2826;
  border-radius: 5px;
  padding: 4px;
  font-size: 10px;
  color: var(--muted-3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.1s, color 0.1s;
}
.cal-add-btn:hover { border-color: var(--accent); color: var(--accent); }

.wf-step-detail-today {
  font-size: 10px;
  color: #C89B9B;
  font-weight: 600;
  text-align: center;
  margin-top: 3px;
  white-space: nowrap;
}
.wf-step-detail-overdue {
  font-size: 10px;
  color: #C89B9B;
  font-weight: 600;
  text-align: center;
  margin-top: 3px;
  white-space: nowrap;
  background: #2E1A1A;
  border-radius: 4px;
  padding: 1px 5px;
  display: inline-block;
}
