:root {
  --bg: #050a17; --card: #0d1730; --card2: #111e3d; --line: #1e2c52; --text: #e8eefb; --muted: #8ea2c7;
  --blue: #2f86f6; --blue2: #1f6fd8; --gold: #e9b949; --ok: #29b36b; --err: #e2554b; --warn: #e9a23b;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 15px/1.5 "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: var(--text);
  background: radial-gradient(1200px 600px at 80% -10%, rgba(47,134,246,.25), transparent 60%),
              radial-gradient(900px 500px at -10% 110%, rgba(233,185,73,.10), transparent 60%), var(--bg);
  min-height: 100vh;
}
a { color: #7fb6ff; }
code { background: rgba(255,255,255,.07); padding: 1px 6px; border-radius: 5px; font-size: 13px; }
.top { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line);
  background: rgba(5,10,23,.7); backdrop-filter: blur(6px); position: sticky; top: 0; z-index: 5; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 38px; height: 38px; border-radius: 10px; }
.brand b { display: block; font-size: 17px; letter-spacing: .5px; }
.brand span { display: block; font-size: 12px; color: var(--gold); letter-spacing: 3px; text-transform: uppercase; margin-top: -3px; }
.logout { color: var(--muted); text-decoration: none; border: 1px solid var(--line); padding: 6px 12px; border-radius: 20px; font-size: 13px; }
.tabs { display: flex; gap: 6px; padding: 12px 14px 0; overflow-x: auto; max-width: 1100px; margin: 0 auto; }
.tabs a { white-space: nowrap; color: var(--muted); text-decoration: none; padding: 9px 16px; border-radius: 22px; border: 1px solid var(--line); background: rgba(13,23,48,.6); font-weight: 600; font-size: 14px; }
.tabs a.on { color: #fff; background: linear-gradient(180deg, var(--blue), var(--blue2)); border-color: transparent; }
main { max-width: 1100px; margin: 0 auto; padding: 14px; }
footer { text-align: center; color: #4d5f84; font-size: 12px; padding: 20px; }
.card { background: linear-gradient(180deg, var(--card2), var(--card)); border: 1px solid var(--line); border-radius: 16px; padding: 18px; margin: 14px 0; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.card h2 { margin: 0 0 6px; font-size: 19px; }
.card h3 { margin: 18px 0 8px; font-size: 16px; color: var(--gold); }
.muted { color: var(--muted); font-size: 13.5px; }
label { display: block; margin: 12px 0; font-size: 13.5px; color: #b9c7e3; font-weight: 600; }
input, textarea { width: 100%; margin-top: 6px; padding: 11px 12px; font: inherit; color: var(--text); background: #08112a; border: 1px solid #23325c; border-radius: 10px; outline: none; }
input:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47,134,246,.2); }
input[type=file] { padding: 9px; background: #0a1534; }
input[type=checkbox] { width: auto; margin: 0 8px 0 0; }
label.check { display: flex; align-items: center; font-weight: 500; }
.btn { display: inline-block; border: 1px solid #2a3b6b; background: #12204a; color: #fff; padding: 11px 20px; border-radius: 24px; font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: none; letter-spacing: .3px; }
.btn.primary { background: linear-gradient(180deg, var(--blue), var(--blue2)); border-color: transparent; margin-top: 8px; }
.btn.small { padding: 7px 14px; font-size: 13px; }
.btn.wide { width: 100%; margin-top: 10px; }
.ghost { background: none; border: 0; color: #7fb6ff; cursor: pointer; font-weight: 600; padding: 0 10px; }
.flash { padding: 11px 14px; border-radius: 12px; margin: 10px 0; font-weight: 600; font-size: 14px; border: 1px solid; }
.flash.ok { background: rgba(41,179,107,.12); border-color: rgba(41,179,107,.45); color: #7be0a8; }
.flash.err { background: rgba(226,85,75,.12); border-color: rgba(226,85,75,.45); color: #ff9a92; }
.flash.warn { background: rgba(233,162,59,.12); border-color: rgba(233,162,59,.45); color: #ffc77a; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 12px 0; }
.portal { border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: rgba(5,10,23,.45); }
.portal.active { border-color: rgba(47,134,246,.6); box-shadow: inset 0 0 0 1px rgba(47,134,246,.25); }
.portal-head { display: flex; align-items: center; justify-content: space-between; }
.slot { font-weight: 800; color: var(--gold); letter-spacing: 1px; }
.switch { position: relative; display: inline-block; width: 52px; height: 30px; margin: 0; }
.switch input { opacity: 0; width: 0; height: 0; margin: 0; }
.slider { position: absolute; cursor: pointer; inset: 0; background: #26345c; border-radius: 30px; transition: .2s; }
.slider:before { content: ""; position: absolute; height: 22px; width: 22px; left: 4px; top: 4px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + .slider { background: var(--blue); }
.switch input:checked + .slider:before { transform: translateX(22px); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.copy { display: flex; gap: 8px; align-items: center; }
.copy input { margin: 0; }
.bg-preview { height: 170px; border-radius: 12px; background-size: cover; background-position: center; border: 1px solid var(--line); position: relative; }
.bg-preview span { position: absolute; left: 10px; bottom: 10px; background: rgba(0,0,0,.6); padding: 4px 10px; border-radius: 12px; font-size: 12px; }
.login-wrap { max-width: 380px; margin: 30px auto; text-align: center; }
.login-logo { width: 170px; height: 170px; margin: 0 auto 6px; display: block; }
.card.login { text-align: left; }
.card.login h1 { font-size: 20px; margin: 0 0 4px; }
.pw { display: flex; align-items: center; }
.pw input { flex: 1; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } .card { padding: 14px; } }
