/* =========================================================================
   Poin Kemahasiswaan — STIKes DHB
   Design system v2
   ---------------------------------------------------------------------
   Palette
     --ink        #1D2B27  primary text
     --ink-soft   #5B655F  secondary text
     --pine       #2F4A42  brand / sidebar
     --pine-deep  #1F332D  sidebar depth / hover
     --marigold   #C99A3E  accent — points, achievement
     --marigold-deep #A97F2E  accent hover/active
     --parchment  #EDEEE4  page background
     --card       #FBFAF5  card / widget surface
     --line       #DDDCD0  hairline borders on warm surfaces
     --brick      #A8573F  destructive / error
     --moss       #4F7A5C  success
   Type
     Display : "Spectral"        (headings, widget titles, login mark)
     Body/UI : "Inter"           (everything else)
     Data    : "IBM Plex Mono"   (NIM, dates, poin, badges)
   Signature
     Tingkat badges — pill labels for Lokal/Wilayah/Nasional/Internasional
     that escalate in visual weight with the activity's real point tier.
   ========================================================================= */

/* Font Spectral/Inter/IBM Plex Mono dimuat lewat <link> di header.php
   (bukan @import di sini) - @import di dalam CSS baru "ditemukan" browser
   SETELAH file CSS ini selesai diunduh & di-parse, jadi permintaan font
   baru mulai belakangan (berurutan, bukan paralel) - ini penyebab utama
   loading terasa berat. <link> di <head> bisa mulai diunduh bersamaan
   dengan resource lain sejak awal. */

:root {
	--ink: #1D2B27;
	--ink-soft: #5B655F;
	--ink-faint: #8A9089;
	--pine: #2F4A42;
	--pine-deep: #1F332D;
	--pine-tint: #DDE6E1;
	--marigold: #C99A3E;
	--marigold-deep: #A97F2E;
	--marigold-tint: #F5E9CE;
	--parchment: #EDEEE4;
	--card: #FBFAF5;
	--line: #DDDCD0;
	--line-soft: #E8E7DC;
	--brick: #A8573F;
	--brick-tint: #F3E0D9;
	--moss: #4F7A5C;
	--moss-tint: #DEE9E1;

	--font-display: 'Spectral', Georgia, 'Times New Roman', serif;
	--font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	--font-mono: 'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;

	--radius-s: 6px;
	--radius-m: 10px;
	--radius-l: 16px;
	--shadow-card: 0 1px 2px rgba(29, 43, 39, 0.04), 0 6px 20px rgba(29, 43, 39, 0.06);
	--shadow-pop: 0 10px 30px rgba(29, 43, 39, 0.16);

	--sidebar-w: 236px;
}

/* ---- Reset / base ----------------------------------------------------- */
* { box-sizing: border-box; }
html { height: 100%; background: var(--parchment); }
.html { height: 100%; }
body {
	min-height: 100%;
	font-family: var(--font-body);
	font-size: 13.5px;
	line-height: 1.6;
	color: var(--ink);
	background: var(--parchment);
	position: relative;
	-webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-display);
	font-weight: 600;
	color: var(--ink);
	line-height: 1.25;
	margin: 0;
}
h5 { font-size: 22px; letter-spacing: -0.01em; }
h6 { font-size: 15px; letter-spacing: 0.01em; }
a { color: var(--pine); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--marigold-deep); }
p { margin: 0 0 10px 0; }
img { max-width: 100%; }
strong, b { font-weight: 600; }
::selection { background: var(--marigold-tint); color: var(--ink); }

/* Decorative/functional icon images sprinkled through the old templates —
   harmonised to a single soft ink tone instead of clashing 2012 clip-art
   colours. Never applied to real photo uploads (thumb.php outputs). */
.titleIcon, .middleNav img, .mUser img, .backTo img {
	filter: grayscale(1) brightness(0) opacity(0.42);
	vertical-align: middle;
}

.wrapper { position: relative; margin: 0 32px; }
.clear { clear: both; }
.nobg { background: none !important; }
.nomargin { margin: 0; }
.np { padding: 0 !important; }
.mt0 { margin-top: 0 !important; }
.mt12 { margin-top: 12px !important; }
.line { height: 1px; background: var(--line); display: block; margin: 0; }
.cLine { height: 1px; background: rgba(255,255,255,.08); }
.sidebarSep { height: 1px; background: rgba(255,255,255,.08); width: 100%; margin: 18px 0; }
.dn, .resp { display: none; }

