:root {
    --navy: #0d2538;
    --navy-2: #12344d;
    --ink: #142332;
    --muted: #687789;
    --line: #dfe7ef;
    --page: #f4f7fa;
    --panel: #ffffff;
    --teal: #1f7a8c;
    --green: #4d6b35;
    --red: #b3262f;
    --pink: #d64f7f;
    --gold: #b9862d;
    --shadow: 0 18px 45px rgba(20, 35, 50, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--page);
    font-family: Inter, Arial, sans-serif;
    letter-spacing: 0;
}

a.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

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

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

.sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    width: 264px;
    height: 100vh;
    padding: 24px 18px;
    color: #edf4fa;
    background: linear-gradient(180deg, var(--navy), #071621);
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 6px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 50%;
    color: #ffffff;
    font-weight: 800;
}

.brand-block h1,
.topbar h2,
.panel h3,
.connected-heading h3 {
    margin: 0;
}

.brand-block h1 {
    font-size: 19px;
    line-height: 1.1;
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--teal);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.brand-block .eyebrow,
.sidebar-foot p {
    color: #98b8c8;
}

.sidebar-nav {
    display: grid;
    gap: 6px;
    margin: 22px 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 42px;
    padding: 10px 12px;
    border-radius: 8px;
    color: #c7d7e2;
    font-size: 14px;
    font-weight: 650;
    text-decoration: none;
}

