/* Artoveya's Artist Nook - the tenant boards (<tenant>.artoveya.com).
   The public site's look (www.artoveya.com site.css): the same tokens, fonts, magenta-to-orange gradient and the
   light / dark themes (html[data-theme], set before the CSS loads; the media query covers no-JS). Calmer than the
   landing page on purpose - this is where artists work: no paint splashes, the briefs' own pictures bring colour. */

:root {
    --bg: #fbf9fc; --bg-tint: #f5f1f9; --surface: #ffffff; --surface-2: #f7f4fa;
    --line: #ece6f2; --line-strong: #d9d0e4; --text: #17132a; --muted: #625c78;
    --pink: #e8268f; --pink-soft: #fde6f2; --good: #1a8a5a; --good-soft: #e3f6ec; --warn: #b5560c; --warn-soft: #fff1e3;
    --bad: #c42a3c; --bad-soft: #fde8eb;
    --shadow: 0 10px 30px -12px rgb(40 20 70 / .18); --shadow-lg: 0 24px 60px -20px rgb(40 20 70 / .30);
    --grad: linear-gradient(90deg, #f0399a 0%, #ff8a3d 100%);
    --grad-text: linear-gradient(90deg, #e8268f 0%, #ff5a3c 45%, #ffb21a 100%);
    --radius: 16px; --wrap: 1180px;
    --serif: "DM Serif Display", Georgia, serif;
    --sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    color-scheme: light;
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #0e0b17; --bg-tint: #141024; --surface: #181329; --surface-2: #201a35; --line: #2c2545; --line-strong: #3d3460;
        --text: #f4f1fb; --muted: #a8a1c0; --pink: #ff4fa8; --pink-soft: #3a1631; --good: #4cd38f; --good-soft: #12301f;
        --warn: #ffb067; --warn-soft: #3a2511; --bad: #ff7b8b; --bad-soft: #3a1519;
        --shadow: 0 10px 30px -12px rgb(0 0 0 / .6); --shadow-lg: 0 24px 60px -20px rgb(0 0 0 / .75);
        color-scheme: dark;
    }
}
:root[data-theme="dark"] {
    --bg: #0e0b17; --bg-tint: #141024; --surface: #181329; --surface-2: #201a35; --line: #2c2545; --line-strong: #3d3460;
    --text: #f4f1fb; --muted: #a8a1c0; --pink: #ff4fa8; --pink-soft: #3a1631; --good: #4cd38f; --good-soft: #12301f;
    --warn: #ffb067; --warn-soft: #3a2511; --bad: #ff7b8b; --bad-soft: #3a1519;
    --shadow: 0 10px 30px -12px rgb(0 0 0 / .6); --shadow-lg: 0 24px 60px -20px rgb(0 0 0 / .75);
    color-scheme: dark;
}

/* ---- base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.6 var(--sans); }
a { color: inherit; }
main a:not(.btn) { color: var(--pink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; line-height: 1.12; }
h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.4vw, 3rem); }
h2 { font-size: 1.5rem; }
.h-sm { font-size: 1.3rem; margin: 2rem 0 .8rem; }
p { margin: .5rem 0 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
code { font-size: .86em; padding: .1em .35em; border-radius: 6px; background: var(--surface-2); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .wrap { padding: 0 32px; } }
main.wrap { padding-top: 28px; padding-bottom: 64px; min-height: 60vh; }
.muted { color: var(--muted); }
.small { font-size: .84rem; }
.icon { width: 1.1em; height: 1.1em; flex: none; vertical-align: -.16em; }
.inline { display: inline; }
:focus-visible { outline: 2.5px solid var(--pink); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 50; background: var(--surface); padding: .5rem .8rem; border-radius: 8px; }
.grad-text { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .55em; color: var(--pink);
           font-size: .72rem; font-weight: 700; letter-spacing: .3em; text-transform: uppercase; }
.eyebrow i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; display: inline-block; }

/* ---- buttons, chips, flashes ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .7rem 1.25rem;
       border-radius: 999px; border: 1.5px solid transparent; font: 600 .92rem/1 var(--sans); white-space: nowrap;
       cursor: pointer; text-decoration: none; transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-grad { background: var(--grad); color: #fff; box-shadow: 0 10px 24px -12px rgb(240 57 154 / .7); }
.btn-outline { background: var(--surface); border-color: var(--line-strong); color: var(--text); }
.btn-outline:hover { border-color: var(--pink); }
.btn-danger { background: var(--bad); color: #fff; }
.btn-sm { padding: .55rem 1rem; font-size: .85rem; }
.btn-xs { padding: .38rem .75rem; font-size: .78rem; }
.btn-block { width: 100%; margin-top: 1rem; }
.linkish { border: 0; background: none; color: var(--pink); font: inherit; font-size: .88rem; cursor: pointer; text-decoration: underline; padding: 0; }
.chip { display: inline-block; padding: .2rem .6rem; border-radius: 999px; font: 700 .68rem/1.3 var(--sans);
        letter-spacing: .04em; text-transform: uppercase; vertical-align: middle; }
.chip-open { background: var(--good-soft); color: var(--good); }
.chip-shut { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.flash { margin: 0 0 1.4rem; padding: .8rem 1rem; border-radius: 12px; font-weight: 600; font-size: .92rem; }
.flash-ok  { background: var(--good-soft); color: var(--good); }
.flash-err { background: var(--bad-soft); color: var(--bad); }

/* ---- header ---- */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 84%, transparent);
       backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; gap: 1.4rem; min-height: 68px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; }
