/* ==========================================================================
   3Knots Digital — Joyful Executive Glass Design System
   Primary: Midnight Slate (#0F172A) | Secondary: Radiant Sunset Orange (#F97316)
   ========================================================================== */

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

:root {
  /* Primary — Midnight Slate / Obsidian */
  --primary: #0f172a;
  --primary-hover: #1e293b;
  --primary-light: #334155;
  --primary-soft: rgba(15, 23, 42, 0.08);
  --primary-glow: rgba(15, 23, 42, 0.22);
  --primary-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  --primary-gradient-hover: linear-gradient(135deg, #1e293b 0%, #334155 100%);

  /* Secondary — Radiant Sunset Orange */
  --secondary: #f97316;
  --secondary-hover: #ea580c;
  --secondary-light: #fb923c;
  --secondary-soft: rgba(249, 115, 22, 0.12);
  --secondary-glow: rgba(249, 115, 22, 0.28);
  --secondary-gradient: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
  --secondary-gradient-hover: linear-gradient(135deg, #ea580c 0%, #f97316 100%);

  /* Joyful semantic accents */
  --emerald: #10b981;
  --emerald-soft: rgba(16, 185, 129, 0.14);
  --emerald-gradient: linear-gradient(135deg, #059669 0%, #10b981 100%);

  --coral: #f43f5e;
  --coral-soft: rgba(244, 63, 94, 0.14);
  --coral-gradient: linear-gradient(135deg, #e11d48 0%, #f43f5e 100%);

  --amber: #f59e0b;
  --amber-soft: rgba(245, 158, 11, 0.14);

  --sky: #0ea5e9;
  --sky-soft: rgba(14, 165, 233, 0.14);

  --violet: #8b5cf6;
  --violet-soft: rgba(139, 92, 246, 0.14);

  /* Neutrals & surfaces */
  --ink: #0f172a;
  --ink-secondary: #334155;
  --muted: #64748b;
  --muted-light: #94a3b8;
  --separator: rgba(226, 232, 240, 0.85);

  /* Clean glass surfaces */
  --glass: rgba(255, 255, 255, 0.78);
  --glass-strong: rgba(255, 255, 255, 0.90);
  --glass-card: rgba(255, 255, 255, 0.86);
  --glass-dark: rgba(15, 23, 42, 0.88);
  --glass-border: rgba(255, 255, 255, 0.85);
  --glass-border-subtle: rgba(226, 232, 240, 0.75);
  --inset: rgba(241, 245, 249, 0.85);
  --inset-active: #ffffff;

  /* Shadows & elevation */
  --shadow-sm: 0 2px 6px -1px rgba(15, 23, 42, 0.05);
  --shadow: 0 12px 32px -4px rgba(15, 23, 42, 0.06), 0 4px 10px -2px rgba(15, 23, 42, 0.03);
  --shadow-lg: 0 20px 40px -8px rgba(15, 23, 42, 0.12), 0 8px 16px -4px rgba(15, 23, 42, 0.06);

  /* Geometry & Layout */
  --radius-xl: 24px;
  --radius: 18px;
  --radius-sm: 12px;
  --radius-pill: 9999px;
  --sidebar: 256px;

  /* Typography */
  --font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --display: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;

  /* Animation */
  --blur: blur(24px) saturate(180%);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: #f8fafc;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease, opacity 0.15s ease;
}

button, input, select, textarea {
  font: inherit;
}

/* ==========================================================================
   Atmospheric Wallpaper (Vibrant & Happy)
   ========================================================================== */
.ios-wallpaper {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 10% 8%, rgba(249, 115, 22, 0.12), transparent 42%),
    radial-gradient(circle at 92% 10%, rgba(15, 23, 42, 0.05), transparent 44%),
    radial-gradient(circle at 50% 50%, rgba(251, 146, 60, 0.06), transparent 50%),
    radial-gradient(circle at 80% 88%, rgba(16, 185, 129, 0.08), transparent 45%),
    linear-gradient(180deg, #f8fafc 0%, #f1f5f9 60%, #e2e8f0 100%);
}

.ios-wallpaper--auth {
  background:
    radial-gradient(circle at 20% 20%, rgba(249, 115, 22, 0.28), transparent 55%),
    radial-gradient(circle at 85% 20%, rgba(251, 146, 60, 0.18), transparent 48%),
    radial-gradient(circle at 50% 85%, rgba(15, 23, 42, 0.35), transparent 50%),
    linear-gradient(160deg, #090d16 0%, #0f172a 50%, #1e293b 100%);
}

/* ==========================================================================
   Glass Materials
   ========================================================================== */
.glass-panel {
  background: var(--glass-strong);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.glass-bar {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.05);
}

.glass-inset {
  background: var(--inset) !important;
  border: 1px solid rgba(226, 232, 240, 0.6) !important;
}

.glass-btn {
  background: rgba(255, 255, 255, 0.82) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(226, 232, 240, 0.85) !important;
}

/* ==========================================================================
   Authentication Screens
   ========================================================================== */
.auth-body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.auth-shell {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.auth-brand {
  display: flex;
  align-items: center;
  padding: 48px clamp(32px, 5vw, 68px);
  color: #ffffff;
}

.auth-brand__content {
  max-width: 480px;
}

.auth-brand__logo {
  width: min(240px, 100%);
  margin-bottom: 28px;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
}

.auth-brand__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: rgba(249, 115, 22, 0.2);
  border: 1px solid rgba(249, 115, 22, 0.4);
  color: #fb923c;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-brand__headline {
  margin: 0 0 14px;
  font-family: var(--display);
  font-size: clamp(2.2rem, 3.8vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.1;
  background: linear-gradient(135deg, #ffffff 30%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-brand__copy {
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 1.05rem;
  line-height: 1.6;
}

.auth-brand__points {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.auth-brand__points li {
  position: relative;
  padding-left: 28px;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 500;
  font-size: 0.95rem;
}

.auth-brand__points li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: -1px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--secondary-gradient);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  box-shadow: 0 2px 8px var(--secondary-glow);
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px 24px;
}

.auth-panel__inner {
  width: min(420px, 100%);
  border-radius: var(--radius-xl);
  padding: 34px 28px;
}

.auth-panel__logo-mobile {
  display: none;
  width: 160px;
  margin: 0 auto 20px;
}

.auth-panel__kicker {
  margin: 0 0 4px;
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.auth-panel__title {
  margin: 0 0 6px;
  font-family: var(--display);
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.auth-panel__subtitle {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.auth-form {
  display: grid;
  gap: 16px;
}

.auth-form__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-secondary);
  font-size: 0.88rem;
  cursor: pointer;
  user-select: none;
}

.check input {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.demo-box {
  margin-top: 20px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--inset);
  border: 1px dashed rgba(79, 70, 229, 0.3) !important;
}

.demo-box__title {
  margin: 0 0 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.demo-box__title::before {
  content: "★";
  color: var(--secondary);
}

.demo-box p {
  margin: 4px 0;
  font-size: 0.88rem;
  display: flex;
  justify-content: space-between;
}

.demo-box span {
  color: var(--muted);
}

.demo-box strong {
  font-family: var(--mono);
  font-size: 0.84rem;
  color: var(--ink);
}

.demo-box .btn {
  margin-top: 12px;
}

/* ==========================================================================
   Inputs & Form Controls
   ========================================================================== */
.field {
  display: grid;
  gap: 6px;
}

.field__label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-secondary);
  padding-left: 2px;
}

.field__input {
  width: 100%;
  border: 1px solid var(--separator);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  background: #ffffff;
  color: var(--ink);
  outline: none;
  font-size: 0.92rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.field__input:focus {
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3.5px var(--primary-soft);
}

.field__password {
  position: relative;
}

.field__password .field__input {
  padding-right: 70px;
}

.field__toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
}

.field__toggle:hover {
  background: var(--primary-soft);
}

.field__help,
.field-hint {
  color: var(--muted);
  font-size: 0.78rem;
}

select.field__input {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #64748b 50%),
    linear-gradient(135deg, #64748b 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 3px), calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 36px;
  cursor: pointer;
}

.field textarea.field__input {
  min-height: 90px;
  resize: vertical;
  line-height: 1.5;
}

/* ==========================================================================
   Buttons (Primary = Indigo, Secondary = Sunset Orange)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  font-weight: 700;
  font-size: 0.90rem;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.25;
  transition: all 0.18s var(--ease);
  user-select: none;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.98);
}

.btn__icon {
  display: inline-flex;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.btn__icon svg {
  width: 16px;
  height: 16px;
}

/* Primary Button — Electric Indigo */
.btn--primary {
  background: var(--primary-gradient) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px var(--primary-glow), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
}

.btn--primary:hover {
  background: var(--primary-gradient-hover) !important;
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.38) !important;
  transform: translateY(-1px);
}

/* Secondary Button — Radiant Sunset Orange */
.btn--secondary {
  background: var(--secondary-gradient) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px var(--secondary-glow), inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
}

.btn--secondary:hover {
  background: var(--secondary-gradient-hover) !important;
  box-shadow: 0 6px 20px rgba(249, 115, 22, 0.38) !important;
  transform: translateY(-1px);
}

/* Ghost / Soft Button */
.btn--ghost {
  background: #ffffff !important;
  color: var(--ink) !important;
  border: 1px solid var(--separator) !important;
  box-shadow: var(--shadow-sm) !important;
}

.btn--ghost:hover {
  border-color: var(--primary) !important;
  color: var(--primary) !important;
  background: var(--primary-soft) !important;
  transform: translateY(-1px);
}

.btn--danger {
  background: var(--coral-soft) !important;
  color: var(--coral) !important;
  border: 1px solid rgba(244, 63, 94, 0.25) !important;
}

.btn--danger:hover {
  background: var(--coral) !important;
  color: #ffffff !important;
}

.btn--block {
  width: 100%;
}

.btn--lg {
  padding: 13px 22px;
  font-size: 0.98rem;
  border-radius: var(--radius);
}

.btn--sm {
  padding: 7px 14px;
  font-size: 0.82rem;
  border-radius: 10px;
}

.btn--cta {
  font-weight: 700 !important;
  padding: 11px 20px;
  border-radius: var(--radius-sm) !important;
}

/* Action buttons inside tables & lists */
.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 0.80rem;
  font-weight: 700;
  line-height: 1;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}

.action-btn .btn__icon,
.action-btn .btn__icon svg {
  width: 13px;
  height: 13px;
}

.action-btn:active {
  transform: scale(0.96);
}

.action-btn--primary {
  background: var(--primary-gradient);
  color: #ffffff;
  box-shadow: 0 2px 8px var(--primary-glow);
}

.action-btn--soft {
  background: #ffffff;
  color: var(--ink-secondary);
  border-color: var(--separator);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.action-btn--soft:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

.action-btn--secondary {
  background: var(--secondary-soft);
  color: var(--secondary-hover);
  border-color: rgba(249, 115, 22, 0.25);
}

.action-btn--secondary:hover {
  background: var(--secondary-gradient);
  color: #ffffff;
}

.action-btn--danger {
  background: #fff5f5;
  color: var(--coral);
  border-color: rgba(244, 63, 94, 0.2);
}

.action-btn--danger:hover {
  background: var(--coral);
  color: #ffffff;
}

/* ==========================================================================
   Alerts, Chips & Toasts
   ========================================================================== */
.alert {
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  margin-bottom: 16px;
  font-size: 0.90rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.alert--error {
  background: #fff1f2;
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: #be123c;
}

.alert--success {
  background: #ecfdf5;
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #047857;
}

.alert-list {
  margin: 4px 0 0;
  padding-left: 18px;
}

.toast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  border-radius: var(--radius);
  animation: fade-up 0.35s var(--ease) both;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.toast--success {
  background: #ecfdf5;
  border-color: rgba(16, 185, 129, 0.4);
  color: #065f46;
}

.toast--error {
  background: #fff1f2;
  border-color: rgba(244, 63, 94, 0.4);
  color: #9f1239;
}

.toast__body {
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast__body strong {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.06);
}

.toast__close {
  border: 0;
  background: transparent;
  font-size: 1.3rem;
  cursor: pointer;
  color: inherit;
  opacity: 0.6;
  line-height: 1;
}

.toast__close:hover {
  opacity: 1;
}

/* ==========================================================================
   App Shell & Layout
   ========================================================================== */
.dash-body {
  min-height: 100vh;
  position: relative;
}

.dash-shell {
  display: grid;
  grid-template-columns: var(--sidebar) 1fr;
  min-height: 100vh;
  gap: 0;
  padding: 14px;
  position: relative;
  z-index: 1;
}

/* Modern Dark Sleek Sidebar */
.sidebar {
  position: sticky;
  top: 14px;
  height: calc(100vh - 28px);
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  border-radius: var(--radius-xl);
  color: #ffffff;
  background: rgba(15, 23, 42, 0.90);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  z-index: 40;
}

.sidebar__brand {
  padding: 6px 10px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar__brand img {
  width: 148px;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.25));
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar__spacer {
  flex: 1;
  min-height: 12px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: rgba(255, 255, 255, 0.72);
  font-weight: 600;
  font-size: 0.92rem;
  transition: all 0.15s ease;
  position: relative;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  transform: translateX(2px);
}

.nav-link.is-active {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.nav-link.is-active::after {
  content: "";
  position: absolute;
  right: 12px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--secondary);
  box-shadow: 0 0 10px var(--secondary);
}

.nav-link__icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  flex-shrink: 0;
}

.nav-link__icon svg {
  width: 20px;
  height: 20px;
}

.sidebar__footer {
  display: grid;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar__user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--secondary-gradient);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.92rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px var(--secondary-glow);
}

.sidebar__user-name {
  margin: 0;
  font-weight: 700;
  font-size: 0.88rem;
  color: #ffffff;
}

.sidebar__user-role {
  margin: 2px 0 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.72rem;
}

.sidebar__logout {
  display: block;
  text-align: center;
  padding: 9px;
  border-radius: var(--radius-sm);
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.84rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  transition: all 0.15s ease;
}

.sidebar__logout:hover {
  color: #ffffff;
  background: rgba(244, 63, 94, 0.3);
}

/* ==========================================================================
   Main Content & Topbar
   ========================================================================== */
.dash-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding-left: 14px;
}

.topbar {
  position: sticky;
  top: 14px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 10px 16px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
}

.topbar__title {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.topbar__search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 440px;
  height: 40px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  background: #ffffff;
  border: 1px solid var(--separator);
  color: var(--muted);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.02);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.topbar__search:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.topbar__search input {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  font-size: 0.88rem;
}

.topbar__kbd {
  font-family: var(--mono);
  font-size: 0.70rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--inset);
  color: var(--muted);
  border: 1px solid var(--separator);
}

.topbar__actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
}

.dash-content {
  display: grid;
  gap: 16px;
  width: 100%;
  padding-bottom: 96px;
}

/* ==========================================================================
   Page Intros / Hero Headers
   ========================================================================== */
.page-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 2px;
}

.page-intro--hero {
  padding: 24px 28px;
  border-radius: var(--radius-xl);
  background: var(--glass-strong);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.page-intro--hero::before {
  content: "";
  position: absolute;
  right: -30px;
  top: -30px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.15), transparent 70%);
  pointer-events: none;
}

