/* TechPioneerHub admin panel */
:root {
  --bg: #0c0c11; --bg2: #141419; --card: #17171f; --border: rgba(255,255,255,.09);
  --text: #f5f3ee; --muted: #a8a29e; --muted2: #6d6d7a;
  --primary: #f9560f; --primary2: #ff8a3d; --success: #22c55e; --danger: #ef4444;
  --radius: 12px; --font: 'Inter Tight', 'Inter', system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.55; font-size: 15px; }
a { color: var(--primary2); }
h1 { font-size: 1.7rem; margin: 0 0 .4rem; }
h2 { font-size: 1.1rem; margin: 0; }
.admin-sub { color: var(--muted); margin: 0 0 1.5rem; }
.fine-print { color: var(--muted2); font-size: .85rem; }

/* login */
.admin-body { display: grid; place-items: center; min-height: 100vh; padding: 1.2rem;
  background: radial-gradient(700px 380px at 50% -80px, rgba(249,86,15,.16), transparent 70%), var(--bg); }
.login-wrap { width: min(920px, 100%); }
.login-grid { display: grid; grid-template-columns: 1fr 1.05fr; background: var(--card); border: 1px solid var(--border); border-radius: 24px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.55); }
.login-side { background: linear-gradient(140deg, #9a3412, #f9560f 55%, #ff8a3d); color: #fff; padding: 3rem 2.6rem; display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; }
.login-side::after { content: ''; position: absolute; width: 340px; height: 340px; right: -110px; bottom: -120px; background: radial-gradient(circle, rgba(255,255,255,.22), transparent 65%); }
.login-side .logo-mark { background: #fff; color: #c2410c; width: 52px; height: 52px; font-size: 1.1rem; }
.login-side h2 { color: #fff; font-family: 'Urbanist', 'Inter Tight', sans-serif; font-size: 1.8rem; margin: 1.1rem 0 .5rem; position: relative; z-index: 1; }
.login-side p { color: rgba(255,255,255,.88); margin: 0; position: relative; z-index: 1; }
.login-points { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .65rem; position: relative; z-index: 1; }
.login-points li { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); border-radius: 12px; padding: .6rem .9rem; font-size: .9rem; font-weight: 600; }
.login-form { padding: 2.8rem 2.6rem; }
.login-form h1 { font-family: 'Urbanist', 'Inter Tight', sans-serif; margin-bottom: 0; font-size: 1.65rem; }
.login-sub { color: var(--muted); margin: .25rem 0 1rem; }
.login-box { background: var(--card); border: 1px solid var(--border); border-radius: 20px; padding: 2.4rem; box-shadow: 0 24px 70px rgba(0,0,0,.55); position: relative; overflow: hidden; }
.login-box::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--primary), var(--primary2)); }
.login-logo { display: grid; place-items: center; margin-bottom: .8rem; }
.logo-mark { background: linear-gradient(135deg, var(--primary), var(--primary2)); color: #fff; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-weight: 800; }
.login-box h1 { text-align: center; margin-bottom: 0; }
.login-sub { text-align: center; color: var(--muted); margin: .2rem 0 1.2rem; }
.login-form .login-sub { text-align: left; }
.login-back { display: block; text-align: center; margin-top: 1rem; font-size: .88rem; }
@media (max-width: 760px) {
  .login-grid { grid-template-columns: 1fr; }
  .login-side { padding: 2rem 1.6rem; }
  .login-form { padding: 2rem 1.5rem; }
}

/* layout */
.admin-layout { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-side { background: var(--bg2); border-right: 1px solid var(--border); padding: 1.2rem; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.admin-brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; font-weight: 800; font-size: 1.15rem; color: #fff; margin-bottom: 1.4rem; }
.admin-side nav { display: flex; flex-direction: column; gap: .25rem; }
.admin-side nav a { text-decoration: none; color: var(--muted); padding: .6rem .8rem; border-radius: 10px; font-weight: 500; font-size: .93rem; }
.admin-side nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.admin-side nav a.active { background: rgba(99,102,241,.18); color: #fff; }
.admin-side-foot { margin-top: auto; display: flex; flex-direction: column; gap: .4rem; font-size: .9rem; }
.admin-main { padding: 2rem; max-width: 1200px; }

/* components */
.panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem; margin-bottom: 1.4rem; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.page-title-row { margin-bottom: 1.2rem; }
.panel-head h1, .panel-head h2 { margin: 0; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.4rem; }
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.3rem; }
.stat-num { display: block; font-size: 1.7rem; font-weight: 800; }
.stat-label { color: #fff; font-weight: 600; }
.stat-sub { color: var(--muted2); font-size: .85rem; }
.stat-alert { border-color: rgba(245,158,11,.5); }
.admin-cols { display: grid; grid-template-columns: 1.6fr 1fr; gap: 1.4rem; align-items: start; }
.admin-empty { color: var(--muted); }
.admin-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.admin-table th, .admin-table td { text-align: left; padding: .7rem .8rem; border-bottom: 1px solid rgba(255,255,255,.06); vertical-align: top; }
.admin-table th { color: var(--muted2); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.admin-table small { color: var(--muted2); }
.admin-table tr.unread td { font-weight: 600; }
.status { display: inline-block; padding: .2rem .7rem; border-radius: 999px; font-size: .78rem; font-weight: 700; }
.status-active { background: rgba(34,197,94,.15); color: #86efac; }
.status-draft { background: rgba(148,163,184,.15); color: #cbd5e1; }
.status-pending { background: rgba(245,158,11,.15); color: #fcd34d; }
.status-paid { background: rgba(34,211,238,.15); color: #67e8f9; }
.status-delivered { background: rgba(34,197,94,.15); color: #86efac; }
.status-cancelled { background: rgba(239,68,68,.15); color: #fca5a5; }
.row-actions { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.mini-list { padding-left: 1.2rem; color: var(--muted); }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.detail-grid label { margin: 0 0 .1rem; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted2); }
.detail-grid p { margin: 0; }
.quote-box { background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; padding: 1rem; }
.status-form { margin-top: 1.2rem; }
.filter-row { display: flex; gap: .6rem; margin-bottom: 1.2rem; }
.filter-row input { flex: 1; max-width: 320px; }
.filter-row select { max-width: 200px; }

.alert { border-radius: 10px; padding: .8rem 1.1rem; margin: 0 0 1.2rem; }
.alert p { margin: 0; }
.alert-error { background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.4); }
.alert-ok { background: rgba(34,197,94,.12); border: 1px solid rgba(34,197,94,.4); }

/* buttons */
.btn { display: inline-block; text-decoration: none; border: none; cursor: pointer; font-family: inherit; font-weight: 700; font-size: .9rem; border-radius: 8px; padding: .55rem 1.1rem; }
.btn:hover { opacity: .9; }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary2)); color: #fff; }
.btn-ghost { background: rgba(255,255,255,.07); color: var(--text); }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-danger { background: rgba(239,68,68,.15); color: #fca5a5; border: 1px solid rgba(239,68,68,.3); }
.btn-sm { padding: .35rem .7rem; font-size: .8rem; }
.btn-lg { padding: .8rem 1.6rem; font-size: 1rem; }
.btn-block { display: block; width: 100%; text-align: center; }

/* forms */
input[type=text], input[type=email], input[type=number], input[type=password], input[type=search], select, textarea {
  width: 100%; background: var(--bg2); border: 1px solid var(--border); color: var(--text);
  border-radius: 8px; padding: .65rem .8rem; font-family: inherit; font-size: .92rem;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(249,86,15,.25); }
select option { background: var(--bg2); }
label { display: block; font-weight: 600; font-size: .85rem; margin: .9rem 0 .3rem; color: #cbd5e1; }
.admin-form .form-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.admin-form .span-2 { grid-column: span 2; }
.admin-form button[type=submit] { margin-top: 1.2rem; }
.checkbox-line { grid-column: span 2; }
.checkbox-line label { display: flex; gap: .6rem; align-items: center; }
.checkbox-line input { width: auto; }
.form-narrow { max-width: 520px; }
input[type=file] { width: 100%; color: var(--muted); }

/* chips (mirror of public) */
.chip-row { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.chip { background: rgba(255,255,255,.05); border: 1px solid var(--border); color: var(--muted); padding: .4rem 1rem; border-radius: 999px; text-decoration: none; font-size: .85rem; font-weight: 600; }
.chip-active { background: linear-gradient(135deg, var(--primary), var(--primary2)); color: #fff; border-color: transparent; }

@media (max-width: 900px) {
  .admin-layout { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; }
  .admin-cols { grid-template-columns: 1fr; }
  .admin-form .form-2col { grid-template-columns: 1fr; }
  .admin-form .span-2 { grid-column: span 1; }
  .admin-main { padding: 1.2rem; }
  .admin-table { display: block; overflow-x: auto; }
}
