/* ==========================================================================
   Design system - light, modern SaaS.
   All colour/spacing decisions live in these tokens; components below only
   reference them, so a re-theme is a token change, not a find-and-replace.
   ========================================================================== */
:root {
  color-scheme: light;

  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-subtle: #f8fafc;
  --border: #e6e8ef;
  --border-strong: #cfd4e0;

  --text: #101828;
  --text-muted: #667085;
  --text-faint: #98a2b3;

  --accent: #5b5bd6;
  --accent-hover: #4a4ac4;
  --accent-soft: #eef0ff;
  --accent-ring: rgba(91, 91, 214, 0.18);

  --success: #067647;
  --success-soft: #ecfdf3;
  --success-border: #abefc6;

  --error: #b42318;
  --error-soft: #fef3f2;
  --error-border: #fecdc9;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;

  --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-sm: 0 1px 3px rgba(16, 24, 40, 0.1), 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 4px 8px -2px rgba(16, 24, 40, 0.1), 0 2px 4px -2px rgba(16, 24, 40, 0.06);
  --shadow-lg: 0 12px 16px -4px rgba(16, 24, 40, 0.08), 0 4px 6px -2px rgba(16, 24, 40, 0.03);
  --shadow-xl: 0 24px 48px -12px rgba(16, 24, 40, 0.18);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1 { margin: 0 0 6px; font-size: 28px; letter-spacing: -0.02em; font-weight: 700; }
h2 { letter-spacing: -0.01em; }

.subtitle { margin: 0 0 28px; color: var(--text-muted); font-size: 15px; }
.hint { margin: 8px 0 0; font-size: 13px; color: var(--text-muted); text-align: center; }
.capitalize { text-transform: capitalize; }

/* ---------- Header / nav ---------- */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 32px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(10px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.app-header .brand {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.02em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 9px;
}
.app-header .brand:hover { text-decoration: none; }
.app-header .brand-mark {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  box-shadow: var(--shadow-xs);
  display: block;
}

.app-header nav { display: flex; align-items: center; gap: 6px; }

.app-header nav a {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease, color 0.15s ease;
}
.app-header nav a:hover { color: var(--text); background: var(--surface-subtle); text-decoration: none; }
.app-header nav a.active { color: var(--accent); background: var(--accent-soft); font-weight: 600; }

.nav-badge {
  display: inline-block;
  margin-left: 7px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--error);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

/* ---------- Buttons ---------- */
button, .google-btn {
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

button {
  margin-top: 20px;
  padding: 10px 18px;
  border: 1px solid transparent;
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-xs);
}
button:hover { background: var(--accent-hover); }
button:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--accent-ring); }
button:disabled { opacity: 0.55; cursor: default; }

/* Secondary/white button, also used for OAuth actions */
.google-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 10px 16px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-xs);
}
.google-btn:hover { background: var(--surface-subtle); text-decoration: none; box-shadow: var(--shadow-sm); }
.google-btn.small { width: auto; padding: 8px 14px; font-size: 13px; white-space: nowrap; }
.app-header .google-btn.small { margin-top: 0; background: var(--accent); color: #fff; border-color: transparent; }
.app-header .google-btn.small:hover { background: var(--accent-hover); }

.disconnect-btn {
  margin: 0;
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: none;
}
.disconnect-btn:hover { background: var(--error-soft); color: var(--error); border-color: var(--error-border); }

/* ---------- Forms ---------- */
form { display: flex; flex-direction: column; gap: 6px; }

label { font-size: 13px; font-weight: 500; color: var(--text); margin-top: 14px; }

input, select, textarea {
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  box-shadow: var(--shadow-xs);
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-ring);
}
input::placeholder, textarea::placeholder { color: var(--text-faint); }

.password-field { position: relative; }
.password-field input { width: 100%; padding-right: 42px; }
.toggle-password {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  box-shadow: none;
  margin: 0;
  padding: 6px;
  color: var(--text-faint);
  display: flex;
  align-items: center;
}
.toggle-password:hover { color: var(--text); background: none; }

/* ---------- Cards / auth ---------- */
.centered-page { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 24px; }

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-lg);
}
.auth-card.wide { max-width: 640px; }
.auth-card h1 { font-size: 22px; }

.switch { margin-top: 22px; font-size: 13px; color: var(--text-muted); text-align: center; }

