@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

:root {
    --bg0: #070712;
    --bg1: #0b0b1b;
    --card: #0f1024cc;
    --stroke: #2b2d55;
    --text: #e9e9ff;
    --muted: #b7b7d6;
    --neon1: #7c4dff;
    --neon2: #00e5ff;
    --neon3: #ff2bd6;
    --good: #43ff8a;
    --gx-ink: #16202a;
    --gx-navy: #0f2d46;
    --gx-steel: #45677f;
    --gx-sand: #f3efe6;
    --gx-orange: #dd6a2d;
    --gx-border: rgba(15, 45, 70, 0.12);
    --gx-shadow: 0 22px 50px rgba(15, 45, 70, 0.12);
}

html, body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(221, 106, 45, 0.18), transparent 28%),
        linear-gradient(180deg, #fbf8f2 0%, #f3efe6 100%);
    color: var(--gx-ink);
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: var(--gx-navy);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem rgba(15, 45, 70, 0.18);
}

.content {
    padding-top: 1.5rem;
}

.eyebrow,
.topbar-label,
.hero-label,
.stat-label {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.72rem;
    color: var(--gx-steel);
}

.page-copy {
    max-width: 60ch;
    color: #395569;
}

.page-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: start;
    margin-bottom: 1.5rem;
}

.hero-card,
.stat-card,
.card-panel,
.login-card {
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid var(--gx-border);
    border-radius: 24px;
    box-shadow: var(--gx-shadow);
}

.hero-card,
.stat-card,
.card-panel {
    padding: 1.25rem;
}

.stats-grid,
.panel-grid {
    display: grid;
    gap: 1rem;
    margin-bottom: 1rem;
}

.stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.panel-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.stat-value {
    display: block;
    font-size: 2rem;
    color: var(--gx-navy);
}

.card-panel {
    margin-bottom: 1rem;
}

.admin-table td,
.admin-table th {
    vertical-align: middle;
}

.action-cell {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

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

.logout-link,
.login-button,
.btn-dark {
    background: var(--gx-navy);
    border-color: var(--gx-navy);
    color: white;
}

.btn-outline-secondary {
    color: var(--gx-navy);
    border-color: rgba(15, 45, 70, 0.3);
}

.login-wrapper {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px 16px;
    background:
        radial-gradient(1200px 600px at 20% 10%, rgba(124, 77, 255, .22), transparent 60%),
        radial-gradient(900px 600px at 80% 20%, rgba(0, 229, 255, .18), transparent 55%),
        radial-gradient(900px 700px at 60% 90%, rgba(255, 43, 214, .14), transparent 60%),
        linear-gradient(180deg, var(--bg1), var(--bg0));
    color: var(--text);
    position: relative;
    overflow: hidden;
}

.narrow-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
}

.login-container {
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(15, 16, 36, .92), rgba(10, 10, 22, .88));
    border: 1px solid rgba(43, 45, 85, .85);
    box-shadow: 0 18px 60px rgba(0, 0, 0, .55);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 0;
    overflow: hidden;
    min-height: 500px;
    width: min(100%, 800px);
}

.login-container::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 26px;
    background: conic-gradient(from 180deg, rgba(124, 77, 255, 0.7), rgba(0, 229, 255, 0.65), rgba(255, 43, 214, 0.65), rgba(124, 77, 255, 0.7));
    filter: blur(18px);
    opacity: 0.35;
    z-index: 0;
    pointer-events: none;
}

.narrow-col {
    flex: 1;
    width: 50%;
    min-width: 360px;
    position: relative;
    z-index: 1;
}

.login-left-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 32px;
}

.admin-login-logo {
    width: min(240px, 100%);
    max-height: 240px;
    object-fit: contain;
    position: relative;
    z-index: 2;
}

.logo-glow {
    position: absolute;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(124, 77, 255, .30), rgba(0, 229, 255, .16) 42%, rgba(255, 43, 214, .10) 62%, transparent 72%);
    filter: blur(6px);
    animation: logo-glow-pulse 6s ease-in-out infinite;
    z-index: 1;
}

.login-right-screen {
    display: flex;
    justify-content: center;
    flex-direction: column;
    padding: 40px;
    position: relative;
}

.login-right-screen h1 {
    margin: 0;
    position: absolute;
    top: 40px;
    left: 40px;
    color: rgba(233, 233, 255, .98);
}

.system-ready {
    position: absolute;
    top: 94px;
    left: 40px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(183, 183, 214, .95);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--good);
    box-shadow: 0 0 10px rgba(67, 255, 138, .7);
    animation: status-pulse 2.4s ease-in-out infinite;
}

.login-copy-block {
    margin-top: 78px;
    margin-bottom: 24px;
}

.login-copy,
.login-subcopy {
    color: rgba(233, 233, 255, .82);
    max-width: 32ch;
}

.login-subcopy {
    color: rgba(183, 183, 214, .9);
    margin-bottom: 0;
}

.login-error-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    margin: 78px 0 14px 0;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 90, 122, .5);
    background: rgba(255, 90, 122, .12);
    color: rgba(255, 191, 204, .98);
    font-size: 14px;
    letter-spacing: .03em;
}

.login-form {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    align-self: flex-start;
}

.submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(0, 229, 255, .45);
    background: rgba(0, 229, 255, .12);
    color: rgba(233, 233, 255, .95);
    border-radius: 14px;
    padding: 12px 18px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease, opacity .12s ease;
    white-space: nowrap;
    text-decoration: none;
}

.submit-btn:hover,
.submit-btn:focus-visible {
    color: rgba(233, 233, 255, .95);
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(0, 229, 255, .18);
}

.google-mark {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: white;
    color: #1f1f1f;
    font-weight: 900;
    letter-spacing: normal;
    text-transform: none;
}

.login-footer-copywrite {
    position: absolute;
    left: 24px;
    bottom: 14px;
    font-size: 12px;
    letter-spacing: 0.04em;
    color: rgba(183, 183, 214, 0.85);
    z-index: 2;
}

.login-busy-overlay {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(8, 8, 18, .72);
    backdrop-filter: blur(1px);
    z-index: 20;
}

.login-busy-content {
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 12px;
    border: 1px solid rgba(0, 229, 255, .35);
    background: rgba(12, 14, 32, .95);
    color: rgba(233, 233, 255, .98);
    padding: 12px 16px;
    font-size: 13px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.login-container.is-submitting .login-busy-overlay {
    display: flex;
}

.login-container.is-submitting .login-form {
    pointer-events: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: #fff4d7;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

@media (max-width: 768px) {
    .page-header,
    .topbar {
        flex-direction: column;
    }

    .topbar {
        gap: 1rem;
        align-items: start;
    }

    .narrow-container {
        flex-direction: column;
    }

    .narrow-col {
        width: 100%;
        min-width: 0;
    }

    .login-left-screen {
        min-height: 220px;
    }

    .login-right-screen {
        padding: 32px 24px 64px;
    }

    .login-right-screen h1,
    .system-ready {
        position: static;
    }

    .login-error-banner,
    .login-copy-block {
        margin-top: 0;
    }
}

@keyframes logo-glow-pulse {
    0% { transform: scale(1); opacity: .6; }
    50% { transform: scale(1.08); opacity: .95; }
    100% { transform: scale(1); opacity: .6; }
}

@keyframes status-pulse {
    0% { transform: scale(1); opacity: .85; }
    50% { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(1); opacity: .85; }
}
