/* ═══════════════════════════════════════════════
   MetallSex Pro + TunkaBender — Unified Design
   Professional Light Theme v3.0
   ═══════════════════════════════════════════════ */

:root {
  --bg:        #f0f4f8;
  --card:      #ffffff;
  --card2:     #f8fafc;
  --border:    #e2e8f0;
  --border-h:  #cbd5e1;
  --primary:   #2563eb;
  --pd:        #1d4ed8;
  --pl:        rgba(37,99,235,.09);
  --pgl:       rgba(37,99,235,.16);
  --success:   #059669;
  --sl:        rgba(5,150,105,.09);
  --warning:   #d97706;
  --wl:        rgba(217,119,6,.09);
  --danger:    #dc2626;
  --dl:        rgba(220,38,38,.09);
  --text:      #0f172a;
  --text-m:    #475569;
  --text-s:    #94a3b8;
  --nav-bg:    #0f172a;
  --nav-h:     64px;
  --radius:    14px;
  --radius-sm: 9px;
  --shadow:    0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.05);
  --shadow-md: 0 4px 24px rgba(0,0,0,.08), 0 1px 4px rgba(0,0,0,.05);
  --shadow-lg: 0 20px 60px rgba(0,0,0,.12), 0 4px 20px rgba(0,0,0,.08);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: 15px; color: var(--text); background: var(--bg);
  min-height: 100vh; display: flex; flex-direction: column; line-height: 1.55;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── NAVIGATION ─────────────────────────────── */
.topnav {
  position: sticky; top: 0; z-index: 200; height: var(--nav-h);
  background: var(--nav-bg); border-bottom: 1px solid rgba(255,255,255,.06);
  display: flex; align-items: center; gap: 8px; padding: 0 20px;
  box-shadow: 0 1px 0 rgba(255,255,255,.04), 0 4px 20px rgba(0,0,0,.3);
}
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  color: #fff; font-weight: 800; font-size: 16px;
  text-decoration: none; flex-shrink: 0;
}
.nav-brand-icon {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--primary), var(--pd));
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; box-shadow: 0 2px 10px rgba(37,99,235,.5);
}
.nav-badge {
  font-size: 9px; font-weight: 700; background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.6); padding: 1px 6px; border-radius: 20px;
  letter-spacing: .3px; vertical-align: middle;
}
.nav-links { display: flex; align-items: center; gap: 2px; flex: 1; margin-left: 18px; }
.nav-links a {
  color: rgba(255,255,255,.55); padding: 8px 12px; border-radius: 8px;
  font-size: 13.5px; font-weight: 500; transition: all .15s;
  text-decoration: none; white-space: nowrap;
}
.nav-links a:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-links a.active, .nav-links a[href*="hisoblash"] {
  background: rgba(37,99,235,.2); color: #93c5fd;
}
.nav-links a[href*="hisoblash"] { color: #6ee7b7; background: rgba(16,185,129,.15); }
.nav-right { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-shrink: 0; }
.nav-user {
  color: rgba(255,255,255,.45); font-size: 12px; max-width: 130px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  background: rgba(255,255,255,.06); padding: 5px 10px; border-radius: 20px;
}
.btn-logout {
  background: rgba(255,255,255,.08); color: rgba(255,255,255,.7);
  font-size: 13px; font-weight: 600; padding: 7px 14px; border-radius: 8px;
  transition: all .15s; text-decoration: none; border: 1px solid rgba(255,255,255,.1);
}
.btn-logout:hover { background: rgba(255,255,255,.15); color: #fff; text-decoration: none; }
.hamburger { display: none; background: none; border: none; color: rgba(255,255,255,.7); font-size: 22px; cursor: pointer; padding: 6px; }

/* ─── MAIN LAYOUT ────────────────────────────── */
.main-wrap { flex: 1; padding: 28px 20px; max-width: 1080px; width: 100%; margin: 0 auto; }
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 26px; gap: 16px; flex-wrap: wrap;
}
.page-title { margin: 0; font-size: 22px; font-weight: 800; color: var(--text); letter-spacing: -.3px; }
.page-sub { color: var(--text-s); font-size: 13px; margin: 3px 0 0; }

/* ─── CARDS ──────────────────────────────────── */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 20px;
  transition: box-shadow .2s, border-color .2s;
}
.card:hover { border-color: var(--border-h); box-shadow: var(--shadow-md); }
.card-pad { padding: 22px; }
.card-body { padding: 20px 22px; }
.card-title {
  font-size: 14px; font-weight: 700; color: var(--text); margin: 0 0 18px;
  padding-bottom: 12px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}

