/* Corka for Partners: navy and raspberry, as on the public site (site/site.css). Desktop first. */
:root {
    --navy: #1E2447;
    --navy-2: #272E58;
    --on-navy: #FFFFFF;
    --on-navy-sub: rgba(255, 255, 255, .72);
    --bg: #F3F2F7;
    --card: #FFFFFF;
    --fill: #ECEBF3;
    --line: #E3E2EC;
    --text: #1B2042;
    --sub: #5C6080;
    --pink: #E23D6D;
    --pink-hover: #CF2E5E;
    --pink-tint: #FDE8EE;
    --green: #23824A;
    --green-tint: #E3F5E9;
    --blue: #2D63C8;
    --blue-tint: #E3ECFB;
    --orange: #A9560B;
    --orange-tint: #FFF0DF;
    --danger: #D12A3A;
    --shadow: 0 1px 2px rgba(30, 36, 71, .05), 0 4px 16px rgba(30, 36, 71, .05);
    --serif: "Playfair Display", Georgia, "Times New Roman", serif;
    --sans: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    --caps: "Cinzel", Georgia, serif;
    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    :root {
        --navy: #151935;
        --navy-2: #1E2447;
        --bg: #0F1226;
        --card: #191D38;
        --fill: #23284A;
        --line: #2B3055;
        --text: #EEF0FA;
        --sub: #A4A8C6;
        --pink: #EE5A85;
        --pink-hover: #F27399;
        --pink-tint: #3A1830;
        --green: #4FD17E;
        --green-tint: #15301F;
        --blue: #7FA7F5;
        --blue-tint: #1A2747;
        --orange: #FFA94D;
        --orange-tint: #3A2810;
        --danger: #FF5C6A;
        --shadow: none;
    }
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    min-height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.5;
}

a { color: var(--pink); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.15; }
h1 { font-family: var(--serif); font-weight: 800; font-size: 34px; letter-spacing: -.01em; }
h2 { font-family: var(--serif); font-weight: 700; font-size: 24px; letter-spacing: -.01em; }
h3 { font-size: 16px; }
h1 em, h2 em, .accent { color: var(--pink); font-style: normal; }
.serif { font-family: var(--serif); }
.sub { color: var(--sub); }
.small { font-size: 13px; }

/* ---- Brand ---- */
.wordmark { display: inline-flex; align-items: center; gap: 14px; color: var(--on-navy); }
.wordmark:hover { text-decoration: none; }
.wordmark img { width: 28px; height: 32px; }
.wordmark .name { font-family: var(--caps); font-weight: 500; font-size: 24px; letter-spacing: .2em; }
.wordmark .divider { width: 1px; height: 24px; background: rgba(255, 255, 255, .35); margin: 0 8px; }
.wordmark .area { font-size: 14px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; }