.page-intro__date {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.page-intro__title {
  margin: 0 0 6px;
  font-family: var(--display);
  font-size: clamp(1.75rem, 2.5vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
  color: var(--ink);
}

.page-intro__copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.5;
  max-width: 52ch;
}

.page-intro__badge {
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.74rem;
  font-weight: 700;
}

.intro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.info-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  margin: 0;
  padding: 12px 16px;
  background: #ffffff;
  border: 1px solid var(--separator);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.info-banner strong {
  color: var(--ink);
}

/* ==========================================================================
   Friendly 3-Step Guide Strip
   ========================================================================== */
.guide-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.cta-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: #ffffff;
  border: 1.5px solid rgba(226, 232, 240, 0.9);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s var(--ease);
  position: relative;
  overflow: hidden;
}

.cta-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 10px 24px -4px var(--primary-glow);
}

.cta-card.is-current {
  border-color: var(--primary);
  background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
  box-shadow: 0 8px 20px -2px var(--primary-glow);
}

.cta-card.is-done {
  border-color: rgba(16, 185, 129, 0.4);
  background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%);
}

.cta-card__body {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.cta-card__step {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-light);
}

.cta-card.is-current .cta-card__step {
  color: var(--primary);
}

.cta-card.is-done .cta-card__step {
  color: var(--emerald);
}

