:root {
    --panel: rgba(255, 255, 255, .14);
    --panel-strong: rgba(255, 255, 255, .2);
    --border: rgba(255, 255, 255, .28);
    --text: #f8fbff;
    --muted: rgba(248, 251, 255, .68);
    --nav-text: rgba(255, 255, 255, .78);
    --field-bg: rgba(255, 255, 255, .1);
    --field-border: rgba(255, 255, 255, .24);
    --table-border: rgba(255, 255, 255, .12);
    --primary: #38bdf8;
    --accent: #34d399;
    --danger: #fb7185;
    --warning: #fbbf24;
}

* {
    letter-spacing: 0;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(56, 189, 248, .36), transparent 32rem),
        radial-gradient(circle at bottom right, rgba(52, 211, 153, .24), transparent 30rem),
        linear-gradient(135deg, #162033 0%, #26364d 48%, #153631 100%);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body[data-theme="light"] {
    --panel: rgba(255, 255, 255, .72);
    --panel-strong: rgba(255, 255, 255, .88);
    --border: rgba(20, 35, 55, .14);
    --text: #172033;
    --muted: rgba(23, 32, 51, .68);
    --nav-text: rgba(23, 32, 51, .78);
    --field-bg: rgba(255, 255, 255, .72);
    --field-border: rgba(20, 35, 55, .18);
    --table-border: rgba(20, 35, 55, .1);
    background:
        radial-gradient(circle at top left, rgba(56, 189, 248, .22), transparent 32rem),
        radial-gradient(circle at bottom right, rgba(52, 211, 153, .18), transparent 30rem),
        linear-gradient(135deg, #f7fbff 0%, #eef6fb 48%, #f4fbf8 100%);
}

.glass-panel {
    background: var(--panel);
    border: 1px solid var(--border);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .24);
    backdrop-filter: blur(22px) saturate(145%);
    -webkit-backdrop-filter: blur(22px) saturate(145%);
    border-radius: 8px;
}

.app-shell {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    min-height: 100vh;
    padding: 18px;
    gap: 18px;
}

.sidebar {
    position: sticky;
    top: 18px;
    height: calc(100vh - 36px);
    padding: 18px;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.sidebar-nav {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
    min-height: 0;
    flex-wrap: nowrap !important;
    align-content: stretch;
}

.sidebar-nav::-webkit-scrollbar {
    width: 6px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .22);
    border-radius: 999px;
}

.menu-group {
    border-radius: 8px;
    width: 100%;
    flex: 0 0 auto;
}

.menu-group summary {
    cursor: pointer;
    color: var(--nav-text);
    border-radius: 8px;
    padding: .72rem .8rem;
    display: flex;
    align-items: center;
    gap: .65rem;
    list-style: none;
    user-select: none;
}

.menu-group summary::-webkit-details-marker {
    display: none;
}

.menu-group summary::after {
    content: "\F282";
    font-family: "bootstrap-icons";
    margin-left: auto;
    font-size: .8rem;
    transition: transform .2s ease;
}

.menu-group[open] summary::after {
    transform: rotate(180deg);
}

.menu-group summary:hover {
    color: var(--text);
    background: rgba(255, 255, 255, .14);
}

.menu-group.active-parent > summary {
    color: var(--text);
    font-weight: 800;
    background:
        linear-gradient(135deg, rgba(56, 189, 248, .22), rgba(52, 211, 153, .12));
    border: 1px solid rgba(255, 255, 255, .18);
    box-shadow:
        inset 3px 0 0 rgba(56, 189, 248, .9),
        0 10px 24px rgba(8, 47, 73, .12);
}

.menu-child {
    display: grid;
    gap: 3px;
    padding: 4px 0 6px 12px;
    width: 100%;
}

.menu-child .nav-link {
    padding: .55rem .7rem;
    font-size: .93rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    text-decoration: none;
    font-weight: 800;
    font-size: 1.35rem;
}

.brand img,
.login-logo img {
    width: 54px;
    height: 54px;
    object-fit: contain;
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .28));
}