/* ---- Loading ---- */
.splash { min-height: 100vh; display: grid; place-content: center; justify-items: center; text-align: center; gap: 10px; background: var(--navy); color: #fff; }
.splash img { width: 44px; height: 50px; }
.splash .serif { font-family: var(--caps); font-size: 34px; letter-spacing: .2em; }
.splash-sub { color: rgba(255, 255, 255, .7); letter-spacing: .2em; text-transform: uppercase; font-size: 12px; }

/* ---- Shell ---- */
.shell { min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
    display: flex; align-items: center; gap: 20px; min-height: 64px;
    padding: 0 32px; background: var(--navy); color: var(--on-navy);
    position: sticky; top: 0; z-index: 10;
}
.topbar .spacer { flex: 1; }
.topbar .help { color: var(--on-navy); font-weight: 500; font-size: 14px; }
.topbar .sep { width: 1px; height: 28px; background: rgba(255, 255, 255, .25); }

.account { position: relative; }
.account .acct-btn {
    background: none; border: 0; border-radius: 8px; cursor: pointer; display: flex; align-items: center; gap: 10px;
    font-weight: 500; font-size: 14px; color: var(--on-navy); padding: 8px 4px;
}

.account .acct-btn .chev { display: grid; transform: rotate(90deg); opacity: .8; }
.account .acct-btn[aria-expanded=true] .chev { transform: rotate(-90deg); }
.account .menu {
    position: absolute; right: 0; top: calc(100% + 6px); min-width: 240px; padding: 8px;
    background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 12px;
    box-shadow: 0 12px 40px rgba(15, 18, 38, .2); display: grid;
}
.account .menu .who { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; font-size: 13px; color: var(--sub); overflow-wrap: anywhere; }
.account .menu a, .account .menu button {
    display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px;
    color: var(--text); font-weight: 500; font-size: 14px; background: none; border: 0; width: 100%; text-align: left;
}
.account .menu a:hover, .account .menu button:hover { background: var(--fill); text-decoration: none; }

.body { flex: 1; display: flex; flex-direction: column; }
.page { width: 100%; max-width: 1180px; margin: 0 auto; padding: 32px 32px 64px; display: grid; gap: 22px; align-content: start; }

/* Sidebar + content, for a business or the admin area. */
.with-side { flex: 1; display: grid; grid-template-columns: 240px 1fr; }
.side { background: var(--card); border-right: 1px solid var(--line); padding: 28px 18px; display: flex; flex-direction: column; gap: 4px; }
.side a {
    display: flex; align-items: center; gap: 14px; padding: 11px 14px; border-radius: 10px;
    color: var(--text); font-weight: 500; font-size: 16px;
}
.side a:hover { background: var(--fill); text-decoration: none; }
.side a.active { background: var(--pink-tint); color: var(--pink); font-weight: 600; }
.side .side-foot { margin-top: auto; padding-top: 18px; }
.side .side-foot a { font-size: 14px; color: var(--sub); }
.with-side .page { max-width: 1240px; margin: 0; padding: 28px 36px 56px; }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.page-head p { margin: 6px 0 0; }
.hero-head h1 { font-size: 56px; line-height: 1; letter-spacing: -.02em; }
.hero-head p { font-size: 15px; color: var(--text); margin-top: 12px; }
.head-side { display: flex; align-items: center; gap: 24px; }
.biz-id { display: flex; align-items: center; gap: 14px; padding-right: 24px; border-right: 1px solid var(--line); }
.biz-id b { display: block; font-size: 18px; }
.biz-id .sub { font-size: 14px; }

/* Admin sub-sections */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs a { padding: 10px 14px; color: var(--sub); border-bottom: 2px solid transparent; white-space: nowrap; font-weight: 600; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { color: var(--pink); border-bottom-color: var(--pink); }

/* ---- Cards, lists ---- */
.card { background: var(--card); border-radius: 14px; box-shadow: var(--shadow); border: 1px solid var(--line); padding: 22px 24px; }
.card > h2 + * { margin-top: 12px; }
.card-head p { margin: 4px 0 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.card-head .more { font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

.stats { display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); }
.stat { display: flex; align-items: center; gap: 18px; color: var(--text); padding: 20px 24px; }
.stat:hover { text-decoration: none; border-color: var(--pink); }
.stat .ico { color: var(--pink); flex: none; display: grid; place-items: center; width: 44px; }
.stat .grow { flex: 1; min-width: 0; }
.stat .label { font-weight: 700; font-size: 17px; }
.stat .meta { color: var(--sub); font-size: 13px; }
.stat b { font-family: var(--serif); font-size: 38px; font-weight: 700; line-height: 1; }

.rows { display: grid; }
.row { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row .grow { flex: 1; min-width: 0; }
.row .title { font-weight: 600; }
.row .meta { color: var(--sub); font-size: 13px; }
.empty { color: var(--sub); text-align: center; padding: 28px 0; }
.card.empty h2 { margin-bottom: 8px; }

.biz-card { display: flex; gap: 16px; align-items: center; color: var(--text); }
.biz-card:hover { text-decoration: none; border-color: var(--pink); }
.biz-card .title { font-size: 17px; }
.logo {
    width: 56px; height: 56px; border-radius: 12px; background: var(--fill); color: var(--pink);
    display: grid; place-items: center; font-family: var(--serif); font-weight: 700; font-size: 24px; flex: none; overflow: hidden;
}
.logo img { width: 100%; height: 100%; object-fit: cover; }

/* ---- Badges, banners ---- */
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: var(--fill); color: var(--sub); white-space: nowrap; }
.badge.verified, .badge.live { background: var(--green-tint); color: var(--green); }
.badge.pending { background: var(--orange-tint); color: var(--orange); }
.badge.scheduled { background: var(--blue-tint); color: var(--blue); }
.badge.suspended { background: var(--pink-tint); color: var(--danger); }
.banner { border-radius: 12px; padding: 14px 18px; background: var(--orange-tint); color: var(--text); border: 1px solid var(--line); }
.banner b { color: var(--orange); }

/* ---- Forms ---- */
.form { display: grid; gap: 16px; }
.form .two { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
.form .three { display: grid; gap: 16px; grid-template-columns: 1fr 1fr 1fr; }
label { display: grid; gap: 7px; font-size: 14px; font-weight: 600; color: var(--text); }
label .hint { font-weight: 400; color: var(--sub); font-size: 13px; }
input, select, textarea {
    font: inherit; font-size: 15px; color: var(--text); background: var(--card);
    border: 1px solid #CFCFDC; border-radius: 8px; padding: 11px 14px; width: 100%;
}
@media (prefers-color-scheme: dark) { input, select, textarea { border-color: var(--line); background: var(--bg); } }
input::placeholder, textarea::placeholder { color: #8C8FA8; }
textarea { min-height: 104px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--pink); outline-offset: -1px; border-color: transparent; }
.actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

.pw { position: relative; }
.pw input { padding-right: 48px; }
.pw button.eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; padding: 8px; color: var(--text); }

.choices { display: flex; gap: 12px; flex-wrap: wrap; border: 0; padding: 0; margin: 0; }
.choices legend { font-size: 14px; font-weight: 600; margin-bottom: 8px; padding: 0; }
.choice {
    display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border: 1px solid #CFCFDC; border-radius: 8px;
    font-weight: 600; font-size: 14px; cursor: pointer; background: var(--card);
}
.choice input { width: 18px; height: 18px; margin: 0; accent-color: var(--pink); }
.choice:has(input:checked) { border-color: var(--pink); }

button, .btn {
    font: inherit; font-weight: 600; border-radius: 8px; padding: 10px 18px; cursor: pointer;
    border: 1px solid var(--line); background: var(--card); color: var(--text);
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
button:hover, .btn:hover { text-decoration: none; border-color: var(--pink); }
button.primary, .btn.primary { background: var(--pink); color: #fff; border-color: var(--pink); }
button.primary:hover, .btn.primary:hover { background: var(--pink-hover); border-color: var(--pink-hover); }
button.outline, .btn.outline { background: transparent; color: var(--pink); border: 1.5px solid var(--pink); }
button.outline:hover, .btn.outline:hover { background: var(--pink-tint); }
button.big, .btn.big { padding: 13px 24px; font-size: 17px; }
button.block, .btn.block { width: 100%; }
button.danger { color: var(--danger); }
button.link { background: none; border: 0; padding: 0; color: var(--pink); font-weight: 600; }
button.icon { background: none; border: 0; padding: 6px; color: var(--sub); }
button:disabled { opacity: .55; cursor: default; }

/* ---- Sign in / become a partner ---- */
.auth { flex: 1; display: grid; grid-template-columns: minmax(320px, 44%) 1fr; background: var(--card); }
.auth-hero {
    position: relative; overflow: hidden; background: var(--navy); color: #fff;
    padding: 56px 48px 220px; display: flex; flex-direction: column; gap: 22px;
    clip-path: polygon(0 0, 100% 0, 92% 100%, 0 100%);
}
.auth-hero::after {
    content: ""; position: absolute; left: -10%; right: -10%; bottom: -30px; height: 240px;
    background: url("../img/swirl.svg") center / 100% 100% no-repeat;
}
.auth-hero h1 { font-size: clamp(48px, 6vw, 84px); line-height: .95; color: #fff; }
.auth-hero h1 em { display: block; }
.rule { width: 64px; height: 4px; background: var(--pink); border-radius: 2px; }
.auth-hero p { font-size: 19px; line-height: 1.45; max-width: 400px; margin: 0; color: rgba(255, 255, 255, .92); }
.auth-hero.light { background: var(--card); color: var(--text); clip-path: none; padding-bottom: 56px; justify-content: center; }
.auth-hero.light::after { display: none; }
.auth-hero.light h1 { color: var(--text); font-size: clamp(44px, 4.6vw, 72px); }
.auth-hero.light h1 em { white-space: nowrap; }
.auth-hero.light p { color: var(--text); }
.auth-panel { display: grid; place-items: center; padding: 48px 40px; }
.auth-panel .form { width: 100%; max-width: 440px; gap: 18px; }
.auth-panel .forgot { justify-self: end; margin-top: -8px; font-size: 14px; }
.or { display: flex; align-items: center; gap: 14px; color: var(--text); font-size: 14px; margin: 6px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: #CFCFDC; }
.error { color: var(--danger); font-size: 14px; }

/* ---- Footer ---- */
.footer {
    background: var(--navy); color: var(--on-navy); padding: 18px 32px;
    display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
}
.footer .wordmark .name { font-size: 22px; }
.footer nav { display: flex; gap: 32px; margin-left: auto; }
.footer nav a { color: var(--on-navy); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 500; }
.footer .get-app { display: flex; align-items: center; gap: 14px; padding-left: 28px; border-left: 1px solid rgba(255, 255, 255, .3); font-size: 14px; }
.stores { display: flex; gap: 12px; flex-wrap: wrap; }
.store {
    display: inline-flex; align-items: center; gap: 8px; background: #000; color: #fff; border: 1px solid #A6A6A6;
    border-radius: 8px; padding: 5px 14px 5px 10px; min-width: 132px; line-height: 1.1;
}
.store:hover { text-decoration: none; border-color: #fff; }
.store svg { flex: none; }
.store small { display: block; font-size: 9px; letter-spacing: .02em; }
.store b { display: block; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }

/* ---- Admin ---- */
.seg { display: inline-flex; background: var(--fill); border-radius: 9px; padding: 2px; }
.seg button { border: 0; background: none; padding: 6px 12px; font-weight: 500; color: var(--sub); }
.seg button.on { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.search { margin: 12px 0 4px; }
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.toolbar input:not([type=checkbox]) { flex: 1; min-width: 200px; margin: 0; }
label.check { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; color: var(--text); white-space: nowrap; }
label.check input { width: auto; }
.row.review { align-items: flex-start; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 12px 0; font-size: 14px; }
.facts dt { color: var(--sub); font-weight: 600; }
.facts dd { margin: 0; overflow-wrap: anywhere; }

/* ---- Tables ---- */
.table { width: 100%; border-collapse: separate; border-spacing: 0; }
.table th {
    text-align: left; font-size: 14px; color: var(--text); font-weight: 700; padding: 10px 12px 10px 0;
    background: var(--fill);
}
.table th:first-child { padding-left: 22px; border-radius: 8px 0 0 8px; }
.table th:last-child { border-radius: 0 8px 8px 0; }
.table td { border-top: 1px solid var(--line); padding: 12px 12px 12px 0; vertical-align: middle; }
.table td:first-child { padding-left: 22px; font-weight: 600; }
.table tr:has(th) + tr td, .table thead + tbody > tr:first-child td { border-top: 0; }
.table select { width: auto; min-width: 130px; }
.table .meta { color: var(--sub); font-size: 13px; font-weight: 400; }
.table-wrap { overflow-x: auto; }
code { font-family: ui-monospace, Consolas, monospace; font-size: 12px; background: var(--fill); padding: 1px 5px; border-radius: 4px; }

/* ---- Toast ---- */
.toast {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 20;
    background: var(--navy); color: #fff; padding: 11px 20px; border-radius: 99px; font-weight: 500; box-shadow: 0 6px 24px rgba(0, 0, 0, .2);
}
.toast.err { background: var(--danger); }

#blazor-error-ui {
    display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
    background: #FFF4CE; color: #3A2A00; padding: 10px 20px;
}
#blazor-error-ui .dismiss { cursor: pointer; float: right; }

@media (max-width: 1100px) {
    .footer nav { margin-left: 0; }
    .footer .get-app { border-left: 0; padding-left: 0; }
}

@media (max-width: 900px) {
    .with-side { grid-template-columns: 1fr; }
    .side { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px 16px; gap: 4px; }
    .side a { font-size: 14px; padding: 8px 12px; white-space: nowrap; gap: 8px; }
    .side .side-foot { margin: 0 0 0 auto; padding: 0; }
    .with-side .page { padding: 22px 16px 48px; }
    .stats { grid-template-columns: 1fr; }
    .hero-head h1 { font-size: 40px; }
    .auth { grid-template-columns: 1fr; }
    .auth-hero { clip-path: none; padding: 36px 24px 170px; }
    .auth-hero::after { height: 170px; }
    .auth-hero.light { padding-bottom: 12px; }
    .auth-panel { padding: 32px 16px 48px; }
}

@media (max-width: 760px) {
    .form .two, .form .three { grid-template-columns: 1fr; }
    .page { padding: 20px 16px 48px; }
    .topbar { padding: 0 16px; gap: 12px; }
    .topbar .help, .topbar .sep, .wordmark .divider, .wordmark .area { display: none; }
    .account .acct-btn .acct-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .head-side { flex-wrap: wrap; }
    .biz-id { border-right: 0; padding-right: 0; }
    .footer { padding: 20px 16px; gap: 18px; }
    .footer nav { gap: 20px; flex-wrap: wrap; }
}

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
a.btn.icon { background: none; border: 0; padding: 4px; color: var(--text); }

/* Admin: new wines from the app */
.new-wines td.thumb { width: 64px; padding-right: 0; }
.new-wines .thumb img, .new-wines .no-photo {
    width: 48px; height: 64px; border-radius: 6px; object-fit: cover; display: grid; place-items: center;
    background: var(--fill); color: var(--sub);
}
.new-wines td:first-child { font-weight: 400; }
.new-wines td:nth-child(2) { min-width: 220px; }
