/**
 * Estilos Sistema Parqueadero JL
 * Diseño mobile-first basado en la interfaz mostrada
 */

:root {
    /* Paleta Profesional Moderna - Azul Oscuro y Naranja Vibrante */
    --primary-color: #0A1929;
    --primary-light: #1E3A52;
    --primary-dark: #000B14;
    --accent-color: #FF6B35;
    --accent-light: #FF8C61;
    --accent-dark: #E55A2B;
    --success-color: #00C853;
    --danger-color: #FF1744;
    --warning-color: #FFC107;
    --info-color: #00B0FF;
    --dark-bg: #0A1929;
    --light-bg: #F5F7FA;
    --card-bg: #FFFFFF;
    --text-dark: #1A2027;
    --text-light: #FFFFFF;
    --text-muted: #6B7280;
    --border-color: #E5E7EB;
    --shadow: 0 4px 20px rgba(10, 25, 41, 0.15);
    --shadow-lg: 0 10px 40px rgba(10, 25, 41, 0.2);
    --gradient-primary: linear-gradient(135deg, #0A1929 0%, #1E3A52 100%);
    --gradient-accent: linear-gradient(135deg, #FF6B35 0%, #FF8C61 100%);
    --gradient-hero: linear-gradient(135deg, #0A1929 0%, #1E3A52 50%, #FF6B35 100%);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--gradient-hero);
    min-height: 100vh;
    color: var(--text-dark);
}

.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 20px;
}

/* Header con logo */
.header {
    text-align: center;
    padding: 30px 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    margin-bottom: 20px;
}

.logo-container {
    width: 120px;
    height: 120px;
    margin: 0 auto 15px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
}

.header h1 {
    color: white;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
}

/* Card principal */
.card {
    background: white;
    border-radius: 20px;
    padding: 30px 20px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

/* Formulario de búsqueda */
.search-container {
    position: relative;
    margin-bottom: 20px;
}

.search-input {
    width: 100%;
    padding: 18px 20px;
    font-size: 18px;
    border: 2px solid var(--border-color);
    border-radius: 15px;
    outline: none;
    transition: all 0.3s;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 2px;
    text-align: center;
}

.search-input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15);
}

.search-btn {
    width: 100%;
    padding: 18px;
    background: var(--gradient-accent);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.search-btn:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

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

/* Resultado de búsqueda */
.result-container {
    margin-top: 30px;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    animation: slideIn 0.4s ease-out;
}

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

.result-container.autorizada {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
}

.result-container.no-registrada {
    background: linear-gradient(135deg, #E31E24 0%, #b71820 100%);
    color: white;
}

.result-icon {
    font-size: 80px;
    margin-bottom: 15px;
    animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.result-placa {
    font-size: 32px;
    font-weight: 900;
    letter-spacing: 4px;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.result-status {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.result-message {
    font-size: 16px;
    opacity: 0.95;
    line-height: 1.5;
}

/* Botones de acción */
.btn {
    display: inline-block;
    padding: 14px 28px;
    background: var(--gradient-accent);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    text-align: center;
    box-shadow: 0 4px 10px rgba(255, 107, 53, 0.25);
}

.btn:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 107, 53, 0.35);
}

.btn-secondary {
    background: #6c757d;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-success {
    background: var(--success-color);
}

.btn-success:hover {
    background: #45a049;
}

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

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

.form-control {
    width: 100%;
    padding: 14px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s;
    outline: none;
}

.form-control:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15);
}

select.form-control {
    cursor: pointer;
}

/* Tabla responsive */
.table-responsive {
    overflow-x: auto;
    margin: 20px 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
}

thead {
    background: var(--primary-color);
    color: white;
}

th, td {
    padding: 14px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

tbody tr:hover {
    background: #f8f9fa;
}

/* Alertas */
.alert {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    animation: slideIn 0.3s ease-out;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

/* Navegación inferior */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid var(--border-color);
    padding: 12px 0;
    display: flex;
    justify-content: space-around;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

.nav-item {
    text-align: center;
    flex: 1;
    color: #6c757d;
    text-decoration: none;
    transition: all 0.3s;
    padding: 8px;
}

.nav-item.active {
    color: var(--primary-color);
}

.nav-item:hover {
    color: var(--primary-color);
}

.nav-icon {
    font-size: 24px;
    display: block;
    margin-bottom: 4px;
}

.nav-label {
    font-size: 12px;
    font-weight: 600;
}

/* Panel Admin */
.admin-panel {
    background: white;
    min-height: 100vh;
}

.sidebar {
    background: var(--dark-bg);
    color: white;
    min-height: 100vh;
    padding: 20px 0;
}

.sidebar-link {
    display: block;
    padding: 15px 25px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-link:hover,
.sidebar-link.active {
    background: var(--primary-color);
    color: white;
}

/* Loader */
.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

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

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .result-placa {
        font-size: 28px;
    }
    
    .result-status {
        font-size: 20px;
    }
}

/* Modo oscuro para WebView */
@media (prefers-color-scheme: dark) {
    body:not(.light-mode) {
        background: #121212;
    }
}
