
:root {
  --primary: #4e73df;
  --secondary: #858796;
  --success: #1cc88a;
  --info: #36b9cc;
  --warning: #f6c23e;
  --danger: #e74a3b;
  --dark: #1a1c2e;
  --sidebar-width: 260px;
  --topbar-height: 60px;
}
* { box-sizing: border-box; }
body { font-family: 'Segoe UI', system-ui, sans-serif; background: #f4f6fb; color: #444; margin: 0; }

/* TOPBAR */
.topbar { height: var(--topbar-height); background: #fff; border-bottom: 1px solid #e3e6f0; z-index: 1030; }
.topbar .navbar-brand { font-size: 1.1rem; color: var(--primary) !important; }

/* SIDEBAR */
.sidebar { position: fixed; top: var(--topbar-height); left: 0; width: var(--sidebar-width);
  height: calc(100vh - var(--topbar-height)); overflow-y: auto; background: var(--dark);
  transition: width .3s ease; z-index: 1020; }
.sidebar-brand { padding: 1rem 1.25rem; font-weight: 700; font-size: 1rem; color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.1); }
.sidebar-nav { padding: .5rem 0; }
.sidebar-nav .nav-item { width: 100%; }
.sidebar-nav .nav-link { color: rgba(255,255,255,.7); padding: .6rem 1.25rem; display: flex;
  align-items: center; gap: .75rem; transition: all .2s; font-size: .875rem; }
.sidebar-nav .nav-link:hover, .sidebar-nav .nav-link.active { color: #fff; background: rgba(255,255,255,.12); }
.sidebar-nav .nav-link.active { border-left: 3px solid var(--primary); }
.sidebar-nav .nav-icon { width: 20px; text-align: center; font-size: .9rem; }
.nav-section-title { font-size: .65rem; font-weight: 700; letter-spacing: .08em;
  color: rgba(255,255,255,.3); padding: 1rem 1.25rem .25rem; text-transform: uppercase; }

/* CONTENT WRAPPER */
.content-wrapper { margin-left: var(--sidebar-width); margin-top: var(--topbar-height);
  min-height: calc(100vh - var(--topbar-height)); padding: 1.5rem; transition: margin .3s ease; }

/* COLLAPSED */
body.sidebar-collapsed .sidebar { width: 68px; }
body.sidebar-collapsed .sidebar-brand span,
body.sidebar-collapsed .sidebar-nav .nav-link span,
body.sidebar-collapsed .nav-section-title { display: none; }
body.sidebar-collapsed .content-wrapper { margin-left: 68px; }
body.sidebar-collapsed .sidebar-nav .nav-link { justify-content: center; padding: .7rem; }

/* CARDS */
.card { border: none; border-radius: 12px; box-shadow: 0 2px 12px rgba(0,0,0,.06); }
.card-header { background: transparent; border-bottom: 1px solid #eee; font-weight: 600; }
.stat-card { border-radius: 12px; overflow: hidden; }
.stat-card .stat-icon { width: 56px; height: 56px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: #fff; }

/* BADGES */
.badge-status { border-radius: 20px; padding: .35em .8em; font-size: .75rem; font-weight: 600; }
.status-active, .status-completed { background: #d1fae5; color: #065f46; }
.status-inprogress { background: #dbeafe; color: #1e40af; }
.status-onhold { background: #fef3c7; color: #92400e; }
.status-delayed { background: #fee2e2; color: #991b1b; }
.status-notstarted { background: #f3f4f6; color: #374151; }

/* PROGRESS */
.progress { border-radius: 20px; }
.progress-bar { border-radius: 20px; }

/* TABLE */
.table { font-size: .875rem; }
.table thead th { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--secondary); border-top: none; }

/* FORMS */
.form-control, .form-select { border-radius: 8px; border-color: #d1d5db; font-size: .9rem; }
.form-control:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(78,115,223,.15); }
.btn { border-radius: 8px; font-weight: 500; }
.btn-primary { background: var(--primary); border-color: var(--primary); }

/* ATTENDANCE */
.att-status-present { color: var(--success); }
.att-status-absent  { color: var(--danger); }
.att-status-late    { color: var(--warning); }
.att-status-leave   { color: var(--info); }
.att-status-wfh     { color: #8b5cf6; }
.att-status-halfday { color: #f97316; }

/* PRIORITY */
.priority-high   { background:#fee2e2;color:#991b1b; }
.priority-medium { background:#fef3c7;color:#92400e; }
.priority-low    { background:#d1fae5;color:#065f46; }

/* LOGIN PAGE */
.login-page { min-height: 100vh; background: linear-gradient(135deg,#1a1c2e 0%,#2d3748 50%,#4e73df 100%); display: flex; align-items: center; }
.login-card { border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }

/* NOTIFICATIONS */
.notif-item:hover { background: #f8f9ff !important; cursor: pointer; }
.x-small { font-size: .7rem; }

/* MOBILE */
@media(max-width:768px){
  .sidebar { transform: translateX(-100%); }
  .sidebar.show { transform: translateX(0); }
  .content-wrapper { margin-left: 0; }
}

/* AUDIT STATUS */
.score-good   { color: var(--success); font-weight: 700; }
.score-avg    { color: var(--warning); font-weight: 700; }
.score-poor   { color: var(--danger); font-weight: 700; }
.score-circle { width: 80px; height: 80px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; font-weight: 700; }
.score-circle.good   { background: #d1fae5; color: #065f46; border: 3px solid var(--success); }
.score-circle.avg    { background: #fef3c7; color: #92400e; border: 3px solid var(--warning); }
.score-circle.poor   { background: #fee2e2; color: #991b1b; border: 3px solid var(--danger); }

/* CHART containers */
.chart-container { position: relative; }

/* Keyword rank */
.rank-up   { color: var(--success); }
.rank-down { color: var(--danger); }
.rank-same { color: var(--secondary); }
