:root {
    --primary: #221a36;
    --primary-hover: #3b2b58;
    --accent: #ff7b54;
    --bg: #faf7f6;
    --surface: #ffffff;
    --text-main: #111827;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --error: #dc2626;
    --success: #16a34a;
    --radius: 0.375rem;
    --font: system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font);
    background-color: var(--bg);
    color: var(--text-main);
    line-height: 1.5;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

header {
    background-color: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.brand { display: inline-flex; align-items: center; flex-shrink: 0; }
.brand img { display: block; width: 190px; height: auto; }

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.card {
    background-color: var(--surface);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.btn {
    display: inline-block;
    background-color: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.875rem;
}
.btn:hover { background-color: var(--primary-hover); text-decoration: none; }

.btn-secondary { background-color: var(--surface); color: var(--text-main); border: 1px solid var(--border); }
.btn-secondary:hover { background-color: var(--bg); }

.btn-danger { background-color: var(--error); }
.btn-danger:hover { background-color: #b91c1c; }

.table-responsive { overflow-x: auto; }
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}
th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
th { background-color: var(--bg); font-weight: 600; }

.form-group { margin-bottom: 1rem; }
.form-label { display: block; margin-bottom: 0.5rem; font-weight: 500; }
.form-control {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
}
.form-control:focus { outline: 2px solid var(--primary); }

.error-text { color: var(--error); font-size: 0.875rem; margin-top: 0.25rem; }
.turnstile-status { margin-top: .5rem; color: var(--text-muted); font-size: .8rem; }
.alert-success { background-color: #dcfce7; color: var(--success); padding: 1rem; border-radius: var(--radius); margin-bottom: 1rem; }

.badge {
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
}
.badge-blue { background-color: #dbeafe; color: #1e40af; }
.badge-green { background-color: #dcfce7; color: #166534; }
.badge-gray { background-color: #f3f4f6; color: #374151; }

.metric-value { font-size: 2rem; font-weight: 700; color: var(--primary); }
.metric-label { font-size: 0.875rem; color: var(--text-muted); }

.mb-4 { margin-bottom: 1rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-4 { margin-top: 1rem; }
.flex { display: flex; }
.justify-between { justify-content: space-between; }
.items-center { align-items: center; }
.gap-2 { gap: 0.5rem; }

/* Product workspace */
.app-body { background: #faf8f7; }
.app-header { background: #221a36; border: 0; padding: 0; margin: 0 0 40px; }
.app-header .nav { min-height: 76px; gap: 30px; }
.app-header .brand { color: #fff; gap: 7px; }
.app-header .brand:hover { text-decoration: none; }
.app-brand-icon { width: 36px !important; height: 36px !important; }
.app-brand-text { color: #fff; font-size: 1.55rem; font-weight: 780; letter-spacing: -.06em; }
.app-brand-text span { color: #ff7b54; }
.app-header .nav-links { gap: 26px; margin-right: auto; }
.app-header .nav-links a { color: #eee7f1; font-size: .92rem; font-weight: 580; padding: 27px 3px 23px; border-bottom: 3px solid transparent; }
.app-header .nav-links a:hover, .app-header .nav-links a[aria-current=page] { color: #ff8b68; border-bottom-color: #ff7b54; text-decoration: none; }
.account-actions { display: flex; align-items: center; gap: 18px; }
.account-name { color: #f3eefa; max-width: 135px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .86rem; }
.app-header .account-actions .btn { color: #fff; background: transparent; border: 1px solid #8d829c; }
.app-header .account-actions .btn:hover { background: #3a2b51; }
.auth-header { padding: 7px 0; }
.auth-header-link { color: #594c68; font-size: .86rem; }
.auth-body .app-main .card { border: 1px solid #eee7e4; box-shadow: 0 20px 50px rgba(34,26,54,.06); padding: 2rem; border-radius: 12px; }
.auth-body .app-main h1 { font-size: 1.8rem; letter-spacing: -.04em; }
.auth-body .app-main .btn:not(.btn-secondary) { background: #ce4424; font-weight: 700; padding: .78rem 1.2rem; }
.app-main { min-height: calc(100vh - 250px); }
.app-main > .flex:first-child h1 { font-size: clamp(1.8rem, 3vw, 2.5rem); letter-spacing: -.045em; }
.app-main .card { border: 1px solid #efe8e6; border-radius: 12px; box-shadow: 0 10px 26px rgba(34,26,54,.035); }
.app-main h2, .app-main h3 { letter-spacing: -.025em; }
.app-main .btn { border-radius: 8px; font-weight: 650; padding: .62rem .9rem; }
.app-main .btn-accent { background: #ce4424; color: #fff; }
.app-main .btn-accent:hover { background: #b5351a; }
.app-main .btn-secondary { background: #fff; color: #221a36; }
.app-main .btn-secondary:hover { background: #fff5f1; }
.app-main .form-control { border-color: #dcd5dc; border-radius: 8px; padding: .65rem .8rem; font-size: .93rem; }
.app-main .form-control:focus { outline: 2px solid #ff9b7f; outline-offset: 1px; }
.app-main th { background: #fbf7f5; color: #60566e; font-size: .77rem; text-transform: uppercase; letter-spacing: .06em; }
.app-main td { font-size: .9rem; }
.app-main .badge-blue { background: #f0e9fb; color: #5b3c91; }
.app-main .badge-gray { background: #f6f2ef; color: #6a5c62; }
.app-main .badge-green { background: #e5f6ed; color: #17683c; }
.workspace-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 25px; }
.workspace-heading h1 { font-size: clamp(2.3rem, 4vw, 3.4rem); line-height: 1.08; letter-spacing: -.055em; }
.workspace-heading p { color: #675d70; margin-top: 8px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 24px; }
.metric-card { min-height: 145px; padding: 26px; background: #fff; border: 1px solid #efe8e6; border-radius: 12px; display: flex; align-items: start; gap: 16px; box-shadow: 0 10px 26px rgba(34,26,54,.035); }
.metric-icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 55px; height: 55px; color: #f26b48; background: #fff0e9; border-radius: 12px; font-size: 1.75rem; }
.metric-card .metric-label { font-size: .86rem; color: #5b4f65; }
.metric-card .metric-value { font-size: 2rem; color: #221a36; margin-top: 7px; line-height: 1.1; }
.workspace-columns { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(250px, .9fr); gap: 22px; }
.workspace-columns .card { min-width: 0; margin: 0; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.section-heading h2 { font-size: 1.35rem; }
.section-heading a { color: #a6361c; font-size: .85rem; font-weight: 650; }
.workspace-table table { margin-top: 20px; }
.workspace-table .table-primary-link { color: #221a36; font-weight: 650; }
.workspace-table td a:not(.table-primary-link) { color: #a6361c; }
.table-empty { padding: 30px 10px; text-align: center; }
.table-empty p { color: #6a6171; margin: 5px 0 15px; }
.top-links-list { list-style: none; margin-top: 20px; }
.top-links-list li { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid #eee9e7; padding: 16px 0; font-size: .86rem; }
.top-links-list li:last-child { border-bottom: 0; }
.top-links-list .rank { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; background: #fff0e9; color: #e26343; border-radius: 50%; width: 30px; height: 30px; font-weight: 700; }
.top-links-list a { color: #221a36; font-weight: 600; flex: 1; }
.top-clicks { color: #756b7c; font-size: .78rem; white-space: nowrap; }
.top-empty { color: #756b7c; }
.workspace-sponsor { display: flex; justify-content: space-between; align-items: center; gap: 28px; margin-top: 22px; padding: 25px 34px; border-radius: 12px; background: linear-gradient(105deg, #fff0e9, #fff8f5); border: 1px solid #f4dfd5; }
.workspace-sponsor-label { display: block; text-transform: uppercase; letter-spacing: .18em; font-size: .65rem; font-weight: 750; color: #6d5360; margin-bottom: 7px; }
.workspace-sponsor h2 { font-size: 1.35rem; }
.workspace-sponsor p { color: #635a6b; margin-top: 4px; font-size: .86rem; }
.workspace-sponsor .btn { flex-shrink: 0; }
.partnerships { color: #221a36; }
.partnerships-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px 32px; margin-bottom: 22px; }
.partnerships-heading h2 { font-size: clamp(1.5rem, 2.5vw, 2rem); letter-spacing: -.04em; line-height: 1.2; }
.partnerships-heading .accent-dot { color: #ff7150; }
.partnerships-heading > p { color: #675d70; font-size: .88rem; }
.partnerships-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.partnership-placement { display: flex; flex-direction: column; min-width: 0; min-height: 258px; padding: 25px; background: #fff; border: 1px solid #e9e0df; border-radius: 12px; }
.partnership-placement-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; }
.partnership-ad-label { font-size: .6rem; font-weight: 750; letter-spacing: .13em; text-transform: uppercase; }
.partnership-availability { color: #756a79; font-size: .72rem; }
.partnership-placement-copy { padding-block: 28px 25px; }
.partnership-brand { display: flex; align-items: center; min-height: 50px; margin-bottom: 20px; }
.partnership-brand img { display: block; width: 165px; max-width: 100%; height: auto; }
.partnership-brand-moments img { width: 220px; height: 112px; object-fit: cover; border-radius: 6px; }
.partnership-placement-copy h3 { font-size: 1.45rem; font-weight: 700; letter-spacing: -.035em; line-height: 1.2; }
.partnership-placement-copy p { max-width: 34ch; margin-top: 12px; color: #675d70; font-size: .88rem; line-height: 1.65; }
.partnership-note { display: block; margin-top: 14px; color: #675d70; font-size: .73rem; line-height: 1.5; }
.partnership-profile { display: inline-block; margin-top: 10px; color: #a6361c; font-size: .78rem; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.partnership-link { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: auto; padding-top: 15px; border-top: 1px solid #e9e0df; color: #a6361c; font-size: .85rem; font-weight: 700; }
.partnership-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.partnership-link svg { width: 20px; height: 20px; flex-shrink: 0; }
.partnership-placement-1 { color: #fff; background: #221a36; border-color: #221a36; }
.partnership-placement-1 .partnership-ad-label, .partnership-placement-1 .partnership-link { color: #ffa589; }
.partnership-placement-1 .partnership-availability, .partnership-placement-1 .partnership-placement-copy p, .partnership-placement-1 .partnership-note { color: #ddd2e5; }
.partnership-placement-1 .partnership-link { border-color: #4b3f5b; }
.partnership-placement-1 .partnership-link:focus-visible { outline-color: #ffa589; }
.partnership-placement-3 { background: #fff1eb; border-color: #f2ded5; }
.partnership-placement-3 .partnership-link { border-color: #ebd4c8; }
.partnerships-workspace { margin-top: 32px; }
.app-footer { display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid #eee7e4; padding-block: 27px 42px; margin-top: 50px; color: #746b7b; font-size: .84rem; }
.app-footer nav { display: flex; gap: 22px; }
.app-footer a { color: #62576d; }
@media (max-width: 980px) { .app-header .nav { padding-block: 12px; } .app-header .nav-links { order: 3; width: 100%; } .app-header .nav-links a { padding-block: 12px; } .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .workspace-columns { grid-template-columns: 1fr; } }
@media (max-width: 610px) { .app-header { margin-bottom: 25px; } .app-header .nav-links { gap: 18px; overflow-x: auto; flex-wrap: nowrap; } .app-header .nav-links a { white-space: nowrap; } .account-name { display: none; } .workspace-heading { align-items: start; flex-direction: column; } .metric-grid { gap: 10px; } .metric-card { min-height: 125px; padding: 14px; flex-direction: column; gap: 8px; } .metric-icon { width: 35px; height: 35px; font-size: 1.2rem; } .metric-card .metric-value { font-size: 1.7rem; } .app-main > .flex:first-child { align-items: flex-start; flex-wrap: wrap; gap: 10px; } .app-main .form-control { min-width: 0; } .workspace-sponsor { align-items: flex-start; flex-direction: column; } .app-footer { flex-direction: column; } }
@media (max-width: 820px) { .app-main .grid-3 { grid-template-columns: 1fr; } .app-main .grid-3 > [style*="grid-column"] { grid-column: auto !important; } .app-main form.flex { flex-wrap: wrap; } }
@media (max-width: 760px) { .partnerships-heading { flex-direction: column; gap: 9px; } .partnerships-grid { grid-template-columns: 1fr; gap: 16px; } .partnership-placement { min-height: 230px; } }
.form-actions { display: flex; justify-content: flex-end; gap: 12px; padding: 4px 0 30px; }
.app-main fieldset { border: 0; margin: 0; padding: 0; }
.app-main fieldset[hidden] { display: none; }
.app-main fieldset[data-qr-type] { padding-top: 4px; }
.qr-create-form { max-width: 760px; margin-inline: auto; padding: 2rem; }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid #ce4424; outline-offset: 3px; }