.brand-dots { position: relative; width: 22px; height: 30px; flex: none; }
.brand-dots i { position: absolute; border-radius: 50%; }
.brand-dots i:nth-child(1) { width: 12px; height: 12px; left: 0; top: 9px; background: #1f7bff; }
.brand-dots i:nth-child(2) { width: 7px; height: 7px; left: 12px; top: 2px; background: #ef2b4f; }
.brand-dots i:nth-child(3) { width: 8px; height: 8px; left: 13px; top: 21px; background: #ffc21a; }
.brand-dots.big { transform: scale(1.8); margin: 0 auto 1.6rem; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font: 400 1.6rem/1 var(--serif); white-space: nowrap; }
.brand-sub { margin-top: 3px; font: 700 .56rem/1 var(--sans); letter-spacing: .3em; text-transform: uppercase;
             background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav { display: flex; gap: .3rem; }
.nav a { padding: .45rem .85rem; border-radius: 999px; font-weight: 600; font-size: .9rem; text-decoration: none; color: var(--muted); }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--pink); background: var(--pink-soft); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: .6rem; }
.who { font-weight: 600; font-size: .88rem; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.theme-toggle { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--line);
                background: var(--surface); color: var(--text); cursor: pointer; }
.theme-toggle:hover { border-color: var(--pink); color: var(--pink); }
.theme-sun { display: none; }
[data-theme="dark"] .theme-moon { display: none; }
[data-theme="dark"] .theme-sun { display: block; }
@media (max-width: 720px) {
    .top-row { gap: .6rem; padding-top: 10px; padding-bottom: 10px; }
    .nav { order: 3; width: 100%; overflow-x: auto; }
    .who { display: none; }
}

/* ---- board home ---- */
.hero { display: grid; gap: 24px; align-items: end; grid-template-columns: 1fr; margin-bottom: 2rem; }
@media (min-width: 900px) { .hero { grid-template-columns: 1.4fr .8fr; } }
.hero h1 { font-size: clamp(2.4rem, 5.6vw, 3.8rem); margin-top: .8rem; }
.lede { color: var(--muted); font-size: 1.04rem; max-width: 40rem; }
.hero-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.hero-card .btn { margin-top: 1rem; }
.tabs { display: flex; gap: .3rem; margin: 0 0 1.4rem; padding: 4px; border-radius: 999px; background: var(--surface-2);
        border: 1px solid var(--line); width: fit-content; }
.tabs a { padding: .5rem 1.1rem; border-radius: 999px; font-weight: 600; font-size: .86rem; color: var(--muted); text-decoration: none; }
.tabs a[aria-current="page"] { background: var(--pink-soft); color: var(--pink); }

.briefs { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.brief-card > a { display: flex; flex-direction: column; height: 100%; background: var(--surface); border: 1px solid var(--line);
                  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); text-decoration: none; color: inherit;
                  transition: transform .2s ease, box-shadow .2s ease; }
.brief-card > a:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.brief-pic { position: relative; aspect-ratio: 4 / 3; background: var(--surface-2); }
.brief-pic .chip { position: absolute; left: 12px; top: 12px; background: rgb(255 255 255 / .92); color: #17132a; border: 0; }
.brief-pic .chip-open { color: var(--good); }
.brief-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: .2rem; flex: 1; }
.kind { font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.brief-body h3 { font: 400 1.35rem/1.2 var(--serif); }
.brief-meta { display: flex; flex-wrap: wrap; gap: .3rem 1rem; color: var(--muted); font-size: .82rem; margin-top: .3rem; }
.brief-low { margin-top: auto; padding-top: .6rem; font-size: .92rem; }
.mine { align-self: flex-start; margin-top: .5rem; padding: .2rem .6rem; border-radius: 999px; font-size: .74rem; font-weight: 700;
        background: var(--pink-soft); color: var(--pink); }
.mine-won { background: var(--good-soft); color: var(--good); }

.pic { display: block; width: 100%; height: 100%; object-fit: cover; }
.pic-none { display: grid; place-items: center;
            background: radial-gradient(120% 90% at 20% 15%, hsl(var(--hue) 80% 66%), transparent 60%),
                        radial-gradient(100% 80% at 85% 90%, hsl(calc(var(--hue) + 60) 75% 55%), transparent 65%), hsl(var(--hue) 45% 30%); }
.pic-none span { font: 400 3.4rem/1 var(--serif); color: rgb(255 255 255 / .9); }

.empty-state { text-align: center; padding: 56px 16px; }
.empty-state h1, .empty-state h2 { margin-bottom: .3rem; }
.empty-state .btn { margin-top: 1.4rem; }

/* ---- one brief ---- */
.crumbs { margin: 0 0 1rem; font-size: .9rem; }
.brief-grid { display: grid; gap: 32px; grid-template-columns: minmax(0, 1fr); align-items: start; }   /* minmax: the sheets table must scroll in its box, never widen the page */
@media (min-width: 980px) { .brief-grid { grid-template-columns: minmax(0, 1fr) 360px; } }
.brief-hero { border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; background: var(--surface-2); margin-bottom: 1.2rem; box-shadow: var(--shadow); }
.brief-main h1 { margin-top: .2rem; }
.brief-state { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; font-size: .9rem; }
.brief-text { max-width: 46rem; color: var(--text); }
.ext { display: inline-flex; align-items: center; gap: .3rem; font-weight: 600; }
.facts { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; margin-top: 1rem; color: var(--muted); font-size: .9rem; }
.facts li { display: inline-flex; align-items: center; gap: .4rem; }
.facts .icon { color: var(--pink); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.sheets { width: 100%; border-collapse: collapse; font-size: .9rem; }
.sheets th, .sheets td { padding: .7rem .9rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.sheets thead th { font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; background: var(--surface-2); }
.sheets tbody tr:last-child > * { border-bottom: 0; }
.sheets tbody th { font-weight: 600; }
.sheets .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sheets .acts { text-align: right; white-space: nowrap; }
.sheets .acts > * + * { margin-left: .3rem; }
.sheets tr.is-awarded { opacity: .62; }
.mybid { font-weight: 600; font-size: .84rem; }
.mybid.st-won { color: var(--good); }
.mybid.st-declined, .mybid.st-lost, .mybid.st-withdrawn { color: var(--muted); }

.bid-panel { position: sticky; top: 92px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
             padding: 22px; box-shadow: var(--shadow-lg); }
.bid-panel h2 { margin-bottom: .6rem; }
.gate { font-size: 1.05rem; margin: 0; }
.bid-form, .form { display: flex; flex-direction: column; }
.bid-form label, .form label { margin: .9rem 0 .35rem; font-size: .82rem; font-weight: 700; }
.bid-form label:first-of-type, .form h2 + label, .form p + label { margin-top: .4rem; }
input:not([type="radio"]):not([type="file"]), select, textarea {
    width: 100%; padding: .65rem .8rem; border: 1.5px solid var(--line-strong); border-radius: 12px; background: var(--surface);
    color: var(--text); font: inherit; font-size: .95rem; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--pink); box-shadow: 0 0 0 3px var(--pink-soft); }
input[type="file"] { font: inherit; font-size: .88rem; }
.money-in, .prefixed { display: flex; align-items: center; border: 1.5px solid var(--line-strong); border-radius: 12px; background: var(--surface); }
.money-in:focus-within, .prefixed:focus-within { border-color: var(--pink); box-shadow: 0 0 0 3px var(--pink-soft); }
.money-in span, .prefixed span { padding: 0 .2rem 0 .8rem; color: var(--muted); font-weight: 700; }
.money-in input, .prefixed input { border: 0 !important; box-shadow: none !important; padding-left: .3rem; }
.method { border: 0; padding: 0; margin: .9rem 0 0; }
.method legend { font-size: .82rem; font-weight: 700; margin-bottom: .35rem; padding: 0; }
.method label { display: flex; align-items: center; gap: .5rem; margin: .25rem 0; font-weight: 500; font-size: .92rem; }
.method .is-off { color: var(--muted); }

/* ---- pages with forms ---- */
.page-head { margin-bottom: 1.6rem; }
.narrow { max-width: 460px; margin: 0 auto; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card + .card { margin-top: 18px; }
.resend { text-align: center; margin-top: 1rem; }
.tiles { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-bottom: 1.4rem; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.tile b { display: block; font: 400 1.9rem/1.1 var(--serif); }
.tile span { color: var(--muted); font-size: .84rem; }

/* ---- profile ---- */
.gate-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.4rem; padding: 16px 18px; margin-bottom: 1.4rem;
            border-radius: var(--radius); background: var(--warn-soft); color: var(--text); }
.gate-bar.is-ready { background: var(--good-soft); }
.gate-bar p { margin: 0; }
.gate-meter { display: flex; gap: 5px; }
.gate-meter i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--surface); }
.gate-meter i.on { background: var(--grad); border-color: transparent; }
.gate-meter i.mark { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--pink); }
.profile-grid { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 980px) { .profile-grid { grid-template-columns: minmax(0, 1fr) 340px; } }
.profile-grid .h-sm { margin-top: 0; }
.pieces { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.piece { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.piece img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: var(--surface-2); }
.piece.st-draft img, .piece.st-hidden img { opacity: .55; }
.piece-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: .35rem; align-items: flex-start; }
.piece-acts { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .3rem; }
.confirm summary { list-style: none; }
.confirm summary::-webkit-details-marker { display: none; }
.confirm[open] form { margin-top: .4rem; display: flex; align-items: center; gap: .4rem; }

/* ---- footer ---- */
.foot { border-top: 1px solid var(--line); padding: 28px 0; font-size: .86rem; }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem 1.4rem; }
.foot p { margin: 0; }
.foot a { color: var(--pink); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }

/* LOCAL only: the sign-in code printed on screen (the API returns it with LOCAL_DEV + the log mail driver). */
.dev-code { margin: .8rem 0 0; padding: .7rem .9rem; border-radius: 12px; border: 2px dotted orange; font-size: .9rem; }
.dev-code span { display: inline-block; margin-right: .5rem; padding: .05rem .45rem; border-radius: 999px; background: #ff9800; color: #1b1b1b;
                 font-size: .62rem; font-weight: 800; letter-spacing: .08em; }
.dev-code b { font-size: 1.15rem; letter-spacing: .15em; }