.divider { display: flex; align-items: center; color: var(--text-faint); font-size: 12px; margin: 22px 0; }
.divider::before, .divider::after { content: ""; flex: 1; border-bottom: 1px solid var(--border); }
.divider span { padding: 0 12px; }

/* ---------- Flash messages ---------- */
.flash-list { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-direction: column; gap: 10px; }
.flash {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  border: 1px solid transparent;
}
.flash-error { background: var(--error-soft); color: var(--error); border-color: var(--error-border); }
.flash-success { background: var(--success-soft); color: var(--success); border-color: var(--success-border); }

.callout {
  background: var(--accent-soft);
  border: 1px solid #d7dafe;
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 14px;
  margin-bottom: 28px;
}
.callout-error { background: var(--error-soft); border-color: var(--error-border); }
.callout-error a { color: var(--error); }

/* ---------- App shell ---------- */
.admin-shell { display: flex; flex: 1; align-items: stretch; }

.admin-sidebar {
  width: 232px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 26px 16px;
  display: flex;
  flex-direction: column;
}
.admin-sidebar-tenant { font-size: 11px; font-weight: 600; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.07em; }
.admin-sidebar-name { font-weight: 700; font-size: 17px; margin: 5px 0 22px; letter-spacing: -0.01em; }
.admin-sidebar-back { font-size: 13px; color: var(--text-muted); margin-bottom: 22px; display: inline-block; }
.admin-sidebar-nav { display: flex; flex-direction: column; gap: 3px; }
.admin-sidebar-nav a {
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
}
.admin-sidebar-nav a:hover { background: var(--surface-subtle); color: var(--text); text-decoration: none; }
.admin-sidebar-nav a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

.admin-main { flex: 1; min-width: 0; padding: 36px 40px 80px; }
.admin-shell-nosidebar .admin-main { max-width: 1080px; margin: 0 auto; width: 100%; }

.admin-page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.admin-page-head .google-btn.small { margin-top: 0; }
.admin-page-head-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

.app-main { max-width: 780px; margin: 0 auto; padding: 40px 24px; width: 100%; }

.section-block { margin-bottom: 40px; }
.section-block h2 { font-size: 17px; margin: 0 0 14px; }
.section { margin-bottom: 8px; }
.section h2 { font-size: 17px; margin: 0 0 14px; }
.section h3 { font-size: 14px; color: var(--text-muted); margin: 22px 0 12px; }
.section-divider { border: none; border-top: 1px solid var(--border); margin: 32px 0; }
.form-narrow { max-width: 480px; }
.form-section-heading { font-size: 15px; margin: 30px 0 0; }
.section-block input[type="text"] { width: 100%; max-width: 480px; }

/* ---------- Stat tiles ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin: 26px 0 36px; }
.stat-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-xs);
}
.stat-value { font-size: 32px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.stat-value-error { color: var(--error); }
.stat-label { font-size: 13px; color: var(--text-muted); margin-top: 4px; font-weight: 500; }

/* ---------- Tables ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}
.data-table { width: 100%; max-width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th, .data-table td { text-align: left; padding: 13px 16px; white-space: nowrap; }
.data-table thead th {
  background: var(--surface-subtle);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
}
.data-table tbody tr:not(:last-child) td { border-bottom: 1px solid var(--border); }
.data-table tbody tr:hover td { background: var(--surface-subtle); }
.data-table select, .data-table input { margin: 0; font-size: 13px; padding: 6px 10px; }
.data-table form { margin: 0; }
.data-table .result-row td { background: var(--error-soft); }
.data-table .result-row:hover td { background: var(--error-soft); }
/* Specificity matters here: ".data-table td" sets white-space:nowrap, which
   outranks a bare ".result-message". Without matching that specificity the
   message stays on one line and drags the whole table wider than its
   container - which is what pushed the File column off-screen. */
.data-table td.result-message {
  font-size: 13px;
  color: var(--error);
  white-space: normal;
  line-height: 1.5;
  word-break: break-word;
  padding-top: 10px;
  padding-bottom: 12px;
}
.result-message { font-size: 13px; color: var(--error); white-space: normal; line-height: 1.5; }

/* A message attached to a post that actually succeeded is a note, not a
   failure. Rendering it in error red made a successful post look broken. */
