
:root{
  --bg:#0b1020;
  --panel:#111827;
  --panel2:#172033;
  --card:#ffffff;
  --muted:#64748b;
  --text:#0f172a;
  --white:#ffffff;
  --primary:#f59e0b;
  --primary2:#fbbf24;
  --success:#16a34a;
  --danger:#dc2626;
  --info:#2563eb;
  --border:#e5e7eb;
  --shadow:0 18px 50px rgba(15,23,42,.12);
  --radius:18px;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family:Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color:var(--text);
  background:
    radial-gradient(circle at top left, rgba(245,158,11,.18), transparent 32rem),
    linear-gradient(180deg,#f8fafc 0%,#eef2f7 100%);
  min-height:100vh;
  line-height:1.55;
}

a{color:inherit;text-decoration:none}
img{max-width:100%}

header{
  position:sticky;
  top:0;
  z-index:50;
  min-height:72px;
  padding:12px 28px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  color:#fff;
  background:rgba(11,16,32,.94);
  backdrop-filter: blur(18px);
  border-bottom:1px solid rgba(255,255,255,.08);
  box-shadow:0 12px 35px rgba(2,6,23,.2);
}

.logo{
  display:flex;
  align-items:center;
  gap:12px;
  font-weight:900;
  letter-spacing:.4px;
}
.logo img{height:46px;width:auto;filter:drop-shadow(0 8px 18px rgba(245,158,11,.25))}
.brand-text{font-size:18px;color:#fff}

nav{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
nav a{
  color:#dbeafe;
  font-size:14px;
  font-weight:700;
  padding:9px 12px;
  border-radius:999px;
  border:1px solid transparent;
  transition:.2s ease;
}
nav a:hover{
  color:#111827;
  background:linear-gradient(135deg,var(--primary),var(--primary2));
  box-shadow:0 8px 24px rgba(245,158,11,.35);
}

section{
  width:min(1180px, calc(100% - 28px));
  margin:28px auto;
}

h1,h2,h3{
  margin:0 0 12px;
  line-height:1.2;
  letter-spacing:-.02em;
}
h1{font-size:clamp(30px,5vw,54px)}
h2{font-size:clamp(24px,3vw,36px)}
h3{font-size:20px}

p{margin:0 0 12px}
.muted, small{color:var(--muted)}
strong{font-weight:900}

.box,.card{
  background:rgba(255,255,255,.94);
  border:1px solid rgba(226,232,240,.9);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:22px;
  margin:16px 0;
  overflow:hidden;
}
.card{
  position:relative;
  transition:.2s ease;
}
.card:hover,.box:hover{
  transform:translateY(-1px);
  box-shadow:0 22px 60px rgba(15,23,42,.15);
}
.card small,.box small{
  display:inline-block;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.08em;
  font-size:11px;
  color:#64748b;
}
.card h2{font-size:30px;margin-top:5px}

.grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:16px;
  margin:16px 0;
}

.hero,.hero-card,.admin-hero,.ref-card{
  background:
    radial-gradient(circle at top right, rgba(245,158,11,.30), transparent 22rem),
    linear-gradient(135deg,#0b1020,#1e293b 60%,#111827);
  color:#fff;
  border-radius:24px;
  padding:28px;
  margin-bottom:20px;
  box-shadow:0 28px 70px rgba(2,6,23,.28);
  border:1px solid rgba(255,255,255,.08);
}
.hero p,.hero-card p,.admin-hero p,.ref-card p{color:#dbeafe}
.hero h2,.hero-card h2,.admin-hero h2,.ref-card h2{color:#fff}

button,.btn,input[type="submit"]{
  appearance:none;
  border:0;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:42px;
  padding:10px 16px;
  border-radius:12px;
  background:linear-gradient(135deg,var(--primary),var(--primary2));
  color:#111827;
  font-weight:900;
  font-size:14px;
  box-shadow:0 10px 25px rgba(245,158,11,.28);
  transition:.2s ease;
  margin:4px 4px 4px 0;
}
button:hover,.btn:hover,input[type="submit"]:hover{transform:translateY(-1px);filter:saturate(1.08)}
.btn.secondary,button.secondary,.secondary{
  background:#eef2f7;
  color:#0f172a;
  box-shadow:none;
  border:1px solid #dbe3ef;
}
button.danger,.btn.danger{
  background:linear-gradient(135deg,#ef4444,#dc2626);
  color:#fff;
}

form{
  display:block;
}
label{
  display:block;
  margin:12px 0 6px;
  color:#334155;
  font-weight:800;
  font-size:13px;
}
input,select,textarea{
  width:100%;
  min-height:44px;
  border:1px solid #d6dee9;
  border-radius:12px;
  padding:11px 13px;
  background:#fff;
  color:#0f172a;
  outline:none;
  font:inherit;
  transition:.18s ease;
  margin:6px 0 10px;
}
textarea{min-height:110px;resize:vertical}
select[multiple]{min-height:160px}
input:focus,select:focus,textarea:focus{
  border-color:var(--primary);
  box-shadow:0 0 0 4px rgba(245,158,11,.16);
}
input[readonly]{
  background:#f8fafc;
  color:#475569;
}

.table-scroll{
  overflow:auto;
  -webkit-overflow-scrolling:touch;
}
table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  min-width:760px;
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:16px;
  overflow:hidden;
}
th{
  background:#0f172a;
  color:#fff;
  text-align:left;
  padding:13px 14px;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.07em;
  white-space:nowrap;
}
td{
  padding:13px 14px;
  border-top:1px solid #e5e7eb;
  vertical-align:top;
  font-size:14px;
}
tr:nth-child(even) td{background:#f8fafc}

.success,.error,.warning,.info{
  padding:13px 15px;
  border-radius:14px;
  margin:12px 0;
  font-weight:800;
  border:1px solid transparent;
}
.success{background:#ecfdf5;color:#166534;border-color:#bbf7d0}
.error{background:#fef2f2;color:#991b1b;border-color:#fecaca}
.warning{background:#fffbeb;color:#92400e;border-color:#fde68a}
.info{background:#eff6ff;color:#1d4ed8;border-color:#bfdbfe}

.badge,.status-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:5px 11px;
  border-radius:999px;
  font-size:12px;
  font-weight:900;
  background:#e0f2fe;
  color:#075985;
}

.form-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:12px;
}
.copy-box{
  word-break:break-all;
  background:#fff;
  color:#111827;
  border-radius:14px;
  padding:14px;
  margin:12px 0;
  border:1px solid #e5e7eb;
}

.progress{
  height:10px;
  background:#e5e7eb;
  border-radius:999px;
  overflow:hidden;
}
.progress > span{
  display:block;
  height:100%;
  border-radius:999px;
  background:linear-gradient(135deg,var(--primary),var(--success));
}

.auth-shell{
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:26px;
}
.auth-shell .box{
  width:min(460px,100%);
  margin:0;
}

@media (max-width: 760px){
  header{
    position:relative;
    flex-direction:column;
    align-items:flex-start;
    padding:14px;
  }
  nav{justify-content:flex-start}
  nav a{font-size:13px;padding:8px 10px}
  section{width:min(100% - 18px,1180px);margin:16px auto}
  .box,.card{padding:16px;border-radius:16px}
  .hero,.hero-card,.admin-hero,.ref-card{padding:20px;border-radius:18px}
  table{min-width:680px}
  button,.btn{width:100%;margin:6px 0}
}

@media print{
  header,button,.btn{display:none!important}
  body{background:#fff}
  .box,.card{box-shadow:none;border:1px solid #ddd}
}