.nav-link:hover,
.nav-link.is-active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.nav-icon {
    position: relative;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

.nav-icon::before,
.nav-icon::after {
    position: absolute;
    content: "";
}

.nav-icon-grid::before {
    inset: 2px;
    border: 2px solid currentColor;
    border-radius: 4px;
    box-shadow: 8px 0 0 -5px currentColor, 0 8px 0 -5px currentColor, 8px 8px 0 -5px currentColor;
}

.nav-icon-chart::before {
    left: 2px;
    right: 2px;
    bottom: 2px;
    height: 12px;
    border-left: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
}

.nav-icon-chart::after {
    left: 6px;
    bottom: 5px;
    width: 9px;
    height: 7px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    transform: skew(-22deg);
}

.nav-icon-lead::before,
.nav-icon-camera::before {
    inset: 3px;
    border: 2px solid currentColor;
    border-radius: 5px;
}

.nav-icon-lead::after {
    left: 6px;
    top: 6px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.nav-icon-content::before,
.nav-icon-report::before {
    inset: 2px 4px;
    border: 2px solid currentColor;
    border-radius: 3px;
}

.nav-icon-content::after,
.nav-icon-report::after {
    left: 7px;
    right: 7px;
    top: 7px;
    height: 2px;
    background: currentColor;
    box-shadow: 0 4px 0 currentColor;
}

.nav-icon-pin::before {
    left: 5px;
    top: 2px;
    width: 8px;
    height: 8px;
    border: 2px solid currentColor;
    border-radius: 50%;
}

.nav-icon-pin::after {
    left: 8px;
    top: 11px;
    width: 2px;
    height: 6px;
    background: currentColor;
}

.nav-icon-camera::after {
    left: 7px;
    top: 7px;
    width: 4px;
    height: 4px;
    border: 2px solid currentColor;
    border-radius: 50%;
}

.nav-icon-search::before {
    left: 3px;
    top: 3px;
    width: 8px;
    height: 8px;
    border: 2px solid currentColor;
    border-radius: 50%;
}

.nav-icon-search::after {
    left: 12px;
    top: 12px;
    width: 7px;
    height: 2px;
    background: currentColor;
    transform: rotate(45deg);
    transform-origin: left center;
}

.nav-icon-gear::before {
    inset: 4px;
    border: 3px solid currentColor;
    border-radius: 50%;
}

.nav-icon-plug::before {
    left: 6px;
    top: 2px;
    width: 6px;
    height: 9px;
    border: 2px solid currentColor;
    border-top: 0;
    border-radius: 0 0 4px 4px;
}

.nav-icon-plug::after {
    left: 8px;
    top: 11px;
    width: 2px;
    height: 5px;
    background: currentColor;
}

.sidebar-foot {
    margin-top: auto;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
}

.sidebar-foot p,
.sidebar-foot strong {
    margin: 0;
    font-size: 13px;
}

.dashboard {
    width: calc(100% - 264px);
    padding: 28px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.topbar h2 {
    color: var(--navy);
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.status-pill,
.ghost-button {
    min-height: 38px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 750;
}

.primary-button {
    min-height: 44px;
    border: 0;
    border-radius: 8px;
    padding: 0 16px;
    color: #ffffff;
    background: var(--teal);
    font-weight: 800;
    cursor: pointer;
}

.alert {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 750;
}

.alert.error {
    color: #7f1d1d;
    background: #fee2e2;
}

.alert.success {
    color: #23502a;
    background: #e8f0e4;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 0 14px;
    color: var(--green);
    background: #e8f0e4;
}

.ghost-button {
    border: 1px solid var(--line);
    padding: 0 14px;
    color: var(--navy);
    background: #ffffff;
    cursor: pointer;
}

.ghost-button:disabled {
    cursor: wait;
    opacity: 0.55;
}

.metric-grid,
.connected-grid,
.seo-grid {
    display: grid;
    gap: 16px;
}

.metric-grid {
    grid-template-columns: repeat(6, minmax(140px, 1fr));
    margin-bottom: 18px;
}

.metric-card,
.panel,
.account-card {
    border: 1px solid rgba(213, 224, 234, 0.88);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.metric-card {
    min-height: 150px;
    padding: 18px;
}

.metric-icon {
    width: 32px;
    height: 32px;
    margin-bottom: 18px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--teal), var(--navy-2));
}

.metric-card p,
.platform-meta span,
.content-item span,
.seo-card span,
.seo-card p,
.account-card p,
.account-card small,
.panel-note,
.connected-heading span {
    color: var(--muted);
}

.metric-card p {
    min-height: 32px;
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 700;
}

.metric-card strong {
    display: block;
    margin-bottom: 10px;
    color: var(--navy);
    font-size: 25px;
    line-height: 1.05;
}

.metric-change {
    font-size: 12px;
    font-weight: 800;
}

.metric-change.positive {
    color: var(--green);
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.75fr);
    gap: 18px;
    margin-bottom: 18px;
}

.content-grid-thirds {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel {
    min-width: 0;
    padding: 20px;
}

.panel-header,
.connected-heading,
.account-topline,
.content-item,
.lead-bar-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.panel h3,
.connected-heading h3 {
    color: var(--navy);
    font-size: 20px;
}

.panel-note,
.connected-heading span {
    font-size: 13px;
    font-weight: 700;
}

.chart-wrap {
    width: 100%;
    margin-top: 20px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.chart-wrap canvas {
    display: block;
    width: 100%;
    height: auto;
    min-height: 260px;
}

.platform-list,
.activity-list,
.content-list,
.insight-list,
.lead-bars {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.platform-row {
    display: grid;
    gap: 10px;
}

.platform-meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.platform-meta strong,
.content-item strong,
.activity-item strong,
.account-card strong {
    color: var(--navy);
}

.platform-meta span,
.content-item span,
.account-card p,
.account-card small {
    font-size: 13px;
}

.platform-progress,
.lead-bar {
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: #e7edf3;
}

.platform-progress span,
.lead-bar b {
    display: block;
    height: 100%;
    border-radius: inherit;
}

.activity-item {
    position: relative;
    padding-left: 18px;
}

.activity-item::before {
    position: absolute;
    left: 0;
    top: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--teal);
    content: "";
}

.activity-item span {
    display: block;
    margin-bottom: 4px;
    color: var(--gold);
    font-size: 12px;
    font-weight: 800;
}

.activity-item p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.content-item {
    min-height: 62px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.content-item div {
    display: grid;
    gap: 5px;
}

.content-item b {
    flex: 0 0 auto;
    color: var(--teal);
    font-size: 13px;
}

.insights-panel {
    background: #fbfcfd;
}

.insight-item {
    padding: 13px 14px;
    border-left: 4px solid var(--teal);
    border-radius: 6px;
    color: #26394c;
    background: #eef7f8;
    font-size: 14px;
    line-height: 1.45;
}

.seo-grid {
    grid-template-columns: repeat(4, minmax(130px, 1fr));
    margin-top: 18px;
}

.seo-card {
    min-height: 124px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.seo-card span {
    display: block;
    min-height: 32px;
    font-size: 13px;
    font-weight: 750;
}

.seo-card strong {
    display: block;
    margin: 10px 0 8px;
    color: var(--navy);
    font-size: 24px;
}

.seo-card p {
    margin: 0;
    font-size: 12px;
    line-height: 1.35;
}

.lead-bar-row {
    display: grid;
    grid-template-columns: 82px 1fr 44px;
}

.lead-bar-row span,
.lead-bar-row strong {
    color: var(--navy);
    font-size: 13px;
    font-weight: 800;
}

.lead-bar b {
    background: var(--teal);
}

.connected-section {
    padding: 20px;
    border-radius: 8px;
    background: var(--navy);
    box-shadow: var(--shadow);
}

.connected-heading {
    margin-bottom: 16px;
}

.connected-heading h3 {
    color: #ffffff;
}

.connected-grid {
    grid-template-columns: repeat(4, minmax(180px, 1fr));
}

.account-card {
    min-height: 132px;
    padding: 16px;
    background: #ffffff;
}

.account-topline span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    color: var(--green);
    background: #e8f0e4;
    font-size: 12px;
    font-weight: 800;
}

.account-card p {
    margin: 16px 0 8px;
}

.account-card small {
    line-height: 1.35;
}

.auth-page {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 24px;
    background:
        linear-gradient(135deg, rgba(13, 37, 56, 0.94), rgba(31, 122, 140, 0.86)),
        var(--navy);
}

.auth-card {
    width: min(100%, 430px);
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.22);
}

.auth-mark {
    margin-bottom: 22px;
    color: var(--navy);
    border-color: var(--line);
}

.auth-card h1 {
    margin: 0 0 22px;
    color: var(--navy);
    font-size: 34px;
}

.auth-form,
.admin-form {
    display: grid;
    gap: 14px;
}

.auth-form label,
.admin-form label {
    display: grid;
    gap: 7px;
    color: var(--navy);
    font-size: 13px;
    font-weight: 800;
}

.auth-form input,
.admin-form input,
.admin-form select {
    min-height: 42px;
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 12px;
    color: var(--ink);
    background: #ffffff;
}

.auth-note,
.admin-copy {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.oauth-callback-note {
  display: grid;
  gap: 6px;
  margin: 14px 0;
  color: var(--muted);
  font-size: 12px;
}

.oauth-callback-note code {
  display: block;
  overflow-wrap: anywhere;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f7f9fc;
  color: var(--navy);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  line-height: 1.5;
}

.auth-note {
    margin: 18px 0 0;
}

.admin-dashboard {
    width: calc(100% - 264px);
}

.admin-panel {
    margin-bottom: 18px;
}

.admin-account-list,
.credential-grid {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.admin-account {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 74px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.admin-account-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.danger-button {
    color: #7f1d1d;
    border-color: #fecaca;
    background: #fff5f5;
}

.admin-error-text {
    color: #b91c1c;
}

.admin-account div {
    display: grid;
    gap: 4px;
}

.admin-account strong,
.credential-card strong {
    color: var(--navy);
}

.admin-account span,
.admin-account small,
.credential-card p {
    color: var(--muted);
    font-size: 13px;
}

.credential-card small {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.form-grid,
.credential-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.credential-card {
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.credential-card span {
    width: fit-content;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 800;
}

.credential-card .ready {
    color: var(--green);
    background: #e8f0e4;
}

.credential-card .missing {
    color: #7f1d1d;
    background: #fee2e2;
}

.integrations-admin .topbar {
    align-items: flex-start;
}

.integration-client-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
    padding: 18px;
}

.integration-client-panel h3 {
    margin: 0 0 6px;
    color: var(--navy);
}

.integration-client-panel p {
    margin: 0;
    color: var(--muted);
}

.client-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.client-meta span {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 7px 10px;
    color: var(--muted);
    background: #f8fafc;
    font-size: 12px;
    font-weight: 800;
}

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

.integration-card {
    display: grid;
    align-content: start;
    gap: 16px;
    min-height: 310px;
    padding: 18px;
}

.integration-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.integration-card-head h3 {
    margin: 0;
    color: var(--navy);
}

.integration-form {
    gap: 12px;
}

.integration-actions {
    justify-content: flex-start;
}

.muted-integration {
    background: #fbfcfe;
}

.loading-card,
.error-card {
    display: grid;
    place-items: center;
    grid-column: 1 / -1;
    color: var(--muted);
    font-weight: 800;
}

@media (max-width: 1180px) {
    .metric-grid {
        grid-template-columns: repeat(3, minmax(160px, 1fr));
    }

    .content-grid,
    .content-grid-thirds {
        grid-template-columns: 1fr;
    }

    .connected-grid,
    .seo-grid {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }
}

@media (max-width: 780px) {
    .app-shell {
        display: block;
    }

    .sidebar {
        position: static;
        width: 100%;
        height: auto;
    }

    .sidebar-nav {
        grid-template-columns: repeat(2, minmax(130px, 1fr));
    }

    .dashboard {
        width: 100%;
        padding: 20px;
    }

    .admin-dashboard {
        width: 100%;
    }

    .topbar,
    .connected-heading,
    .panel-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .topbar-actions {
        justify-content: flex-start;
    }

    .metric-grid,
    .connected-grid,
    .seo-grid,
    .form-grid,
    .credential-grid,
    .integration-settings-grid {
        grid-template-columns: 1fr;
    }

    .integration-client-panel {
        align-items: flex-start;
        flex-direction: column;
    }

    .client-meta {
        justify-content: flex-start;
    }
}

@media (max-width: 440px) {
    .sidebar-nav {
        grid-template-columns: 1fr;
    }

    .dashboard {
        padding: 16px;
    }

    .panel,
    .connected-section {
        padding: 16px;
    }

    .platform-meta,
    .content-item,
    .account-topline,
    .admin-account {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-account-actions {
        justify-content: flex-start;
    }

    .lead-bar-row {
        grid-template-columns: 68px 1fr 38px;
    }
}

/* Screenshot-style dashboard refresh */
:root {
    --navy: #061d3a;
    --navy-2: #08284f;
    --ink: #08132d;
    --muted: #58647a;
    --line: #e6ebf2;
    --page: #f6f8fb;
    --panel: #ffffff;
    --blue: #075ce6;
    --shadow: 0 10px 28px rgba(10, 26, 54, 0.08);
}

body {
    background: #f7f9fc;
    color: var(--ink);
}

.app-shell {
    background: #f7f9fc;
}

.sidebar {
    width: 262px;
    padding: 20px 13px 24px;
    background:
        radial-gradient(circle at 78% 18%, rgba(8, 95, 180, 0.22), transparent 28%),
        linear-gradient(180deg, #061f42 0%, #021529 100%);
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.08);
}

.brand-block {
    gap: 14px;
    padding: 0 10px 28px;
    border-bottom: 0;
}

.brand-mark {
    width: 48px;
    height: 48px;
    border: 3px solid #ffffff;
    color: #ffffff;
    font-size: 17px;
}

.brand-block h1 {
    color: #ffffff;
    font-size: 25px;
    font-weight: 850;
    letter-spacing: 0;
}

.brand-block p {
    margin: 3px 0 0;
    color: #238dff;
    font-size: 13px;
    font-weight: 700;
}

.sidebar-nav {
    gap: 12px;
    margin: 0 0 30px;
}

.nav-link {
    min-height: 45px;
    padding: 11px 18px;
    border-radius: 6px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
}

.nav-link.is-active,
.nav-link:hover {
    background: linear-gradient(90deg, #0a66ff, #0753d9);
    box-shadow: 0 8px 18px rgba(0, 85, 255, 0.25);
}

.nav-icon {
    width: 21px;
    height: 21px;
    flex-basis: 21px;
}

.sidebar-accounts {
    margin: 4px 0 28px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.13);
}

.sidebar-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 11px 12px;
    color: #99a8c4;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.sidebar-account-list {
    display: grid;
    gap: 10px;
}

.sidebar-account {
    display: grid;
    grid-template-columns: 22px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 0 11px;
    color: #ffffff;
}

.account-provider {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    color: #ffffff;
    background: #0b5fe8;
    font-size: 12px;
    font-style: normal;
    font-weight: 850;
}

.provider-pinterest {
    background: #e60023;
}

.provider-instagram {
    background: linear-gradient(135deg, #f58529, #dd2a7b 48%, #8134af);
}

.provider-google-analytics {
    background: #fb8500;
}

.provider-search-console {
    background: #4285f4;
}

.sidebar-account strong {
    overflow: hidden;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-account em {
    border-radius: 999px;
    padding: 3px 8px;
    color: #22c55e;
    background: rgba(34, 197, 94, 0.15);
    font-size: 11px;
    font-style: normal;
    font-weight: 750;
}

.lease-promo {
    margin-top: auto;
    padding: 18px 20px 19px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 8px;
    text-align: center;
    background: linear-gradient(180deg, rgba(13, 52, 100, 0.88), rgba(5, 31, 61, 0.88));
}

.vehicle-visual {
    position: relative;
    height: 105px;
    margin-bottom: 12px;
}

.vehicle-visual::before {
    position: absolute;
    left: 22px;
    right: 22px;
    top: 26px;
    height: 46px;
    border-radius: 28px 36px 18px 18px;
    background: linear-gradient(180deg, #f7fafc 0%, #bfc8d5 100%);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.32);
    content: "";
}

.vehicle-visual::after {
    position: absolute;
    left: 45px;
    top: 18px;
    width: 82px;
    height: 42px;
    border-radius: 36px 42px 4px 4px;
    background: linear-gradient(180deg, #eef4fb 0%, #d4dde8 100%);
    content: "";
}

.vehicle-visual span::before,
.vehicle-visual span::after {
    position: absolute;
    top: 62px;
    width: 25px;
    height: 25px;
    border: 5px solid #1c2430;
    border-radius: 50%;
    background: #657083;
    content: "";
    z-index: 2;
}

.vehicle-visual span::before {
    left: 42px;
}

.vehicle-visual span::after {
    right: 42px;
}

.lease-promo strong,
.lease-promo p {
    display: block;
    margin: 0;
    color: #ffffff;
    font-size: 15px;
    line-height: 1.45;
}

.lease-promo a {
    display: grid;
    place-items: center;
    min-height: 38px;
    margin-top: 18px;
    border-radius: 5px;
    color: #ffffff;
    background: var(--blue);
    font-weight: 800;
    text-decoration: none;
}

.sidebar-foot {
    display: none;
}

.dashboard,
.admin-dashboard {
    width: calc(100% - 262px);
    padding: 23px 29px 28px;
}

.topbar {
    margin-bottom: 21px;
}

.topbar h2 {
    font-size: 26px;
    line-height: 1.15;
}

.topbar-subtitle {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 15px;
}

.topbar-actions {
    gap: 14px;
}

.date-button,
.export-button,
.small-select {
    min-height: 40px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
}

.date-button,
.small-select {
    border: 1px solid #d8e0ec;
    color: #17213a;
    background: #ffffff;
}

.date-button {
    min-width: 220px;
    padding: 0 18px;
}

.small-select {
    min-width: 118px;
    padding: 0 13px;
}

.export-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 154px;
    color: #ffffff;
    background: var(--blue);
    text-decoration: none;
}

.status-pill,
.ghost-button {
    border-radius: 6px;
}

.dashboard > .topbar .status-pill,
.dashboard > .topbar .ghost-button {
    display: none;
}

.platform-card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 18px;
    margin-bottom: 20px;
}

.channel-card,
.panel {
    border: 1px solid #e4e9f1;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.channel-card {
    min-height: 178px;
    padding: 21px 20px 18px;
}

.channel-heading {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 18px;
}

.channel-icon {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    color: #ffffff;
    background: var(--channel-color);
    font-size: 14px;
    font-weight: 850;
}

.channel-heading p,
.channel-body span,
.channel-body small {
    margin: 0;
    color: #4f5c76;
}

.channel-heading p {
    font-size: 14px;
    font-weight: 700;
}

.channel-body {
    display: grid;
    grid-template-columns: minmax(92px, 1fr) 44%;
    align-items: end;
    gap: 14px;
}

.channel-body strong {
    display: block;
    color: #071331;
    font-size: 26px;
    line-height: 1;
}

.channel-body span,
.channel-body small {
    display: block;
    font-size: 12px;
}

.channel-body span {
    margin-top: 6px;
}

.channel-body b {
    display: block;
    margin-top: 13px;
    color: #0f9f55;
    font-size: 13px;
}

.sparkline {
    width: 100%;
    height: 70px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(430px, 0.83fr);
    gap: 16px;
    margin-bottom: 20px;
}

.bottom-grid {
    grid-template-columns: minmax(0, 1fr) minmax(430px, 0.83fr);
}

.detail-grid {
    grid-template-columns: minmax(0, 0.75fr) minmax(0, 1fr);
}

.panel {
    padding: 19px;
}

.panel h3 {
    color: #071331;
    font-size: 16px;
    font-weight: 850;
}

.panel-header {
    align-items: flex-start;
}

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    margin-top: 21px;
    color: #26324a;
    font-size: 12px;
    font-weight: 650;
}

.chart-legend span::before {
    display: inline-block;
    width: 15px;
    height: 4px;
    margin-right: 7px;
    border-radius: 99px;
    vertical-align: middle;
    content: "";
}

.legend-pin::before {
    background: #ff1a2d;
}

.legend-instagram::before {
    background: #7c2df2;
}

.legend-analytics::before {
    background: #fb8500;
}

.legend-search::before {
    background: #0b5fe8;
}

.chart-wrap,
.mini-chart-wrap {
    border: 0;
    border-radius: 0;
}

.performance-card .chart-wrap {
    margin-top: 14px;
}

.chart-wrap canvas {
    min-height: 265px;
}

.content-tabs {
    display: flex;
    gap: 34px;
    margin: 20px 0 0;
    border-bottom: 1px solid #e8edf4;
}

.content-tabs span {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: #5b6680;
    font-weight: 850;
}

.content-tabs .is-active {
    border-bottom: 2px solid #ff1a2d;
    color: #ff1a2d;
}

.content-table {
    display: grid;
}

.content-row {
    display: grid;
    grid-template-columns: 48px minmax(150px, 1fr) 92px 112px;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    border-bottom: 1px solid #e8edf4;
}

.content-thumb {
    width: 44px;
    height: 36px;
    border-radius: 5px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.34), transparent 42%),
        linear-gradient(135deg, #e8edf4 0%, #8795a8 46%, #0a1830 100%);
}

.content-title {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.content-title strong {
    overflow: hidden;
    color: #111936;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.content-title span,
.content-stat span {
    color: #5e6a80;
    font-size: 11px;
}

.content-stat {
    display: grid;
    gap: 4px;
}

.content-stat strong {
    color: #08132d;
    font-size: 14px;
}

.view-link {
    display: inline-flex;
    margin-top: 15px;
    color: var(--blue);
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

.traffic-layout {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 22px;
    align-items: stretch;
    margin-top: 18px;
}

.traffic-stats {
    display: grid;
    align-content: center;
    gap: 14px;
}

.traffic-stat {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 10px;
}

.traffic-stat span {
    grid-column: 1 / -1;
    color: #17213a;
    font-size: 11px;
    font-weight: 700;
}

.traffic-stat strong {
    color: #071331;
    font-size: 20px;
}

.traffic-stat b {
    align-self: center;
    font-size: 12px;
}

.traffic-stat .positive {
    color: #0f9f55;
}

.traffic-stat .negative {
    color: #dc2626;
}

.mini-chart-wrap canvas {
    width: 100%;
    height: auto;
    min-height: 210px;
}

.compact-activity {
    margin-top: 16px;
}

.dashboard-footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: #5e6a80;
    font-size: 12px;
}

.dashboard-footer a {
    color: var(--blue);
    font-weight: 800;
    text-decoration: none;
}

@media (max-width: 1240px) {
    .platform-card-grid {
        grid-template-columns: repeat(2, minmax(220px, 1fr));
    }

    .dashboard-grid,
    .bottom-grid,
    .detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 780px) {
    .sidebar {
        width: 100%;
        height: auto;
    }

    .dashboard,
    .admin-dashboard {
        width: 100%;
        padding: 18px;
    }

    .platform-card-grid {
        grid-template-columns: 1fr;
    }

    .integration-settings-grid {
        grid-template-columns: 1fr;
    }

    .integration-client-panel {
        align-items: flex-start;
        flex-direction: column;
    }

    .client-meta {
        justify-content: flex-start;
    }

    .traffic-layout {
        grid-template-columns: 1fr;
    }

    .content-row {
        grid-template-columns: 48px 1fr;
    }

    .content-stat {
        grid-column: 2;
    }

    .dashboard-footer {
        flex-direction: column;
    }
}

/* Dark brutalist analytics redesign */
:root {
    --brutal-bg: #0b0b0b;
    --brutal-panel: #161616;
    --brutal-panel-2: #111111;
    --brutal-line: #262626;
    --brutal-muted: #5c5c5c;
    --brutal-text: #c8c8c8;
    --brutal-lime: var(--brand-accent, #c6ff00);
    --brutal-orange: #ff4d00;
    --brutal-red: #ff2b4d;
}

body {
    color: var(--brutal-text);
    background: var(--brutal-bg);
    font-family: Geist, Inter, Arial, sans-serif;
}

body:has(.brutal-dashboard) .app-shell {
    background: var(--brutal-bg);
}

.brutal-sidebar {
    flex: 0 0 170px;
    width: 170px;
    padding: 0;
    color: var(--brutal-text);
    background: #090909;
    border-right: 1px solid var(--brutal-line);
    box-shadow: none;
}

.brutal-brand {
    padding: 14px 10px 16px;
    border-bottom: 1px solid var(--brutal-line);
}

.brutal-brand p,
.brutal-period span,
.brutal-sync span,
.brutal-kicker,
.brutal-panel-label,
.brutal-dot,
.brutal-table-head {
    margin: 0;
    color: var(--brutal-muted);
    font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.brutal-brand p {
    color: #739400;
}

.brutal-brand h1 {
    margin: 6px 0 0;
    color: var(--brutal-text);
    font-size: 13px;
    font-weight: 800;
}

.brutal-period {
    padding: 13px 10px;
    border-bottom: 1px solid var(--brutal-line);
}

.brutal-period strong,
.brutal-sync strong {
    display: block;
    margin-top: 7px;
    color: var(--brutal-text);
    font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11px;
}

.brutal-sync strong::before {
    color: var(--brutal-lime);
    content: "+ ";
}

.brutal-nav {
    display: grid;
    padding: 13px 0;
}

.brutal-nav-link {
    display: grid;
    grid-template-columns: 12px 1fr;
    align-items: center;
    gap: 10px;
    min-height: 32px;
    padding: 0 12px;
    color: #6f6f6f;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.brutal-nav-link span {
    width: 7px;
    height: 7px;
    border: 1px solid #585858;
    border-radius: 50%;
}

.brutal-nav-link.is-active,
.brutal-nav-link:hover {
    color: var(--brutal-text);
    background: #1b1b1b;
}

.brutal-nav-link.is-active span {
    border-radius: 1px;
    border-color: var(--brutal-lime);
    background: var(--brutal-lime);
}

.brutal-sync {
    margin-top: auto;
    padding: 12px 10px;
    border-top: 1px solid var(--brutal-line);
}

.brutal-dashboard {
    flex: 1 1 auto;
    width: auto;
    max-width: 1560px;
    min-height: 100vh;
    margin-right: auto;
    margin-left: auto;
    padding: 0 22px 34px;
    background: var(--brutal-bg);
}

.brutal-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 34px;
}

.brutal-topbar h2 {
    margin: 0;
    color: var(--brutal-text);
    font-size: 14px;
    font-weight: 850;
}

.brutal-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--brutal-muted);
    font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 10px;
}

.brutal-meta span strong,
.brutal-meta span {
    color: var(--brutal-lime);
}

.brutal-meta [data-data-source] {
    border: 1px solid var(--brutal-lime);
    border-radius: 2px;
    padding: 5px 8px;
    color: #0b0b0b;
    background: var(--brutal-lime);
    font-weight: 900;
}

.brutal-meta [data-date-range] {
    color: var(--brutal-muted);
}

.date-range-control {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.date-range-control select,
.custom-date-fields input {
    min-height: 26px;
    border: 1px solid var(--brutal-line);
    border-radius: 2px;
    padding: 0 8px;
    color: var(--brutal-text);
    background: #101010;
    font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 10px;
    font-weight: 800;
}

.date-range-control select {
    min-width: 150px;
}

.custom-date-fields {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.custom-date-fields input {
    width: 125px;
}

.custom-date-fields button {
    min-height: 26px;
}

.brutal-meta button,
.brutal-meta a {
    min-height: 24px;
    border: 1px solid var(--brutal-line);
    border-radius: 2px;
    padding: 0 10px;
    color: var(--brutal-text);
    background: #101010;
    font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 10px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.brutal-meta button:hover,
.brutal-meta a:hover {
    border-color: var(--brutal-lime);
    color: var(--brutal-lime);
}

.brutal-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 16px;
}

.brutal-card {
    min-height: 86px;
    border: 1px solid var(--brutal-line);
    border-radius: 2px;
    padding: 13px 14px;
    background: var(--brutal-panel);
}

.brutal-card span {
    display: block;
    color: var(--brutal-muted);
    font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.brutal-card strong {
    display: block;
    margin-top: 9px;
    color: var(--brutal-text);
    font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 26px;
    line-height: 1;
}

.brutal-card em {
    display: block;
    margin-top: 8px;
    color: var(--brutal-lime);
    font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11px;
    font-style: normal;
    font-weight: 800;
}

.brutal-loading {
    grid-column: 1 / -1;
    color: var(--brutal-muted);
    font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.brutal-section {
    margin-top: 28px;
}

.brutal-section[hidden] {
    display: none;
}

.brutal-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.brutal-section-head h3 {
    margin: 7px 0 0;
    color: var(--brutal-text);
    font-size: 14px;
    font-weight: 850;
}

.brutal-section-head p:last-child {
    margin: 0;
    color: var(--brutal-muted);
    font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 10px;
}

.brutal-section-head strong {
    color: var(--brutal-lime);
}

.brutal-dot::before {
    display: inline-block;
    width: 5px;
    height: 5px;
    margin-right: 8px;
    border-radius: 50%;
    background: currentColor;
    vertical-align: middle;
    content: "";
}

.brutal-dot.lime {
    color: var(--brutal-lime);
}

.brutal-dot.red {
    color: var(--brutal-red);
}

.brutal-dot.pink {
    color: #ff3f8f;
}

.brutal-two-col {
    display: grid;
    grid-template-columns: minmax(0, 960px) minmax(360px, 1fr);
    gap: 12px;
}

.brutal-panel {
    min-width: 0;
    border: 1px solid var(--brutal-line);
    border-radius: 2px;
    padding: 16px 14px;
    background: var(--brutal-panel);
}

.brutal-panel-label {
    margin-bottom: 11px;
}

.brutal-panel canvas {
    display: block;
    width: 100%;
    height: auto;
    min-height: 260px;
}

.brutal-table {
    display: grid;
}

.brutal-table-row,
.brutal-list-row {
    display: grid;
    align-items: center;
    min-height: 34px;
    border-bottom: 1px solid var(--brutal-line);
    color: var(--brutal-muted);
    font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11px;
}

.brutal-table-row {
    grid-template-columns: 1fr 70px 70px;
    gap: 10px;
}

.brutal-table-row span,
.brutal-list-row strong {
    overflow: hidden;
    color: var(--brutal-text);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brutal-table-row b,
.brutal-list-row b {
    color: var(--brutal-lime);
    text-align: right;
}

.brutal-table-head span,
.brutal-table-head b {
    color: var(--brutal-muted);
}

.brutal-list-row {
    grid-template-columns: 1fr auto;
    gap: 8px;
    min-height: 48px;
}

.brutal-list-row span,
.brutal-list-row small {
    grid-column: 1 / -1;
    color: var(--brutal-muted);
}

.brutal-list-row small {
    width: fit-content;
    padding: 1px 4px;
    color: var(--brutal-lime);
    background: rgba(198, 255, 0, 0.1);
    font-weight: 900;
}

.instagram-overview[hidden],
.pinterest-overview[hidden],
.brutal-panel canvas[hidden] {
    display: none;
}

.instagram-profile-panel,
.social-profile-panel {
    display: grid;
    grid-template-columns: repeat(5, minmax(110px, 1fr));
    gap: 10px;
    min-height: 260px;
}

.instagram-profile-panel > div,
.social-profile-panel > div {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 112px;
    border: 1px solid var(--brutal-line);
    border-radius: 2px;
    padding: 12px;
    background: #101010;
}

.instagram-profile-panel span,
.instagram-profile-panel em,
.social-profile-panel span,
.social-profile-panel em,
.instagram-permission-note,
.social-permission-note,
.instagram-post-card small,
.instagram-post-card span,
.social-post-card small,
.social-post-card span {
    color: var(--brutal-muted);
    font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 10px;
    font-style: normal;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.instagram-profile-panel strong,
.social-profile-panel strong {
    overflow-wrap: anywhere;
    color: var(--brutal-text);
    font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 17px;
    line-height: 1.15;
}

.instagram-profile-panel em,
.social-profile-panel em {
    color: var(--brutal-lime);
    letter-spacing: 0;
    text-transform: none;
}

.instagram-permission-note,
.social-permission-note {
    margin: 12px 0 0;
    border: 1px solid rgba(198, 255, 0, 0.25);
    border-radius: 2px;
    padding: 10px 12px;
    color: var(--brutal-lime);
    background: rgba(198, 255, 0, 0.06);
    letter-spacing: 0;
    text-transform: none;
}

.instagram-post-grid,
.social-post-grid {
    display: grid;
    gap: 10px;
}

.instagram-post-card,
.social-post-card {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 12px;
    min-height: 92px;
    border-bottom: 1px solid var(--brutal-line);
    padding: 8px 0;
    color: inherit;
    text-decoration: none;
}

.instagram-post-card:hover strong,
.social-post-card:hover strong {
    color: var(--brutal-lime);
}

.instagram-post-thumb,
.social-post-thumb {
    display: grid;
    place-items: center;
    width: 74px;
    height: 74px;
    overflow: hidden;
    border: 1px solid var(--brutal-line);
    border-radius: 2px;
    background: #0d0d0d;
}

.instagram-post-thumb img,
.social-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.instagram-post-thumb.is-empty span,
.social-post-thumb.is-empty span {
    color: var(--brutal-lime);
    font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 10px;
    font-weight: 900;
}

.instagram-post-body,
.social-post-body {
    display: grid;
    align-content: center;
    gap: 5px;
    min-width: 0;
}

.instagram-post-card strong,
.social-post-card strong {
    overflow: hidden;
    color: var(--brutal-text);
    font-size: 12px;
    line-height: 1.35;
    text-overflow: ellipsis;
}

.instagram-post-card span,
.social-post-card span {
    letter-spacing: 0;
    text-transform: none;
}

@media (max-width: 1100px) {
    .brutal-two-col {
        grid-template-columns: 1fr;
    }

    .brutal-kpi-grid {
        grid-template-columns: repeat(2, minmax(150px, 1fr));
    }

    .instagram-profile-panel,
    .social-profile-panel {
        grid-template-columns: repeat(2, minmax(120px, 1fr));
    }
}

@media (max-width: 780px) {
    .brutal-sidebar {
        flex-basis: auto;
        width: 100%;
        height: auto;
    }

    .brutal-dashboard {
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 12px;
    }

    .brutal-topbar,
    .brutal-section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .brutal-meta,
    .date-range-control,
    .custom-date-fields {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .brutal-kpi-grid {
        grid-template-columns: 1fr;
    }
}

/* Print / "Report PDF": keep the dashboard's dark look, hide interactive controls. */
@media print {
    body {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .date-range-control,
    [data-refresh-dashboard],
    [data-print-report],
    [data-export-csv],
    .brutal-meta a,
    .brutal-nav {
        display: none !important;
    }

    .brutal-panel,
    .brutal-card,
    .brutal-section {
        break-inside: avoid;
    }

    .app-shell {
        display: block;
    }

    .brutal-sidebar {
        width: auto;
        border-right: none;
    }
}

/* Marketing Hub (Master PRD 001) */
.brutal-subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 0 0 18px;
    padding: 6px;
    border: 1px solid var(--brutal-line);
    background: var(--brutal-panel-2);
}

.brutal-subnav .brutal-nav-link {
    padding: 8px 12px;
    border-bottom: none;
}

.hub-notice {
    margin: 0 0 16px;
    padding: 10px 14px;
    border: 1px solid var(--brutal-lime);
    color: var(--brutal-lime);
    background: var(--brutal-panel-2);
    font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
}

.hub-empty,
.hub-hint {
    margin: 0;
    padding: 12px 0;
    color: var(--brutal-muted);
    font-size: 13px;
}

.hub-card-link {
    color: var(--brutal-lime);
    text-decoration: none;
}

.hub-card-link:hover {
    text-decoration: underline;
}

.hub-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 0 0 18px;
}

.hub-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border: 1px solid var(--brutal-line);
    color: var(--brutal-text);
    background: var(--brutal-panel-2);
    font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
}

.hub-tab em {
    font-style: normal;
    color: var(--brutal-muted);
}

.hub-tab.is-active {
    color: #0b0b0b;
    background: var(--brutal-lime);
    border-color: var(--brutal-lime);
}

.hub-tab.is-active em {
    color: #0b0b0b;
}

.hub-row {
    display: grid;
    grid-template-columns: minmax(180px, 2fr) repeat(auto-fit, minmax(90px, 1fr));
    gap: 12px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--brutal-line);
    font-size: 13px;
}

.hub-row:last-child {
    border-bottom: none;
}

.hub-row a {
    color: var(--brutal-text);
}

.hub-row a:hover {
    color: var(--brutal-lime);
}

.hub-row-head {
    color: var(--brutal-muted);
    font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hub-status {
    font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.05em;
}

.hub-status-draft { color: var(--brutal-muted); }
.hub-status-scheduled,
.hub-status-queued,
.hub-status-running { color: var(--brutal-orange); }
.hub-status-published,
.hub-status-succeeded,
.hub-status-connected { color: var(--brutal-lime); }
.hub-status-failed,
.hub-status-needs_attention { color: var(--brutal-red); }
.hub-status-archived,
.hub-status-canceled,
.hub-status-disconnected { color: var(--brutal-muted); }

.hub-platform-chips .hub-status { white-space: nowrap; }

.hub-inline-form {
    display: inline;
}

.hub-inline-form button,
.hub-form-actions button,
.hub-button,
.hub-upload-form button {
    padding: 8px 14px;
    border: 1px solid var(--brutal-line);
    color: var(--brutal-text);
    background: var(--brutal-panel-2);
    font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
}

.hub-inline-form button:hover,
.hub-form-actions button:hover,
.hub-button:hover,
.hub-upload-form button:hover {
    color: #0b0b0b;
    background: var(--brutal-lime);
    border-color: var(--brutal-lime);
}

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

.hub-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.hub-form label,
.hub-upload-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--brutal-muted);
    font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hub-form input[type="text"],
.hub-form input[type="datetime-local"],
.hub-form select,
.hub-form textarea,
.hub-report-form select,
.hub-upload-form input[type="file"] {
    padding: 10px 12px;
    border: 1px solid var(--brutal-line);
    color: var(--brutal-text);
    background: var(--brutal-panel-2);
    font-family: Geist, Inter, Arial, sans-serif;
    font-size: 14px;
}

.hub-form textarea {
    resize: vertical;
}

.hub-platforms,
.hub-media-grid {
    margin: 0;
    padding: 12px;
    border: 1px solid var(--brutal-line);
}

.hub-platforms legend,
.hub-media-grid legend {
    padding: 0 6px;
    color: var(--brutal-muted);
    font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hub-platform {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-right: 18px;
    color: var(--brutal-text);
    font-size: 13px;
    text-transform: none;
    letter-spacing: normal;
    font-family: Geist, Inter, Arial, sans-serif;
    font-weight: 500;
    flex-direction: row;
}

.hub-platform em {
    color: var(--brutal-muted);
    font-size: 11px;
}

.hub-platform.is-disabled {
    opacity: 0.55;
}

.hub-media-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hub-media-item {
    position: relative;
    display: inline-flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 6px;
    padding: 6px;
    border: 1px solid var(--brutal-line);
    background: var(--brutal-panel-2);
}

.hub-media-item img {
    width: 96px;
    height: 96px;
    object-fit: cover;
    display: block;
}

.hub-upload-form {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--brutal-line);
}

.hub-editor-side {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hub-side-block form {
    margin-top: 8px;
}

.hub-versions {
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
}

.hub-versions li {
    display: flex;
    gap: 10px;
    align-items: baseline;
    padding: 6px 0;
    border-bottom: 1px solid var(--brutal-line);
    font-size: 12px;
}

.hub-versions li:last-child {
    border-bottom: none;
}

.hub-versions a {
    color: var(--brutal-lime);
    text-decoration: none;
}

.hub-versions em {
    color: var(--brutal-muted);
    font-style: normal;
}

.hub-calendar {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 1px;
    background: var(--brutal-line);
    border: 1px solid var(--brutal-line);
}

.hub-calendar-head {
    padding: 8px;
    color: var(--brutal-muted);
    background: var(--brutal-panel-2);
    font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: center;
}

.hub-calendar-cell {
    min-height: 92px;
    padding: 6px;
    background: var(--brutal-panel);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hub-calendar-cell.is-blank {
    background: var(--brutal-panel-2);
}

.hub-calendar-cell.is-today {
    outline: 1px solid var(--brutal-lime);
    outline-offset: -1px;
}

.hub-calendar-day {
    color: var(--brutal-muted);
    font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 10px;
    font-weight: 800;
}

.hub-calendar-item {
    display: block;
    padding: 3px 6px;
    border: 1px solid var(--brutal-line);
    background: var(--brutal-panel-2);
    font-size: 11px;
    line-height: 1.3;
    text-decoration: none;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.hub-report-grid .brutal-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hub-report-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

@media (max-width: 900px) {
    .hub-editor {
        grid-template-columns: 1fr;
    }

    .hub-row {
        grid-template-columns: 1fr 1fr;
    }

    .hub-calendar-cell {
        min-height: 64px;
    }
}

/* Scheduling center (PRD 004) */
.hub-cal-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 0 0 16px;
}

.hub-cal-filters input[type="search"],
.hub-cal-filters select,
.hub-bulkbar select,
.hub-bulkbar input[type="datetime-local"] {
    padding: 9px 12px;
    border: 1px solid var(--brutal-line);
    color: var(--brutal-text);
    background: var(--brutal-panel-2);
    font-family: Geist, Inter, Arial, sans-serif;
    font-size: 13px;
}

.hub-cal-filters input[type="search"] {
    min-width: 240px;
}

.hub-cal-count {
    color: var(--brutal-muted);
    font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11px;
}

.brutal-meta [data-cal-view].is-active {
    color: #0b0b0b;
    background: var(--brutal-lime);
    border-color: var(--brutal-lime);
}

.hub-cal-item {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 3px 6px;
    border: 1px solid var(--brutal-line);
    background: var(--brutal-panel-2);
    font-size: 11px;
    line-height: 1.3;
    cursor: pointer;
    overflow: hidden;
}

.hub-cal-item[draggable="true"] {
    cursor: grab;
}

.hub-cal-item.is-dragging {
    opacity: 0.4;
}

.hub-cal-item img {
    width: 18px;
    height: 18px;
    object-fit: cover;
    flex: 0 0 18px;
}

.hub-chip-time {
    color: var(--brutal-muted);
    font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 10px;
    flex: 0 0 auto;
}

.hub-chip-icon {
    flex: 0 0 auto;
    font-style: normal;
    font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 9px;
    font-weight: 800;
    padding: 1px 3px;
    border: 1px solid var(--brutal-line);
    color: var(--brutal-muted);
}

.hub-chip-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hub-cal-item.hub-status-scheduled { border-left: 3px solid var(--brutal-orange); }
.hub-cal-item.hub-status-published { border-left: 3px solid var(--brutal-lime); }
.hub-cal-item.hub-status-failed { border-left: 3px solid var(--brutal-red); }
.hub-cal-item.hub-status-draft { border-left: 3px solid var(--brutal-muted); }

.hub-calendar-cell.is-droptarget,
.hub-week-cell.is-droptarget {
    outline: 1px dashed var(--brutal-lime);
    outline-offset: -2px;
    background: #101408;
}

.hub-cal-more {
    border: none;
    background: none;
    color: var(--brutal-lime);
    font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 10px;
    text-align: left;
    padding: 2px 0 0;
    cursor: pointer;
}

/* Weekly timeline */
.hub-cal-week {
    border: 1px solid var(--brutal-line);
    max-height: 70vh;
    overflow-y: auto;
}

.hub-week-headrow,
.hub-week-row {
    display: grid;
    grid-template-columns: 56px repeat(7, minmax(0, 1fr));
    gap: 1px;
    background: var(--brutal-line);
}

.hub-week-headrow {
    position: sticky;
    top: 0;
    z-index: 2;
}

.hub-week-headrow .hub-calendar-head.is-today {
    color: var(--brutal-lime);
}

.hub-week-hourcol {
    padding: 6px 4px;
    color: var(--brutal-muted);
    background: var(--brutal-panel-2);
    font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 10px;
    text-align: right;
}

.hub-week-cell {
    min-height: 30px;
    padding: 2px;
    background: var(--brutal-panel);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Detail panel */
.hub-detail-overlay[hidden],
.hub-toast[hidden] {
    display: none;
}

.hub-detail-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 60;
    display: flex;
    justify-content: flex-end;
}

.hub-detail-panel {
    width: min(420px, 92vw);
    height: 100%;
    overflow-y: auto;
    padding: 20px;
    background: var(--brutal-panel);
    border-left: 1px solid var(--brutal-line);
    position: relative;
}

.hub-detail-panel h3 {
    margin: 10px 0 4px;
    color: #f1f1f1;
}

.hub-panel-close {
    position: absolute;
    top: 10px;
    right: 12px;
    border: 1px solid var(--brutal-line);
    background: var(--brutal-panel-2);
    color: var(--brutal-text);
    font-size: 16px;
    line-height: 1;
    padding: 4px 9px;
    cursor: pointer;
}

.hub-panel-image {
    width: 100%;
    max-height: 260px;
    object-fit: cover;
    border: 1px solid var(--brutal-line);
}

.hub-panel-meta {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 12px;
    margin: 12px 0;
    font-size: 12px;
}

.hub-panel-meta dt {
    color: var(--brutal-muted);
    font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    align-self: baseline;
}

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

.hub-panel-body {
    font-size: 13px;
    color: var(--brutal-text);
    white-space: pre-wrap;
    border-top: 1px solid var(--brutal-line);
    padding-top: 10px;
}

.hub-panel-jobs {
    list-style: none;
    margin: 6px 0 0;
    padding: 0;
    font-size: 12px;
}

.hub-panel-jobs li {
    padding: 6px 0;
    border-bottom: 1px solid var(--brutal-line);
}

.hub-panel-error {
    display: block;
    color: var(--brutal-red);
    font-style: normal;
    font-size: 11px;
}

.hub-panel-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--brutal-line);
}

.hub-button-danger:hover {
    background: var(--brutal-red);
    border-color: var(--brutal-red);
    color: #0b0b0b;
}

/* Toast */
.hub-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 80;
    padding: 10px 18px;
    border: 1px solid var(--brutal-lime);
    background: #101408;
    color: var(--brutal-lime);
    font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
}

/* Queue dashboard + library additions */
.hub-pagination {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 14px;
    color: var(--brutal-muted);
    font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11px;
}

.hub-pagination a {
    color: var(--brutal-lime);
    text-decoration: none;
}

.hub-bulkbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 0 0 12px;
}

@media (max-width: 900px) {
    .hub-week-headrow,
    .hub-week-row {
        grid-template-columns: 40px repeat(7, minmax(0, 1fr));
    }

    .hub-chip-title {
        display: none;
    }
}

/* Instagram analytics (PRD 006) */
.ig-media-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.ig-media-cell img {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border: 1px solid var(--brutal-line);
    flex: 0 0 36px;
}

.brutal-meta form select {
    padding: 7px 10px;
    border: 1px solid var(--brutal-line);
    color: var(--brutal-text);
    background: var(--brutal-panel-2);
    font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11px;
}

@media (max-width: 900px) {
    .brutal-dashboard .hub-row {
        overflow-x: auto;
    }
}

/* Google Business Profile composer preview (PRD 007) */
.gbp-preview {
    margin-top: 10px;
}

.gbp-preview-card {
    margin-top: 6px;
    padding: 12px 14px;
    border: 1px solid var(--brutal-line);
    background: var(--brutal-panel-2);
    max-width: 360px;
}

.gbp-preview-card strong {
    display: block;
    color: #f1f1f1;
    font-size: 13px;
}

.gbp-preview-card em {
    display: block;
    color: var(--brutal-lime);
    font-style: normal;
    font-size: 12px;
    margin-top: 2px;
}

.gbp-preview-card p {
    margin: 6px 0;
    font-size: 12px;
    color: var(--brutal-text);
}

.gbp-preview-cta {
    display: inline-block;
    padding: 4px 10px;
    border: 1px solid var(--brutal-lime);
    color: var(--brutal-lime);
    font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}