.cta-card strong {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
}

.cta-card small {
  color: var(--muted);
  font-size: 0.82rem;
}

.cta-card__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--ink);
  color: #ffffff;
  font-size: 0.84rem;
  font-weight: 700;
  transition: all 0.15s ease;
}

.cta-card:hover .cta-card__btn {
  background: var(--primary);
}

.cta-card__btn--fill {
  background: var(--secondary-gradient);
  box-shadow: 0 4px 12px var(--secondary-glow);
}

.cta-card.is-done .cta-card__btn {
  background: var(--emerald);
}

/* ==========================================================================
   Stat Metric Cards (Colorful & Engaging)
   ========================================================================== */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.stat {
  position: relative;
  overflow: hidden;
  padding: 20px;
  border-radius: var(--radius);
  background: #ffffff;
  border: 1px solid var(--glass-border-subtle);
  box-shadow: var(--shadow-sm);
  color: inherit;
  transition: all 0.2s var(--ease);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

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

/* Stat color themes */
.stat[data-tone="orange"],
.stat[data-tone="primary"] {
  border-top: 4px solid var(--primary);
  background: linear-gradient(180deg, #ffffff 0%, #f5f3ff 100%);
}

.stat[data-tone="dark"],
.stat[data-tone="emerald"] {
  border-top: 4px solid var(--emerald);
  background: linear-gradient(180deg, #ffffff 0%, #ecfdf5 100%);
}

.stat[data-tone="muted"],
.stat[data-tone="secondary"] {
  border-top: 4px solid var(--secondary);
  background: linear-gradient(180deg, #ffffff 0%, #fff7ed 100%);
}

.stat[data-tone="light"],
.stat[data-tone="sky"] {
  border-top: 4px solid var(--sky);
  background: linear-gradient(180deg, #ffffff 0%, #f0f9ff 100%);
}

.stat__label {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.80rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat__value {
  margin: 0 0 4px;
  font-family: var(--display);
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.stat__meta {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.80rem;
  font-weight: 500;
}

.stat__action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.80rem;
  font-weight: 700;
  color: var(--primary) !important;
  transition: all 0.15s ease;
}

.stat__action:hover {
  color: var(--primary-hover) !important;
  transform: translateX(3px);
}

/* ==========================================================================
   Panels, Tables & Data Lists
   ========================================================================== */
.dash-grid {
  display: grid;
  grid-template-columns: 1.55fr 0.85fr;
  gap: 16px;
}

.panel,
.form-panel,
.brand-card {
  background: #ffffff;
  border: 1px solid var(--glass-border-subtle);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px;
}

.panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.panel__title {
  margin: 0 0 4px;
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.panel__subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.text-link {
  color: var(--primary);
  font-weight: 700;
  font-size: 0.90rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.text-link:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.text-link--danger {
  color: var(--coral);
}

/* ==========================================================================
   Enhanced Premium Table Styling
   ========================================================================== */
.table-wrap {
  overflow-x: auto;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.02);
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 620px;
  background: #ffffff;
}

.data-table th {
  color: #475569;
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  background: #f8fafc;
  padding: 14px 18px;
  border-bottom: 1.5px solid #e2e8f0;
  white-space: nowrap;
}

.data-table th:first-child {
  padding-left: 20px;
  border-top-left-radius: 14px;
}

.data-table th:last-child {
  padding-right: 20px;
  border-top-right-radius: 14px;
}

.data-table td {
  text-align: left;
  padding: 15px 18px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.90rem;
  vertical-align: middle;
  color: var(--ink);
}

.data-table td:first-child {
  padding-left: 20px;
}

.data-table td:last-child {
  padding-right: 20px;
}

.data-table tbody tr {
  transition: all 0.15s ease;
  position: relative;
}

.data-table tbody tr:hover {
  background: rgba(249, 115, 22, 0.035);
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

/* Invoice Number Badge */
.inv-number-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 9px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-family: var(--mono);
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink);
  transition: all 0.15s ease;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.inv-number-badge svg {
  color: var(--secondary);
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.inv-number-badge:hover {
  background: #fff7ed;
  border-color: var(--secondary);
  color: var(--secondary-hover);
  box-shadow: 0 3px 10px rgba(249, 115, 22, 0.18);
  transform: translateY(-1px);
}

/* Brand & Client Inlines */
.brand-inline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-avatar-mini {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.brand-name-bold {
  font-weight: 700;
  color: var(--ink);
  font-size: 0.90rem;
}

.client-inline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  max-width: 100%;
}

.client-avatar-mini {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  color: #334155;
  border: 1px solid #cbd5e1;
  font-size: 0.72rem;
  font-weight: 800;
  flex-shrink: 0;
}

.client-name {
  font-weight: 600;
  color: var(--ink);
  font-size: 0.90rem;
}

/* Total Amount */
.total-amount {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.01em;
}

/* Status Pill with indicator dot */
.status-pill,
.status {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 5px 12px !important;
  border-radius: var(--radius-pill) !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  text-transform: capitalize !important;
  letter-spacing: 0.01em !important;
}

.status-pill__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-pill--paid,
.status--paid {
  background: rgba(16, 185, 129, 0.12) !important;
  color: #047857 !important;
  border: 1px solid rgba(16, 185, 129, 0.28) !important;
}
.status-pill--paid .status-pill__dot {
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}

.status-pill--pending,
.status--pending {
  background: rgba(249, 115, 22, 0.12) !important;
  color: #ea580c !important;
  border: 1px solid rgba(249, 115, 22, 0.32) !important;
}
.status-pill--pending .status-pill__dot {
  background: #f97316;
  box-shadow: 0 0 6px #f97316;
}

.status-pill--overdue,
.status--overdue {
  background: rgba(244, 63, 94, 0.12) !important;
  color: #be123c !important;
  border: 1px solid rgba(244, 63, 94, 0.28) !important;
}
.status-pill--overdue .status-pill__dot {
  background: #f43f5e;
  box-shadow: 0 0 6px #f43f5e;
}

.status-pill--draft,
.status-pill--cancelled,
.status--draft,
.status--cancelled {
  background: #f1f5f9 !important;
  color: #475569 !important;
  border: 1px solid #cbd5e1 !important;
}
.status-pill--draft .status-pill__dot,
.status-pill--cancelled .status-pill__dot {
  background: #94a3b8;
}

/* Capsule action buttons in table */
.action-btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  border: 1px solid var(--separator);
  background: #ffffff;
  color: var(--ink-secondary);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: all 0.15s ease;
  text-decoration: none;
  cursor: pointer;
}

.action-btn-pill svg {
  width: 13px;
  height: 13px;
}

.action-btn-pill--view:hover {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff !important;
  box-shadow: 0 2px 8px var(--primary-glow);
}
.action-btn-pill--view:hover svg {
  stroke: #ffffff;
  color: #ffffff;
}

.action-btn-pill--edit:hover {
  border-color: var(--secondary);
  background: var(--secondary);
  color: #ffffff !important;
  box-shadow: 0 2px 8px var(--secondary-glow);
}
.action-btn-pill--edit:hover svg {
  stroke: #ffffff;
  color: #ffffff;
}

.action-btn-pill--danger:hover {
  border-color: var(--coral);
  background: var(--coral);
  color: #ffffff !important;
  box-shadow: 0 2px 8px var(--coral-soft);
}
.action-btn-pill--danger:hover svg {
  stroke: #ffffff;
  color: #ffffff;
}

/* Brand list items & mini cards with high-contrast Radiant Sunset Orange Button */
.brand-mini-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.brand-mini {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: #ffffff;
  border: 1.5px solid var(--separator);
  box-shadow: var(--shadow-sm);
  transition: all 0.15s ease;
}

.brand-mini:hover {
  border-color: var(--secondary);
  box-shadow: 0 6px 20px -4px var(--secondary-soft);
  transform: translateY(-1px);
}

.brand-mini img {
  width: 44px;
  height: 36px;
  object-fit: contain;
}

.brand-mini strong {
  display: block;
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--ink);
}

.brand-mini span {
  color: var(--muted);
  font-size: 0.80rem;
}

/* High visibility for Invoice button on right side card */
.brand-invoice-btn,
.brand-mini .btn,
.brand-mini .btn--cta,
.brand-mini .btn--primary,
.brand-mini .btn--secondary {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important;
  background-color: #f97316 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(249, 115, 22, 0.38) !important;
  font-weight: 700 !important;
  font-size: 0.84rem !important;
  border: 0 !important;
  border-radius: 10px !important;
  padding: 8px 16px !important;
  cursor: pointer !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  transition: all 0.15s ease !important;
}

.brand-invoice-btn:hover,
.brand-mini .btn:hover,
.brand-mini .btn--cta:hover,
.brand-mini .btn--primary:hover,
.brand-mini .btn--secondary:hover {
  background: linear-gradient(135deg, #ea580c 0%, #f97316 100%) !important;
  background-color: #ea580c !important;
  box-shadow: 0 6px 20px rgba(249, 115, 22, 0.5) !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
}

.brand-invoice-btn *,
.brand-mini .btn *,
.brand-mini .btn--cta *,
.brand-mini .btn--primary *,
.brand-mini .btn--secondary * {
  color: #ffffff !important;
  fill: #ffffff !important;
  stroke: #ffffff !important;
}

/* Empty states */
.empty-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border-radius: var(--radius-sm);
  background: var(--inset);
  border: 1px dashed var(--separator);
}

.empty-inline__icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--primary-soft);
  display: grid;
  place-items: center;
  color: var(--primary);
  font-weight: 800;
}

.empty-inline strong {
  display: block;
  font-size: 0.94rem;
  color: var(--ink);
}

.empty-inline p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.empty-state {
  text-align: center;
  padding: 48px 24px;
}

.empty-state__icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 16px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
}

.clients-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 16px 24px;
}

.clients-toolbar__tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.view-toggle {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border: 1px solid var(--separator);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.view-toggle__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.view-toggle__btn.is-active {
  background: var(--ink);
  color: #ffffff;
}

[data-clients-views][data-view="grid"] [data-view-panel="table"],
[data-clients-views][data-view="table"] [data-view-panel="grid"] {
  display: none;
}

.clients-toolbar__title {
  margin: 0 0 4px;
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 800;
}

.clients-toolbar__copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.client-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.client-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.client-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.client-card__name {
  margin: 0;
  font-family: var(--display);
  font-size: 1.12rem;
  font-weight: 800;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.client-card__person,
.client-card__meta,
.client-card__address {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.client-card__person {
  color: var(--ink-secondary);
  font-weight: 600;
}

.client-card__actions {
  justify-content: flex-start;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--separator);
}

.client-card__actions .row-action {
  flex: 1 1 0;
}

.clients-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 240px;
  min-width: 200px;
  padding: 8px 12px;
  border: 1px solid var(--separator);
  border-radius: 12px;
  background: #ffffff;
  color: var(--muted);
}

.clients-search input {
  width: 100%;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.88rem;
  color: var(--ink);
  outline: none;
}

.clients-table-panel {
  padding: 0;
  max-width: 100%;
}

.clients-table-wrap,
.invoices-table-wrap {
  border: 0;
  box-shadow: none;
  border-radius: 0;
  max-width: 100%;
  overflow-x: auto;
}

.clients-table,
.invoices-table {
  width: 100%;
  min-width: 720px;
  table-layout: fixed;
}

.invoices-table .col-invoice { width: 28%; }
.invoices-table .col-client { width: 24%; }
.invoices-table .col-amount,
.invoices-table .col-status { width: 16%; }
.invoices-table .col-actions { width: 16%; }

.clients-table .col-client { width: 26%; }
.clients-table .col-email { width: 24%; }
.clients-table .col-phone { width: 20%; }
.clients-table .col-invoices { width: 14%; }
.clients-table .col-actions { width: 16%; }

.clients-table th,
.clients-table td,
.invoices-table th,
.invoices-table td {
  padding: 14px 16px;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
}

.invoices-table .client-inline {
  display: flex;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.clients-table .client-cell {
  width: 100%;
}

.clients-table .client-cell__text strong,
.invoices-table .client-name {
  min-width: 0;
}

.clients-table .client-cell__heading {
  flex-wrap: nowrap;
}

.clients-table .is-actions,
.invoices-table .is-actions {
  white-space: nowrap;
  text-align: right;
}

.cell-muted {
  color: var(--ink-secondary);
  font-size: 0.86rem;
  white-space: nowrap;
}

.cell-sub {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invoices-table .cell-sub {
  white-space: normal;
}

.clients-table td:nth-child(2),
.clients-table td:nth-child(3),
.invoices-table .client-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-actions--compact {
  justify-content: flex-end;
  gap: 4px;
}

.row-actions--compact .row-action {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 8px;
}

.row-actions--compact .row-action__label {
  display: none;
}

.client-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.client-cell__avatar {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #eef2ff 0%, #fff7ed 100%);
  color: var(--primary);
  font-weight: 800;
  font-size: 0.95rem;
}

.client-cell__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.client-cell__heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
}

.client-cell__text strong {
  font-size: 0.95rem;
  color: var(--ink);
}

.client-cell__text span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.client-cell__text .client-count {
  color: var(--ink-secondary);
  font-size: 0.78rem;
}

.client-cell__address {
  overflow-wrap: anywhere;
}

.client-contact {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  font-size: 0.86rem;
  line-height: 1.4;
}

.client-contact span:first-child {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.client-contact span:last-child {
  color: var(--muted);
}

.client-count {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid var(--separator);
  color: var(--ink-secondary);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: nowrap;
}

.row-actions form {
  display: inline-flex;
  margin: 0;
}

.row-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 32px;
  padding: 0 10px;
  border-radius: 9px;
  border: 1px solid var(--separator);
  background: #ffffff;
  color: var(--ink-secondary);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.row-action svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.row-action--primary {
  background: var(--primary-gradient);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 2px 8px var(--primary-glow);
}

.row-action--danger {
  color: var(--coral);
  background: #fff5f5;
  border-color: rgba(244, 63, 94, 0.18);
}

.row-action:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

.row-action--primary:hover {
  color: #ffffff;
  background: var(--primary-gradient-hover);
}

.row-action--danger:hover {
  background: var(--coral);
  border-color: var(--coral);
  color: #ffffff;
}

.sidebar__logout-form {
  margin: 0;
}

.sidebar__logout-form .sidebar__logout {
  width: 100%;
  border: 0;
  font: inherit;
  cursor: pointer;
}

@media (max-width: 860px) {
  .row-action__label {
    display: none;
  }
  .row-action {
    width: 32px;
    padding: 0;
  }

  .client-card__actions .row-action__label {
    display: inline;
  }

  .client-card__actions .row-action {
    width: auto;
    padding: 0 10px;
  }
}

/* ==========================================================================
   Brand Cards & Pickers
   ========================================================================== */
.brand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  align-items: stretch;
}

.brand-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  border-top: 4px solid var(--brand-primary, var(--primary));
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

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

.brand-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.brand-card__logo-wrap {
  width: 128px;
  height: 58px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  padding: 6px 10px;
  overflow: hidden;
  background: #f8fafc;
  border: 1px solid var(--separator);
  border-radius: 10px;
}

.brand-card__logo-wrap img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.brand-card__style {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--brand-primary, var(--primary));
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--inset);
  padding: 4px 8px;
  border-radius: 6px;
  line-height: 1.2;
}

.brand-card__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.brand-card__name {
  margin: 0;
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.brand-card__tagline {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.brand-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.brand-card__tags span {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid var(--separator);
  color: var(--ink-secondary);
  font-size: 0.72rem;
  font-weight: 700;
}

.brand-card__email,
.brand-card__meta-row {
  margin: 0;
  min-width: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  overflow-wrap: break-word;
}

.brand-card__email {
  color: var(--ink-secondary, var(--ink));
}

.brand-card__meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  color: var(--ink);
}

.brand-card__meta-row em {
  margin-right: 4px;
  color: var(--muted);
  font-style: normal;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  margin-top: auto;
}

.brand-card__count {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
  white-space: nowrap;
}

.brand-card__colors {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

.brand-card__colors span {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.brand-card__actions {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.85fr) minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
  padding-top: 12px;
  border-top: 1px solid var(--separator);
}

.brand-card__actions form {
  display: flex;
  min-width: 0;
  margin: 0;
}

.brand-card__actions .action-btn {
  width: 100%;
  justify-content: center;
  white-space: nowrap;
  padding: 7px 8px;
  gap: 4px;
}

/* Brand Picker inside Invoice Form */
.brand-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.brand-option {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--separator);
  background: #ffffff;
  cursor: pointer;
  transition: all 0.18s ease;
  position: relative;
  min-width: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.brand-option:hover {
  border-color: var(--secondary);
  background: #fffcf9;
  box-shadow: 0 4px 14px var(--secondary-soft);
  transform: translateY(-1px);
}

.brand-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.brand-option img {
  width: 48px;
  height: 40px;
  object-fit: contain;
  border-radius: 8px;
  background: #f8fafc;
  padding: 2px;
  flex-shrink: 0;
}

.brand-option > div,
.brand-option__info {
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-option strong,
.brand-option__name {
  display: block;
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.brand-option span,
.brand-option__email {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.brand-option__meta {
  margin-top: 3px !important;
  color: var(--brand-primary, var(--secondary)) !important;
  font-weight: 700;
  font-size: 0.75rem !important;
  letter-spacing: 0.01em;
}

.brand-option.is-selected,
.brand-option:has(input:checked) {
  border-color: var(--secondary);
  background: #fffaf5;
  box-shadow: 0 0 0 3px var(--secondary-soft), 0 4px 16px -2px var(--secondary-soft);
}

/* ==========================================================================
   Invoice Form & Stepper
   ========================================================================== */
.form-steps {
  list-style: none;
  margin: 0;
  padding: 6px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  border-radius: var(--radius);
  background: #ffffff;
  border: 1px solid var(--glass-border-subtle);
  box-shadow: var(--shadow-sm);
}

.form-steps li {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
  text-align: center;
  transition: all 0.15s ease;
}

.form-steps li span {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--inset);
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--ink);
}

.form-steps li.is-active {
  background: var(--primary-soft);
  color: var(--primary);
}

.form-steps li.is-active span {
  background: var(--primary-gradient);
  color: #ffffff;
  box-shadow: 0 2px 8px var(--primary-glow);
}

.step-label {
  margin: 0 0 4px;
  color: var(--secondary);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.form-grid {
  display: grid;
  gap: 16px;
}

.narrow-form {
  max-width: 800px;
}

.fields-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.fields-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.field--full {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.industry-picks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.industry-pick,
.service-pick {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--separator);
  border-radius: 12px;
  background: #f8fafc;
  cursor: pointer;
}

.industry-pick:has(input:checked),
.service-pick:has(input:checked) {
  background: #fff7ed;
  border-color: var(--secondary);
}

.industry-pick strong {
  font-size: 0.9rem;
}

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

.service-picks__row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.service-pick {
  padding: 8px 12px;
  border-radius: 999px;
}

.service-pick span {
  font-size: 0.82rem;
  font-weight: 700;
}

.service-presets {
  display: grid;
  gap: 12px;
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid var(--separator);
  border-radius: 14px;
  background: #f8fafc;
}

.service-presets__group {
  display: grid;
  gap: 8px;
}

.service-presets__label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.service-presets__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.service-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 7px 12px;
  border: 1px solid var(--separator);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
}

.service-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

@media (max-width: 720px) {
  .industry-picks {
    grid-template-columns: 1fr;
  }
}

/* Items Table inside Invoice Form */
.items-table {
  display: grid;
  gap: 10px;
}

.items-table__head,
.items-table__row {
  display: grid;
  grid-template-columns: 2fr 0.6fr 0.8fr 0.8fr 44px;
  gap: 10px;
  align-items: center;
}

.items-table__head {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0 4px;
}

.items-table__row {
  padding: 4px;
  border-radius: var(--radius-sm);
  background: var(--inset);
  border: 1px solid var(--separator);
  transition: all 0.15s ease;
}

.items-table__row:focus-within {
  background: #ffffff;
  border-color: var(--primary);
}

.items-table__row .field__input {
  background: #ffffff;
  border: 1px solid var(--separator);
}

.item-amount {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.95rem;
  text-align: right;
  color: var(--ink);
  padding-right: 4px;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: all 0.15s ease;
}

.icon-btn:hover {
  background: var(--coral-soft);
  color: var(--coral);
}

/* Invoice totals breakdown */
.invoice-totals {
  margin-top: 16px;
  margin-left: auto;
  width: min(300px, 100%);
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--inset);
  border: 1px solid var(--separator);
}

.invoice-totals > div {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.90rem;
}

.invoice-totals strong {
  font-family: var(--mono);
  color: var(--ink);
}

.invoice-totals__grand {
  padding-top: 10px;
  border-top: 2px solid var(--separator);
  font-size: 1.15rem !important;
}

.invoice-totals__grand strong {
  font-size: 1.25rem;
  color: var(--primary) !important;
}

/* Sticky floating actions bar */
.sticky-actions {
  position: sticky;
  bottom: 24px;
  z-index: 25;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 20px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1.5px solid var(--primary);
  box-shadow: var(--shadow-lg);
}

.sticky-actions__total {
  display: grid;
  gap: 2px;
}

.sticky-actions__total span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.sticky-actions__total strong {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--primary);
}

.sticky-actions__btns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ==========================================================================
   Filter Bar & Chips
   ========================================================================== */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-start;
  align-items: center;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  background: #ffffff;
  border: 1px solid var(--separator);
  color: var(--muted);
  font-weight: 700;
  font-size: 0.84rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  transition: all 0.15s ease;
}

.chip:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.chip.is-active {
  background: var(--primary-gradient) !important;
  border-color: transparent !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px var(--primary-glow) !important;
}

.chip__count {
  font-size: 0.74rem;
  padding: 1px 6px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.08);
}

.chip.is-active .chip__count {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.filter-select {
  min-width: 180px;
  max-width: 240px;
}

.invoices-table-panel {
  padding: 0;
  max-width: 100%;
}

.clients-pager {
  padding: 0;
  margin-top: 14px;
}

.clients-pager .table-pager {
  border-top: 0;
}

.table-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  padding: 12px 16px 14px;
  border-top: 1px solid #e8eef5;
  background: #f8fafc;
}

.table-pager__meta {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

.table-pager__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.table-pager__size label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

.table-pager__size select {
  height: 32px;
  min-width: 64px;
  padding: 0 8px;
  border: 1px solid var(--separator);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
}

.table-pager__nav {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.table-pager__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--separator);
  background: #ffffff;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  line-height: 1;
}

.table-pager__btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.table-pager__btn.is-active {
  background: var(--primary);
  border-color: transparent;
  color: #ffffff;
}

.table-pager__btn.is-disabled {
  opacity: 0.38;
  pointer-events: none;
}

.table-pager__ellipsis {
  padding: 0 4px;
  color: var(--muted);
  font-weight: 700;
}

/* ==========================================================================
   Mobile Tab Bar
   ========================================================================== */
.tabbar {
  display: none;
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 50;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
  border-radius: var(--radius-xl);
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
}

.tabbar__item {
  display: grid;
  justify-items: center;
  gap: 3px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.70rem;
  font-weight: 700;
  padding: 6px;
  transition: color 0.15s ease;
}

.tabbar__item.is-active {
  color: var(--secondary);
}

.tabbar__icon {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
}

.tabbar__icon svg {
  width: 20px;
  height: 20px;
}

.tabbar__item--create {
  transform: translateY(-12px);
}

.tabbar__plus {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--secondary-gradient);
  color: #ffffff;
  font-size: 1.7rem;
  font-weight: 600;
  box-shadow: 0 8px 20px var(--secondary-glow);
  border: 3px solid #0f172a;
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(8px);
  z-index: 30;
}

