:root {
  --brand: #1f3b73;
  --brand-2: #2f6fde;
  --sidebar-w: 250px;
  --bg: #f4f6fb;
}
body { background: var(--bg); font-size: .925rem; }
.app { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar { width: var(--sidebar-w); background: linear-gradient(180deg, #16295a, #1f3b73); color: #fff; flex-shrink: 0; display: flex; flex-direction: column; }
@media (min-width: 992px) { .sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; } }
.sidebar-brand { display: flex; align-items: center; gap: .6rem; padding: 1.1rem 1.2rem; border-bottom: 1px solid rgba(255,255,255,.12); }
/* Logo JPPM & Yayasan — ukuran sedang, responsif */
.sidebar-brand i { font-size: 1.8rem; color: #ffd166; }
.org-logo { width: 32px; height: 32px; object-fit: contain; }
.login-logos { display: flex; align-items: center; gap: .5rem; margin-bottom: 1rem; }
.login-logos img { width: 48px; height: 48px; object-fit: contain; }
.org-banner { background: linear-gradient(90deg, #ffffff 60%, #eef3ff); }
.org-banner .card-body { padding: .5rem .9rem; }
.org-banner .org-name { font-size: .85rem; }
.org-banner .org-sub { font-size: .75rem; }
.sidebar-brand strong { display: block; font-size: 1.1rem; }
.sidebar-brand small { color: rgba(255,255,255,.65); font-size: .75rem; }
.sidebar-nav { padding: .75rem .6rem; flex: 1; }
.sidebar-nav a { display: flex; align-items: center; gap: .7rem; padding: .55rem .8rem; color: rgba(255,255,255,.8); text-decoration: none; border-radius: .5rem; margin-bottom: 2px; }
.sidebar-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar-nav a.active { background: rgba(255,255,255,.16); color: #fff; font-weight: 600; }
.sidebar-nav .nav-section { text-transform: uppercase; font-size: .7rem; letter-spacing: .08em; color: rgba(255,255,255,.5); padding: 1rem .8rem .3rem; }
.sidebar-foot { padding: 1rem 1.2rem; border-top: 1px solid rgba(255,255,255,.12); }
.offcanvas-lg.sidebar { --bs-offcanvas-width: 260px; --bs-offcanvas-bg: #1f3b73; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: .75rem; padding: .75rem 1.5rem; background: #fff; border-bottom: 1px solid #e3e7ef; position: sticky; top: 0; z-index: 100; }
.page-title { font-size: 1.15rem; margin: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.content { padding: 1.5rem; flex: 1; }
.app-footer { padding: .8rem 1.5rem; color: #8a94a6; font-size: .78rem; border-top: 1px solid #e3e7ef; background: #fff; }
@media (max-width: 576px) { .content { padding: 1rem; } .topbar { padding: .6rem 1rem; } }

.avatar-sm { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.avatar-initial { display: inline-flex; align-items: center; justify-content: center; background: var(--brand-2); color: #fff; font-weight: 600; }
.avatar-lg { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; font-size: 2.2rem; }

/* Kartu */
.card { border: 1px solid #e3e7ef; border-radius: .75rem; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.card-header { background: #fff; border-bottom: 1px solid #eef1f6; font-weight: 600; border-radius: .75rem .75rem 0 0 !important; }
.stat { display: flex; align-items: center; gap: 1rem; }
.stat .icon { width: 48px; height: 48px; border-radius: .75rem; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0; }
.stat .value { font-size: 1.5rem; font-weight: 700; line-height: 1.1; }
.stat .label { color: #6b7280; font-size: .8rem; }
.bg-soft-primary { background: #e6eefc; color: #2f6fde; }
.bg-soft-success { background: #e3f6ec; color: #1f9d55; }
.bg-soft-warning { background: #fff4de; color: #c27c0e; }
.bg-soft-danger { background: #fde8e8; color: #d64545; }
.bg-soft-info { background: #e0f4f8; color: #138496; }
.bg-soft-purple { background: #efe8fc; color: #6f42c1; }

/* Login */
.content-guest { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; flex-direction: column;
  background: radial-gradient(circle at 20% 20%, #2f6fde 0, transparent 40%), linear-gradient(135deg, #16295a, #1f3b73); }
.login-card { max-width: 980px; width: 100%; overflow: hidden; }
.login-hero { background: linear-gradient(160deg, #1f3b73, #2f6fde); color: #fff; padding: 2.5rem; }
.login-hero li { margin-bottom: .5rem; }

/* Topik */
.topic-card { transition: transform .15s, box-shadow .15s; height: 100%; }
.topic-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(16,24,40,.08); }
.k-badge { font-size: .72rem; }
.k-Data-Sains { background: #e6eefc; color: #2f6fde; }
.k-Software-Development { background: #e3f6ec; color: #1f9d55; }
.k-Jaringan-Komputer { background: #fff4de; color: #b26b00; }
.k-Keamanan-Siber { background: #fde8e8; color: #c53030; }
.prewrap { white-space: pre-line; }

/* Kalender logbook */
.cal { table-layout: fixed; }
.cal th { text-align: center; font-size: .78rem; color: #6b7280; font-weight: 600; }
.cal td { height: 92px; vertical-align: top; padding: .35rem; font-size: .78rem; }
.cal td.out { background: #fafbfd; color: #b8bfcc; }
.cal td.today { outline: 2px solid var(--brand-2); outline-offset: -2px; }
.cal .day-num { font-weight: 600; }
.cal a.cell-link { display: block; height: 100%; color: inherit; text-decoration: none; }
.cal .pill { display: block; border-radius: .35rem; padding: .1rem .35rem; margin-top: .2rem; font-size: .7rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 768px) { .cal td { height: 64px; } .cal .pill-text { display: none; } }

/* Logbook per jam */
.timeline { position: relative; padding-left: 1.4rem; }
.timeline::before { content: ''; position: absolute; left: .45rem; top: .3rem; bottom: .3rem; width: 2px; background: #dbe2ee; }
.timeline .tl-item { position: relative; margin-bottom: 1rem; }
.timeline .tl-item::before { content: ''; position: absolute; left: -1.2rem; top: .35rem; width: .8rem; height: .8rem; border-radius: 50%; background: var(--brand-2); border: 2px solid #fff; box-shadow: 0 0 0 2px #cdd9f2; }
.item-row { background: #fafbfe; border: 1px solid #e6eaf2; border-radius: .6rem; padding: .75rem; margin-bottom: .6rem; }

.evidence-thumb { width: 100%; height: 120px; object-fit: cover; border-radius: .5rem; border: 1px solid #e3e7ef; }
.evidence-file { height: 120px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px dashed #c8d0de; border-radius: .5rem; background: #fafbfe; font-size: .75rem; text-align: center; padding: .4rem; word-break: break-all; }
.evidence-file i { font-size: 2rem; color: #6b7280; }

/* Kanban */
.kanban { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 1rem; overflow-x: auto; }
.kanban-col { background: #eef1f7; border-radius: .75rem; padding: .75rem; min-height: 200px; }
.kanban-card { background: #fff; border-radius: .6rem; padding: .7rem; margin-bottom: .6rem; border: 1px solid #e3e7ef; }

.table thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: #6b7280; background: #f8f9fc; }
.progress { height: .55rem; }
.chart-box { position: relative; height: 260px; }
.text-truncate-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media print { .sidebar, .topbar, .app-footer, .no-print { display: none !important; } .content { padding: 0; } }

@media (max-width: 576px) {
  .login-card { min-width: 0; }
  .org-banner .org-sub { display: none; }
}
