:root{
  --bg: #0A1732;         /* dark */
  --card: #0F1F42;
  --border: rgba(255,255,255,.10);
  --text: #F3F6FF;
  --muted: rgba(243,246,255,.70);
  --blue: #023E86;       /* extracted */
  --orange: #DC945E;     /* extracted */
  --shadow: 0 18px 50px rgba(0,0,0,.35);
}

*{ box-sizing:border-box; }
html,body{ margin:0; padding:0; font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial; background: radial-gradient(900px 500px at 20% 0%, rgba(2,62,134,.45), transparent 60%), radial-gradient(700px 400px at 90% 30%, rgba(220,148,94,.22), transparent 55%), var(--bg); color: var(--text); }

a{ color: var(--text); text-decoration:none; }
a:hover{ opacity:.9; }

.topbar{
  display:flex; align-items:center; justify-content:space-between;
  padding:16px 22px; border-bottom:1px solid var(--border);
  backdrop-filter: blur(10px);
}

.brand{ display:flex; align-items:center; gap:12px; }
.brand-mark{
  width:38px; height:38px; border-radius:12px;
  background: linear-gradient(135deg, var(--blue), rgba(2,62,134,.35));
  box-shadow: var(--shadow);
  position:relative;
}
.brand-mark:after{
  content:""; position:absolute; right:-10px; top:10px;
  width:12px; height:12px; border-radius:6px; background: var(--orange);
}
.brand-title{ font-weight:900; letter-spacing:.08em; font-size:14px; }
.brand-sub{ font-size:12px; color: var(--muted); margin-top:2px; }

.nav{ display:flex; gap:14px; align-items:center; }
.nav a{ padding:8px 10px; border-radius:10px; border:1px solid transparent; }
.nav a:hover{ border-color: var(--border); background: rgba(255,255,255,.04); }
.nav a.muted{ color: var(--muted); }

.container{ max-width:1100px; margin: 22px auto; padding: 0 16px; }

.grid{ display:grid; grid-template-columns: 1.2fr .8fr; gap:16px; }
@media (max-width: 980px){ .grid{ grid-template-columns:1fr; } }

.card{
  background: rgba(15,31,66,.75);
  border:1px solid var(--border);
  border-radius:18px;
  box-shadow: var(--shadow);
  padding:18px;
}

h1{ margin:0 0 10px 0; font-size:22px; }
h2{ margin:0 0 10px 0; font-size:18px; }
.hint{ color: var(--muted); font-size:13px; margin-top:12px; line-height:1.35; }
.hint.small{ font-size:12px; }

.form{ display:flex; flex-direction:column; gap:12px; margin-top:12px; }
label{ display:flex; flex-direction:column; gap:6px; font-size:13px; color: var(--muted); }
input, select{
  padding:10px 12px; border-radius:12px; outline:none;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(10,23,50,.55);
  color: var(--text);
}
input:focus, select:focus{ border-color: rgba(220,148,94,.65); box-shadow: 0 0 0 3px rgba(220,148,94,.18); }

.row{ display:flex; gap:12px; }
.row .grow{ flex:1; }
.hidden{ display:none !important; }

.btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding:10px 14px; border-radius:12px; cursor:pointer;
  border:1px solid transparent; font-weight:700;
}
.btn-primary{
  background: linear-gradient(135deg, var(--blue), rgba(2,62,134,.55));
  border-color: rgba(2,62,134,.55);
}
.btn-ghost{
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.10);
}
.btn.small{ padding:7px 10px; border-radius:10px; font-size:12px; font-weight:700; }
.btn:hover{ transform: translateY(-1px); }

.flash-wrap{ display:flex; flex-direction:column; gap:10px; margin-bottom:14px; }
.flash{ padding:10px 12px; border-radius:12px; border:1px solid rgba(255,255,255,.10); background: rgba(255,255,255,.05); }
.flash-success{ border-color: rgba(2,62,134,.55); }
.flash-warning{ border-color: rgba(220,148,94,.55); }
.flash-danger{ border-color: rgba(220,94,94,.60); }

.preview{ display:flex; justify-content:center; padding:14px; background: rgba(255,255,255,.03); border:1px dashed rgba(255,255,255,.12); border-radius:16px; }
.qrimg{ width:min(360px, 100%); height:auto; border-radius:12px; background:#fff; padding:10px; }
.meta{ display:flex; flex-direction:column; gap:8px; margin-top:12px; }
.pill{
  display:inline-flex; align-items:center;
  padding:6px 10px; border-radius:999px;
  background: rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.10);
  width: fit-content;
}
.pill.small{ padding:4px 8px; font-size:12px; }

.actions{ display:flex; gap:10px; flex-wrap:wrap; margin-top:12px; }
.mono{ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; font-size:12px; color: rgba(243,246,255,.9); }
.truncate{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

.table{ margin-top:12px; border:1px solid rgba(255,255,255,.10); border-radius:14px; overflow:hidden; }
.thead, .trow{ display:grid; grid-template-columns: 70px 220px 120px 1fr 160px; gap:10px; align-items:center; }
.thead{ background: rgba(255,255,255,.05); padding:10px 12px; color: var(--muted); font-size:12px; }
.trow{ padding:10px 12px; border-top:1px solid rgba(255,255,255,.08); }
@media (max-width: 980px){
  .thead, .trow{ grid-template-columns: 70px 1fr; }
  .thead div:nth-child(n+3), .trow div:nth-child(n+3){ display:none; }
}

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

/* Modal */
.modal{ position:fixed; inset:0; background: rgba(0,0,0,.55); display:flex; align-items:center; justify-content:center; padding:16px; z-index:999; }
.modal-card{ width:min(520px, 100%); background: rgba(15,31,66,.96); border:1px solid rgba(255,255,255,.12); border-radius:18px; padding:18px; box-shadow: var(--shadow); }
.modal-title{ font-weight:900; letter-spacing:.04em; margin-bottom:8px; }
.modal-text{ color: var(--muted); line-height:1.4; }
.modal-actions{ display:flex; justify-content:flex-end; gap:10px; margin-top:14px; }