.nav-link {
    color: var(--nav-text);
    border-radius: 8px;
    padding: .72rem .8rem;
    display: flex;
    align-items: center;
    gap: .65rem;
    width: 100%;
    flex: 0 0 auto;
    min-width: 0;
}

.nav-link i,
.menu-group summary i {
    flex: 0 0 auto;
}

.nav-link:hover,
.nav-link:focus {
    color: var(--text);
    background: rgba(255, 255, 255, .14);
}

.nav-link.active,
.nav-link[aria-current="page"] {
    color: var(--text);
    font-weight: 800;
    background:
        linear-gradient(135deg, rgba(56, 189, 248, .24), rgba(52, 211, 153, .14));
    border: 1px solid rgba(255, 255, 255, .18);
    box-shadow:
        inset 3px 0 0 rgba(56, 189, 248, .95),
        0 10px 24px rgba(8, 47, 73, .13);
}

.nav-link.active i,
.nav-link[aria-current="page"] i,
.menu-group.active-parent > summary i {
    color: #8ee7ff;
}

.menu-child .nav-link.active,
.menu-child .nav-link[aria-current="page"] {
    background:
        linear-gradient(135deg, rgba(56, 189, 248, .2), rgba(167, 139, 250, .1));
}

body[data-theme="light"] .nav-link.active,
body[data-theme="light"] .nav-link[aria-current="page"],
body[data-theme="light"] .menu-group.active-parent > summary {
    border-color: rgba(14, 165, 233, .2);
    background:
        linear-gradient(135deg, rgba(14, 165, 233, .16), rgba(16, 185, 129, .11));
    box-shadow:
        inset 3px 0 0 rgba(2, 132, 199, .9),
        0 10px 24px rgba(15, 23, 42, .08);
}

body[data-theme="light"] .nav-link.active i,
body[data-theme="light"] .nav-link[aria-current="page"] i,
body[data-theme="light"] .menu-group.active-parent > summary i {
    color: #0369a1;
}

.sidebar-user {
    margin-top: auto;
    padding-top: 18px;
    flex: 0 0 auto;
}

.user-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 2px;
}

.theme-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
}

.role-pill,
.team-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 .65rem;
    border-radius: 999px;
    background: rgba(56, 189, 248, .18);
    color: #dff7ff;
    font-size: .75rem;
    font-weight: 700;
}

body[data-theme="light"] .role-pill,
body[data-theme="light"] .team-badge {
    color: #036278;
    background: rgba(14, 165, 233, .13);
}

.content {
    min-width: 0;
    padding: 10px 6px 28px;
}

.page-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 22px;
    animation: riseIn .55s ease both;
    position: relative;
    z-index: 1100;
}

.eyebrow {
    color: #a7f3d0;
    text-transform: uppercase;
    font-size: .78rem;
    font-weight: 800;
}

h1 {
    margin: .2rem 0 .35rem;
    font-weight: 850;
    font-size: clamp(1.8rem, 3vw, 3rem);
}

.page-heading p,
.section-title span,
.metric span {
    color: var(--muted);
}

.heading-actions {
    padding: .8rem 1rem;
    display: inline-flex;
    gap: .55rem;
    align-items: center;
    white-space: nowrap;
}

.dashboard-actions {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.inbox-notify {
    position: relative;
    padding: .72rem .9rem;
    display: inline-flex;
    gap: .65rem;
    align-items: center;
    min-width: 132px;
    z-index: 1200;
}

.inbox-notify i {
    color: #fbbf24;
    font-size: 1.25rem;
}

.inbox-notify strong {
    display: block;
    line-height: 1;
}

.inbox-notify span {
    color: var(--muted);
    font-size: .78rem;
}

.inbox-list {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 260px;
    padding: 8px;
    border-radius: 8px;
    background: rgba(22, 32, 51, .96);
    border: 1px solid var(--border);
    box-shadow: 0 18px 44px rgba(0, 0, 0, .28);
    z-index: 4000;
}

.inbox-notify:hover .inbox-list,
.inbox-notify:focus-within .inbox-list {
    display: grid;
    gap: 4px;
}

.inbox-list a {
    color: #f8fbff;
    text-decoration: none;
    padding: .45rem .55rem;
    border-radius: 8px;
}

.inbox-list a:hover {
    background: rgba(255, 255, 255, .12);
}

body[data-theme="light"] .inbox-list {
    background: rgba(255, 255, 255, .98);
}

body[data-theme="light"] .inbox-list a {
    color: #172033;
}

.summary-grid,
.service-cards,
.dashboard-grid {
    display: grid;
    gap: 16px;
}

.summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.summary-grid-four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
}