.data-table .result-row.result-note td,
.data-table .result-row.result-note:hover td { background: var(--accent-soft); }
.result-row.result-note .result-message { color: var(--text-muted); }

/* Long Drive filenames were pushing the table sideways and hiding the first
   column. Let the name wrap instead of widening the row. */
.data-table td.filename { max-width: 320px; word-break: break-word; white-space: normal; }

/* ---------- Badges ---------- */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
  border: 1px solid transparent;
}
.badge.scheduled { background: var(--accent-soft); color: var(--accent); border-color: #d7dafe; }
.badge.posted { background: var(--success-soft); color: var(--success); border-color: var(--success-border); }
.badge.failed { background: var(--error-soft); color: var(--error); border-color: var(--error-border); }
.badge.processing { background: #fff4e5; color: #b54708; border-color: #fedf89; }

/* Scheduler heartbeat - a small, always-visible answer to "is anything
   actually going to post?" */
.scheduler-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}
.scheduler-status .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px var(--success-soft);
}
.scheduler-status.off .dot { background: var(--error); box-shadow: 0 0 0 3px var(--error-soft); }

/* ---------- Customers ---------- */
.customer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-top: 26px; }
.customer-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  color: var(--text);
  box-shadow: var(--shadow-xs);
  transition: box-shadow 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.customer-card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); transform: translateY(-2px); text-decoration: none; }
.customer-card-name { font-weight: 650; font-size: 17px; margin-bottom: 12px; letter-spacing: -0.01em; }
.customer-card-stats { display: flex; flex-wrap: wrap; gap: 10px; font-size: 13px; color: var(--text-muted); align-items: center; }

/* ---------- Platform cards / icons ---------- */
.platform-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.platform-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-xs);
}
.platform-card-head { display: flex; align-items: center; gap: 13px; }
.platform-name { font-weight: 650; font-size: 15px; }
.platform-status { font-size: 13px; color: var(--text-muted); }
.platform-status.connected { color: var(--success); font-weight: 500; }
.platform-card .account-list { margin: 0; }
.platform-card .hint { text-align: left; margin: 0; }

