/**
 * DigiBox Authentication Styles
 * Clean, simple authentication pages
 * Version: 2.1.2
 */

:root {
    --auth-primary: #ff4500;
    --auth-primary-dark: #e03e00;
    --auth-text-dark: #333333;
    --auth-text-muted: #666666;
    --auth-bg: #f5f5f5;
    --auth-card-bg: #ffffff;
    --auth-input-bg: #ffffff;
    --auth-border: #dddddd;
}

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

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    min-height: 100vh;
    background: #f8f9fa;
    overflow: hidden;
}

/* Animated Background */
.auth-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 69, 0, 0.15), rgba(255, 69, 0, 0.05));
    animation: float linear infinite;
}

/* Generate 20 bubbles with different sizes and positions */
.bubble:nth-child(1) { width: 20px; height: 20px; left: 5%; animation-duration: 12s; animation-delay: 0s; }
.bubble:nth-child(2) { width: 35px; height: 35px; left: 15%; animation-duration: 15s; animation-delay: -2s; }
.bubble:nth-child(3) { width: 15px; height: 15px; left: 25%; animation-duration: 10s; animation-delay: -4s; }
.bubble:nth-child(4) { width: 40px; height: 40px; left: 35%; animation-duration: 18s; animation-delay: -1s; }
.bubble:nth-child(5) { width: 25px; height: 25px; left: 45%; animation-duration: 14s; animation-delay: -3s; }
.bubble:nth-child(6) { width: 30px; height: 30px; left: 55%; animation-duration: 16s; animation-delay: -5s; }
.bubble:nth-child(7) { width: 18px; height: 18px; left: 65%; animation-duration: 11s; animation-delay: -2s; }
.bubble:nth-child(8) { width: 45px; height: 45px; left: 75%; animation-duration: 20s; animation-delay: -4s; }
.bubble:nth-child(9) { width: 22px; height: 22px; left: 85%; animation-duration: 13s; animation-delay: -1s; }
.bubble:nth-child(10) { width: 28px; height: 28px; left: 95%; animation-duration: 17s; animation-delay: -3s; }
.bubble:nth-child(11) { width: 32px; height: 32px; left: 10%; animation-duration: 19s; animation-delay: -6s; }
.bubble:nth-child(12) { width: 16px; height: 16px; left: 20%; animation-duration: 9s; animation-delay: -7s; }
.bubble:nth-child(13) { width: 38px; height: 38px; left: 30%; animation-duration: 21s; animation-delay: -8s; }
.bubble:nth-child(14) { width: 24px; height: 24px; left: 40%; animation-duration: 12s; animation-delay: -9s; }
.bubble:nth-child(15) { width: 20px; height: 20px; left: 50%; animation-duration: 14s; animation-delay: -10s; }
.bubble:nth-child(16) { width: 42px; height: 42px; left: 60%; animation-duration: 22s; animation-delay: -5s; }
.bubble:nth-child(17) { width: 26px; height: 26px; left: 70%; animation-duration: 15s; animation-delay: -7s; }
.bubble:nth-child(18) { width: 14px; height: 14px; left: 80%; animation-duration: 10s; animation-delay: -3s; }
.bubble:nth-child(19) { width: 36px; height: 36px; left: 90%; animation-duration: 18s; animation-delay: -6s; }
.bubble:nth-child(20) { width: 19px; height: 19px; left: 3%; animation-duration: 13s; animation-delay: -8s; }

@keyframes float {
    0% {
        bottom: -50px;
        transform: translateX(0) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        bottom: 110%;
        transform: translateX(100px) scale(0.8);
        opacity: 0;
    }
}

/* Main Wrapper */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Card */
.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--auth-card-bg);
    border-radius: 16px;
    padding: 40px 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

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

.auth-logo {
    margin-bottom: 20px;
}

.auth-logo img {
    max-width: 150px;
    height: auto;
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--auth-text-dark);
    margin-bottom: 5px;
}

.auth-subtitle {
    font-size: 0.9rem;
    color: var(--auth-text-muted);
}

/* Form */
.auth-form-group {
    margin-bottom: 20px;
}

.auth-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--auth-text-dark);
    margin-bottom: 8px;
}

.auth-input-wrapper {
    position: relative;
}

.auth-input {
    width: 100%;
    padding: 12px 15px;
    padding-left: 42px;
    font-size: 0.95rem;
    font-family: inherit;
    border: 1px solid var(--auth-border);
    border-radius: 8px;
    background: var(--auth-input-bg);
    color: var(--auth-text-dark);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-input:focus {
    outline: none;
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 3px rgba(255, 69, 0, 0.1);
}

.auth-input::placeholder {
    color: #999;
}

.auth-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    fill: #999;
}

.auth-input:focus ~ .auth-input-icon {
    fill: var(--auth-primary);
}

.auth-input-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.auth-input-toggle svg {
    width: 18px;
    height: 18px;
    fill: #999;
}

.auth-input-toggle:hover svg {
    fill: var(--auth-primary);
}

/* Error & Alert */
.auth-error {
    color: #dc3545;
    font-size: 0.8rem;
    margin-top: 6px;
}

.auth-alert {
    background: #ffe6e6;
    color: #dc3545;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 0.85rem;
    margin-bottom: 20px;
    text-align: center;
}

/* Button */
.auth-btn {
    width: 100%;
    padding: 14px 20px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    color: white;
    background: var(--auth-primary);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s;
}

.auth-btn:hover {
    background: var(--auth-primary-dark);
}

.auth-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.auth-btn.loading {
    opacity: 0.7;
    pointer-events: none;
}

.auth-btn .spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

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

/* Footer */
.auth-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 24px;
    border-top: 1px solid #eee;
}

.auth-footer-brand {
    margin-bottom: 12px;
}

.version-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--auth-primary), var(--auth-primary-dark));
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: 0.5px;
}

.auth-footer-copyright {
    font-size: 0.78rem;
    color: var(--auth-text-dark);
    margin: 0 0 6px 0;
    font-weight: 500;
}

.auth-footer-powered {
    font-size: 0.72rem;
    color: var(--auth-text-muted);
    margin: 0;
}

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

.auth-footer a:hover {
    color: var(--auth-primary-dark);
}

/* Responsive */
@media (max-width: 480px) {
    .auth-wrapper {
        padding: 15px;
    }

    .auth-card {
        padding: 30px 20px;
    }

    .auth-input {
        font-size: 16px; /* Prevents iOS zoom */
    }
}
