@font-face {
  font-family: "Geist";
  src: url("/public/fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "GeistMono";
  src: url("/public/fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --background: 0 0% 100%;
  --foreground: 240 10% 3.9%;
  --card: 0 0% 100%;
  --card-foreground: 240 10% 3.9%;
  --popover: 0 0% 100%;
  --popover-foreground: 240 10% 3.9%;
  --primary: 240 5.9% 10%;
  --primary-foreground: 0 0% 98%;
  --secondary: 240 4.8% 95.9%;
  --secondary-foreground: 240 5.9% 10%;
  --muted: 240 4.8% 95.9%;
  --muted-foreground: 240 3.8% 46.1%;
  --accent: 240 4.8% 95.9%;
  --accent-foreground: 240 5.9% 10%;
  --destructive: 0 84.2% 60.2%;
  --destructive-foreground: 0 0% 98%;
  --success: 142 71% 45%;
  --warning: 38 92% 50%;
  --border: 240 5.9% 90%;
  --input: 240 5.9% 90%;
  --ring: 240 5.9% 10%;
  --radius: 0.5rem;
  --chart-1: 12 76% 61%;
  --chart-2: 173 58% 39%;
  --chart-3: 197 37% 24%;
  --chart-4: 43 74% 66%;
  --chart-5: 27 87% 67%;
  --sidebar: 0 0% 98%;

  /* Legacy aliases for 9a transition (replaced in 9c) */
  --bg: hsl(var(--background));
  --surface: hsl(var(--card));
  --text: hsl(var(--foreground));
  --accent-text: hsl(var(--primary-foreground));
  --danger: hsl(var(--destructive));
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: 240 10% 3.9%;
    --foreground: 0 0% 98%;
    --card: 240 10% 3.9%;
    --card-foreground: 0 0% 98%;
    --popover: 240 10% 3.9%;
    --popover-foreground: 0 0% 98%;
    --primary: 0 0% 98%;
    --primary-foreground: 240 5.9% 10%;
    --secondary: 240 3.7% 15.9%;
    --secondary-foreground: 0 0% 98%;
    --muted: 240 3.7% 15.9%;
    --muted-foreground: 240 5% 64.9%;
    --accent: 240 3.7% 15.9%;
    --accent-foreground: 0 0% 98%;
    --destructive: 0 62.8% 30.6%;
    --destructive-foreground: 0 0% 98%;
    --border: 240 3.7% 15.9%;
    --input: 240 3.7% 15.9%;
    --ring: 240 4.9% 83.9%;
    --sidebar: 240 5.9% 10%;
    --chart-1: 220 70% 50%;
    --chart-2: 160 60% 45%;
    --chart-3: 30 80% 55%;
    --chart-4: 280 65% 60%;
    --chart-5: 340 75% 55%;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
  border-color: hsl(var(--border));
}

html,
body {
  margin: 0;
  padding: 0;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: "Geist", ui-sans-serif, system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: hsl(var(--foreground));
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 12px;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.025em;
}

h1 {
  font-size: 24px;
}

h2 {
  font-size: 18px;
}

h3,
h4 {
  font-size: 15px;
}

p {
  margin: 0 0 12px;
}

code,
pre {
  font-family: "GeistMono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
}

td,
.num {
  font-variant-numeric: tabular-nums;
}

pre {
  margin: 8px 0;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

canvas {
  max-width: 100%;
}

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

/* App Shell: Sidebar + Topbar */

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 240px;
  background: hsl(var(--sidebar));
  border-right: 1px solid hsl(var(--border));
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  gap: 16px;
  z-index: 20;
}

.sidebar-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 4px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.02em;
  color: hsl(var(--foreground));
}

.brand-link:hover {
  text-decoration: none;
}

.logo-mark {
  display: inline-block;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: hsl(var(--primary));
  flex-shrink: 0;
}

.workspace-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  width: 100%;
}

.workspace-switcher select {
  flex: 1;
  min-width: 0;
  height: 32px;
  min-height: 32px;
  padding: 0 28px 0 10px;
  font-size: 13px;
}

.workspace-switcher button {
  height: 32px;
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
  flex-shrink: 0;
}

.sidebar-nav-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.sidebar-group-label {
  font-size: 11px;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  padding: 4px 8px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 8px;
  border-radius: calc(var(--radius) - 2px);
  font-size: 14px;
  color: hsl(var(--muted-foreground));
  transition: background 0.15s, color 0.15s;
}

