/* JDIH Poltesa — Panel Admin */
:root {
  --navy: #0b2a4a; --navy-2: #123d69; --navy-3: #1d5a94; --accent: #f5b301;
  --bg: #f3f5f8; --surface: #fff; --text: #0f172a; --muted: #5b6778; --line: #e4e8ef;
  --green: #0f8a4b; --green-bg: #e3f6ea; --red: #c42b2b; --red-bg: #fde8e8; --amber: #a15c00; --amber-bg: #fff2d6; --gray: #4b5563; --gray-bg: #eef0f3;
  --radius: 14px; --shadow: 0 8px 24px -14px rgba(11,42,74,.25);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--navy-3); text-decoration: none; }
a:hover { color: var(--navy); }
h1, h2 { margin: 0; letter-spacing: -.015em; }
img { max-width: 100%; display: block; }
code { background: var(--gray-bg); padding: .1rem .35rem; border-radius: 5px; font-size: .85em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.icon { width: 18px; height: 18px; flex: none; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.block { display: block; }
.nowrap { white-space: nowrap; }
.mt { margin-top: 1.4rem; }
.mb { margin-bottom: .8rem; }

/* Layout */
.layout { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.sidebar { background: var(--navy); color: #c9d6e6; padding: 18px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side-brand { display: flex; align-items: center; gap: .7rem; color: #fff; padding: 6px 8px 18px; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 8px; }
.side-brand span { display: flex; flex-direction: column; line-height: 1.15; }
.side-brand strong { font-size: 1.05rem; }
.side-brand small { font-size: .72rem; color: #9fb3cb; }
.side-group { font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #7f96b3; margin: 16px 10px 6px; }
.sidebar nav a { display: flex; align-items: center; gap: .7rem; color: #c9d6e6; padding: .6rem .75rem; border-radius: 10px; font-weight: 600; font-size: .9rem; }
.sidebar nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar nav a.active { background: rgba(245,179,1,.14); color: var(--accent); }
.sidebar nav a span { flex: 1; }
.sidebar nav a em { font-style: normal; background: var(--accent); color: #1a1300; font-size: .7rem; font-weight: 800; border-radius: 99px; padding: .05rem .5rem; }
.main { display: flex; flex-direction: column; min-width: 0; }
.topbar { display: flex; align-items: center; gap: 1rem; padding: 14px 28px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar h1 { font-size: 1.25rem; font-weight: 800; flex: 1; }
.topbar-right { display: flex; align-items: center; gap: .8rem; }
.side-toggle { display: none; background: var(--bg); border: 0; width: 40px; height: 40px; border-radius: 10px; cursor: pointer; align-items: center; justify-content: center; }
.user-menu { position: relative; }
.user-menu summary { list-style: none; display: flex; align-items: center; gap: .6rem; cursor: pointer; padding: 4px 8px; border-radius: 10px; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary:hover { background: var(--bg); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--navy); color: var(--accent); display: grid; place-items: center; font-weight: 800; }
.user-name { display: flex; flex-direction: column; line-height: 1.15; font-weight: 700; font-size: .88rem; }
.user-name small { color: var(--muted); font-weight: 600; font-size: .75rem; }
.user-drop { position: absolute; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); min-width: 210px; padding: 6px; display: grid; }
.user-drop a, .user-drop button { text-align: left; background: none; border: 0; padding: .6rem .8rem; border-radius: 8px; color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.user-drop a:hover, .user-drop button:hover { background: var(--bg); }
.user-drop button { color: var(--red); width: 100%; }
.content { padding: 24px 28px 48px; flex: 1; }
.admin-foot { padding: 16px 28px; font-size: .8rem; color: var(--muted); border-top: 1px solid var(--line); }

/* Buttons & badges */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; font: inherit; font-weight: 700; font-size: .88rem; padding: .62rem 1.1rem; border-radius: 10px; border: 1px solid transparent; cursor: pointer; white-space: nowrap; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-2); color: #fff; }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--text); }
.btn-ghost:hover { background: var(--bg); color: var(--navy); }
.btn-danger { background: var(--red-bg); color: var(--red); }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-success { background: var(--green-bg); color: var(--green); }
.btn-muted { background: var(--gray-bg); color: var(--gray); }
.btn-sm { padding: .45rem .8rem; font-size: .82rem; }
.btn-xs { padding: .3rem .6rem; font-size: .76rem; border-radius: 8px; }
.btn-block { width: 100%; }
.badge { display: inline-flex; align-items: center; font-size: .72rem; font-weight: 700; padding: .2rem .55rem; border-radius: 6px; white-space: nowrap; }
.badge-navy { background: #e6eef8; color: var(--navy-2); }
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-red { background: var(--red-bg); color: var(--red); }
.badge-amber { background: var(--amber-bg); color: var(--amber); }
.badge-gray { background: var(--gray-bg); color: var(--gray); }
.badge-accent { background: rgba(245,179,1,.2); color: #7a5600; }
.inline-form { display: inline; margin: 0; }

.alert { padding: .8rem 1rem; border-radius: 10px; margin-bottom: 1rem; font-weight: 600; border: 1px solid transparent; }
.alert-success { background: var(--green-bg); color: #0a5c33; border-color: #bfe8cf; }
.alert-error { background: var(--red-bg); color: #8a1c1c; border-color: #f6c5c5; }
.alert-warning { background: var(--amber-bg); color: #7a4600; border-color: #f4dca4; }

/* Dashboard */
.welcome { margin: 0 0 18px; color: var(--muted); }
.stat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-bottom: 20px; }
.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: .2rem; color: var(--text); }
a.stat-card:hover { border-color: var(--navy-3); color: var(--text); }
.stat-ic { width: 36px; height: 36px; border-radius: 10px; background: #eef3f9; color: var(--navy-3); display: grid; place-items: center; margin-bottom: .4rem; }
.stat-card strong { font-size: 1.6rem; font-weight: 800; line-height: 1.1; }
.stat-card span:last-child { color: var(--muted); font-size: .8rem; font-weight: 600; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.grid-side { display: grid; grid-template-columns: 380px 1fr; gap: 20px; align-items: start; }
.box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.box-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 1rem; }
.box-head h2, .box-title { font-size: 1rem; font-weight: 800; margin-bottom: 14px; }
.box-head h2 { margin: 0; }
.bars { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.bars li { display: grid; grid-template-columns: 150px 1fr 40px; gap: .8rem; align-items: center; font-size: .82rem; font-weight: 600; }
.bars b { text-align: right; }
progress { width: 100%; height: 10px; appearance: none; border: 0; border-radius: 99px; background: var(--bg); overflow: hidden; }
progress::-webkit-progress-bar { background: var(--bg); border-radius: 99px; }
progress::-webkit-progress-value { background: var(--navy-3); border-radius: 99px; }
progress::-moz-progress-bar { background: var(--navy-3); border-radius: 99px; }
.feed-item { padding: .8rem 0; border-bottom: 1px solid var(--line); font-size: .88rem; }
.feed-item:last-child { border-bottom: 0; }
.feed-item p { margin: .3rem 0; color: #334155; }
.big-num { font-size: 2.6rem; font-weight: 800; color: var(--navy); margin: 0 0 1rem; }
.big-num small { font-size: .9rem; color: var(--muted); font-weight: 600; }
.stars-text { color: var(--accent); letter-spacing: 2px; }

/* Tables */
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar p { margin: 0; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filters input, .filters select { width: auto; min-width: 150px; padding: .5rem .75rem; }
.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.table th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 800; padding: .8rem 1rem; background: #f9fafc; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: .8rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafbfd; }
.box .table td { padding-left: 0; }
.table .wide { min-width: 260px; }
.table .num { text-align: right; white-space: nowrap; }
.table .actions { white-space: nowrap; text-align: right; }
.table .actions > * { margin-left: 4px; }
.table .empty, .empty { text-align: center; color: var(--muted); padding: 2rem; }
.table-compact td { padding: .5rem .8rem; font-size: .82rem; }
.pagination { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; margin-top: 18px; }
.page { min-width: 36px; height: 36px; padding: 0 .6rem; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-weight: 600; font-size: .85rem; }
.page.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.page.disabled, .page.dots { color: #b3bbc7; border-color: transparent; background: none; }
.tabs { display: flex; gap: 6px; margin-bottom: 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tabs a { padding: .6rem 1rem; font-weight: 700; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.active { color: var(--navy); border-color: var(--accent); }

/* Cards (tanggapan/pesan) */
.cards { display: grid; gap: 12px; }
.tanggapan header { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; margin-bottom: .3rem; }
.tanggapan.unread { border-left: 4px solid var(--accent); }
.quote { background: var(--bg); border-radius: 10px; padding: .8rem 1rem; margin: .6rem 0; color: #1f2937; }
.quote p { margin: 0 0 .5rem; }
.quote p:last-child { margin: 0; }
.tanggapan footer { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }

/* Forms */
input, select, textarea { width: 100%; font: inherit; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: .6rem .8rem; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--navy-3); box-shadow: 0 0 0 4px rgba(29,90,148,.12); }
input[disabled] { background: var(--bg); color: var(--muted); }
input[type=file] { padding: .5rem; background: var(--bg); }
input[type=checkbox] { width: 17px; height: 17px; }
textarea { resize: vertical; }
.form-group { display: grid; gap: .35rem; margin-bottom: 14px; }
.form-group label { font-weight: 700; font-size: .84rem; }
.req { color: var(--red); }
.error { color: var(--red); font-weight: 600; font-size: .82rem; }
.check { display: inline-flex; gap: .5rem; align-items: center; font-size: .88rem; font-weight: 600; }
.fg-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.fg-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.span-2 { grid-column: 1 / -1; }
.form-narrow { max-width: 900px; }
.form-actions { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.form-grid > .form-actions { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 20px; position: sticky; bottom: 12px; box-shadow: var(--shadow); }
.form-actions > div { display: flex; gap: 8px; }
.back { display: inline-block; font-weight: 700; font-size: .88rem; margin-bottom: 14px; color: var(--muted); }
.file-current { display: flex; align-items: center; gap: .4rem; background: var(--bg); padding: .6rem .8rem; border-radius: 10px; margin: 0 0 .5rem; font-weight: 600; }
.rel-rows { display: grid; gap: 8px; margin-bottom: 8px; }
.rel-row { display: grid; grid-template-columns: 140px 1fr; gap: 8px; }
.thumb { max-height: 140px; width: auto; border-radius: 10px; border: 1px solid var(--line); }
.thumb-round { width: 96px; height: 96px; object-fit: cover; border-radius: 50%; }
.role-help { background: var(--bg); border-radius: 10px; padding: .8rem 1rem; font-size: .84rem; margin-bottom: 14px; }
.role-help p { margin: .2rem 0; }
.logview { background: #0f172a; color: #cbd5e1; padding: 16px; border-radius: 12px; font-size: .78rem; max-height: 560px; overflow: auto; white-space: pre-wrap; word-break: break-all; }
.link { font-weight: 700; font-size: .85rem; }

/* Login */
.login-body { background: linear-gradient(135deg, #07203a, var(--navy) 60%, #0e3560); min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-wrap { display: grid; grid-template-columns: 1fr 1fr; width: min(920px, 100%); background: var(--surface); border-radius: 24px; overflow: hidden; box-shadow: 0 30px 80px -30px rgba(0,0,0,.6); }
.login-art { background: radial-gradient(ellipse at 80% 0%, rgba(245,179,1,.3), transparent 55%), var(--navy); color: #fff; padding: 48px 40px; display: flex; flex-direction: column; justify-content: flex-end; gap: .8rem; }
.login-art h2 { font-size: 1.8rem; line-height: 1.2; }
.login-art p { color: #b7c4d6; margin: 0; }
.login-card { padding: 48px 40px; }
.login-card h1 { font-size: 1.7rem; font-weight: 800; }
.login-card .muted { margin: .3rem 0 1.4rem; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 4.5rem; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: var(--bg); border: 0; border-radius: 8px; padding: .35rem .6rem; font: inherit; font-size: .78rem; font-weight: 700; cursor: pointer; }
.back-link { display: inline-block; margin-top: 1.2rem; font-size: .85rem; font-weight: 600; color: var(--muted); }

@media (max-width: 1200px) { .stat-grid { grid-template-columns: repeat(3, 1fr); } .grid-side { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 40; width: 270px; transform: translateX(-100%); transition: transform .25s; }
  .sidebar.open { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.4); }
  .side-toggle { display: inline-flex; }
  .grid-2, .form-grid, .fg-3 { grid-template-columns: 1fr; }
  .user-name, .topbar-right > .btn { display: none; }
  .content, .topbar { padding-left: 16px; padding-right: 16px; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-art { display: none; }
}
@media (max-width: 560px) { .stat-grid, .fg-2 { grid-template-columns: 1fr 1fr; } .fg-2 { grid-template-columns: 1fr; } .rel-row { grid-template-columns: 1fr; } .bars li { grid-template-columns: 90px 1fr 32px; } }
