/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2c3e50;
    --primary-light: #34495e;
    --secondary: #3498db;
    --success: #27ae60;
    --danger: #e74c3c;
    --warning: #f39c12;
    --info: #1abc9c;
    --light: #ecf0f1;
    --dark: #2c3e50;
    --gray: #95a5a6;
    --card-bg: #ffffff;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --radius: 12px;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
    color: #333;
    min-height: 100vh;
}

/* Top Navigation */
.top-nav {
    background: var(--primary);
    color: white;
    padding: 15px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-brand i {
    font-size: 28px;
    color: var(--secondary);
}

.nav-brand h1 {
    font-size: 24px;
    font-weight: 600;
}

.nav-time {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
}

.nav-time i {
    color: var(--secondary);
}

.nav-status {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px;
}

/* Main Header */
.main-header {
    background: white;
    border-radius: var(--radius);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.welcome h2 {
    font-size: 28px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 10px;
}

.welcome p {
    color: var(--gray);
    font-size: 16px;
}

.header-stats {
    display: flex;
    gap: 30px;
}

.mini-stat {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--light);
    padding: 20px;
    border-radius: var(--radius);
    min-width: 150px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.mini-stat:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.mini-stat i {
    font-size: 32px;
    color: var(--secondary);
}

.mini-stat h4 {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 5px;
}

.mini-stat small {
    color: var(--gray);
    font-size: 14px;
}

/* Alert Box */
.alert-box {
    padding: 15px 25px;
    border-radius: var(--radius);
    margin-bottom: 25px;
    font-size: 14px;
    display: none;
    animation: slideDown 0.3s ease;
    position: relative;
    overflow: hidden;
}

.alert-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    border-left: 4px solid var(--success);
    display: block;
}

.alert-error {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
    border-left: 4px solid var(--danger);
    display: block;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1, #bee5eb);
    color: #0c5460;
    border-left: 4px solid var(--info);
    display: block;
}

/* Status Badges */
.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-parked {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    color: #2e7d32;
    border: 1px solid #81c784;
}

.status-active {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    color: #1565c0;
    border: 1px solid #64b5f6;
}

/* Action Badges */
.action-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-park {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    color: #2e7d32;
    border: 1px solid #81c784;
}

.badge-unpark {
    background: linear-gradient(135deg, #ffebee, #ffcdd2);
    color: #c62828;
    border: 1px solid #ef9a9a;
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.action-card {
    background: white;
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #e0e6ed;
}

.action-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.action-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.action-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.action-form input,
.action-form select {
    padding: 12px 18px;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    transition: border 0.3s, box-shadow 0.3s;
    background: white;
}

.action-form input:focus,
.action-form select:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.action-form input::placeholder {
    color: #a0aec0;
}

button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

button:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(20, 20);
        opacity: 0;
    }
}

.btn-primary {
    background: linear-gradient(135deg, var(--secondary), #2980b9);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9, var(--secondary));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #219653);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #219653, var(--success));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #c0392b);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c0392b, var(--danger));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

.btn-refresh {
    background: var(--light);
    color: var(--dark);
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
    width: 40px;
    height: 40px;
}

.btn-refresh:hover {
    background: #dde1e7;
    transform: rotate(180deg);
    transition: transform 0.5s ease;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 25px;
    margin-bottom: 30px;
}

.dashboard-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid #e0e6ed;
}

.dashboard-card.large {
    grid-column: span 2;
}

.card-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e0e6ed;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

.card-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.legend {
    display: flex;
    gap: 20px;
    font-size: 13px;
}

.legend i {
    margin-right: 5px;
}

.legend-free { color: var(--success); }
.legend-occupied { color: var(--danger); }
.legend-reserved { color: var(--warning); }

.price-tag {
    background: var(--success);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.card-body {
    padding: 25px;
}

/* Parking Lot */
.parking-lot {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
}

.slot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 15px;
}

.slot {
    aspect-ratio: 1;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 3px solid;
    position: relative;
    overflow: hidden;
}

.slot:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.slot::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: currentColor;
    opacity: 0.3;
}

.slot.free {
    background: linear-gradient(145deg, #f1f8e9, #e8f5e9);
    color: var(--success);
    border: 3px dashed var(--success);
}

.slot.occupied {
    background: linear-gradient(145deg, #ffebee, #ffcdd2);
    color: var(--danger);
    border: 3px solid var(--danger);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.9; }
}

.slot.reserved {
    background: linear-gradient(145deg, #fff3e0, #ffe0b2);
    color: var(--warning);
    border: 3px solid var(--warning);
}

.slot-number {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 5px;
}

.slot-status {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

.slot-plate {
    font-size: 10px;
    margin-top: 5px;
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}

/* Tables */
.table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e0e6ed;
}

.vehicle-table, .transaction-table {
    width: 100%;
    border-collapse: collapse;
}

.vehicle-table th, .transaction-table th {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: var(--primary);
    border-bottom: 2px solid #e0e6ed;
    font-size: 14px;
}

.vehicle-table td, .transaction-table td {
    padding: 15px;
    border-bottom: 1px solid #e0e6ed;
    color: #555;
    font-size: 14px;
}

.vehicle-table tbody tr {
    transition: all 0.3s;
    border-left: 4px solid transparent;
}

.vehicle-table tbody tr:hover,
.transaction-table tbody tr:hover {
    background: linear-gradient(to right, #f5f7fa, #e3e8f0);
    transform: translateX(5px);
    border-left-color: #3498db;
}

.empty {
    text-align: center;
    color: var(--gray);
    font-style: italic;
    padding: 30px !important;
}

/* Statistics List */
.stats-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #e0e6ed;
}

.stat-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.stat-details h4 {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 5px;
}

.stat-details p {
    color: var(--gray);
    font-size: 14px;
}

/* System Status */
.system-status {
    background: white;
    border-radius: var(--radius);
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    border: 1px solid #e0e6ed;
}

.system-status h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e0e6ed;
    transition: all 0.3s;
}

.status-item:hover {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    transform: translateY(-2px);
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    position: relative;
}

.status-dot.online {
    background: var(--success);
    box-shadow: 0 0 10px rgba(39, 174, 96, 0.5);
    animation: pulse 2s infinite;
}

.status-dot.online::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(39, 174, 96, 0.2);
}

.status-dot.offline {
    background: var(--danger);
    box-shadow: 0 0 10px rgba(231, 76, 60, 0.5);
}

.status-value {
    margin-left: auto;
    font-weight: 500;
    color: var(--success);
}

/* Footer */
.main-footer {
    background: var(--primary);
    color: white;
    padding: 40px 0 20px;
    margin-top: 50px;
    border-top: 5px solid var(--secondary);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-info h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-info p {
    opacity: 0.8;
    line-height: 1.6;
}

.footer-contact h4,
.footer-rates h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-contact p,
.footer-rates p {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0.8;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    opacity: 0.7;
    font-size: 14px;
}

.footer-bottom strong {
    color: var(--secondary);
}

/* Modern Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-card.large {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    .top-nav {
        padding: 15px 20px;
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .main-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .header-stats {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }
    
    .mini-stat {
        width: 100%;
        justify-content: center;
    }
    
    .quick-actions {
        grid-template-columns: 1fr;
    }
    
    .slot-grid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    }
    
    .card-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .legend {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .action-card h3 {
        justify-content: center;
    }
    
    .slot {
        aspect-ratio: 1.2;
    }
    
    .slot-number {
        font-size: 18px;
    }
    
    .slot-status {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .status-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-info h4,
    .footer-contact h4,
    .footer-rates h4 {
        justify-content: center;
    }
    
    .footer-contact p,
    .footer-rates p {
        justify-content: center;
    }
    
    .slot-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Print Styles */
@media print {
    .top-nav,
    .quick-actions,
    .btn-refresh,
    .action-form button,
    .footer-bottom {
        display: none !important;
    }
    
    .container {
        padding: 10px;
    }
    
    body {
        background: white;
    }
    
    .dashboard-card {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
}