body.page-admin { background: #eef0ea; font-size: 17px; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: linear-gradient(180deg, var(--forest-deep), var(--forest)); }
.login-card { width: min(440px, 100%); text-align: left; }
.login-card h1 { text-align: center; font-size: 1.8rem; }
.admin { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.side { background: var(--forest-deep); color: #dbe7de; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side-brand { display: flex; gap: 10px; align-items: center; padding: 18px; text-decoration: none; color: #fff; border-bottom: 1px solid rgba(255,255,255,.08); }
.side-brand img { border-radius: 50%; border: 2px solid var(--gold); background: #fff; }
.side-brand span { font-family: var(--font-display); color: var(--gold); line-height: 1.1; }
.side-brand small { display: block; font-family: var(--font-body); color: #b9cbbd; font-size: .8rem; }
#side-nav { display: flex; flex-direction: column; padding: 10px; gap: 2px; }
#side-nav button { text-align: left; background: none; border: 0; color: #e3ede5; font: 600 1rem var(--font-body); padding: 11px 14px; border-radius: 10px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; min-height: 44px; }
#side-nav button:hover { background: rgba(255,255,255,.07); }
#side-nav button[aria-current="page"] { background: var(--gold); color: var(--ink); }
#side-nav .badge { background: var(--red); color: #fff; border-radius: 999px; font-size: .78rem; padding: 2px 8px; }
.side-foot { margin-top: auto; padding: 16px; border-top: 1px solid rgba(255,255,255,.08); display: grid; gap: 10px; font-size: .9rem; }
.main-col { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 10; background: #fff; border-bottom: 1px solid #dcdcd2; display: flex; align-items: center; gap: 14px; padding: 12px 24px; }
.topbar h1 { margin: 0; font-size: 1.5rem; flex: 1; }
#side-toggle { display: none; }
.view { padding: 24px; max-width: 1400px; }
@media (max-width: 900px) {
  .admin { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 30% 0 0; z-index: 60; transform: translateX(-100%); transition: transform .25s; min-width: 260px; }
  .side.open { transform: none; box-shadow: var(--shadow-lg); }
  #side-toggle { display: inline-flex; }
  .view { padding: 14px; }
  .topbar { padding: 10px 14px; }
}
.panel { background: #fff; border-radius: 14px; box-shadow: 0 2px 8px rgba(0,0,0,.06); padding: 20px; margin-bottom: 20px; border: 1px solid #e3e3da; }
.panel h2 { font-size: 1.3rem; margin-bottom: 12px; }
.panel-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.panel-head h2 { margin: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat { background: #fff; border-radius: 14px; padding: 16px 18px; border: 1px solid #e3e3da; box-shadow: 0 2px 8px rgba(0,0,0,.05); }
.stat b { display: block; font-family: var(--font-head); font-size: 1.8rem; color: var(--forest); font-variant-numeric: tabular-nums; }
.stat span { color: var(--ink-soft); font-size: .92rem; }
.stat.big { grid-column: span 2; background: var(--forest); color: #fff; }
.stat.big b { color: var(--gold); font-size: 2.4rem; }
.stat.big span { color: #cfe0d3; }
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: .95rem; }
.tbl th { text-align: left; background: #f4f2ea; padding: 10px; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: #555; white-space: nowrap; position: sticky; top: 0; }
.tbl td { padding: 10px; border-bottom: 1px solid #eee; vertical-align: top; }
.tbl tr:hover td { background: #fbfaf5; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl .actions { white-space: nowrap; }
.tbl .actions .btn { min-height: 36px; padding: 6px 12px; font-size: .88rem; margin: 2px; }
.tbl .msg { max-width: 360px; white-space: pre-wrap; }
.st { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; text-transform: uppercase; }
.st-paid, .st-approved, .st-sold, .st-active, .st-open, .st-ok { background: #dff1e5; color: #14532d; }
.st-pending, .st-reserved, .st-draft, .st-closed { background: #fff0c2; color: #6b4a00; }
.st-failed, .st-rejected, .st-refunded, .st-canceled, .st-disabled, .st-off { background: #fde2df; color: #8e241d; }
.st-partially_refunded, .st-drawn, .st-available { background: #e3ecf7; color: #1e3a8a; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.toolbar input, .toolbar select { min-height: 44px; padding: 8px 12px; font-size: 1rem; width: auto; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }
.img-field { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.img-field .thumb { position: relative; width: 110px; height: 90px; border-radius: 10px; overflow: hidden; background: #eee; border: 1px solid #ddd; }
.img-field .thumb img { width: 100%; height: 100%; object-fit: cover; }
.img-field .thumb button { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; cursor: pointer; }
.pkg-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.pkg-row input { min-height: 44px; padding: 8px 10px; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 10px; position: sticky; bottom: -24px; background: var(--cream); padding: 12px 0; }
.config-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.config-list li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid #eee; }
.admin-board .board-grid { gap: 4px; }
.admin-board .sq { cursor: pointer !important; }
.admin-board .sq.selected { background: var(--gold) !important; color: var(--ink) !important; }
.admin-board .sq.reserved.paid-flag::after { content: '$'; font-weight: 800; }
.board-layout { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
@media (max-width: 1100px) { .board-layout { grid-template-columns: 1fr; } }
.warn { background: #fff4d6; border: 1px solid #e3b341; border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; }
.danger-text { color: var(--red); }
dialog#modal { width: min(860px, calc(100vw - 20px)); }
