:root {
    --navy: #07111f;
    --navy-2: #12263f;
    --ink: #121820;
    --heading: #07111f;
    --muted: #64707d;
    --gold: #d6a21e;
    --gold-2: #f0c14b;
    --cream: #f3f1ec;
    --paper: #ffffff;
    --control: #ffffff;
    --line: #e4e0d6;
    --ok: #17824a;
    --err: #c81e1e;
    --open: #0f9d58;
    --scheduled: #c48a12;
    --closed: #6b7280;
    --shadow: 0 18px 50px rgba(7, 17, 31, 0.12);
    --shadow-hover: 0 24px 60px rgba(7, 17, 31, 0.18);
    --ease: cubic-bezier(.22, 1, .36, 1);
    --filter-card: rgba(255,255,255,.94);
    --section-alt-from: #ebe6db;
    --section-alt-to: #f3f1ec;
    --bid-from: #fff8e8;
    --bid-to: #f7f1e3;
    --admin-bg: #f3eee3;
    --action-bg: #f4efe4;
    --select-hover: #f7edd0;
    --autofill: #ffffff;
    --file-bg: #faf7f0;
    --font-body: "Barlow", "Segoe UI", sans-serif;
    --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
    color-scheme: light;
}

html[data-theme="dark"] {
    --ink: #e8eef6;
    --heading: #f4efe4;
    --muted: #9aa6b4;
    --cream: #0b1118;
    --paper: #151c26;
    --control: #1c2532;
    --line: #2a3544;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
    --shadow-hover: 0 24px 60px rgba(0, 0, 0, 0.45);
    --filter-card: rgba(21, 28, 38, .94);
    --section-alt-from: #101820;
    --section-alt-to: #0b1118;
    --bid-from: #2a2416;
    --bid-to: #1e1a12;
    --admin-bg: #0b1118;
    --action-bg: #222b38;
    --select-hover: #2c2618;
    --autofill: #1c2532;
    --file-bg: #1c2532;
    --closed: #8b939e;
    color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
    font-family: var(--font-body);
    font-feature-settings: "tnum" 1;
    color: var(--ink);
    background:
        radial-gradient(1200px 400px at 10% -10%, rgba(214,162,30,.12), transparent 50%),
        var(--cream);
    min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, .brand strong {
    font-family: var(--font-display);
    font-weight: 700;
    margin: 0 0 .4rem;
    letter-spacing: .01em;
    text-transform: uppercase;
    color: var(--heading);
}
p { margin: 0 0 1rem; }
.container {
    width: min(1520px, calc(100% - clamp(.5rem, 5vw, 3.125rem)));
    max-width: 1520px;
    margin: 0 auto;
    padding-left: clamp(.625rem, 1.25vw, 1rem);
    padding-right: clamp(.625rem, 1.25vw, 1rem);
}
.muted { color: var(--muted); }
.eyebrow {
    letter-spacing: .16em;
    text-transform: uppercase;
    font-size: .72rem;
    color: var(--gold);
    font-weight: 800;
    margin-bottom: .45rem;
}

.btn, button.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    padding: .8rem 1.25rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn-gold { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: var(--navy); box-shadow: 0 8px 20px rgba(214,162,30,.28); }
.btn-ghost { background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.28); backdrop-filter: blur(8px); }
.btn-small { padding: .4rem .7rem; font-size: .85rem; background: var(--navy); color: #fff; border-radius: 8px; }
.link-btn { background: none; border: 0; color: inherit; cursor: pointer; font: inherit; text-decoration: underline; padding: 0; }
.field-error { color: var(--err); margin: .2rem 0 .8rem; font-size: .9rem; }

.site-header {
    background: rgba(7, 17, 31, .78);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.header-bar { display: flex; align-items: center; gap: .75rem; min-height: 78px; }
.brand { display: flex; align-items: center; gap: .7rem; color: #fff; text-decoration: none; }
.site-header .brand strong,
.admin-sidebar .brand strong { color: #fff; }
.brand-mark { animation: float 3.6s ease-in-out infinite; }
.brand small { display: block; color: #d5c7a1; font-size: .75rem; }
.theme-toggle {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.28);
    background: rgba(255,255,255,.08);
    color: #fff;
    cursor: pointer;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    padding: 0;
}
.theme-toggle:hover { background: rgba(255,255,255,.16); }
.theme-toggle svg { display: none; width: 20px; height: 20px; }
html:not([data-theme="dark"]) .theme-toggle .icon-moon { display: block; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
.admin-top .theme-toggle {
    border-color: var(--line);
    background: var(--paper);
    color: var(--ink);
}
.header-search {
    flex: 0 1 240px;
    width: 100%;
    max-width: 240px;
    display: flex;
    align-items: stretch;
    background: #fff;
    border-radius: 999px;
    overflow: hidden;
    box-shadow: 0 8px 28px rgba(0,0,0,.18);
    border: 0;
    min-height: 48px;
    transition: box-shadow .25s var(--ease);
}
.header-search:focus-within {
    box-shadow: 0 0 0 4px rgba(214,162,30,.28), 0 10px 28px rgba(0,0,0,.2);
}
.header-search .search-icon {
    display: grid;
    place-items: center;
    color: #8a8170;
    padding-left: 1rem;
}
.header-search input {
    flex: 1;
    border: 0;
    padding: 0 .75rem;
    font: inherit;
    background: transparent;
    color: #121820;
    box-shadow: none;
    margin: 0;
    border-radius: 0;
    min-width: 0;
}
.header-search input:focus { box-shadow: none; }
.header-search button {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    margin: 0;
    border-radius: 0;
    background: linear-gradient(180deg, var(--gold-2), var(--gold));
    color: var(--navy);
    font: inherit;
    font-weight: 800;
    padding: 0 1rem;
    align-self: stretch;
    transition: filter .2s, transform .2s;
}
.header-search button:hover { filter: brightness(1.08); }
.header-nav { display: flex; align-items: center; gap: .55rem; margin-left: auto; }
.header-logout { display: flex; margin: 0; }
.btn-sair {
    padding: .42rem .9rem;
    font-size: .88rem;
    border-radius: 999px;
}
.header-nav a { color: #fff; text-decoration: none; font-weight: 600; position: relative; }
.header-nav a::after {
    content: "";
    position: absolute;
    left: 0; bottom: -6px;
    width: 0; height: 2px;
    background: var(--gold);
    transition: width .25s var(--ease);
}
.header-nav a:hover::after { width: 100%; }
.menu-toggle { display: none; background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.3); border-radius: 8px; padding: .4rem .6rem; }

.home-intro {
    position: relative;
    isolation: isolate;
    background: var(--cream);
}
.hero {
    position: relative;
    z-index: 2;
    color: #fff;
    padding: 5.5rem 0 3.2rem;
}
.hero-media {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 76%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}
.hero-slide {
    position: absolute;
    inset: 0;
    background: center/cover no-repeat;
    opacity: 0;
    transform: scale(1.04);
    transition: opacity 1.1s ease, transform 8s ease;
}
.hero-slide.is-active {
    opacity: 1;
    transform: scale(1.1);
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(7,17,31,.2) 0%, transparent 20%, rgba(7,17,31,.4) 64%, var(--cream) 100%),
        linear-gradient(90deg, rgba(7,17,31,.88) 8%, rgba(7,17,31,.55) 55%, rgba(7,17,31,.28));
}
.home-intro::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 36%;
    bottom: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(180deg, transparent 0%, color-mix(in srgb, var(--cream) 35%, transparent) 36%, var(--cream) 78%);
}
.section-from-hero {
    position: relative;
    z-index: 2;
    padding-top: 0.6rem;
    padding-bottom: 3.4rem;
}
.hero-grid { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 300px); gap: 2rem; align-items: center; }
.hero-copy { max-width: 34rem; }
.hero-lead {
    max-width: 28rem;
    margin: 0 0 1.15rem;
    line-height: 1.45;
    color: rgba(255,255,255,.86);
}
.hero-title {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .12em;
    margin: 0 0 1.15rem;
    color: #fff;
}
.hero-title-lead {
    display: block;
    font-size: clamp(1.55rem, 3.4vw, 2.35rem);
    font-weight: 600;
    letter-spacing: .12em;
    line-height: 1.05;
    color: rgba(255,255,255,.78);
}
.hero-title-main {
    display: block;
    font-size: clamp(2.6rem, 5.2vw, 4.4rem);
    font-weight: 800;
    letter-spacing: -.035em;
    line-height: .84;
}
.hero-title-main em {
    font-style: normal;
    background: linear-gradient(185deg, #ffe08a 0%, #f0c14b 38%, #d6a21e 72%, #a97b12 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 10px 26px rgba(214, 162, 30, .32));
}
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; }
.filter-card {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 300px;
    justify-self: end;
    background: var(--filter-card);
    color: var(--ink);
    padding: .9rem 1rem 1rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
    opacity: .65;
}
.filter-card h2 {
    font-size: 1.15rem;
    margin-bottom: .55rem;
}
.filter-card.reveal {
    animation-name: rise-filter;
}
.filter-card label { display: block; font-weight: 600; margin-bottom: .5rem; font-size: .82rem; }
.auth-card label, .panel label, .form-grid label { display: block; font-weight: 600; margin-bottom: .85rem; }
.filter-card input,
.filter-card select {
    margin-top: .2rem;
    padding: .48rem .7rem;
    border-radius: 10px;
    font-size: .88rem;
}
.filter-card .btn {
    width: 100%;
    padding: .55rem .85rem;
    font-size: .88rem;
}
input, select, textarea {
    width: 100%;
    margin-top: .35rem;
    padding: .8rem .95rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    font: inherit;
    background: var(--control);
    color: var(--ink);
    transition: border-color .2s, box-shadow .2s, transform .2s;
    appearance: none;
    -webkit-appearance: none;
}
select {
    background-image: linear-gradient(45deg, transparent 50%, #8a8170 50%), linear-gradient(135deg, #8a8170 50%, transparent 50%);
    background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 2.4rem;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #e2c56a;
    box-shadow: 0 0 0 4px rgba(214,162,30,.16);
}
input[type="file"] {
    padding: .7rem;
    background: var(--file-bg);
    border-style: dashed;
    cursor: pointer;
}
input[type="file"]::file-selector-button {
    border: 0;
    background: var(--navy);
    color: #fff;
    border-radius: 999px;
    padding: .55rem .9rem;
    margin-right: .8rem;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}
.auth-card .check {
    display: inline-flex;
    margin-bottom: 0;
}
.check {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    margin: 0;
}
.check input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}
.check-box {
    width: 22px;
    height: 22px;
    border-radius: 7px;
    border: 1.5px solid #d4c7a8;
    background: var(--control);
    box-shadow: inset 0 1px 2px rgba(7,17,31,.04);
    position: relative;
    flex: 0 0 auto;
    transition: background .2s, border-color .2s, box-shadow .2s;
}
.check-box::after {
    content: "";
    position: absolute;
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform .18s var(--ease);
}
.check input:checked + .check-box {
    background: var(--gold);
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(214,162,30,.16);
}
.check input:checked + .check-box::after { transform: rotate(45deg) scale(1); }
.check:hover .check-box { border-color: var(--gold); }

.ui-select {
    position: relative;
    width: 100%;
    margin-top: .35rem;
}
.ui-select-native {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
}
.ui-select-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    padding: .85rem 1rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--control);
    color: var(--ink);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    box-shadow: 0 8px 20px rgba(7,17,31,.04);
    transition: border-color .2s, box-shadow .2s, transform .2s;
}
.ui-select-trigger::after {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 2px solid #8a8170;
    border-bottom: 2px solid #8a8170;
    transform: rotate(45deg);
    transition: transform .2s var(--ease);
    flex: 0 0 auto;
}
.ui-select.is-open .ui-select-trigger {
    border-color: #e2c56a;
    box-shadow: 0 0 0 4px rgba(214,162,30,.16);
}
.ui-select.is-open .ui-select-trigger::after { transform: rotate(225deg); }
.ui-select-menu {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    z-index: 40;
    margin: 0;
    padding: .4rem;
    list-style: none;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(7,17,31,.16);
    display: none;
    max-height: 260px;
    overflow: auto;
    animation: rise .2s var(--ease);
}
.ui-select.is-open .ui-select-menu { display: block; }
.ui-select-menu li {
    padding: .7rem .85rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: background .15s, color .15s;
}
.ui-select-menu li:hover,
.ui-select-menu li.is-active {
    background: var(--select-hover);
    color: var(--heading);
}
.ui-select.is-compact {
    width: auto;
    min-width: 132px;
    margin-top: 0;
}
.ui-select.is-compact .ui-select-trigger {
    padding: .45rem .7rem;
    border-radius: 10px;
    font-size: .9rem;
}