.service-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    align-items: start;
}

.metric,
.chart-panel,
.form-panel,
.table-panel,
.service-card {
    padding: 18px;
    animation: riseIn .55s ease both;
}

.metric {
    display: grid;
    gap: 6px;
}

.metric i {
    color: #9ee7ff;
    font-size: 1.5rem;
}

.metric strong {
    font-size: 2rem;
}

.section-title {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: baseline;
    margin-bottom: 16px;
}

.section-title h2,
.service-card h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
}

.chart-panel canvas {
    width: 100%;
    height: 100% !important;
    display: block;
}

.chart-frame {
    position: relative;
    height: 320px;
    min-height: 0;
    width: 100%;
}

.chart-frame-sm {
    height: 260px;
}

.chart-frame-lg {
    height: 380px;
}

.infographic-filter {
    padding: 16px 18px;
    margin-bottom: 18px;
}

.date-range-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: .72rem .9rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    background: rgba(255, 255, 255, .1);
    font-weight: 700;
}

body[data-theme="light"] .date-range-pill {
    background: rgba(255, 255, 255, .72);
}

.infographic-subheading {
    margin-top: 34px;
}

.infographic-table {
    max-height: 320px;
    overflow: auto;
}

.modal-table-scroll {
    max-height: 68vh;
}

.map-panel {
    padding: 12px;
    position: relative;
    z-index: 1;
}

#picMap {
    width: 100%;
    min-height: 520px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, .08);
    position: relative;
    z-index: 1;
}

.leaflet-pane,
.leaflet-top,
.leaflet-bottom {
    z-index: 1;
}

.leaflet-container {
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.pic-popup h3 {
    margin: 0 0 6px;
    font-size: 1rem;
}

.pic-popup ol {
    margin: 0;
    padding-left: 1.1rem;
}

.service-card {
    color: var(--text);
    text-decoration: none;
    transition: transform .22s ease, background .22s ease;
}

.service-card-button {
    width: 100%;
    border: 1px solid var(--border);
    text-align: left;
    cursor: pointer;
}

.service-card:hover {
    color: var(--text);
    transform: translateY(-4px);
    background: var(--panel-strong);
}

.report-card {
    --card-a: rgba(56, 189, 248, .38);
    --card-b: rgba(52, 211, 153, .22);
    --card-c: rgba(255, 255, 255, .12);
    --card-icon: #8ee7ff;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background:
        linear-gradient(135deg, var(--card-a), transparent 45%),
        radial-gradient(circle at 92% 10%, var(--card-b), transparent 34%),
        linear-gradient(135deg, var(--panel), var(--card-c));
}

.report-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: linear-gradient(180deg, var(--card-icon), transparent);
    opacity: .9;
    z-index: -1;
}

.report-card::after {
    content: "";
    position: absolute;
    right: -38px;
    bottom: -54px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: var(--card-b);
    filter: blur(6px);
    opacity: .65;
    z-index: -1;
}

.report-card i {
    color: var(--card-icon);
}

.report-card h3 {
    color: var(--text);
}

.report-card p,
.task-report-option span {
    color: var(--muted) !important;
}

.report-card .team-badge {
    color: var(--card-icon);
    background: color-mix(in srgb, var(--card-icon) 22%, transparent);
}

