:root {
    --ink: #172c28;
    --muted: #66736e;
    --green: #1f5f4a;
    --paper: #f5f6f3;
    --line: #dce2dc;
    --white: #fff;
    --lime: #d6ed9a;
    --red: #ae4036;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--paper);
    font-synthesis: none
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    font-size: 16px
}

button,
input,
select,
textarea {
    font: inherit
}

button,
a,
input,
select,
textarea {
    outline-offset: 4px
}

button {
    cursor: pointer
}

button:disabled {
    opacity: .55;
    cursor: not-allowed
}

button,
a {
    touch-action: manipulation
}

a {
    color: var(--green)
}

button {
    border: 1px solid var(--line);
    padding: 11px 17px;
    background: white;
    border-radius: 8px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 600
}

button:hover {
    background: #edf2e9
}

.primary {
    background: var(--green);
    color: #fff;
    border-color: var(--green)
}

.primary:hover {
    background: #194c3b
}

.danger {
    color: var(--red)
}

.small {
    padding: 7px 11px;
    font-size: 13px
}

.textbutton {
    background: none;
    border: 0;
    padding: 4px;
    color: var(--green)
}

.layout {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    min-height: 100vh
}

.sidebar {
    background: #132b27;
    color: #fff;
    padding: 30px 21px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh
}

.brand {
    font-size: 27px;
    font-weight: 700;
    letter-spacing: -1px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 7px 36px
}

.brandmark {
    display: grid;
    place-items: center;
    border-radius: 10px;
    width: 36px;
    height: 36px;
    background: var(--lime);
    color: #163329;
    font-size: 24px
}

.navlabel {
    text-transform: uppercase;
    color: #9eafa5;
    letter-spacing: 2px;
    font-size: 12px;
    margin: 10px 12px 12px
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 5px
}

.nav button {
    background: transparent;
    border: 0;
    color: #c5d2cb;
    text-align: left;
    display: flex;
    gap: 12px;
    padding: 13px 14px;
    font-weight: 500
}

.nav button:hover,
.nav button.active {
    background: #2b453a;
    color: #e3f4b9
}

.nav svg {
    width: 19px;
    height: 19px;
    flex: none
}

.sidebarfoot {
    margin-top: auto;
    padding-top: 30px
}

.walletmini {
    padding: 18px 15px;
    background: #233e34;
    border-radius: 12px;
    font-size: 14px
}

.walletmini b {
    display: block;
    font-size: 26px;
    color: #e2f2b7;
    margin: 6px 0 14px
}

.walletmini button {
    background: #d6ed9a;
    color: #142d27;
    border: 0;
    width: 100%
}

.credit {
    color: #9eafa5;
    font-size: 12px;
    margin: 23px 5px 0
}

.topbar {
    height: 84px;
    background: white;
    border-bottom: 1px solid var(--line);
    padding: 0 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px
}

.breadcrumb {
    font-size: 14px;
    color: var(--muted)
}

.breadcrumb strong {
    color: var(--ink);
    font-weight: 500
}

.topactions {
    display: flex;
    align-items: center;
    gap: 12px
}

.avatar {
    background: #e6ebdf;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    font-weight: 700
}

.accountname {
    font-size: 14px
}

.accountname small {
    display: block;
    color: var(--muted);
    font-size: 12px
}

.content {
    max-width: 1500px;
    margin: auto;
    padding: 34px 38px 50px
}

.pagehead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 26px
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 12px;
    color: var(--green);
    font-weight: 600;
    margin-bottom: 10px
}

h1 {
    font-size: 32px;
    line-height: 1.2;
    letter-spacing: -1px;
    margin: 0 0 10px;
    font-weight: 650
}

p {
    line-height: 1.6
}

h2 {
    font-size: 20px;
    margin: 0 0 18px;
    letter-spacing: -.4px
}

h3 {
    font-size: 19px;
    margin: 0 0 8px
}

.sub {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 28px
}

.stat {
    background: white;
    border: 1px solid var(--line);
    padding: 21px 22px;
    border-radius: 12px
}

.stat .label {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 10px
}

.stat .value {
    font-size: 29px;
    font-weight: 650;
    letter-spacing: -.8px
}

.stat .note {
    font-size: 12px;
    color: var(--muted);
    margin-top: 8px
}

.stat.accent {
    background: #eaf0dc;
    border-color: #dce6c6
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 24px
}

.tabs {
    display: flex;
    gap: 5px;
    flex-wrap: wrap
}

.tabs button {
    background: transparent;
    border-color: transparent;
    color: var(--muted)
}

.tabs .selected {
    background: white;
    border-color: var(--line);
    color: var(--ink)
}

.filters {
    display: flex;
    gap: 10px
}

.filters input {
    max-width: 200px
}

.filters input,
.filters select {
    padding: 9px 12px;
    font-size: 14px;
    margin: 0
}

