/* Tracker: gaya mengikuti desain referensi (kartu warna lembut, pil hitam, tipografi besar) */
:root {
	--page: #E7E7E2;
	--panel: #FFFFFF;
	--ink: #1A1A1A;
	--black: #111111;
	--muted: #6D6D68;
	--soft: #F2F2EF;
	--line: #DADAD4;
	--danger: #B3261E;
	--font: 'Schibsted Grotesk', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

/* Warna per jenis */
.t-phd, .c-phd, .tag-phd, .d-phd         { --t-bg: #BCB2D0; --t-ink: #3F3463; --t-dk: #4B3E78; }
.t-fellowship, .c-fellowship, .tag-fellowship, .d-fellowship { --t-bg: #A2CBC8; --t-ink: #0E5A54; --t-dk: #126A63; }
.t-competition, .c-competition, .tag-competition, .d-competition { --t-bg: #CC9CA2; --t-ink: #5E1F2A; --t-dk: #6E2B36; }
.t-job, .c-job, .tag-job, .d-job         { --t-bg: #E4B96F; --t-ink: #54390F; --t-dk: #6B4A17; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	font-family: var(--font);
	color: var(--ink);
	background: var(--page);
	margin: 0;
	-webkit-font-smoothing: antialiased;
}
body.admin { background: #F4F4F1; }
body.auth { background: var(--page); }
a { color: inherit; }
a:hover { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, ol, dl { margin: 0; }
button { font-family: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
	outline: 2px solid var(--black);
	outline-offset: 2px;
}
.muted { color: var(--muted); }

/* ---------- Kerangka mobile ---------- */
.shell {
	max-width: 560px;
	margin: 0 auto;
	padding: calc(env(safe-area-inset-top, 0px) + 18px) 20px 22px;
}
.shell-sm { padding-bottom: 16px; }
.panel {
	max-width: 560px;
	margin: 0 auto;
	min-height: 62vh;
	background: var(--panel);
	border-radius: 32px 32px 0 0;
	padding: 22px 14px calc(env(safe-area-inset-bottom, 0px) + 28px);
}
@media (min-width: 600px) {
	body.app { padding-bottom: 0; }
}

.topbar { display: flex; align-items: center; gap: 10px; }
.pills { display: flex; gap: 10px; }
.pill {
	display: inline-flex; align-items: center;
	height: 46px; padding: 0 22px;
	border: 1.5px solid #BDBDB7; border-radius: 999px;
	font-size: 16px; font-weight: 500; color: var(--ink);
	background: transparent; text-decoration: none; white-space: nowrap;
}
.pill.is-on { background: var(--black); border-color: var(--black); color: #fff; }
.topbar .page-title { font-size: 18px; font-weight: 600; margin-left: auto; margin-right: auto; padding-right: 60px; }
.fab {
	margin-left: auto; width: 46px; height: 46px; border-radius: 50%;
	background: #D2D2CC; display: inline-flex; align-items: center; justify-content: center;
	color: var(--black); text-decoration: none;
}
.fab:hover { background: #C6C6BF; color: var(--black); }

/* ---------- Hero tanggal ---------- */
.hero { padding-top: 22px; }
.hero-day { font-size: 20px; color: #3a3a37; margin-bottom: 4px; }
.hero-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.hero-date {
	font-size: clamp(64px, 23vw, 110px);
	font-weight: 600; line-height: .9; letter-spacing: -0.05em; color: #333;
}
.clocks { display: flex; flex-direction: column; gap: 20px; border-left: 1.5px solid #3a3a37; padding-left: 16px; min-width: 0; }
.clock strong { display: block; font-size: clamp(20px, 6vw, 28px); font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; }
.clock small { font-size: 14px; color: #3a3a37; }

/* ---------- Panel: judul, tab, chip ---------- */
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 12px; }
.panel-head h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }

.tabs, .chips { display: flex; gap: 8px; overflow-x: auto; padding: 0 6px 12px; scrollbar-width: none; }
.tabs::-webkit-scrollbar, .chips::-webkit-scrollbar { display: none; }
.chips-flush { padding-left: 0; padding-right: 0; margin-top: 4px; }

/* Tab: yang aktif hitam penuh, yang lain abu-abu redup agar jelas bedanya */
.tab {
	flex: 0 0 auto; padding: 9px 16px; border-radius: 999px;
	background: #ECECE8; border: 1.5px solid #E0E0DA; color: #5F5F5A;
	font-size: 15px; font-weight: 500; text-decoration: none;
}
.tab b { font-weight: 700; margin-left: 4px; opacity: .75; }
.tab.is-on { background: var(--black); border-color: var(--black); color: #fff; font-weight: 600; box-shadow: 0 2px 8px rgba(0,0,0,.18); }
.tab.is-on b { opacity: .85; }

/* Chip jenis: aktif berwarna sesuai jenisnya, tidak aktif putih dengan titik warna */
.chip {
	flex: 0 0 auto; padding: 7px 14px; border-radius: 999px; background: #fff;
	border: 1.5px solid #D2D2CB; color: #55554F;
	font-size: 14px; font-weight: 500; text-decoration: none;
}
.chip[class*="c-"]::before {
	content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%;
	background: var(--t-dk); margin-right: 7px;
}
.chip.is-on { color: #fff; font-weight: 600; border-color: var(--t-dk, var(--black)); background: var(--t-dk, var(--black)); }
.chip.chip-all.is-on { background: var(--black); border-color: var(--black); }
.chip.is-on::before { background: #fff; }

.stack { display: flex; flex-direction: column; gap: 12px; padding-top: 6px; }
.stack-tight { gap: 8px; }

/* ---------- Ringkasan jumlah ---------- */
.summary { margin: 0 6px 16px; }
.sum-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.sum-head h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.sum-head span { font-size: 14px; color: var(--muted); }
.sum-head b { color: var(--ink); }
.sum-bar { display: block; height: 8px; border-radius: 999px; background: #E4E4DF; overflow: hidden; margin-bottom: 12px; }
.sum-bar > i { display: block; height: 100%; border-radius: 999px; background: var(--black); min-width: 0; }
.sum-bar-dark { background: rgba(17,17,17,.14); }
.sum-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sum-tile {
	display: block; position: relative; border-radius: 20px; padding: 12px 14px 14px;
	background: var(--t-bg); color: var(--t-ink); text-decoration: none; min-width: 0;
}
.sum-tile:hover { color: var(--t-ink); filter: brightness(1.03); }
.sum-label { display: block; font-size: 13px; font-weight: 700; opacity: .85; }
.sum-num { display: block; font-size: 34px; font-weight: 600; letter-spacing: -0.04em; line-height: 1.05; margin: 2px 0 2px; }
.sum-sub { display: block; font-size: 12px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sum-prog { display: block; height: 5px; border-radius: 999px; background: rgba(255,255,255,.5); margin-top: 9px; overflow: hidden; }
.sum-prog > i { display: block; height: 100%; background: var(--t-dk); border-radius: 999px; }

.todo-strip {
	display: flex; align-items: center; gap: 12px; margin: 0 6px 18px; padding: 12px 14px;
	border-radius: 20px; background: var(--soft); text-decoration: none; color: var(--ink); position: relative; overflow: hidden;
}
.todo-strip:hover { color: var(--ink); background: #EBEBE7; }
.ts-ic { width: 38px; height: 38px; border-radius: 12px; background: var(--black); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.ts-main { flex: 1; min-width: 0; }
.ts-main b { display: block; font-size: 15px; }
.ts-main small { display: block; font-size: 13px; color: var(--muted); }
.ts-prog { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(17,17,17,.08); }
.ts-prog > i { display: block; height: 100%; background: var(--black); }

/* ---------- Kartu peluang (ringkas, bisa dibuka) ---------- */
.card-opp { border-radius: 22px; background: var(--t-bg); color: var(--t-ink); overflow: hidden; }
.card-opp.is-done { opacity: .72; }
.co-head {
	display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 12px 12px 16px;
	background: none; border: 0; color: inherit; text-align: left; cursor: pointer; font: inherit;
	-webkit-tap-highlight-color: transparent;
}
.co-main { flex: 1 1 auto; min-width: 0; display: block; }
.co-tag { display: block; font-size: 12px; font-weight: 700; opacity: .75; margin-bottom: 1px; }
.co-title {
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
	font-size: 17px; font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; overflow-wrap: anywhere;
}
.card-opp.is-open .co-title { -webkit-line-clamp: unset; }
.co-sub { display: block; font-size: 13px; opacity: .8; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co-right { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.co-chev {
	width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.5);
	display: inline-flex; align-items: center; justify-content: center; transition: transform .2s ease;
}
.card-opp.is-open .co-chev { transform: rotate(180deg); }
.co-more { padding: 0 16px 16px; }
.co-more[hidden] { display: none; }
.card-opp .count { padding: 6px 11px; font-size: 13px; }

.tag {
	display: inline-block; padding: 3px 11px; border-radius: 999px; margin-bottom: 10px;
	background: rgba(255,255,255,.45); font-size: 13px; font-weight: 600;
}
.tag-phd, .tag-fellowship, .tag-competition, .tag-job { background: var(--t-bg); color: var(--t-ink); margin-bottom: 0; }
.card-sub { font-size: 15px; margin-top: 6px; opacity: .8; }

.chance { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.chance small { font-size: 12px; opacity: .8; white-space: nowrap; }
.bars { display: inline-flex; align-items: flex-end; gap: 3px; height: 16px; }
.bars i { width: 5px; border-radius: 2px; background: currentColor; opacity: .22; display: block; }
.bars i:nth-child(1) { height: 7px; }
.bars i:nth-child(2) { height: 11px; }
.bars i:nth-child(3) { height: 15px; }
.bars.l1 i:nth-child(-n+1), .bars.l2 i:nth-child(-n+2), .bars.l3 i { opacity: 1; }

.card-times { display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 10px; padding-top: 2px; }
.tm { min-width: 0; }
.tm strong { display: block; font-size: clamp(20px, 6vw, 26px); font-weight: 500; letter-spacing: -0.02em; line-height: 1.05; white-space: nowrap; }
.tm small { display: block; font-size: 13px; opacity: .85; margin-top: 3px; }
.tm-r { text-align: right; }
.count {
	flex: 0 1 auto; background: var(--t-dk); color: #fff; border-radius: 999px;
	padding: 9px 14px; font-size: 14px; font-weight: 600; white-space: nowrap;
}
.count.is-hot { background: #B3261E; }
.count.is-late { background: #7A1F1F; }
.count.is-none { background: rgba(255,255,255,.5); color: var(--t-ink); }
.count-sm { font-size: 12px; font-weight: 600; margin-top: 2px; color: var(--muted); }
.count-sm.is-hot { color: var(--danger); }
.count-sm.is-late { color: #7A1F1F; }

.card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.card-actions form { margin: 0; }
.card-actions .spacer { flex: 1; }
.mini {
	display: inline-block; padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 500;
	background: rgba(255,255,255,.5); color: var(--t-ink); text-decoration: none; border: 0;
}
.mini:hover { color: var(--t-ink); background: rgba(255,255,255,.7); }
.mini-line { background: transparent; border: 1.5px solid currentColor; padding: 6.5px 13px; }
.mini-line:hover { background: rgba(255,255,255,.35); }
.mini-btn { cursor: pointer; }
.state { font-size: 14px; font-weight: 600; }
.btn-done {
	background: var(--black); color: #fff; border: 0; border-radius: 999px;
	padding: 10px 22px; font-size: 15px; font-weight: 600; cursor: pointer;
}
.btn-done:hover { background: #333; }
.btn-done-sm { padding: 5px 12px; font-size: 13px; }

/* ---------- Kalender ---------- */
.monthbar {
	display: flex; align-items: center; justify-content: space-between;
	background: var(--soft); border-radius: 26px; padding: 14px 20px; margin-bottom: 12px;
}
.mb-side { font-size: 28px; font-weight: 500; color: #B4B4AE; text-decoration: none; letter-spacing: -0.01em; }
.mb-side:hover { color: #888; }
.mb-mid { display: flex; align-items: center; gap: 8px; }
.mb-cur { font-size: 30px; font-weight: 700; letter-spacing: -0.01em; }
.mb-cur small { font-size: 14px; font-weight: 500; color: var(--muted); margin-left: 2px; }
.mb-arrow { font-size: 30px; line-height: 1; padding: 2px 8px; color: #555; text-decoration: none; }
.jump { text-align: center; font-size: 14px; margin-bottom: 8px; }
.jump a { text-decoration: underline; text-underline-offset: 3px; }

.mgrid { width: 100%; table-layout: fixed; border-collapse: collapse; margin: 6px 0 4px; }
.mgrid th { font-size: 12px; font-weight: 600; color: var(--muted); text-align: center; padding: 4px 0 6px; }
.mgrid td { text-align: center; height: 48px; position: relative; padding: 0; }
.mgrid .day a, .mgrid .day span {
	display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center;
	border-radius: 50%; font-size: 15px; text-decoration: none; margin-top: 2px;
}
.mgrid .day span { color: #555; }
.mgrid .day.has a { font-weight: 700; }
.mgrid .day.is-today a, .mgrid .day.is-today span { background: var(--black); color: #fff; }
.mgrid .day em { position: absolute; left: 0; right: 0; bottom: 1px; display: flex; justify-content: center; gap: 3px; font-style: normal; }
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--t-dk); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--muted); padding: 4px 6px 18px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

.daycard {
	display: grid; grid-template-columns: 112px 1fr; gap: 10px;
	border-radius: 28px; padding: 18px 16px 18px 20px;
	background: var(--t-bg); color: var(--t-ink); scroll-margin-top: 12px;
}
.daycard.is-past { opacity: .68; }
.daycard.is-today { outline: 2px solid var(--black); outline-offset: 2px; }
.dc-date p { font-size: 17px; margin-bottom: 2px; }
.dc-date strong { display: block; font-size: 48px; font-weight: 600; line-height: .92; letter-spacing: -0.04em; }
.now { display: inline-block; margin-top: 10px; padding: 2px 10px; border-radius: 999px; background: var(--black); color: #fff; font-size: 12px; font-weight: 600; }
.dc-events { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.evt {
	display: block; border-radius: 14px; padding: 8px 12px; text-decoration: none;
	min-width: 0;
}
.evt-kind { display: block; font-size: 12px; opacity: .85; }
.evt-title { display: block; font-size: 14px; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.evt.k-deadline { background: var(--t-dk); color: #fff; }
.evt.k-announce { border: 1.5px solid var(--t-dk); color: var(--t-ink); padding: 6.5px 10.5px; }
.evt.k-milestone { background: rgba(255,255,255,.55); color: var(--t-ink); }
.evt:hover { color: inherit; filter: brightness(1.05); }
.evt.k-deadline:hover { color: #fff; }
.evt.is-done { opacity: .55; }
.evt.is-done .evt-title { text-decoration: line-through; }
.evt-add {
	display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px;
	border-radius: 50%; border: 1.5px solid currentColor; font-size: 16px; line-height: 1; text-decoration: none; opacity: .7;
}

/* ---------- Empty, flash, tombol umum ---------- */
.empty { text-align: center; padding: 36px 14px 24px; color: var(--muted); }
.empty p { margin-bottom: 16px; font-size: 16px; line-height: 1.45; }
.btn-black {
	display: inline-block; background: var(--black); color: #fff; border: 0; border-radius: 999px;
	padding: 14px 26px; font-size: 16px; font-weight: 600; text-decoration: none; cursor: pointer; text-align: center;
}
.btn-black:hover { background: #333; color: #fff; }
.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn-block { display: block; width: 100%; }
.btn-ghost {
	display: inline-block; background: transparent; border: 1.5px dashed #B8B8B2; border-radius: 999px;
	padding: 10px 18px; font-size: 15px; font-weight: 500; cursor: pointer; color: var(--ink); text-align: center;
}
.btn-ghost.btn-block { display: block; }
.btn-text { background: none; border: 0; padding: 4px 8px; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; color: var(--ink); }
.btn-text-danger { color: var(--danger); }
.flash { border-radius: 16px; padding: 12px 16px; margin: 0 6px 14px; font-size: 15px; }
.flash-ok { background: #E3F0E3; color: #1E4620; }
.flash-err { background: #F7E1E0; color: #7A1F1F; }

.footlinks { display: flex; justify-content: center; gap: 22px; margin-top: 34px; font-size: 14px; color: var(--muted); }
.footlinks a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Form ---------- */
.oform { padding: 0 6px; }
.f-group { margin-bottom: 16px; min-width: 0; }
.f-group > label, .f-group > legend, fieldset.f-group legend {
	display: block; width: 100%; font-size: 14px; font-weight: 600; margin: 0 0 6px; padding: 0; border: 0; line-height: 1.3;
}
fieldset.f-group { border: 0; padding: 0; min-width: 0; }
.fc {
	display: block; width: 100%; background: var(--soft); border: 1.5px solid transparent;
	border-radius: 16px; padding: 13px 16px; font-family: inherit; font-size: 16px; color: var(--ink);
	-webkit-appearance: none; appearance: none; min-height: 48px;
}
select.fc {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%23333' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px;
}
.fc:focus { border-color: var(--black); background-color: #fff; outline: none; box-shadow: 0 0 0 3px rgba(17,17,17,.12); }
textarea.fc { min-height: 110px; resize: vertical; }
.fc-sm { padding: 8px 12px; font-size: 14px; min-height: 38px; border-radius: 12px; width: auto; display: inline-block; }
.fc-xs { padding: 5px 28px 5px 10px; font-size: 13px; min-height: 32px; border-radius: 10px; width: auto; background-position: right 10px center; }
.f-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.f-block { border: 1.5px solid #ECECE8; border-radius: 24px; padding: 16px 14px 4px; margin-bottom: 16px; }
.f-block h2 { font-size: 16px; font-weight: 700; margin-bottom: 12px; }
.f-actions { padding-top: 6px; }

.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label {
	margin: 0; padding: 10px 16px; border-radius: 999px; background: var(--soft);
	font-size: 15px; font-weight: 500; cursor: pointer; user-select: none;
}
.seg input:checked + label { background: var(--black); color: #fff; }
.seg input:focus-visible + label { outline: 2px solid var(--black); outline-offset: 2px; }
.seg input:checked + .seg-phd { background: #BCB2D0; color: #3F3463; }
.seg input:checked + .seg-fellowship { background: #A2CBC8; color: #0E5A54; }
.seg input:checked + .seg-competition { background: #CC9CA2; color: #5E1F2A; }
.seg input:checked + .seg-job { background: #E4B96F; color: #54390F; }
.seg-3 label { flex: 1; text-align: center; }

.ms-row { display: grid; grid-template-columns: 1fr 138px 38px; gap: 8px; margin-bottom: 8px; }
.ms-del { width: 38px; height: 48px; border: 0; border-radius: 14px; background: var(--soft); font-size: 20px; cursor: pointer; color: var(--muted); }
#ms-add { margin: 2px 0 12px; }

/* ---------- Detail ---------- */
.panel-flush { padding-left: 16px; padding-right: 16px; }
.hero-card { border-radius: 30px; padding: 22px 22px 20px; background: var(--t-bg); color: var(--t-ink); }
.hero-card h1 { font-size: clamp(28px, 8.5vw, 38px); font-weight: 600; line-height: 1.04; letter-spacing: -0.025em; overflow-wrap: anywhere; }
.hero-card .card-sub { font-size: 16px; }
.hero-card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 26px; gap: 10px; }
.hero-card-foot .chance { flex-direction: row; align-items: center; gap: 8px; }
.detail-actions { margin: 14px 0 6px; }
.link-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0 4px; }
.link-row:empty { display: none; }
.btn-link {
	display: block; background: var(--soft); border-radius: 18px; padding: 11px 16px; font-size: 15px; font-weight: 600;
	text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}
.btn-link small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); }
.sec { font-size: 18px; font-weight: 700; margin: 26px 0 12px; }
.timeline { list-style: none; padding: 0 0 0 6px; margin-left: 5px; border-left: 2px solid #E2E2DD; }
.timeline li { position: relative; padding: 0 0 18px 20px; }
.timeline li:last-child { padding-bottom: 2px; }
.timeline li::before {
	content: ''; position: absolute; left: -7px; top: 5px; width: 12px; height: 12px; border-radius: 50%;
	background: #fff; border: 2px solid var(--black);
}
.timeline li.past { opacity: .5; }
.timeline li.past::before { background: var(--black); }
.timeline li.now::before { background: #B3261E; border-color: #B3261E; }
.tl-date { display: block; font-weight: 700; font-size: 16px; }
.tl-label { display: block; font-size: 15px; }
.tl-n { display: block; font-size: 13px; color: var(--muted); }
.facts { display: grid; grid-template-columns: 96px 1fr; gap: 10px 12px; font-size: 15px; align-items: center; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.inline-status .fc { width: 100%; }
.notes { font-size: 16px; line-height: 1.55; background: var(--soft); border-radius: 18px; padding: 14px 16px; overflow-wrap: anywhere; }
.danger-zone { text-align: center; margin-top: 36px; }

/* ---------- Login ---------- */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.auth-card { width: 100%; max-width: 420px; background: #fff; border-radius: 32px; padding: 34px 26px 28px; }
.auth-card h1 { font-size: 34px; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 6px; }
.auth-card .muted { margin-bottom: 22px; font-size: 15px; line-height: 1.45; }
.auth-card .flash { margin-left: 0; margin-right: 0; }

/* ---------- Admin (desktop) ---------- */
.anav { background: var(--black); color: #fff; padding: 14px 28px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.anav-brand { font-weight: 700; font-size: 18px; color: #fff; text-decoration: none; }
.anav-brand:hover { color: #fff; }
.anav-links { display: flex; align-items: center; gap: 22px; font-size: 15px; flex-wrap: wrap; }
.anav-links a { color: #D8D8D3; text-decoration: none; }
.anav-links a:hover { color: #fff; }
.anav-links .anav-add { background: #fff; color: var(--black); padding: 6px 16px; border-radius: 999px; font-weight: 600; }
.anav-links .anav-add:hover { color: var(--black); }
.admin-wrap { max-width: 1440px; margin: 0 auto; padding: 26px 28px 70px; }
.admin-narrow { max-width: 760px; }
.admin-h { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 18px; }
.admin-wrap .flash { margin-left: 0; margin-right: 0; }
.astats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 22px; }
.astat { background: #fff; border-radius: 20px; padding: 16px 18px; }
.astat strong { display: block; font-size: 34px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.astat span { font-size: 14px; color: var(--muted); }
.astat.is-late strong { color: var(--danger); }
.astat.is-hot strong { color: #C26A00; }
.afilter { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.afilter input[type=search] { width: 280px; }
.rows-n { font-size: 14px; margin: 6px 2px 10px; }
.atable-wrap { background: #fff; border-radius: 20px; }
.atable { width: 100%; border-collapse: collapse; font-size: 14px; }
.atable th { text-align: left; font-size: 13px; font-weight: 600; color: var(--muted); padding: 12px 14px; background: #FAFAF8; white-space: nowrap; }
.atable th:first-child { border-top-left-radius: 20px; }
.atable th:last-child { border-top-right-radius: 20px; }
.atable td { padding: 12px 14px; border-top: 1px solid #EFEFEA; vertical-align: top; }
.atable tr.is-done td { color: #8A8A85; }
.atable .a-title { font-weight: 600; text-decoration: none; font-size: 15px; }
.atable .a-title:hover { text-decoration: underline; }
.atable .muted { font-size: 13px; }
.atable td a { text-underline-offset: 3px; }
.empty-row { text-align: center; padding: 36px 14px !important; color: var(--muted); }
.t-right { text-align: right; }
.nowrap { white-space: nowrap; }
.d-inline { display: inline-block; margin: 0; }
.acard { background: #fff; border-radius: 24px; padding: 24px; margin-bottom: 18px; }
.acard h2 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.acard .muted { font-size: 15px; line-height: 1.5; margin-bottom: 14px; }
.acard .flash { margin-left: 0; margin-right: 0; }
.import-form { display: flex; gap: 12px; align-items: center; margin: 14px 0; flex-wrap: wrap; }

@media (max-width: 1100px) { .astats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) {
	.admin-wrap { padding: 18px 14px 50px; }
	.astats { grid-template-columns: repeat(2, 1fr); }
	.afilter input[type=search] { width: 100%; }
	.anav { padding: 12px 14px; }
}
@media (max-width: 380px) {
	.daycard { grid-template-columns: 96px 1fr; padding-left: 16px; }
	.dc-date strong { font-size: 42px; }
	.ms-row { grid-template-columns: 1fr 120px 36px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

/* ---------- PWA, pengaturan, notifikasi ---------- */
.note { background: var(--soft); border-radius: 16px; padding: 12px 14px; font-size: 14px; line-height: 1.45; margin-bottom: 12px; }
.note-warn { background: #F7ECD8; color: #54390F; }
.note-ok { background: #E3F0E3; color: #1E4620; }
.steps { padding-left: 20px; margin: 0 0 14px; font-size: 15px; line-height: 1.5; }
.steps li { margin-bottom: 4px; }
.small { font-size: 13px; line-height: 1.45; margin: 6px 0 0; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.btn-row .btn-sm { padding: 10px 16px; font-size: 14px; }
.btn-ghost.btn-sm { padding: 9px 16px; font-size: 14px; }
.opt { display: flex; align-items: center; gap: 12px; padding: 4px 0 12px; font-size: 16px; font-weight: 500; cursor: pointer; margin: 0; }
.opt input { width: 22px; height: 22px; accent-color: var(--black); flex: 0 0 auto; margin: 0; }
.seg-wrap input:checked + label { background: var(--black); color: #fff; }
.f-block fieldset legend { font-size: 14px; }
.a2hs { background: var(--soft); border-radius: 20px; padding: 14px 16px; margin: 0 6px 16px; font-size: 14px; line-height: 1.45; }
.a2hs[hidden] { display: none; }
.a2hs p { margin-bottom: 10px; }
.a2hs div { display: flex; align-items: center; justify-content: space-between; }
.mini-dark { background: var(--black); color: #fff; border-radius: 999px; padding: 8px 16px; font-size: 14px; font-weight: 600; text-decoration: none; }
.mini-dark:hover { color: #fff; }
[hidden] { display: none !important; }

/* ---------- Jam berdetik dan tombol memuat ---------- */
.clock strong { font-variant-numeric: tabular-nums; }
.clock .sec { font-size: .62em; font-weight: 500; color: #6D6D68; margin-left: 2px; letter-spacing: 0; }
.btn-black:disabled, .btn-black.is-loading { opacity: .75; cursor: progress; }
.btn-black.is-loading::before {
	content: ''; display: inline-block; width: 14px; height: 14px; margin-right: 10px; vertical-align: -2px;
	border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%;
	animation: tr-spin .8s linear infinite;
}
@keyframes tr-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .btn-black.is-loading::before { animation: none; border-top-color: rgba(255,255,255,.35); border-right-color: #fff; } }

/* ---------- Font lokal (tanpa Google Fonts) ---------- */
@font-face {
	font-family: 'Schibsted Grotesk';
	font-style: normal;
	font-weight: 400 800;
	font-display: swap;
	src: url('../fonts/schibsted-grotesk-latin-wght-normal.woff2') format('woff2');
}

/* ---------- Indikator loading antar halaman ---------- */
.navload { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 9999; pointer-events: none; visibility: hidden; }
.navload.is-bar, .navload.is-on { visibility: visible; }
.navload-bar { position: absolute; top: 0; left: 0; right: 0; height: 3px; background: rgba(17,17,17,.12); overflow: hidden; }
.navload-bar::before {
	content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 40%; border-radius: 3px;
	background: var(--black); animation: tr-bar 1.1s ease-in-out infinite;
}
@keyframes tr-bar { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
.navload-box {
	position: absolute; top: 0; left: 0; right: 0; bottom: 0; display: none;
	flex-direction: column; align-items: center; justify-content: center; gap: 12px;
	background: rgba(231,231,226,.62);
}
.navload.is-on { pointer-events: auto; }
.navload.is-on .navload-box { display: flex; }
.navload-spin {
	width: 42px; height: 42px; border-radius: 50%;
	border: 4px solid rgba(17,17,17,.15); border-top-color: var(--black);
	animation: tr-spin .8s linear infinite;
}
.navload-txt { font-size: 14px; font-weight: 600; color: #333; }
@media (prefers-reduced-motion: reduce) {
	.navload-bar::before { animation: none; width: 100%; opacity: .5; }
	.navload-spin { animation: none; border-right-color: var(--black); }
}

/* ---------- Menu bawah (mobile) ---------- */
body.has-nav .panel { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 112px); }
.bnav {
	position: fixed; left: 0; right: 0; z-index: 50;
	bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
	display: flex; align-items: center; justify-content: center; gap: 8px;
	padding: 0 12px; pointer-events: none;
}
.bnav > * { pointer-events: auto; }
.bnav-pill {
	display: flex; align-items: center; gap: 2px; padding: 6px; max-width: 100%;
	background: rgba(255,255,255,.96); border-radius: 999px;
	box-shadow: 0 8px 28px rgba(0,0,0,.14), 0 1px 3px rgba(0,0,0,.08);
}
.bn {
	display: inline-flex; align-items: center; justify-content: center; gap: 7px;
	height: 44px; min-width: 44px; padding: 0 11px; border-radius: 999px;
	color: #8A8A84; text-decoration: none; font-size: 14px; font-weight: 600; white-space: nowrap;
	-webkit-tap-highlight-color: transparent;
}
.bn span { display: none; }
.bn:hover { color: #55554F; }
.bn.is-on { background: var(--black); color: #fff; padding: 0 15px 0 12px; }
.bn.is-on span { display: inline; }
.bnav-add { position: relative; flex: 0 0 auto; }
.bn-fab {
	width: 56px; height: 56px; border-radius: 50%; border: 0; cursor: pointer;
	background: var(--black); color: #fff; display: inline-flex; align-items: center; justify-content: center;
	box-shadow: 0 8px 22px rgba(0,0,0,.28);
}
.bn-fab[aria-expanded="true"] .ic { transform: rotate(45deg); }
.bn-fab .ic { transition: transform .18s ease; }
.bn-menu {
	position: absolute; right: 0; bottom: 66px; min-width: 190px; padding: 6px;
	background: #fff; border-radius: 22px; box-shadow: 0 12px 34px rgba(0,0,0,.2);
}
.bn-menu[hidden] { display: none; }
.bn-menu a {
	display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px;
	font-size: 15px; font-weight: 600; text-decoration: none; color: var(--ink);
}
.bn-menu a:hover { background: var(--soft); color: var(--ink); }
@media (min-width: 600px) {
	.bnav { left: 50%; right: auto; transform: translateX(-50%); width: 560px; }
}
@media (max-width: 360px) {
	.bn { padding: 0 9px; }
	.bn.is-on { padding: 0 12px 0 10px; }
}

/* ---------- Judul halaman bergaya kiri, hero hari ---------- */
.page-title-left { font-size: 30px; font-weight: 700; letter-spacing: -0.03em; margin: 0; }
.topbar .page-title-left + .fab { margin-left: auto; }
.shell-sub { font-size: 15px; color: #4a4a46; margin-top: 6px; }
.day-hero { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 18px; }
.dh-arrow {
	width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid #BDBDB7;
	display: inline-flex; align-items: center; justify-content: center; font-size: 26px; line-height: 1;
	text-decoration: none; color: var(--ink); flex: 0 0 auto; padding-bottom: 3px;
}
.dh-mid { text-align: center; min-width: 0; }
.dh-dow { font-size: 16px; color: #4a4a46; }
.dh-date { font-size: clamp(34px, 11vw, 50px); font-weight: 600; letter-spacing: -0.04em; line-height: 1; margin-top: 2px; }
.dh-prog { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; color: #4a4a46; margin: 14px 2px 8px; }
.dh-prog a { text-decoration: underline; text-underline-offset: 3px; font-weight: 600; color: var(--ink); }
.empty-sm { padding: 20px 14px; font-size: 15px; }
.empty-sm[hidden] { display: none; }

/* ---------- To-do ---------- */
.todo-add { display: grid; grid-template-columns: 1fr 112px auto; gap: 8px; margin: 0 6px 16px; }
.todo-add .fc { min-width: 0; }
.todo-add .btn-black { padding: 0 20px; }
@media (max-width: 440px) {
	.todo-add { grid-template-columns: 1fr 112px; }
	.todo-add .btn-black { grid-column: 1 / -1; padding: 13px; }
}
.todo-list { list-style: none; padding: 0 6px; margin: 0; }
.todo { display: flex; align-items: center; gap: 12px; padding: 11px 4px; border-bottom: 1px solid #EFEFEA; }
.todo:last-child { border-bottom: 0; }
.todo-tf { margin: 0; flex: 0 0 auto; }
.todo-check {
	width: 30px; height: 30px; border-radius: 50%; border: 2px solid #B9B9B2; background: #fff;
	color: transparent; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0;
	-webkit-tap-highlight-color: transparent;
}
.todo-check:hover { border-color: var(--black); }
.todo.is-done .todo-check, .read.is-read .todo-check { background: var(--black); border-color: var(--black); color: #fff; }
.todo-body { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.todo-title { font-size: 17px; font-weight: 500; line-height: 1.25; overflow-wrap: anywhere; flex: 1; min-width: 0; }
.todo.is-done .todo-title { text-decoration: line-through; color: #9A9A94; }
.todo-time {
	flex: 0 0 auto; font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
	background: var(--soft); color: #4a4a46; font-variant-numeric: tabular-nums;
}
.todo-time.is-late { background: #F7E1E0; color: #8E1F1A; }
.todo.is-done .todo-time { opacity: .5; }
.todo-sec { font-size: 14px; font-weight: 700; color: var(--muted); margin: 22px 10px 2px; }
.todo-sec span { background: var(--soft); border-radius: 999px; padding: 1px 8px; margin-left: 4px; }
.todo-sec[hidden] { display: none; }

/* ---------- Baca nanti ---------- */
.read-add { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin: 0 6px 6px; }
.read-add .btn-black { padding: 0 22px; }
.read-hint { margin: 0 8px 14px; }
.read-search { padding: 0 6px 12px; }
.read-search .fc { width: 100%; }
.read-list { list-style: none; padding: 0 6px; margin: 0; }
.read { display: flex; align-items: flex-start; gap: 12px; padding: 14px 4px; border-bottom: 1px solid #EFEFEA; }
.read:last-child { border-bottom: 0; }
.read .todo-tf { padding-top: 2px; }
.read-body { flex: 1; min-width: 0; }
.read-title { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 17px; font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; text-decoration: none; overflow-wrap: anywhere; }
.read-title:hover { text-decoration: underline; text-underline-offset: 3px; }
.read-meta { font-size: 13px; color: var(--muted); margin-top: 4px; }
.read-note { font-size: 14px; color: #4a4a46; margin-top: 6px; background: var(--soft); border-radius: 12px; padding: 8px 12px; overflow-wrap: anywhere; }
.read.is-read .read-title { text-decoration: line-through; color: #9A9A94; }
.read-edit { flex: 0 0 auto; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: #8A8A84; text-decoration: none; }
.read-edit:hover { background: var(--soft); color: var(--ink); }

/* ---------- Tombol hapus ---------- */
.btn-danger {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 14px 22px; border-radius: 999px; font-size: 16px; font-weight: 600; cursor: pointer;
	background: #FBEFEE; color: #B3261E; border: 1.5px solid #EBC9C6;
}
.btn-danger:hover { background: #F6DEDC; border-color: #DDA9A5; }
.btn-danger.btn-block { display: flex; width: 100%; }
.danger-zone { margin-top: 30px; text-align: initial; }

/* ---------- Analitik ---------- */
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 6px 16px; }
.kpi { background: var(--soft); border-radius: 20px; padding: 14px 16px; min-width: 0; }
.kpi-main { grid-column: 1 / -1; background: var(--black); color: #fff; }
.kpi-main .kpi-label, .kpi-main .kpi-sub { color: rgba(255,255,255,.7); }
.kpi-main .sum-bar { margin: 12px 0 0; background: rgba(255,255,255,.18); }
.kpi-main .sum-bar > i { background: #fff; }
.kpi-label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); }
.kpi-num { display: block; font-size: 38px; font-weight: 600; letter-spacing: -0.04em; line-height: 1.05; margin: 3px 0 2px; }
.kpi-num small { font-size: 16px; font-weight: 500; letter-spacing: 0; opacity: .7; }
.kpi-sub { display: block; font-size: 13px; color: var(--muted); }
.kpis-2 { margin: 0 0 12px; }
.kpis-2 .kpi { background: #fff; border: 1.5px solid #ECECE8; }

.chart-card { margin: 0 6px 14px; background: #fff; border: 1.5px solid #ECECE8; border-radius: 24px; padding: 16px 16px 14px; }
.cc-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; margin-bottom: 12px; }
.cc-head h2 { font-size: 17px; font-weight: 700; }
.cc-legend { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; flex-wrap: wrap; gap: 2px 4px; }
.lg { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-left: 6px; }
.lg-done { background: var(--black); } .lg-miss { background: #D9695F; } .lg-pend { background: #CFCFC8; }
.lg-phd, .bseg-phd { background: #8F80B8; } .lg-fellowship, .bseg-fellowship { background: #5FA9A3; }
.lg-competition, .bseg-competition { background: #C17883; } .lg-job, .bseg-job { background: #D9A441; }

.chart-scroll { overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.bars-chart { display: flex; align-items: stretch; gap: 3px; height: 150px; }
.bc-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; }
.bc-stack { flex: 1; display: flex; flex-direction: column-reverse; justify-content: flex-start; border-radius: 5px; overflow: hidden; background: #F4F4F1; }
.bc-col.is-today .bc-stack { outline: 2px solid var(--black); outline-offset: 1px; }
.bseg { display: block; width: 100%; min-height: 3px; }
.bseg-done { background: var(--black); } .bseg-miss { background: #D9695F; } .bseg-pend { background: #CFCFC8; }
.bc-lab { height: 16px; font-size: 10px; color: var(--muted); text-align: center; line-height: 16px; margin-top: 4px; white-space: nowrap; }

.hbars { list-style: none; padding: 0; margin: 0; }
.hbars li { display: grid; grid-template-columns: minmax(80px, 38%) 1fr 28px; align-items: center; gap: 10px; padding: 6px 0; }
.hb-label { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-track { height: 12px; border-radius: 999px; background: #F0F0EC; overflow: hidden; }
.hb-track > i { display: block; height: 100%; border-radius: 999px; background: var(--black); }
.hb-n { font-size: 14px; text-align: right; font-variant-numeric: tabular-nums; }

.heat-wrap { display: flex; gap: 8px; }
.heat-days { display: grid; grid-template-rows: repeat(7, 1fr); font-size: 10px; color: var(--muted); gap: 4px; padding: 0; }
.heat-days span { display: flex; align-items: center; }
.heat { flex: 1; display: grid; grid-template-rows: repeat(7, 1fr); grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; }
.hc { display: block; aspect-ratio: 1 / 1; border-radius: 5px; background: #EFEFEA; }
.hc.l1 { background: #C9C9C2; } .hc.l2 { background: #9C9C95; } .hc.l3 { background: #5E5E58; } .hc.l4 { background: var(--black); }
.hc.lx { background: transparent; border: 1.5px dashed #E4E4DF; }
