/* Base Styles */
:root {
    --primary-color: #ff5722;
    --primary-dark: #e64a19;
    --primary-light: #ffccbc;
    --text-primary: #212121;
    --text-secondary: #757575;
    --bg-light: #f5f5f5;
    --bg-card-light: #ffffff;
    --bg-dark: #121212;
    --bg-card-dark: #1e1e1e;
    --text-dark: #f5f5f5;
    --text-light: #212121;
    --border-radius: 12px;
    --box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --text-primary: #f5f5f5;
    --text-secondary: #b0b0b0;
    --bg-light: #121212;
    --bg-card-light: #1e1e1e;
    --box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-primary);
    transition: var(--transition);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* Preloader Styles */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-light);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.preloader-content {
    text-align: center;
}

.digiflex-logo {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 20px;
}

.digi {
    color: var(--primary-color);
}

.flex {
    color: var(--text-primary);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--primary-light);
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Auth Container Styles */
.auth-container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}

.auth-card {
    background-color: var(--bg-card-light);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 40px;
    transition: var(--transition);
}

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

.auth-header h1 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.auth-header h2 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Form Styles */
.auth-form {
    margin-bottom: 25px;
}

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

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

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    background-color: var(--bg-card-light);
    color: var(--text-primary);
}

.form-group input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 87, 34, 0.2);
}

.forgot-password {
    display: block;
    text-align: right;
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.forgot-password:hover {
    text-decoration: underline;
}

.terms {
    margin: 20px 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
}

.terms a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.terms a:hover {
    text-decoration: underline;
}

/* Button Styles */
.auth-btn {
    width: 100%;
    padding: 14px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.auth-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

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

/* Footer Styles */
.auth-footer {
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

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

/* Theme Toggle Styles */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.theme-toggle i {
    color: var(--text-secondary);
    font-size: 1rem;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Responsive Styles */
@media (max-width: 600px) {
    .auth-card {
        padding: 30px 20px;
    }

    .auth-header h1 {
        font-size: 1.5rem;
    }

    .auth-header h2 {
        font-size: 1.3rem;
    }
}

@media (max-width: 400px) {
    .auth-card {
        padding: 25px 15px;
    }

    .form-group input {
        padding: 12px 14px;
    }

    .auth-btn {
        padding: 12px;
    }
}