:root {
    color-scheme: light;
    --bg: #edf3f7;
    --panel: #ffffff;
    --line: #d8e2eb;
    --text: #112033;
    --muted: #5d6b79;
    --brand: #123a56;
    --brand-2: #1f6ea3;
    --success: #e7f7ee;
    --success-text: #17643f;
    --danger: #fff1ef;
    --danger-text: #9a2d20;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
}
a { color: var(--brand-2); text-decoration: none; }
h1, h2, h3, p { margin-top: 0; }
label { display: block; font-weight: 700; margin-bottom: 8px; }
input, textarea, select {
    width: 100%;
    border: 1px solid #c9d6e0;
    border-radius: 14px;
    padding: 12px 14px;
    font: inherit;
    background: #fff;
}
textarea { resize: vertical; }
.eyebrow {
    display: inline-block;
    font-size: 12px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: #7ca9c9;
    font-weight: 700;
}
.muted { color: var(--muted); }
.small-text { font-size: 13px; }
.stack > * + * { margin-top: 16px; }
.button-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.button {
    border: 0;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    padding: 13px 20px;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}
.button-secondary {
    background: #dde8f0;
    color: var(--text);
}
.button-danger {
    background: #b42318;
    color: #fff;
}
.compact-button {
    padding: 10px 14px;
    font-size: 13px;
}
.inline-form {
    margin: 0;
}
.alert {
    border-radius: 18px;
    padding: 14px 16px;
    margin-bottom: 18px;
}
.alert-success {
    background: var(--success);
    color: var(--success-text);
    border: 1px solid #bfe2cc;
}
.alert-error {
    background: var(--danger);
    color: var(--danger-text);
    border: 1px solid #efc5bf;
}
.install-body {
    background: linear-gradient(160deg, #0d1f31 0%, #16415d 42%, var(--bg) 42%, var(--bg) 100%);
}
.install-shell, .portal-shell {
    max-width: 1180px;
    margin: 0 auto;
    padding: 40px 24px 60px;
}
.install-hero {
    color: #fff;
    margin-bottom: 28px;
}
.install-hero p { max-width: 760px; line-height: 1.7; color: #d6e5ef; }
.install-grid, .content-grid, .preview-grid {
    display: grid;
    gap: 22px;
}
.install-grid { grid-template-columns: 340px 1fr; }
.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 18px 36px rgba(17, 32, 51, 0.08);
}
.requirement-row, .list-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e8eef3;
}
.requirement-row:last-child, .list-row:last-child { border-bottom: 0; }
.status-ok { color: #18794e; font-weight: 700; }
.status-bad { color: #b42318; font-weight: 700; }
.section-label {
    margin: 0 0 14px;
    font-size: 13px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #597083;
}
.form-grid {
    display: grid;
    gap: 16px;
}
.full-span { grid-column: 1 / -1; }
.login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: radial-gradient(circle at top, #d7ebf6 0%, var(--bg) 55%);
}
.login-card {
    width: min(460px, 100%);
    background: #fff;
    border-radius: 28px;
    padding: 32px;
    border: 1px solid var(--line);
    box-shadow: 0 24px 52px rgba(17, 32, 51, 0.12);
}
.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px 1fr;
}
.sidebar {
    background: #fff;
    border-right: 1px solid var(--line);
    padding: 24px;
}
.brand-card {
    background: linear-gradient(135deg, #102234, #1b4764);
    color: #fff;
    border-radius: 26px;
    padding: 22px;
    margin-bottom: 24px;
}
.brand-card p { color: #d5e3ef; line-height: 1.6; margin-bottom: 0; }
.nav-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-radius: 14px;
    color: #516274;
    font-weight: 700;
    margin-bottom: 6px;
}
.nav-badge {
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #d92d20;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}
.nav-list a.active, .nav-list a:hover {
    background: #eef5fa;
    color: var(--text);
}
.main-content { padding: 30px; }
.page-header { margin-bottom: 24px; }
.page-header h2 { margin-bottom: 8px; font-size: 34px; }
.section-header {
    margin-bottom: 18px;
}
.split-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    flex-wrap: wrap;
}
.stats-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 22px;
}
.big-stat { font-size: 36px; font-weight: 800; margin-top: 10px; }
.pill, .cta-chip {
    display: inline-block;
    border-radius: 999px;
    background: #e6f2fb;
    color: var(--brand-2);
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 700;
}
.calendar-card {
    padding: 18px;
    border-radius: 18px;
    background: #f8fbfd;
    border: 1px solid #dce7ef;
}
.calendar-card-post {
    background: #f4fbf7;
    border-color: #cfe7d8;
}
.calendar-card-event {
    background: #f8fbfd;
    border-color: #dce7ef;
}
.calendar-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}
.calendar-filter {
    min-width: 280px;
}
.calendar-filter label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 700;
}
.calendar-filter-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.calendar-filter-row select {
    min-width: 220px;
}
.calendar-summary-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 18px 0;
}
.calendar-day-stack {
    display: grid;
    gap: 20px;
}
.calendar-day-group {
    padding-top: 4px;
}
.calendar-day-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.calendar-day-heading h4 {
    margin: 0;
}
.calendar-post-body {
    display: grid;
    grid-template-columns: 108px 1fr;
    gap: 14px;
    align-items: start;
    margin-top: 14px;
}
.calendar-post-thumb {
    width: 108px;
    aspect-ratio: 4 / 5;
    border-radius: 14px;
    overflow: hidden;
    background: #eaf1f5;
    border: 1px solid #dce7ef;
}
.calendar-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.calendar-post-meta {
    display: grid;
    gap: 10px;
}
.calendar-channel-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.calendar-channel-chip {
    display: inline-flex;
    align-items: center;
    padding: 7px 10px;
    border-radius: 999px;
    background: #eff5ff;
    color: #204c78;
    font-size: 12px;
    font-weight: 700;
}
.library-card {
    padding: 18px;
    border-radius: 18px;
    border: 1px solid #dce7ef;
    background: #fbfdff;
    display: grid;
    gap: 12px;
}
.library-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
}
.analytics-metric-grid {
    display: grid;
    gap: 18px;
}
.analytics-metric-card {
    padding: 18px;
    border-radius: 18px;
    border: 1px solid #dce7ef;
    background: #fbfdff;
}
.analytics-metric-card h5 {
    margin-top: 0;
    margin-bottom: 14px;
}
.analytics-inline-stat {
    display: inline-block;
    margin-right: 12px;
    margin-bottom: 6px;
}
.proposal-idea-note {
    padding: 10px 12px;
    border-radius: 12px;
    background: #eef5fb;
    color: #39556f;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 12px;
}
.proposal-idea-note-outside {
    margin-top: 10px;
    margin-bottom: 0;
}
.media-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.media-card {
    border: 1px solid #dce7ef;
    border-radius: 22px;
    background: #fbfdff;
    overflow: hidden;
}
.media-thumb {
    background: #eef5fa;
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.media-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.media-card .stack {
    padding: 18px;
}
.small-placeholder {
    min-height: 100%;
    width: 100%;
    font-size: 14px;
}
.table-wrap { overflow-x: auto; }
.data-table {
    width: 100%;
    border-collapse: collapse;
}
.data-table th, .data-table td {
    text-align: left;
    padding: 14px;
    border-bottom: 1px solid #e8eef3;
}
.data-table th { color: #5f7281; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.simple-list { margin: 0; padding-left: 18px; }
.portal-body { background: linear-gradient(180deg, #eff6fb, #edf3f7); }
.preview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 22px; }
.proposal-preview-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.device-frame {
    background: #0f1821;
    border-radius: 34px;
    padding: 12px;
    box-shadow: 0 24px 44px rgba(17, 32, 51, 0.18);
}
.device-screen {
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    min-height: 620px;
}
.channel-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px 8px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #6b7280;
}
.channel-top-actions {
    display: flex;
    gap: 6px;
}
.channel-top-actions span {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #c9d6e0;
    display: inline-block;
}
.channel-header {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px 16px 16px;
    border-bottom: 1px solid #ebeff3;
}
.channel-header-facebook { background: linear-gradient(180deg, #f8fbff, #ffffff); }
.channel-header-linkedin { background: linear-gradient(180deg, #f3f8fd, #ffffff); }
.channel-header-x { background: linear-gradient(180deg, #f8fafc, #ffffff); }
.channel-header-tiktok { background: linear-gradient(180deg, #fcfcfd, #ffffff); }
.avatar {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: linear-gradient(135deg, #f58220, #9333ea);
    overflow: hidden;
}
.channel-identity {
    min-width: 0;
    flex: 1;
}
.channel-name-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}
.verified-badge {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #1d9bf0;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
}
.header-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 8px;
    background: #eef5fa;
    color: #34556e;
    font-size: 11px;
    font-weight: 700;
}
.channel-subline {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #6b7280;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dot-sep { color: #a7b4c0; }
.channel-header-menu {
    color: #7b8794;
    font-weight: 800;
    letter-spacing: .15em;
}
.avatar img,
.client-profile-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.client-profile-preview {
    width: 82px;
    height: 82px;
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid #d7e2eb;
    background: #f4f8fb;
}
.media-placeholder {
    min-height: 280px;
    display: grid;
    place-items: center;
    font-weight: 800;
    color: #23425d;
    background: linear-gradient(135deg, #dbeafe, #fce7f3);
}
.media-preview {
    min-height: 280px;
    background: #e7eef4;
    position: relative;
}
.media-preview img,
.content-image-preview img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}
.content-image-preview {
    max-width: 420px;
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid #d7e2eb;
    background: #fff;
}
.channel-media-section {
    margin-top: 6px;
    padding-top: 6px;
}
.proposal-grid,
.proposal-choice-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 16px;
}
.proposal-actions {
    margin-top: 14px;
}
.proposal-card,
.proposal-choice-card {
    border: 1px solid #d9e4ed;
    border-radius: 20px;
    padding: 18px;
    background: #f9fbfd;
}
.proposal-card-hidden {
    display: none;
}
.proposal-card h5 {
    margin: 0 0 8px;
    font-size: 17px;
}
.proposal-channel-media-section {
    border-top: 1px solid #dfe8ef;
    padding-top: 14px;
}
.proposal-choice-card {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    cursor: pointer;
}
.proposal-choice-card input {
    width: auto;
    margin-top: 4px;
    flex: 0 0 auto;
}
.proposal-choice-content {
    min-width: 0;
    flex: 1;
}
.proposal-choice-title {
    margin: 8px 0 6px;
    font-size: 18px;
    color: #0f172a;
}
.proposal-preview-option {
    display: block;
    color: inherit;
}
.proposal-preview-kicker {
    display: inline-block;
    margin-bottom: 10px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #6b7f91;
}
.proposal-preview-kicker-outside {
    margin-bottom: 0;
}
.proposal-preview-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.proposal-preview-select {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid #d7e2eb;
    border-radius: 16px;
    background: #fff;
    font-weight: 700;
    color: #223549;
}
.proposal-preview-select.is-selected {
    border-color: #86b5d8;
    background: #eef6fc;
}
.proposal-preview-select input {
    width: auto;
    margin: 0;
    flex: 0 0 auto;
}
.header-chip-outside {
    background: #eef5fa;
    color: #34556e;
}
.proposal-image-preview,
.proposal-choice-image {
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid #d7e2eb;
    background: #fff;
}
.proposal-image-preview img,
.proposal-choice-image img {
    display: block;
    width: 100%;
    height: 180px;
    object-fit: cover;
}
.channel-media-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 16px;
}
.channel-media-card {
    border: 1px solid #d9e4ed;
    border-radius: 20px;
    padding: 18px;
    background: #f9fbfd;
}
.channel-media-card h5 {
    margin: 0 0 8px;
    font-size: 17px;
}
.channel-media-preview {
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid #d7e2eb;
    background: #fff;
}
.channel-media-preview img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}
.inline-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-weight: 600;
    color: #33475b;
    line-height: 1.45;
}
.inline-check input {
    width: auto;
    margin-top: 3px;
    flex: 0 0 auto;
}
.channel-instagram .media-placeholder { background: linear-gradient(135deg, #fbcfe8, #ddd6fe); }
.channel-facebook .media-placeholder { background: linear-gradient(135deg, #dbeafe, #bfdbfe); }
.channel-linkedin .media-placeholder { background: linear-gradient(135deg, #cfe8ff, #e0f2fe); }
.channel-x .media-placeholder { background: linear-gradient(135deg, #e5e7eb, #cbd5e1); }
.channel-tiktok .media-placeholder { background: linear-gradient(135deg, #d1fae5, #e9d5ff); }
.channel-instagram .media-preview,
.channel-instagram .media-placeholder {
    min-height: 0;
    aspect-ratio: 4 / 5;
}
.channel-facebook .media-preview,
.channel-facebook .media-placeholder {
    min-height: 0;
    aspect-ratio: 4 / 5;
}
.channel-linkedin .media-preview,
.channel-linkedin .media-placeholder {
    min-height: 0;
    aspect-ratio: 1.91 / 1;
}
.channel-x .media-preview,
.channel-x .media-placeholder {
    min-height: 0;
    aspect-ratio: 16 / 9;
}
.channel-tiktok .media-preview,
.channel-tiktok .media-placeholder {
    min-height: 0;
    aspect-ratio: 9 / 16;
}
.channel-body { padding: 18px; }
.channel-body-before-media {
    padding-bottom: 14px;
}
.channel-metric-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    padding: 12px 16px 10px;
    border-bottom: 1px solid #eef2f6;
    color: #425466;
    font-size: 12px;
    font-weight: 700;
}
.channel-actionbar {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 8px;
    padding: 10px 16px 14px;
    border-bottom: 1px solid #eef2f6;
    color: #34495e;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}
.channel-actionbar span {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 34px;
    border-radius: 999px;
    background: #f3f7fa;
}
.channel-actionbar-linkedin span {
    background: #f3f8fd;
}
.channel-actionbar-facebook span {
    background: #f4f7ff;
}
.channel-actionbar-x span {
    background: #f5f7fa;
}
.channel-actionbar-tiktok {
    padding-top: 14px;
}
.channel-actionbar-tiktok span {
    background: #18181b;
    color: #fff;
}
.tiktok-side-rail {
    position: absolute;
    right: 12px;
    bottom: 14px;
    display: grid;
    gap: 12px;
    justify-items: center;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}
.tiktok-side-rail span {
    width: 44px;
    min-height: 44px;
    padding: 8px 4px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(6px);
}
.channel-title {
    margin: 0 0 10px;
    color: #0f172a;
    font-weight: 600;
}
.channel-caption {
    margin: 0;
    color: #1f2937;
    white-space: pre-line;
    font-weight: 400;
}
.tag-text {
    color: var(--brand-2);
    margin-top: 12px;
    font-size: 14px;
}
.channel-tags {
    margin-top: 14px;
}
.channel-cta {
    margin-top: 16px;
}
.channel-instagram .channel-app-name { color: #c13584; }
.channel-facebook .channel-app-name { color: #1877f2; }
.channel-linkedin .channel-app-name { color: #0a66c2; }
.channel-x .channel-app-name { color: #111827; }
.channel-tiktok .channel-app-name { color: #111827; }
.channel-instagram .verified-badge { background: #4f46e5; }
.channel-facebook .verified-badge { background: #1877f2; }
.channel-linkedin .verified-badge { background: #0a66c2; }
.channel-x .verified-badge { background: #111827; }
.channel-tiktok .verified-badge { background: #111827; }
.channel-body-instagram .channel-title {
    font-size: 16px;
    font-weight: 600;
}
.channel-body-instagram .channel-caption {
    font-size: 14px;
    line-height: 1.65;
    color: #111827;
}
.channel-body-instagram {
    padding-top: 14px;
}
.channel-body-instagram .channel-tags {
    font-size: 13px;
    color: #1d4ed8;
}
.channel-body-facebook .channel-title {
    font-size: 15px;
    font-weight: 600;
}
.channel-body-facebook .channel-caption {
    font-size: 15px;
    line-height: 1.65;
    color: #1f2937;
}
.channel-body-facebook {
    padding-top: 14px;
}
.channel-body-facebook .channel-cta {
    background: #e7f0ff;
    color: #1857b6;
}
.channel-body-linkedin .channel-title {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0;
}
.channel-body-linkedin .channel-caption {
    font-size: 15px;
    line-height: 1.65;
    color: #334155;
}
.channel-body-linkedin {
    padding-top: 14px;
}
.channel-body-linkedin .channel-tags {
    color: #0a66c2;
    font-weight: 700;
}
.channel-body-x .channel-title {
    font-size: 15px;
    font-weight: 600;
}
.channel-body-x .channel-caption {
    font-size: 15px;
    line-height: 1.55;
    color: #0f172a;
}
.channel-body-x {
    padding-top: 14px;
}
.channel-body-x .channel-tags {
    color: #1d9bf0;
}
.channel-body-x .channel-cta {
    background: #eff6ff;
    color: #0f172a;
}
.channel-body-tiktok .channel-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.15;
    text-transform: none;
}
.channel-body-tiktok .channel-caption {
    font-size: 14px;
    line-height: 1.6;
    color: #111827;
}
.channel-body-tiktok {
    padding-top: 16px;
    background: linear-gradient(180deg, #ffffff, #fafafa);
}
.channel-body-tiktok .channel-tags {
    color: #111827;
    font-weight: 700;
}
.channel-body-tiktok .channel-cta {
    background: #111827;
    color: #fff;
}

@media (max-width: 1100px) {
    .install-grid, .app-shell, .two-columns, .stats-grid, .preview-grid, .proposal-preview-grid, .media-grid, .channel-media-grid, .proposal-grid, .proposal-choice-grid {
        grid-template-columns: 1fr;
    }
}
