/* =====================================================================
   MASKARWADI CHAMPIONS LEAGUE
   Mobile-first stylesheet. No framework, no external fonts.
   ===================================================================== */

:root {
    --navy:      #0b1220;
    --navy-2:    #141e33;
    --ink:       #0f172a;
    --body:      #1f2937;
    --muted:     #64748b;
    --line:      #e3e8ef;
    --line-soft: #eef1f6;
    --bg:        #f5f7fb;
    --card:      #ffffff;

    --primary:      #1d4ed8;
    --primary-dark: #1739a8;
    --primary-soft: #e8edfd;
    --gold:         #f0b429;
    --good:         #0f766e;
    --good-soft:    #d7f2ee;
    --bad:          #b42318;
    --bad-soft:     #fde7e4;
    --warn:         #b45309;
    --warn-soft:    #fdf0da;
    --live:         #dc2626;

    --radius:    14px;
    --radius-sm: 9px;
    --shadow:    0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px -12px rgba(15, 23, 42, .18);
    --shadow-lg: 0 20px 48px -24px rgba(15, 23, 42, .35);

    --topbar-h: 58px;
    --bottom-h: 62px;
    --wrap:     1080px;
    --wrap-wide: 1320px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--body);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
        "Nirmala UI", "Noto Sans Devanagari", "Mangal", sans-serif;
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    padding-bottom: calc(var(--bottom-h) + env(safe-area-inset-bottom, 0px));
    overflow-x: hidden;
}

h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; margin: 0 0 .5rem; letter-spacing: -.015em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p  { margin: 0 0 .75rem; }
a  { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

.muted  { color: var(--muted); }
.small  { font-size: .82rem; }
.block  { display: block; }
.num    { text-align: right; font-variant-numeric: tabular-nums; }
.text-good { color: var(--good); }
.text-bad  { color: var(--bad); }
.big { font-size: 2rem; font-weight: 800; color: var(--ink); margin: 0; }

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
    position: absolute; left: -999px; top: 0; z-index: 200;
    background: var(--gold); color: var(--ink); padding: .5rem .9rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }
.hp { position: absolute; left: -9999px; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------------------------------------------------------------- icons */
.ico { width: 22px; height: 22px; flex: 0 0 auto; }
.ico-sm { width: 16px; height: 16px; }
.ico-xl { width: 44px; height: 44px; }

/* --------------------------------------------------------------- topbar */
.topbar {
    position: sticky; top: 0; z-index: 60;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
    color: #e6ebf5;
    padding-top: env(safe-area-inset-top, 0px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .06), 0 6px 20px -12px rgba(0, 0, 0, .7);
}
.topbar-inner {
    max-width: var(--wrap-wide); margin: 0 auto;
    min-height: var(--topbar-h);
    display: flex; align-items: center; gap: .75rem;
    padding: .4rem 1rem;
}
.brand { display: flex; align-items: center; gap: .6rem; color: #fff; min-width: 0; flex: 1; }
.brand:hover { text-decoration: none; }
.brand-mark {
    display: grid; place-items: center;
    width: 38px; height: 38px; flex: 0 0 auto;
    border-radius: 10px;
    background: linear-gradient(140deg, var(--gold), #e08c08);
    color: #231504; font-weight: 800; font-size: .82rem; letter-spacing: .02em;
}
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text strong {
    font-size: .98rem; line-height: 1.15; color: #fff;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.brand-text small { font-size: .72rem; color: #9fb0cc; letter-spacing: .02em; }

.nav-desktop { display: none; }
.nav-toggle, .drawer-close {
    display: grid; place-items: center;
    width: 42px; height: 42px; flex: 0 0 auto;
    border: 1px solid rgba(255, 255, 255, .16); border-radius: 10px;
    background: rgba(255, 255, 255, .06); color: #fff; cursor: pointer;
}
.nav-toggle:active { transform: scale(.96); }

/* --------------------------------------------------------------- drawer */
.drawer {
    position: fixed; inset: 0; z-index: 90;
    background: rgba(7, 12, 22, .55);
    display: flex; justify-content: flex-end;
}
.drawer[hidden] { display: none; }
.drawer-panel {
    width: min(86vw, 330px); height: 100%;
    background: var(--navy); color: #e6ebf5;
    display: flex; flex-direction: column;
    padding: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px);
    box-shadow: var(--shadow-lg);
    animation: slidein .18s ease-out;
    overflow-y: auto;
}
@keyframes slidein { from { transform: translateX(14px); opacity: .6; } to { transform: none; opacity: 1; } }
.drawer-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1rem; border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.drawer-list { list-style: none; margin: 0; padding: .5rem; }
.drawer-list a {
    display: flex; align-items: center; gap: .8rem;
    padding: .85rem .75rem; border-radius: 10px;
    color: #cfd9ea; font-weight: 500;
}
.drawer-list a:hover { background: rgba(255, 255, 255, .07); text-decoration: none; color: #fff; }
.drawer-list a.is-active { background: rgba(240, 180, 41, .16); color: #fff; }

/* ----------------------------------------------------------- bottom nav */
.bottomnav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    background: #fff; border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom, 0px);
}
.bottomnav ul { display: flex; list-style: none; margin: 0; padding: 0; }
.bottomnav li { flex: 1; }
.bottomnav a, .nav-toggle-bottom {
    width: 100%; height: var(--bottom-h);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    color: var(--muted); font-size: .68rem; font-weight: 600; letter-spacing: .01em;
    background: none; border: 0; cursor: pointer; text-decoration: none;
}
.bottomnav a.is-active { color: var(--primary); }
.bottomnav a.is-active .ico { color: var(--primary); }
.bottomnav a:hover { text-decoration: none; }

/* ----------------------------------------------------------------- wrap */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 1rem; }
.wrap-wide { max-width: var(--wrap-wide); }

.page-head {
    display: flex; flex-wrap: wrap; gap: .75rem;
    align-items: flex-end; justify-content: space-between;
    margin: .25rem 0 1.1rem;
}
.page-sub { color: var(--muted); margin: 0; font-size: .9rem; }
.page-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

.breadcrumb { margin: 0 0 .75rem; font-size: .88rem; }
.breadcrumb a { display: inline-flex; align-items: center; gap: .3rem; color: var(--muted); }

.section { margin: 1.75rem 0; }
.section-head {
    display: flex; flex-wrap: wrap; gap: .5rem;
    align-items: baseline; justify-content: space-between; margin-bottom: .8rem;
}
.section-head h2, .section-head h3 { margin: 0; }
.link { font-weight: 600; font-size: .88rem; }

.viewonly-banner {
    display: flex; align-items: center; gap: .6rem;
    background: var(--primary-soft); border: 1px solid #c7d4fb; color: #1e3a8a;
    border-radius: var(--radius-sm); padding: .7rem .9rem; margin-bottom: 1rem; font-size: .88rem;
}

/* ---------------------------------------------------------------- cards */
.card {
    background: var(--card); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 1.1rem;
    box-shadow: var(--shadow); margin-bottom: 1rem;
}
.card-tight { padding: .75rem .9rem; }
.card-center { text-align: center; padding: 2rem 1.2rem; }
.card-auth { max-width: 420px; margin: 2rem auto; }
.card-success { text-align: center; border-color: #b7e4dc; background: linear-gradient(180deg, #f2fbf9, #fff); }
.success-mark, .closed-mark {
    width: 72px; height: 72px; margin: 0 auto .75rem;
    display: grid; place-items: center; border-radius: 50%;
    background: var(--good-soft); color: var(--good);
}
.closed-mark { background: var(--warn-soft); color: var(--warn); }
.code-pill {
    display: inline-block; background: var(--ink); color: #fff;
    padding: .25rem .7rem; border-radius: 999px; font-size: 1rem; letter-spacing: .04em;
}
.stack > * { margin-bottom: 1rem; }
.two-col { display: grid; gap: 1rem; }
.info-grid { display: grid; gap: 1rem; }

/* Grid items default to min-width:auto, which lets a wide table push the
   whole page sideways. Pin them to 0 so .table-wrap scrolls instead. */
.two-col > *, .info-grid > *, .stack > *, .auction-layout > *,
.team-grid > *, .team-admin-grid > *, .squad-fixed-row > * { min-width: 0; }

/* --------------------------------------------------------------- alerts */
.alert {
    border-radius: var(--radius-sm); padding: .8rem 1rem; margin-bottom: 1rem;
    font-size: .92rem; border: 1px solid transparent;
}
.alert-success { background: var(--good-soft); border-color: #a9e2d8; color: #05504a; }
.alert-error   { background: var(--bad-soft);  border-color: #f4c2bc; color: #8c1c14; }
.alert-warning { background: var(--warn-soft); border-color: #f2d49c; color: #8a4409; }
.alert-info    { background: var(--primary-soft); border-color: #c7d4fb; color: #1e3a8a; }

.inline-warning {
    display: flex; gap: .45rem; align-items: flex-start;
    background: var(--warn-soft); color: #8a4409; border: 1px solid #f2d49c;
    border-radius: var(--radius-sm); padding: .55rem .7rem; font-size: .84rem; margin: .5rem 0;
}

/* -------------------------------------------------------------- buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
    min-height: 44px; padding: .55rem 1rem;
    border: 1px solid var(--line); border-radius: 10px;
    background: #fff; color: var(--ink);
    font: inherit; font-weight: 600; font-size: .92rem;
    cursor: pointer; text-decoration: none;
    transition: transform .06s ease, background .15s ease, box-shadow .15s ease;
}
.btn:hover { text-decoration: none; background: #f8fafc; }
.btn:active { transform: scale(.985); }
.btn[disabled], .btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-good { background: var(--good); border-color: var(--good); color: #fff; }
.btn-good:hover { background: #0b5f59; }
.btn-warn { background: var(--warn); border-color: var(--warn); color: #fff; }
.btn-warn:hover { background: #96450a; }
.btn-bad  { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-bad:hover { background: #991c12; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--body); }
.btn-ghost:hover { background: rgba(15, 23, 42, .04); }

.btn-lg { min-height: 50px; font-size: 1rem; padding: .7rem 1.2rem; }
.btn-xl { min-height: 62px; font-size: 1.12rem; font-weight: 800; letter-spacing: .03em; }
.btn-sm { min-height: 38px; font-size: .85rem; padding: .35rem .7rem; }
.btn-xs { min-height: 32px; font-size: .78rem; padding: .25rem .55rem; border-radius: 8px; }
.btn-block { width: 100%; }

.row-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.nav-cta { color: var(--gold) !important; }

/* ------------------------------------------------------- badges / pills */
.badge {
    display: inline-block; padding: .18rem .55rem; border-radius: 999px;
    font-size: .72rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
    border: 1px solid transparent; white-space: nowrap;
}
.badge-sold      { background: var(--good-soft); color: #05504a; border-color: #a9e2d8; }
.badge-unsold    { background: var(--bad-soft); color: #8c1c14; border-color: #f4c2bc; }
.badge-live      { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
.badge-available { background: var(--primary-soft); color: #1e3a8a; border-color: #c7d4fb; }
.badge-muted     { background: #f1f5f9; color: #475569; border-color: var(--line); }

.pill {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .3rem .7rem; border-radius: 999px;
    background: #f1f5f9; color: #334155; border: 1px solid var(--line);
    font-size: .8rem; font-weight: 600;
}
.pill-good { background: var(--good-soft); color: #05504a; border-color: #a9e2d8; }
.pill-bad  { background: var(--bad-soft); color: #8c1c14; border-color: #f4c2bc; }
.pill-warn { background: var(--warn-soft); color: #8a4409; border-color: #f2d49c; }
.pill-muted { background: #f1f5f9; color: var(--muted); }
.pill-live { background: var(--live); color: #fff; border-color: var(--live); }

/* ----------------------------------------------------------------- hero */
.hero {
    display: grid; gap: 1.25rem;
    background: linear-gradient(135deg, var(--navy) 0%, #1b2947 60%, #253a63 100%);
    color: #e8eefa; border-radius: 18px; padding: 1.5rem 1.25rem;
    margin-bottom: 1.25rem; box-shadow: var(--shadow-lg);
}
.hero h1 { color: #fff; font-size: 1.75rem; margin-bottom: .4rem; }
.hero .eyebrow {
    color: var(--gold); font-weight: 700; font-size: .78rem;
    letter-spacing: .14em; text-transform: uppercase; margin-bottom: .35rem;
}
.hero .lead { color: #c3cfe4; margin-bottom: 1rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.hero .btn-ghost { border-color: rgba(255, 255, 255, .28); color: #fff; }
.hero .btn-ghost:hover { background: rgba(255, 255, 255, .1); }

.live-card {
    background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16);
    border-radius: var(--radius); padding: 1rem; text-align: center;
}
.live-card img { border-radius: 12px; object-fit: cover; width: 110px; height: 110px; margin: .5rem auto; display: block; }
.live-card h3 { color: #fff; margin: .25rem 0; }
.live-card .muted { color: #a9b8d1; }
.live-card .btn { margin-top: .6rem; }
.live-bid { color: var(--gold); font-size: 1.05rem; }
.live-bid strong { font-size: 1.4rem; }
.live-card-idle .big { color: var(--gold); }

.live-dot {
    display: inline-flex; align-items: center; gap: .4rem;
    background: var(--live); color: #fff; font-size: .7rem; font-weight: 800;
    letter-spacing: .1em; padding: .2rem .6rem; border-radius: 999px;
}
.live-dot::before {
    content: ''; width: 7px; height: 7px; border-radius: 50%; background: #fff;
    animation: pulse 1.2s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

/* ------------------------------------------------------------ stat grid */
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; margin-bottom: 1rem; }
.stat {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm);
    padding: .8rem; display: flex; align-items: center; gap: .65rem; box-shadow: var(--shadow);
}
.stat-ico {
    width: 38px; height: 38px; flex: 0 0 auto; border-radius: 10px;
    display: grid; place-items: center; background: var(--primary-soft); color: var(--primary);
}
.stat-body { display: flex; flex-direction: column; min-width: 0; }
.stat-value { font-size: 1.28rem; font-weight: 800; color: var(--ink); line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-label { font-size: .74rem; color: var(--muted); font-weight: 600; }
.tone-good .stat-ico { background: var(--good-soft); color: var(--good); }
.tone-warn .stat-ico { background: var(--warn-soft); color: var(--warn); }

/* --------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius-sm); }
.table { width: 100%; border-collapse: collapse; background: #fff; font-size: .9rem; }
.table th, .table td { padding: .7rem .6rem; text-align: left; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table thead th {
    background: #f8fafc; color: var(--muted); font-size: .72rem;
    text-transform: uppercase; letter-spacing: .05em; white-space: nowrap;
    border-bottom: 1px solid var(--line);
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tfoot th { background: #f8fafc; font-size: .85rem; }
.table-sm { font-size: .85rem; }
.table-sm th, .table-sm td { padding: .5rem .5rem; }
.row-mine { background: var(--primary-soft); }

.cell-player { display: flex; align-items: center; gap: .55rem; min-width: 0; }
.cell-player img { width: 36px; height: 36px; border-radius: 9px; object-fit: cover; flex: 0 0 auto; background: #eef2f7; }
.cell-actions { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.cell-actions form { margin: 0; }

/* Mobile: tables become stacked cards */
@media (max-width: 760px) {
    .table-stack { background: transparent; }
    .table-stack thead { display: none; }
    .table-stack tr {
        display: block; background: #fff; border: 1px solid var(--line);
        border-radius: var(--radius-sm); margin-bottom: .7rem; padding: .35rem .2rem;
        box-shadow: var(--shadow);
    }
    .table-stack td {
        display: flex; justify-content: space-between; align-items: center; gap: .75rem;
        border-bottom: 1px solid var(--line-soft); padding: .55rem .7rem; text-align: right;
    }
    .table-stack td:last-child { border-bottom: 0; }
    .table-stack td::before {
        content: attr(data-label); font-size: .72rem; color: var(--muted);
        font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
        text-align: left; flex: 0 0 38%;
    }
    .table-stack td.cell-player { justify-content: flex-start; text-align: left; }
    .table-stack td.cell-player::before { display: none; }
    .table-stack td.cell-actions { justify-content: flex-start; }
    .table-stack td.cell-actions::before { flex: 0 0 auto; }
}

/* ---------------------------------------------------------------- lists */
.kv { list-style: none; margin: .25rem 0 .75rem; padding: 0; }
.kv li {
    display: flex; justify-content: space-between; gap: 1rem;
    padding: .45rem 0; border-bottom: 1px dashed var(--line-soft); font-size: .9rem;
}
.kv li:last-child { border-bottom: 0; }
.kv span { color: var(--muted); }
.kv strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.kv-tight li { padding: .3rem 0; font-size: .86rem; }
.kv-strong { background: #f8fafc; margin: .25rem -.4rem; padding: .5rem .4rem !important; border-radius: 8px; }
.kv-strong strong { color: var(--primary); font-size: 1.02rem; }

.steps { padding-left: 1.2rem; }
.steps li { margin-bottom: .4rem; }
.checks { list-style: none; margin: 0; padding: 0; }
.checks li { padding: .45rem 0; border-bottom: 1px solid var(--line-soft); font-size: .9rem; }
.checks li::before { margin-right: .5rem; font-weight: 800; }
.checks li.ok::before   { content: '\2713'; color: var(--good); }
.checks li.bad::before  { content: '\2717'; color: var(--bad); }
.checks li.warn::before { content: '!'; color: var(--warn); }

.feed { list-style: none; margin: 0; padding: 0; }
.feed-item {
    display: flex; gap: .7rem; align-items: center;
    padding: .6rem 0; border-bottom: 1px solid var(--line-soft);
}
.feed-item:last-child { border-bottom: 0; }
.feed-item img { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; background: #eef2f7; flex: 0 0 auto; }
.feed-points { font-weight: 800; color: var(--good); font-variant-numeric: tabular-nums; }
.feed-tight .feed-item { padding: .45rem 0; }

/* ---------------------------------------------------------- player card */
.pcard-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .8rem; }
.pcard {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.pcard-photo { aspect-ratio: 1 / 1; background: #e8edf4; overflow: hidden; }
.pcard-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pcard-body { padding: .65rem .7rem .75rem; display: flex; flex-direction: column; gap: .3rem; flex: 1; }
.pcard-top { display: flex; align-items: flex-start; justify-content: space-between; gap: .35rem; }
.pcard-top h3 { font-size: .95rem; margin: 0; line-height: 1.25; }
.jersey {
    background: var(--ink); color: #fff; font-size: .72rem; font-weight: 800;
    padding: .1rem .4rem; border-radius: 6px; flex: 0 0 auto;
}
.pcard-meta { font-size: .76rem; color: var(--muted); margin: 0; }
.pcard-foot { margin-top: auto; display: flex; flex-direction: column; gap: .25rem; align-items: flex-start; }
.pcard-sold { font-size: .76rem; color: var(--body); }

/* ------------------------------------------------------------ team cards */
.team-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .7rem; }
.team-chip {
    background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--team-color, var(--primary));
    border-radius: var(--radius-sm); padding: .7rem; display: flex; flex-direction: column;
    gap: .25rem; box-shadow: var(--shadow); color: var(--body);
}
.team-chip:hover { text-decoration: none; transform: translateY(-1px); }
.team-chip img { width: 40px; height: 40px; border-radius: 8px; object-fit: contain; background: #f1f5f9; }
.team-chip-name { font-weight: 700; color: var(--ink); font-size: .92rem; }
.team-chip-meta { font-size: .74rem; color: var(--muted); }

.team-grid, .team-admin-grid { display: grid; gap: 1rem; }
.tcard {
    background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--team-color, var(--primary));
    border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow);
}
.tcard-head { display: flex; gap: .7rem; align-items: flex-start; margin-bottom: .75rem; }
.tcard-head img { width: 52px; height: 52px; border-radius: 10px; object-fit: contain; background: #f1f5f9; flex: 0 0 auto; }
.tcard-head h2 { font-size: 1.1rem; margin: 0 0 .15rem; }
.tcard-people { display: flex; flex-direction: column; font-size: .8rem; color: var(--muted); margin: 0; }
.tcard-counts { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-bottom: .75rem; }
.tcard-counts > div {
    background: #f8fafc; border: 1px solid var(--line-soft); border-radius: var(--radius-sm);
    padding: .5rem; display: flex; flex-direction: column; gap: .1rem;
}
.tcard-counts strong { font-size: .95rem; color: var(--ink); }
.tcard-foot { margin-top: .75rem; }

.budget-bar { height: 8px; border-radius: 999px; background: #eef2f7; overflow: hidden; margin-bottom: .5rem; }
.budget-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--team-color, var(--primary))); }

.squad summary, .adjust summary {
    cursor: pointer; font-weight: 700; font-size: .88rem; color: var(--primary);
    padding: .5rem 0; list-style: none;
}
.squad summary::-webkit-details-marker, .adjust summary::-webkit-details-marker { display: none; }
.squad summary::before, .adjust summary::before { content: '\25B8 '; }
.squad[open] summary::before, .adjust[open] summary::before { content: '\25BE '; }
.squad-list { list-style: none; margin: 0; padding: 0; counter-reset: squad; }
.squad-list li {
    display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
    padding: .4rem 0; border-bottom: 1px solid var(--line-soft); font-size: .86rem;
}
.squad-list li:last-child { border-bottom: 0; }
.squad-list li img { width: 28px; height: 28px; border-radius: 7px; object-fit: cover; background: #eef2f7; }
.squad-list li::before {
    counter-increment: squad; content: counter(squad) '.';
    color: var(--muted); font-size: .76rem; min-width: 1.3rem; font-variant-numeric: tabular-nums;
}
.squad-list li.squad-fixed::before { content: ''; min-width: 0; }
.squad-name { flex: 1; min-width: 90px; }
.squad-role { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.squad-points { font-weight: 700; color: var(--good); font-variant-numeric: tabular-nums; }
.squad-fixed { background: #f8fafc; border-radius: 7px; padding: .4rem .5rem !important; }
.squad-fixed-row { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin-bottom: 1rem; }

.team-hero {
    display: flex; gap: 1rem; align-items: center; flex-wrap: wrap;
    background: linear-gradient(135deg, var(--navy), var(--team-color, #253a63));
    color: #fff; border-radius: 18px; padding: 1.25rem; margin-bottom: 1rem; box-shadow: var(--shadow-lg);
}
.team-hero img { width: 72px; height: 72px; border-radius: 14px; object-fit: contain; background: rgba(255, 255, 255, .92); }
.team-hero h1 { color: #fff; margin-bottom: .3rem; }
.team-hero-people { display: flex; flex-wrap: wrap; gap: .25rem 1rem; color: #cbd6ea; font-size: .86rem; margin-bottom: .5rem; }
.team-hero-people strong { color: #fff; }
.team-hero .pill { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .22); color: #fff; }
.team-hero .pill-good { background: rgba(16, 185, 129, .25); border-color: rgba(16, 185, 129, .45); }
.team-hero .pill-bad { background: rgba(239, 68, 68, .25); border-color: rgba(239, 68, 68, .5); }

.card-team-summary { border-top: 4px solid var(--team-color, var(--primary)); }
.cts-head { display: flex; gap: .75rem; align-items: center; margin-bottom: .75rem; }
.cts-head img { width: 56px; height: 56px; border-radius: 12px; object-fit: contain; background: #f1f5f9; }

.team-admin { border-top: 4px solid var(--team-color, var(--primary)); }
.team-admin-head { display: flex; gap: .65rem; align-items: center; margin-bottom: .6rem; }
.team-admin-head img { width: 44px; height: 44px; border-radius: 10px; object-fit: contain; background: #f1f5f9; }
.team-admin-head > div { flex: 1; min-width: 0; }
.team-admin-head h3 { margin: 0; font-size: 1rem; }
.team-admin-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .5rem 0; }

/* ---------------------------------------------------------------- forms */
.form { display: block; }
.form-grid { display: grid; gap: .9rem; }
.field { display: flex; flex-direction: column; gap: .3rem; }
.field-full { grid-column: 1 / -1; }
.field label, .form label { font-size: .84rem; font-weight: 700; color: var(--ink); }
.req { color: var(--bad); }

input[type="text"], input[type="tel"], input[type="email"], input[type="number"],
input[type="password"], input[type="search"], input[type="date"], select, textarea {
    width: 100%; min-height: 46px; padding: .6rem .75rem;
    border: 1px solid var(--line); border-radius: 10px;
    background: #fff; color: var(--ink); font: inherit; font-size: 1rem;
    -webkit-appearance: none; appearance: none;
}
textarea { min-height: 72px; resize: vertical; }
select {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right .6rem center; background-size: 18px;
    padding-right: 2.1rem;
}
input[type="color"] { width: 100%; min-height: 46px; padding: .25rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
input[type="file"] {
    width: 100%; padding: .6rem; border: 1px dashed var(--line); border-radius: 10px;
    background: #fbfcfe; font-size: .88rem;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px var(--primary-soft); }
input[readonly] { background: #f8fafc; color: var(--muted); }

.hint { font-size: .76rem; color: var(--muted); }
.field-error { font-size: .78rem; color: var(--bad); font-weight: 600; }
.form-foot { margin-top: 1.1rem; display: flex; flex-direction: column; gap: .6rem; }
.form-tight { margin-top: .5rem; padding-top: .5rem; border-top: 1px solid var(--line-soft); }
.form-tight .field { margin-bottom: .4rem; }
.form-inline { display: grid; gap: .5rem; }
.check { display: flex; align-items: flex-start; gap: .5rem; font-size: .85rem; font-weight: 500; margin: .4rem 0; }
.check input { width: 20px; height: 20px; min-height: 0; flex: 0 0 auto; margin-top: .1rem; }

.photo-preview { margin-top: .5rem; }
.photo-preview img {
    width: 110px; height: 110px; object-fit: cover; border-radius: 12px;
    border: 1px solid var(--line); background: #eef2f7;
}
.photo-preview-sm img { width: 72px; height: 72px; object-fit: contain; }

/* ------------------------------------------------------------- filters */
.filters {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: .8rem; margin-bottom: 1rem; box-shadow: var(--shadow);
    display: flex; flex-direction: column; gap: .6rem;
}
.search-box { position: relative; }
.search-box .ico { position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-box input { padding-left: 2.4rem; }
.filter-row { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.filter-row select { min-height: 44px; font-size: .88rem; }
.filter-row .btn { grid-column: span 1; }
.search-inline { display: flex; gap: .4rem; }
.search-inline input { min-height: 38px; }

.bulkbar {
    display: flex; flex-wrap: wrap; gap: .5rem; align-items: center;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
    padding: .6rem .8rem; margin-bottom: 1rem;
}

/* -------------------------------------------------------------- switches */
.toggle-row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: 1rem; }
.toggle-row form { margin: 0; }
.switch {
    display: inline-flex; align-items: center; gap: .55rem;
    min-height: 44px; padding: .45rem .85rem .45rem .6rem;
    border: 1px solid var(--line); border-radius: 999px; background: #fff;
    font: inherit; font-size: .86rem; cursor: pointer; color: var(--body);
}
.switch-dot {
    width: 36px; height: 20px; border-radius: 999px; background: #cbd5e1;
    position: relative; flex: 0 0 auto; transition: background .15s ease;
}
.switch-dot::after {
    content: ''; position: absolute; top: 2px; left: 2px;
    width: 16px; height: 16px; border-radius: 50%; background: #fff;
    transition: transform .15s ease; box-shadow: 0 1px 2px rgba(0, 0, 0, .3);
}
.switch.is-on { border-color: #a9e2d8; background: var(--good-soft); }
.switch.is-on .switch-dot { background: var(--good); }
.switch.is-on .switch-dot::after { transform: translateX(16px); }

/* --------------------------------------------------------- auction stage */
.auction-layout { display: grid; gap: 1rem; }
.stage-panel { padding: 1rem; }
.stage {
    background: linear-gradient(135deg, var(--navy), #1e2d4d);
    color: #fff; border-radius: 18px; padding: 1.25rem; margin-bottom: 1.25rem;
    box-shadow: var(--shadow-lg);
}
.stage-live { display: flex; flex-direction: column; align-items: center; gap: .75rem; text-align: center; }
.stage-photo {
    width: 150px; height: 150px; border-radius: 16px; object-fit: cover;
    background: #233452; border: 3px solid rgba(255, 255, 255, .25);
}
.stage .stage-info h2 { color: #fff; font-size: 1.5rem; margin: .3rem 0; }
.stage-meta { display: flex; flex-wrap: wrap; gap: .4rem .6rem; justify-content: center; font-size: .86rem; color: #c3cfe4; }
.stage-meta .muted { color: #93a4c0; }
.stage-bid { font-size: 1rem; color: #c3cfe4; margin: .4rem 0 0; }
.stage-bid strong { font-size: 2.2rem; color: var(--gold); display: inline-block; font-variant-numeric: tabular-nums; }
.stage-team { color: #e2e8f0; margin: .2rem 0 0; }
.stage-idle { text-align: center; padding: 1rem 0; }
.stage-idle h2 { color: inherit; }
.stage .stage-idle h2 { color: #fff; }

.stage-live-admin { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 1rem; margin: -1rem -1rem 1rem; }
.stage-live-admin .stage-info h2 { color: #fff; }
.stage-live-admin .stage-photo { width: 120px; height: 120px; }
.stage-live-admin .stage-bid { color: #c3cfe4; }
.stage-live-admin .stage-bid strong { font-size: 1.9rem; }
.stage-panel .stage-idle h2 { color: var(--ink); }

.bid-form { border-bottom: 1px solid var(--line-soft); padding-bottom: .9rem; margin-bottom: .9rem; }
.bid-row { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; align-items: end; }
.bid-row input { grid-column: span 2; font-size: 1.3rem; font-weight: 800; text-align: center; }
.bid-row select { grid-column: span 1; }
.bid-row .btn { grid-column: span 1; }
.quick-bids { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .5rem; }

.sell-form h3 { margin-bottom: .6rem; }
.sell-grid { display: grid; gap: .7rem; margin-bottom: .8rem; }
.sell-form .btn-xl { background: var(--good); border-color: var(--good); }
.sell-form .btn-xl:hover { background: #0b5f59; }
.stage-secondary { display: grid; gap: .5rem; margin-top: .8rem; }

.control-bar {
    display: flex; flex-wrap: wrap; gap: .5rem; align-items: center;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: .7rem .8rem; margin-bottom: 1rem; box-shadow: var(--shadow);
}
.control-bar form { margin: 0; }

.board { display: flex; flex-direction: column; gap: .35rem; }
.board-row {
    display: grid; grid-template-columns: 32px 1fr auto auto; gap: .6rem; align-items: center;
    padding: .55rem .6rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
    background: #fff; color: var(--body); font-size: .86rem;
}
.board-row:hover { text-decoration: none; background: #f8fafc; }
.board-row img { width: 32px; height: 32px; border-radius: 8px; object-fit: contain; background: #f1f5f9; }
.board-name { font-weight: 700; color: var(--ink); min-width: 0; }
.board-squad { font-variant-numeric: tabular-nums; text-align: right; font-size: .8rem; }
.board-points { font-weight: 800; color: var(--primary); font-variant-numeric: tabular-nums; text-align: right; }
.board-points small, .board-squad small { display: block; font-weight: 500; font-size: .68rem; }
.board-row-static { cursor: default; }

.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .7rem; }
.pick { margin: 0; }
.pick-btn {
    width: 100%; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: .7rem .6rem; display: flex; flex-direction: column; align-items: center; gap: .3rem;
    cursor: pointer; font: inherit; box-shadow: var(--shadow); transition: transform .08s ease;
}
.pick-btn:active { transform: scale(.97); }
.pick-btn:disabled { opacity: .55; cursor: not-allowed; }
.pick-btn img { width: 62px; height: 62px; border-radius: 12px; object-fit: cover; background: #eef2f7; }
.pick-name { font-weight: 700; color: var(--ink); font-size: .88rem; text-align: center; line-height: 1.2; }
.pick-meta { font-size: .73rem; color: var(--muted); text-align: center; }
.pick-cta {
    margin-top: .2rem; font-size: .72rem; font-weight: 800; letter-spacing: .04em;
    color: var(--primary); text-transform: uppercase;
}

/* ------------------------------------------------------- bid bar */
.bidbar { color: #fff; }
.bidbar.is-busy { opacity: .65; pointer-events: none; }
.bidbar-idle, .bidbar-live {
    background: linear-gradient(135deg, var(--navy), #1e2d4d);
    border-radius: var(--radius); margin-bottom: 1rem;
    box-shadow: var(--shadow-lg); overflow: hidden;
}
/* On the auction screen the stage below already shows who is live, so the
   bid bar there is controls only - and it sticks to the top while the
   owner scrolls the team board. */
.bidbar-compact { position: sticky; top: calc(var(--topbar-h) + 6px); z-index: 40; }
.bidbar-compact .bidbar-idle,
.bidbar-compact .bidbar-photo,
.bidbar-compact .bidbar-who { display: none; }
.bidbar-compact .bidbar-live { grid-template-columns: minmax(0, 1fr); }
.bidbar-idle {
    display: flex; align-items: center; gap: .7rem; padding: .9rem 1rem;
    color: #c3cfe4;
}
.bidbar-idle strong { color: #fff; display: block; font-size: .95rem; }
.bidbar-idle .ico { color: var(--gold); flex: 0 0 auto; }

.bidbar-live { display: grid; gap: .75rem; padding: .9rem 1rem; grid-template-columns: 64px minmax(0, 1fr); align-items: center; }
.bidbar-photo { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; background: #233452; }
.bidbar-who { min-width: 0; }
.bidbar-name { display: block; color: #fff; font-size: 1.05rem; line-height: 1.2; margin-top: .2rem; }
.bidbar-who .muted, .bidbar-bid .muted, .bidbar-mine { color: #9fb0cc !important; }
.bidbar-bid {
    grid-column: 1 / -1;
    background: rgba(255, 255, 255, .07); border-radius: var(--radius-sm);
    padding: .5rem .75rem; display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap;
}
.bidbar-amount { font-size: 1.7rem; font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; }
.bidbar-actions { grid-column: 1 / -1; display: flex; flex-direction: column; gap: .5rem; }
.bidbar-actions form { margin: 0; }
.bidbar-actions .btn-lg { width: 100%; background: var(--gold); border-color: var(--gold); color: #231504; font-weight: 800; }
.bidbar-actions .btn-lg:hover { background: #e0a51f; }
.bidbar-quick { display: flex; flex-wrap: wrap; gap: .35rem; }
.bidbar-quick .btn { border-color: rgba(255, 255, 255, .26); color: #e6ebf5; }
.bidbar-quick .btn:hover { background: rgba(255, 255, 255, .12); }
.bidbar-quick form { margin: 0; }
.bidbar-blocked {
    display: flex; align-items: center; gap: .4rem; margin: 0;
    background: rgba(255, 255, 255, .08); border-radius: var(--radius-sm);
    padding: .5rem .7rem; font-size: .85rem; color: #e6ebf5;
}
.bidbar-mine { margin: 0; font-size: .8rem; }
.bidbar-mine strong { color: #fff; }

.pcard-live { outline: 3px solid var(--gold); outline-offset: -1px; }
.pcard-livetag {
    position: absolute; top: .4rem; left: .4rem;
    background: var(--live); color: #fff; font-size: .62rem; font-weight: 800;
    letter-spacing: .08em; padding: .15rem .45rem; border-radius: 999px;
}
.pcard-photo { position: relative; }
.pcard-bid { margin-top: .4rem; }
.pcard-bid .btn strong { font-variant-numeric: tabular-nums; }
.pcard-hint { margin: .35rem 0 0; }

.bidbook { margin: .75rem 0; }
.bidbook h4 { margin: 0 0 .35rem; font-size: .85rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.bidbook-list { list-style: none; margin: 0; padding: 0; }
.bidbook-list li {
    display: flex; align-items: center; gap: .5rem; justify-content: space-between;
    padding: .35rem .5rem; border-radius: 7px; font-size: .85rem;
    border-bottom: 1px solid var(--line-soft);
}
.bidbook-list li.is-leading { background: var(--good-soft); font-weight: 700; }
.bidbook-team { flex: 1; min-width: 0; }
.bidbook-points { font-variant-numeric: tabular-nums; font-weight: 700; }

/* ------------------------------------------------- share link box */
.sharebox { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.sharebox input {
    flex: 1 1 260px; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .85rem; background: #f8fafc;
}
.sharebox .btn { flex: 0 0 auto; }

/* ---------------------------------------------------- guest / auth */
.area-guest .wrap { max-width: 520px; }
/* Guest pages that opt into the wide wrap (the owner registration form).
   Wider than the 520px auth pages, but still one readable column. */
.area-guest .wrap-wide { max-width: 640px; }

/* =====================================================================
   OWNER REGISTRATION  (public Marathi application form)
   ---------------------------------------------------------------------
   Styled after the printed form the village already knows: a centred
   masthead, the fee stated before anything is asked, then numbered
   questions. Devanagari sets taller than Latin, so headings here get
   extra line-height and the numbers sit on their own.
   ===================================================================== */
.mr { --mr-ink: #1b2947; }
.mr h1, .mr h2, .mr p, .mr li, .mr label { line-height: 1.6; }

.mr-head {
    background:
        radial-gradient(900px 320px at 80% -20%, rgba(240, 180, 41, .22), transparent 60%),
        linear-gradient(135deg, var(--navy) 0%, #1b2947 55%, #253a63 100%);
    color: #e8eefa;
    border-radius: 20px;
    padding: 1.5rem 1.15rem 1.35rem;
    margin-bottom: .85rem;
    text-align: center;
    box-shadow: var(--shadow-lg);
}
.mr-head h1 {
    color: #fff; font-size: 1.4rem; margin: 0 0 .35rem;
    letter-spacing: -.01em;
}
.mr-sub { color: var(--gold); font-weight: 700; font-size: .95rem; margin: 0; }
.mr-title {
    margin: 1rem auto .45rem; padding-top: .9rem;
    border-top: 1px solid rgba(255, 255, 255, .18);
    color: #fff; font-size: 1.15rem; font-weight: 800;
}
.mr-lead { color: #c3cfe4; font-size: .9rem; margin: 0 auto; max-width: 40ch; }

/* ------------------------------- the fee, stated up front ---------- */
.mr-fee {
    background: var(--card); border: 1px solid var(--line);
    border-left: 4px solid var(--gold); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 1rem 1.1rem; margin-bottom: 1rem;
}
.mr-fee-amount {
    display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem;
    padding-bottom: .7rem; margin-bottom: .7rem;
    border-bottom: 1px dashed var(--line);
}
.mr-fee-amount span { color: var(--muted); font-size: .85rem; }
.mr-fee-amount strong {
    color: var(--ink); font-size: 1.5rem; font-weight: 800; line-height: 1.15;
}
.mr-notes { margin: 0; padding-left: 1.5rem; list-style-type: devanagari; }
.mr-notes li { font-size: .88rem; color: var(--body); margin-bottom: .3rem; }
.mr-notes li:last-child { margin-bottom: 0; }
.mr-notes strong { color: var(--ink); }

/* ------------------------------- prize money ----------------------- */
.mr-prizes {
    background: var(--card); border: 1px solid var(--line);
    border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 1rem 1.1rem; margin-bottom: 1rem;
}
.mr-prizes h2 {
    font-size: .74rem; text-transform: uppercase; letter-spacing: .12em;
    color: var(--muted); margin: 0 0 .7rem;
}
.mr-prize-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.mr-prize {
    display: flex; align-items: center; gap: .65rem;
    border: 1px solid var(--line); border-radius: 12px;
    padding: .6rem .75rem; background: #fbfcfe;
}
.mr-prize-ord {
    display: grid; place-items: center; flex: 0 0 auto;
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--navy); color: #fff;
    font-size: .85rem; font-weight: 800; line-height: 1;
}
.mr-prize-place { flex: 1 1 auto; min-width: 0; font-size: .92rem; color: var(--ink); }
.mr-prize-amount {
    flex: 0 0 auto; font-size: 1.1rem; font-weight: 800; color: var(--ink);
    line-height: 1.15;
}
/* First place carries the gold, so the ranking reads at a glance. */
.mr-prize-1 { border-color: rgba(240, 180, 41, .55); background: rgba(240, 180, 41, .1); }
.mr-prize-1 .mr-prize-ord { background: var(--gold); color: var(--navy); }
.mr-prize-1 .mr-prize-amount { font-size: 1.25rem; }
/* ------------------------------- numbered questions ---------------- */
.mr .field label { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.mr-num {
    display: grid; place-items: center; flex: 0 0 auto;
    width: 24px; height: 24px; border-radius: 50%;
    background: var(--navy); color: var(--gold);
    font-size: .78rem; font-weight: 800; line-height: 1;
}

.ownreg-form { padding: 1.25rem 1.1rem; }
.form-section { margin-bottom: 1.5rem; }
.form-section:last-of-type { margin-bottom: 1rem; }
.form-section > h2 {
    display: flex; align-items: center; gap: .55rem;
    font-size: 1rem; margin: 0 0 .9rem;
    padding-bottom: .6rem; border-bottom: 1px solid var(--line-soft);
}
.form-step {
    display: grid; place-items: center; flex: 0 0 auto;
    width: 26px; height: 26px; border-radius: 50%;
    background: var(--primary-soft); color: var(--primary);
    font-size: .8rem; font-weight: 800;
}
.field.is-invalid input, .field.is-invalid textarea, .field.is-invalid select {
    border-color: var(--bad); background: #fffafa;
}

/* Friendly tap target for the optional photo */
.filedrop {
    display: flex; align-items: center; gap: .7rem;
    border: 1px dashed var(--line); border-radius: 12px;
    padding: .8rem .9rem; background: #fbfcfe; cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}
.filedrop:hover { border-color: var(--primary); background: var(--primary-soft); }
.filedrop .ico { color: var(--primary); flex: 0 0 auto; }
.filedrop-text { display: flex; flex-direction: column; }
.filedrop-text strong { font-size: .9rem; color: var(--ink); }
.filedrop-text small { font-size: .74rem; color: var(--muted); }
.filedrop-input {
    position: absolute; width: 1px; height: 1px; opacity: 0;
    overflow: hidden; clip: rect(0, 0, 0, 0);
}
.filedrop-input:focus-visible + .filedrop { outline: 3px solid var(--gold); outline-offset: 2px; }

.ownreg-note {
    display: flex; gap: .5rem; align-items: flex-start;
    background: var(--warn-soft); border: 1px solid #f2d49c; color: #8a4409;
    border-radius: var(--radius-sm); padding: .7rem .8rem;
    font-size: .84rem; line-height: 1.45; margin-bottom: 1rem;
}
.ownreg-note .ico { flex: 0 0 auto; margin-top: .1rem; }
.ownreg-privacy { text-align: center; margin: .7rem 0 0; }

/* ----------------------------- done / closed ---------------------- */
.ownreg-done, .ownreg-closed {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 2rem 1.25rem; text-align: center; margin-bottom: 1rem;
}
.ownreg-done { border-top: 4px solid var(--good); }
.ownreg-done h1, .ownreg-closed h1 { font-size: 1.5rem; }
.ownreg-done-mark {
    width: 76px; height: 76px; margin: 0 auto 1rem;
    display: grid; place-items: center; border-radius: 50%;
    background: var(--good-soft); color: var(--good);
}
.ownreg-done-lead { color: var(--muted); max-width: 44ch; margin: 0 auto 1.1rem; }
.ownreg-ref {
    display: inline-flex; flex-direction: column; gap: .2rem; align-items: center;
    background: var(--ink); color: #fff; border-radius: 12px;
    padding: .6rem 1.4rem; margin: 0 0 1rem;
    font-size: .7rem; letter-spacing: .12em; text-transform: uppercase;
}
.ownreg-ref strong {
    font-size: 1.5rem; letter-spacing: .06em; text-transform: none; color: var(--gold);
    font-variant-numeric: tabular-nums;
}
.ownreg-next { text-align: left; margin: 1.5rem auto 0; max-width: 460px; }
.ownreg-next h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.ownreg-steps { list-style: none; margin: 0; padding: 0; }
.ownreg-steps li {
    display: flex; gap: .7rem; align-items: flex-start;
    padding: .6rem 0; border-bottom: 1px solid var(--line-soft); font-size: .88rem;
}
.ownreg-steps li:last-child { border-bottom: 0; }
.ownreg-steps li > span {
    flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%;
    display: grid; place-items: center; background: var(--primary-soft);
    color: var(--primary); font-weight: 800; font-size: .78rem;
}
.ownreg-steps strong { display: block; color: var(--ink); }
.ownreg-steps div { color: var(--muted); }
.ownreg-done-actions { justify-content: center; margin-top: 1.25rem; }

@media (min-width: 620px) {
    .mr-head { padding: 2.25rem 2rem 2rem; }
    .mr-head h1 { font-size: 1.9rem; }
    .mr-title { font-size: 1.4rem; }
    .mr-fee { padding: 1.25rem 1.5rem; }
    .ownreg-form { padding: 1.75rem; }
}
.auth-roles {
    margin-top: 1rem; padding-top: .85rem; border-top: 1px solid var(--line-soft);
}
.auth-roles p { margin: 0 0 .3rem; }
.auth-alt { margin-top: 1rem; font-size: .9rem; text-align: center; }

.my-reg { display: grid; gap: 1rem; }
.my-reg img { width: 110px; height: 110px; object-fit: cover; border-radius: 14px; border: 1px solid var(--line); }

/* ------------------------------------------------------- quick / reports */
.quick-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem; }
.quick {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
    padding: .85rem .7rem; display: flex; flex-direction: column; gap: .4rem;
    color: var(--ink); font-weight: 600; font-size: .86rem; box-shadow: var(--shadow);
}
.quick:hover { text-decoration: none; border-color: var(--primary); }
.quick .ico { color: var(--primary); }

.report-grid { display: grid; grid-template-columns: 1fr; gap: .7rem; }
.report-card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: .9rem; display: flex; flex-direction: column; gap: .3rem;
    color: var(--ink); box-shadow: var(--shadow);
}
.report-card:hover { text-decoration: none; border-color: var(--primary); }
.report-card .ico { color: var(--primary); }

.pager { display: flex; align-items: center; justify-content: center; gap: .75rem; margin: 1rem 0; }
.inline-details > summary { display: inline-flex; list-style: none; }
.inline-details > summary::-webkit-details-marker { display: none; }

/* --------------------------------------------------------------- footer */
.site-footer {
    border-top: 1px solid var(--line); background: #fff;
    margin-top: 2rem; padding: 1.25rem 0; font-size: .85rem; color: var(--muted);
}
.site-footer p { margin: 0 0 .25rem; }

/* ------------------------------------------------------------- toasts */
.toast-wrap {
    position: fixed; left: 50%; transform: translateX(-50%);
    bottom: calc(var(--bottom-h) + 12px + env(safe-area-inset-bottom, 0px));
    z-index: 120; display: flex; flex-direction: column; gap: .4rem;
    width: min(92vw, 460px);
}
.toast {
    background: var(--ink); color: #fff; padding: .7rem .9rem; border-radius: 10px;
    font-size: .88rem; box-shadow: var(--shadow-lg); animation: toastin .18s ease-out;
}
.toast-success { background: #05504a; }
.toast-error { background: #8c1c14; }
@keyframes toastin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.is-busy { opacity: .6; pointer-events: none; }

/* =====================================================================
   TABLET
   ===================================================================== */
@media (min-width: 620px) {
    h1 { font-size: 1.9rem; }
    .hero { padding: 2rem 1.75rem; grid-template-columns: 1.4fr .9fr; align-items: center; }
    .hero h1 { font-size: 2.3rem; }
    .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .two-col, .info-grid { grid-template-columns: 1fr 1fr; }
    .form-grid { grid-template-columns: 1fr 1fr; }
    .team-grid, .team-admin-grid { grid-template-columns: 1fr 1fr; }
    .filter-row { grid-template-columns: repeat(4, 1fr); }
    .report-grid { grid-template-columns: 1fr 1fr; }
    .quick-grid { grid-template-columns: repeat(3, 1fr); }
    .sell-grid { grid-template-columns: 1fr 1fr; }
    .stage-secondary { grid-template-columns: 1fr 1fr; }
    .bidbar-live { grid-template-columns: 72px minmax(0, 1.4fr) minmax(0, 1fr); }
    .bidbar-bid { grid-column: auto; flex-direction: column; align-items: flex-start; gap: 0; }
    .bidbar-actions { grid-column: 1 / -1; }
    .my-reg { grid-template-columns: 130px 1fr; align-items: start; }
    .stage-live { flex-direction: row; text-align: left; align-items: center; gap: 1.25rem; }
    .stage-meta { justify-content: flex-start; }
    .pcard-grid { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); }
}

/* =====================================================================
   DESKTOP
   ===================================================================== */
@media (min-width: 900px) {
    body { padding-bottom: 0; }
    .bottomnav { display: none; }
    .nav-toggle { display: none; }
    .nav-desktop { display: block; }
    .nav-desktop ul { display: flex; gap: .15rem; list-style: none; margin: 0; padding: 0; align-items: center; }
    .nav-desktop a {
        display: flex; align-items: center; gap: .35rem;
        padding: .5rem .65rem; border-radius: 9px;
        color: #c3cfe4; font-size: .85rem; font-weight: 600; white-space: nowrap;
    }
    .nav-desktop a:hover { background: rgba(255, 255, 255, .09); color: #fff; text-decoration: none; }
    .nav-desktop a.is-active { background: rgba(240, 180, 41, .18); color: #fff; }
    .nav-desktop .ico-sm { width: 15px; height: 15px; }

    .wrap { padding: 1.5rem 1.25rem 3rem; }
    .stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .team-grid { grid-template-columns: repeat(2, 1fr); }
    .team-admin-grid { grid-template-columns: repeat(2, 1fr); }
    .auction-layout { grid-template-columns: 1.55fr 1fr; align-items: start; }
    .report-grid { grid-template-columns: repeat(3, 1fr); }
    .quick-grid { grid-template-columns: repeat(4, 1fr); }
    .team-strip { grid-template-columns: repeat(4, 1fr); }
    .filters { flex-direction: row; align-items: center; }
    .filters .search-box { flex: 1 1 280px; }
    .filter-row { display: flex; flex-wrap: wrap; }
    .filter-row select { width: auto; min-width: 150px; }
    .stage-photo { width: 190px; height: 190px; }
    .stage-bid strong { font-size: 2.8rem; }
    .bidbar-live { grid-template-columns: 80px minmax(0, 1.2fr) auto minmax(260px, auto); align-items: center; }
    .bidbar-actions { grid-column: auto; }
    .bidbar-actions .btn-lg { width: auto; min-width: 180px; }
}

@media (min-width: 1200px) {
    .team-grid { grid-template-columns: repeat(3, 1fr); }
    .pcard-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}

/* --------------------------------------------------------------- print */
@media print {
    .topbar, .bottomnav, .drawer, .site-footer, .page-actions, .filters, .control-bar,
    .toggle-row, .cell-actions, .btn { display: none !important; }
    body { background: #fff; padding: 0; }
    .card, .table { box-shadow: none; border-color: #ccc; }
}

/* ------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001s !important; transition-duration: .001s !important; }
}

/* Payment proof thumbnail on the owner applications table. The whole
   point is to open it full size, so it reads as a link, not a portrait. */
.proof-thumb {
    display: inline-block; line-height: 0;
    border: 1px solid var(--line); border-radius: 8px;
    padding: 2px; background: #fff;
}
.proof-thumb:hover { border-color: var(--primary); }
.proof-thumb img { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; }
