:root{
  --bg:#0b1020;
  --card:#0f1733;
  --card2:#111c3f;
  --text:#f6f7fb;
  --muted:#b9c0d4;
  --border:rgba(255,255,255,.08);
  --primary:#2564b8;
  --danger:#cc2230;
  --good:#4caf50;
  --warning:#ff8800;
  --shadow:0 10px 30px rgba(0,0,0,.35);
  --radius:16px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  color:var(--text);
  background:
    radial-gradient(900px 600px at 20% 15%, rgba(37,100,184,.22), transparent 60%),
    radial-gradient(900px 600px at 80% 25%, rgba(204,34,48,.18), transparent 55%),
    linear-gradient(160deg, #070a14, #0b1020);
}

a{color:inherit;text-decoration:none}
.container{width:min(1100px, 92vw); margin:22px auto 42px;}

.topbar{
  position:sticky; top:0; z-index:10;
  backdrop-filter: blur(10px);
  background: rgba(8,12,26,.72);
  border-bottom:1px solid var(--border);
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 18px;
}

.brand{display:flex; align-items:center; gap:12px}
.brand-mark{
  width:36px; height:36px; border-radius:12px;
  background: linear-gradient(135deg, var(--primary), #5aa6ff);
  box-shadow: 0 8px 20px rgba(37,100,184,.35);
}
.brand-title{font-weight:800; letter-spacing:.2px}
.brand-sub{font-size:12px; color:var(--muted)}
.nav{display:flex; gap:12px; align-items:center; flex-wrap:wrap}
.nav a{
  padding:8px 12px; border-radius:12px;
  border:1px solid transparent;
  color:var(--muted);
}
.nav a.active{color:var(--text); border-color:var(--border); background:rgba(255,255,255,.03)}
.nav a.muted{color:rgba(255,255,255,.65)}

.card{
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  border:1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding:18px;
}

.card-head{
  display:flex; align-items:flex-start; justify-content:space-between; gap:14px;
  margin-bottom:12px;
}
.card-title{font-size:18px; font-weight:800}
.card-sub{color:var(--muted); font-size:13px; margin-top:6px}
.btn-row{display:flex; gap:10px; align-items:center}

.grid{
  display:grid; gap:14px;
  grid-template-columns: repeat(4, minmax(0,1fr));
}
@media (max-width: 950px){ .grid{grid-template-columns: repeat(2, minmax(0,1fr));} }
@media (max-width: 520px){ .grid{grid-template-columns: 1fr;} }

.kpi{display:flex; flex-direction:column; gap:6px}
.kpi-label{color:var(--muted); font-size:13px}
.kpi-value{font-size:28px; font-weight:900}

.mt{height:14px}

.table-wrap{overflow:auto; border-radius:14px; border:1px solid var(--border)}
.table{width:100%; border-collapse:collapse; min-width: 760px; background: rgba(10,14,30,.25);}
.table thead th{
  font-size:12px; text-transform:uppercase; letter-spacing:.08em;
  color:rgba(255,255,255,.7);
  background: rgba(255,255,255,.04);
  border-bottom:1px solid var(--border);
  padding:12px 12px;
  text-align:left;
}
.table td{
  border-top:1px solid var(--border);
  padding:12px 12px;
  vertical-align:top;
}
.right{text-align:right}
.link{color:#8fb9ff}
.muted{color:var(--muted)}

.badge{
  display:inline-flex; align-items:center;
  padding:6px 10px; border-radius:999px;
  font-size:12px; font-weight:700;
  border:1px solid var(--border);
  background: rgba(255,255,255,.03);
}
.badge.pending{border-color:rgba(255,136,0,.45); color:#ffd8b0}
.badge.packed{border-color:rgba(90,166,255,.45); color:#bfe0ff}
.badge.shipped{border-color:rgba(156,39,176,.45); color:#f0c8ff}
.badge.delivered{border-color:rgba(76,175,80,.45); color:#c8f5d0}
.badge.cancelled{border-color:rgba(204,34,48,.55); color:#ffc0c8}
.badge.returned{border-color:rgba(255,255,255,.25); color:#e7e7e7}

.form{display:flex; flex-direction:column; gap:14px}
.form label{font-size:12px; color:rgba(255,255,255,.72); text-transform:uppercase; letter-spacing:.08em}
.form input, .form select{
  width:100%;
  padding:12px 12px;
  border-radius:12px;
  border:1px solid var(--border);
  background: rgba(5,8,18,.55);
  color:var(--text);
  outline:none;
}
.form input:focus, .form select:focus{border-color:rgba(37,100,184,.55)}
.form-grid{
  display:grid; gap:12px;
  grid-template-columns: repeat(2, minmax(0,1fr));
}
@media (max-width: 720px){ .form-grid{grid-template-columns: 1fr;} }

.section{padding:14px; border-radius:16px; border:1px solid var(--border); background: rgba(255,255,255,.02)}
.section-title{font-weight:800; margin-bottom:10px}

.row-actions{display:flex; justify-content:flex-end; padding-top:10px}

.totals{
  margin-top:10px;
  border:1px dashed rgba(255,255,255,.18);
  border-radius:14px;
  padding:12px;
  background: rgba(255,255,255,.02);
}
.totline{display:flex; justify-content:space-between; padding:8px 4px; color:rgba(255,255,255,.84)}
.totline.grand{font-size:16px; font-weight:900}
.dot{display:inline-block; width:6px; height:6px; border-radius:50%; background:rgba(255,255,255,.25); margin:0 8px}

.actions{display:flex; gap:10px; justify-content:flex-end; flex-wrap:wrap}

.btn{
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.03);
  color:var(--text);
  cursor:pointer;
  display:inline-flex; align-items:center; justify-content:center;
  gap:8px;
}
.btn:hover{background: rgba(255,255,255,.06)}
.btn.primary{background: linear-gradient(135deg, var(--primary), #5aa6ff); border-color: transparent}
.btn.primary:hover{filter:brightness(1.03)}
.btn.danger{background: rgba(204,34,48,.18); border-color: rgba(204,34,48,.55)}
.btn.ghost{background: transparent}
.btn.small{padding:7px 10px; border-radius:10px; font-size:12px}

.alert{
  background: rgba(204,34,48,.15);
  border: 1px solid rgba(204,34,48,.55);
  color: #ffd1d6;
  padding: 12px;
  border-radius: 14px;
  margin-bottom: 12px;
}

.split{
  display:grid; gap:12px;
  grid-template-columns: 1.2fr 1fr;
}
@media (max-width: 860px){ .split{grid-template-columns: 1fr;} }

.box{
  padding:14px;
  border-radius:16px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.02);
}
.box-title{font-weight:900; margin-bottom:10px}
.kv{display:flex; justify-content:space-between; gap:10px; padding:8px 0; border-top:1px solid rgba(255,255,255,.06)}
.kv:first-of-type{border-top:0}
.kv span{color:var(--muted)}

.auth{
  display:grid; place-items:center;
  min-height:100vh;
  padding:22px;
}
.auth-card{
  width:min(440px, 96vw);
  padding:18px;
  border-radius:18px;
  border:1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.03));
  box-shadow: var(--shadow);
}
.auth-brand{display:flex; gap:12px; align-items:center; margin-bottom:14px}
.auth-title{font-weight:900; font-size:18px}
.auth-sub{color:var(--muted); font-size:13px}
.hint{margin-top:12px; color:var(--muted); font-size:13px}


/* Inline status dropdown */
.status-select{
  padding:6px 10px;
  border-radius:10px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.05);
  color:#fff;
  font-size:13px;
}
