:root { --primary: #0f172a; --accent: #3b82f6; --bg: #f8fafc; --success: #10b981; --warning: #f59e0b; --danger: #ef4444; --sidebar-width: 280px; }
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Plus Jakarta Sans', sans-serif; }
body {
    display: flex;
    min-height: 100vh;
    color: #1e293b;
    background-image: url('background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* Login Styles */
#login-container { width: 100%; height: 100vh; display: flex; align-items: center; justify-content: center; flex-direction: column; position: fixed; top: 0; left: 0; z-index: 9999; }
.login-box { width: 100%; max-width: 420px; padding: 40px 30px; background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-radius: 24px; text-align: center; box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.15); border: 1px solid rgba(255, 255, 255, 0.4); }
.login-box h2 { font-size: 2rem; font-weight: 800; margin-bottom: 10px; color: var(--primary); }
.login-box p { color: #64748b; margin-bottom: 30px; }
.login-input { width: 100%; padding: 1.1rem 1.5rem; border-radius: 15px; border: 1px solid #e2e8f0; margin-bottom: 1rem; outline: none; font-size: 1rem; background: rgba(248, 250, 252, 0.8); }
#login-btn { width: 100%; padding: 1.1rem; border-radius: 15px; border: none; cursor: pointer; font-weight: 700; font-size: 1rem; background: var(--accent); color: white; transition: 0.3s; }
#login-error { color: var(--danger); margin-top: 15px; font-weight: 600; display: none; }

#app-container { display: none; width: 100%; }
.sidebar { width: var(--sidebar-width); background: var(--primary); color: white; padding: 2.5rem 1.5rem; position: fixed; height: 100vh; z-index: 1000; border-right: 1px solid rgba(255,255,255,0.1); display: flex; flex-direction: column; justify-content: space-between; }
.logo-wrapper { display: flex; align-items: center; gap: 15px; margin-bottom: 3.5rem; }
.logo-box { background: white; width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; padding: 6px; box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
.logo-box img { max-width: 100%; max-height: 100%; object-fit: contain; }
.logo-text { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.5px; color: white; }
.nav-item { padding: 1.1rem 1.3rem; border-radius: 14px; cursor: pointer; display: flex; align-items: center; gap: 15px; margin-bottom: 0.8rem; color: #94a3b8; transition: 0.3s; font-weight: 500; }
.nav-item:hover, .nav-item.active { background: rgba(59, 130, 246, 0.1); color: white; }
.nav-item.active { color: var(--accent); background: #1e293b; border-left: 4px solid var(--accent); }

.main { margin-left: var(--sidebar-width); flex: 1; padding: 2.5rem 3.5rem; width: calc(100% - var(--sidebar-width)); }
.header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2.5rem; }
.section { display: none; }
.section.active { display: block; }

/* OVERVIEW STYLES */
.status-banner {
    display: flex;
    gap: 1.2rem;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px rgba(0,0,0,0.05);
}
.stat-item { flex: 1; border-right: 1px solid #e2e8f0; padding: 0 1rem; }
.stat-item:last-child { border-right: none; }
.stat-label { font-size: 0.7rem; font-weight: 800; color: #64748b; text-transform: uppercase; margin-bottom: 8px; display: block; }
.stat-value-group { display: flex; align-items: baseline; gap: 8px; }
.stat-value { font-size: 1.8rem; font-weight: 800; color: #1e293b; }
.stat-sub { font-size: 0.7rem; font-weight: 700; color: #94a3b8; text-transform: uppercase; }
.stat-progress { height: 6px; background: #f1f5f9; border-radius: 10px; margin-top: 10px; overflow: hidden; }
.stat-bar { height: 100%; border-radius: 10px; transition: 1s ease; }

.dashboard-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.col-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 1.5rem;
    height: 480px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
}
.fleet-summary-card {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.big-stat { display: flex; align-items: center; gap: 15px; margin-bottom: 2rem; }
.big-stat i { font-size: 1.5rem; color: var(--accent); background: rgba(59, 130, 246, 0.1); width: 50px; height: 50px; border-radius: 15px; display: flex; align-items: center; justify-content: center; }
.big-stat-val { font-size: 2.2rem; font-weight: 800; display: block; line-height: 1; }
.big-stat-lab { font-size: 0.75rem; font-weight: 700; color: #94a3b8; text-transform: uppercase; }

/* COMMON STYLES */
.card, .detail-header-card { background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.3); box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1); padding: 2.5rem; border-radius: 24px; margin-bottom: 2rem; }
.btn { padding: 0.9rem 1.8rem; border-radius: 12px; border: none; cursor: pointer; font-weight: 700; display: inline-flex; align-items: center; gap: 10px; transition: 0.3s; font-size: 0.9rem; box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.btn-primary { background: var(--accent); color: white; }
.btn-excel { background: var(--success); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-outline { background: rgba(255,255,255,0.8); border: 1px solid #e2e8f0; color: #1e293b; }
.btn-edit { background: var(--accent); color: white; padding: 8px 16px; font-size: 13px; border-radius: 10px; border:none; cursor:pointer; }
.filter-box { width: 100%; padding: 1.1rem 1.5rem; border-radius: 15px; border: 1px solid #e2e8f0; margin-bottom: 1.5rem; outline: none; font-size: 1rem; background: rgba(255,255,255,0.9); }
.filter-chip { padding: 8px 18px; border-radius: 50px; border: 1px solid #e2e8f0; background: rgba(255,255,255,0.8); color: #64748b; font-size: 0.8rem; font-weight: 700; cursor: pointer; transition: 0.2s; margin-right: 8px; }
.filter-chip.active { background: var(--accent); color: white; border-color: var(--accent); }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: 1.2rem 1rem; background: rgba(248, 250, 252, 0.9); color: #475569; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; border-bottom: 2px solid #f1f5f9; }
td { padding: 1.5rem 1rem; border-bottom: 1px solid rgba(241, 245, 249, 0.9); font-size: 0.95rem; font-weight: 500; }
.status-pill { padding: 5px 12px; border-radius: 20px; font-size: 10px; font-weight: 800; text-transform: uppercase; display: inline-block; }
.status-active { background: #dcfce7 !important; color: #15803d !important; }
.status-vacation { background: #fee2e2 !important; color: #b91c1c !important; }
.status-novehicle { background: #e0f2fe !important; color: #0369a1 !important; }
.status-nodriver { background: #f1f5f9 !important; color: #475569 !important; }
.status-workshop { background: #fef3c7 !important; color: #92400e !important; }

/* X-RAY GRID SYSTEM */
.xray-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 10px; }
.xray-table-card { background: rgba(255, 255, 255, 0.96); border-radius: 24px; padding: 1.5rem; border: 1px solid rgba(226, 232, 240, 0.8); box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.08); display: flex; flex-direction: column; }
.xray-table-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.2rem; border-bottom: 2px solid var(--accent); padding-bottom: 8px; }
.xray-table-title { font-weight: 800; font-size: 1.1rem; color: var(--primary); display: flex; align-items: center; gap: 10px; }
.xray-table-scroll { flex: 1; overflow: auto; }
.xray-mini-table { width: 100%; border-collapse: collapse; }
.xray-mini-table th { background: #f8fafc; padding: 12px 10px; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.5px; border-bottom: 1px solid #e2e8f0; position: sticky; top: 0; z-index: 10; color: #475569; }
.xray-mini-table td { padding: 12px 10px; border-bottom: 1px solid #f1f5f9; font-weight: 600; color: #0f172a; font-size: 0.9rem; vertical-align: middle; }
.inline-edit { border: 1px solid transparent; background: transparent; padding: 4px; border-radius: 6px; width: 100%; font-size: 0.9rem; font-weight: 600; color: #0f172a; transition: color 0.3s; }
.inline-edit:focus { border-color: var(--accent); background: white; outline: none; box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2); }
.inline-edit.date-field[value="dd/mm"], .inline-edit[value=""] { color: #94a3b8; font-weight: 500; }
.btn-icon { width: 32px; height: 32px; border-radius: 8px; border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: 0.2s; font-size: 0.8rem; }
.btn-icon:hover { transform: scale(1.1); }

.chassis-grid-view { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 15px; padding: 10px; }
.chassis-box { background: rgba(248, 250, 252, 0.9); padding: 15px; border-radius: 12px; border: 1px solid #e2e8f0; display: flex; justify-content: space-between; align-items: center; transition: 0.2s; cursor: pointer; font-weight: 600; }
.chassis-box.loaded { border-left: 5px solid var(--success); background: #f0fdf4; }
.chassis-box i { font-size: 1.1rem; color: #94a3b8; }
.chassis-box.loaded i { color: var(--success); }

.modal { display:none; position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.4); z-index:2000; align-items:center; justify-content:center; backdrop-filter: blur(8px); }
#xrayDetailsModal { z-index: 2001; }
.modal-content { background:rgba(255,255,255,0.95); padding:2rem; border-radius:30px; width:95%; max-width:800px; max-height: 92vh; overflow-y: auto; position: relative; border: 1px solid rgba(255,255,255,0.4); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 15px; }
.form-group { display: flex; flex-direction: column; background: rgba(248, 250, 252, 0.9); padding: 10px; border-radius: 12px; border: 1px solid #f1f5f9; }
.form-group label { font-size: 0.65rem; font-weight: 800; color: #94a3b8; text-transform: uppercase; margin-bottom: 4px; }
.form-group input, .form-group select, .form-group textarea { border: none; background: transparent; font-size: 0.95rem; font-weight: 600; outline: none; width: 100%; color: #1e293b; }

.notif-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.2rem; border-bottom: 1px solid #f1f5f9; padding-bottom: 12px; }
.notif-header h2 { font-size: 1rem; font-weight: 800; color: var(--primary); }
.notif-list { flex: 1; overflow-y: auto; padding-right: 5px; }
.notif-item { display: flex; align-items: center; gap: 12px; padding: 0.8rem; border-radius: 16px; background: rgba(248, 250, 252, 0.9); margin-bottom: 8px; border: 1px solid #f1f5f9; transition: 0.2s; position: relative; }
.notif-item-main { flex: 1; display:flex; align-items:center; gap: 12px; cursor: pointer; }
.notif-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 0.9rem; flex-shrink: 0; }
.notif-content { flex: 1; overflow: hidden; }
.notif-title { font-weight: 700; font-size: 0.8rem; color: #1e293b; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-desc { font-size: 0.7rem; color: #64748b; line-height: 1.2; }
.notif-time { font-size: 0.6rem; color: #94a3b8; font-weight: 600; margin-top: 2px; }
.clear-notif-btn { background: none; border: none; color: #94a3b8; cursor: pointer; font-size: 0.8rem; padding: 5px; border-radius:8px; }

@media (max-width: 1400px) { .dashboard-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 1200px) { .xray-grid { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .dashboard-row { grid-template-columns: 1fr; } }
