/* AIS Gadget Search - ATC-style UI (Maroon + Grey) */
:root{
  --maroon:#7a0019;
  --maroon2:#4b0010;
  --bg:#0b0d12;
  --card:#131823;
  --muted:#a8b0c2;
  --text:#eef1f7;
  --border:rgba(255,255,255,.10);
  --shadow: 0 16px 45px rgba(0,0,0,.55);
  --radius:16px;
  --danger:#ff3b30;
  --ok:#2ecc71;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color:var(--text);
  background: var(--bg);
}

/* ATC-like hero */
.hero{
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(0,0,0,.75), rgba(0,0,0,.92)),
    radial-gradient(1200px 700px at 20% 0%, rgba(122,0,25,.35), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1200' height='800'%3E%3Cdefs%3E%3CradialGradient id='g' cx='50%25' cy='40%25' r='70%25'%3E%3Cstop offset='0%25' stop-color='%23151b26'/%3E%3Cstop offset='100%25' stop-color='%230b0d12'/%3E%3C/radialGradient%3E%3C/defs%3E%3Crect width='1200' height='800' fill='url(%23g)'/%3E%3Cpath d='M0 560 C220 520 380 680 600 640 C820 600 980 700 1200 660 L1200 800 L0 800 Z' fill='%23131823' opacity='.55'/%3E%3C/svg%3E") center/cover no-repeat;
  display:flex;
  flex-direction:column;
}

/* Top bar */
.topbar{
  position:sticky; top:0; z-index:10;
  backdrop-filter: blur(10px);
  background: rgba(10,12,18,.55);
  border-bottom: 1px solid var(--border);
}
.topbar-inner{
  max-width:1100px;
  margin:0 auto;
  padding:14px 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.brand{
  display:flex; align-items:center; gap:10px;
  text-decoration:none; color:var(--text);
}
.logo{
  width:34px; height:34px;
  border-radius:10px;
  background: linear-gradient(135deg, var(--maroon), var(--maroon2));
  box-shadow: 0 10px 22px rgba(122,0,25,.35);
  display:grid; place-items:center;
  font-weight:900;
}
.brand-title strong{display:block; font-size:14px; letter-spacing:.4px}
.brand-title span{display:block; font-size:12px; color:var(--muted)}
.chip{
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  color:var(--muted);
  background: rgba(255,255,255,.03);
}

/* Content */
.wrap{
  max-width:1100px;
  margin:0 auto;
  padding: 42px 18px 60px;
  display:flex;
  justify-content:center;
}
.card{
  width: 100%;
  max-width: 720px;
  background: rgba(19,24,35,.92);
  border:1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.card-header{
  padding:20px 20px 12px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(122,0,25,.18), transparent);
}
.card-header h1, .card-header h2{
  margin:0;
  font-size:22px;      /* not very big letters */
  letter-spacing:.2px;
}
.sub{
  margin:8px 0 0;
  color:var(--muted);
  font-size:13px;
  line-height:1.45;
}
.card-body{padding:20px}

/* Form */
.field{margin-bottom:12px}
label{
  display:block;
  font-size:12px;
  color:rgba(238,241,247,.75);
  margin:0 0 6px;
}
input[type="text"], input[type="password"], input[type="file"]{
  width:100%;
  padding:12px 12px;
  border-radius:12px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.03);
  color:var(--text);
  outline:none;
}
input::placeholder{color: rgba(168,176,194,.6)}
input:focus{
  border-color: rgba(122,0,25,.55);
  box-shadow: 0 0 0 4px rgba(122,0,25,.20);
}
.actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:10px;
}
.btn{
  appearance:none;
  border:1px solid var(--border);
  background: rgba(255,255,255,.04);
  color:var(--text);
  padding:11px 14px;
  border-radius:12px;
  cursor:pointer;
  font-weight:700;
  font-size:14px;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  gap:8px;
}
.btn-primary{
  border-color: rgba(122,0,25,.55);
  background: linear-gradient(135deg, var(--maroon), var(--maroon2));
}
.btn-primary:hover{filter:brightness(1.05)}
.btn:hover{transform: translateY(-1px)}
.btn:active{transform: translateY(0)}
.btn-danger{
  background: rgba(255,59,48,.12);
  border-color: rgba(255,59,48,.30);
  color: #ffd1cf;
}
.btn-small{padding:8px 10px; border-radius:10px; font-size:12px}

.notice{
  margin-top:14px;
  padding:14px;
  border-radius:14px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.03);
}
.notice-danger{
  border-color: rgba(255,59,48,.30);
  background: linear-gradient(180deg, rgba(255,59,48,.10), rgba(255,255,255,.02));
}
.notice-ok{
  border-color: rgba(46,204,113,.25);
  background: linear-gradient(180deg, rgba(46,204,113,.10), rgba(255,255,255,.02));
}
.big-flag{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:900;
  letter-spacing:.7px;
  font-size:16px;
  text-transform:uppercase;
}
.big-flag .icon{
  width:36px; height:36px;
  border-radius:12px;
  display:grid; place-items:center;
  background: rgba(255,59,48,.16);
  border:1px solid rgba(255,59,48,.25);
}
.serial-pill{
  margin-top:10px;
  display:inline-flex;
  gap:8px;
  align-items:center;
  border-radius:999px;
  padding:8px 12px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.03);
  color: rgba(238,241,247,.92);
  font-size:13px;
}

/* Admin table */
.table-wrap{overflow:auto}
table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  font-size:13px;
}
th,td{
  padding:12px 12px;
  border-bottom:1px solid var(--border);
  white-space:nowrap;
}
th{
  color: rgba(238,241,247,.75);
  font-weight:800;
  text-align:left;
  position:sticky; top:0;
  background: rgba(19,24,35,.98);
}
tbody tr:hover{background: rgba(255,255,255,.03)}
td a{color:#ffb3bf; text-decoration:none}
td a:hover{text-decoration:underline}

/* Flash */
.flash{
  padding:12px 14px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  color: rgba(238,241,247,.9);
  margin-bottom:12px;
}
.flash.warn{
  border-color: rgba(255,193,7,.25);
  background: rgba(255,193,7,.10);
  color: #ffe9b0;
}

.footer{
  text-align:center;
  color:rgba(255,255,255,.45);
  font-size:12px;
  padding: 22px 0 30px;
}