.sidebar-backdrop[hidden] {
  display: none;
}

/* ==========================================================================
   Animations & Keyframes
   ========================================================================== */
.reveal {
  animation: fade-up 0.5s var(--ease) both;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 1120px) {
  .stat-strip,
  .guide-strip {
    grid-template-columns: 1fr 1fr;
  }
  .dash-grid {
    grid-template-columns: 1fr;
  }
  .form-steps {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 920px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }
  .auth-brand {
    padding: 40px 24px 16px;
  }
  .auth-brand__copy,
  .auth-brand__points {
    display: none;
  }
  .auth-panel__logo-mobile {
    display: block;
  }

  .dash-shell {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .dash-main {
    padding-left: 0;
  }

  .sidebar {
    position: fixed;
    left: 10px;
    top: 10px;
    width: min(84vw, 290px);
    height: calc(100vh - 20px);
    transform: translateX(-110%);
    transition: transform 0.28s var(--ease);
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .topbar {
    top: 10px;
  }

  .tabbar {
    display: grid;
  }

  .dash-content {
    padding-bottom: 120px;
  }

  .sticky-actions {
    bottom: 92px;
  }
}

@media (max-width: 680px) {
  .page-intro,
  .page-intro--hero {
    flex-direction: column;
    align-items: flex-start;
  }
  .stat-strip,
  .guide-strip,
  .form-steps {
    grid-template-columns: 1fr;
  }
  .fields-2,
  .fields-3,
  .items-table__head,
  .items-table__row {
    grid-template-columns: 1fr;
  }
  .items-table__head {
    display: none;
  }
  .auth-panel__inner {
    padding: 24px 18px;
  }
}
