/* JSCH – admin console */
:root {
  --orange: #F26522; --orange-deep: #E8590C; --navy: #0B2545; --navy-2: #13315C; --ink: #0B2545; --ink-2: #3B4A5F; --muted: #6B7686;
  --line: #E3E7EC; --bg: #F3F5F8; --card: #fff; --green: #1FA34A; --red: #F1495B; --amber: #F5A445; --blue: #1857C4;
  --font-head: "Poppins", "Segoe UI", sans-serif; --font-body: "Inter", "Segoe UI", sans-serif; --side-w: 250px;
  --shadow: 0 8px 24px -12px rgba(11, 37, 69, .18);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: var(--font-body); font-size: 14.5px; color: var(--ink); background: var(--bg); line-height: 1.55; }
a { color: var(--orange-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--font-head); margin: 0 0 .5em; line-height: 1.2; }
.ico { width: 1.2em; height: 1.2em; vertical-align: -.25em; flex: none; }
img { max-width: 100%; }

/* Shell */
.admin-shell { display: flex; min-height: 100vh; }
.admin-side { width: var(--side-w); background: var(--navy); color: rgba(255, 255, 255, .8); display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; z-index: 50; transition: transform .25s; }
.admin-brand { display: flex; align-items: center; gap: 12px; padding: 20px 20px 16px; color: #fff; text-decoration: none !important; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.admin-brand span { display: flex; flex-direction: column; font-size: .8rem; line-height: 1.2; opacity: .8; }
.admin-brand strong { font-family: var(--font-head); font-size: 1.05rem; opacity: 1; }
.admin-nav { display: flex; flex-direction: column; padding: 14px 12px; gap: 2px; flex: 1; }
.admin-nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px; color: rgba(255, 255, 255, .78); font-weight: 500; text-decoration: none !important; transition: background .2s, color .2s; }
.admin-nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.admin-nav a.is-active { background: var(--orange); color: #fff; }
.admin-nav__sep { height: 1px; background: rgba(255, 255, 255, .1); margin: 12px 0; }
.admin-side__foot { padding: 16px 20px; font-size: .8rem; border-top: 1px solid rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .6); }
.admin-side__foot strong { color: #fff; }
.admin-main { margin-left: var(--side-w); flex: 1; min-width: 0; display: flex; flex-direction: column; }
.admin-top { display: flex; align-items: center; gap: 16px; padding: 18px 28px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.admin-title { font-size: 1.25rem; margin: 0; flex: 1; }
.admin-top__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.admin-menu { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; width: 40px; height: 40px; cursor: pointer; color: var(--ink); }
.admin-content { padding: 28px; }
@media (max-width: 900px) {
  .admin-side { transform: translateX(-100%); }
  .admin-side.is-open { transform: none; box-shadow: 0 0 0 100vw rgba(0, 0, 0, .4); }
  .admin-main { margin-left: 0; }
  .admin-menu { display: inline-grid; place-items: center; }
  .admin-content { padding: 18px; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-weight: 600; padding: 9px 16px; border-radius: 9px; border: 1px solid transparent; cursor: pointer; text-decoration: none !important; line-height: 1.2; transition: background .2s, transform .15s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-deep); }
.btn-outline { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-outline:hover { border-color: var(--ink); }
.btn-dark { background: var(--navy); color: #fff; }
.btn-sm { padding: 6px 11px; font-size: .82rem; }
.btn-danger { background: #fff; color: var(--red); border-color: #fecdd3; }

/* Cards & stats */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 22px; box-shadow: var(--shadow); }
.card h2 { font-size: 1rem; color: var(--ink-2); margin-bottom: 14px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; box-shadow: var(--shadow); border-left: 4px solid var(--accent, var(--orange)); }
.stat__num { font-family: var(--font-head); font-size: 1.9rem; font-weight: 700; line-height: 1; color: var(--navy); }
.stat__label { color: var(--muted); font-size: .82rem; margin-top: 6px; }
.dash-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; margin-bottom: 18px; }
@media (max-width: 1100px) { .dash-grid { grid-template-columns: 1fr; } }
.chart-box { position: relative; height: 280px; }

/* Tables */
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
table.grid { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.grid th, table.grid td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
table.grid th { font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: #fafbfc; white-space: nowrap; }
table.grid th a { color: var(--ink); }
table.grid th a.sorted::after { content: " ▲"; font-size: .7em; }
table.grid th a.sorted.desc::after { content: " ▼"; }
table.grid tbody tr:hover { background: #fff8f4; }
table.grid td .sub { display: block; color: var(--muted); font-size: .8rem; }
table.grid td.nowrap, .nowrap { white-space: nowrap; }
.cat-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.empty { padding: 40px; text-align: center; color: var(--muted); }

.badge-status { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .74rem; font-weight: 600; white-space: nowrap; }
.badge-submitted { background: #e0ecff; color: #1d4ed8; }
.badge-shortlisted { background: #fef3c7; color: #b45309; }
.badge-winner { background: #dcfce7; color: #15803d; }
.badge-rejected { background: #fee2e2; color: #b91c1c; }

/* Filters / forms */
.filters { display: grid; grid-template-columns: 2fr 1.4fr 1fr 1fr 1fr auto; gap: 10px; align-items: end; margin-bottom: 16px; }
@media (max-width: 1100px) { .filters { grid-template-columns: 1fr 1fr; } }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: .78rem; font-weight: 600; color: var(--muted); }
.field input, .field select, .field textarea { font: inherit; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); width: 100%; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(242, 101, 34, .15); }
.field textarea { min-height: 110px; resize: vertical; }
.field-error { color: var(--red); font-size: .8rem; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 4px 0; font-size: .85rem; color: var(--muted); flex-wrap: wrap; }
.pager .pages { display: flex; gap: 4px; }
.pager .pages a, .pager .pages span { display: inline-block; min-width: 34px; text-align: center; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); }
.pager .pages span.cur { background: var(--navy); color: #fff; border-color: var(--navy); }
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: .9rem; }
.alert-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error { background: #fff1f2; color: #9f1239; border: 1px solid #fecdd3; }
.alert-info { background: #eff6ff; color: #1e3a8a; border: 1px solid #bfdbfe; }

/* Detail page */
.detail-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 1000px) { .detail-grid { grid-template-columns: 1fr; } }
.kv { display: grid; grid-template-columns: 180px 1fr; gap: 8px 16px; font-size: .92rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
@media (max-width: 600px) { .kv { grid-template-columns: 1fr; gap: 2px 0; } .kv dt { margin-top: 8px; } }
.summary-box { background: var(--bg); border-radius: 10px; padding: 14px 16px; white-space: pre-wrap; font-size: .92rem; }
.history { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: .86rem; }
.history li { border-left: 3px solid var(--line); padding-left: 12px; }
.history li time { display: block; color: var(--muted); font-size: .78rem; }
.member-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.member-list li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.member-list .avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .85rem; flex: none; }
.member-list .lead .avatar { background: var(--orange); }
.member-list small { color: var(--muted); display: block; }

/* Login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; background: var(--navy) url("../Images/bahu-fort-tawi.jpg") center / cover; position: relative; padding: 20px; }
.login-wrap::before { content: ""; position: absolute; inset: 0; background: rgba(11, 37, 69, .88); }
.login-card { position: relative; width: 100%; max-width: 400px; background: #fff; border-radius: 18px; padding: 32px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .6); }
.login-card img { width: 120px; margin: 0 auto 8px; display: block; }
.login-card h1 { font-size: 1.3rem; text-align: center; }
.login-card p.sub { text-align: center; color: var(--muted); margin: 0 0 22px; font-size: .9rem; }
.login-card .field { margin-bottom: 14px; }
.login-card .btn { width: 100%; justify-content: center; padding: 12px; font-size: 1rem; margin-top: 6px; }
.login-card .back { display: block; text-align: center; margin-top: 18px; font-size: .85rem; color: var(--muted); }
.muted { color: var(--muted); }
.mt-2 { margin-top: 12px; } .mt-3 { margin-top: 20px; } .mb-2 { margin-bottom: 12px; }
.flex { display: flex; } .gap-2 { gap: 10px; } .items-center { align-items: center; } .wrap { flex-wrap: wrap; } .justify-between { justify-content: space-between; }
