:root {
    --bg-gradient: radial-gradient(circle at top left, #4f46e5 0, #0f172a 40%, #020617 100%);
    --card-bg: rgba(15, 23, 42, 0.9);
    --accent: #4f46e5;
    --accent-soft: rgba(79, 70, 229, 0.12);
    --text-main: #e5e7eb;
    --text-muted: #9ca3af;
    --border-subtle: rgba(148, 163, 184, 0.5);
    --error: #f97373;
    --radius-lg: 18px;
    --shadow-soft: 0 24px 60px rgba(15, 23, 42, 0.8);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;

    /* Solid red background */
    background: #D5362F;
    color: var(--text-main);
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.login-shell {
    width: 100%;
    max-width: 480px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: conic-gradient(from 180deg, #22c55e, #22d3ee, #4f46e5, #22c55e);
    padding: 2px;
}

.brand-mark-inner {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: #020617;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    color: #e5e7eb;
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand-title {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #cbd5f5;
}

.brand-subtitle {
    font-size: 12px;
    color: var(--text-muted);
}

.login-card {
    position: relative;
    background: #FFFFFF; /* White container */
    color: #1F2937; /* Dark text */
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    padding: 24px 24px 20px;
    border: 1px solid rgba(148, 163, 184, 0.5);
    backdrop-filter: blur(22px);
    overflow: hidden;
}

.login-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 0 0, rgba(96, 165, 250, 0.18), transparent 55%),
        radial-gradient(circle at 100% 100%, rgba(139, 92, 246, 0.16), transparent 55%);
    opacity: 0.7;
    pointer-events: none;
}

.login-card i {
    color: #1F2937; /* Dark icons */
}

.login-inner {
    position: relative;
    z-index: 1;
}

.login-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
}

.login-title-block h1 {
    font-size: 22px;
    margin: 0 0 4px;
    letter-spacing: -0.02em;
    color: #1F2937;
}

.login-title-block p {
    margin: 0;
    font-size: 13px;
    color: #6B7280;
}

.badge {
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 999px;
    color: #15ac38ff;
    border: 1px solid rgba(129, 140, 248, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.22);
}

.helper-text {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.membership-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.membership-label-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
}

.membership-label {
    font-size: 13px;
    font-weight: 500;
    color: #1F2937;
}

.membership-prefix-pill {
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid var(--border-subtle);
    color: #cbd5f5;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.membership-prefix-pill-code {
    font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
}

.membership-boxes-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.prefix {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.16em;
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(211 51 44);
}

.membership-boxes {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
    flex: 1;
}

.membership-boxes input {
    width: 100%;
    aspect-ratio: 1 / 1;
    text-align: center;
    font-size: 20px;
    font-weight: 500;
    border-radius: 14px;
    border: 1px solid rgb(211 51 44);
    background: #F3F4F6;
    color: #1F2937;
    outline: none;
    transition:
        border-color 120ms ease-out,
        box-shadow 120ms ease-out,
        background-color 120ms ease-out,
        transform 90ms ease-out;
    caret-color: var(--accent);
}

.membership-boxes input:hover {
    border-color: rgba(129, 140, 248, 0.9);
}

.membership-boxes input:focus-visible {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(79, 70, 229, 0.5), 0 0 0 8px rgba(129, 140, 248, 0.25);
    transform: translateY(-1px);
}

.membership-boxes input::-webkit-outer-spin-button,
.membership-boxes input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.login-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}

.login-btn {
    width: 100%;
    border: 0;
    border-radius: 999px;
    padding: 11px 16px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #FFFFFF;
    background: #DC2626;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow:
        0 8px 24px rgba(220, 38, 38, 0.55),
        0 0 0 1px rgba(15, 23, 42, 0.8);
    transition:
        transform 120ms ease-out,
        box-shadow 120ms ease-out,
        filter 80ms ease-out;
}

.login-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
    box-shadow:
        0 16px 40px rgba(220, 38, 38, 0.7),
        0 0 0 1px rgba(15, 23, 42, 0.9);
}

.login-btn:active {
    transform: translateY(0);
    filter: brightness(0.97);
    box-shadow:
        0 6px 16px rgba(220, 38, 38, 0.8),
        0 0 0 1px rgba(15, 23, 42, 0.9);
}

.login-btn span.icon {
    font-size: 13px;
}

.sub-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    color: var(--text-muted);
}

.sub-actions a {
    color: #c4b5fd;
    text-decoration: none;
}

.sub-actions a:hover {
    text-decoration: underline;
}

.footnote {
    margin-top: 10px;
    font-size: 11px;
    color: #6b7280;
    text-align: center;
}

.footnote strong {
    color: #000000ff;
    font-weight: 500;
}

.register-logo {
    display: block;
    margin: 0 auto 20px;
    max-width: 100px;
}

@media (max-width: 480px) {
    .login-card {
        padding: 18px 16px 16px;
    }

    .membership-boxes input {
        border-radius: 10px;
        font-size: 18px;
    }

    .prefix {
        display: none;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--card-bg);
    margin: 15% auto;
    padding: 20px;
    border: 1px solid var(--border-subtle);
    width: 80%;
    max-width: 400px;
    border-radius: var(--radius-lg);
    text-align: center;
    color: var(--text-main);
    box-shadow: var(--shadow-soft);
}

.modal-content h2 {
    margin: 0 0 10px;
}

.modal-content h2.error-title {
    color: var(--error);
}

.modal-content p {
    margin: 0 0 20px;
    color: var(--text-muted);
}

.modal-close {
    background: var(--accent);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 500;
}

.modal-close:hover {
    background: #3b3fd6;
}