.platform-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-weight: 700; font-size: 16px; color: #fff;
  box-shadow: var(--shadow-xs);
}
.platform-icon.youtube { background: #ff0033; font-size: 14px; padding-left: 2px; }
.platform-icon.facebook { background: #1877f2; font-family: Georgia, serif; font-style: italic; font-size: 19px; }
.platform-icon.instagram { background: linear-gradient(45deg, #f58529, #dd2a7b 45%, #8134af 75%, #515bd4); }
.platform-icon.tiktok { background: #111; text-shadow: -1px 0 #25f4ee, 1px 0 #fe2c55; }

.icon-instagram-glyph { position: relative; width: 16px; height: 16px; border: 2px solid #fff; border-radius: 5px; display: inline-block; }
.icon-instagram-glyph::after {
  content: ""; position: absolute; top: 50%; left: 50%;
  width: 6px; height: 6px; border: 2px solid #fff; border-radius: 50%;
  transform: translate(-50%, -50%);
}

/* ---------- Connected account list ---------- */
.account-list { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 8px; }
.account-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 14px;
  padding: 10px 12px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.account-list form { margin: 0; }

/* ---------- Content page: file picker ---------- */
.content-source-line { text-align: left; margin: 0 0 22px; font-size: 13px; }

.file-picker {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 22px;
  max-width: 660px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}
.file-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 15px;
  font-size: 14px;
  cursor: pointer;
  margin: 0;
  color: var(--text);
}
.file-row:not(:last-child) { border-bottom: 1px solid var(--border); }
.file-row:hover { background: var(--surface-subtle); }
.file-row-head { background: var(--surface-subtle); font-size: 13px; color: var(--text-muted); font-weight: 600; }
.file-row input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); flex-shrink: 0; margin: 0; box-shadow: none; }
.file-row .file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-duration { font-weight: 400; font-size: 12px; color: var(--text-faint); }

.batch-controls { display: flex; gap: 16px; flex-wrap: wrap; max-width: 660px; }
.batch-controls > div { flex: 1; min-width: 155px; display: flex; flex-direction: column; }
.batch-controls label { margin-top: 0; }
#batch-form textarea { max-width: 660px; }
.batch-hint { text-align: left; margin: 10px 0 0; }
#batch-submit { align-self: flex-start; padding: 11px 22px; }

.drive-post-form {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  max-width: 560px;
}
.drive-name { font-weight: 650; font-size: 14px; margin-bottom: 6px; }
.admin-main .drive-list { max-width: 580px; }
.drive-list { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-direction: column; gap: 12px; }
.drive-list li { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; background: var(--surface); box-shadow: var(--shadow-xs); }
.drive-list form { gap: 8px; }
.drive-list input, .drive-list select { margin-top: 0; }
.drive-list button { margin-top: 6px; }

.caps-row { display: flex; gap: 16px; flex-wrap: wrap; }
.caps-row > div { flex: 1; min-width: 130px; display: flex; flex-direction: column; }
.caps-row input { width: 100%; }
.overdue-note { text-align: left; max-width: 720px; margin-top: 18px; }

/* ---------- Legal pages ---------- */
.legal-page { max-width: 740px; }
.legal-page h2 { font-size: 18px; margin: 32px 0 10px; }
.legal-page p, .legal-page li { font-size: 15px; line-height: 1.7; color: var(--text); }
.legal-list { padding-left: 20px; margin: 0 0 18px; }
.legal-list li { margin-bottom: 9px; }

/* ==========================================================================
   Marketing site
   ========================================================================== */
.landing-hero {
  position: relative;
  max-width: 1080px;
  margin: 0 auto;
  padding: 88px 24px 64px;
  text-align: center;
}

/* Soft colour wash behind the hero so the page does not read as a blank sheet */
.landing-hero::before {
  content: "";
  position: absolute;
  inset: -120px 0 auto;
  height: 620px;
  background:
    radial-gradient(560px 300px at 50% 0%, rgba(99, 102, 241, 0.16), transparent 70%),
    radial-gradient(420px 260px at 82% 12%, rgba(236, 72, 153, 0.12), transparent 70%),
    radial-gradient(420px 260px at 16% 16%, rgba(45, 212, 191, 0.12), transparent 70%);
  z-index: -1;
  pointer-events: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 22px;
}
.eyebrow-dot { width: 7px; height: 7px; border-radius: 50%; background: #16a34a; }

.landing-hero h1 {
  font-size: clamp(36px, 5.4vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin: 0 0 20px;
}
.landing-hero h1 .grad {
  background: linear-gradient(100deg, #6366f1, #a855f7 45%, #ec4899);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.landing-subtitle {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto 32px;
  line-height: 1.65;
}

.landing-cta { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 26px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  box-shadow: 0 8px 18px -6px rgba(91, 91, 214, 0.6);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); text-decoration: none; box-shadow: 0 12px 22px -6px rgba(91, 91, 214, 0.65); }
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
  box-shadow: var(--shadow-xs);
}
.btn-ghost:hover { background: var(--surface-subtle); text-decoration: none; }
.landing-secondary-link { font-size: 14px; color: var(--text-muted); }

.landing-platforms { display: flex; justify-content: center; gap: 14px; margin-top: 34px; }
.landing-platforms-note { font-size: 13px; color: var(--text-muted); margin-top: 14px; }

/* ---------- Fake app window used as the hero product shot ---------- */
.app-shot {
  max-width: 1000px;
  margin: 52px auto 0;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  text-align: left;
}
.app-shot-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--surface-subtle);
  border-bottom: 1px solid var(--border);
}
.app-shot-dot { width: 11px; height: 11px; border-radius: 50%; background: #d7dbe4; }
.app-shot-url {
  margin-left: 10px;
  font-size: 12px;
  color: var(--text-faint);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 14px;
}
.app-shot-body { display: flex; min-height: 340px; }
.app-shot-side {
  width: 176px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  padding: 18px 14px;
  background: var(--surface);
}
.shot-side-label { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); }
.shot-side-name { font-weight: 700; font-size: 15px; margin: 4px 0 16px; }
.shot-nav { display: flex; flex-direction: column; gap: 3px; }
.shot-nav span { font-size: 13px; color: var(--text-muted); padding: 8px 10px; border-radius: 8px; font-weight: 500; }
.shot-nav span.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.app-shot-main { flex: 1; padding: 22px; min-width: 0; }
.shot-h { font-size: 17px; font-weight: 700; margin-bottom: 16px; }
.shot-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.shot-stat { border: 1px solid var(--border); border-radius: 10px; padding: 13px; background: var(--surface); }
.shot-stat b { display: block; font-size: 22px; letter-spacing: -0.02em; }
.shot-stat span { font-size: 11px; color: var(--text-muted); }
.shot-rows { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.shot-row { display: flex; align-items: center; gap: 12px; padding: 11px 14px; font-size: 13px; }
.shot-row + .shot-row { border-top: 1px solid var(--border); }
.shot-row.head { background: var(--surface-subtle); font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); font-weight: 600; }
.shot-row .f1 { flex: 1.6; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shot-row .f2 { flex: 1.1; color: var(--text-muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shot-row .f3 { flex: 0 0 74px; text-align: right; }

/* ---------- Marketing sections ---------- */
.landing-section { max-width: 1080px; margin: 0 auto; padding: 72px 24px; }
.landing-section + .landing-section { border-top: 1px solid var(--border); }
.section-eyebrow { font-size: 13px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 10px; }
.landing-section-title { font-size: clamp(26px, 3.2vw, 34px); letter-spacing: -0.025em; margin: 0 0 12px; }
.landing-section-intro { font-size: 16px; color: var(--text-muted); line-height: 1.7; max-width: 660px; margin: 0 0 30px; }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-top: 36px; }
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-xs);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.feature-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.feature-icon {
  width: 42px; height: 42px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  background: var(--accent-soft);
  color: var(--accent);
}
.feature-icon svg { width: 21px; height: 21px; }
.feature-card h3 { font-size: 16px; margin: 0 0 8px; letter-spacing: -0.01em; }
.feature-card p { font-size: 14px; color: var(--text-muted); line-height: 1.65; margin: 0; }

.step-list { list-style: none; padding: 0; margin: 36px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 26px; }
.step-list li { display: flex; flex-direction: column; gap: 12px; }
.step-number {
  width: 38px; height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #fff;
  font-weight: 700; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 14px -6px rgba(99, 102, 241, 0.8);
}
.step-list h3 { font-size: 16px; margin: 0 0 6px; letter-spacing: -0.01em; }
.step-list p { font-size: 14px; color: var(--text-muted); line-height: 1.65; margin: 0; }

.access-table { max-width: 820px; margin-bottom: 24px; }
.access-table td { white-space: normal; vertical-align: top; line-height: 1.6; }
.access-table td:first-child { font-weight: 600; width: 34%; }

.landing-closing {
  max-width: 1080px;
  margin: 0 auto 72px;
  padding: 56px 32px;
  border-radius: 20px;
  text-align: center;
  background: linear-gradient(135deg, #4f46e5, #7c3aed 50%, #db2777);
  color: #fff;
  box-shadow: var(--shadow-xl);
}
.landing-closing h2 { font-size: clamp(24px, 3vw, 32px); margin: 0 0 12px; letter-spacing: -0.025em; }
.landing-closing p { color: rgba(255, 255, 255, 0.85); margin: 0 0 26px; font-size: 16px; }
.landing-closing .btn-primary { background: #fff; color: #4f46e5; box-shadow: 0 10px 24px -8px rgba(0, 0, 0, 0.4); }
.landing-closing .btn-primary:hover { background: #f5f5ff; }

.landing-footer {
  text-align: center;
  padding: 30px 24px 44px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
}
.landing-footer a { color: var(--text-muted); }
.landing-footer a:hover { color: var(--text); }

@media (max-width: 720px) {
  .app-header { padding: 12px 18px; }
  .app-header nav { gap: 2px; }
  .app-header nav a { padding: 6px 9px; font-size: 13px; }
  .admin-shell { flex-direction: column; }
  .admin-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border); }
  .admin-main { padding: 24px 18px 60px; }
  .app-shot-side { display: none; }
  .shot-stats { grid-template-columns: 1fr; }
}


/* ---- Overview summary panels ------------------------------------------ */
.split-panels { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.panel h2 { margin: 0 0 16px; font-size: 15px; }

/* Seven day volume. Bars are percentage-height inside a fixed track, so the
   tallest day is always full height and the shape stays readable whether the
   busiest day was 3 posts or 300. */
.spark { display: flex; align-items: flex-end; gap: 10px; height: 120px; }
.spark-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  height: 100%;
  gap: 6px;
}
.spark-bar {
  width: 100%;
  min-height: 3px;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, var(--accent) 0%, #7c7cf0 100%);
}
.spark-bar.zero { background: var(--border); }
.spark-label { font-size: 11px; color: var(--text-muted); }
.spark-count { font-size: 12px; font-weight: 600; color: var(--text); }

.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.mini-list li:last-child { border-bottom: 0; }
.mini-list strong { font-size: 18px; }

@media (max-width: 860px) {
  .split-panels { grid-template-columns: 1fr; }
}

.crumb { font-size: 13px; color: var(--text-muted); margin: 0 0 4px; }
.crumb a { color: var(--text-muted); }
.crumb a:hover { color: var(--accent); }

/* Page chooser after a Facebook connect - the whole card is the hit target. */
.platform-card.selectable { cursor: pointer; position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.platform-card.selectable input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); flex-shrink: 0; }
.platform-card.selectable:hover { border-color: var(--accent); }
.platform-card.selectable.is-connected { background: var(--accent-soft); }


/* ---- Notification bell ------------------------------------------------- */
.bell-wrap { position: relative; display: flex; align-items: center; }
.bell {
  position: relative;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  width: 34px; height: 34px;
  padding: 0; margin: 0;
  border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.bell:hover { background: var(--surface-subtle); color: var(--text); border-color: var(--border); }
.bell-dot {
  position: absolute; top: -3px; right: -3px;
  min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 9px;
  background: var(--error); color: #fff;
  font-size: 10px; font-weight: 700; line-height: 17px;
  border: 2px solid var(--surface);
}

.bell-panel {
  position: absolute; top: 44px; right: 0;
  width: 340px; max-width: calc(100vw - 32px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-xl);
  z-index: 60;
  overflow: hidden;
}
.bell-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 15px; border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.bell-list { max-height: 380px; overflow-y: auto; }
.bell-item {
  display: block; padding: 12px 15px;
  border-bottom: 1px solid var(--border);
  border-left: 3px solid transparent;
  color: var(--text); text-decoration: none;
}
.bell-item:last-child { border-bottom: 0; }
.bell-item:hover { background: var(--surface-subtle); text-decoration: none; }
.bell-item.is-failed { border-left-color: var(--error); }
.bell-item.is-note   { border-left-color: var(--accent); }
.bell-item-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bell-item-file {
  font-size: 13px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bell-item-meta { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
/* Clamped, not truncated: enough of the reason to judge it, without a
   paragraph of Meta error text in a dropdown. */
.bell-item-msg {
  font-size: 12px; color: var(--text-muted); margin-top: 6px; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.bell-empty { padding: 22px 15px; text-align: center; color: var(--text-muted); font-size: 13px; margin: 0; }

@media (max-width: 720px) {
  .bell-panel { right: -8px; width: 300px; }
}


/* ---- Account menu ------------------------------------------------------ */
.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 0; padding: 0; margin: 0;
  background: linear-gradient(135deg, #6366f1, #a855f7 55%, #ec4899);
  color: #fff; font-size: 13px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.avatar-lg { width: 38px; height: 38px; font-size: 15px; cursor: default; }
.profile-panel { width: 240px; padding: 0; }
.profile-head {
  display: flex; align-items: center; gap: 11px;
  padding: 14px 15px; border-bottom: 1px solid var(--border);
}
.profile-name { font-size: 14px; font-weight: 600; }
.profile-role { font-size: 12px; color: var(--text-muted); }
.profile-link {
  display: block; padding: 11px 15px;
  font-size: 14px; color: var(--text); text-decoration: none;
  border-bottom: 1px solid var(--border);
}
.profile-link:last-child { border-bottom: 0; }
.profile-link:hover { background: var(--surface-subtle); text-decoration: none; }
.profile-link.danger { color: var(--error); }


/* ---- Content page: one list, two ways to add to it --------------------- */
.picker-add { margin: 12px 0 4px; }
/* A file pulled in from the wider Drive is tinted so it reads as an addition
   to the customer's folder, not part of it. */
.file-row.is-picked { background: var(--accent-soft); }
.file-empty { padding: 18px 14px; margin: 0; text-align: center; }

.batch-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.batch-actions button { margin-top: 0; }
.batch-actions .btn-ghost { padding: 11px 18px; }