.nav-link:hover {
  background: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
  text-decoration: none;
}

.nav-link.active {
  background: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
  font-weight: 500;
}

.sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid hsl(var(--border));
}

.sidebar-user {
  font-size: 12px;
  color: hsl(var(--muted-foreground));
  padding: 0 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logout-form {
  margin: 0;
}

.logout-form button {
  width: 100%;
  justify-content: flex-start;
}

.app-main {
  margin-left: 240px;
  min-width: 0;
}

.topbar {
  height: 56px;
  border-bottom: 1px solid hsl(var(--border));
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: hsl(var(--background));
  position: relative;
}

.topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  min-width: 0;
}

.topbar-ws {
  color: hsl(var(--muted-foreground));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-sep {
  color: hsl(var(--muted-foreground));
}

.topbar-title {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-nav {
  display: none;
}

.mobile-nav summary {
  list-style: none;
}

.mobile-nav summary::-webkit-details-marker {
  display: none;
}

.main-content {
  max-width: 1200px;
  padding: 24px 32px;
}

.auth-shell {
  min-height: 100vh;
  background: hsl(var(--muted));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

@media (max-width: 767px) {
  .sidebar {
    display: none;
  }

  .app-main {
    margin-left: 0;
  }

  .topbar {
    padding: 0 16px;
  }

  .mobile-nav {
    display: block;
  }

  .mobile-nav-panel {
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: hsl(var(--sidebar));
    border-bottom: 1px solid hsl(var(--border));
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 30;
    box-shadow: 0 8px 24px rgb(0 0 0 / 0.12);
  }

  .main-content {
    padding: 16px;
  }
}


/* Page Header */

.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}

.page-header h1 {
  margin: 0;
}

.page-description {
  margin: 4px 0 0;
  font-size: 14px;
  color: hsl(var(--muted-foreground));
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

@media (max-width: 600px) {
  .page-header {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Tabs & Settings Layout */

.tabs-list,
.preset-links {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  min-height: 36px;
  padding: 4px;
  background: hsl(var(--muted));
  border-radius: var(--radius);
  gap: 2px;
  margin-bottom: 16px;
}

.tabs-list a,
.preset-links a {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: calc(var(--radius) - 2px);
  font-size: 14px;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.tabs-list a:hover,
.preset-links a:hover {
  color: hsl(var(--foreground));
  text-decoration: none;
}

.tabs-list a[aria-current="page"],
.preset-links a[aria-current="page"],
.tabs-list a.active,
.preset-links a.active {
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
}

.settings-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  align-items: start;
}

.sub-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sub-nav a {
  display: flex;
  align-items: center;
  height: 36px;
  padding: 0 12px;
  border-radius: calc(var(--radius) - 2px);
  font-size: 14px;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  text-decoration: none;
}

.sub-nav a:hover {
  background: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
  text-decoration: none;
}

.sub-nav a[aria-current="page"],
.sub-nav a.active {
  background: hsl(var(--muted));
  color: hsl(var(--foreground));
}

@media (max-width: 767px) {
  .settings-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .sub-nav {
    flex-direction: row;
    overflow-x: auto;
    padding: 4px;
    background: hsl(var(--muted));
    border-radius: var(--radius);
    white-space: nowrap;
  }

  .sub-nav a {
    height: 28px;
    padding: 4px 12px;
    flex-shrink: 0;
  }

  .sub-nav a[aria-current="page"],
  .sub-nav a.active {
    background: hsl(var(--background));
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
  }
}

/* Cards */

.card {
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) + 4px);
  background: hsl(var(--card));
  color: hsl(var(--card-foreground));
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
  margin-bottom: 16px;
}

.card-header {
  padding: 24px 24px 0;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin: 0;
}

.card-description {
  font-size: 14px;
  color: hsl(var(--muted-foreground));
  margin: 4px 0 0;
}

.card-content {
  padding: 24px;
}

.card-content > :last-child,
.card-content form > :last-child {
  margin-bottom: 0;
}

.card-footer {
  padding: 0 24px 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.auth-card {
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
}

/* Stat Cards */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) + 4px);
  background: hsl(var(--card));
  padding: 20px;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
}

.stat-label {
  font-size: 14px;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
  margin-top: 6px;
}

.stat-sub {
  font-size: 12px;
  color: hsl(var(--muted-foreground));
  margin-top: 4px;
}

@media (max-width: 767px) {
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Buttons */

.btn,
[class*="btn-"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 16px;
  border-radius: calc(var(--radius) - 2px);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  white-space: nowrap;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, opacity 0.15s;
}

.btn:disabled,
[class*="btn-"]:disabled {
  opacity: 0.5;
  pointer-events: none;
}

.btn-primary {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
}

.btn-primary:hover {
  opacity: 0.9;
  text-decoration: none;
}

.btn-secondary {
  background: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
}

.btn-secondary:hover {
  opacity: 0.85;
  text-decoration: none;
}

.btn-outline {
  border-color: hsl(var(--input));
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
}

.btn-outline:hover {
  background: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
  text-decoration: none;
}

.btn-ghost {
  background: transparent;
  color: hsl(var(--foreground));
}

.btn-ghost:hover {
  background: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
  text-decoration: none;
}

.btn-danger {
  background: hsl(var(--destructive));
  color: hsl(var(--destructive-foreground));
}

.btn-danger:hover {
  opacity: 0.9;
  text-decoration: none;
}

.btn-link {
  background: transparent;
  color: hsl(var(--foreground));
  padding: 0 4px;
}

.btn-link:hover {
  text-decoration: underline;
}

.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
}

.btn-full {
  width: 100%;
}

/* Forms & Controls */

form {
  margin: 0;
}

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  margin-bottom: 16px;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="file"]),
select,
textarea {
  height: 36px;
  width: 100%;
  border: 1px solid hsl(var(--input));
  border-radius: calc(var(--radius) - 2px);
  background: transparent;
  padding: 4px 12px;
  font-size: 14px;
  font-family: inherit;
  color: hsl(var(--foreground));
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
}