.report-card-individual {
    --card-a: rgba(14, 165, 233, .42);
    --card-b: rgba(34, 211, 238, .26);
    --card-icon: #67e8f9;
}

.report-card-team,
.report-card-pm {
    --card-a: rgba(59, 130, 246, .42);
    --card-b: rgba(99, 102, 241, .25);
    --card-icon: #93c5fd;
}

.report-card-sla {
    --card-a: rgba(245, 158, 11, .42);
    --card-b: rgba(251, 191, 36, .24);
    --card-icon: #fbbf24;
}

.report-card-infographic {
    --card-a: rgba(236, 72, 153, .38);
    --card-b: rgba(168, 85, 247, .24);
    --card-icon: #f9a8d4;
}

.report-card-infographic-alt {
    --card-a: rgba(20, 184, 166, .42);
    --card-b: rgba(45, 212, 191, .24);
    --card-icon: #5eead4;
}

.report-card-ekinerja {
    --card-a: rgba(244, 63, 94, .42);
    --card-b: rgba(14, 165, 233, .24);
    --card-icon: #fda4af;
}

.report-card-sp {
    --card-a: rgba(16, 185, 129, .42);
    --card-b: rgba(132, 204, 22, .22);
    --card-icon: #86efac;
}

.report-card-tap_ni {
    --card-a: rgba(14, 165, 233, .42);
    --card-b: rgba(6, 182, 212, .24);
    --card-icon: #7dd3fc;
}

.report-card-pg {
    --card-a: rgba(99, 102, 241, .42);
    --card-b: rgba(59, 130, 246, .22);
    --card-icon: #a5b4fc;
}

.report-card-pmk {
    --card-a: rgba(168, 85, 247, .42);
    --card-b: rgba(217, 70, 239, .2);
    --card-icon: #d8b4fe;
}

.report-card-pi {
    --card-a: rgba(20, 184, 166, .42);
    --card-b: rgba(45, 212, 191, .22);
    --card-icon: #5eead4;
}

.report-card-kp {
    --card-a: rgba(245, 158, 11, .42);
    --card-b: rgba(251, 191, 36, .22);
    --card-icon: #fcd34d;
}

.report-card-status {
    --card-a: rgba(34, 197, 94, .42);
    --card-b: rgba(132, 204, 22, .22);
    --card-icon: #86efac;
}

.report-card-pemberhentian {
    --card-a: rgba(244, 63, 94, .42);
    --card-b: rgba(249, 115, 22, .2);
    --card-icon: #fda4af;
}

.report-card-task,
.report-card-task-consult {
    --card-a: rgba(6, 182, 212, .4);
    --card-b: rgba(14, 165, 233, .24);
    --card-icon: #7dd3fc;
}

.report-card-task-social {
    --card-a: rgba(249, 115, 22, .42);
    --card-b: rgba(244, 63, 94, .22);
    --card-icon: #fdba74;
}

.report-card-task-directive {
    --card-a: rgba(139, 92, 246, .42);
    --card-b: rgba(217, 70, 239, .2);
    --card-icon: #c4b5fd;
}

body[data-theme="light"] .report-card {
    --card-c: rgba(255, 255, 255, .62);
    box-shadow: 0 18px 48px rgba(15, 23, 42, .13);
}

.task-report-options {
    display: grid;
    gap: 12px;
}

.task-report-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    color: var(--text);
    text-decoration: none;
    border-radius: 8px;
    transition: transform .2s ease, background .2s ease;
}

.task-report-option:hover {
    color: var(--text);
    transform: translateY(-2px);
}

.task-report-option i {
    display: grid;
    place-items: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .14);
    font-size: 1.2rem;
}

.task-report-option strong,
.task-report-option span {
    display: block;
}

.ekinerja-periods {
    display: grid;
    gap: 18px;
}

.ekinerja-period {
    padding: 16px;
}

.ekinerja-period-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 14px;
}

.ekinerja-period-header h3 {
    margin: 0 0 4px;
    font-size: 1.08rem;
    font-weight: 900;
    color: var(--text);
}

