@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&display=swap');

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

:root {
  --sidebar:   #0B2015;
  --accent:    #EA580C;
  --green:     #166534;
  --greenBg:   #DCFCE7;
  --blue:      #1D4ED8;
  --blueBg:    #DBEAFE;
  --amber:     #B45309;
  --amberBg:   #FEF3C7;
  --red:       #B91C1C;
  --redBg:     #FEE2E2;
  --purple:    #6D28D9;
  --purpleBg:  #EDE9FE;
  --text:      #111827;
  --sub:       #6B7280;
  --border:    #E5E7EB;
  --bg:        #F3F4F6;
  --card:      #FFFFFF;
}

body { font-family: 'Outfit', system-ui, sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; }

.layout { display: flex; min-height: 100vh; }
.sidebar { width: 228px; background: var(--sidebar); display: flex; flex-direction: column; position: fixed; top: 0; left: 0; height: 100vh; z-index: 100; }
.main { margin-left: 228px; flex: 1; display: flex; flex-direction: column; min-height: 100vh; }
.topbar { height: 56px; background: var(--card); border-bottom: 1px solid var(--border); display: flex; align-items: center; padding: 0 26px; justify-content: space-between; position: sticky; top: 0; z-index: 50; }
.page { padding: 26px 28px; }

.sidebar-brand { padding: 22px 18px 16px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.sidebar-brand small { font-size: 10px; font-weight: 700; color: rgba(255,255,255,0.35); letter-spacing: 2px; display: block; margin-bottom: 5px; }
.sidebar-brand h2 { font-size: 17px; font-weight: 800; color: #fff; }
.sidebar-brand span { font-size: 11px; color: var(--accent); font-weight: 600; }
.sidebar-nav { flex: 1; padding: 10px 8px; overflow-y: auto; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 8px; margin-bottom: 2px; color: rgba(255,255,255,0.52); font-weight: 400; font-size: 13px; border-left: 3px solid transparent; text-decoration: none; transition: all .15s; }
.nav-item:hover { background: rgba(255,255,255,0.07); color: #fff; }
.nav-item.active { background: rgba(255,255,255,0.14); color: #fff; font-weight: 700; border-left-color: var(--accent); }
.sidebar-user { padding: 14px 18px; border-top: 1px solid rgba(255,255,255,0.08); display: flex; align-items: center; gap: 10px; }
.sidebar-user .av { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 13px; flex-shrink: 0; }
.sidebar-user .name { font-size: 13px; font-weight: 700; color: #fff; }
.sidebar-user .em { font-size: 11px; color: rgba(255,255,255,0.4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.stat-grid-3 { grid-template-columns: repeat(3, 1fr) !important; }
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 20px 22px; }
.stat-card .lbl { font-size: 12px; color: var(--sub); font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.stat-card .val { font-size: 24px; font-weight: 800; margin-bottom: 4px; }
.stat-card .sub { font-size: 12px; color: var(--sub); }

.card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; margin-bottom: 20px; }
.card-header { padding: 14px 20px; font-weight: 700; font-size: 14px; border-bottom: 1px solid var(--border); background: #FAFAFA; display: flex; justify-content: space-between; align-items: center; }

table { width: 100%; border-collapse: collapse; }
thead tr { border-bottom: 1px solid var(--border); background: #FAFAFA; }
th { text-align: left; padding: 10px 16px; font-size: 11px; color: var(--sub); font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
td { padding: 12px 16px; font-size: 13px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #FAFAFA; }

.badge { padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; display: inline-block; }
.badge-green  { background: var(--greenBg);  color: var(--green); }
.badge-blue   { background: var(--blueBg);   color: var(--blue); }
.badge-amber  { background: var(--amberBg);  color: var(--amber); }
.badge-red    { background: var(--redBg);    color: var(--red); }
.badge-purple { background: var(--purpleBg); color: var(--purple); }
.badge-gray   { background: #F3F4F6;         color: #374151; }

.btn { padding: 9px 18px; border-radius: 8px; font-weight: 600; font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; border: none; text-decoration: none; font-family: inherit; transition: opacity .15s; }
.btn:hover { opacity: 0.88; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-sm { padding: 5px 12px; font-size: 12px; }

.section-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 24px; }
.section-header h1 { font-size: 21px; font-weight: 800; color: var(--text); }
.section-header p { color: var(--sub); font-size: 13px; margin-top: 4px; }

.progress { height: 7px; background: var(--bg); border-radius: 99px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 99px; }

.alert { padding: 12px 16px; border-radius: 8px; font-size: 13px; margin-bottom: 16px; }
.alert-success { background: var(--greenBg); color: var(--green); border: 1px solid #BBF7D0; }
.alert-error   { background: var(--redBg);   color: var(--red);   border: 1px solid #FECACA; }

.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--sidebar); }
.login-card { background: var(--card); border-radius: 16px; padding: 40px; width: 100%; max-width: 420px; }
.login-logo { text-align: center; margin-bottom: 28px; }

.flex { display: flex; }
.items-center { align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.fw-700 { font-weight: 700; }
.text-sub { color: var(--sub); }
.text-accent { color: var(--accent); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-blue { color: var(--blue); }
.mb-20 { margin-bottom: 20px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
