*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #0a0a0a; --bg2: #111111; --bg3: #1a1a1a; --bg4: #222222;
  --border: #2a2a2a; --border2: #333333;
  --accent: #e53935; --accent2: #ff1744; --accent-glow: rgba(229,57,53,0.15);
  --text: #f5f5f5; --text2: #c0c0c0; --text3: #707070;
  --success: #10b981; --warning: #f59e0b; --danger: #e53935;
  --sidebar-w: 240px; --radius: 10px; --shadow: 0 4px 24px rgba(0,0,0,0.5);
}
html { font-size: 14px; }
body { font-family: 'Plus Jakarta Sans', sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; }
.app-layout { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-w); background: #0d0d0d; border-right: 1px solid var(--border); display: flex; flex-direction: column; position: fixed; top: 0; left: 0; height: 100vh; z-index: 100; overflow-y: auto; transition: transform 0.3s; }
.main-content { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; min-height: 100vh; }
.sidebar-logo { display: flex; align-items: center; gap: 10px; padding: 20px 18px; border-bottom: 1px solid var(--border); }
.logo-icon { width: 36px; height: 36px; background: var(--accent); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: white; flex-shrink: 0; }
.logo-text { font-size: 15px; font-weight: 700; color: var(--text); }
.sidebar-nav { padding: 12px 10px; flex: 1; }
.nav-section-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.2px; color: var(--text3); padding: 12px 8px 6px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 7px; color: var(--text2); text-decoration: none; font-size: 13.5px; font-weight: 500; transition: all 0.15s; margin-bottom: 1px; }
.nav-item:hover { background: var(--bg3); color: var(--text); }
.nav-item.active { background: var(--accent-glow); color: var(--accent); border: 1px solid rgba(229,57,53,0.3); box-shadow: 0 0 12px rgba(229,57,53,0.15); }
.nav-sub { padding-left: 18px; font-size: 13px; }
.cat-icon { font-size: 15px; width: 18px; text-align: center; }
.sidebar-footer { padding: 12px 14px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 8px; }
.user-mini { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.user-avatar-sm { width: 30px; height: 30px; background: var(--accent); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: white; flex-shrink: 0; }
.user-name-mini { font-size: 12.5px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role-mini { font-size: 11px; color: var(--text3); }
.logout-btn { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; color: var(--text3); border-radius: 6px; transition: all 0.15s; text-decoration: none; }
.logout-btn:hover { background: rgba(229,57,53,0.15); color: var(--danger); }
.topbar { height: 56px; background: #0d0d0d; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 16px; padding: 0 24px; position: sticky; top: 0; z-index: 50; box-shadow: 0 1px 0 var(--border), 0 4px 20px rgba(0,0,0,0.3); }
.menu-toggle { display: none; background: none; border: none; color: var(--text2); cursor: pointer; padding: 4px; }
.topbar-title { font-size: 16px; font-weight: 700; color: var(--text); flex: 1; }
.topbar-date { font-size: 12px; color: var(--text3); }
.page-content { padding: 24px; flex: 1; background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.015) 1px, transparent 0); background-size: 28px 28px; }
.card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); transition: border-color 0.2s; }
.card:hover { border-color: var(--border2); }
.card-header { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.card-title { font-size: 15px; font-weight: 700; color: var(--text); }
.card-body { padding: 20px; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; position: relative; overflow: hidden; transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s; cursor: default; }
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--accent-color,var(--accent)); box-shadow: 0 0 10px var(--accent-color, var(--accent)); }
.stat-card:hover { transform: translateY(-3px); box-shadow: 0 12px 40px rgba(0,0,0,0.4), 0 0 20px var(--accent-color,rgba(229,57,53,0.2)); border-color: var(--accent-color, var(--accent)); }
.stat-icon { width: 40px; height: 40px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 18px; margin-bottom: 12px; background: var(--accent-bg,rgba(229,57,53,0.1)); }
.stat-value { font-size: 28px; font-weight: 800; color: var(--text); font-family: 'JetBrains Mono',monospace; letter-spacing: -1px; }
.stat-label { font-size: 12px; color: var(--text3); font-weight: 500; margin-top: 4px; }
.stat-sub { font-size: 11.5px; color: var(--text3); margin-top: 6px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { padding: 10px 14px; text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text3); background: var(--bg3); border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid var(--border); color: var(--text2); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(229,57,53,0.04) !important; }
.asset-name { font-weight: 600; color: var(--text); }
.asset-tag { font-family: 'JetBrains Mono',monospace; font-size: 12px; color: var(--accent); background: var(--accent-glow); padding: 3px 8px; border-radius: 4px; box-shadow: 0 0 8px rgba(229,57,53,0.15); }
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 50px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.badge-success { background: rgba(16,185,129,0.15); color: #34d399; box-shadow: 0 0 8px rgba(16,185,129,0.2); }
.badge-primary { background: rgba(229,57,53,0.15); color: #ef5350; box-shadow: 0 0 8px rgba(229,57,53,0.2); }
.badge-warning { background: rgba(245,158,11,0.15); color: #fbbf24; box-shadow: 0 0 8px rgba(245,158,11,0.2); }
.badge-danger { background: rgba(229,57,53,0.15); color: #f87171; box-shadow: 0 0 8px rgba(229,57,53,0.2); }
.badge-secondary { background: rgba(100,116,139,0.15); color: #94a3b8; }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 7px; font-size: 13px; font-weight: 600; cursor: pointer; border: none; text-decoration: none; transition: all 0.2s; white-space: nowrap; font-family: inherit; }
.btn-primary { background: var(--accent); color: white; box-shadow: 0 0 0 0 rgba(229,57,53,0.4); }
.btn-primary:hover { background: #c62828; box-shadow: 0 0 16px rgba(229,57,53,0.5); transform: translateY(-1px); }
.btn-secondary { background: var(--bg3); color: var(--text2); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--bg4); color: var(--text); }
.btn-success { background: rgba(16,185,129,0.15); color: #34d399; border: 1px solid rgba(16,185,129,0.3); }
.btn-danger { background: rgba(229,57,53,0.1); color: #f87171; border: 1px solid rgba(229,57,53,0.25); }
.btn-warning { background: rgba(245,158,11,0.1); color: #fbbf24; border: 1px solid rgba(245,158,11,0.25); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 12px; font-weight: 600; color: var(--text2); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.form-control { width: 100%; padding: 9px 12px; background: var(--bg3); border: 1px solid var(--border); border-radius: 7px; color: var(--text); font-size: 13.5px; font-family: inherit; transition: border-color 0.15s, box-shadow 0.15s; }
.form-control:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow), 0 0 12px rgba(229,57,53,0.1); }
.form-control::placeholder { color: var(--text3); }
select.form-control option { background: var(--bg3); }
textarea.form-control { resize: vertical; min-height: 80px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.filters-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.search-wrap { position: relative; }
.search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text3); }
.search-input { padding-left: 34px !important; }
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.75); z-index: 200; align-items: center; justify-content: center; backdrop-filter: blur(4px); }
.modal-overlay.open { display: flex; }
.modal { background: var(--bg2); border: 1px solid var(--border); border-radius: 14px; width: 90%; max-width: 640px; max-height: 90vh; overflow-y: auto; box-shadow: 0 0 60px rgba(0,0,0,0.5), 0 0 0 1px var(--border2); }
.modal-header { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-title { font-size: 16px; font-weight: 700; }
.modal-close { background: none; border: none; color: var(--text3); cursor: pointer; font-size: 22px; line-height: 1; }
.modal-close:hover { color: var(--danger); }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }
.charts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
.category-bars { display: flex; flex-direction: column; gap: 10px; padding: 4px 0; }
.category-bar-item { display: flex; align-items: center; gap: 10px; }
.category-bar-label { font-size: 12.5px; color: var(--text2); width: 65px; flex-shrink: 0; font-weight: 500; }
.category-bar-track { flex: 1; height: 8px; background: var(--bg3); border-radius: 50px; overflow: hidden; }
.category-bar-fill { height: 100%; border-radius: 50px; }
.category-bar-count { font-size: 12px; color: var(--text3); font-family: 'JetBrains Mono',monospace; width: 28px; text-align: right; }
.donut-wrap { display: flex; align-items: center; gap: 20px; }
.donut-legend { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.legend-item { display: flex; align-items: center; gap: 8px; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.legend-text { font-size: 12.5px; color: var(--text2); flex: 1; }
.legend-val { font-size: 13px; font-weight: 700; color: var(--text); font-family: 'JetBrains Mono',monospace; }
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 13.5px; font-weight: 500; }
.alert-success { background: rgba(16,185,129,0.12); border: 1px solid rgba(16,185,129,0.3); color: #34d399; }
.alert-danger { background: rgba(229,57,53,0.12); border: 1px solid rgba(229,57,53,0.3); color: #ef5350; }
.alert-warning { background: rgba(245,158,11,0.12); border: 1px solid rgba(245,158,11,0.3); color: #fbbf24; }
.empty-state { text-align: center; padding: 48px 24px; color: var(--text3); }
.empty-state .empty-icon { font-size: 40px; margin-bottom: 12px; opacity: 0.5; }
.empty-state h3 { font-size: 16px; color: var(--text2); margin-bottom: 6px; }
.asset-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.detail-item { background: var(--bg3); border-radius: 8px; padding: 12px 14px; }
.detail-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text3); margin-bottom: 4px; }
.detail-value { font-size: 13.5px; color: var(--text); font-weight: 500; }
.section-gap { margin-bottom: 24px; }
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.page-header h1 { font-size: 22px; font-weight: 800; }
.page-header p { font-size: 13px; color: var(--text3); margin-top: 2px; }
.user-card { display: flex; align-items: center; gap: 10px; }
.user-avatar { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; color: white; flex-shrink: 0; }
.user-card-name { font-size: 13.5px; font-weight: 600; color: var(--text); }
.user-card-dept { font-size: 12px; color: var(--text3); }
.timeline { padding: 4px 0; }
.timeline-item { display: flex; gap: 14px; padding-bottom: 20px; position: relative; }
.timeline-item::before { content: ''; position: absolute; left: 15px; top: 28px; bottom: 0; width: 1px; background: var(--border); }
.timeline-item:last-child::before { display: none; }
.timeline-icon { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; background: var(--bg3); border: 2px solid var(--border); }
.timeline-body { flex: 1; padding-top: 4px; }
.timeline-action { font-size: 13.5px; font-weight: 600; color: var(--text); }
.timeline-meta { font-size: 12px; color: var(--text3); margin-top: 2px; }
.timeline-note { font-size: 12.5px; color: var(--text2); margin-top: 4px; background: var(--bg3); padding: 6px 10px; border-radius: 6px; }
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg); padding: 24px; }
.login-box { width: 100%; max-width: 380px; }
.login-logo { text-align: center; margin-bottom: 32px; }
.login-logo h1 { font-size: 22px; font-weight: 800; }
.login-logo p { font-size: 13px; color: var(--text3); }
.login-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 16px; padding: 32px; box-shadow: 0 0 40px rgba(229,57,53,0.08), var(--shadow); }
.expired { color: var(--danger); } .expiring-soon { color: var(--warning); } .warranty-ok { color: var(--success); }
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); } .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; } .menu-toggle { display: flex; }
  .charts-grid, .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