.auctiongrid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px
}

.card {
    border: 1px solid var(--line);
    background: white;
    border-radius: 13px;
    overflow: hidden;
    transition: transform .18s, box-shadow .18s
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px #172c2810
}

.cardvisual {
    height: 155px;
    background: #e8ece4;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden
}

.cardvisual img {
    width: 100%;
    height: 100%;
    object-fit: contain
}

.lotnumber {
    font-size: 42px;
    font-weight: 300;
    letter-spacing: -2px;
    color: #86977f
}

.nophoto {
    position: absolute;
    bottom: 12px;
    font-size: 12px;
    color: #667660
}

.card:nth-child(3n+2) .cardvisual {
    background: #ece9e1
}

.card:nth-child(3n+3) .cardvisual {
    background: #e3ebea
}

.cardvisual .badge {
    position: absolute;
    left: 13px;
    top: 13px
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
    background: #eef0ed;
    color: #647069;
    white-space: nowrap
}

.badge.live,
.badge.paid,
.badge.won,
.badge.fulfilled {
    color: #18513d;
    background: #e2efd3
}

.badge.live:before {
    content: '';
    width: 6px;
    height: 6px;
    background: #287349;
    border-radius: 50%;
    margin-right: 5px
}

.badge.scheduled,
.badge.pending {
    background: #f8edcf;
    color: #8d6619
}

.badge.closed,
.badge.lost,
.badge.failed {
    background: #f1e8e3;
    color: #91584b
}

.cardbody {
    padding: 21px
}

.category {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 8px
}

.card h3 {
    font-size: 18px;
    line-height: 1.4;
    min-height: 25px
}

.bidrow {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin: 20px 0
}

.bidrow span,
.timerbox span {
    font-size: 12px;
    color: var(--muted);
    display: block;
    margin-bottom: 5px
}

.price {
    font-size: 24px;
    font-weight: 650;
    letter-spacing: -.6px
}

.bidcount {
    text-align: right
}

.bidcount strong {
    font-size: 15px;
    font-weight: 500
}

.cardfoot {
    padding-top: 16px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px
}

.timer {
    font-variant-numeric: tabular-nums;
    font-size: 15px;
    font-weight: 600
}

.closing {
    color: var(--red)
}

.rulebar {
    margin-top: 25px;
    padding: 17px 20px;
    background: #edf0e7;
    border-radius: 10px;
    color: #536452;
    font-size: 13px;
    line-height: 1.6
}

.panel {
    background: white;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 26px;
    margin-bottom: 22px
}

.empty {
    text-align: center;
    padding: 55px 20px;
    color: var(--muted);
    grid-column: 1/-1
}

.empty h2 {
    color: var(--ink)
}

.tablewrap {
    overflow: auto
}

table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
    font-size: 14px
}

th {
    text-align: left;
    color: var(--muted);
    font-weight: 500;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .5px;
    background: #f6f7f3
}

td,
th {
    padding: 15px 14px;
    border-bottom: 1px solid #e8ebe5
}

td:first-child {
    font-weight: 500
}

tr:last-child td {
    border-bottom: 0
}

.tableactions {
    display: flex;
    gap: 6px
}

.positive {
    color: var(--green)
}

.negative {
    color: var(--red)
}

label {
    font-size: 14px;
    font-weight: 500;
    display: block;
    margin: 14px 0 7px
}

input,
select,
textarea {
    width: 100%;
    padding: 12px 13px;
    border: 1px solid #ccd5ca;
    border-radius: 7px;
    background: white;
    color: var(--ink)
}

textarea {
    min-height: 100px;
    resize: vertical
}

.formgrid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px
}

.span2 {
    grid-column: 1/-1
}

.formactions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 25px
}

.hint {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.5;
    margin-top: 7px
}

.error {
    color: #a23731;
    background: #fff0ed;
    padding: 12px;
    border-radius: 7px;
    font-size: 14px;
    margin-top: 12px
}

.notice {
    padding: 14px 17px;
    border: 1px solid #e8d5a3;
    border-radius: 9px;
    background: #fff8e5;
    margin-bottom: 22px;
    font-size: 14px;
    line-height: 1.6
}

.twocol {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 23px
}

.balance {
    font-size: 54px;
    letter-spacing: -2px;
    font-weight: 600;
    margin: 12px 0
}

.packs {
    display: flex;
    gap: 10px;
    margin: 20px 0
}

.packs button {
    flex: 1;
    padding: 18px 10px
}

.packs button b {
    font-size: 24px;
    display: block;
    margin-bottom: 5px
}

.packs .selected {
    background: #e9f0dc;
    border-color: #648656
}

.notification {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 15px 0;
    border-bottom: 1px solid var(--line);
    font-size: 14px
}

.notification time {
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap
}