input::placeholder,
textarea::placeholder {
  color: hsl(var(--muted-foreground));
}

textarea {
  min-height: 80px;
  height: auto;
  padding: 8px 12px;
  resize: vertical;
}

select {
  appearance: none;
  background: transparent url("/public/icons/chevron-down.svg") right 10px center / 16px no-repeat;
  padding-right: 32px;
}

input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: hsl(var(--primary));
  cursor: pointer;
}

input[type="color"] {
  width: 48px;
  height: 36px;
  padding: 2px;
  border: 1px solid hsl(var(--input));
  border-radius: calc(var(--radius) - 2px);
  background: transparent;
  cursor: pointer;
}

input[type="file"] {
  width: 100%;
  font-size: 14px;
  color: hsl(var(--foreground));
}

input[type="file"]::file-selector-button {
  height: 32px;
  padding: 0 12px;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid hsl(var(--input));
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  margin-right: 12px;
  cursor: pointer;
}

input[type="file"]::file-selector-button:hover {
  background: hsl(var(--accent));
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}

input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus {
  outline: none;
  box-shadow: 0 0 0 1px hsl(var(--ring));
}

fieldset {
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 16px;
  margin: 0 0 16px;
}

legend {
  padding: 0 6px;
  font-size: 13px;
  font-weight: 600;
}

.hint {
  font-size: 13px;
  color: hsl(var(--muted-foreground));
  margin: 4px 0 12px;
}

.grid-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.form-grid-2 > label,
.grid-row > label {
  margin-bottom: 0;
}

@media (max-width: 767px) {
  .form-grid-2 {
    grid-template-columns: 1fr;
  }
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 16px;
}

.filter-bar label {
  margin-bottom: 0;
  min-width: 140px;
  flex: 1;
}

.filter-bar select,
.filter-bar input {
  min-width: 130px;
}

.inline-form {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.inline-form label {
  flex-direction: row;
  align-items: center;
  margin-bottom: 0;
}

.inline-form input,
.inline-form select {
  width: auto;
}

td .inline-form,
.header-actions .inline-form {
  flex-wrap: nowrap;
}

.inline-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inline-row input {
  flex: 1;
  min-width: 0;
}

.inline-row button {
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .header-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .header-actions .inline-form {
    width: 100%;
  }

  .header-actions .inline-form input {
    flex: 1;
    min-width: 0;
  }

  .header-actions > a {
    width: 100%;
  }

  .inline-row {
    flex-direction: column;
    align-items: stretch;
  }

  .inline-row button {
    width: 100%;
  }
}

.inline-check {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  width: auto;
  margin-bottom: 8px;
  font-weight: 400;
  cursor: pointer;
}

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

@media (max-width: 600px) {
  .form-actions {
    flex-direction: column;
  }

  .form-actions .btn,
  .form-actions [class*="btn-"] {
    width: 100%;
  }
}

.section-actions {
  margin-top: 8px;
  margin-bottom: 24px;
}

.delete-form {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid hsl(var(--border));
}

.invite-link-input {
  font-family: "GeistMono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
}

.rule-row,
.age-row {
  margin-bottom: 12px;
}

.niche-checks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-top: 4px;
}