.ekinerja-period-header p {
    margin: 0;
    color: var(--muted);
    font-size: .92rem;
}

.ekinerja-period-header .date-range-pill {
    flex: 0 0 auto;
}

.ekinerja-group + .ekinerja-group {
    margin-top: 22px;
}

.ekinerja-group h4 {
    margin: 0 0 12px;
    font-size: .98rem;
    font-weight: 900;
    color: var(--text);
}

.ekinerja-links {
    display: grid;
    gap: 12px;
}

.ekinerja-link-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 132px;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border-radius: 8px;
}

.ekinerja-link-info {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
}

.ekinerja-link-info > i {
    display: grid;
    place-items: center;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .14);
}

.ekinerja-link-info strong,
.ekinerja-link-info span,
.ekinerja-link-info code {
    display: block;
}

.ekinerja-link-info span {
    color: var(--muted);
    font-size: .92rem;
    line-height: 1.35;
}

.ekinerja-link-info code {
    margin-top: 6px;
    padding: .35rem .45rem;
    border-radius: 6px;
    color: var(--card-icon);
    background: rgba(0, 0, 0, .16);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    font-size: .88rem;
}

body[data-theme="light"] .ekinerja-link-info code {
    background: rgba(15, 23, 42, .06);
}

.glass-modal {
    --modal-bg: rgba(22, 32, 51, .98);
}

.glass-modal .modal-dialog {
    max-width: min(1120px, calc(100vw - 32px));
}

.glass-modal .modal-content {
    max-height: calc(100vh - 48px);
    overflow: hidden;
    color: var(--text);
    background:
        linear-gradient(135deg, rgba(56, 189, 248, .13), transparent 34%),
        var(--modal-bg);
    border: 1px solid rgba(255, 255, 255, .22);
    box-shadow: 0 26px 70px rgba(0, 0, 0, .52);
}

.glass-modal .modal-header {
    position: sticky;
    top: 0;
    z-index: 4;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 22px 24px 14px;
    background:
        linear-gradient(135deg, rgba(56, 189, 248, .12), transparent 38%),
        var(--modal-bg);
    border-bottom: 1px solid rgba(255, 255, 255, .12) !important;
}

.glass-modal .modal-body {
    padding: 18px 24px 24px;
    overflow-y: auto;
}

.modal-heading-text {
    min-width: 0;
}

.modal-heading-text .modal-title {
    margin: 4px 0 6px;
    font-size: clamp(1.35rem, 2vw, 1.75rem);
    line-height: 1.15;
    font-weight: 900;
}

.modal-heading-text p {
    max-width: 820px;
    margin: 0;
    color: var(--muted);
    font-size: .98rem;
    line-height: 1.45;
}

.glass-modal .modal-close-btn {
    position: relative;
    z-index: 5;
    flex: 0 0 auto;
    margin-left: auto;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, .12);
    opacity: .86;
}

.glass-modal .modal-close-btn:hover {
    opacity: 1;
    background-color: rgba(255, 255, 255, .18);
}

body[data-theme="light"] .glass-modal {
    --modal-bg: rgba(248, 252, 255, .98);
}

body[data-theme="light"] .glass-modal .btn-close-white {
    filter: invert(1) grayscale(100%) brightness(70%);
}

@media (max-width: 768px) {
    .glass-modal .modal-dialog {
        max-width: calc(100vw - 16px);
        margin: 8px auto;
    }

    .glass-modal .modal-header,
    .glass-modal .modal-body {
        padding-left: 14px;
        padding-right: 14px;
    }

    .ekinerja-period-header {
        display: grid;
    }

    .ekinerja-period-header .date-range-pill {
        width: 100%;
        justify-content: center;
    }

    .ekinerja-link-card {
        grid-template-columns: 1fr;
    }

    .ekinerja-link-card .btn {
        width: 100%;
    }
}

.status-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-top: 18px;
}

.status-row span {
    display: grid;
    gap: 3px;
    padding: .6rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, .1);
    color: var(--muted);
    font-size: .82rem;
}