dialog {
    border: 0;
    border-radius: 16px;
    padding: 30px;
    width: min(750px, calc(100vw - 28px));
    max-height: 90vh;
    color: var(--ink);
    box-shadow: 0 24px 100px #0004
}

dialog::backdrop {
    background: #10251fb3;
    backdrop-filter: blur(3px)
}

.modalhead {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 20px
}

.modalhead h2 {
    font-size: 25px;
    margin-bottom: 5px
}

.close {
    padding: 5px 10px;
    font-size: 24px;
    border: 0;
    background: transparent
}

.detailhero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 23px
}

.detailhero .cardvisual {
    height: 240px;
    border-radius: 10px
}

.detailprice {
    font-size: 36px;
    letter-spacing: -1px;
    font-weight: 650;
    margin: 10px 0
}

.bidform {
    margin: 20px 0;
    padding: 20px;
    background: #eff3e9;
    border-radius: 9px
}

.bidform .inline {
    display: flex;
    gap: 10px
}

.bidform input {
    min-width: 0
}

.bidform button {
    white-space: nowrap
}

.detaildescription {
    white-space: pre-wrap;
    font-size: 14px;
    color: var(--muted)
}

#toast {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    background: #17372c;
    color: white;
    padding: 14px 24px;
    border-radius: 10px;
    z-index: 99;
    box-shadow: 0 5px 25px #0002;
    max-width: 90vw;
    font-size: 14px;
    display: none
}

.initial {
    padding: 80px;
    text-align: center
}

.mobilebrand {
    display: none
}

.install {
    margin-top: 14px;
    width: 100%;
    background: transparent;
    color: #dceacb;
    border-color: #57705e
}

.reportgrid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px
}

.authpanel {
    max-width: 480px;
    margin: 45px auto
}

.adminbar {
    margin-top: 18px;
    display: flex;
    gap: 8px
}

.listitem {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line)
}

.statusline {
    font-size: 12px;
    color: var(--muted)
}

.progress {
    height: 8px;
    background: #eef1e8;
    border-radius: 5px;
    margin: 10px 0 18px;
    overflow: hidden
}

.progress div {
    height: 100%;
    background: #789957
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0)
}

@media(min-width:1600px) {
    .cardvisual {
        height: 190px
    }
}

@media(max-width:1150px) {
    .auctiongrid {
        grid-template-columns: repeat(2, minmax(0, 1fr))
    }

    .layout {
        grid-template-columns: 200px minmax(0, 1fr)
    }

    .content {
        padding: 28px 24px
    }

    .topbar {
        padding: 0 24px
    }

    .stats {
        gap: 10px
    }

    .stat {
        padding: 18px 14px
    }

    .sidebar {
        padding: 25px 14px
    }
}

@media(max-width:760px) {
    .layout {
        display: block
    }

    .sidebar {
        position: static;
        height: auto;
        padding: 16px
    }

    .brand {
        margin: 0 0 16px;
        font-size: 24px
    }

    .nav {
        flex-direction: row;
        overflow-x: auto
    }

    .nav button {
        white-space: nowrap;
        flex-shrink: 0;
        padding: 10px
    }

    .navlabel,
    .sidebarfoot,
    .credit {
        display: none
    }

    .topbar {
        height: 65px;
        padding: 0 17px
    }

    .breadcrumb {
        display: none
    }

    .topactions {
        width: 100%;
        justify-content: flex-end
    }

    .content {
        padding: 25px 16px
    }

    .pagehead {
        align-items: flex-start
    }

    .pagehead button {
        max-width: 145px
    }

    .stats {
        grid-template-columns: 1fr 1fr;
        gap: 10px
    }

    .stat .value {
        font-size: 25px
    }

    h1 {
        font-size: 28px
    }

    .auctiongrid {
        gap: 13px
    }

    .cardbody {
        padding: 16px
    }

    .cardvisual {
        height: 140px
    }

    .cardfoot {
        flex-wrap: wrap
    }

    .filters {
        width: 100%
    }

    .filters input {
        max-width: none
    }

    .filters>* {
        width: 50%
    }

    .twocol,
    .reportgrid,
    .detailhero {
        grid-template-columns: 1fr
    }

    .detailhero .cardvisual {
        height: 160px
    }

    .formgrid {
        grid-template-columns: 1fr
    }

    .span2 {
        grid-column: auto
    }

    dialog {
        padding: 22px
    }

    .panel {
        padding: 20px
    }

    .accountname {
        display: none
    }

    .notification {
        flex-direction: column;
        gap: 7px
    }
}

@media(max-width:430px) {
    .auctiongrid {
        grid-template-columns: 1fr
    }

    .cardvisual {
        height: 170px
    }

    .card h3 {
        font-size: 20px
    }

    .pagehead {
        flex-wrap: wrap
    }

    .stat .label {
        font-size: 12px
    }

    .tabs button {
        padding: 9px 10px
    }
}