/* ============================================================
   MERP Lite — Manufacturing ERP
   Design System CSS — Custom properties + utility classes
   ============================================================ */

:root {
    /* Primary Accent (Indigo) */
    --sl-gold: #635BFF;
    --sl-gold-light: #EDE9FE;
    --sl-gold-dark: #4F46E5;

    /* Dark Surfaces */
    --sl-primary: #1C2536;
    --sl-primary-lt: #2D3A4E;
    --sl-sidebar-bg: #1C2536;
    --sl-sidebar-hov: #2D3A4E;

    /* Semantic Colors */
    --sl-success: #10B981;
    --sl-danger: #EF4444;
    --sl-warning: #F59E0B;
    --sl-info: #635BFF;

    /* Surface & Backgrounds */
    --sl-bg: #F8FAFC;
    --sl-card: #FFFFFF;
    --sl-card-bg: #FFFFFF;
    --sl-border: #E5E7EB;
    --sl-text: #111827;
    --sl-muted: #6B7280;
    --sl-radius: 16px;
    --sl-radius-sm: 10px;
}




* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--sl-bg);
    color: var(--sl-text);
    min-height: 100vh;
    font-size: 14px;
    line-height: 1.5;
}

a {
    color: var(--sl-info);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}





/* ═══════════════ AUTH PAGES (Login/Forgot/Reset) ═══════════════ */
.auth-bg {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top right, #2D3A4E, #1C2536);
    position: relative;
    overflow: hidden;
    padding: 20px;
}

.auth-circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    z-index: 0;
}

.auth-circle.c1 {
    width: 400px;
    height: 400px;
    background: var(--sl-gold);
    top: -100px;
    right: -100px;
}

.auth-circle.c2 {
    width: 300px;
    height: 300px;
    background: var(--sl-primary);
    bottom: -50px;
    left: -50px;
}

.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    padding: 48px;
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 10;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    transition: transform 0.3s ease;
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--sl-gold), var(--sl-gold-dark));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    margin: 0 auto 16px;
    box-shadow: 0 10px 25px -5px rgba(99, 91, 255, 0.4);
}

.auth-title {
    font-size: 24px;
    font-weight: 800;
    color: #111827;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
}

.auth-subtitle {
    font-size: 14px;
    color: #6B7280;
    font-weight: 500;
}

.auth-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #F3F4F6;
    color: #6B7280;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.auth-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #635BFF 0%, #4F46E5 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(99, 91, 255, 0.35);
}

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

.auth-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.auth-footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #F3F4F6;
}

.auth-alert {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    background: #FEF2F2;
    color: #991B1B;
    border: 1px solid #FECACA;
}

.pw-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #9CA3AF;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.pw-toggle:hover {
    color: #4B5563;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #6B7280;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.2s;
    text-decoration: none;
}

.back-link:hover {
    color: var(--sl-gold);
    text-decoration: none;
}

.ams-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-input {
    width: 100%;
    padding: 12px 16px 12px 48px;
    border: 1.5px solid #E5E7EB;
    border-radius: 12px;
    font-size: 14px;
    color: #111827;
    transition: all 0.2s ease;
    background: #F9FAFB;
}

.form-input:focus {
    background: #fff;
    border-color: var(--sl-gold);
    box-shadow: 0 0 0 4px rgba(99, 91, 255, 0.1);
    outline: none;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #9CA3AF;
    pointer-events: none;
    transition: color 0.2s;
}

.form-input:focus+.input-icon {
    color: var(--sl-gold-dark);
}

.error-feedback {
    display: none;
    align-items: center;
    gap: 6px;
    color: var(--sl-danger);
    font-size: 12px;
    font-weight: 500;
    margin-top: 6px;
    animation: slideUp 0.2s ease-out;
}

.error-feedback[style*="display: block"] {
    display: flex !important;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

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

@media (max-width: 480px) {
    .auth-card {
        padding: 32px 24px;
        max-width: 100%;
        border-radius: 0;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .auth-bg {
        padding: 0;
        background: #fff;
    }

    .auth-circle {
        display: none;
    }
}