.snapshot-form {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid hsl(var(--border));
}

.num-sm {
  min-width: 68px;
  width: 74px !important;
  height: 32px !important;
  padding: 4px 8px !important;
}

/* Tables */

.table-wrap {
  width: 100%;
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) + 4px);
  background: hsl(var(--card));
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th {
  height: 40px;
  padding: 0 12px;
  text-align: left;
  font-size: 13px;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  border-bottom: 1px solid hsl(var(--border));
  white-space: nowrap;
}

td {
  padding: 10px 12px;
  border-bottom: 1px solid hsl(var(--border));
  vertical-align: middle;
}

th.num,
td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

tbody tr:hover {
  background: hsl(var(--muted) / 0.5);
}

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

.row-overdue {
  background: hsl(var(--warning) / 0.1);
}

.row-error {
  background: hsl(var(--destructive) / 0.1);
  color: hsl(var(--destructive));
}

.due-saved td {
  color: hsl(var(--success));
  font-weight: 500;
}

/* Badges & Alerts */

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: calc(var(--radius) - 2px);
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  white-space: nowrap;
}

.badge-secondary {
  background: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
}

.badge-outline {
  background: transparent;
  border-color: hsl(var(--border));
  color: hsl(var(--foreground));
}

.badge-ok {
  background: hsl(var(--success) / 0.15);
  color: hsl(var(--success));
}

.badge-warning {
  background: hsl(var(--warning) / 0.15);
  color: hsl(var(--warning));
}

.badge-danger {
  background: hsl(var(--destructive) / 0.15);
  color: hsl(var(--destructive));
}

.alert {
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 14px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-success {
  border-color: hsl(var(--success) / 0.5);
  background: hsl(var(--success) / 0.08);
  color: hsl(var(--success));
}

.alert-error {
  border-color: hsl(var(--destructive) / 0.6);
  background: hsl(var(--destructive) / 0.08);
  color: hsl(var(--destructive));
}

.alert-info {
  border-color: hsl(var(--border));
  background: hsl(var(--muted) / 0.5);
  color: hsl(var(--foreground));
}

/* Empty State & Separator */

.empty {
  border: 1px dashed hsl(var(--border));
  border-radius: calc(var(--radius) + 4px);
  padding: 40px 24px;
  text-align: center;
  color: hsl(var(--muted-foreground));
  font-size: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.separator {
  height: 1px;
  background: hsl(var(--border));
  margin: 16px 0;
  border: 0;
}

/* Today Planner & Slots */

.account-section {
  margin-bottom: 24px;
}

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

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

.slot-card {
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) + 4px);
  background: hsl(var(--card));
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
}

.slot-filled {
  border-color: hsl(var(--border));
}

.slot-missing {
  border-style: dashed;
}

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

.slot-niche {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.niche-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  flex-shrink: 0;
}

.slot-label {
  font-size: 13px;
  color: hsl(var(--muted-foreground));
}

.slot-status {
  margin-top: auto;
  padding-top: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
}

/* Post detail, AI drafts, Charts, Upload */

.meta-list {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px 16px;
  margin: 0 0 16px;
}

.meta-list dt {
  color: hsl(var(--muted-foreground));
  font-weight: 500;
}

.meta-list dd {
  margin: 0;
  word-break: break-word;
}

.caption-text {
  font-family: inherit;
  font-size: 14px;
  white-space: pre-wrap;
  background: hsl(var(--muted) / 0.4);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 12px;
}

.ai-drafts {
  margin-top: 24px;
}

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

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

.draft-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  margin-bottom: 0;
}

.draft-card .use-draft-btn {
  margin-top: auto;
  align-self: flex-start;
}

.upload-dropzone {
  border: 1px dashed hsl(var(--border));
  border-radius: calc(var(--radius) + 4px);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  margin-bottom: 16px;
  background: hsl(var(--muted) / 0.25);
}

.chart-box {
  position: relative;
  height: 280px;
}

@media (max-width: 600px) {
  .chart-box {
    height: 220px;
  }
}
