:root { --prakerin-primary: #214c87; --prakerin-ink: #1c2e47; --prakerin-muted: #63758b; }
body { font-family: "Segoe UI", Arial, sans-serif; color: var(--prakerin-ink); }
.content-wrapper { background: #f3f6fa; }
.main-header.navbar-primary, .brand-link.navbar-primary { background: #183858; }
.main-sidebar { background: #152d46; }
.sidebar-dark-primary .nav-sidebar > .nav-item > .nav-link.active { background: #2c6098; box-shadow: none; }
.nav-sidebar .nav-link { border-radius: .5rem; margin-bottom: .3rem; }
.content-header { padding: 24px 20px 12px; opacity: 1 !important; }
.content-header h4 { font-weight: 700; }
.card { border-radius: .75rem; box-shadow: 0 3px 16px rgba(28, 46, 71, .07); border: 1px solid #e2e8f0; }
.card-header { border-radius: .75rem .75rem 0 0; }
.card-footer { background: #f8fafc; border-radius: 0 0 .75rem .75rem; }
.btn { border-radius: .4rem; }
.btn-primary { background: var(--prakerin-primary); border-color: var(--prakerin-primary); }
.btn-primary:hover, .btn-primary:focus { background: #173d70; border-color: #173d70; }
.form-control { border-color: #ccd6e2; border-radius: .4rem; }
.form-control:focus { border-color: #4c7fb6; box-shadow: 0 0 0 .2rem rgba(33,76,135,.15); }
a:focus-visible, button:focus-visible { outline: 3px solid #d79525; outline-offset: 3px; }
.table thead th { background: #eef3f8; color: var(--prakerin-ink); border-bottom-width: 1px; }
.table td, .table th { vertical-align: middle; }
.description-header { color: var(--prakerin-primary); font-size: 1.7rem !important; }
.description-text { font-size: .75rem; letter-spacing: .045em; color: var(--prakerin-muted); }
.main-footer { color: var(--prakerin-muted); font-size: .85rem; }
.prakerin-login { min-height: 100vh; padding: 32px 20px; background: #eef3f8; }
.login-shell { width: 100%; max-width: 1040px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); border-radius: 22px; overflow: hidden; box-shadow: 0 20px 70px rgba(24,56,88,.13); }
.login-intro { padding: 52px 44px; color: #fff; background: linear-gradient(145deg, #142d48, #245b89); display: flex; flex-direction: column; }
.login-brand { display: flex; align-items: center; gap: 16px; margin-bottom: 46px; font-size: .72rem; letter-spacing: .12em; font-weight: 700; }
.login-brand img { object-fit: contain; background: #fff; padding: 5px; border-radius: 14px; }
.login-intro h1 { font-size: 2.1rem; font-weight: 700; line-height: 1.25; margin-bottom: 18px; overflow-wrap: anywhere; }
.login-intro p { color: #d5e3f0; line-height: 1.7; }
.login-features { list-style: none; padding: 0; margin: 28px 0 40px; }
.login-features li { display: flex; align-items: center; gap: 14px; margin: 20px 0; font-size: .9rem; }
.login-features i { color: #9fcee9; width: 20px; text-align: center; }
.login-school { margin-top: auto; padding-top: 20px; border-top: 1px solid #ffffff30; font-size: .8rem; color: #d5e3f0; }
.login-form-panel { background: #fff; padding: 60px 44px 36px; }
.login-eyebrow { color: #396b99; font-size: .7rem; font-weight: 700; letter-spacing: .14em; }
.login-form-panel h2 { font-size: 1.7rem; font-weight: 700; margin: 12px 0; }
.login-form-panel > p { font-size: .9rem; margin-bottom: 30px; }
.login-form-panel label { font-size: .85rem; font-weight: 600; }
.login-form-panel .form-control { height: 48px; font-size: .9rem; }
.login-form-panel .form-group { margin-bottom: 22px; }
.login-form-panel .btn-block { min-height: 48px; margin-top: 28px; font-weight: 600; }
.login-help { margin: 26px 0 !important; padding: 14px; background: #f3f6fa; border-radius: 8px; color: #566980; font-size: .8rem !important; line-height: 1.6; }
.login-copyright { font-size: .7rem; color: #68788a; line-height: 1.7; border-top: 1px solid #e5eaf0; padding-top: 20px; }
@media (max-width: 767.98px) {
  .prakerin-login { padding: 20px 12px; justify-content: flex-start; }
  .login-shell { max-width: 480px; grid-template-columns: minmax(0, 1fr); border-radius: 16px; }
  .login-intro { padding: 24px; }
  .login-brand { margin-bottom: 20px; }
  .login-brand img { width: 48px; height: 48px; }
  .login-intro h1 { font-size: 1.5rem; margin-bottom: 10px; }
  .login-intro p { font-size: .85rem; margin: 0; }
  .login-features, .login-school { display: none; }
  .login-form-panel { padding: 28px 24px; }
  .login-form-panel h2 { font-size: 1.45rem; }
  .content-header { padding: 18px 12px 8px; }
  .card-body { padding: 1rem; }
  .dataTables_wrapper { overflow-x: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

.login-intro, .login-form-panel { min-width: 0; }
.login-brand span { overflow-wrap: anywhere; }
/* Application settings */
.application-settings { padding-bottom: 28px !important; }
.settings-hero { display: flex; align-items: center; gap: 18px; padding: 24px 28px; margin-bottom: 20px; color: #fff; background: linear-gradient(120deg, #183858, #28618f); border-radius: 14px; box-shadow: 0 10px 24px rgba(24,56,88,.12); }
.settings-hero-icon { display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; flex: 0 0 52px; border-radius: 14px; color: #183858; background: #fff; font-size: 1.25rem; }
.settings-hero .dashboard-eyebrow { color: #c4e1f4; }
.settings-hero h1 { margin: 5px 0; font-size: 1.45rem; font-weight: 700; }
.settings-hero p { margin: 0; color: #d8e8f4; font-size: .86rem; }
.settings-hero-actions { display: flex; gap: 10px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.settings-hero-actions .btn-light { color: #214c87; }
.settings-grid { display: grid; grid-template-columns: minmax(230px, .72fr) minmax(0, 1.8fr); gap: 20px; }
.settings-profile-card { display: flex; align-items: center; flex-direction: column; padding: 28px 24px 24px; text-align: center; }
.settings-logo-wrap { display: flex; align-items: center; justify-content: center; width: 122px; height: 122px; margin-bottom: 14px; border: 1px solid #e2eaf2; border-radius: 24px; background: #f4f8fb; }
.settings-logo { max-width: 96px; max-height: 96px; object-fit: contain; }
.settings-status { margin-bottom: 12px; color: #267b69; font-size: .75rem; font-weight: 600; }
.settings-status i { margin-right: 4px; font-size: .52rem; vertical-align: 1px; }
.settings-profile-card h2 { margin: 0; font-size: 1.18rem; font-weight: 700; overflow-wrap: anywhere; }
.settings-profile-card p { margin: 5px 0 22px; color: #63758b; font-size: .84rem; }
.settings-detail-card .card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 24px; background: #fff; }
.settings-detail-card .card-header h2 { margin: 0; font-size: 1rem; font-weight: 700; }
.settings-detail-card .card-header h2 i { color: #2c6da0; }
.settings-detail-card .card-header span { color: #8a99a8; font-size: .72rem; }
.settings-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 8px 24px; }
.settings-detail { min-width: 0; padding: 17px 14px 17px 0; border-bottom: 1px solid #edf1f5; }
.settings-detail:nth-last-child(-n+2) { border-bottom: 0; }
.settings-detail span { display: block; margin-bottom: 6px; color: #718297; font-size: .73rem; }
.settings-detail strong { display: block; color: #263b56; font-size: .88rem; font-weight: 600; overflow-wrap: anywhere; }
.settings-note { display: flex; align-items: flex-start; gap: 10px; margin: 10px 24px 22px; padding: 13px 14px; border-radius: 9px; color: #526b84; background: #f3f7fb; font-size: .76rem; line-height: 1.5; }
.settings-note i { margin-top: 2px; color: #3478a8; }
/* Image slide */
.audit-table th { background:#eef3f8; color:#1c2e47; font-size:.76rem; text-transform:uppercase; letter-spacing:.03em; white-space:nowrap; }
.audit-table td { color:#405870; font-size:.82rem; vertical-align:middle; }
.slide-settings { padding-bottom: 24px; }
.slide-upload { border: 0; border-radius: 14px; background: linear-gradient(120deg,#183858,#2f78a5); color: #fff; }
.slide-upload .card-body { display:flex; align-items:center; justify-content:space-between; gap:24px; padding:24px 28px; }
.slide-upload h2 { margin:6px 0; font-size:1.25rem; font-weight:700; }
.slide-upload p { margin:0; color:#d7e8f4; font-size:.85rem; }
.slide-eyebrow { color:#b8d7ea; font-size:.68rem; font-weight:700; letter-spacing:.12em; }
.slide-upload form { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.slide-upload input[type=file] { max-width:220px; padding:7px; border-radius:6px; background:#fff; color:#39536d; font-size:.78rem; }
.slide-upload small { display:block; padding:0 28px 20px; color:#d7e8f4; font-size:.72rem; }
.slide-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); gap:18px; margin-top:20px; }
.slide-card { overflow:hidden; margin:0; border:0; border-radius:12px; box-shadow:0 5px 18px rgba(28,57,84,.08); }
.slide-card img { display:block; width:100%; aspect-ratio:16/9; object-fit:cover; background:#edf3f8; }
.slide-card-footer { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:12px 14px; color:#3c536b; font-size:.78rem; }
.slide-card-footer span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.slide-empty { grid-column:1/-1; padding:56px 20px; text-align:center; color:#718297; }
.slide-empty i { color:#8da9bf; font-size:2.2rem; }
.slide-empty h3 { margin:14px 0 6px; color:#2b4662; font-size:1rem; }
.slide-empty p { margin:0; font-size:.82rem; }
@media (max-width:767.98px){.slide-upload .card-body{align-items:flex-start;flex-direction:column;padding:20px}.slide-upload small{padding:0 20px 18px}.slide-upload form{width:100%}.slide-upload input[type=file]{max-width:100%;width:100%}.slide-upload .btn{width:100%}}
/* User level and permission matrix */
#tabellevel thead th { background: #eef3f8; color: #1c2e47; font-size: .78rem; text-transform: uppercase; letter-spacing: .035em; }
#tabellevel tbody td { padding: .85rem .75rem; }
#tabellevel .btn { margin: 2px; }
#vakses { min-width: 760px; }
#vakses thead th { position: sticky; top: 0; z-index: 1; background: #183858 !important; color: #fff !important; font-size: .72rem; letter-spacing: .035em; text-transform: uppercase; }
#vakses tbody td { text-align: center; vertical-align: middle; }
#vakses tbody td:nth-child(2) { text-align: left; font-weight: 600; color: #294563; }
#vakses tbody td:first-child, #vakses tbody td:nth-child(2) { background: #f3f7fb !important; color: #294563 !important; }
#vakses tbody td:first-child { font-weight: 700; }
#vakses .menu-index, #vakses .menu-name { background: #f3f7fb; color: #294563; }
#vakses .menu-name { font-weight: 700; }
#modal-default .modal-dialog { max-width: 1140px; }
#modal-default .modal-content { max-height: calc(100vh - 2rem); }
#modal-default .modal-body { overflow: auto; }
#vakses .fa-check-circle, #vakses .fa-times-circle { transition: transform .15s ease; }
#vakses [onclick] { cursor: pointer; }
#vakses [onclick]:hover i { transform: scale(1.16); }
/* Dashboard */
.dashboard-home { padding-bottom: 24px !important; }
.dashboard-welcome { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 30px 32px; border-radius: 14px; background: linear-gradient(115deg, #183858, #26567e); color: #fff; }
.dashboard-eyebrow { font-size: .7rem; letter-spacing: .13em; font-weight: 700; color: #bdd9ed; }
.dashboard-welcome h1 { font-size: 1.6rem; font-weight: 700; margin: 10px 0; overflow-wrap: anywhere; }
.dashboard-welcome p { color: #dce8f3; margin: 0; font-size: .9rem; }
.dashboard-date { display: flex; align-items: center; gap: 14px; flex-shrink: 0; padding: 16px 20px; background: #ffffff10; border: 1px solid #ffffff25; border-radius: 10px; }
.dashboard-date > i { font-size: 1.6rem; color: #bbd9ed; }
.dashboard-date span, .dashboard-date strong { display: block; }
.dashboard-date span { font-size: .75rem; color: #c9dfef; margin-bottom: 4px; }
.dashboard-date strong { font-size: .85rem; font-weight: 600; }
.dashboard-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 26px 0 14px; }
.dashboard-section-heading h2, .dashboard-bottom .card-header h2 { margin: 0; font-size: 1rem; font-weight: 700; }
.dashboard-section-heading > span { font-size: .8rem; color: #63758b; }
.dashboard-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.dashboard-stat { padding: 20px 22px; margin-bottom: 0; }
.dashboard-stat-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dashboard-stat h3 { font-size: .9rem; color: #566980; margin: 0; font-weight: 600; }
.dashboard-stat-icon { width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; border-radius: 12px; font-size: 1.05rem; flex-shrink: 0; }
.dashboard-tone-blue { background: #eaf1fb; color: #285c99; }
.dashboard-tone-teal { background: #e5f4f1; color: #237568; }
.dashboard-tone-violet { background: #efeafb; color: #72529a; }
.dashboard-tone-amber { background: #fff3dd; color: #95600c; }
.dashboard-stat-value { display: block; font-size: 2.25rem; font-weight: 700; line-height: 1.25; margin: 8px 0 5px; }
.dashboard-stat p { margin: 0; font-size: .8rem; color: #63758b; }
.dashboard-bottom { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 20px; margin-top: 24px; }
.dashboard-bottom .card { margin-bottom: 0; min-width: 0; }
.dashboard-bottom .card-header { padding: 20px 24px; background: #fff; }
.dashboard-guide .card-header p { font-size: .82rem; color: #63758b; margin: 8px 0 0; }
.dashboard-guide .card-body { padding: 4px 24px; }
.dashboard-guide-item { display: flex; gap: 16px; padding: 20px 0; }
.dashboard-guide-item + .dashboard-guide-item { border-top: 1px solid #eef2f6; }
.dashboard-guide-number { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex-shrink: 0; border-radius: 10px; background: #edf3fa; color: #315e90; font-size: .75rem; font-weight: 700; }
.dashboard-guide-item h3 { font-size: .9rem; font-weight: 600; margin: 0 0 7px; }
.dashboard-guide-item p { font-size: .83rem; color: #63758b; line-height: 1.65; margin: 0; }
.dashboard-guide-note { margin: 8px 24px 20px; padding: 12px 14px; background: #f3f7fb; border-radius: 8px; display: flex; align-items: center; gap: 10px; color: #526b84; font-size: .78rem; }
.dashboard-calendar-card .card-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.dashboard-calendar-legend { display: flex; align-items: center; gap: 7px; color: #63758b; font-size: .75rem; }
.dashboard-calendar-legend > span { height: 8px; width: 8px; background: #214c87; border-radius: 50%; }
.dashboard-calendar-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.dashboard-calendar-toolbar h3 { font-size: .95rem; font-weight: 700; margin: 0; }
.dashboard-calendar-nav { color: #315e90; width: 36px; height: 36px; background: #f0f5fa; }
.dashboard-calendar-nav:hover { background: #dfeaf5; }
.dashboard-calendar-table { width: 100%; table-layout: fixed; text-align: center; }
.dashboard-calendar-table th { color: #63758b; font-size: .72rem; font-weight: 600; padding: 8px 0; }
.dashboard-calendar-table td { padding: 3px 0; font-size: .82rem; }
.dashboard-calendar-table td span { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 9px; }
.dashboard-calendar-table .outside-month { color: #8997a6; }
.dashboard-calendar-table .is-today span { background: #214c87; color: #fff; font-weight: 700; }
.dashboard-calendar-reset { display: block; margin: 16px auto 0; font-size: .75rem; }
@media (max-width: 1199.98px) {
    .dashboard-welcome { align-items: flex-start; flex-direction: column; gap: 18px; }
    .dashboard-date { padding: 10px 14px; }
    .dashboard-date > i { font-size: 1.2rem; }
    .dashboard-date span { display: inline; margin-right: 10px; }
    .dashboard-date strong { display: inline; }
    .dashboard-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767.98px) {
    .dashboard-welcome { padding: 24px 20px; }
    .dashboard-welcome h1 { font-size: 1.3rem; }
    .dashboard-date { flex-shrink: 1; max-width: 100%; }
    .dashboard-date span, .dashboard-date strong { display: block; }
    .dashboard-section-heading { align-items: flex-start; flex-direction: column; }
    .dashboard-stats { gap: 12px; }
    .dashboard-stat { padding: 16px 12px; }
    .dashboard-stat-icon { width: 32px; height: 32px; border-radius: 9px; font-size: .85rem; }
    .dashboard-stat h3 { font-size: .8rem; }
    .dashboard-stat-value { font-size: 1.9rem; }
    .dashboard-bottom { grid-template-columns: minmax(0, 1fr); }
    .dashboard-calendar-card { order: -1; }
    .settings-hero { align-items: flex-start; flex-wrap: wrap; padding: 20px; }
    .settings-hero-actions { width: 100%; margin-left: 0; justify-content: flex-start; }
    .settings-hero-actions .btn { flex: 1 1 auto; }
    .settings-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .settings-details { padding-left: 18px; padding-right: 18px; }
    .settings-detail { padding-right: 10px; }
    .settings-note { margin-left: 18px; margin-right: 18px; }
    .dashboard-bottom .card-header { padding: 18px; }
    .dashboard-guide .card-body { padding: 0 18px; }
    .dashboard-guide-note { margin: 8px 18px 18px; }
}

/* Small-screen safeguards for legacy tables and modals. */
.content-wrapper, .content, .card, .card-body, .dataTables_wrapper { min-width: 0; }
@media (max-width: 767.98px) {
    html, body { max-width: 100%; overflow-x: hidden; }
    .content-header .row { margin-left: 0; margin-right: 0; }
    .content-header [class*="col-"] { padding-left: 0; padding-right: 0; }
    .content-header .breadcrumb { float: none !important; flex-wrap: wrap; margin-top: 8px; padding-left: 0; background: transparent; }
    .content-header h4 { overflow-wrap: anywhere; }
    .table-responsive, .dataTables_wrapper { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .table-responsive > .table, .dataTables_wrapper > table.dataTable { min-width: 620px; }
    .dataTables_wrapper .row { min-width: 0; margin-left: 0; margin-right: 0; }
    .dataTables_wrapper .row > [class*="col-"] { min-width: 0; padding-left: 0; padding-right: 0; }
    .dataTables_wrapper .dataTables_filter, .dataTables_wrapper .dataTables_length, .dataTables_wrapper .dataTables_info, .dataTables_wrapper .dataTables_paginate { float: none; text-align: left; margin: 8px 0; white-space: normal; }
    .dataTables_wrapper .dataTables_filter input { width: 100%; margin-left: 0; }
    .modal-dialog { width: auto; max-width: calc(100% - 1rem); margin: .5rem auto; }
    .modal-content { max-width: 100%; }
    .modal-body { overflow-x: auto; }
    .card-header { flex-wrap: wrap; gap: .5rem; }
    .card-header .card-tools, .card-header .btn { max-width: 100%; }
}
