:root {
  --bg: #050a1a;
  --panel: rgba(8, 14, 30, 0.78);
  --line: rgba(100, 160, 255, 0.14);
  --text: #edf2ff;
  --muted: #7090b8;
  --blue: #4da8ff;
  --blue2: #2563eb;
  --green: #22c55e;
  --amber: #f59e0b;
  --red: #ef4444;
  --max: 960px;
  --radius: 16px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
  line-height: 1.6;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.portal-bg {
  position: fixed; inset: 0; z-index: -1;
  background: radial-gradient(ellipse at 30% 0%, rgba(77,168,255,0.12), transparent 55%),
              linear-gradient(180deg, #050a1a, #030712);
}

.portal-header {
  border-bottom: 1px solid var(--line);
  background: rgba(5, 10, 26, 0.92);
  backdrop-filter: blur(16px);
}
.portal-header-inner {
  max-width: var(--max); margin: 0 auto; padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.portal-brand strong {
  display: block; font-family: Orbitron, Inter, sans-serif;
  font-size: 0.95rem; color: var(--blue);
}
.portal-brand span { font-size: 0.75rem; color: var(--muted); }

.portal-main { max-width: var(--max); margin: 0 auto; padding: 32px 24px 48px; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}
.card h1 {
  font-family: Orbitron, Inter, sans-serif;
  font-size: 1.5rem;
  margin-bottom: 8px;
}
.card .lead { color: var(--muted); margin-bottom: 22px; font-size: 0.92rem; }

.form-grid { display: grid; gap: 14px; }
label.field { display: grid; gap: 6px; font-size: 0.84rem; font-weight: 600; color: var(--muted); }
input, button, select {
  font: inherit;
}
input[type="text"], input[type="password"], input[type="file"] {
  width: 100%;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.28);
  color: var(--text);
}
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 18px; border-radius: 12px; border: none; cursor: pointer;
  font-weight: 700; font-size: 0.9rem;
}
.btn-primary {
  background: linear-gradient(135deg, var(--blue2), #1d4ed8);
  color: #fff;
  box-shadow: 0 4px 16px rgba(37,99,235,0.35);
}
.btn-secondary {
  background: rgba(255,255,255,0.06);
  color: var(--text);
  border: 1px solid var(--line);
}
.btn-danger { background: rgba(239,68,68,0.15); color: #fecaca; border: 1px solid rgba(239,68,68,0.35); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.alert {
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.86rem;
  margin-bottom: 16px;
  border: 1px solid transparent;
}
.alert-error { background: rgba(239,68,68,0.12); border-color: rgba(239,68,68,0.35); color: #fecaca; }
.alert-warn { background: rgba(245,158,11,0.12); border-color: rgba(245,158,11,0.35); color: #fde68a; }
.alert-success { background: rgba(34,197,94,0.12); border-color: rgba(34,197,94,0.35); color: #bbf7d0; }
.alert-info { background: rgba(77,168,255,0.1); border-color: rgba(77,168,255,0.3); color: #bfdbfe; }
.hidden { display: none !important; }

.dashboard-grid { display: grid; gap: 18px; }
.dashboard-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.stat {
  background: rgba(0,0,0,0.22);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}
.stat span { display: block; font-size: 0.75rem; color: var(--muted); margin-bottom: 4px; }
.stat strong { font-family: Orbitron, Inter, sans-serif; color: var(--blue); }

.panel-title { font-size: 1rem; font-weight: 700; margin-bottom: 12px; }
.mailbox-list { list-style: none; display: grid; gap: 8px; }
.mailbox-list li {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 10px 12px; border-radius: 10px;
  background: rgba(0,0,0,0.22); border: 1px solid var(--line);
  font-size: 0.86rem;
}
.mailbox-list .quota { color: var(--muted); }

.upload-zone {
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 18px;
  background: rgba(0,0,0,0.18);
}
.upload-zone p { color: var(--muted); font-size: 0.84rem; margin-bottom: 12px; }

.portal-footer { text-align: center; color: var(--muted); font-size: 0.78rem; margin-top: 24px; }

@media (max-width: 640px) {
  .card { padding: 20px; }
}