/* ─── STATS GRID ─────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(190px,1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 22px; display: flex; align-items: center; gap: 16px;
  transition: all .2s; box-shadow: var(--shadow); cursor: default;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--border-h); }
.stat-icon {
  width: 50px; height: 50px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0;
}
.si-blue  { background: rgba(37,99,235,.1); }
.si-green { background: rgba(5,150,105,.1); }
.si-amber { background: rgba(217,119,6,.1); }
.si-gray  { background: rgba(100,116,139,.08); }
.stat-num { font-size: 28px; font-weight: 800; line-height: 1; color: var(--text); }
.stat-lbl { font-size: 12px; color: var(--text-s); margin-top: 4px; font-weight: 500; }

/* ─── FORM ───────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: span 2; }
label, .lbl {
  font-size: 11px; font-weight: 700; color: var(--text-s);
  text-transform: uppercase; letter-spacing: .5px; display: block;
}
input[type=text], input[type=number], input[type=tel],
input[type=password], select, textarea {
  width: 100%; padding: 10px 14px; background: var(--card);
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; font-family: inherit; color: var(--text);
  transition: border-color .2s, box-shadow .2s; outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--pl);
}
textarea { resize: vertical; min-height: 80px; }
select { cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394a3b8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  padding-right: 34px;
}

/* ─── BUTTONS ────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 7px; padding: 10px 20px; border: none; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 700; font-family: inherit; cursor: pointer;
  transition: all .15s; white-space: nowrap; text-decoration: none; line-height: 1.4;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--pd));
  color: #fff; box-shadow: 0 2px 8px rgba(37,99,235,.25);
}
.btn-primary:hover { box-shadow: 0 4px 16px rgba(37,99,235,.35); transform: translateY(-1px); color: #fff; text-decoration: none; }
.btn-success {
  background: linear-gradient(135deg, var(--success), #047857);
  color: #fff; box-shadow: 0 2px 8px rgba(5,150,105,.25);
}
.btn-success:hover { box-shadow: 0 4px 16px rgba(5,150,105,.35); transform: translateY(-1px); color: #fff; text-decoration: none; }
.btn-danger  { background: var(--dl); color: var(--danger); border: 1px solid rgba(220,38,38,.25); }
.btn-danger:hover  { background: rgba(220,38,38,.15); }
.btn-ghost   { background: var(--card2); color: var(--text-m); border: 1px solid var(--border); }
.btn-ghost:hover   { border-color: var(--border-h); color: var(--text); background: var(--card); }
.btn-full { width: 100%; }
.btn-sm   { padding: 7px 14px; font-size: 13px; }
.btn-lg   { padding: 13px 26px; font-size: 15px; }

/* ─── TYPE TOGGLE ────────────────────────────── */
.type-toggle { display: flex; border: 1.5px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: var(--card2); }
.type-btn {
  flex: 1; padding: 10px 8px; background: transparent; border: none; cursor: pointer;
  font-size: 13px; font-weight: 700; color: var(--text-s); font-family: inherit;
  transition: all .15s; text-align: center; text-decoration: none;
  display: flex; align-items: center; justify-content: center;
}
.type-btn.active { background: var(--primary); color: #fff; }
.type-btn:hover:not(.active) { background: var(--card); color: var(--text); }

/* ─── ALERTS ─────────────────────────────────── */
.alert {
  padding: 13px 16px; border-radius: var(--radius-sm);
  font-size: 14px; margin-bottom: 16px; display: flex; align-items: center; gap: 10px;
}
.alert-success { background: var(--sl); color: #065f46; border: 1px solid rgba(5,150,105,.25); }
.alert-danger  { background: var(--dl); color: #991b1b; border: 1px solid rgba(220,38,38,.25); }
.alert-info    { background: var(--pl); color: #1e40af; border: 1px solid rgba(37,99,235,.25); }
.alert-warning { background: var(--wl); color: #92400e; border: 1px solid rgba(217,119,6,.25); }

/* ─── BADGES ─────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 700; white-space: nowrap;
}
.badge-primary { background: var(--pl);  color: #1d4ed8; border: 1px solid rgba(37,99,235,.15); }
.badge-success { background: var(--sl);  color: #065f46; border: 1px solid rgba(5,150,105,.15); }
.badge-warning { background: var(--wl);  color: #92400e; border: 1px solid rgba(217,119,6,.15); }
.badge-gray    { background: var(--card2); color: var(--text-s); border: 1px solid var(--border); }

/* ─── TABLE ──────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius-sm); border: 1px solid var(--border); }
table.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th {
  background: var(--card2); padding: 12px 14px; text-align: left;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; color: var(--text-s);
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
.data-table td { padding: 13px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(37,99,235,.03); }
.order-code { font-family: 'IBM Plex Mono', monospace; font-size: 13px; font-weight: 600; color: var(--primary); }

/* ─── EMPTY STATE ────────────────────────────── */
.empty-state { text-align: center; padding: 52px 20px; color: var(--text-s); }
.empty-icon  { font-size: 52px; margin-bottom: 14px; opacity: .5; }
.empty-state h3 { color: var(--text-m); margin: 0 0 8px; font-size: 18px; }

/* ─── ORDER LAYOUT ───────────────────────────── */
.order-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
@media(max-width:680px){ .order-layout{grid-template-columns:1fr;} }

/* ─── DRAW TOOL ──────────────────────────────── */
.draw-card { background: var(--card2); padding: 14px; border-radius: 12px; margin-bottom: 10px; border: 1px solid var(--border); }
.draw-card h4 { margin: 0 0 10px; font-size: 13px; color: var(--text); font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.draw-card label { font-size: 10px; color: var(--text-s); display: block; margin-bottom: 3px; font-weight: 600; text-transform: uppercase; letter-spacing: .3px; }
.draw-card input[type=number], .draw-card input[type=text] { width: 100%; padding: 9px 10px; border: 1.5px solid var(--border); border-radius: 9px; font-size: 13px; font-family: inherit; outline: none; background: var(--card); color: var(--text); }
.draw-card input:focus { border-color: var(--primary); }
.dl-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.dl-dir-wrap { margin-top: 4px; }
.draw-add { width: 100%; padding: 12px; background: var(--pl); color: var(--primary); border: 1px solid rgba(37,99,235,.2); border-radius: 10px; font-weight: 700; font-size: 13px; cursor: pointer; margin-top: 8px; font-family: inherit; transition: all .15s; }
.draw-add:hover { background: var(--pgl); }
.draw-del { background: var(--dl); color: var(--danger); border: 1px solid rgba(220,38,38,.2); border-radius: 7px; padding: 4px 10px; font-size: 11px; font-weight: 600; cursor: pointer; }
.dir-grid { display: grid; grid-template-columns: repeat(3,38px); gap: 4px; margin: 6px 0 8px; }
.dir-btn { width: 38px; height: 38px; background: var(--card); border: 1.5px solid var(--border); border-radius: 9px; cursor: pointer; font-size: 20px; display: flex; align-items: center; justify-content: center; transition: all .15s; padding: 0; color: var(--text-s); }
.dir-btn:hover { background: var(--pl); border-color: var(--primary); color: var(--primary); }
.dir-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 2px 8px rgba(37,99,235,.3); }
.dir-center { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; font-size: 14px; color: var(--text-s); }
.dir-custom { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-s); margin-top: 2px; }
.dir-custom .dir-num { width: 60px !important; padding: 5px 8px !important; font-size: 13px !important; }

/* ─── AUTH ───────────────────────────────────── */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg); padding: 20px; }
.auth-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 20px; padding: 40px; width: 100%; max-width: 420px;
  box-shadow: 0 8px 40px rgba(0,0,0,.1), 0 2px 8px rgba(0,0,0,.06);
}
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo h1 { font-size: 22px; margin: 10px 0 4px; color: var(--text); font-weight: 800; }
.auth-logo p  { font-size: 13px; color: var(--text-s); margin: 0; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }

/* ─── FOOTER ─────────────────────────────────── */
.site-footer {
  background: var(--nav-bg); color: rgba(255,255,255,.3);
  text-align: center; padding: 16px; font-size: 12px; margin-top: auto;
  border-top: 1px solid rgba(255,255,255,.06);
}

/* ─── UTILS ──────────────────────────────────── */
.text-muted  { color: var(--text-s); }
.text-right  { text-align: right; }
.text-center { text-align: center; }
.mt-12  { margin-top: 12px; }
.divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

/* ─── SPINNER ────────────────────────────────── */
.spinner { width: 18px; height: 18px; border: 2.5px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .6s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── MODAL (universal) ──────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(15,23,42,.45);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: none; overflow-y: auto; padding: 20px;
  align-items: flex-start; justify-content: center;
}
.modal-overlay.open { display: flex; }
@keyframes modalSlideIn {
  from { opacity: 0; transform: translateY(24px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-box {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 20px; width: 100%; max-width: 700px; margin: auto;
  box-shadow: var(--shadow-lg);
  animation: modalSlideIn .25s cubic-bezier(.34,1.2,.64,1);
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 18px; font-weight: 800; color: var(--text); margin: 0; }
.modal-sub   { font-size: 12px; color: var(--text-s); margin: 2px 0 0; }
.modal-close {
  width: 34px; height: 34px; background: var(--card2); border: 1px solid var(--border);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 16px; color: var(--text-s); transition: all .15s; flex-shrink: 0;
}
.modal-close:hover { background: var(--dl); color: var(--danger); border-color: rgba(220,38,38,.2); }
.modal-foot {
  padding: 16px 24px; border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 10px;
}

/* ─── TUNKABENDER CSS ────────────────────────── */
.tb-wrap { max-width: 620px; margin: 0 auto; }
.tb-tab-bar { display: flex; background: var(--card2); border: 1.5px solid var(--border); border-radius: 12px; overflow: hidden; margin-bottom: 18px; }
.tb-tab { flex: 1; padding: 12px 8px; font-size: 13px; font-weight: 700; border: none; cursor: pointer; transition: all .2s; font-family: inherit; }
.tb-tab.active  { background: var(--primary); color: #fff; }
.tb-tab.inactive { background: transparent; color: var(--text-s); }
.tb-tab.inactive:hover { color: var(--text); background: rgba(0,0,0,.03); }

.preset-row { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.preset-btn { flex: 1; border: 1.5px solid; border-radius: 9px; padding: 9px 8px; font-size: 12px; font-weight: 700; cursor: pointer; transition: all .15s; font-family: inherit; min-width: 70px; }
.preset-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }

/* Compass */
.compass-wrap { position: relative; width: 220px; height: 220px; margin: 0 auto; }
.compass-ring { position: absolute; inset: 8px; border-radius: 50%; border: 1px dashed rgba(37,99,235,.25); background: radial-gradient(circle, rgba(37,99,235,.03) 0%, transparent 70%); }
.compass-center {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--primary); box-shadow: 0 0 0 4px var(--pl);
  border: 2px solid white; z-index: 2;
}
.cbtn {
  position: absolute; transform: translate(-50%,-50%);
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--card); border: 1.5px solid var(--border);
  color: var(--text-m); font-size: 8px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .15s; z-index: 1; text-align: center;
  line-height: 1.1; padding: 2px; box-shadow: var(--shadow);
}
.cbtn:hover { background: var(--primary); border-color: var(--primary); color: #fff; transform: translate(-50%,-50%) scale(1.15); box-shadow: 0 4px 14px rgba(37,99,235,.4); }
.cbtn:active { transform: translate(-50%,-50%) scale(.92); }

/* Segment rows */
.seg-row {
  background: var(--card2); border: 1px solid var(--border);
  border-radius: 8px; padding: 9px 12px;
  display: flex; align-items: center; gap: 8px; margin-bottom: 6px;
}

/* Result box */
.tb-result {
  background: linear-gradient(135deg, rgba(37,99,235,.06), rgba(37,99,235,.03));
  border: 1.5px solid rgba(37,99,235,.15);
  border-radius: 13px; padding: 18px; margin-bottom: 16px;
}
.tb-result-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 4px; text-align: center; }
.tb-result-div  { border-left: 1px solid rgba(37,99,235,.12); border-right: 1px solid rgba(37,99,235,.12); }

/* Cart table */
.tb-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tb-tbl th {
  background: var(--card2); color: var(--text-s); font-weight: 700;
  font-size: 11px; text-transform: uppercase; letter-spacing: .5px;
  padding: 11px 10px; text-align: left; border-bottom: 1px solid var(--border);
}
.tb-tbl td { padding: 11px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tb-tbl tr:last-child td { border-bottom: none; }
.tb-tbl tr:hover td { background: rgba(37,99,235,.03); }

/* Notification */
@keyframes tbSlideUp { from{opacity:0;transform:translateX(-50%) translateY(16px);}to{opacity:1;transform:translateX(-50%) translateY(0);} }
.tb-notif {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  padding: 13px 22px; border-radius: 12px; font-size: 14px; font-weight: 600;
  z-index: 9999; animation: tbSlideUp .3s ease; white-space: nowrap;
  box-shadow: var(--shadow-lg); border: 1px solid;
}

/* Cart badge */
.tb-badge {
  background: var(--danger); color: #fff; font-size: 10px; font-weight: 800;
  border-radius: 50%; width: 18px; height: 18px; display: flex; align-items: center;
  justify-content: center; position: absolute; top: -6px; right: -6px;
}

/* Hero strip for hisoblash */
.tb-hero {
  background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
  border: 1px solid #bbf7d0; border-radius: var(--radius);
  padding: 18px 22px; margin-bottom: 22px;
  display: flex; gap: 16px; align-items: center; flex-wrap: wrap;
}

/* ─── RESPONSIVE ──────────────────────────────── */
@media(max-width:768px){
  .nav-links { display: none; position: absolute; top: var(--nav-h); left: 0; right: 0; background: var(--nav-bg); flex-direction: column; gap: 4px; padding: 12px; border-bottom: 1px solid rgba(255,255,255,.06); box-shadow: 0 8px 24px rgba(0,0,0,.3); z-index: 199; }
  .nav-links.open { display: flex; }
  .hamburger { display: block; }
  .nav-user  { display: none; }
  .main-wrap { padding: 16px 14px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-group.full { grid-column: span 1; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .page-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .tb-result-grid { grid-template-columns: 1fr; gap: 12px; }
  .tb-result-div  { border: none; padding-top: 12px; border-top: 1px solid rgba(37,99,235,.12); }
}
@media(max-width:480px){
  .stats-grid { grid-template-columns: 1fr; }
  .type-btn { font-size: 12px; padding: 9px 6px; }
  .compass-wrap { width: 200px; height: 200px; }
  .cbtn { width: 30px; height: 30px; font-size: 7px; }
  .auth-card { padding: 28px 20px; }
}

/* ─── PRINT ──────────────────────────────────── */
@media print {
  @page { size: A4 landscape; margin: 10mm 12mm; }
  body { background: #fff !important; }
  .topnav,.site-footer,.no-print,.page-header,.alert { display: none !important; }
  .main-wrap { padding: 0 !important; max-width: 100% !important; }
  .card { box-shadow: none !important; border: 1px solid #e2e8f0 !important; }
  .pdf-tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
  .pdf-tbl th { background: #1e3a8a !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; color: #fff !important; padding: 6px 8px; font-size: 10px; font-weight: 800; border: 1px solid #1e3a8a; text-align: center; }
  .pdf-tbl td { padding: 5px 8px; border: 1px solid #d1d5db; vertical-align: middle; }
  .pdf-tbl tbody tr:nth-child(even) td { background: #f8fafc !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pdf-img { width: 168px !important; height: 105px !important; object-fit: contain; display: block; margin: 0 auto; }
}
