/* Tampilan layar portal Kun Anta. Dokumen cetak memakai tata letak masing-masing. */
@media screen {
  :root {
    --ui-bg: #f4f6f1;
    --ui-border: #dce4da;
    --ui-primary: #196648;
    --ui-primary-dark: #104932;
    --ui-primary-soft: #eaf4eb;
    --ui-text: #1a3029;
    --ui-muted: #51675e;
    --ui-surface-soft: #f1f5ef;
    --ui-radius: 14px;
    --ui-shadow: 0 2px 7px rgba(27,57,41,.055);
  }
  .app-shell .content-wrapper { background: var(--ui-bg); }
  .app-shell .navbar-brand-wrapper .brand-logo img { max-width: 160px !important; width: 100% !important; height: auto !important; }
  .menu-finder { margin: 12px 12px 6px; }
  .menu-finder input { width: 100%; min-height: 42px; border: 1px solid #c7d7ca; border-radius: 9px; padding: 8px 12px; color: #173f30; background: #f7faf5; font: inherit; }
  .menu-matches { margin: 0 12px; }
  .menu-matches a, .menu-matches p { display: block; padding: 10px; color: #23503c; overflow-wrap: anywhere; }
  .menu-matches a:hover, .menu-matches a:focus-visible { background: #e8f3e9; border-radius: 8px; }
  .sidebar-icon-only .sidebar .menu-finder, .sidebar-icon-only .sidebar .menu-matches { display: none; }
  .app-shell .sidebar .nav > .nav-item > .nav-link { border-radius: 9px; }
  .app-shell .sidebar .nav.sub-menu { border-inline-start: 1px solid #d6e4d6; }
  .app-shell .content-wrapper .card-header { background-color: #edf4ee; color: #214936; }
  .app-shell .content-wrapper .card-header[class*="bg-"] { color: inherit; }
  .app-shell .table thead:not([class*="bg-"]) th:not([class*="bg-"]) { font-weight: 700; letter-spacing: .015em; }
  .app-shell .form-group label:not(.form-check-label), .public-portal label { font-weight: 650; }
  .app-shell .content-wrapper .form-control:not([type="color"]), .public-portal .form-control { border-radius: 8px; }
  .app-shell .table-responsive { max-width: 100%; overflow-x: auto; }
  .ops-heading, .public-portal .public-list-head { background: #e6f1e4; border: 1px solid #cddfcf; border-radius: 16px; padding: clamp(18px,3vw,32px); margin-bottom: 24px; }
  .ops-heading h1, .public-portal .public-list-head h2 { margin: 0 0 6px; font-family: Georgia,serif; font-size: clamp(1.65rem,3vw,2.35rem); color: #163f32; }
  .ops-heading p { margin: 0; color: #425c4a; }
  .app-shell .admin-dashboard-page .admin-welcome-hero { background: #e6f1e4; border-color: #ccdcca; }
  .app-shell .admin-dashboard-page .admin-welcome-title { color: #174631; font-family: Georgia,serif; }
  .public-portal { background-color: #f4f6ef; color: #243f31; }
  .public-portal .event-card, .public-portal .form-card { border-color: #d9e3d7; box-shadow: 0 3px 16px #173d3010; border-radius: 14px; }
  .public-portal :is(a,button,input,select,textarea):focus-visible { outline: 3px solid #226486; outline-offset: 2px; }
  .public-portal img { max-width: 100%; }
  .app-shell .kunanta-bottom-tab.active { box-shadow: inset 0 2px #196648; }
}
@media screen and (max-width: 767px) {
  .app-shell .content-wrapper .card-body { min-width: 0; }
  .app-shell .form-inline { flex-wrap: wrap; gap: 6px; max-width: 100%; }
  .app-shell .form-inline > *, .app-shell .input-group { min-width: 0; max-width: 100%; }
  .app-shell .form-control:not(.form-control-sm), .public-portal :is(input,select,textarea).form-control { font-size: 16px; }
  .app-shell .sidebar .nav .nav-link, .menu-matches a { min-height: 44px; }
  .app-shell .card-title, .ops-heading h1 { overflow-wrap: anywhere; }
  .app-shell .modal-dialog { max-width: calc(100% - 1rem); }
}

.teman-sekolah {margin:0 0 1rem; border:1px solid #cadfcf;border-radius:16px;background:#f0f7ed;color:#183f33;overflow:hidden;min-width:0}
.teman-bar {display:flex;align-items:center;gap:14px;padding:12px 18px}
.teman-portrait {width:92px;height:68px;flex:none;position:relative}
.teman-portrait img {position:absolute;object-fit:contain;bottom:0;transform-origin:50% 90%}
.teman-kun {width:65px;height:65px;left:0}
.teman-anta {width:47px;height:47px;right:0}
.teman-copy {min-width:0;flex:1;overflow-wrap:anywhere}
.teman-copy strong {font-size:1.1rem}
.teman-copy p {margin:.15rem 0 0;color:#375449;line-height:1.45}
.teman-toggle,.global-guide-close {background:white;color:#20543d;border:1px solid #93b5a0;border-radius:9px;min-height:44px;padding:7px 12px;font:inherit;cursor:pointer}
.teman-sekolah :focus-visible {outline:3px solid #146990;outline-offset:2px}
.teman-sekolah .global-guide-panel {position:static;background:white;padding:16px;border-top:1px solid #cadfcf}
.teman-sekolah [hidden] {display:none!important}
.global-guide-header {display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.global-guide-close {min-width:44px}
.global-guide-section {margin-top:1rem}
.global-guide-section h6,.global-guide-title {font-weight:700}
.global-guide-list {padding-inline-start:1.4rem}
.anta-menu-tip {display:flex;align-items:center;gap:.4rem;padding:4px 12px;margin:0;color:#366449;font-size:.8rem}
.anta-menu-tip img {object-fit:contain}
#sidebar .collapse:not(.show) {display:none!important}
@media (max-width:575px) {
  .teman-bar {display:grid;grid-template-columns:62px minmax(0,1fr);gap:5px 10px;padding:10px}
  .teman-portrait {width:62px;height:55px}
  .teman-kun {width:46px;height:50px}
  .teman-anta {width:33px;height:37px}
  .teman-toggle {grid-column:2;justify-self:start}
}
@media (prefers-reduced-motion:no-preference) {
  [data-motion="sapa"] .teman-kun {animation:kun-menyapa .85s ease-in-out}
  [data-motion="tunjuk"] .teman-anta,.collapse.show .anta-menu-tip img {animation:anta-terbang .7s ease-in-out}
  @keyframes kun-menyapa {25%{transform:rotate(-9deg)}60%{transform:rotate(6deg)}}
  @keyframes anta-terbang {40%{transform:translateY(-7px) rotate(7deg)}}
}
@media print {.teman-sekolah,.anta-menu-tip {display:none!important}}
#temanPilihan:not([hidden]) {display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:12px 0}
#temanPilihan h6 {width:100%;font-weight:700}
#temanPilihan a {display:inline-flex;align-items:center;min-height:44px;padding:6px 10px;border:1px solid #bad4bf;border-radius:8px;color:#194f35;overflow-wrap:anywhere}

/* Identitas visual sekolah untuk ruang kerja, formulir, dan halaman publik. */
@media screen {
  :root {
    --ui-bg:#fcf9f6; --ui-border:#dedbe9; --ui-primary:#545582;
    --ui-primary-dark:#37385d; --ui-primary-soft:#edeaf8; --ui-text:#343549;
    --ui-radius:18px; --ui-shadow:0 4px 15px #43375c10;
    --school-panel:#f0edf8; --school-ink:#38354f; --school-nav-accent:#73609f;
  }
  .app-shell .content-wrapper,.public-portal,body.kunanta-login {
    background-color:var(--ui-bg);
    background-image:radial-gradient(#75745423 .8px,transparent .8px);
    background-size:17px 17px;
  }
  .app-shell .navbar.fixed-top {box-shadow:0 2px 12px #45395616!important;border-bottom:2px solid #e9c8ae}
  .app-shell .navbar .navbar-brand-wrapper {background:#fff8f3!important}
  .school-workspace {color:var(--school-ink);font-family:Georgia,serif;font-size:clamp(1rem,1.7vw,1.45rem);font-weight:700;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-inline-end:12px}
  .school-workspace:hover {color:var(--ui-primary-dark)}
  #sidebar.sidebar {background:#eeeafa!important;border-inline-end:0}
  #sidebar .menu-finder {margin:16px 14px 10px}
  #sidebar .menu-finder input {background:#fcfbff;border-color:#c4bed7;color:#433e57}
  #sidebar .menu-finder input::placeholder {color:#635d78}
  #sidebar :is(.menu-matches a,.menu-matches p,.anta-menu-tip) {color:#514962}
  #sidebar .menu-matches a:is(:hover,:focus-visible) {background:#e4dff3}
  #sidebar .nav .nav-item>.nav-link {color:#433e57!important;background:transparent!important}
  #sidebar .nav .nav-link :is(i,.menu-title,.menu-arrow) {background:transparent!important;color:inherit!important}
  #sidebar .nav .nav-item>.nav-link:is(:hover,:focus-visible) {background:#e3ddf3!important;color:#403650!important}
  #sidebar .nav .nav-item.active>.nav-link,#sidebar .nav .nav-link[aria-expanded=true],#sidebar .nav .nav-link.active {background:#dcd2f0!important;color:#403650!important;border-left-color:var(--school-nav-accent)!important;box-shadow:inset 3px 0 var(--school-nav-accent)}
  #sidebar .nav.sub-menu,#sidebar .collapse {background:#f6f3fc!important}
  #sidebar .nav.sub-menu {border-left-color:#c3b6d8!important}
  #sidebar :focus-visible {outline:2px solid var(--school-nav-accent);outline-offset:-2px}
  .app-shell .teman-sekolah {background:var(--school-ink);border:0;border-radius:20px;box-shadow:var(--ui-shadow)}
  .teman-sekolah .teman-bar,.kunanta-login .login-welcome {
    background-color:#ffe9d8;
    background-image:radial-gradient(ellipse at 100% 120%,#e2e2f7 0 16%,transparent 16.3%),radial-gradient(ellipse at 104% 128%,#f5dbe8 0 37%,transparent 37.3%);
    color:#44374a;
  }
  .teman-sekolah .teman-bar {padding:clamp(14px,2vw,26px);gap:clamp(12px,2vw,26px)}
  .teman-sekolah .teman-copy strong {font:700 clamp(1.25rem,2.15vw,2rem)/1.15 Georgia,serif}
  .teman-sekolah .teman-copy p {color:#574758;margin-top:.35rem}
  .teman-toggle {background:#fdf9ff;border:1px solid #bfb2d2;color:#453750;font-weight:700}
  .teman-sekolah .global-guide-panel {color:var(--school-ink);background:#fffdfd}
  .app-shell :is(.ops-heading,.guru-welcome-hero,.admin-welcome-hero,.family-welcome,.super-dashboard .exec-header,.staff-welcome,.km-hub-header,.km-parent-header),.public-portal .public-list-head {
    background:var(--school-panel)!important;color:var(--school-ink)!important;
    border:1px solid #d8d1e7!important;border-inline-start:5px solid var(--school-nav-accent)!important;border-radius:16px!important
  }
  .app-shell :is(.ops-heading,.guru-welcome-hero,.admin-welcome-hero,.family-welcome),.public-portal .public-list-head {padding:clamp(15px,2.6vw,32px)}
  .app-shell :is(.guru-welcome-title,.admin-welcome-title,.ops-heading h1,.card .card-title,.admin-section-title) {font-family:Georgia,serif;letter-spacing:-.025em;color:#403b58}
  .app-shell .content-wrapper :is(.admin-card,.guru-card,.portal-card,.card):not([class*="bg-"]) {border-radius:18px;border-color:#dfdbe6;box-shadow:0 4px 16px #45394f10}
  .app-shell .content-wrapper .card-header:not([class*="bg-"]) {background:#f3eff9;border-bottom:1px solid #dad3e7}
  .app-shell .table thead:not([class*="bg-"]) th:not([class*="bg-"]) {background:#edf0fa!important;color:#404361!important;text-transform:none!important;font-size:.8rem!important;letter-spacing:.01em!important}
  .app-shell .form-control:not(:disabled):not([readonly]):focus,.public-portal .form-control:focus {border-color:#69609a!important;box-shadow:0 0 0 3px #7974a62b!important}
  .app-shell .modal-content,.public-portal .form-card,.public-portal .success-card,.public-portal .result-card {border:1px solid #dad4e3;border-radius:20px;box-shadow:0 10px 34px #53456618}
  .app-shell .modal-header {background:#f4eff9;border-radius:inherit;border-bottom:1px solid #dad4e3}
  .app-shell .kunanta-bottom-tab.active {background:#e7e0f5;color:#423657;box-shadow:inset 0 3px #8a73ae;border-radius:9px}
  .kunanta-login .login-welcome h1,.kunanta-login .login-welcome p {color:#42364d}
  .kunanta-login .login-school-logo {background:#fffcf8;border-radius:11px;padding:7px 10px}
  .kunanta-login .login-card {background:#fffdfb;border-color:#e6dbe4}
  .kunanta-login .login-heading,.public-portal h2 {color:#403b58;font-family:Georgia,serif}
  .kunanta-login .btn-login {background:#565780!important;color:white}
  .event-empty {grid-column:1/-1;display:flex;align-items:center;gap:20px;padding:clamp(20px,4vw,44px);background:#fffdfb;border:1px dashed #c4b9d5;border-radius:18px;color:#474155}
  .event-empty img {border-radius:26%;flex:none}
  .event-empty h3 {font:bold 1.35rem Georgia,serif;margin:0 0 .4rem}
  .event-empty p {margin:0}
}
@media screen and (max-width:575px) {
  .school-workspace {display:none}
  .teman-sekolah .teman-bar {gap:8px 12px}
  .event-empty {align-items:flex-start;gap:12px}
  .event-empty img {width:54px;height:auto}
}
@media screen {
  .app-shell .semester-empty-mascot {display:block;object-fit:contain;border-radius:24%;margin:0 auto .65rem}
  .school-error-page {background:#fcf9f6;color:var(--school-ink)}
  .school-error-page .error-container {border-color:#dcd5e5;border-radius:24px;background:#fffdfb;box-shadow:0 12px 40px #57446118}
  .school-error-page .error-container::before {background:linear-gradient(90deg,#b7addb 0 66%,#f1c1a1 66%)}
  .school-error-page h1 {color:var(--school-ink);font-family:Georgia,serif}
  .school-error-page .btn-primary,.public-portal .ticket-head {background:#565780;color:white}
  .public-portal .ticket-head h1,.public-portal .form-head h1 {font-family:Georgia,serif}
  .public-portal .header-brand-box {background:#fff7ef;border-bottom-color:#e3bfae}
  .public-portal .form-card-header {background:#565780;color:white}
  .public-portal .event-form-card {border-radius:20px;border-color:#dcd5e5}
  .sidebar-icon-only #sidebar .nav-item.hover-open>.nav-link>.menu-title {background:#e3ddf3!important;color:#403650!important}
}

/* Nuansa pastel logo untuk permukaan dan navigasi. Status tetap memakai warna semantis. */
@media screen {
  :root {--ui-muted:#555366;--ui-surface-soft:#f4f1f8;--ui-primary-border:#c7bedb}
  .app-shell .super-dashboard .exec-header,.app-shell .staff-welcome {color:#38354f!important}
  .app-shell :is(.exec-header,.staff-welcome,.km-hub-header,.km-parent-header) :is(.text-white,.text-white-50,.exec-branch-count) {color:#474559!important}
  .app-shell .super-dashboard .exec-badge {background:#eee4f6;color:#543e62;border-color:#cfbbdc}
  .app-shell .super-dashboard .exec-badge-dot {background:#8e72a2}
  .app-shell .super-dashboard .exec-header .text-right {background:#ffffff85!important;border-color:#d2cede!important}
  .app-shell .kunanta-mobile-bottom-nav {background:#faf7ff;border-top-color:#ded7e9}
  .app-shell .kunanta-bottom-tab.active i {color:#58446e!important}
  .app-shell .teman-sekolah {background:#fce9df;border:1px solid #e6d6dd}
  .teman-sekolah .global-guide-panel,.global-guide-close,#temanPilihan a {border-color:#d6cfe1;color:#49415b}
  .public-portal .form-card-header,.public-portal .ticket-head {background:#eee6f7;color:#443750}
  .public-portal :is(.form-card-header,.ticket-head) :is(.text-white,h1,h2,h3,p) {color:#443750!important}
  .public-portal .ticket-status {background:#fff8f0;border-color:#d7c7dc;color:#463951}
  .app-shell .family-portal .parent-header-box {background:#fffaf6}
  .app-shell :is(.parent-welcome-title,.parent-welcome-sub,.admin-welcome-sub,.guru-welcome-sub,.ops-heading p),.public-portal .public-list-head h2 {color:#454358}
  .app-shell .attendance-location {background:#eaf2fa;color:#34485d}
  .app-shell .nav-tabs .nav-link.active {color:#494363;border-color:#cfc6df #cfc6df white}
  .app-shell .pagination .page-item.active .page-link {background:#59567c;border-color:#59567c;color:white}
}
@media screen {
  .app-shell .super-dashboard .text-success {color:#2b6956!important}
  .app-shell .super-dashboard .text-warning {color:#855319!important}
  .app-shell .super-dashboard .text-primary {color:#55517d!important}
  .app-shell .super-dashboard .text-danger {color:#a23550!important}
  .app-shell .super-dashboard .badge-success {background:#d9eee2;color:#255d46}
  .app-shell .super-dashboard .badge-warning {background:#fbe9ce;color:#71481c}
  .app-shell .super-dashboard .badge-danger {background:#f9dfe4;color:#8c324c}
  .app-shell .btn:focus-visible,.public-portal .btn:focus-visible {outline:3px solid #67528c;outline-offset:2px}
}

@media screen {
  .app-shell .super-dashboard .exec-header::after {display:none}
  .app-shell :is(.km-hub-header,.km-parent-header,.exec-header,.staff-welcome) :is(h2,h3),
  .public-portal .auth-form-light h1 {font-family:Georgia,serif;letter-spacing:-.025em}
  .app-shell .message-right {background:var(--school-panel);color:var(--school-ink);box-shadow:var(--ui-shadow)}
  .app-shell .message-right .message-header {color:#514760}
  .public-portal .auth.content-wrapper {background:var(--ui-bg)}
  .public-portal .auth-form-light {border:1px solid var(--ui-border);border-radius:var(--ui-radius);box-shadow:var(--ui-shadow)}
  .public-portal .auth-form-light .brand-logo img {width:min(220px,100%);height:auto}
  .public-portal .auth-form-light h1 {color:var(--school-ink);font-size:1.65rem}
  .public-portal .btn-primary {background:var(--ui-primary);border-color:var(--ui-primary);color:white}
  .public-portal .btn-primary:hover {background:var(--ui-primary-dark)}
}
.inspirasi-harian {padding:12px clamp(14px,2vw,26px);background:#fff8ef;color:#493b48;border-top:1px solid #e5d8df;overflow-wrap:anywhere}
.inspirasi-harian strong {font-size:.875rem}
.inspirasi-harian p {margin:.25rem 0 0;line-height:1.5}

/* Formulir masuk tetap dalam jangkauan ibu jari pada layar pendek. */
@media screen and (max-width:700px), screen and (orientation:landscape) and (max-height:500px) and (max-width:1000px) {
  body.kunanta-login {min-height:100svh}
  .kunanta-login .auth-wrapper {max-width:460px;padding:12px 16px;gap:10px;grid-template-columns:minmax(0,1fr)}
  .kunanta-login .login-welcome {display:grid;grid-template-columns:minmax(0,1fr) minmax(70px,26%);align-items:center;gap:4px 8px;padding:0 8px;background:transparent;border:0}
  .kunanta-login .login-welcome h1 {font-size:clamp(1.2rem,5vw,1.65rem);margin:0}
  .kunanta-login .login-welcome p {display:none}
  .kunanta-login .login-school-logo {width:min(100%,154px);margin:0;padding:0;background:transparent}
  .kunanta-login .login-welcome .kunanta-mascots {grid-column:2;grid-row:1/3;margin:0;width:100%}
  .kunanta-login .login-card {padding:clamp(14px,4vw,22px);border-radius:18px}
  .kunanta-login .login-heading {margin:0 0 3px}
  .kunanta-login .login-subtitle,.kunanta-login .login-card .form-group {margin-bottom:12px!important}
  .kunanta-login #formLogin>.mt-4 {margin-top:12px!important}
  .kunanta-login .auth-footer {margin:0;font-size:.7rem}
}
@media screen and (orientation:landscape) and (max-height:500px) and (min-width:520px) and (max-width:1000px) {
  .kunanta-login .auth-wrapper {max-width:790px;grid-template-columns:minmax(0,.65fr) minmax(0,1fr);align-items:center;padding-block:8px}
  .kunanta-login .login-welcome {display:flex;align-items:center;gap:8px}
  .kunanta-login .login-welcome .kunanta-mascots {max-width:130px}
  .kunanta-login .auth-footer {display:none}
}
