/* TecnoCric Admin usability refresh — visual overrides only; no auction logic changed. */
:root {
  --tc-blue: #1d5fe9;
  --tc-blue-dark: #1748b8;
  --tc-ink: #14233b;
  --tc-muted: #63738b;
  --tc-border: #dbe4f0;
  --tc-bg: #f4f7fc;
  --tc-shadow: 0 8px 28px rgba(20, 42, 78, .07);
}
html { scroll-padding-top: 84px; }
body { color: var(--tc-ink); }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:where(a,button,input,select,textarea):focus-visible { outline: 3px solid rgba(29,95,233,.32); outline-offset: 2px; }

/* Main admin dashboard */
.app .sidebar { width: 258px; flex-basis: 258px; background: linear-gradient(180deg,#0b1932 0%,#102b54 100%); }
.app .brand { padding: 21px 19px; }
.app .brand-logo { border-radius: 13px; box-shadow: 0 4px 16px rgba(0,0,0,.12); }
.app .nav { padding: 12px 11px; }
.app .nav-label { color: #a0b5d5; font-size: 10px; padding-top: 17px; }
.app .nav-link { min-height: 42px; font-size: 13px; border: 1px solid transparent; }
.app .nav-link.active { background: #1d5fe9; border-color: rgba(255,255,255,.13); box-shadow: 0 5px 14px rgba(29,95,233,.22); }
.app .main { min-width: 0; }
.app .topbar { min-height: 76px; height: auto; padding: 12px clamp(16px,2.2vw,34px); gap: 18px; }
.app .page-title { font-size: 21px; }
.app .topbar-tools { display:flex; align-items:center; justify-content:flex-end; gap:10px; min-width:0; }
.app .admin-tournament-switch { display:flex; align-items:center; gap:9px; padding:6px 8px 6px 12px; background:#f5f8fe; border:1px solid #e1e8f3; border-radius:12px; max-width:min(54vw,560px); }
.app .admin-tournament-switch label { color:#687991; font-size:11px; font-weight:800; white-space:nowrap; }
.app .admin-tournament-switch select { width:100%; min-width:150px; max-width:350px; padding:8px 30px 8px 10px; border:1px solid #d8e2f0; border-radius:8px; color:#14233b; background:#fff; font:600 12px "DM Sans",system-ui,sans-serif; }
.app .topbar-workspace { display:inline-flex; align-items:center; justify-content:center; white-space:nowrap; border-radius:10px; padding:10px 13px; background:#eaf1ff; color:#1d5fe9; font-size:12px; font-weight:800; }
.app .topbar-workspace:hover { background:#dce8ff; }
.app .content { max-width:1800px; padding:clamp(16px,2.2vw,32px); }
.app .hero { padding:clamp(20px,2.5vw,32px); box-shadow:0 12px 30px rgba(7,39,94,.12); }
.app .hero h2 { max-width:740px; font-size:clamp(22px,2vw,30px); line-height:1.22; }
.app .hero-actions { align-items:center; }
.app .kpi-grid { grid-template-columns:repeat( auto-fit, minmax(145px, 1fr) ); gap:14px; }
.app .kpi { padding:17px; }
.app .kpi-label { font-size:11px; letter-spacing:.06em; }
.app .kpi-value { font-size:28px; }
.app .card { box-shadow:0 2px 8px rgba(18,44,82,.035); }
.app .card-header { padding:17px 20px; }
.app .card-title { font-size:16px; }
.app .card-subtitle { font-size:12px; }
.app .card-body { padding:20px; }
.app .btn { min-height:36px; font-size:12px; }
.app .input, .app .select { min-height:40px; font-size:13px; }
.app .input.search { min-width:min(260px,100%); }
.app .field label { font-size:11px; letter-spacing:.04em; }
.app .field input, .app .field select, .app .field textarea { min-height:40px; padding:10px 12px; font-size:13px; }
.app table { min-width:760px; }
.app thead th { padding:13px 14px; font-size:11px; }
.app tbody td { padding:13px 14px; font-size:13px; }
.app .player-name { font-size:13px; }
.app .player-sub { font-size:11px; }
.app .chip { font-size:10px; }
.app .modal-box { max-width:min(760px,100%); }
.app .modal-title { font-size:18px; }

/* Tournament manager and workspace */
body:has(> .wrap):not(:has(.visual)) { background:var(--tc-bg); }
body:has(.layout) .wrap, body:has(.top .eyebrow) .wrap { max-width:1360px !important; padding-top:30px !important; }
.head, .top { margin-bottom:6px; }
.head h1, .top h1 { color:#102344; font-size:clamp(25px,2.4vw,32px) !important; letter-spacing:-.04em; }
.layout { grid-template-columns:minmax(300px,360px) minmax(0,1fr) !important; gap:20px !important; }
.wrap > .layout .card, .wrap > .grid, .wrap .card { box-shadow:var(--tc-shadow); }
body:has(.layout) .card { padding:22px; border-radius:17px; }
body:has(.layout) .card h2 { font-size:18px; letter-spacing:-.02em; }
body:has(.layout) label { font-size:12px; color:#465873; margin-top:14px; }
body:has(.layout) input, body:has(.layout) select { min-height:42px; border-color:#d6e0ee; border-radius:10px; font-size:14px; }
body:has(.layout) button, body:has(.layout) .btn { min-height:39px; border-radius:10px; transition:background .15s,transform .15s,box-shadow .15s; }
body:has(.layout) button:hover, body:has(.layout) .btn:hover { transform:translateY(-1px); box-shadow:0 5px 12px rgba(17,51,100,.10); }
body:has(.layout) .table th { background:#f5f8fd; font-size:11px; }
body:has(.layout) .table td { font-size:13px; vertical-align:middle; }
body:has(.layout) .table tbody tr:hover { background:#f7faff; }
body:has(.layout) .msg { border:1px solid #b8efd4; border-radius:11px; }
body:has(.layout) .msg.err { border-color:#fecaca; }
body:has(.top .eyebrow) .hero { box-shadow:0 16px 34px rgba(9,36,82,.12); }
body:has(.top .eyebrow) .grid { gap:16px; }
body:has(.top .eyebrow) .card { min-height:132px; border-radius:16px; padding:19px; box-shadow:0 5px 18px rgba(15,43,82,.045); }
body:has(.top .eyebrow) .card:hover { transform:translateY(-2px); box-shadow:0 12px 28px rgba(15,43,82,.09); }
body:has(.top .eyebrow) .card h3 { font-size:15px; line-height:1.35; }
body:has(.top .eyebrow) .card p { line-height:1.55; }
body:has(.top .eyebrow) .icon { flex:0 0 44px; width:44px; height:44px; }
body:has(.top .eyebrow) .select-row select { min-height:42px; }

/* Post-auction report */
body:has(.sheet) { background:#edf2f8; }
body:has(.sheet) .toolbar { padding:14px clamp(14px,2vw,28px); gap:12px; box-shadow:0 2px 8px rgba(10,31,66,.04); }
body:has(.sheet) .toolbar h1 { font-size:19px; }
body:has(.sheet) .sheet { border:1px solid #e0e7f1; border-radius:16px; overflow:hidden; box-shadow:0 18px 50px rgba(7,21,47,.09); }
body:has(.sheet) .cover { padding:clamp(28px,4vw,48px); }
body:has(.sheet) .cover h2 { font-size:clamp(28px,3vw,40px); line-height:1.14; }
body:has(.sheet) .content { padding:clamp(18px,3vw,34px); }
body:has(.sheet) .kpis { grid-template-columns:repeat(auto-fit,minmax(145px,1fr)); }
body:has(.sheet) .kpi { border-radius:13px; }
body:has(.sheet) table { min-width:650px; }
body:has(.sheet) th, body:has(.sheet) td { padding:12px 10px; font-size:12px; }

/* Login */
body:has(.visual) .wrap { max-width:1080px !important; border-radius:24px; box-shadow:0 24px 80px rgba(7,21,47,.12); }
body:has(.visual) .visual { padding:clamp(30px,4vw,48px); }
body:has(.visual) .visual h1 { font-size:clamp(32px,3.5vw,42px); }
body:has(.visual) .form { padding:clamp(28px,4vw,48px); }
body:has(.visual) .field label { font-size:11px; }
body:has(.visual) .field input { min-height:46px; font-size:14px; }
body:has(.visual) .btn { min-height:46px; font-size:13px; }

@media (max-width:1200px) {
  .app .sidebar { width:230px; flex-basis:230px; }
  .app .topbar-tools { flex-wrap:wrap; }
  .app .admin-tournament-switch { max-width:48vw; }
  .app .kpi-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (max-width:900px) {
  .app .sidebar { width:72px; flex-basis:72px; }
  .app .brand { justify-content:center; padding:16px 8px; }
  .app .brand-text, .app .nav-link span:not(.nav-icon), .app .nav-label, .app .sidebar-footer { display:none; }
  .app .nav-link { justify-content:center; padding:12px 8px; }
  .app .topbar { align-items:flex-start; flex-direction:column; }
  .app .topbar-tools { width:100%; justify-content:space-between; }
  .app .admin-tournament-switch { max-width:calc(100% - 115px); flex:1; }
  .app .admin-tournament-switch select { max-width:none; }
  .layout { grid-template-columns:1fr !important; }
}
@media (max-width:720px) {
  .app { display:block; }
  .app .sidebar { width:100%; height:auto; position:relative; flex-basis:auto; }
  .app .brand { justify-content:flex-start; padding:12px 16px; }
  .app .brand-text { display:block; }
  .app .nav { display:flex; gap:5px; overflow-x:auto; padding:8px; }
  .app .nav-link { flex:0 0 auto; justify-content:flex-start; padding:9px 12px; }
  .app .nav-link span:not(.nav-icon) { display:inline; }
  .app .nav-label { display:none; }
  .app .topbar { position:relative; padding:14px 16px; }
  .app .topbar-tools { align-items:stretch; }
  .app .admin-tournament-switch { max-width:none; flex-wrap:wrap; }
  .app .admin-tournament-switch select { min-width:0; }
  .app .system-status { display:none; }
  .app .content { padding:14px; }
  .app .hero { padding:20px; }
  .app .hero-actions { width:100%; }
  .app .hero-actions .btn { flex:1 1 auto; }
  .app .kpi-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .app .grid-2, .app .grid-2-1, .app .grid-3 { grid-template-columns:1fr; }
  .app .form-grid, .app .form-grid.three { grid-template-columns:1fr; }
  .app .input.search { min-width:100%; }
  .wrap { padding:18px 12px 32px !important; }
  body:has(.layout) .card { padding:17px; }
  body:has(.top .eyebrow) .hero { padding:18px; }
  body:has(.sheet) .toolbar { position:relative; flex-direction:column; align-items:stretch; }
  body:has(.sheet) .actions { flex-wrap:wrap; }
  body:has(.sheet) .actions .btn { flex:1; justify-content:center; }
  body:has(.sheet) .cover-meta { gap:16px; }
}
@media (max-width:440px) {
  .app .kpi-grid { grid-template-columns:1fr 1fr; gap:8px; }
  .app .kpi { padding:12px; }
  .app .kpi-value { font-size:24px; }
  .app .topbar-tools { align-items:stretch; flex-direction:column; }
  .app .admin-tournament-switch { max-width:none; }
  .app .topbar-workspace { min-height:40px; }
}
@media print {
  body:has(.sheet) { background:#fff; }
  body:has(.sheet) .sheet { border:0; border-radius:0; box-shadow:none; }
}
