/* Alcashbot — dark navy/black + orange-yellow gradient theme. */
:root {
  --bg: #070b16;
  --bg2: #0b1224;
  --card: #0f1830;
  --card2: #0c1428;
  --line: #22304f;
  --ink: #eef1f7;
  --muted: #93a0b8;
  --accent1: #ff9a2e;
  --accent2: #ffc93c;
  --grad: linear-gradient(135deg, var(--accent1), var(--accent2));
  --grad-soft: rgba(255, 154, 46, 0.12);
  --ok: #34d399;
  --ok-bg: rgba(52, 211, 153, 0.12);
  --err: #f87171;
  --err-bg: rgba(248, 113, 113, 0.12);
  --amber: #fbbf24;
  --amber-bg: rgba(251, 191, 36, 0.12);
  --fb-blue: #1877f2;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: radial-gradient(1200px 600px at 50% -10%, #101b3a 0%, var(--bg) 60%) fixed, var(--bg);
  line-height: 1.5;
}
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
a { color: var(--accent2); }

/* top bar */
.topbar {
  background: rgba(7, 11, 22, 0.92);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(6px);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand {
  font-weight: 800; font-size: 20px; letter-spacing: 0.2px;
  color: var(--ink); text-decoration: none;
  display: flex; align-items: center; gap: 10px;
}
.brand-logo {
  width: 38px; height: 38px; border-radius: 10px;
  box-shadow: 0 0 0 1px var(--line), 0 4px 14px rgba(255, 154, 46, 0.25);
  background: #0b1224;
}
.nav { display: flex; align-items: center; gap: 16px; }
.nav a { color: var(--accent2); text-decoration: none; font-weight: 600; }
.nav a:hover { text-decoration: underline; }
.nav-user { color: var(--muted); }
.nav-logout { color: var(--muted) !important; font-weight: 500 !important; }

/* hero / login */
.hero {
  background: linear-gradient(180deg, rgba(21, 32, 63, 0.9), rgba(12, 20, 40, 0.9));
  border: 1px solid var(--line); border-radius: 16px;
  padding: 48px; margin: 40px 0; text-align: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.hero h1 { font-size: 32px; margin: 0 0 12px; }
.hero h1 .grad-text, .grad-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { color: var(--muted); font-size: 17px; max-width: 640px; margin: 0 auto 28px; }
.fb-btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--fb-blue); color: #fff; font-size: 17px; font-weight: 600;
  padding: 13px 28px; border-radius: 10px; text-decoration: none;
  box-shadow: 0 6px 20px rgba(24, 119, 242, 0.35);
}
.fb-btn:hover { background: #0d65d9; }
.fine { color: var(--muted); font-size: 13px; margin-top: 22px; }
.fine a { color: var(--accent2); }
.perm-list { list-style: none; padding: 0; margin: 8px auto 0; max-width: 560px; text-align: left; }
.perm-list li { padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.perm-list li strong { color: var(--ink); font-family: ui-monospace, monospace; font-size: 13px; }
.notice {
  background: var(--amber-bg); color: var(--amber); border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: 10px; padding: 12px 16px; margin: 24px 0 0; font-size: 14px;
}

/* cards & layout */
.card {
  background: linear-gradient(180deg, rgba(23, 35, 68, 0.55), rgba(15, 24, 48, 0.55));
  border: 1px solid var(--line); border-radius: 14px;
  padding: 24px; margin: 20px 0;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}
.card h3 { margin: 0 0 16px; font-size: 19px; }
.card.narrow { max-width: 560px; margin: 40px auto; }
.page-head { margin: 28px 0 8px; }
.page-head h2 { margin: 0 0 4px; }
.detail-head { display: flex; align-items: center; gap: 16px; }
.detail-head .btn-ghost { margin-left: auto; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.empty { color: var(--muted); padding: 24px; text-align: center; background: var(--card2); border-radius: 10px; border: 1px dashed var(--line); }
.empty.small { padding: 12px; }

/* page grid */
.page-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin: 16px 0 40px; }
.page-card {
  background: linear-gradient(180deg, rgba(23, 35, 68, 0.55), rgba(15, 24, 48, 0.55));
  border: 1px solid var(--line); border-radius: 14px; padding: 18px;
  display: flex; gap: 14px; align-items: center;
}
.page-card-body { flex: 1; min-width: 0; }
.page-card-body h3 { margin: 0 0 2px; font-size: 16px; }
.page-card-meta { font-size: 13px; color: var(--muted); margin-top: 2px; }
.pic { border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.pic-fallback {
  background: var(--grad); color: #1a1206;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700;
  border-radius: 50%; flex-shrink: 0;
}
.ig { display: inline-flex; align-items: center; gap: 6px; }
.ig-pic { border-radius: 50%; }
.ig.none { color: var(--muted); font-style: italic; }

/* buttons & forms */
.btn {
  display: inline-block; background: var(--grad); color: #1a1206; border: none; cursor: pointer;
  padding: 10px 20px; border-radius: 10px; font-size: 15px; font-weight: 700; text-decoration: none;
  box-shadow: 0 4px 16px rgba(255, 154, 46, 0.3);
  transition: transform 0.08s ease, box-shadow 0.15s ease;
}
.btn:hover { box-shadow: 0 6px 22px rgba(255, 154, 46, 0.45); transform: translateY(-1px); }
.btn-ghost { background: rgba(255, 255, 255, 0.04); color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); box-shadow: none; }
.composer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.composer { border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: rgba(7, 11, 22, 0.5); }
.composer h4 { margin: 0 0 10px; font-size: 15px; }
.composer textarea, .composer input[type="text"] {
  width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 10px;
  font-size: 14px; font-family: inherit; margin-bottom: 10px;
  background: #0b1326; color: var(--ink);
}
.composer textarea::placeholder, .composer input[type="text"]::placeholder { color: #5c6b8a; }
.composer textarea:focus, .composer input[type="text"]:focus {
  outline: none; border-color: var(--accent1); box-shadow: 0 0 0 3px rgba(255, 154, 46, 0.18);
}
.composer input[type="file"] { margin-bottom: 10px; font-size: 14px; max-width: 100%; color: var(--muted); }

/* tables */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; color: var(--muted); font-weight: 600; padding: 10px 8px; border-bottom: 2px solid var(--line); }
.table td { padding: 12px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table a { color: var(--accent2); }
.post-cell { display: flex; gap: 12px; align-items: flex-start; max-width: 520px; }
.thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.thumb-none { background: var(--line); display: inline-block; }
.post-text { font-size: 14px; }

/* insights */
.stat-row { display: flex; gap: 16px; margin-bottom: 8px; flex-wrap: wrap; }
.stat-card { background: rgba(7, 11, 22, 0.5); border: 1px solid var(--line); border-radius: 12px; padding: 16px 22px; }
.stat-num { font-size: 28px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-label { color: var(--muted); font-size: 13px; }
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; margin-top: 12px; }
.chart { border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: rgba(7, 11, 22, 0.5); }
.chart h4 { margin: 0 0 8px; font-size: 15px; }
.chart-svg { width: 100%; height: auto; display: block; }
.chart-line { fill: none; stroke: var(--accent1); stroke-width: 2.5; }
.chart-area { fill: rgba(255, 154, 46, 0.14); }
.chart-tick { font-size: 11px; fill: var(--muted); }
.chart-total { margin-top: 6px; font-size: 13px; color: var(--muted); }

/* comments */
.comment { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.comment:last-child { border-bottom: none; }
.comment-body { flex: 1; }
.comment-head { display: flex; gap: 10px; align-items: baseline; margin-bottom: 4px; }
.comment-text { font-size: 14.5px; margin-bottom: 4px; white-space: pre-wrap; }

/* flash + footer */
.flash { border-radius: 10px; padding: 12px 16px; margin: 20px 0 0; font-size: 14.5px; }
.flash-ok { background: var(--ok-bg); color: var(--ok); border: 1px solid rgba(52, 211, 153, 0.35); }
.flash-err { background: var(--err-bg); color: var(--err); border: 1px solid rgba(248, 113, 113, 0.35); }
.footer { border-top: 1px solid var(--line); margin-top: 48px; padding: 20px 0 32px; background: rgba(7, 11, 22, 0.9); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.footer .legal a { color: var(--muted); text-decoration: none; margin-left: 14px; }
.footer .legal a:hover { text-decoration: underline; color: var(--accent2); }

@media (max-width: 640px) {
  .hero { padding: 32px 20px; }
  .hero h1 { font-size: 24px; }
  .detail-head { flex-wrap: wrap; }
}

/* page card actions */
.page-card-actions { display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; }

/* reply forms under comments */
.reply-form { display: flex; gap: 8px; margin-top: 10px; }
.reply-form input[type="text"] {
  flex: 1; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px;
  font-size: 13.5px; font-family: inherit; background: #0b1326; color: var(--ink);
}
.reply-form input[type="text"]::placeholder { color: #5c6b8a; }
.btn-small { padding: 8px 14px; font-size: 13.5px; }
.btn-large { padding: 13px 28px; font-size: 16px; }

/* publish success + first comment hero */
.first-comment-hero { text-align: center; padding: 40px 32px; }
.success-badge {
  width: 64px; height: 64px; border-radius: 50%; background: var(--grad); color: #1a1206;
  font-size: 32px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 12px;
  box-shadow: 0 6px 22px rgba(255, 154, 46, 0.4);
}
.first-comment-hero h2 { margin: 0 0 8px; }
.first-comment-hero hr { border: none; border-top: 1px solid var(--line); margin: 24px 0; }
.first-comment-hero h3 { font-size: 20px; margin: 0 0 6px; }
.first-comment-hero .composer { text-align: left; margin: 16px 0; }

/* instagram media grid */
.ig-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.ig-card { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: rgba(7, 11, 22, 0.5); }
.ig-thumb { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: var(--card2); }
.ig-thumb-none { display: flex; align-items: center; justify-content: center; font-size: 40px; color: var(--muted); }
.ig-card-body { padding: 12px; }
.ig-type {
  display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px;
  color: #1a1206; background: var(--grad); border-radius: 4px; padding: 2px 8px; margin-bottom: 6px;
}
.ig-caption { font-size: 13.5px; margin-bottom: 8px; }
.ig-stats { display: flex; gap: 12px; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.ig-card-links { font-size: 13px; }
.ig-card-links a { color: var(--accent2); text-decoration: none; }
.ig-card-links a:hover { text-decoration: underline; }

/* app-level auth forms */
.auth-card { text-align: left; }
.auth-brand { text-align: center; margin-bottom: 12px; }
.auth-logo {
  width: 72px; height: 72px; border-radius: 18px;
  box-shadow: 0 0 0 1px var(--line), 0 8px 28px rgba(255, 154, 46, 0.3);
}
.auth-card h3 { text-align: center; }
.auth-form label { display: block; font-size: 13.5px; font-weight: 600; margin: 12px 0 6px; }
.auth-form input[type="email"], .auth-form input[type="password"], .auth-form input[type="text"] {
  width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 10px;
  font-size: 14px; font-family: inherit; margin-bottom: 10px;
  background: #0b1326; color: var(--ink); box-sizing: border-box;
}
.auth-form input::placeholder { color: #5c6b8a; }
.auth-form input:focus { outline: none; border-color: var(--accent1); box-shadow: 0 0 0 3px rgba(255, 154, 46, 0.18); }
.auth-form .btn-large { width: 100%; margin-top: 6px; }

/* OTP digit boxes — click-to-copy chip style */
.otp-boxes { display: flex; gap: 10px; justify-content: center; margin: 16px 0 6px; }
.otp-box {
  width: 52px; height: 60px; text-align: center;
  font-size: 26px; font-weight: 800; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--ink); background: #0b1326;
  border: 1.5px dashed rgba(255, 154, 46, 0.55); border-radius: 10px;
  caret-color: var(--accent1);
}
.otp-box:focus {
  outline: none; border-style: solid; border-color: var(--accent1);
  box-shadow: 0 0 0 3px rgba(255, 154, 46, 0.2);
}
@media (max-width: 480px) {
  .otp-box { width: 44px; height: 52px; font-size: 22px; }
  .otp-boxes { gap: 7px; }
}

/* landing page */
.landing-hero { text-align: center; padding: 56px 32px; margin-top: 32px; }
.landing-hero h1 { max-width: 780px; margin: 0 auto 12px; }
.landing-hero .lede { margin-left: auto; margin-right: auto; }
.cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.landing-section { margin: 48px 0 8px; }
.landing-section h2 { font-size: 24px; margin: 0 0 8px; }
.landing-section > .muted { max-width: 760px; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 16px; }
.step { border: 1px solid var(--line); border-radius: 12px; padding: 20px; background: rgba(7, 11, 22, 0.5); }
.step-num {
  width: 40px; height: 40px; border-radius: 50%; background: var(--grad); color: #1a1206;
  font-weight: 800; display: flex; align-items: center; justify-content: center;
  font-size: 18px; margin-bottom: 12px;
}
.step h3 { margin: 0 0 6px; font-size: 16px; }
.step p { margin: 0; font-size: 14px; }
.perm-table code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; color: var(--accent2); white-space: nowrap; }
.feature-list { margin: 0; padding-left: 20px; }
.feature-list li { margin: 10px 0; color: var(--muted); font-size: 14.5px; }
.feature-list li strong { color: var(--ink); }
.footer-note a { color: var(--muted); }
.footer-note a:hover { color: var(--accent2); }
