/* Portal Sekolah v203 — daftar eskul ringkas dan form popup responsif. */
#content:has(.eskul-v203-admin) { width: 100%; max-width: none; }
.eskul-v203-admin { --ev-green:#07966e; --ev-dark:#08745d; --ev-line:#dfe9e5; display:grid; width:100%; gap:16px; color:#1d2939; }
.eskul-v203-admin * { box-sizing:border-box; }
.eskul-v203-stats { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.eskul-v203-stats article { display:flex; align-items:center; justify-content:space-between; min-height:74px; padding:15px 18px; border:1px solid var(--ev-line); border-radius:17px; background:#fff; }
.eskul-v203-stats span { color:#697a73; font-size:11px; font-weight:800; }
.eskul-v203-stats b { color:var(--ev-dark); font-size:27px; }
.eskul-v203-tabs { display:flex; width:max-content; max-width:100%; gap:4px; overflow-x:auto; padding:4px; border-radius:13px; background:#eaf5f1; scrollbar-width:none; }
.eskul-v203-tabs::-webkit-scrollbar { display:none; }
.eskul-v203-tabs button { border:0; border-radius:9px; padding:10px 15px; background:transparent; color:#61716b; font-weight:800; white-space:nowrap; }
.eskul-v203-tabs button.active { background:#fff; color:var(--ev-dark); box-shadow:0 3px 10px rgba(8,116,93,.09); }
.eskul-v203-tabs span { margin-left:4px; color:var(--ev-green); }
#content .eskul-v203-panel { display:grid; width:100%; max-width:none; gap:16px; margin:0; padding:20px; border:0; border-radius:20px; background:#fff; box-shadow:0 10px 32px rgba(30,63,53,.06); }
.eskul-v203-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }
.eskul-v203-heading h2 { margin:0; font-size:20px; }
.eskul-v203-heading p { margin:5px 0 0; color:#718078; font-size:11px; }
.eskul-v203-heading button { flex:0 0 auto; min-height:42px; border-radius:12px; padding-inline:16px; }
.eskul-v205-heading-actions { display:flex; flex:0 0 auto; flex-wrap:wrap; justify-content:flex-end; gap:8px; }
.eskul-v205-danger-button { border:1px solid #fecaca; background:#fff1f2; color:#b4232d; font-weight:850; cursor:pointer; }
.eskul-v205-danger-button:hover { border-color:#fca5a5; background:#ffe4e6; }
.eskul-v205-danger-button:disabled { opacity:.45; cursor:not-allowed; }
.eskul-v203-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(165px,1fr)); gap:10px; }
.eskul-v203-card { position:relative; min-width:0; min-height:86px; border:1px solid var(--ev-line); border-radius:16px; background:#fbfdfc; transition:transform 150ms ease,border-color 150ms ease,box-shadow 150ms ease; }
.eskul-v203-card:hover { transform:translateY(-1px); border-color:#a9dccc; box-shadow:0 8px 22px rgba(8,116,93,.08); }
.eskul-v203-card-main { display:grid; width:100%; min-height:84px; align-content:center; gap:4px; padding:14px 38px 14px 15px; border:0; background:transparent; color:inherit; text-align:left; cursor:pointer; }
.eskul-v203-card-main b { overflow:hidden; color:#18372e; font-size:14px; line-height:1.3; text-overflow:ellipsis; white-space:nowrap; }
.eskul-v203-card-main > span:last-child { overflow:hidden; color:#74827c; font-size:11px; font-weight:700; text-overflow:ellipsis; white-space:nowrap; }
.eskul-v203-state-dot { position:absolute; top:12px; right:13px; width:7px; height:7px; border-radius:50%; }
.eskul-v203-state-dot.open { background:#10b981; box-shadow:0 0 0 3px rgba(16,185,129,.12); }
.eskul-v203-state-dot.closed { background:#a9b3af; box-shadow:0 0 0 3px rgba(120,135,128,.1); }
.eskul-v203-more { position:absolute; right:7px; bottom:6px; display:grid; place-items:center; width:31px; height:27px; padding:0; border:0; border-radius:9px; background:transparent; color:#708078; font-size:13px; letter-spacing:1px; cursor:pointer; }
.eskul-v203-more:hover,.eskul-v203-more[aria-expanded="true"] { background:#eaf5f1; color:var(--ev-dark); }
.eskul-v203-menu { position:absolute; z-index:8; right:7px; top:calc(100% - 7px); display:grid; width:165px; padding:5px; border:1px solid #e2e9e6; border-radius:13px; background:rgba(255,255,255,.98); box-shadow:0 15px 38px rgba(21,45,37,.17); }
.eskul-v203-menu[hidden] { display:none; }
.eskul-v203-menu button { width:100%; padding:9px 10px; border:0; border-radius:8px; background:transparent; color:#405049; font-size:10px; font-weight:800; text-align:left; cursor:pointer; }
.eskul-v203-menu button:hover { background:#f0f8f5; color:var(--ev-dark); }
.eskul-v203-menu button.danger { color:#bf3c43; }
.eskul-v203-menu button.danger:hover { background:#fff1f1; }
.eskul-v203-empty { display:grid; min-height:132px; place-content:center; gap:5px; padding:22px; border:1px dashed #cbded7; border-radius:16px; color:#718078; text-align:center; }
.eskul-v203-empty b { color:#34483f; font-size:13px; }
.eskul-v203-empty span { font-size:10px; }

.eskul-v203-form-shell { width:min(880px,100%); margin:auto; color:#1d2939; }
#modal .modal-card:has(.eskul-v203-form-shell) { width:min(940px,calc(100vw - 32px)) !important; max-height:calc(100dvh - 32px) !important; }
.eskul-v203-form-head { padding:0 4px 15px; border-bottom:1px solid #edf1ef; }
.eskul-v203-form-head span { color:#07966e; font-size:9px; font-weight:900; letter-spacing:.15em; }
.eskul-v203-form-head h2 { margin:4px 0 3px; font-size:22px; }
.eskul-v203-form-head p { margin:0; color:#718078; font-size:11px; }
.eskul-v203-form { display:grid; gap:15px; padding-top:16px; }
.eskul-v203-form-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:11px; }
.eskul-v203-form-grid label { min-width:0; color:#53635c; font-size:10px; font-weight:800; }
.eskul-v203-form-grid label.wide { grid-column:span 2; }
.eskul-v203-form-grid label small { color:#87948e; font-size:8px; font-weight:650; }
.eskul-v203-form-grid input,.eskul-v203-form-grid select { display:block; width:100%; min-height:43px; margin-top:6px; padding:0 11px; border:1px solid #dce6e2; border-radius:12px; outline:0; background:#f9fbfa; color:#24332d; }
.eskul-v203-class-area { min-width:0; margin:0; padding:12px; border:0; border-radius:14px; background:#f1f8f5; }
.eskul-v203-class-area legend { padding:0 2px; color:#53635c; font-size:10px; font-weight:900; }
.eskul-v203-class-area > div { display:flex; gap:7px; overflow-x:auto; padding:2px 0; scrollbar-width:thin; }
.eskul-v203-class-chip { flex:0 0 auto; cursor:pointer; }
.eskul-v203-class-chip input { position:absolute; opacity:0; pointer-events:none; }
.eskul-v203-class-chip span { display:block; padding:8px 11px; border:1px solid #d6e4df; border-radius:999px; background:#fff; color:#62716a; font-size:9px; font-weight:800; }
.eskul-v203-class-chip input:checked + span { border-color:#62c8a7; background:#dff7ee; color:#08745d; }
.eskul-v203-no-class { color:#8a9691; font-size:10px; }
.eskul-v203-form-error { padding:10px 12px; border-radius:11px; background:#fff0ef; color:#a92920; font-size:10px; font-weight:700; }
.eskul-v203-form-error[hidden] { display:none; }
.eskul-v203-form-actions { position:sticky; bottom:-1px; display:flex; justify-content:flex-end; gap:8px; padding:12px 0 0; background:linear-gradient(to bottom,rgba(255,255,255,0),#fff 18px); }
.eskul-v203-form-actions button { min-height:42px; border-radius:12px; padding:0 16px; font-size:10px; font-weight:900; }
.eskul-v203-form-actions button:disabled { opacity:.62; cursor:wait; }

.eskul-v203-table-wrap { width:100%; overflow:auto; }
.eskul-v203-table-wrap table { width:100%; min-width:760px; border-collapse:collapse; }
.eskul-v203-table-wrap th,.eskul-v203-table-wrap td { padding:11px; border-bottom:1px solid #e8eeeb; color:#44534d; font-size:10px; text-align:left; }
.eskul-v203-table-wrap th { color:#74817b; font-size:9px; text-transform:uppercase; letter-spacing:.05em; }
.eskul-v203-table-wrap td b,.eskul-v203-table-wrap td small { display:block; }
.eskul-v203-table-wrap td small { margin-top:3px; color:#849089; font-size:8px; }
.eskul-v203-status { display:inline-flex; padding:6px 9px; border-radius:999px; background:#eef3f1; font-size:8px; font-weight:900; }
.eskul-v203-status.submitted { background:#fff2cc; color:#805b00; }
.eskul-v203-status.approved { background:#dcfce7; color:#08745d; }
.eskul-v203-status.rejected,.eskul-v203-status.cancelled { background:#ffe5e5; color:#b32f35; }
.eskul-v203-decisions { display:flex; gap:5px; }
.eskul-v203-decisions button { border:0; border-radius:8px; padding:7px 9px; font-size:8px; font-weight:900; }
.eskul-v203-decisions .accept { background:#dcfce7; color:#08745d; }
.eskul-v203-decisions .reject { background:#ffe7e7; color:#b32f35; }

@media (max-width:900px) {
  .eskul-v203-form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:640px) {
  #modal .modal-card:has(.eskul-v203-form-shell) { width:100% !important; max-height:92dvh !important; }
  .eskul-v203-admin { gap:12px; }
  .eskul-v203-stats { grid-template-columns:repeat(3,minmax(95px,1fr)); gap:8px; overflow-x:auto; }
  .eskul-v203-stats article { min-height:68px; padding:12px; }
  .eskul-v203-stats span { font-size:9px; }
  .eskul-v203-stats b { font-size:22px; }
  #content .eskul-v203-panel { padding:15px; border-radius:17px; }
  .eskul-v203-heading { align-items:stretch; flex-direction:column; }
  .eskul-v203-heading h2 { font-size:17px; }
  .eskul-v203-heading p { display:none; }
  .eskul-v203-heading button { min-height:38px; padding-inline:12px; font-size:10px; }
  .eskul-v205-heading-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); width:100%; }
  .eskul-v205-heading-actions button { width:100%; }
  .eskul-v203-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .eskul-v203-card,.eskul-v203-card-main { min-height:78px; }
  .eskul-v203-card-main { padding:12px 34px 12px 12px; }
  .eskul-v203-card-main b { font-size:12px; }
  .eskul-v203-card-main > span:last-child { font-size:9px; }
  .eskul-v203-menu { position:fixed; z-index:2147483647; left:12px; right:12px; top:auto; bottom:calc(12px + env(safe-area-inset-bottom)); width:auto; padding:7px; border-radius:16px; }
  .eskul-v203-menu button { padding:12px; font-size:11px; text-align:center; }
  .eskul-v203-form-head h2 { font-size:19px; }
  .eskul-v203-form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .eskul-v203-form-grid label.wide { grid-column:1/-1; }
  .eskul-v203-form-actions { display:grid; grid-template-columns:1.2fr .8fr; padding-bottom:env(safe-area-inset-bottom); }
  .eskul-v203-form-actions button { width:100%; padding-inline:8px; }
}
@media (max-width:360px) {
  .eskul-v203-grid { grid-template-columns:1fr; }
  .eskul-v203-form-grid { grid-template-columns:1fr; }
  .eskul-v203-form-grid label.wide { grid-column:auto; }
}
@media (prefers-reduced-motion:reduce) { .eskul-v203-card { transition:none; } }
