/* ===== CSS Variables ===== */
:root {
    --bg-primary: #1b1b1b;
    --bg-card: #2d2d2d;
    --bg-input: #3b3b3b;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent-blue: #0078d4;
    --accent-blue-hover: #106ebe;
    --accent-light: #4ca6ff;
    --error-red: #f44336;
    --border-color: #4a4a4a;
    --shadow-color: rgba(0, 0, 0, 0.4);
}

/* ===== Reset & Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ===== Background ===== */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: url('fluent_web_dark_2_bf5f23287bc9f60c9be2.svg') no-repeat center center;
    background-size: cover;
    background-color: #1b1b1b;
}

.gradient-layer,
.wave-layer {
    display: none;
}

/* ===== Login Wrapper ===== */
.login-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* ===== Login Card ===== */
.login-card {
    background: var(--bg-card);
    border-radius: 6px;
    padding: 44px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 8px 40px var(--shadow-color);
    animation: cardSlideIn 0.5s ease-out;
}

@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Logo Section ===== */
.logo-section {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 28px;
}

.logo {
    width: 324px;
    height: 72px;
    object-fit: contain;
}

.company-name {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* ===== Sign In Title ===== */
.signin-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.signin-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* ===== User Info Section (Password Page) ===== */
.user-info-section {
    margin-bottom: 20px;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    padding: 6px 10px;
    margin-left: -10px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

/* ===== Form Styles ===== */
.login-form {
    display: flex;
    flex-direction: column;
}

.input-group {
    position: relative;
    margin-bottom: 8px;
}

.input-group input {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    outline: none;
    transition: all 0.3s ease;
}

.input-group input::placeholder {
    color: var(--text-secondary);
}

.input-group input:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 1px var(--accent-blue);
}

.input-group input.error {
    border-color: var(--error-red);
}

.input-underline {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-blue);
    transition: width 0.3s ease;
}

.input-group input:focus~.input-underline {
    width: 100%;
}

/* ===== Password Toggle ===== */
.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.toggle-password:hover {
    color: var(--text-primary);
}

/* ===== Error Message ===== */
.error-message {
    color: var(--error-red);
    font-size: 12px;
    min-height: 18px;
    margin-bottom: 4px;
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.3s ease;
}

.error-message.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Forgot Link ===== */
.forgot-link {
    color: var(--accent-light);
    font-size: 13px;
    text-decoration: none;
    margin-bottom: 24px;
    display: inline-block;
    transition: color 0.2s ease;
}

.forgot-link:hover {
    color: #70bcff;
    text-decoration: underline;
}

/* ===== Next Button ===== */
.btn-next {
    width: 100%;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    background: var(--accent-blue);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-next:hover {
    background: var(--accent-blue-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 120, 212, 0.4);
}

.btn-next:active {
    transform: translateY(0);
}

.btn-next.loading .btn-text {
    opacity: 0;
}

.btn-next.loading .btn-loader {
    opacity: 1;
}

.btn-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    opacity: 0;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* ===== Register Section ===== */
.register-section {
    margin-top: 28px;
    font-size: 13px;
    color: var(--text-secondary);
}

.create-account-link {
    color: var(--accent-light);
    text-decoration: none;
    margin-left: 4px;
    transition: color 0.2s ease;
}

.create-account-link:hover {
    color: #70bcff;
    text-decoration: underline;
}

/* ===== Sign-in Options ===== */
.signin-options {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.option-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-light);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s ease;
}

.option-link:hover {
    color: #70bcff;
    text-decoration: underline;
}

/* ===== Footer ===== */
.footer {
    padding: 16px 24px;
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 12px;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--text-primary);
}

.footer-note {
    font-size: 11px;
    color: var(--text-secondary);
}

.footer-note a {
    color: var(--accent-light);
    text-decoration: none;
}

.footer-note a:hover {
    text-decoration: underline;
}

/* ===== Responsive Design ===== */
@media (max-width: 480px) {
    .login-card {
        padding: 32px 24px;
    }

    .signin-title {
        font-size: 20px;
    }

    .footer-links {
        gap: 16px;
    }
}

/* ===== Success Animation ===== */
@keyframes successPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 120, 212, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(0, 120, 212, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 120, 212, 0);
    }
}

.btn-next.success {
    animation: successPulse 0.5s ease-out;
    background: #70bcff;
}

/* ============================================================
   RedSpillX Reskin — appended. Overrides only colors and
   a handful of component styles. Layout untouched.
   ============================================================ */
:root {
    --bg-primary: #0b0f19;
    --bg-card: #111827;
    --bg-input: #1f2937;
    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    --accent-blue: #dc2626;
    --accent-blue-hover: #b91c1c;
    --accent-light: #f87171;
    --error-red: #ef4444;
    --border-color: #1f2937;
    --shadow-color: rgba(0, 0, 0, 0.55);
}

body {
    background: radial-gradient(ellipse at top, #1a0f0f 0%, #050810 60%) fixed;
}

.login-card,
.table-container,
.settings-section,
.stat-card,
.modal {
    border-color: #1f2937;
    box-shadow: 0 10px 40px rgba(0,0,0,.5), 0 0 0 1px rgba(220,38,38,.05);
}

.btn-next,
.btn-primary,
.btn-add {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    color: #fff;
}
.btn-next:hover,
.btn-primary:hover,
.btn-add:hover {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
    box-shadow: 0 4px 14px rgba(220,38,38,.4);
}

.sidebar {
    background: rgba(11, 15, 25, 0.98);
    border-right: 1px solid #1f2937;
}
.sidebar-link.active {
    background: rgba(220, 38, 38, 0.12);
    color: #f87171;
    border-color: rgba(220, 38, 38, 0.3);
}
.sidebar-link .nav-badge {
    background: rgba(220, 38, 38, 0.2);
    color: #f87171;
}

.header-title,
.table-title,
.section-title,
.modal-title {
    color: #f9fafb;
    letter-spacing: -0.3px;
}

.users-table th {
    background: rgba(220, 38, 38, 0.05);
    color: #9ca3af;
}

.status-active {
    background: rgba(220, 38, 38, 0.15);
    color: #f87171;
}