.status-row b {
    color: var(--text);
}

.history-clock {
    border-color: rgba(148, 163, 184, .55);
    color: #94a3b8;
}

.history-clock-ms {
    border-color: rgba(52, 211, 153, .8);
    color: #34d399;
}

.history-clock-bts {
    border-color: rgba(251, 191, 36, .85);
    color: #fbbf24;
}

.history-clock-tms {
    border-color: rgba(251, 113, 133, .85);
    color: #fb7185;
}

.search-summary {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.search-results {
    display: grid;
    gap: 16px;
}

.search-result-card {
    padding: 18px;
}

.search-result-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
}

.search-result-head h2 {
    margin: 8px 0 6px;
    font-size: 1.2rem;
    font-weight: 900;
}

.search-result-head p {
    margin: 0;
    color: var(--muted);
}

.search-result-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 14px 0;
}

.search-result-meta span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: .45rem .65rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, .1);
    color: var(--text);
}

.history-mini-list {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.history-mini-list > div {
    display: grid;
    grid-template-columns: auto minmax(0, 170px) minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: .65rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, .08);
}

.history-mini-list strong {
    color: var(--muted);
    font-size: .86rem;
}

.history-mini-list p {
    margin: 0;
    color: var(--text);
}

.search-result-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
}

body[data-theme="light"] .search-result-meta span,
body[data-theme="light"] .history-mini-list > div {
    background: rgba(15, 23, 42, .05);
}

.pending-hint {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: .45rem .65rem;
    border-radius: 999px;
    color: var(--muted);
    background: rgba(255, 255, 255, .1);
    font-size: .86rem;
    font-weight: 700;
}

.card-hint-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.sla-hint {
    color: var(--text);
}

.sla-hint small {
    color: var(--muted);
    font-size: .76rem;
    font-weight: 600;
}

.form-control,
.form-select {
    color: var(--text);
    background-color: var(--field-bg);
    border: 1px solid var(--field-border);
    border-radius: 8px;
}

.form-control:focus,
.form-select:focus {
    color: var(--text);
    background-color: var(--field-bg);
    border-color: rgba(56, 189, 248, .8);
    box-shadow: 0 0 0 .2rem rgba(56, 189, 248, .18);
}

.form-select option {
    color: #172033;
}

.form-label {
    color: var(--text);
    font-weight: 650;
}

