/* ========================================
   LOGIN ANIMATIONS + MODERN DESIGN SYSTEM
======================================== */

/* RESET & BASE */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body { 
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; 
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh; 
    padding: 20px;
    color: #2d3748;
    overflow-x: hidden;
}

/* LOGIN ANIMATION PRINCIPALE */
#login-section {
    animation: slideInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center bottom;
}

@keyframes slideInUp {
    0% { 
        opacity: 0; 
        transform: translateY(50px) scale(0.95); 
    }
    100% { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

/* DASHBOARD APPEAR */
#driver-dashboard, #admin-dashboard {
    animation: fadeInScale 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both;
}

@keyframes fadeInScale {
    0% { 
        opacity: 0; 
        transform: scale(0.9) translateY(30px); 
    }
    100% { 
        opacity: 1; 
        transform: scale(1) translateY(0); 
    }
}

/* HEADER ANIMATION */
header {
    animation: slideDown 0.6s ease-out;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(25px);
    padding: 25px 40px; 
    border-radius: 25px; 
    margin-bottom: 40px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    box-shadow: 0 25px 70px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.3);
}

@keyframes slideDown {
    0% { 
        opacity: 0; 
        transform: translateY(-50px); 
    }
    100% { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* CONTROLS APPEAR */
#driver-controls {
    animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.4s both;
}

@keyframes bounceIn {
    0% { 
        opacity: 0; 
        transform: scale(0.3) translateY(30px); 
    }
    50% { 
        transform: scale(1.05); 
    }
    70% { 
        transform: scale(0.9) translateY(-5px); 
    }
    100% { 
        opacity: 1; 
        transform: scale(1) translateY(0); 
    }
}

/* CONTAINER */
.container { max-width: 1400px; margin: 0 auto; }

/* LOGIN CARD SPECIAL */
.full-width { 
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(30px);
    padding: 60px 50px; 
    border-radius: 30px;
    box-shadow: 0 40px 100px rgba(0,0,0,0.25);
    border: 1px solid rgba(255,255,255,0.4);
    text-align: center;
    max-width: 500px;
    margin: 100px auto 0;
}

/* LOGIN INPUTS */
.full-width input {
    animation: inputSlide 0.4s ease-out forwards;
    position: relative;
}

.full-width input:nth-child(2) { animation-delay: 0.1s; }
.full-width input:nth-child(3) { animation-delay: 0.2s; }

@keyframes inputSlide {
    0% { 
        opacity: 0; 
        transform: translateX(-30px); 
    }
    100% { 
        opacity: 1; 
        transform: translateX(0); 
    }
}

/* LOGIN BUTTON PULSE */
.full-width .btn-primary {
    animation: pulseLogin 2s infinite;
    margin-top: 30px;
}

@keyframes pulseLogin {
    0% { 
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7); 
    }
    70% { 
        box-shadow: 0 0 0 20px rgba(102, 126, 234, 0); 
    }
    100% { 
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0); 
    }
}

/* CARDS SYSTEM */
.card { 
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(25px);
    padding: 45px; 
    border-radius: 25px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    margin-bottom: 35px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:nth-child(1) { animation-delay: 0.3s; }
.card:nth-child(2) { animation-delay: 0.4s; }

.card-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(520px, 1fr)); 
    gap: 35px; 
}

/* BUTTONS */
.btn-primary, .btn-success, .btn-warning, .status-btn, .logout-btn {
    padding: 18px 36px; 
    border: none; 
    border-radius: 18px;
    color: white; 
    cursor: pointer; 
    font-weight: 700; 
    font-size: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 12px 35px rgba(0,0,0,0.2);
}

.btn-primary { background: linear-gradient(135deg, #667eea, #764ba2); }
.btn-success { background: linear-gradient(135deg, #48bb78, #38a169); }
.btn-warning { background: linear-gradient(135deg, #ed8936, #dd6b20); }
.logout-btn { background: linear-gradient(135deg, #a0aec0, #718096); }

.status-btn { 
    font-size: 20px; 
    padding: 22px 45px; 
    border-radius: 30px;
    margin: 0 20px;
    min-width: 200px;
}

.status-available { 
    background: linear-gradient(135deg, #c6f6d5, #9ae6b4) !important; 
    color: #22543d; 
}
.status-occupied { 
    background: linear-gradient(135deg, #fed7d7, #fc8181) !important; 
    color: #742a2a; 
}

button:hover { 
    transform: translateY(-5px) scale(1.02); 
    box-shadow: 0 25px 50px rgba(0,0,0,0.3); 
}
button:active { transform: translateY(-2px) scale(1.01); }

/* REVENUE */
.revenue-stats { 
    display: flex; 
    justify-content: space-around; 
    margin-top: 40px; 
    padding: 40px; 
    background: linear-gradient(135deg, #f0fff4, #f0f9ff);
    border-radius: 25px;
    box-shadow: inset 0 4px 20px rgba(0,0,0,0.05);
}
.stat-number { 
    font-size: 4rem; 
    font-weight: 900; 
    background: linear-gradient(135deg, #48bb78, #38a169);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* MAP */
.map-container { 
    height: 480px; 
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e0 100%); 
    border-radius: 25px; 
    margin: 30px 0;
    display: flex; 
    flex-direction: column;
    align-items: center; 
    justify-content: center;
    font-size: 28px; 
    color: #4a5568;
    font-weight: 800;
}

/* HIDDEN CLASS */
.hidden { 
    opacity: 0 !important; 
    transform: scale(0.8) !important; 
    transition: all 0.4s ease !important;
}

/* RESPONSIVE */
@media (max-width: 768px) { 
    body { padding: 15px; } 
    header { flex-direction: column; gap: 25px; padding: 25px 20px; }
    .full-width { margin-top: 50px; padding: 40px 30px; }
    .card-grid { grid-template-columns: 1fr; }
    .revenue-stats { flex-direction: column; gap: 40px; }
    .stat-number { font-size: 3rem; }
}

/* SUCCESS MESSAGE */
.success-msg {
    animation: successPulse 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    background: linear-gradient(135deg, #c6f6d5, #9ae6b4);
    color: #22543d;
    padding: 20px;
    border-radius: 15px;
    margin: 20px 0;
    font-weight: 600;
}

@keyframes successPulse {
    0% { transform: scale(0.95); opacity: 0; }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}
/* ADMIN SPECIFIC */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); }
    20%, 40%, 60%, 80% { transform: translateX(10px); }
}

.table-container { overflow-x: auto; margin-top: 20px; }
.drivers-list { 
    max-height: 300px; 
    overflow-y: auto; 
    padding: 10px;
}
.driver-item { 
    background: linear-gradient(135deg, #f8f9ff, #f0f9ff);
    padding: 20px; 
    margin-bottom: 15px; 
    border-radius: 18px; 
    border-left: 5px solid #667eea;
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}
.driver-item:hover { 
    background: linear-gradient(135deg, #e6f3ff, #f0f9ff);
    transform: translateX(8px); 
    box-shadow: 0 15px 35px rgba(102,126,234,0.2);
}
.driver-status { 
    font-weight: 700; 
    padding: 8px 16px; 
    border-radius: 25px; 
    font-size: 13px;
}
.status-online { 
    background: linear-gradient(135deg, #c6f6d5, #9ae6b4); 
    color: #22543d; 
}
.status-offline { 
    background: linear-gradient(135deg, #fed7d7, #fc8181); 
    color: #742a2a; 
}