:root {
    --bg: #020611;
    --bg-soft: #071221;
    --panel: rgba(10, 21, 38, 0.82);
    --panel-strong: rgba(8, 17, 32, 0.94);
    --line: rgba(0, 191, 255, 0.18);
    --line-strong: rgba(73, 199, 255, 0.42);
    --text: #e8f7ff;
    --muted: #9cbfd1;
    --blue: #19b9ff;
    --blue-2: #49c7ff;
    --blue-3: #8be4ff;
    --success: #7ef2d4;
    --warning: #fcd34d;
    --danger: #fca5a5;
    --glow: 0 0 18px rgba(25, 185, 255, 0.35);
    --glow-soft: 0 0 28px rgba(73, 199, 255, 0.14);
    --shadow-deep: 0 18px 40px rgba(0, 0, 0, 0.32);
    --radius: 20px;
    --radius-sm: 14px;
    --max: 1100px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background:
        radial-gradient(circle at top center, rgba(25, 185, 255, 0.12), transparent 34%),
        radial-gradient(circle at 80% 18%, rgba(73, 199, 255, 0.08), transparent 20%),
        linear-gradient(180deg, #01040d 0%, #020611 40%, #030916 100%);
    color: var(--text);
    line-height: 1.55;
    overflow-x: hidden;
    min-height: 100vh;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 42px 42px;
    pointer-events: none;
    opacity: 0.3;
    mask-image: radial-gradient(circle at center, black 45%, transparent 90%);
    z-index: 0;
}

a {
    color: var(--blue-3);
    text-decoration: none;
    transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover,
a:focus-visible {
    color: #b7efff;
    opacity: 0.98;
}

.container {
    max-width: var(--max);
    margin: 0 auto;
    padding: 24px;
    position: relative;
    z-index: 1;
}

.narrow {
    max-width: 760px;
}

.card {
    position: relative;
    background: linear-gradient(180deg, rgba(7, 18, 33, 0.84), rgba(5, 12, 24, 0.96));
    border: 1px solid rgba(73, 199, 255, 0.16);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--glow-soft), var(--shadow-deep);
    overflow: hidden;
}

.card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 25%);
    pointer-events: none;
}

.hero {
    text-align: center;
    padding: 48px 24px;
}

.topbar {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.topbar h1,
.topbar h2,
.topbar p {
    margin-top: 0;
}

.grid {
    display: grid;
    gap: 24px;
}

.two-col {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

label {
    display: block;
    margin: 14px 0 6px;
    font-weight: 700;
    color: var(--blue-3);
}

input,
textarea,
select {
    width: 100%;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid rgba(73, 199, 255, 0.16);
    background: rgba(3, 10, 21, 0.95);
    color: var(--text);
    font: inherit;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

input:hover,
textarea:hover,
select:hover {
    border-color: rgba(73, 199, 255, 0.28);
}

input:focus,
textarea:focus,
select:focus {
    border-color: rgba(139, 228, 255, 0.55);
    box-shadow: 0 0 0 3px rgba(25, 185, 255, 0.12);
}

textarea {
    resize: vertical;
    min-height: 110px;
}

button,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--blue), var(--blue-2));
    color: #03111a;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 12px 18px;
    text-decoration: none;
    cursor: pointer;
    margin-top: 16px;
    font: inherit;
    font-weight: 700;
    letter-spacing: 0.02em;
    min-height: 48px;
    transition: transform 0.2s ease, opacity 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
    box-shadow: var(--glow);
}

button:hover,
.btn:hover,
button:focus-visible,
.btn:focus-visible {
    opacity: 0.98;
    transform: translateY(-2px);
    filter: brightness(1.04);
    box-shadow: 0 0 24px rgba(25, 185, 255, 0.45);
}

button:active,
.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(10, 27, 47, 0.75);
    color: var(--text);
    border-color: rgba(73, 199, 255, 0.24);
    box-shadow: none;
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
    border-color: rgba(139, 228, 255, 0.55);
    color: var(--blue-3);
    box-shadow: var(--glow-soft);
}

.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.small-top {
    margin-top: 10px;
}

.alert {
    padding: 12px 14px;
    border-radius: 14px;
    margin-bottom: 12px;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.alert.success {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #bbf7d0;
}

.alert.error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fecaca;
}

.list {
    display: grid;
    gap: 12px;
}

.list-item {
    border: 1px solid rgba(73, 199, 255, 0.14);
    border-radius: 14px;
    padding: 14px;
    background: rgba(3, 10, 21, 0.92);
}

.list-item strong {
    display: block;
    margin-bottom: 6px;
    color: #ffffff;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(73, 199, 255, 0.12);
    color: var(--text);
    border: 1px solid rgba(73, 199, 255, 0.18);
    font-size: 0.88rem;
    font-weight: 700;
    text-transform: capitalize;
    letter-spacing: 0.02em;
}

.badge.success {
    background: rgba(34, 197, 94, 0.18);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.35);
}

.badge.warning {
    background: rgba(245, 158, 11, 0.18);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.35);
}

.badge.error {
    background: rgba(239, 68, 68, 0.18);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.35);
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: transparent;
}

th,
td {
    padding: 12px;
    border-bottom: 1px solid rgba(73, 199, 255, 0.12);
    text-align: left;
    vertical-align: top;
}

th {
    color: #e5f7ff;
    font-weight: 700;
}

p {
    margin: 0 0 12px;
}

h1,
h2,
h3 {
    color: #ffffff;
    margin-top: 0;
    position: relative;
    z-index: 1;
}

hr {
    border: 0;
    border-top: 1px solid rgba(73, 199, 255, 0.12);
    margin: 20px 0;
}

small {
    color: var(--muted);
}

@media (max-width: 640px) {
    .container {
        padding: 16px;
    }

    .card {
        padding: 18px;
        border-radius: 18px;
    }

    button,
    .btn {
        width: 100%;
        text-align: center;
    }

    .actions {
        flex-direction: column;
    }

    .topbar {
        align-items: flex-start;
    }
}

.portal-header {
  background: linear-gradient(90deg, #0b1f2e, #0e2a3f);
  border-bottom: 1px solid rgba(73, 199, 255, 0.15);
  margin-bottom: 25px;
}

.portal-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
}

.portal-brand {
  color: #49c7ff;
  font-size: 1.2rem;
}

.portal-links {
  display: flex;
  gap: 20px;
}

.portal-links a {
  color: #cfefff;
  text-decoration: none;
  font-size: 0.95rem;
  transition: 0.2s;
}

.portal-links a:hover {
  color: #49c7ff;
}

.logout-link {
  color: #ff6b6b;
}