.btn-primary {
    border: 0;
    background: linear-gradient(135deg, #0ea5e9, #10b981);
    box-shadow: 0 12px 28px rgba(14, 165, 233, .22);
}

.btn-breath {
    animation: breath 2.8s ease-in-out infinite;
}

.table {
    --bs-table-bg: transparent;
    --bs-table-border-color: var(--table-border);
    --bs-table-color: var(--text);
    --bs-table-hover-color: var(--text);
    --bs-table-hover-bg: rgba(255, 255, 255, .1);
}

.status-chip {
    display: inline-flex;
    min-width: 54px;
    justify-content: center;
    padding: .28rem .55rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 800;
}

.status-ms { background: rgba(52, 211, 153, .22); color: #b6ffe4; }
.status-bts { background: rgba(251, 191, 36, .2); color: #fde68a; }
.status-tms { background: rgba(251, 113, 133, .22); color: #fecdd3; }
.status-hold { background: rgba(148, 163, 184, .22); color: #e2e8f0; }
.status-di-ajukan { background: rgba(56, 189, 248, .22); color: #dff7ff; }

body[data-theme="light"] .status-ms { color: #047857; }
body[data-theme="light"] .status-bts { color: #92400e; }
body[data-theme="light"] .status-tms { color: #be123c; }
body[data-theme="light"] .status-hold { color: #475569; }
body[data-theme="light"] .status-di-ajukan { color: #0369a1; }

.toastish {
    position: sticky;
    top: 18px;
    z-index: 10;
    color: var(--text);
    background: var(--panel-strong);
    border: 1px solid var(--border) !important;
    box-shadow: 0 18px 48px rgba(0, 0, 0, .2);
}

.toastish.alert-success {
    color: #d1fae5;
    background: linear-gradient(135deg, rgba(16, 185, 129, .2), rgba(255, 255, 255, .13));
}

.toastish.alert-danger {
    color: #ffe4e6;
    background: linear-gradient(135deg, rgba(251, 113, 133, .22), rgba(255, 255, 255, .13));
}

.toastish.alert-warning {
    color: #fef3c7;
    background: linear-gradient(135deg, rgba(251, 191, 36, .22), rgba(255, 255, 255, .13));
}

.toastish i {
    opacity: .9;
}

body[data-theme="light"] .toastish {
    color: #172033;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 18px 48px rgba(20, 35, 55, .12);
}

body[data-theme="light"] .toastish.alert-success {
    color: #065f46;
    background: linear-gradient(135deg, rgba(16, 185, 129, .15), rgba(255, 255, 255, .94));
}

body[data-theme="light"] .toastish.alert-danger {
    color: #9f1239;
    background: linear-gradient(135deg, rgba(244, 63, 94, .14), rgba(255, 255, 255, .94));
}

body[data-theme="light"] .toastish.alert-warning {
    color: #92400e;
    background: linear-gradient(135deg, rgba(251, 191, 36, .18), rgba(255, 255, 255, .94));
}

.modal-content {
    color: var(--text);
}

.modal {
    z-index: 7000;
}

.modal-backdrop {
    z-index: 6990;
}

.modal-backdrop.show {
    opacity: .32;
}

.modal-glass {
    background: rgba(22, 32, 51, .97);
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 8px;
    box-shadow: 0 26px 70px rgba(0, 0, 0, .42);
    color: #f8fbff;
}

body[data-theme="light"] .modal-glass {
    background: rgba(255, 255, 255, .98);
    border-color: rgba(20, 35, 55, .14);
    color: #172033;
}

body[data-theme="light"] .btn-close-white {
    filter: invert(1) grayscale(100%) brightness(0);
}

.timeline {
    display: grid;
    gap: 18px;
}

.timeline-item {
    display: grid;
    grid-template-columns: 18px 1fr;
    gap: 12px;
}

.timeline-dot {
    width: 12px;
    height: 12px;
    margin-top: 7px;
    border-radius: 999px;
    background: #38bdf8;
    box-shadow: 0 0 0 6px rgba(56, 189, 248, .16);
}

.login-body {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 22px;
}

.login-wrap {
    width: min(440px, 100%);
}

.login-card {
    padding: 28px;
}

.login-logo {
    display: flex;
    gap: 14px;
    align-items: center;
}

.login-logo h1 {
    font-size: 2.25rem;
    margin: 0;
}

.login-logo p {
    margin: 0;
    color: var(--muted);
}

.login-hint {
    margin-top: 18px;
    color: var(--muted);
    font-size: .85rem;
}

body[data-theme="light"] .text-white-50 {
    color: rgba(23, 32, 51, .58) !important;
}

body[data-theme="light"] .btn-outline-light {
    color: #172033;
    border-color: rgba(23, 32, 51, .22);
}

body[data-theme="light"] .btn-outline-light:hover {
    color: #0f172a;
    background: rgba(23, 32, 51, .08);
}

@keyframes breath {
    0%, 100% { transform: translateY(0); box-shadow: 0 12px 28px rgba(14, 165, 233, .22); }
    50% { transform: translateY(-1px); box-shadow: 0 16px 34px rgba(16, 185, 129, .28); }
}

@keyframes riseIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 980px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: relative;
        top: 0;
        height: auto;
    }

    .dashboard-grid,
    .summary-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .app-shell {
        padding: 10px;
    }

    .page-heading,
    .section-title {
        display: grid;
    }

    .heading-actions {
        width: 100%;
        justify-content: center;
    }

    #picMap {
        min-height: 420px;
    }
}

@media (max-width: 992px) {
    .service-cards {
        grid-template-columns: 1fr;
    }
}