/* ---- App shell --------------------------------------------------------- */
#leftSide {
	background: linear-gradient(180deg, var(--pine) 0%, var(--pine-deep) 100%);
	margin: 0;
	float: left;
	width: var(--sidebar-w);
	min-height: 100vh;
	padding-bottom: 60px;
}
#rightSide {
	margin-left: var(--sidebar-w);
	padding-bottom: 62px;
	overflow: hidden;
	min-height: 100vh;
}

/* ---- Top bar ------------------------------------------------------------ */
.topNav {
	background: var(--card);
	border-bottom: 1px solid var(--line);
	display: block;
	color: var(--ink-soft);
	padding: 16px 0;
	font-family: var(--font-display);
	font-size: 15px;
	font-weight: 500;
	letter-spacing: .01em;
	color: var(--ink);
}
.loginPage .topNav { text-align: center; }

/* ---- Sidebar: logo + nav ------------------------------------------------ */
.logo { padding: 28px 28px 20px 28px; }
.logo img { display: block; max-height: 34px; filter: brightness(0) invert(1); opacity: .95; }

#menu.nav { border-top: none; padding: 4px 14px; }
.nav li { position: relative; margin-bottom: 2px; }
.nav li a {
	display: block;
	background: none;
	border: none;
	border-radius: var(--radius-s);
	transition: background-color .15s ease, color .15s ease;
}
.nav li a:hover { background: rgba(255,255,255,.07); }
.nav li a.active, .nav li a:active {
	background: var(--marigold);
	box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
.nav li a span {
	padding: 10px 14px;
	display: block;
	font-size: 12.5px;
	text-transform: none;
	font-weight: 500;
	letter-spacing: .01em;
	color: #E9EEEA;
}
.nav li a.active span, .nav li a:active span { color: var(--pine-deep); font-weight: 600; }
.nav li a strong { display: none; }

/* Sidebar search widgets */
.sidebarSearch { position: relative; padding: 0 14px; margin-bottom: 10px; }
.sidebarSearch input[type=text] {
	background: rgba(255,255,255,.08);
	color: #F2F4F1;
	padding: 9px 32px 9px 12px;
	width: 100%;
	height: auto;
	border: 1px solid rgba(255,255,255,.12);
	border-radius: var(--radius-s);
	font-family: var(--font-body);
	font-size: 12.5px;
}
.sidebarSearch input[type=text]::placeholder { color: rgba(233,238,234,.55); }
.sidebarSearch input[type=text]:focus { outline: none; border-color: var(--marigold); background: rgba(255,255,255,.14); }
.sidebarSearch input[type=submit] {
	width: 22px; height: 22px;
	background: rgba(255,255,255,.12) url(../images/searchBtn.png) no-repeat 50%;
	background-size: 11px;
	position: absolute; top: 5px; right: 20px;
	border: none; border-radius: 4px;
	filter: none;
}

/* ---- Responsive header (mobile) ----------------------------------------- */
.resp { background: var(--pine); }
.respHead { text-align: center; padding: 14px 0; }
.respHead img { max-height: 26px; filter: brightness(0) invert(1); }
.smalldd { position: relative; background: var(--pine-deep); }
.smalldd ul.smallDropdown { position: absolute; z-index: 999; display: none; width: 100%; top: 100%; background: var(--pine-deep); box-shadow: var(--shadow-pop); }
.smalldd ul li { border-top: 1px solid rgba(255,255,255,.06); }
.smalldd ul li a { padding: 12px 20px; display: block; color: #E9EEEA; font-size: 13px; }
.smalldd ul li a:hover { background: rgba(255,255,255,.06); }
.goTo { display: block; padding: 12px 20px; color: #E9EEEA; cursor: pointer; font-size: 13px; }
.goTo img { filter: brightness(0) invert(1); opacity: .8; margin-right: 8px; }

/* ---- Page title area ----------------------------------------------------- */
.titleArea { background: var(--card); border-bottom: 1px solid var(--line); }
.titleArea .wrapper { padding: 26px 32px; display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.pageTitle { flex: 1 1 auto; min-width: 200px; }
.pageTitle h5 { display: inline-block; }
.pageTitle span { display: block; margin-top: 4px; font-size: 12px; color: var(--ink-soft); font-family: var(--font-mono); }
.middleNav { float: none; margin-top: 0; flex: 0 0 auto; }
.titlePhoto { flex: 0 0 auto; display: block; line-height: 0; }
.titlePhoto img {
	width: 125px;
	height: 125px;
	object-fit: cover;
	border-radius: var(--radius-m);
	border: 3px solid var(--card);
	box-shadow: var(--shadow-card);
	display: block;
}
.middleNav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
.middleNav li { display: inline-block; }
.middleNav a {
	display: flex; align-items: center; justify-content: center;
	width: 36px; height: 36px;
	background: var(--parchment);
	border: 1px solid var(--line);
	border-radius: var(--radius-s);
	transition: all .15s ease;
}
.middleNav a:hover { background: var(--marigold-tint); border-color: var(--marigold); }
.middleNav img { max-width: 16px; }

/* ---- Widgets / cards ------------------------------------------------------ */
.widget {
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--radius-m);
	margin-top: 28px;
	clear: both;
	box-shadow: var(--shadow-card);
	overflow: hidden;
}
.widget .title {
	height: auto;
	background: linear-gradient(180deg, #ffffff, var(--card));
	border-bottom: 1px solid var(--line);
	padding: 14px 18px;
	display: flex;
	align-items: center;
}
.widget .title .titleIcon { float: none; padding: 0; border: none; margin-right: 10px; }
.widget .title .titleIcon img { max-width: 15px; }
.widget .title h6 { float: none; padding: 0; font-family: var(--font-display); font-size: 15.5px; font-weight: 600; }
.widget .content { padding: 18px; }
.widget .body { padding: 16px 18px; }
.widget > p { padding: 16px 18px; }

/* ---- Buttons --------------------------------------------------------------- */
.button, button, input[type=submit], input[type=reset], input[type=button] {
	font-family: var(--font-body);
	font-size: 12.5px;
	font-weight: 600;
	background: var(--pine);
	background-image: none;
	color: #fff;
	text-transform: none;
	letter-spacing: .01em;
	white-space: nowrap;
	cursor: pointer;
	line-height: 1;
	display: inline-block;
	max-height: none;
	border: 1px solid var(--pine);
	border-radius: var(--radius-s);
	padding: 10px 18px;
	transition: transform .1s ease, box-shadow .15s ease, background-color .15s ease;
}
.button:hover, button:hover, input[type=submit]:hover, input[type=reset]:hover, input[type=button]:hover {
	background: var(--pine-deep); border-color: var(--pine-deep);
	box-shadow: 0 4px 10px rgba(47,74,66,.25);
}
.button:active, button:active, input[type=submit]:active { transform: translateY(1px); box-shadow: none; }

.redB, .dredB { background: var(--brick); border-color: var(--brick); }
.redB:hover, .dredB:hover { background: #8E4633; border-color: #8E4633; box-shadow: 0 4px 10px rgba(168,87,63,.3); }
.blueB { background: var(--pine); border-color: var(--pine); }
.greenB { background: var(--moss); border-color: var(--moss); }
input[type=button][value=Batal], input[type=button][onclick*="history.back"] {
	background: transparent; color: var(--ink-soft); border: 1px solid var(--line);
}
input[type=button][value=Batal]:hover { background: var(--parchment); box-shadow: none; }

.wNavButtons { display: inline-block; }
.formSubmit { display: block; float: right; margin: 18px 0 0 0; }

/* ---- Forms ------------------------------------------------------------------ */
.formRow { padding: 18px 20px; clear: both; border-bottom: 1px solid var(--line-soft); position: relative; }
.formRow:first-child { border-top: none; }
.formRow:last-child { border-bottom: none; }
.formRow > label {
	padding: 8px 0;
	display: block;
	float: left;
	width: 20%;
	font-weight: 600;
	font-size: 12.5px;
	color: var(--ink);
}
.formRow .formRight { display: block; float: right; width: 78%; }
.formRight label { float: left; margin-right: 20px; padding: 8px 0; cursor: pointer; font-size: 12.5px; color: var(--ink-soft); }
.req { float: right; margin-left: 5px; display: inline; color: var(--brick); font-weight: 600; }

.oneTwo { width: 48.5%; display: inline-block; float: right; vertical-align: top; }
.oneTwo:first-child { float: left; }
.oneThree { width: 31.9%; display: inline-block; float: left; margin-left: 2%; vertical-align: top; }
.oneThree:first-child { margin-left: 0; float: left; }

.form input[type=text], .form input[type=password], .form textarea, .form select,
input[type=text], input[type=password], textarea, select {
	font-family: var(--font-body);
	font-size: 13px;
	padding: 9px 11px;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: var(--radius-s);
	width: 100%;
	color: var(--ink);
	box-shadow: none;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.form input[type=text]:hover, .form input[type=password]:hover, .form textarea:hover, .form select:hover,
input[type=text]:hover, input[type=password]:hover, textarea:hover, select:hover {
	border-color: var(--ink-faint);
}
.form input[type=text]:focus, .form input[type=password]:focus, .form textarea:focus, .form select:focus,
input[type=text]:focus, input[type=password]:focus, textarea:focus, select:focus {
	outline: none;
	border-color: var(--marigold);
	box-shadow: 0 0 0 3px var(--marigold-tint);
}
.form textarea { min-height: 80px; resize: vertical; }
input[type=file] { font-size: 12.5px; }
input[type=checkbox], input[type=radio] { accent-color: var(--pine); margin-right: 6px; }

.list-saudara { background: var(--parchment); border: 1px solid var(--line-soft); border-radius: var(--radius-s); margin-top: 10px; padding: 4px 0; }
.induk-saudara .formRow { border-bottom: none; }

/* ---- Notices ------------------------------------------------------------------ */
.nNote {
	cursor: pointer;
	margin: 0 0 24px 0;
	border-radius: var(--radius-m);
	box-shadow: none;
	overflow: hidden;
	border: 1px solid transparent;
}
.nNote strong { margin-right: 5px; }
.nNote p { font-size: 13px; padding: 14px 18px; margin: 0; font-weight: 500; }
.nSuccess { background: var(--moss-tint); border-color: #BFD6C7; color: #29472F; }
.nFailure { background: var(--brick-tint); border-color: #E1C1B3; color: #6E2E1D; }

/* ---- Tables --------------------------------------------------------------------- */
.sTable, .dTable { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.sTable thead th, .dTable thead th {
	text-align: left;
	background: var(--parchment);
	color: var(--ink-soft);
	font-family: var(--font-body);
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .06em;
	padding: 12px 14px;
	border-bottom: 1px solid var(--line);
}
.sTable tbody td, .dTable tbody td {
	padding: 12px 14px;
	border-bottom: 1px solid var(--line-soft);
	color: var(--ink);
	vertical-align: middle;
}
.sTable tbody tr:hover td, .dTable tbody tr:hover td { background: var(--parchment); }
.sTable tbody tr:last-child td, .dTable tbody tr:last-child td { border-bottom: none; }
.sTable tfoot th { padding: 12px 14px; background: var(--parchment); border-top: 1px solid var(--line); font-family: var(--font-mono); }

/* DataTables chrome (auto-injected by the plugin) */
.dataTables_wrapper { padding: 4px 18px 18px 18px; }
.dataTables_length, .dataTables_filter, .dataTables_info { font-size: 12.5px; color: var(--ink-soft); padding: 10px 0; }
.dataTables_filter input[type=text] {
	display: inline-block; width: auto !important; margin-left: 6px;
	padding: 7px 10px !important; height: auto !important;
}
.dataTables_length select { padding: 6px 8px; width: auto; }
.dataTables_paginate { padding: 14px 0 4px 0; text-align: right; }
.paginate_button {
	position: relative;
	display: inline-block;
	padding: 7px 13px;
	margin-left: 4px;
	text-decoration: none;
	background-color: #fff;
	color: var(--ink-soft);
	border: 1px solid var(--line);
	border-radius: var(--radius-s);
	font-size: 12.5px;
	cursor: pointer;
}
.paginate_button:hover { background: var(--parchment); color: var(--ink); }
.paginate_button.current { background: var(--pine); border-color: var(--pine); color: #fff !important; }
.paginate_button.disabled { opacity: .4; cursor: default; }
.dataTables_processing { color: var(--ink-soft); font-size: 12.5px; }

/* ---- Progress bar syarat poin kelulusan --------------------------------------- */
.progressPoin {
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--radius-m);
	padding: 14px 18px;
	margin-top: 18px;
	box-shadow: var(--shadow-card);
}
.progressPoin-label {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	font-size: 12.5px;
	color: var(--ink-soft);
	margin-bottom: 8px;
}
.progressPoin-label span:first-child { font-weight: 600; color: var(--ink); }
.progressPoin-label span:last-child { font-family: var(--font-mono); }
.progressPoin-bar {
	height: 10px;
	background: var(--parchment);
	border-radius: 999px;
	overflow: hidden;
}
.progressPoin-fill {
	height: 100%;
	background: linear-gradient(90deg, var(--pine), var(--marigold));
	border-radius: 999px;
	transition: width .4s ease;
}
.progressPoin-done {
	margin-top: 10px;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--moss);
}

/* ---- Signature: Tingkat / activity-tier badges ----------------------------------
   Escalates visually with the real points weight of the activity, from a quiet
   outline (Lokal) to a solid marigold fill (Internasional). */
.badge {
	display: inline-block;
	font-family: var(--font-mono);
	font-size: 10.5px;
	font-weight: 500;
	letter-spacing: .03em;
	text-transform: uppercase;
	padding: 4px 9px;
	border-radius: 999px;
	border: 1px solid var(--line);
	color: var(--ink-soft);
	background: transparent;
	white-space: nowrap;
}
.badge-lokal, .badge-institusi { border-color: var(--line); color: var(--ink-soft); }
.badge-kota, .badge-kabupaten, .badge-wilayah { border-color: var(--moss); color: var(--moss); background: var(--moss-tint); }
.badge-provinsi { border-color: var(--pine); color: var(--pine); background: var(--pine-tint); }
.badge-nasional { border-color: var(--marigold-deep); color: var(--marigold-deep); background: var(--marigold-tint); font-weight: 600; }
.badge-internasional { border: 1px solid var(--marigold-deep); color: #fff; background: var(--marigold); font-weight: 700; box-shadow: 0 2px 6px rgba(201,154,62,.35); }

/* ---- Login page ------------------------------------------------------------------- */
body.loginPage {
	background: radial-gradient(circle at top, var(--pine) 0%, var(--pine-deep) 62%);
	min-height: 100vh;
}
.loginPage .topNav { background: transparent; border: none; }
.loginPage input[type=text], .loginPage input[type=password] { width: 100% !important; }
.loginWrapper {
	margin: 0; position: absolute; top: 50%; left: 50%;
	transform: translate(-50%, -50%);
	width: 360px;
}
.loginWrapper .widget {
	width: 100%;
	background: var(--card);
	border: none;
	display: block;
	height: auto;
	box-shadow: var(--shadow-pop);
}
.loginLogo {
	position: static; width: auto; height: auto; margin: 0 0 28px 0;
	text-align: center;
}
.loginLogo img { max-height: 46px; filter: brightness(0) invert(1); }
.loginWrapper .title { display: none; }
.loginWrapper .formRow { padding: 22px 26px 6px 26px; border: none; }
.loginWrapper .formRow > label { width: 100%; float: none; padding-bottom: 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); }
.loginControl { border-top: 1px solid var(--line); padding: 18px 26px 24px 26px; display: flex; align-items: center; justify-content: space-between; }
.logMeIn { float: none; padding: 11px 26px !important; }
.loginInput { width: 100%; float: none; margin: 0 !important; }
.rememberMe { float: none; margin: 0; font-size: 12.5px; color: var(--ink-soft); display: flex; align-items: center; }
.rememberMe label { width: auto; display: inline; white-space: nowrap; margin: 0 0 0 6px; float: none; cursor: pointer; }

/* ---- Footer -------------------------------------------------------------------------- */
#footer { padding: 24px 0; text-align: center; font-size: 11.5px; color: var(--ink-faint); font-family: var(--font-mono); }
.loginPage #footer { color: rgba(255,255,255,.5); }

/* ---- Print pages: keep them plain/formal, untouched by the app chrome -------------- */
@media print {
	#leftSide, .topNav, .middleNav, #footer, input[type=submit] { display: none !important; }
}

/* ---- Utility text colours (kept for any leftover inline usage) --------------------- */
.textL { text-align: left; } .textR { text-align: right; } .textC { text-align: center; }
.red { color: var(--brick); } .green { color: var(--moss); } .lGrey { color: var(--ink-faint); }
.blue { color: var(--pine); } .orange { color: var(--marigold-deep); }
.floatR { float: right; } .floatL { float: left; }

/* ---- Responsive ------------------------------------------------------------------------ */
@media (max-width: 980px) {
	#leftSide { display: none; }
	#rightSide { margin-left: 0; }
	.resp { display: block; }
	.formRow > label { width: 100%; float: none; padding-bottom: 8px; }
	.formRow .formRight { width: 100%; float: none; }
	.oneTwo, .oneThree { width: 100%; float: none; margin-left: 0; margin-bottom: 12px; }
	.middleNav { margin-top: 4px; }
	.titlePhoto img { height: 70px !important; width: auto; }
	.titleArea .wrapper { padding: 20px; }
	.wrapper { margin: 0 16px; }
}
@media (min-width: 981px) {
	.resp { display: none !important; }
}