.section { padding: 3.4rem 0; }
.section-alt { background: linear-gradient(180deg, var(--section-alt-from), var(--section-alt-to)); }
.section-head { display: flex; justify-content: space-between; align-items: end; margin-bottom: 1.4rem; gap: 1rem; }
.section-head a,
.text-link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: var(--heading);
    text-decoration: none;
    font-weight: 800;
    font-size: .9rem;
    padding: .5rem .95rem;
    border-radius: 999px;
    background: var(--paper);
    box-shadow: 0 8px 18px rgba(7,17,31,.08);
    transition: transform .25s var(--ease), background .25s, color .25s;
}
.section-head a::after,
.text-link::after {
    content: "→";
    font-size: 1rem;
    transition: transform .25s var(--ease);
}
.section-head a:hover,
.text-link:hover {
    background: var(--navy);
    color: #fff;
    transform: translateX(3px);
}
.section-head a:hover::after,
.text-link:hover::after { transform: translateX(3px); }
.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    margin: .2rem 0 1.1rem;
}
.auth-link {
    color: #8a7350;
    font-weight: 700;
    font-size: .92rem;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color .2s, border-color .2s;
}
.auth-link:hover { color: var(--heading); border-bottom-color: var(--gold); }
.auth-switch {
    text-align: center;
    margin: 1.1rem 0 0;
    color: var(--muted);
}
.auth-switch a {
    color: var(--heading);
    font-weight: 800;
    text-decoration: none;
    border-bottom: 1px solid var(--gold);
}
.auth-switch a:hover { color: #9a7710; }
.btn-block { width: 100%; }
.table a {
    color: var(--heading);
    font-weight: 700;
    text-decoration: none;
}
.table a:hover { color: #9a7710; }

.category-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1.1rem;
}
.category-card {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    min-height: 240px;
    color: #fff;
    text-decoration: none;
    box-shadow: var(--shadow);
}
.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
    transition: transform 1.1s var(--ease);
}
.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(7,17,31,.78));
}
.category-card-copy {
    position: absolute;
    left: 1.1rem;
    right: 1.1rem;
    bottom: 1.1rem;
    z-index: 1;
}
.category-card small { display: block; opacity: .8; font-size: .8rem; }
.category-card strong { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; font-size: clamp(1.45rem, 2.2vw, 2rem); color: #fff; }
.category-card:hover img { transform: scale(1.08); }
.category-card:hover { transform: translateY(-4px); transition: transform .3s var(--ease); }

.category-pills { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1rem; }
.category-pills a {
    padding: .45rem .9rem;
    border-radius: 999px;
    background: var(--paper);
    color: var(--heading);
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 6px 16px rgba(7,17,31,.06);
}
.category-pills a.is-active { background: var(--navy); color: #fff; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.1rem; }
.lot-card {
    background: var(--paper);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.lot-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-hover); }
.lot-card-media { position: relative; display: block; aspect-ratio: 16/10; background: #d7d0bf; overflow: hidden; }
.lot-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.lot-card:hover .lot-card-media img { transform: scale(1.07); }
.lot-card-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(7,17,31,.28));
    pointer-events: none;
}
.badge { position: absolute; top: .7rem; left: .7rem; border-radius: 999px; padding: .25rem .6rem; font-size: .75rem; font-weight: 700; color: #fff; z-index: 1; }
.badge-cat { left: auto; right: .7rem; background: rgba(7,17,31,.78); }
.badge-open { background: var(--open); }
.badge-scheduled { background: var(--scheduled); }
.badge-closed { background: var(--closed); }
.lot-card-body { padding: 1rem 1rem 1.1rem; }
.lot-kicker { color: var(--gold); font-weight: 800; font-size: .8rem; margin: 0; }
.lot-card-body h3 a { color: var(--heading); text-decoration: none; font-family: var(--font-display); text-transform: uppercase; }
.lot-card-meta strong,
.stat-row strong,
.js-countdown {
    font-family: var(--font-display);
    font-variant-numeric: tabular-nums;
}
.lot-card-meta { display: flex; justify-content: space-between; gap: 1rem; margin-top: .8rem; }
.lot-card-meta span, .stat-row span { display: block; color: var(--muted); font-size: .8rem; }
.lot-card-stats { margin: .7rem 0 0; color: var(--muted); font-size: .9rem; }
.js-countdown.is-urgent { color: #c81e1e; animation: pulse 1s ease-in-out infinite; }

.page-head { padding: 2.2rem 0 0; }
.filters, .inline-filters { display: flex; gap: .7rem; flex-wrap: wrap; margin: 1rem 0; align-items: center; }
.filters input, .filters select, .inline-filters input, .filters .ui-select { width: auto; min-width: 180px; margin-top: 0; }

.lot-page { padding: 2rem 0; }
.lot-layout { display: grid; grid-template-columns: 1.2fr .8fr; gap: 1.5rem; }
.gallery-main { width: 100%; border-radius: 20px; min-height: 320px; object-fit: cover; background: #d7d0bf; animation: fadeIn .5s var(--ease); }
.gallery-thumbs { display: flex; gap: .5rem; margin-top: .6rem; flex-wrap: wrap; }
.gallery-thumbs button { padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: none; transition: transform .2s, border-color .2s; }
.gallery-thumbs button:hover { transform: translateY(-2px); border-color: var(--gold); }
.gallery-thumbs img { width: 78px; height: 58px; object-fit: cover; }
.lot-panel { background: var(--paper); border-radius: 20px; padding: 1.4rem; box-shadow: var(--shadow); }
.stat-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1rem 0; }
.stat-row strong { font-size: 1.5rem; }
.bid-box { background: linear-gradient(180deg, var(--bid-from), var(--bid-to)); border-radius: 14px; padding: 1rem; }
.bid-history { list-style: none; padding: 0; margin: 0; }
.bid-history li { display: grid; grid-template-columns: 7rem 1fr 1fr; gap: .5rem; padding: .65rem 0; border-bottom: 1px solid var(--line); }
.specs { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem 1rem; }
.specs div { background: var(--paper); padding: .7rem .8rem; border-radius: 10px; }
.specs dt { color: var(--muted); font-size: .8rem; }
.specs dd { margin: .2rem 0 0; font-weight: 700; }
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 1.5rem; }
.prose { white-space: pre-wrap; }

.auth-page { display: grid; place-items: center; padding: 3.4rem 1rem; }
.auth-card, .panel { width: min(440px, 100%); background: var(--paper); padding: 1.8rem; border-radius: 24px; box-shadow: var(--shadow); animation: rise .5s var(--ease); }
.auth-card h1 { margin-bottom: 1.1rem; }
.panel { width: 100%; }
.btn-block { width: 100%; }
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--ink);
    -webkit-box-shadow: 0 0 0 1000px var(--autofill) inset;
    transition: background-color 9999s ease-out 0s;
}
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }

.flash { padding: .8rem 1rem; border-radius: 12px; margin: 1rem 0; animation: rise .4s var(--ease); }
.flash-ok { background: #e6f6ec; color: var(--ok); }
.flash-err { background: #fde8e8; color: var(--err); }
html[data-theme="dark"] .flash-ok { background: #163322; }
html[data-theme="dark"] .flash-err { background: #3a1a1a; }
.empty { background: var(--paper); padding: 1.4rem; border-radius: 12px; }

.site-footer { background: var(--navy); color: #d9d2c3; padding: 2.4rem 0 1rem; margin-top: 2rem; }
.site-footer strong { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 1.5rem; }
.footer-grid a { display: block; color: #fff; margin: .3rem 0; text-decoration: none; }
.copyright { text-align: center; opacity: .7; margin-top: 1.5rem; }

.admin-body { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; background: var(--admin-bg); }
.admin-sidebar { background: var(--navy); color: #fff; padding: 1.3rem 1rem; }
.admin-sidebar nav { display: grid; gap: .4rem; margin-top: 1.2rem; }
.admin-sidebar a { color: #fff; text-decoration: none; padding: .55rem .7rem; border-radius: 8px; }
.admin-sidebar a.is-active, .admin-sidebar a:hover { background: rgba(201,162,39,.2); }
.admin-main { padding: 1.4rem; }
.admin-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.admin-top div { display: flex; align-items: center; gap: .8rem; }
.admin-top span { font-weight: 700; color: var(--heading); }
.btn-admin-out {
    background: var(--navy);
    color: #fff;
    border: 0;
    padding: .45rem 1rem;
    font-size: .88rem;
    border-radius: 999px;
}
.btn-admin-out:hover { background: #1b3354; }
.table-actions { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.table-actions form { display: inline; margin: 0; }
.table .action-btn,
.action-btn {
    display: inline-flex;
    align-items: center;
    padding: .35rem .75rem;
    border-radius: 999px;
    background: var(--action-bg);
    color: var(--heading);
    font: inherit;
    font-weight: 700;
    font-size: .82rem;
    border: 0;
    cursor: pointer;
    text-decoration: none;
}
.table .action-btn:hover,
.action-btn:hover { background: var(--navy); color: #fff; }
.table .action-danger,
.action-danger { background: #fde8e8; color: var(--err); }
.table .action-danger:hover,
.action-danger:hover { background: var(--err); color: #fff; }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; margin-bottom: 1.2rem; }
.stat-cards article { background: var(--paper); padding: 1rem; border-radius: 12px; }
.stat-cards strong { display: block; font-size: 1.8rem; }
.admin-split { display: grid; grid-template-columns: 1.2fr .8fr; gap: 1rem; }
.table { width: 100%; border-collapse: collapse; background: var(--paper); border-radius: 12px; overflow: hidden; }
.table th, .table td { text-align: left; padding: .75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table td form { display: inline; margin: 0; }
.thumb { width: 64px; height: 44px; object-fit: cover; border-radius: 6px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.form-grid .full { grid-column: 1 / -1; }
.inline-form { display: flex; gap: .4rem; align-items: center; }
.inline-form select { width: auto; }
.admin-photos { display: flex; gap: .7rem; flex-wrap: wrap; }
.admin-photos img { width: 120px; height: 80px; object-fit: cover; border-radius: 8px; }
.plain-list { list-style: none; padding: 0; }
.plain-list li { padding: .55rem 0; border-bottom: 1px solid var(--line); display: grid; }
.plain-list a { color: var(--heading); font-weight: 700; text-decoration: none; }
.plain-list a:hover { color: #9a7710; }
.pagination { display: flex; gap: .4rem; margin: 1.2rem 0; flex-wrap: wrap; }
.pagination a, .pagination span { padding: .4rem .7rem; background: var(--paper); border-radius: 6px; text-decoration: none; }
.pagination .is-current { background: var(--navy); color: #fff; }
.pagination .is-disabled { opacity: .5; }

.reveal {
    opacity: 0;
    transform: translateY(22px);
    animation: rise .7s var(--ease) forwards;
}
.delay-1 { animation-delay: .08s; }
.delay-2 { animation-delay: .16s; }
.delay-3 { animation-delay: .24s; }
.delay-4 { animation-delay: .32s; }
.delay-5 { animation-delay: .40s; }
.delay-6 { animation-delay: .48s; }
.card-grid .lot-card:nth-child(1) { animation-delay: .05s; }
.card-grid .lot-card:nth-child(2) { animation-delay: .12s; }
.card-grid .lot-card:nth-child(3) { animation-delay: .19s; }
.card-grid .lot-card:nth-child(4) { animation-delay: .26s; }

@keyframes rise {
    to { opacity: 1; transform: none; }
}
@keyframes rise-filter {
    to { opacity: .65; transform: none; }
}
@keyframes kenburns {
    from { transform: scale(1); }
    to { transform: scale(1.08); }
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}
@keyframes pulse {
    50% { opacity: .55; }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (max-width: 900px) {
    .hero { padding-bottom: 3.2rem; }
    .hero-media { height: 78%; }
    .home-intro::after { top: 32%; }
    .header-search { display: none; }
    .header-nav { display: none; }
    .header-nav.is-open { display: flex; flex-direction: column; position: absolute; top: 78px; left: 0; right: 0; background: var(--navy); padding: 1rem; }
    .theme-toggle { margin-left: auto; }
    .menu-toggle { display: block; margin-left: 0; }
    .hero-grid, .lot-layout, .split, .profile-grid, .admin-body, .admin-split, .form-grid, .footer-grid { grid-template-columns: 1fr; }
    .filter-card { max-width: 100%; justify-self: stretch; }
    .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-body { display: block; }
    .bid-history li { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .category-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
    .reveal { opacity: 1; transform: none; }
    .filter-card.reveal { opacity: .65; }
}
