:root {
    --bg: #020617;
    --bg-deep: #00040a;
    --panel: rgba(15, 23, 42, .88);
    --panel-solid: #0f172a;
    --panel-soft: #111827;

    --accent: #22d3ee;
    --accent-strong: #06b6d4;
    --accent-blue: #0ea5e9;

    --text: #f1f5f9;
    --muted: #94a3b8;
    --border: rgba(148,163,184,.20);

    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;

    --radius: 18px;
    --shadow: 0 24px 70px rgba(0,0,0,.42);
}

* {
    box-sizing: border-box;
}

html {
    color-scheme: dark;
}

body {
    margin: 0;
    min-height: 100vh;

    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    color: var(--text);

    background:
        radial-gradient(circle at 20% 0%,
            rgba(14,165,233,.10),
            transparent 32%),
        radial-gradient(circle at 90% 10%,
            rgba(34,211,238,.08),
            transparent 26%),
        linear-gradient(
            160deg,
            #020617 0%,
            #00040a 60%,
            #000 100%
        );
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;

    background-image:
        linear-gradient(rgba(255,255,255,.012) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.012) 1px, transparent 1px);

    background-size: 32px 32px;
    mask-image: linear-gradient(to bottom, black, transparent 75%);
}

.container {
    width: min(calc(100% - 30px), 1120px);
    margin: 0 auto;
    padding: 38px 0 60px;
}

.login-container {
    width: 100%;
    min-height: 100vh;

    display: flex;
    justify-content: center;
    align-items: center;

    padding: 24px;
}

.card {
    background:
        linear-gradient(
            145deg,
            rgba(15,23,42,.94),
            rgba(2,6,23,.94)
        );

    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 28px;

    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.login-card {
    width: min(100%, 440px);
    padding: 34px;
}

.portal-brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.brand-icon {
    width: 46px;
    height: 46px;

    border-radius: 14px;

    display: grid;
    place-items: center;

    background:
        linear-gradient(
            135deg,
            rgba(14,165,233,.20),
            rgba(34,211,238,.08)
        );

    border: 1px solid rgba(34,211,238,.35);

    color: var(--accent);
    font-weight: 800;
    letter-spacing: -.03em;

    box-shadow:
        inset 0 0 25px rgba(34,211,238,.05),
        0 8px 25px rgba(0,0,0,.25);
}

.logo {
    display: block;
    max-width: 260px;
    max-height: 100px;
    margin: 0 auto 25px;
}

h1,
h2,
h3 {
    letter-spacing: -.02em;
}

h1 {
    margin: 0 0 5px;
    font-size: clamp(1.6rem, 4vw, 2rem);
}

h2 {
    margin: 0 0 18px;
    color: var(--accent);
    font-size: 1.15rem;
}

p {
    line-height: 1.55;
}

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

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    margin-bottom: 24px;
}

.actions {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
}

label {
    display: block;

    margin: 18px 0 7px;

    color: #cbd5e1;
    font-size: .86rem;
    font-weight: 600;
}

input,
select,
textarea {
    width: 100%;

    padding: 13px 14px;

    border-radius: 12px;
    border: 1px solid rgba(148,163,184,.25);

    background: rgba(2,6,23,.75);
    color: white;

    font-size: .96rem;

    transition:
        border-color .15s ease,
        box-shadow .15s ease,
        background .15s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;

    border-color: var(--accent);

    background: #020617;

    box-shadow:
        0 0 0 3px rgba(34,211,238,.10);
}

button,
.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 7px;

    min-height: 40px;

    padding: 10px 17px;

    border: 0;
    border-radius: 999px;

    cursor: pointer;

    text-decoration: none;

    font-size: .88rem;
    font-weight: 700;

    color: #001018;

    background:
        linear-gradient(
            135deg,
            var(--accent-blue),
            var(--accent)
        );

    box-shadow:
        0 8px 24px rgba(14,165,233,.16);

    transition:
        transform .15s ease,
        filter .15s ease,
        box-shadow .15s ease;
}

