:root {
    --green: #0f7a4a;
    --green-dark: #0b5c38;
    --yellow: #f5c518;
    --yellow-soft: #fff4c2;
    --bg: #f4f7f4;
    --text: #163326;
    --muted: #5c7466;
    --card: #ffffff;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
    margin: 0;
    font-family: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
}

.guest-body {
    min-height: 100vh;
    min-height: 100dvh;
    background: linear-gradient(160deg, #0f7a4a 0%, #147a3d 48%, #f5c518 160%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.guest-wrap { width: 100%; max-width: 440px; }
.auth-card {
    background: #fff;
    border-radius: 24px;
    padding: 28px 24px;
    box-shadow: 0 18px 40px rgba(8, 40, 24, .18);
}
.auth-badge {
    display: inline-block;
    background: var(--yellow);
    color: #3d3200;
    font-weight: 700;
    border-radius: 999px;
    padding: 6px 12px;
    margin-bottom: 12px;
}

.guest-body.is-login {
    display: block;
    padding: 0;
    background: #073d25;
    overflow-x: hidden;
}
.guest-body.is-login .guest-wrap {
    max-width: none;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}
.login-hero {
    position: relative;
    color: #fff;
    padding: calc(28px + env(safe-area-inset-top)) 24px 56px;
    overflow: hidden;
    background:
        radial-gradient(circle at 90% -10%, rgba(245, 197, 24, .55), transparent 42%),
        linear-gradient(165deg, #0c8a52 0%, #0a6b40 48%, #064a2c 100%);
}
.login-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
    pointer-events: none;
}
.login-orb-a {
    width: 160px; height: 160px; right: -36px; top: -28px;
    background: rgba(245, 197, 24, .28);
}
.login-orb-b {
    width: 90px; height: 90px; left: -20px; bottom: 28px;
    background: rgba(255, 255, 255, .12);
}
.login-hero-inner { position: relative; z-index: 1; max-width: 440px; margin: 0 auto; }
.login-logo {
    width: 72px; height: 72px; border-radius: 22px;
    display: grid; place-items: center;
    background: linear-gradient(180deg, #ffe56a 0%, #f5c518 100%);
    color: #2a2100; font-weight: 800; font-size: 1.5rem;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .18);
    margin-bottom: 16px;
}
.login-kicker {
    margin: 0 0 6px;
    letter-spacing: .12em;
    text-transform: uppercase;
    font-size: .72rem;
    font-weight: 700;
    color: #ffe58a;
}
.login-hero h1 {
    margin: 0 0 8px;
    font-size: clamp(2rem, 8vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -.03em;
}
.login-lead {
    margin: 0;
    max-width: 22rem;
    color: rgba(255,255,255,.86);
    line-height: 1.45;
    font-size: .98rem;
}
.login-sheet {
    position: relative;
    margin-top: -28px;
    flex: 1;
    background: #f6faf6;
    border-radius: 28px 28px 0 0;
    padding: 10px 16px calc(24px + env(safe-area-inset-bottom));
    box-shadow: 0 -12px 40px rgba(0, 0, 0, .16);
}
.login-handle {
    width: 48px; height: 5px; border-radius: 99px;
    background: #d5e4d8; margin: 6px auto 14px;
}
.login-card {
    max-width: 440px;
    margin: 0 auto;
    border-radius: 22px;
    padding: 22px 18px 20px;
    box-shadow: 0 16px 40px rgba(12, 48, 28, .08);
}
.login-card h2 {
    margin: 0 0 4px;
    font-size: 1.45rem;
    font-weight: 800;
    color: #123326;
}
.login-sub { color: var(--muted); margin: 0 0 18px; }
.login-card .form-label {
    font-weight: 700;
    font-size: .86rem;
    margin-bottom: 6px;
}
.login-field {
    position: relative;
    margin-bottom: 14px;
}
.login-field .form-control {
    min-height: 56px;
    padding: 12px 76px 12px 46px;
    border: 1.5px solid #d7e6db;
    border-radius: 16px;
    background: #f8fbf8;
    font-size: 16px;
}
.login-field .form-control:focus {
    border-color: #0f7a4a;
    box-shadow: 0 0 0 .25rem rgba(15, 122, 74, .15);
    background: #fff;
}
.login-ico {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    color: #0f7a4a; display: grid; place-items: center;
}
.login-eye {
    position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
    border: 0; background: #eef6f0; color: #0b5c38;
    border-radius: 999px; min-height: 36px; padding: 0 12px;
    font-size: .75rem; font-weight: 700;
}
.btn-login {
    min-height: 56px;
    border: 0;
    border-radius: 16px;
    margin-top: 8px;
    font-weight: 800;
    color: #2a2100;
    background: linear-gradient(180deg, #ffe56a 0%, #f0b800 100%);
    box-shadow: 0 12px 24px rgba(214, 164, 0, .28);
}
.btn-login:hover, .btn-login:focus {
    color: #2a2100;
    background: linear-gradient(180deg, #ffed8a 0%, #e3ad00 100%);
}
.btn-login.is-loading { opacity: .7; }
.login-captcha {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.login-captcha img {
    display: block;
    height: 56px;
    width: auto;
    border-radius: 14px;
    border: 1.5px solid #d7e6db;
    background: #f6fbf7;
}
.login-captcha-refresh {
    min-height: 56px;
    padding: 0 14px;
    border: 0;
    border-radius: 14px;
    background: #eef6f0;
    color: #0b5c38;
    font-weight: 800;
}
.login-captcha-input {
    padding-left: 16px !important;
    letter-spacing: .18em;
    text-transform: uppercase;
    font-weight: 800;
}
.login-forgot {
    display: block;
    text-align: center;
    margin-top: 16px;
    font-weight: 700;
    color: #0f7a4a;
    text-decoration: none;
}
.login-forgot:hover { color: #0b5c38; }

@media (min-width: 768px) {
    .guest-body.is-login {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 32px 16px;
        background:
            radial-gradient(circle at 12% 10%, rgba(245, 197, 24, .28), transparent 28%),
            linear-gradient(160deg, #0c8a52 0%, #064a2c 70%);
    }
    .guest-body.is-login .guest-wrap {
        max-width: 440px;
        min-height: 0;
    }
    .login-hero { border-radius: 28px 28px 0 0; padding: 32px 28px 48px; }
    .login-sheet { border-radius: 0 0 28px 28px; padding-bottom: 24px; }
}

.app-shell { display: flex; min-height: 100vh; }
.app-sidebar {
    width: 260px;
    background: #0d5f3b;
    color: #fff;
    flex-direction: column;
    padding: 22px 18px;
}
.brand { display: flex; gap: 12px; align-items: center; margin-bottom: 28px; }
.brand-mark {
    width: 44px; height: 44px; border-radius: 12px;
    background: var(--yellow); color: #2d2500;
    display: grid; place-items: center; font-weight: 800;
}
.brand small { display: block; opacity: .8; }
.side-nav a {
    display: block; color: #e8f6ee; text-decoration: none;
    padding: 12px 14px; border-radius: 12px; margin-bottom: 6px;
}
.side-nav a.active, .side-nav a:hover { background: rgba(255,255,255,.12); color: #fff; }
.app-main { flex: 1; min-width: 0; }
.app-topbar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 18px 20px 8px;
    gap: 12px;
}
.btn-keluar {
    min-height: 38px;
    padding: 0 14px;
    border: 0;
    border-radius: 999px;
    font-weight: 800;
    font-size: .82rem;
    color: #2a2100;
    background: linear-gradient(180deg, #ffe56a 0%, #f0b800 100%);
    box-shadow: 0 6px 14px rgba(214, 164, 0, .22);
}
.btn-keluar:hover, .btn-keluar:focus {
    color: #2a2100;
    background: linear-gradient(180deg, #ffed8a 0%, #e3ad00 100%);
}
.app-topbar h1 { font-size: 1.35rem; margin: 0; font-weight: 800; letter-spacing: 0; }
.app-content { padding: 8px 16px 96px; }

body.is-menu .app-content { max-width: 860px; }
body.is-menu .app-topbar {
    padding: 16px 16px 10px;
    border-bottom: 1px solid #e4eee7;
    background: #fff;
}
.menu-card {
    background: #fff;
    border-radius: 20px;
    padding: 16px;
    box-shadow: 0 10px 28px rgba(16, 48, 32, .06);
}
.menu-card-title {
    margin: 0 0 12px;
    font-size: 1rem;
    font-weight: 800;
    color: #123326;
}
.status-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.status-grid .st-item {
    margin: 0;
    padding: 10px 12px;
    border-radius: 14px;
    font-size: .86rem;
    line-height: 1.35;
    background: #f6faf6;
}
.status-grid .st-item.ok { background: #e7f6ee; }
.status-grid .st-item.bad { background: #fdeeee; }
.gps-box strong { display: block; margin-bottom: 8px; }
.gps-box p { color: var(--muted); }
.gps-box span { display: block; margin-top: 4px; }
.gps-bebas-note {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #e8f8ef;
    color: #0f7a4a;
    font-size: .86rem;
    font-weight: 600;
    line-height: 1.45;
}
.kegiatan-empty-note {
    margin: 0;
    padding: 14px 16px 16px;
    border-radius: 16px;
    background:
        radial-gradient(circle at 92% -20%, rgba(245, 197, 24, .42), transparent 42%),
        #fff8d8;
    border: 1px solid #f0d56a;
    color: #5a4700;
    box-shadow: 0 8px 18px rgba(214, 164, 0, .12);
}
.kegiatan-empty-note strong {
    display: block;
    margin: 4px 0 8px;
    font-size: 1rem;
    line-height: 1.4;
    color: #3d3000;
}
.kegiatan-empty-note p {
    margin: 0;
    font-size: .9rem;
    font-weight: 600;
    line-height: 1.5;
}
.btn-menu-save {
    min-height: 54px;
    border: 0;
    border-radius: 16px;
    font-weight: 800;
    color: #2a2100;
    background: linear-gradient(180deg, #ffe56a 0%, #f0b800 100%);
    box-shadow: 0 10px 20px rgba(214, 164, 0, .22);
}
.btn-menu-save:hover, .btn-menu-save:focus {
    color: #2a2100;
    background: linear-gradient(180deg, #ffed8a 0%, #e3ad00 100%);
}
.btn-menu-save:disabled { opacity: .45; box-shadow: none; }
body.is-menu .nav-pills .nav-link {
    border-radius: 999px;
    font-weight: 700;
    color: #0f7a4a;
    background: #eef6f0;
    margin-right: 6px;
}
body.is-menu .nav-pills .nav-link.active {
    background: #0f7a4a;
    color: #fff;
}

.profile-card, .card-soft, .stat-card, .menu-tile, .jam-box {
    background: var(--card);
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(16, 48, 32, .06);
}
.profile-card { padding: 20px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.chip {
    display: inline-block; background: #e7f6ee; color: var(--green-dark);
    border-radius: 999px; padding: 4px 10px; font-size: .78rem; font-weight: 700;
}
.jam-box { padding: 14px 16px; background: var(--yellow-soft); min-width: 170px; }
.jam-box small { display: block; color: var(--muted); }
.stat-card { padding: 20px; }
.stat-card span, .stat-card small { display: block; color: var(--muted); }
.stat-card strong { font-size: 1.7rem; color: var(--green-dark); }

body.is-beranda .app-content { max-width: none; }
body.is-beranda .app-topbar { padding: 14px 16px 6px; }
.beranda-dash {
    display: grid;
    gap: 12px;
}
.profile-hero {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    padding: 16px;
    color: #fff;
    background:
        radial-gradient(circle at 92% -8%, rgba(245, 197, 24, .5), transparent 40%),
        linear-gradient(155deg, #12a05c 0%, #0c7a46 48%, #065833 100%);
    box-shadow: 0 14px 32px rgba(8, 48, 28, .18);
}
.profile-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}
.profile-orb-a {
    width: 120px; height: 120px; right: -28px; top: -34px;
    background: rgba(255, 229, 106, .28);
}
.profile-orb-b {
    width: 72px; height: 72px; left: -22px; bottom: -18px;
    background: rgba(255, 255, 255, .1);
}
.profile-hero-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}
.profile-identity { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.profile-avatar {
    width: 56px; height: 56px; border-radius: 18px; flex: 0 0 auto;
    display: grid; place-items: center;
    background: linear-gradient(180deg, #ffe56a 0%, #f5c518 100%);
    color: #2a2100; font-weight: 800; font-size: 1.05rem;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .16);
}
.profile-copy { min-width: 0; flex: 1; }
.profile-copy h2 {
    margin: 6px 0 8px;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.25;
    overflow-wrap: break-word;
}
.chip-glow {
    background: rgba(255, 255, 255, .16);
    color: #fff8d0;
    border: 1px solid rgba(255, 255, 255, .22);
    white-space: nowrap;
}
.profile-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    color: rgba(255, 255, 255, .86);
    font-size: .84rem;
}
.profile-meta span {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    min-width: 0;
    overflow-wrap: break-word;
}
.profile-meta svg { flex: 0 0 auto; margin-top: 2px; }
.profile-hero .jam-box {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-width: 0;
    padding: 10px 12px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .18);
    box-shadow: none;
}
.jam-ico {
    width: 36px; height: 36px; border-radius: 12px; flex: 0 0 auto;
    display: grid; place-items: center;
    background: #f5c518; color: #2a2100;
}
.profile-hero .jam-box small { color: rgba(255, 255, 255, .78); font-weight: 600; font-size: .72rem; }
.profile-hero .jam-box strong { display: block; color: #fff; font-size: .98rem; }
body.is-beranda .stat-card { padding: 16px; }
.menu-section-label {
    margin: 18px 0 10px;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #6a8474;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}
.menu-tile {
    display: block; text-decoration: none; color: inherit;
    padding: 18px 16px; min-height: 104px;
}
.menu-tile.yellow { background: linear-gradient(180deg, #fff 0%, #fff8d6 100%); }
.menu-tile small { display: block; color: var(--muted); margin-top: 6px; }
body.is-beranda .menu-grid {
    margin-top: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
body.is-beranda .menu-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    min-height: 118px;
    padding: 14px 12px;
    border: 1px solid #e6efe8;
    transition: transform .18s ease, box-shadow .18s ease;
}
body.is-beranda .menu-tile:hover,
body.is-beranda .menu-tile:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(16, 48, 32, .1);
    color: inherit;
}
.menu-copy { min-width: 0; flex: 1; }
.menu-copy strong, .menu-copy small { display: block; }
.menu-ico {
    width: 42px; height: 42px; border-radius: 14px; flex: 0 0 auto;
    display: grid; place-items: center;
    margin-bottom: 0;
    background: #e7f6ee;
    color: #0b5c38;
}
body.is-beranda .menu-tile strong { font-size: .92rem; line-height: 1.25; }
body.is-beranda .menu-tile small { margin-top: 2px; font-size: .75rem; }
.menu-tile.yellow .menu-ico {
    background: #fff1b3;
    color: #6a5200;
}
.menu-tile.is-done .menu-ico {
    background: #0f7a4a;
    color: #fff;
}
.menu-tile strong { display: block; font-size: .98rem; font-weight: 800; }
.menu-tile.is-done small { color: #0b5c38; font-weight: 700; }

.map-box { height: 220px; border-radius: 16px; overflow: hidden; }
.camera-wrap {
    position: relative;
    background: #102318;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    max-height: 420px;
}
.camera-wrap video, .camera-wrap img, .camera-wrap canvas {
    width: 100%; height: 100%; object-fit: cover;
}
.status-list { padding: 14px 16px; }
.st-item { padding: 6px 0; font-weight: 600; }
.st-item.ok { color: var(--green-dark); }
.st-item.bad { color: #9a3b2f; }
.detail-box { background: #f3faf5; border-radius: 12px; padding: 12px; }

.btn-success { background: var(--green); border-color: var(--green); }
.btn-success:hover, .btn-success:focus { background: var(--green-dark); border-color: var(--green-dark); }
.btn-lg { min-height: 52px; font-weight: 700; }
.form-control, .form-select { min-height: 48px; }

.mobile-nav {
    position: fixed; left: 0; right: 0; bottom: 0;
    background: #fff; display: flex; justify-content: space-around;
    padding: 10px 6px calc(10px + env(safe-area-inset-bottom));
    box-shadow: 0 -8px 20px rgba(0,0,0,.06);
    z-index: 20;
}
.mobile-nav a {
    text-decoration: none; color: var(--muted); font-size: .78rem; font-weight: 700;
    padding: 8px 6px;
}
.mobile-nav a.active { color: var(--green); }

.select2-container { width: 100% !important; }

body.is-presensi .app-content { max-width: none; }
.presensi-page { display: flex; flex-direction: column; gap: 12px; }
.presensi-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 16px;
    border-radius: 22px;
    color: #fff;
    background:
        radial-gradient(circle at 92% -10%, rgba(245, 197, 24, .5), transparent 42%),
        linear-gradient(155deg, #12a05c 0%, #0c7a46 52%, #065833 100%);
    box-shadow: 0 14px 32px rgba(8, 48, 28, .16);
}
.presensi-orb {
    position: absolute; right: -24px; top: -28px;
    width: 110px; height: 110px; border-radius: 50%;
    background: rgba(255, 229, 106, .26); pointer-events: none;
}
.presensi-hero-copy, .presensi-clock { position: relative; z-index: 1; }
.presensi-hero-copy h2 {
    margin: 8px 0 4px;
    font-size: 1.28rem;
    font-weight: 800;
    letter-spacing: -.02em;
}
.presensi-hero-copy p { margin: 0; color: rgba(255,255,255,.82); font-size: .86rem; }
.presensi-clock {
    min-width: 132px;
    padding: 10px 12px;
    border-radius: 16px;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.18);
}
.presensi-clock small { display: block; color: rgba(255,255,255,.76); font-size: .7rem; font-weight: 700; }
.presensi-clock strong { display: block; font-size: 1.35rem; letter-spacing: .02em; }
.presensi-main { display: flex; flex-direction: column; gap: 12px; }
.presensi-status { padding: 12px; }
.presensi-status .menu-card-title { margin-bottom: 8px; }
.presensi-page .status-grid { gap: 6px; }
.presensi-page .status-grid .st-item {
    padding: 6px 8px;
    border-radius: 10px;
    font-size: .7rem;
    line-height: 1.25;
    font-weight: 700;
    text-align: center;
}
.presensi-page .gps-box strong {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.presensi-page .gps-box strong::before {
    content: "";
    width: 9px; height: 9px; border-radius: 50%;
    background: #f5c518;
    box-shadow: 0 0 0 5px rgba(245, 197, 24, .18);
}
.presensi-page .gps-box.is-live strong::before {
    background: #3ad07a;
    box-shadow: 0 0 0 5px rgba(58, 208, 122, .22);
}
.presensi-page #gps-meta {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
}
.presensi-page #gps-meta span {
    margin: 0;
    padding: 8px 10px;
    border-radius: 12px;
    background: #f4faf6;
    font-size: .82rem;
    font-weight: 700;
    color: #163326;
}
.presensi-page .map-box { height: 200px; border: 1px solid #e6efe8; }
.presensi-page .camera-wrap { border: 3px solid #0f7a4a; box-shadow: 0 10px 24px rgba(15, 122, 74, .12); }
.presensi-page #btn-foto {
    min-height: 48px;
    border-radius: 14px;
    font-weight: 800;
}
.presensi-page .btn-menu-save { margin-top: 4px; }

@media (max-width: 767.98px) {
    .presensi-status { padding: 8px 10px; }
    .presensi-status .menu-card-title {
        font-size: .72rem;
        margin-bottom: 6px;
        letter-spacing: .04em;
        text-transform: uppercase;
        color: #6a8474;
    }
    .presensi-page .status-grid { gap: 5px; }
    .presensi-page .status-grid .st-item {
        padding: 5px 6px;
        font-size: .64rem;
        border-radius: 8px;
        line-height: 1.2;
    }
    .presensi-hero { padding: 14px; }
    .presensi-hero-copy h2 { font-size: 1.12rem; }
    .presensi-clock { min-width: 0; flex: 1; }
    .presensi-clock strong { font-size: 1.15rem; }
}

@media (min-width: 992px) {
    .app-content { padding: 12px 28px 36px; }
    .menu-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    body.is-beranda .app-topbar { padding: 18px 28px 8px; }
    .beranda-dash {
        grid-template-columns: minmax(0, 1.7fr) minmax(260px, .9fr);
        align-items: stretch;
        gap: 16px;
    }
    .profile-hero { padding: 22px 24px; height: 100%; }
    .profile-hero-inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 20px;
        height: 100%;
    }
    .profile-identity { flex: 1; }
    .profile-avatar { width: 68px; height: 68px; border-radius: 22px; font-size: 1.2rem; }
    .profile-copy h2 { margin: 8px 0; font-size: 1.55rem; }
    .profile-hero .jam-box {
        width: auto;
        min-width: 210px;
        max-width: 260px;
        flex: 0 0 auto;
    }
    body.is-beranda .stat-card {
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 22px 24px;
    }
    body.is-beranda .menu-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
    body.is-beranda .menu-tile {
        flex-direction: row;
        align-items: center;
        padding: 16px 18px;
        min-height: 76px;
        gap: 12px;
    }
    .menu-ico { width: 48px; height: 48px; border-radius: 16px; }
    body.is-beranda .menu-tile strong { font-size: 1rem; }
    body.is-beranda .menu-tile small { font-size: .82rem; }
    .presensi-main {
        display: grid;
        grid-template-columns: 1.15fr .85fr;
        gap: 16px;
        align-items: start;
    }
    .presensi-status { padding: 16px; }
    .presensi-page .status-grid { gap: 10px; }
    .presensi-page .status-grid .st-item {
        padding: 10px 12px;
        font-size: .86rem;
        border-radius: 14px;
        text-align: left;
    }
    .presensi-hero { padding: 22px 24px; }
    .presensi-hero-copy h2 { font-size: 1.6rem; }
    .presensi-page .map-box { height: 280px; }
    .presensi-page #gps-meta { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.swal2-container { z-index: 20000; }
.swal2-popup.swal-app {
    width: min(420px, calc(100vw - 32px));
    border-radius: 24px;
    padding: 8px 8px 22px;
    font-family: "Plus Jakarta Sans", system-ui, sans-serif;
    box-shadow: 0 24px 56px rgba(8, 40, 24, .24);
    overflow: hidden;
}
.swal2-popup.swal-app .swal2-icon { margin-top: 18px; border-width: 3px; }
.swal2-popup.swal-app .swal2-icon.swal2-info { border-color: #f5c518; color: #c39200; }
.swal2-popup.swal-app .swal2-icon.swal2-success { border-color: #0f7a4a; color: #0f7a4a; }
.swal2-popup.swal-app .swal2-icon.swal2-warning { border-color: #e3ad00; color: #c39200; }
.swal2-popup.swal-app .swal2-icon.swal2-error { border-color: #c45b4e; color: #c45b4e; }
.swal2-popup.swal-app .swal2-title {
    margin: 8px 16px 6px;
    font-size: 1.28rem;
    font-weight: 800;
    letter-spacing: -.02em;
    color: #123326;
}
.swal2-popup.swal-app .swal2-html-container {
    margin: 0 18px 8px;
    font-size: .95rem;
    line-height: 1.5;
    color: #4b6556;
}
.swal-app-confirm {
    min-height: 48px;
    border: 0;
    border-radius: 14px;
    padding: 0 22px;
    font-weight: 800;
    color: #2a2100;
    background: linear-gradient(180deg, #ffe56a 0%, #f0b800 100%);
    box-shadow: 0 10px 20px rgba(214, 164, 0, .22);
}
.swal-app-confirm:hover { filter: brightness(1.04); }
.swal-app-cancel {
    min-height: 48px;
    border: 0;
    border-radius: 14px;
    padding: 0 22px;
    font-weight: 800;
    color: #123326;
    background: #eef4ef;
}
.swal-app-cancel:hover { filter: brightness(0.98); }
.swal2-popup.swal-app-info {
    background:
        radial-gradient(circle at 90% -10%, rgba(245, 197, 24, .35), transparent 36%),
        #fff;
}
.swal-info-box {
    margin-top: 8px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #fff8d8;
    color: #5a4700;
    text-align: left;
    font-weight: 600;
}
.swal-error-box { background: #fff1ee; color: #6b2d26; }
.swal-error-box p { margin: 0 0 8px; }
.swal-error-box p:last-child { margin-bottom: 0; }
.swal-error-hint { font-weight: 800; color: #8a3329; }
.swal-info-kicker {
    display: inline-block;
    margin-bottom: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    background: #0f7a4a;
    color: #fff;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

body.is-izin .app-content { max-width: none; }
.izin-page { display: flex; flex-direction: column; gap: 12px; }
.izin-toolbar {
    display: flex;
    gap: 10px;
    align-items: stretch;
    flex-wrap: wrap;
}
.izin-search { flex: 1 1 220px; margin: 0; }
.izin-search .form-control {
    min-height: 48px;
    border-radius: 14px;
    border-color: #d7e8dc;
    font-weight: 600;
}
.izin-ajukan {
    flex: 0 0 auto;
    min-width: 160px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}
.izin-back {
    position: relative;
    z-index: 1;
    align-self: center;
    min-height: 44px;
    padding: 8px 16px;
    border-radius: 14px;
    font-weight: 800;
    color: #163326;
    background: #ffe56a;
    text-decoration: none;
}
.izin-back:hover { color: #163326; filter: brightness(1.04); }
.izin-list { display: flex; flex-direction: column; gap: 10px; }
.izin-card {
    background: #fff;
    border: 1px solid #e6efe8;
    border-radius: 18px;
    padding: 14px 16px;
    box-shadow: 0 8px 20px rgba(8, 48, 28, .06);
}
.izin-card.d-none,
.izin-card[hidden] { display: none !important; }
.izin-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}
.izin-kode {
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .04em;
    color: #0f7a4a;
    background: #e8f8ef;
    border-radius: 999px;
    padding: 4px 10px;
    word-break: break-all;
}
.izin-badge {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.izin-badge.is-pending { background: #fff3c4; color: #7a5a00; }
.izin-badge.is-approved { background: #d9f6e5; color: #0b6b3c; }
.izin-badge.is-rejected { background: #fde3e3; color: #9b1c1c; }
.izin-badge.is-revision { background: #e7eefc; color: #1d4ed8; }
.izin-badge.is-done { background: #eef2f0; color: #3d5248; }
.izin-card h3 {
    margin: 0 0 6px;
    font-size: 1.02rem;
    font-weight: 800;
    color: #123326;
    line-height: 1.35;
}
.izin-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin: 0;
    color: #4d6558;
    font-size: .86rem;
    font-weight: 600;
}
.izin-alasan {
    margin: 10px 0 0;
    padding: 10px 12px;
    border-radius: 12px;
    background: #f4faf6;
    color: #254334;
    font-size: .86rem;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.izin-card-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
}
.izin-hapus {
    min-height: 40px;
    border: 0;
    border-radius: 12px;
    padding: 0 16px;
    font-weight: 800;
    color: #9b1c1c;
    background: #fde3e3;
}
.izin-hapus:hover, .izin-hapus:focus {
    color: #7f1212;
    background: #f8d0d0;
}
.izin-empty-filter {
    margin: 0;
    padding: 16px;
    text-align: center;
    font-weight: 700;
    color: #5a6d63;
}
.izin-form .form-label { font-weight: 700; color: #163326; }
.izin-form .form-control,
.izin-form .form-select {
    border-radius: 14px;
    border-color: #d7e8dc;
}
.izin-dates-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 1rem;
}
.izin-help { display: block; margin-top: 6px; color: #5a6d63; font-weight: 600; }
.izin-badge.is-ok { background: #d9f6e5; color: #0b6b3c; }
.izin-badge.is-late { background: #fff3c4; color: #7a5a00; }
.izin-badge.is-bad { background: #fde3e3; color: #9b1c1c; }
.izin-badge.is-dinas { background: #e7eefc; color: #1d4ed8; }
body.is-laporan .app-content { max-width: none; }
.laporan-page { display: flex; flex-direction: column; gap: 12px; }
.laporan-filter .form-label { font-weight: 700; color: #163326; }
.laporan-filter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.laporan-filter-aksi { grid-column: 1 / -1; }
.laporan-filter .form-control {
    min-height: 44px;
    border-radius: 14px;
    border-color: #d7e8dc;
}
.laporan-tabs { gap: 6px; }
.laporan-page .presensi-clock strong { font-size: 1rem; line-height: 1.25; }
@media (min-width: 768px) {
    .izin-dates-row { grid-template-columns: 1fr 1fr; }
    .izin-card { padding: 16px 18px; }
    .laporan-filter-grid { grid-template-columns: 1.2fr 1.2fr .7fr .7fr auto; }
    .laporan-filter-aksi { grid-column: auto; align-self: end; }
}

/* Popup informasi beranda (Fancybox) */
.info-fancybox .fancybox__backdrop { background: rgba(0, 0, 0, .72); }
.info-fancybox .fancybox__slide { padding: 52px 12px 28px; }
.info-fancybox .fancybox__content {
    max-width: 88vw;
    max-height: 72vh;
    padding: 0;
    background: transparent;
    box-shadow: none;
}
.info-fancybox .f-button.is-close,
.info-fancybox .fancybox__button--close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    color: #424242;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .22);
}
.info-popup-slide {
    position: relative;
    width: min(88vw, 520px);
    max-height: 72vh;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 16px;
    background: #fff;
    cursor: pointer;
}
.info-popup-slide img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 72vh;
    object-fit: contain;
    background: #111;
}
.info-popup-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 10px 12px;
    background: rgba(0, 0, 0, .78);
    color: #fff;
    font-size: .92rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.35;
}
.info-popup-fallback {
    display: none;
    min-height: 180px;
    padding: 24px 18px;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: 700;
    color: #163326;
}
.info-popup-slide.is-broken {
    background: #fff;
    min-height: 180px;
}
.info-popup-slide.is-broken img,
.info-popup-slide.is-broken .info-popup-caption { display: none; }
.info-popup-slide.is-broken .info-popup-fallback { display: flex; }
.info-fancybox .f-carousel__dots,
.info-fancybox .fancybox__carousel .f-carousel__dots {
    margin-top: 12px;
}
.info-fancybox .f-carousel__dot {
    background: rgba(255, 255, 255, .45);
}
.info-fancybox .f-carousel__dot.is-selected,
.info-fancybox .f-carousel__dot.is-current {
    background: #fff;
    width: 18px;
    border-radius: 8px;
}
.info-detail-card h3 {
    margin: 0 0 12px;
    font-size: 1.28rem;
    font-weight: 800;
    color: #0a2e6e;
}
.info-detail-date {
    margin: 0 0 8px;
    color: #6a8474;
    font-weight: 600;
}
.info-detail-figure {
    margin: 0 0 16px;
    overflow: hidden;
    border-radius: 14px;
    background: #e8eef5;
}
.info-detail-figure img {
    display: block;
    width: 100%;
    max-height: 360px;
    object-fit: cover;
}
.info-detail-body {
    color: #163326;
    line-height: 1.6;
    overflow-wrap: anywhere;
}
.info-detail-body p { margin: 0 0 10px; }
.info-detail-file { display: inline-flex; margin-top: 16px; }

.atasan-modal {
    border: 0;
    border-radius: 22px;
    overflow: hidden;
}
.atasan-modal .modal-header {
    border: 0;
    padding: 18px 18px 8px;
}
.atasan-modal .modal-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #163326;
}
.atasan-modal .modal-body { padding: 8px 18px 12px; }
.atasan-modal .modal-footer {
    border: 0;
    padding: 8px 18px 18px;
}
.atasan-modal .select2-container .select2-selection--single {
    min-height: 48px;
    border-radius: 14px;
    border-color: #d7e8dc;
    display: flex;
    align-items: center;
    padding: 4px 8px;
}
body > .select2-container--open,
#modal-atasan .select2-container--open {
    z-index: 20050;
}
