/* assets/css/style.css */
:root {
    --bg-main: #EEEEEE;
    --bg-card: #FFFFFF;
    --bg-hover: #F0Fdf4; /* faint green hover */
    --border-color: #CBD5E1;
    --border-light: #E2E8F0;
    
    --text-main: #1F6F5F; /* Dark Teal */
    --text-muted: #475569;
    --text-accent: #2FA084;
    --text-table: #334155;
    
    --color-orange: #f59e0b;
    --color-orange-bg: rgba(245, 158, 11, 0.12);
    --color-red: #f43f5e;
    --color-red-bg: rgba(244, 63, 94, 0.12);
    --color-green: #6FCF97; /* Light Green */
    --color-green-bg: rgba(111, 207, 151, 0.12);
    --color-purple: #a78bfa;
    --color-purple-bg: rgba(167, 139, 250, 0.12);
    --color-blue: #2FA084; /* Teal for blue */
    --color-blue-bg: rgba(47, 160, 132, 0.12);
    --color-gray: #64748b;
    --color-gray-bg: rgba(100, 116, 139, 0.12);

    --primary: #2FA084;
}

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

body {
    font-family: 'Barlow', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
}

/* Typography */
h1 { font-family: 'Barlow Condensed', sans-serif; font-size: 22px; font-weight: 700; letter-spacing: 0.03em; color: var(--text-main); }
.subtitle { font-family: 'Space Mono', monospace; font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.mono { font-family: 'Space Mono', monospace; }

/* Layout */
.app-container {
    display: flex;
    height: 100vh;
}

.sidebar {
    width: 220px;
    background: linear-gradient(160deg, #EEEEEE, #6FCF97, #2FA084, #1F6F5F);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-header {
    padding: 24px 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-box {
    width: 32px;
    height: 32px;
    background: #FFFFFF;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1F6F5F;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.logo-box i { width: 17px; height: 17px; }

.logo-text .brand { font-family: 'Barlow Condensed', sans-serif; font-size: 15px; font-weight: 800; color: #1F6F5F; letter-spacing: 0.05em; text-transform: uppercase; text-shadow: 0 1px 2px rgba(255,255,255,0.5); }
.logo-text .version { font-family: 'Space Mono', monospace; font-size: 9px; color: #1F6F5F; letter-spacing: 0.1em; font-weight: 700; }

.sidebar-nav { padding: 12px 10px; flex: 1; }

.nav-btn {
    width: 100%; display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: 8px; border: none; cursor: pointer; margin-bottom: 4px;
    background: transparent; color: #1F6F5F;
    transition: all 0.2s; font-family: 'Barlow', sans-serif; font-size: 14px; font-weight: 500;
    text-align: left;
}
.nav-btn i { width: 18px; height: 18px; }
.nav-btn.active { background: #FFFFFF; color: #1F6F5F; box-shadow: 0 2px 4px rgba(0,0,0,0.1); font-weight: 700; }
.nav-btn:hover:not(.active) { background: rgba(255,255,255,0.4); }

.sidebar-footer { padding: 16px 20px; border-top: 1px solid rgba(255,255,255,0.2); }
.sidebar-footer .role { font-size: 11px; color: #E2E8F0; font-family: 'Space Mono', monospace; }
.sidebar-footer .user-name { font-size: 13px; color: #FFFFFF; font-weight: 700; }

.main-content {
    flex: 1; overflow-y: auto; padding: 24px 32px;
}

/* Header Elements */
.header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.header-actions { display: flex; gap: 8px; }

/* Buttons */
.btn {
    padding: 8px 14px; border-radius: 8px; font-size: 12px; cursor: pointer;
    display: flex; align-items: center; gap: 6px; border: 1px solid transparent;
    transition: all 0.2s; font-family: 'Barlow', sans-serif; font-weight: 600;
}
.btn i { width: 13px; height: 13px; }
.btn-primary { background: var(--text-accent); color: #FFF; box-shadow: 0 2px 4px rgba(47,160,132,0.3); }
.btn-primary:hover { background: var(--text-main); }
.btn-secondary { background: var(--bg-card); border-color: var(--border-color); color: var(--text-main); }
.btn-secondary:hover { background: var(--bg-hover); }
.btn-text { background: transparent; border: none; cursor: pointer; display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-accent); font-weight: 600;}
.btn-text:hover { color: var(--text-main); }
.btn-icon { background: var(--border-color); border: none; color: var(--text-muted); border-radius: 8px; padding: 8px; cursor: pointer; display: flex; }
.btn-icon:hover { background: var(--text-main); color: #fff; }

.text-orange { color: var(--text-accent); }

/* Badges / Pills */
.badge { background: var(--color-red); color: #fff; border-radius: 99px; font-size: 10px; font-weight: 700; padding: 1px 6px; }
.badge-outline { background: transparent; color: var(--text-accent); font-family: 'Space Mono', monospace; font-weight: 700; }
.status-pill {
    padding: 3px 10px; border-radius: 99px; font-size: 11px; font-weight: 700;
    letter-spacing: 0.04em; font-family: 'Space Mono', monospace; white-space: nowrap;
}

/* KPI Grid */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.kpi-card {
    background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 12px;
    padding: 18px 20px; position: relative; overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.kpi-card .glow {
    position: absolute; top: 0; right: 0; width: 100px; height: 100px;
    background: radial-gradient(circle at top right, var(--color) 0%, transparent 60%); opacity: 0.15;
}
.kpi-content { display: flex; align-items: flex-start; justify-content: space-between; position: relative; z-index: 2; }
.kpi-label { font-size: 11px; color: var(--text-muted); font-family: 'Space Mono', monospace; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 8px; font-weight: 700;}
.kpi-val { font-size: 28px; font-weight: 800; color: var(--text-main); font-family: 'Barlow Condensed', sans-serif; line-height: 1; }
.kpi-sub { font-size: 11px; color: var(--text-muted); margin-top: 6px; }
.kpi-icon { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.kpi-icon i { width: 18px; height: 18px; }
.pulse-bar {
    position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, transparent, var(--color), transparent);
    animation: pulse-bar 2s ease-in-out infinite;
}
@keyframes pulse-bar { 0%,100%{opacity:0.3} 50%{opacity:1} }

/* Charts Area */
.charts-row { display: flex; gap: 16px; margin-bottom: 20px; }
.flex-1 { flex: 1; } .flex-2 { flex: 2; } .flex-3 { flex: 3; }
.card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 12px; padding: 20px; box-shadow: 0 2px 4px rgba(0,0,0,0.02); }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.card-title { font-size: 14px; font-weight: 700; color: var(--text-main); font-family: 'Barlow Condensed', sans-serif; letter-spacing: 0.05em; text-transform: uppercase; }

.chart-legend { display: flex; gap: 16px; }
.chart-legend span { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text-muted); font-weight: 500; }
.legend-box { width: 10px; height: 3px; border-radius: 2px; }
.bg-orange { background: var(--color-orange); } .bg-blue { background: var(--color-blue); }

.status-legend { display: flex; flex-wrap: wrap; gap: 8px 12px; margin-top: 14px; }
.status-legend span { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text-muted); font-weight: 500;}
.status-legend span .box { width: 10px; height: 10px; border-radius: 3px; }

/* Lists & Tables */
.list-card .list-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border-light); }
.list-card .list-item:last-child { border-bottom: none; }
.list-title { font-size: 13px; color: var(--text-main); font-weight: 600; }
.list-sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.list-right { text-align: right; }
.list-date { font-size: 10px; color: var(--text-muted); margin-top: 2px; font-weight: 500; }

.table-responsive { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
    padding: 12px 14px; text-align: left; font-size: 11px; color: var(--text-muted);
    font-family: 'Space Mono', monospace; letter-spacing: 0.05em; text-transform: uppercase; font-weight: 700; white-space: nowrap;
    border-bottom: 2px solid var(--border-light); background: var(--bg-hover);
}
td { padding: 14px 14px; border-bottom: 1px solid var(--border-light); transition: background 0.15s; cursor: pointer; }
tr:hover td { background: var(--bg-hover); }

/* Data table specifics */
.td-id { font-family: 'Space Mono', monospace; font-size: 11px; color: var(--text-accent); font-weight: 700; }
.td-main { font-size: 13px; color: var(--text-main); font-weight: 600; }
.td-sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.td-cat { font-size: 13px; color: var(--text-main); font-weight: 500; }
.td-desc { font-size: 11px; color: var(--text-muted); max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.td-priority { font-size: 11px; font-family: 'Space Mono', monospace; font-weight: 700; }
.td-cost { font-family: 'Space Mono', monospace; font-size: 12px; color: var(--text-main); font-weight: 700; }

/* Filters */
.filters { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.search-box { position: relative; flex: 1; min-width: 200px; }
.search-box i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); width: 14px; height: 14px; }
.search-box input {
    width: 100%; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 8px;
    padding: 10px 12px 10px 36px; color: var(--text-main); font-size: 13px; outline: none; font-family: 'Barlow', sans-serif;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.02);
}
.search-box input:focus { border-color: var(--text-accent); box-shadow: 0 0 0 2px rgba(47,160,132,0.1); }
.filter-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-pill {
    padding: 9px 14px; border-radius: 8px; font-size: 13px; cursor: pointer; font-family: 'Barlow', sans-serif; font-weight: 500;
    transition: all 0.15s; background: var(--bg-card); border: 1px solid var(--border-color); color: var(--text-muted);
}
.filter-pill:hover { border-color: var(--text-accent); color: var(--text-accent); }
.filter-pill.active { background: var(--color-green-bg); border-color: var(--color-green); color: var(--text-main); font-weight: 700; }

/* Vehicle Cards Grid */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.v-card {
    background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 12px;
    padding: 18px; cursor: pointer; transition: all 0.2s; position: relative; overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.v-card:hover { transform: translateY(-2px); box-shadow: 0 6px 12px rgba(0,0,0,0.05); border-color: var(--text-accent) !important; }
.v-card-top-bar { position: absolute; top: 0; left: 0; right: 0; height: 4px; opacity: 0.9; }
.v-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.v-plate { font-family: 'Space Mono', monospace; font-size: 14px; color: var(--text-main); font-weight: 700; }
.v-model { font-size: 13px; color: var(--text-muted); font-weight: 600; margin-top: 2px; }
.v-info { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.v-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.v-stat { }
.v-stat-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; font-family: 'Space Mono', monospace; font-weight: 700; }
.v-stat-val { font-size: 12px; color: var(--text-main); font-weight: 600; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v-footer { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border-light); display: flex; align-items: center; gap: 6px; }
.v-footer i { width: 13px; height: 13px; color: var(--text-accent); }
.v-code { font-size: 11px; color: var(--text-muted); font-family: 'Space Mono', monospace; font-weight: 700; }

/* Modal */
.modal {
    position: fixed; inset: 0; background: rgba(31,111,95,0.4); backdrop-filter: blur(4px); z-index: 1000;
    display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal.active { display: flex; }
.modal-content {
    background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 16px;
    width: 100%; max-width: 720px; max-height: 90vh; overflow: auto;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}
.modal-header { padding: 24px 28px; border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; background: var(--bg-hover); }
.modal-pretitle { font-family: 'Space Mono', monospace; font-size: 13px; color: var(--text-accent); margin-bottom: 4px; font-weight: 700; }
.modal-title { font-size: 18px; font-weight: 800; color: var(--text-main); font-family: 'Barlow Condensed', sans-serif; text-transform: uppercase; letter-spacing: 0.03em;}
.modal-actions { display: flex; align-items: center; gap: 12px; }
.modal-body { padding: 28px; }
.info-block { background: var(--bg-hover); border: 1px solid var(--border-light); border-radius: 12px; padding: 20px; }
.info-block-title { font-size: 12px; color: var(--text-main); font-family: 'Space Mono', monospace; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 16px; font-weight: 700; }
.info-item { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid rgba(0,0,0,0.04); }
.info-item:last-child { border-bottom: none; }
.info-label { font-size: 12px; color: var(--text-muted); font-weight: 500;}
.info-value { font-size: 13px; color: var(--text-main); font-weight: 600; text-align: right; }

/* Form Styles */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 11px; color: var(--text-muted); font-weight: 700; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.05em; font-family: 'Space Mono', monospace; }
.form-control { width: 100%; background: var(--bg-hover); border: 1px solid var(--border-color); border-radius: 8px; padding: 10px 12px; color: var(--text-main); font-size: 13px; outline: none; font-family: 'Barlow', sans-serif; box-shadow: inset 0 1px 2px rgba(0,0,0,0.02); }
.form-control:focus { border-color: var(--text-accent); box-shadow: 0 0 0 2px rgba(47,160,132,0.1); background: var(--bg-card); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
