:root {
  color-scheme: light;
  --ink: #111126;
  --ink-2: #39394e;
  --muted: #77778c;
  --line: #e8e8f0;
  --surface: #ffffff;
  --canvas: #f6f7fb;
  --violet: #6537f4;
  --violet-2: #8e5dff;
  --violet-soft: #f0ebff;
  --gold: #ffbd24;
  --green: #23ae71;
  --coral: #f16465;
  --shadow: 0 18px 55px rgba(26, 22, 61, .08);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--canvas); color: var(--ink); }
body { min-height: 100vh; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(101, 55, 244, .2); outline-offset: 2px; }
[hidden] { display: none !important; }

.login-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(480px, 1.05fr) minmax(480px, .95fr); }
.brand-panel { min-height: 100vh; padding: clamp(40px, 5vw, 84px); display: flex; flex-direction: column; background: radial-gradient(circle at 18% 82%, rgba(117, 72, 255, .17), transparent 28%), linear-gradient(145deg, #fbfaff 0%, #f1edff 58%, #fafaff 100%); border-right: 1px solid #e1dafa; }
.brand-lockup { display: flex; align-items: center; gap: 14px; }
.brand-mark { width: 62px; height: 62px; object-fit: contain; }
.brand-wordmark { display: block; width: 128px; height: auto; object-fit: contain; }
.brand-lockup p { margin: 3px 0 0; color: var(--violet); font-size: 10px; font-weight: 850; letter-spacing: .16em; }
.brand-lockup-login .brand-mark { width: 76px; height: 76px; }
.brand-lockup-login .brand-wordmark { width: 158px; }
.brand-message { margin: auto 0; max-width: 700px; }
.eyebrow { display: block; color: var(--violet); font-size: 11px; line-height: 1.2; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.brand-message h1 { margin: 22px 0 22px; max-width: 660px; font-size: clamp(48px, 5.1vw, 78px); line-height: .98; letter-spacing: -.052em; }
.brand-message > p { max-width: 620px; margin: 0; color: #5a566c; font-size: clamp(17px, 1.5vw, 22px); line-height: 1.55; }
.brand-footer { display: flex; align-items: center; gap: 9px; color: #6f6a81; font-size: 13px; }
.security-dot { width: 9px; height: 9px; border-radius: 99px; background: var(--green); box-shadow: 0 0 0 5px rgba(35, 174, 113, .12); }
.login-panel { display: grid; place-items: center; padding: 52px; background: var(--surface); }
.login-card { width: min(430px, 100%); }
.login-card h2 { margin: 12px 0 10px; font-size: 38px; letter-spacing: -.04em; }
.muted { color: var(--muted); }
.login-card > .muted { margin: 0 0 34px; line-height: 1.55; }
.mobile-logo { display: none; }
.form-stack, .modal-card { display: flex; flex-direction: column; gap: 18px; }
label { display: grid; gap: 8px; color: var(--ink-2); font-size: 13px; font-weight: 700; }
input, select, textarea { width: 100%; border: 1px solid #dbdbe6; border-radius: 12px; padding: 13px 14px; color: var(--ink); background: #fff; transition: border-color .18s, box-shadow .18s; }
input:hover, select:hover, textarea:hover { border-color: #bdbdcc; }
textarea { resize: vertical; line-height: 1.55; }
.form-error { margin: -4px 0; color: #c33a4c; font-size: 13px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; border: 0; border-radius: 11px; padding: 10px 17px; font-weight: 750; transition: transform .16s, box-shadow .16s, background .16s; }
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: .55; transform: none; }
.button-primary { color: #fff; background: linear-gradient(135deg, var(--violet), #7c4fff); box-shadow: 0 8px 22px rgba(101, 55, 244, .2); }
.button-secondary { color: var(--ink-2); background: #fff; border: 1px solid var(--line); box-shadow: 0 3px 12px rgba(20, 20, 40, .03); }
.button-dark { color: #fff; background: #151528; }
.button-wide { width: 100%; min-height: 48px; }
.button-row { display: flex; gap: 10px; }
.login-help { margin: 24px 0 0; color: #9898a8; text-align: center; font-size: 12px; }
.login-help a { color: var(--violet); text-decoration: none; }

.app-layout { min-height: 100vh; display: grid; grid-template-columns: 272px minmax(0, 1fr); }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; width: 272px; display: flex; flex-direction: column; padding: 30px 20px 18px; background: #fff; border-right: 1px solid var(--line); }
.sidebar-brand { margin: 0 10px 34px; }
.sidebar-brand .brand-mark { width: 50px; height: 50px; }
.sidebar-brand .brand-wordmark { width: 104px; }
.primary-nav { display: grid; gap: 6px; }
.nav-item { width: 100%; min-height: 48px; display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 7px; border: 0; border-radius: 12px; padding: 9px 13px; text-align: left; color: #666678; background: transparent; font-weight: 720; }
.nav-item:hover { color: var(--ink); background: #f8f7fc; }
.nav-item.active { color: #fff; background: linear-gradient(135deg, #171729, #2f2654); box-shadow: 0 10px 28px rgba(21, 21, 40, .14); }
.nav-icon { width: 28px; text-align: center; font-size: 20px; }
.nav-badge { min-width: 23px; height: 23px; display: grid; place-items: center; border-radius: 99px; color: var(--violet); background: var(--violet-soft); font-size: 11px; }
.nav-item.active .nav-badge { color: #fff; background: rgba(255, 255, 255, .16); }
.sidebar-coming { margin: 26px 10px auto; padding: 15px; border: 1px solid #e9e5f7; border-radius: 14px; color: #9290a2; background: #faf9ff; font-size: 11px; line-height: 1.55; }
.sidebar-coming span { display: block; margin-bottom: 4px; color: var(--violet); font-weight: 800; text-transform: uppercase; letter-spacing: .09em; }
.sidebar-footer { display: grid; grid-template-columns: 38px minmax(0, 1fr) 32px; gap: 10px; align-items: center; padding: 16px 8px 10px; border-top: 1px solid var(--line); }
.user-avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; color: #fff; background: linear-gradient(145deg, var(--violet), #9b6dff); font-weight: 850; }
.user-meta { min-width: 0; display: grid; gap: 2px; }
.user-meta strong, .user-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-meta strong { font-size: 12px; }
.user-meta span { color: var(--muted); font-size: 10px; }
.icon-button { width: 34px; height: 34px; border: 0; border-radius: 9px; color: #888899; background: transparent; font-size: 18px; }
.icon-button:hover { color: var(--ink); background: #f3f3f7; }
.version { margin: 6px 8px 0; color: #aaaabb; font-size: 9px; letter-spacing: .05em; }
.workspace { grid-column: 2; min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 15; height: 74px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(24px, 4vw, 64px); background: rgba(246, 247, 251, .9); border-bottom: 1px solid rgba(226, 226, 235, .8); backdrop-filter: blur(18px); }
.topbar-location { display: flex; gap: 9px; align-items: center; color: #68687a; font-size: 13px; font-weight: 750; }
.status-dot { width: 8px; height: 8px; border-radius: 99px; background: var(--green); box-shadow: 0 0 0 4px rgba(35, 174, 113, .12); }
.topbar-actions { display: flex; gap: 10px; align-items: center; }
.language-select { width: auto; min-width: 136px; padding: 9px 32px 9px 12px; border-radius: 10px; background: #fff; font-size: 12px; font-weight: 700; }
.notification-button { color: var(--violet); font-size: 9px; background: #fff; border: 1px solid var(--line); }
.mobile-menu { display: none; }
.content { width: min(1480px, 100%); margin: 0 auto; padding: clamp(34px, 4.4vw, 68px) clamp(24px, 4vw, 64px) 70px; }
.view-section { display: none; }
.view-section.active { display: block; animation: appear .22s ease both; }
@keyframes appear { from { opacity: 0; transform: translateY(5px); } }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 34px; }
.page-heading h1 { margin: 10px 0 7px; font-size: clamp(34px, 4vw, 55px); line-height: 1.05; letter-spacing: -.05em; }
.page-heading p { margin: 0; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.metric-card { min-height: 188px; display: flex; flex-direction: column; padding: 23px; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: 0 8px 28px rgba(22, 20, 50, .035); }
.metric-card > span { margin-top: 18px; color: #77778a; font-size: 12px; font-weight: 700; }
.metric-card strong { margin-top: 7px; font-size: 40px; line-height: 1; letter-spacing: -.05em; }
.metric-card small { margin-top: auto; color: #aaaaba; font-size: 10px; }
.hero-metric { color: #fff; border-color: transparent; background: linear-gradient(145deg, #1a1832, #33285d); box-shadow: 0 18px 38px rgba(35, 24, 73, .16); }
.hero-metric > span, .hero-metric small { color: #b9b4cb; }
.metric-icon { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 10px; font-weight: 900; }
.metric-icon.star { color: var(--gold); background: rgba(255, 189, 36, .12); }
.metric-icon.violet { color: var(--violet); background: var(--violet-soft); }
.metric-icon.coral { color: var(--coral); background: #fff0f0; }
.metric-icon.green { color: var(--green); background: #ebfaf3; }
.dashboard-grid { margin-top: 18px; display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .72fr); gap: 18px; }
.panel { border: 1px solid var(--line); border-radius: 22px; background: #fff; box-shadow: 0 8px 28px rgba(22, 20, 50, .03); }
.recent-panel { padding: 26px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.panel-heading h2, .insight-panel h2 { margin: 7px 0 0; font-size: 23px; letter-spacing: -.035em; }
.text-button { border: 0; color: var(--violet); background: transparent; font-weight: 750; }
.insight-panel { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; padding: 28px; color: #fff; border: 0; background: linear-gradient(155deg, #6941ee, #2d205d); }
.insight-panel::after { content: ""; position: absolute; width: 240px; height: 240px; right: -105px; bottom: -110px; border-radius: 999px; background: rgba(255,255,255,.07); }
.insight-panel .eyebrow { color: #d8ccff; }
.insight-panel p { position: relative; z-index: 1; color: #ddd8eb; line-height: 1.58; }
.insight-panel .button { position: relative; z-index: 1; margin-top: auto; }
.insight-orb { width: 45px; height: 45px; display: grid; place-items: center; margin-bottom: 22px; border: 1px solid rgba(255,255,255,.22); border-radius: 14px; background: rgba(255,255,255,.12); font-size: 22px; }
.review-list { display: grid; gap: 13px; }
.review-card { display: grid; grid-template-columns: 50px minmax(0, 1fr) auto; gap: 15px; align-items: start; padding: 20px; border: 1px solid var(--line); border-radius: 17px; background: #fff; }
.review-list.compact .review-card { grid-template-columns: 42px minmax(0, 1fr) auto; padding: 15px 0; border-width: 1px 0 0; border-radius: 0; }
.review-list.compact .review-card:first-child { border-top: 0; }
.review-avatar { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; color: var(--violet); background: var(--violet-soft); font-weight: 850; }
.compact .review-avatar { width: 40px; height: 40px; border-radius: 12px; }
.review-main { min-width: 0; }
.review-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.review-meta strong { font-size: 14px; }
.stars { color: var(--gold); letter-spacing: .06em; }
.review-source, .review-date { color: #9999aa; font-size: 10px; }
.review-text { margin: 8px 0 0; color: #56566a; font-size: 13px; line-height: 1.55; }
.review-reply { margin-top: 14px; padding: 14px; border-left: 3px solid var(--violet); border-radius: 0 10px 10px 0; background: #f8f6ff; }
.review-reply textarea { margin: 8px 0 10px; min-height: 94px; background: #fff; }
.reply-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.reply-actions .button { min-height: 35px; padding: 7px 11px; font-size: 11px; }
.status-pill { display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; border-radius: 99px; padding: 6px 10px; color: #726f84; background: #f0f0f5; font-size: 10px; font-weight: 800; }
.status-pill.needsReply { color: #b4414d; background: #fff0f1; }
.status-pill.draft { color: var(--violet); background: var(--violet-soft); }
.status-pill.approved { color: #147852; background: #e8f8f1; }
.status-pill.published { color: #137650; background: #e6f7ef; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: -12px 0 22px; }
.filter-chip { border: 1px solid var(--line); border-radius: 99px; padding: 8px 13px; color: #77778b; background: #fff; font-size: 11px; font-weight: 750; }
.filter-chip.active { color: #fff; border-color: var(--ink); background: var(--ink); }
.location-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.location-card { padding: 23px; border: 1px solid var(--line); border-radius: 19px; background: #fff; }
.location-card h3 { margin: 18px 0 7px; font-size: 19px; }
.location-card p { min-height: 38px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.location-card footer { display: flex; align-items: center; justify-content: space-between; margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); }
.location-pin { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; color: var(--violet); background: var(--violet-soft); font-size: 20px; }
.integration-grid { display: grid; gap: 15px; }
.settings-grid { display: grid; grid-template-columns: minmax(260px, .7fr) minmax(340px, 1.3fr); gap: 18px; align-items: start; }
.settings-card { padding: 28px; }
.settings-card h2 { margin: 9px 0 5px; font-size: 24px; letter-spacing: -.035em; }
.settings-card .form-stack { margin-top: 22px; }
.account-role { display: inline-flex; margin-top: 20px; border-radius: 99px; padding: 7px 11px; color: var(--violet); background: var(--violet-soft); font-size: 10px; font-weight: 800; }
.integration-card { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: #fff; }
.integration-card h2 { margin: 6px 0; font-size: 19px; }
.integration-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.integration-card small { display: block; margin-top: 5px; color: #9b9bad; }
.google-g, .channel-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 15px; background: #f5f5fa; font-size: 27px; font-weight: 900; }
.google-g { color: #4285f4; font-family: Arial, sans-serif; }
.channel-icon { color: var(--violet); background: var(--violet-soft); }
.integration-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.muted-card { opacity: .68; grid-template-columns: 54px minmax(0, 1fr); }
.form-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 14px; }
.modal { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 40px); padding: 0; border: 0; border-radius: 22px; box-shadow: 0 30px 90px rgba(18, 17, 38, .22); }
.modal::backdrop { background: rgba(16, 15, 30, .5); backdrop-filter: blur(4px); }
.modal-card { padding: 28px; }
.modal-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.modal-heading h2 { margin: 6px 0 0; font-size: 27px; letter-spacing: -.04em; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 4px; }
.empty-state { display: grid; place-items: center; min-height: 240px; padding: 34px; text-align: center; border: 1px dashed #d8d6e5; border-radius: 18px; background: rgba(255,255,255,.55); }
.empty-state span { color: var(--violet); font-size: 30px; }
.empty-state h3 { margin: 10px 0 5px; }
.empty-state p { margin: 0; color: var(--muted); font-size: 12px; }
.toast { position: fixed; z-index: 100; right: 24px; bottom: 24px; max-width: min(390px, calc(100vw - 48px)); padding: 13px 16px; border-radius: 12px; color: #fff; background: #171729; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translateY(10px); transition: opacity .2s, transform .2s; font-size: 13px; }
.toast.visible { opacity: 1; transform: translateY(0); }
.toast.error { background: #9e3241; }

@media (max-width: 1100px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .location-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .insight-panel { min-height: 300px; }
}

@media (max-width: 900px) {
  .login-layout { grid-template-columns: 1fr; }
  .brand-panel { display: none; }
  .login-panel { min-height: 100vh; padding: 28px; }
  .mobile-logo { display: flex; margin-bottom: 52px; }
  .app-layout { grid-template-columns: 1fr; }
  .sidebar { transform: translateX(-105%); transition: transform .22s; box-shadow: 22px 0 60px rgba(18, 17, 38, .15); }
  .sidebar.open { transform: translateX(0); }
  .workspace { grid-column: 1; }
  .mobile-menu { display: inline-grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
  .topbar-location { display: none; }
}

@media (max-width: 650px) {
  .topbar { padding: 0 18px; }
  .content { padding: 30px 18px 60px; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .page-heading > .button, .page-heading .button-row { width: 100%; }
  .page-heading .button-row .button { flex: 1; }
  .metric-grid, .location-grid { grid-template-columns: 1fr; }
  .review-card { grid-template-columns: 42px minmax(0, 1fr); }
  .review-card > .status-pill { grid-column: 2; justify-self: start; }
  .integration-card { grid-template-columns: 48px minmax(0, 1fr); }
  .integration-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .form-grid { grid-template-columns: 1fr; }
  .language-select { min-width: 120px; }
}
