/* =============================================================================
   SIBOX - Estilos principales
   Paleta: Amarillo #D4A520, Verde #28A745, Oscuro #1E1E1E
   ============================================================================= */

:root {
    /* Colores primarios */
    --sibox-yellow: #D4A520;
    --sibox-yellow-light: #F5D55A;
    --sibox-yellow-dark: #B8860B;
    
    --sibox-green: #28A745;
    --sibox-green-light: #48C764;
    --sibox-green-dark: #1E7E34;
    
    /* Fondos */
    --bg-dark: #1E1E1E;
    --bg-darker: #151515;
    --bg-card: #2D2D2D;
    --bg-input: #3A3A3A;
    
    /* Texto */
    --text-primary: #FFFFFF;
    --text-secondary: #B0B0B0;
    --text-muted: #6B6B6B;
    
    /* Estados */
    --color-success: #28A745;
    --color-warning: #FFC107;
    --color-danger: #DC3545;
    --color-info: #17A2B8;
    
    /* Otros */
    --border-color: #404040;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --radius: 12px;
    --radius-sm: 8px;
    
    /* Transiciones */
    --transition: all 0.3s ease;
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-darker);
    line-height: 1.6;
    min-height: 100vh;
}

/* =============================================================================
   AUTH PAGES
   ============================================================================= */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 420px;
}

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

.auth-logo img {
    height: 60px;
    margin-bottom: 12px;
}

.auth-logo h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--sibox-yellow);
    letter-spacing: -0.5px;
}

.auth-logo p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 4px;
}

.auth-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.auth-card h2 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 24px;
    text-align: center;
}

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

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

.form-control {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 15px;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--sibox-yellow);
    box-shadow: 0 0 0 3px rgba(212, 165, 32, 0.15);
}

.form-control::placeholder {
    color: var(--text-muted);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--sibox-yellow);
    color: var(--bg-darker);
}

.btn-primary:hover:not(:disabled) {
    background: var(--sibox-yellow-light);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--border-color);
}

.btn-biometric {
    background: linear-gradient(135deg, var(--sibox-green) 0%, var(--sibox-green-dark) 100%);
    color: white;
    width: 100%;
    padding: 16px;
    font-size: 16px;
}

.btn-biometric:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.btn-biometric i {
    font-size: 20px;
}

.btn-block {
    width: 100%;
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    color: var(--text-muted);
    font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.auth-divider span {
    padding: 0 16px;
}

/* Links */
.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--text-secondary);
}

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

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

/* Alerts */
.alert {
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-error {
    background: rgba(220, 53, 69, 0.15);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #F8D7DA;
}

.alert-success {
    background: rgba(40, 167, 69, 0.15);
    border: 1px solid rgba(40, 167, 69, 0.3);
    color: #D4EDDA;
}

.alert-warning {
    background: rgba(255, 193, 7, 0.15);
    border: 1px solid rgba(255, 193, 7, 0.3);
    color: #FFF3CD;
}

/* Loading spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Biometric icon animation */
.biometric-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, var(--sibox-green) 0%, var(--sibox-green-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: white;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 0 0 15px rgba(40, 167, 69, 0); }
}

/* Password toggle */
.password-wrapper {
    position: relative;
}

.password-wrapper .form-control {
    padding-right: 50px;
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
}

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

/* Responsive */
@media (max-width: 480px) {
    .auth-card {
        padding: 24px 20px;
    }
    
    .auth-logo h1 {
        font-size: 24px;
    }
}

/* =============================================================================
   UTILITIES
   ============================================================================= */

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }

.hidden { display: none !important; }