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

:root {
    --primary-orange: #FF6B00;
    --primary-black: #000000;
    --primary-white: #FFFFFF;
    --orange-light: #FF8533;
    --orange-dark: #CC5500;
    --gray-light: #F5F5F5;
    --gray-medium: #CCCCCC;
    --error-color: #ef4444;
    --success-color: #10b981;
    --text-primary: #000000;
    --text-secondary: #666666;
    --border-color: #DDDDDD;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

body {
    font-family: 'Poppins', 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #000000;
    background-image: url('../img/80032.jpg');
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    line-height: 1.6;
    position: relative;
    overflow: hidden;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.807);
    pointer-events: none;
    z-index: 0;
}

body::after {
    display: none;
}

.container {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.login-card, .dashboard-card {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.4s ease-out;
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '››';
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 48px;
    font-weight: 900;
    color: #FF6B00;
    opacity: 0.15;
    line-height: 1;
}

.login-card::after {
    content: '››';
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 48px;
    font-weight: 900;
    color: #FF6B00;
    opacity: 0.15;
    line-height: 1;
    transform: rotate(180deg);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.logo img {
    max-width: 180px;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(255, 107, 0, 0.3));
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo svg {
    filter: drop-shadow(0 4px 6px rgba(255, 107, 0, 0.4));
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

h1 {
    font-size: 28px;
    font-weight: 800;
    font-family: 'Montserrat', 'Poppins', sans-serif;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.subtitle {
    color: var(--text-secondary);
    text-align: center;
    font-size: 15px;
    margin-bottom: 32px;
    position: relative;
}

.subtitle::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--primary-orange);
    margin: 16px auto 0;
    border-radius: 2px;
}

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

label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

input[type="email"],
input[type="password"],
input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.2s ease;
    background: white;
    color: var(--text-primary);
}

input[type="email"]:focus,
input[type="password"]:focus,
input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.1);
}

input[type="email"]::placeholder,
input[type="password"]::placeholder,
input[type="text"]::placeholder {
    color: #9ca3af;
}

/* MFA Code Input Styling */
.mfa-code-input {
    text-align: center;
    font-size: 28px;
    letter-spacing: 8px;
    font-weight: 700;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    user-select: none;
}

.checkbox-container input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
    width: 16px;
    height: 16px;
}

.forgot-link {
    font-size: 14px;
    color: var(--primary-orange);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.forgot-link:hover {
    color: var(--orange-dark);
    text-decoration: underline;
}

.btn-login {
    width: 100%;
    padding: 14px 24px;
    background: var(--primary-orange);
    color: var(--primary-black);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-login::before {
    content: '››';
    position: absolute;
    left: -30px;
    font-size: 24px;
    font-weight: 900;
    transition: left 0.3s ease;
}

.btn-login:hover::before {
    left: 20px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-login.loading {
    pointer-events: none;
}

.btn-text {
    transition: opacity 0.2s ease;
}

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

.btn-loader {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.btn-login.loading .btn-loader {
    opacity: 1;
    animation: spin 0.6s linear infinite;
}

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

.error-message {
    margin-top: 16px;
    padding: 12px 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: var(--error-color);
    border-radius: 8px;
    font-size: 14px;
    display: none;
    animation: shake 0.4s ease;
}

.error-message.show {
    display: block;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
    20%, 40%, 60%, 80% { transform: translateX(4px); }
}

.signup-link {
    margin-top: 24px;
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
}

.signup-link a {
    color: var(--primary-orange);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.signup-link a:hover {
    color: var(--orange-dark);
    text-decoration: underline;
}

.dashboard-card {
    text-align: center;
}

.dashboard-card h1 {
    margin-bottom: 20px;
}

.dashboard-card p {
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.dashboard-card .btn-login {
    margin-top: 24px;
}

/* MFA Setup Styles */
.mfa-setup {
    width: 100%;
}

.mfa-info {
    background: var(--gray-light);
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 24px;
    border-left: 4px solid var(--primary-orange);
}

.mfa-info p {
    margin: 0;
    color: var(--text-primary);
}

.mfa-steps {
    margin-bottom: 20px;
}

.step {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    align-items: flex-start;
}

.step-number {
    min-width: 32px;
    height: 32px;
    background: var(--primary-orange);
    color: var(--primary-black);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-content p {
    margin: 0 0 8px 0;
    color: var(--text-primary);
}

.qr-code {
    background: white;
    padding: 16px;
    border-radius: 8px;
    display: inline-block;
    margin: 12px 0;
    box-shadow: var(--shadow-md);
}

.qr-code img {
    display: block;
    width: 200px;
    height: 200px;
}

.skip-link {
    text-align: center;
    margin-top: 20px;
}

.skip-link a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.skip-link a:hover {
    color: var(--primary-orange);
    text-decoration: underline;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    body {
        padding: 15px;
        align-items: flex-start;
        padding-top: 20px;
        overflow-y: auto;
    }
    
    .container {
        max-width: 100%;
        margin: 0 auto;
    }
    
    .login-card, .dashboard-card {
        margin: 0 auto 20px;
    }
    
    /* MFA specific mobile fixes */
    .mfa-setup,
    .mfa-steps {
        max-height: none;
    }
    
    .step {
        margin-bottom: 20px;
    }
    
    .qr-code {
        margin: 15px 0;
    }
    
    .qr-code img {
        max-width: 200px;
        height: auto;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
        padding-top: 15px;
    }
    
    .login-card, .dashboard-card {
        padding: 24px 20px;
        border-radius: 12px;
    }
    
    h1 {
        font-size: 22px;
    }
    
    .subtitle {
        font-size: 13px;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .logo img {
        width: 140px !important;
        height: auto;
    }
    
    .step-number {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
    
    .step-content p {
        font-size: 13px;
    }
    
    .mfa-info p {
        font-size: 13px;
    }
    
    .qr-code img {
        max-width: 180px;
    }
    
    .btn-login {
        padding: 14px 20px;
        font-size: 15px;
    }
    
    /* Fix MFA code input on mobile */
    .mfa-code-input,
    input[type="text"][maxlength="6"],
    input#code {
        width: 100% !important;
        max-width: 100% !important;
        font-size: 18px !important;
        letter-spacing: 3px !important;
        padding: 12px 8px !important;
        margin: 0 !important;
        display: block !important;
    }
    
    .mfa-code-input::placeholder,
    input[type="text"][maxlength="6"]::placeholder,
    input#code::placeholder {
        font-size: 16px;
        letter-spacing: 2px;
    }
}