button:hover,
.btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.07);

    box-shadow:
        0 12px 30px rgba(14,165,233,.21);
}

.login-card button {
    width: 100%;
    margin-top: 22px;
}

.btn-secondary {
    background: rgba(30,41,59,.72);
    color: var(--text);

    border: 1px solid rgba(148,163,184,.22);

    box-shadow: none;
}

.btn-danger {
    background:
        linear-gradient(
            135deg,
            #dc2626,
            #ef4444
        );

    color: white;

    box-shadow:
        0 8px 24px rgba(239,68,68,.15);
}

.btn-small {
    min-height: 34px;
    padding: 7px 13px;
    font-size: .80rem;
}

.grid {
    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(190px, 1fr));

    gap: 13px;
}

.info {
    position: relative;

    overflow: hidden;

    padding: 17px;

    border-radius: 16px;

    background:
        linear-gradient(
            145deg,
            rgba(17,24,39,.92),
            rgba(15,23,42,.72)
        );

    border: 1px solid var(--border);
}

.info::before {
    content: "";
    position: absolute;

    width: 65px;
    height: 65px;

    right: -25px;
    top: -25px;

    border-radius: 50%;

    background: rgba(34,211,238,.08);
    filter: blur(5px);
}

.info strong {
    display: block;

    margin-bottom: 6px;

    color: var(--muted);

    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .67rem;
}

.file {
    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 15px;

    margin-top: 10px;
    padding: 16px;

    border-radius: 15px;

    background: rgba(15,23,42,.62);

    border: 1px solid var(--border);

    transition:
        border-color .15s ease,
        background .15s ease,
        transform .15s ease;
}

.file:hover {
    border-color: rgba(34,211,238,.28);
    background: rgba(15,23,42,.92);
    transform: translateY(-1px);
}

.file-name {
    font-weight: 700;
    word-break: break-word;
}

.file-size {
    color: var(--muted);
    font-size: .81rem;
    margin-top: 4px;
}

.error,
.success,
.warning {
    padding: 14px 16px;

    border-radius: 14px;

    margin: 15px 0;

    line-height: 1.5;
}

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

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

.warning {
    color: #fde68a;
    background: rgba(245,158,11,.10);
    border: 1px solid rgba(245,158,11,.30);
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

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

th,
td {
    text-align: left;

    padding: 14px 11px;

    border-bottom:
        1px solid rgba(148,163,184,.12);

    vertical-align: middle;
}

th {
    color: var(--muted);

    text-transform: uppercase;
    letter-spacing: .07em;

    font-size: .67rem;
}

tbody tr {
    transition: background .15s ease;
}

tbody tr:hover {
    background: rgba(148,163,184,.035);
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    padding: 5px 9px;

    border-radius: 999px;

    font-size: .76rem;
    font-weight: 700;
}

.status::before {
    content: "";

    width: 7px;
    height: 7px;

    border-radius: 50%;
}

.status-active {
    color: #86efac;
    background: rgba(34,197,94,.10);
}

.status-active::before {
    background: var(--success);
}

.status-disabled {
    color: #fca5a5;
    background: rgba(239,68,68,.10);
}

.status-disabled::before {
    background: var(--danger);
}

.danger-zone {
    margin-top: 28px;

    padding: 20px;

    border-radius: 18px;

    background:
        linear-gradient(
            145deg,
            rgba(69,10,10,.20),
            rgba(15,23,42,.35)
        );

    border: 1px solid rgba(239,68,68,.24);
}

.danger-zone h3 {
    margin-top: 0;
    color: #fca5a5;
}

code {
    display: inline-block;

    margin: 5px 0;

    padding: 4px 7px;

    border-radius: 7px;

    background: #020617;

    color: #67e8f9;
}

@media(max-width:700px) {

    .container {
        width: min(calc(100% - 20px), 1120px);
        padding-top: 20px;
    }

    .header,
    .file {
        align-items: stretch;
        flex-direction: column;
    }

    .actions {
        width: 100%;
    }

    .actions .btn {
        flex: 1;
    }

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

    .login-card {
        padding: 25px;
    }
}
