/* File Manager UI â€” modern glass/glow "control room" look, single fixed theme. */

:root {
    --bg-app: #0a0f1e;
    --bg-panel: #101830;
    --bg-elevated: #141f3a;
    --bg-hover: #16223f;
    --bg-hover-strong: #1c2c4d;
    --bg-selected: rgba(56, 189, 248, 0.16);
    --border-1: rgba(148, 163, 184, 0.10);
    --border-2: rgba(148, 163, 184, 0.16);
    --border-3: rgba(148, 163, 184, 0.24);
    --text-1: #cbd5e1;
    --text-strong: #f8fafc;
    --text-2: #94a3b8;
    --text-3: #7487a3;
    --text-4: #64789a;
    --text-label: #6b81a3;
    --text-disabled: #475569;
    --divider-faint: #24304d;
    --folder-color: #7db9ed;
    --accent: #38bdf8;
    --accent-rgb: 56, 189, 248;
    --accent-focus: #60d3fb;
    --accent-strong: #2563eb;
    --success: #22c55e;
    --success-rgb: 34, 197, 94;
    --error: #f43f5e;
    --error-rgb: 244, 63, 94;
    --error-hover: #e11d48;
    --warn: #f59e0b;
    --warn-rgb: 245, 158, 11;
    --purple: #a855f7;
    --purple-rgb: 168, 85, 247;
    --shine-sweep: linear-gradient(115deg, transparent 20%, rgba(255, 255, 255, 0.32) 46%, rgba(255, 255, 255, 0.05) 54%, transparent 80%);
    --glass-strong: rgba(16, 24, 48, 0.88);
    --glass-soft: rgba(11, 17, 34, 0.92);
    --grid-line: rgba(148, 163, 184, 0.05);
    --sparkle-1: rgba(255, 255, 255, 0.8);
    --sparkle-2: rgba(148, 197, 255, 0.7);
    --scrollbar-thumb: rgba(148, 163, 184, 0.25);
    color-scheme: dark;
}

/* ---- Shimmer / shine animations â€” a brief flash, then a long quiet gap before it repeats ---- */
@keyframes shine-sweep {
    0% {
        background-position: -140% 0;
    }

    10% {
        background-position: 140% 0;
    }

    100% {
        background-position: 140% 0;
    }
}

@keyframes border-shine {
    0% {
        background-position: -70% -70%, 0 0;
    }

    10% {
        background-position: 170% 170%, 0 0;
    }

    100% {
        background-position: 170% 170%, 0 0;
    }
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 5px rgba(var(--accent-rgb), 0.5);
    }

    50% {
        box-shadow: 0 0 11px rgba(var(--accent-rgb), 0.85);
    }
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 0.85;
    }
}

@media (prefers-reduced-motion: reduce) {

    .sidebar-brand-mark::after,
    .tb-btn-accent::after,
    .stat-card::before,
    .stat-card-icon::after,
    .sidebar-item.active::before,
    .content::before,
    .content {
        animation: none !important;
    }
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    height: 100%;
    background: var(--bg-app);
    color: var(--text-1);
    font-family: 'Plus Jakarta Sans', 'Segoe UI', sans-serif;
    font-size: 13px;
}

body {
    position: relative;
    overflow-x: hidden;
}

/* Shared scaffolding for the two theme-specific background scenes below
   ([data-theme="dark"]/[data-theme="sunset"] each fully override position/shape/animation) */
body::before,
body::after {
    content: "";
    position: fixed;
    z-index: 0;
    pointer-events: none;
    will-change: transform;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
}

[x-cloak] {
    display: none !important;
}

.explorer {
    position: relative;
    /* Tambahan itwilayah: aslinya z-index:1 (Folder tidak pakai modal
       Bootstrap). Modal Bootstrap di halaman yang belum dimigrasi bikin
       backdrop-nya (.modal-backdrop, z-index:1040) ditempel LANGSUNG ke
       <body>, DI LUAR .explorer - sedangkan .modal sendiri (z-index:1050)
       tetap di DALAM .explorer. Karena .explorer bikin stacking context
       sendiri, seluruh isinya (termasuk modal di dalamnya) ikut "terjebak"
       di level z-index:1 punya .explorer, jadi ketutup backdrop yang
       levelnya 1040 - modal jadi kelihatan pudar & tidak bisa diklik.
       Dinaikkan melebihi z-index tertinggi Bootstrap (tooltip:1070) supaya
       seluruh isi .explorer (termasuk modal manapun di dalamnya) selalu
       menang dari backdrop/tooltip yang ditempel ke <body>. */
    z-index: 1071;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.explorer,
.toolbar,
.addressbar,
.breadcrumbs,
.searchbar input,
.sidebar,
.sidebar-item,
.item-tile,
.statusbar,
.toast,
.modal-box,
.tb-btn {
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

/* Toolbar */
.toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 12px 16px;
    background: var(--glass-strong);
    border-bottom: 1px solid var(--border-1);
    flex-wrap: wrap;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: 0 1px 0 rgba(56, 189, 248, 0.08), 0 8px 24px rgba(2, 6, 20, 0.35);
    position: relative;
    z-index: 3;
}

.tb-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-2);
    padding: 7px 12px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 500;
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.tb-btn:hover:not(:disabled) {
    background: var(--bg-hover-strong);
    color: var(--text-strong);
}

.tb-btn:active:not(:disabled) {
    transform: scale(0.96);
}

.tb-btn:disabled {
    color: var(--text-disabled);
    cursor: not-allowed;
}

.tb-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.tb-sep {
    width: 1px;
    height: 22px;
    background: var(--border-2);
    margin: 0 6px;
}

/* Accent/danger toolbar variants for standout actions */
.tb-btn-accent {
    position: relative;
    overflow: hidden;
    color: #eaf6ff;
    background: linear-gradient(135deg, var(--accent-strong), var(--accent));
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(var(--accent-rgb), 0.35);
}

.tb-btn-accent::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--shine-sweep);
    background-size: 200% 100%;
    animation: shine-sweep 9s ease-in-out infinite;
}

.tb-btn-accent span,
.tb-btn-accent svg {
    position: relative;
}

.tb-btn-accent:hover:not(:disabled) {
    filter: brightness(1.08);
    box-shadow: 0 6px 18px rgba(var(--accent-rgb), 0.45);
}

.tb-btn-danger {
    color: var(--error);
}

.tb-btn-danger:hover:not(:disabled) {
    background: rgba(var(--error-rgb), 0.14);
}

/* Theme switch â€” a sliding pill toggle between Gelap (dark) and Senja (sunset) */
.theme-toggle-wrap {
    margin-left: auto;
    display: flex;
    align-items: center;
}

.theme-switch {
    position: relative;
    width: 58px;
    height: 30px;
    flex-shrink: 0;
    border-radius: 999px;
    border: 1px solid var(--border-2);
    padding: 0;
    overflow: hidden;
    background: linear-gradient(160deg, #05070f 0%, #0c1526 40%, #1c2c4d 100%);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5), inset 0 -6px 10px -6px rgba(56, 90, 150, 0.3);
    transition: background 0.6s cubic-bezier(0.65, 0, 0.35, 1), border-color 0.3s ease, box-shadow 0.3s ease;
}

.theme-switch:hover {
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.35), 0 0 0 3px rgba(var(--accent-rgb), 0.14);
}

.theme-switch.is-sunset {
    background: linear-gradient(135deg, #4a1d55 0%, #c2542f 55%, #f0954f 100%);
}

.theme-switch-cloud {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%) scale(0.85);
    width: 16px;
    height: 10px;
    color: #fff;
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.65, 0, 0.35, 1);
}

.theme-switch.is-sunset .theme-switch-cloud {
    opacity: 0.95;
    transform: translateY(-50%) scale(1);
}

.theme-switch-stars {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 3px;
    opacity: 1;
    transition: opacity 0.4s ease;
}

.theme-switch-stars span {
    width: 2.5px;
    height: 2.5px;
    border-radius: 50%;
    background: #cfe0ff;
    box-shadow: 0 0 3px rgba(200, 220, 255, 0.9);
    animation: theme-star-twinkle 2.4s ease-in-out infinite;
}

.theme-switch-stars span:nth-child(1) {
    animation-delay: 0s;
}

.theme-switch-stars span:nth-child(2) {
    width: 1.5px;
    height: 1.5px;
    transform: translateY(-5px);
    animation-delay: 0.5s;
}

.theme-switch-stars span:nth-child(3) {
    width: 2px;
    height: 2px;
    transform: translateY(4px);
    animation-delay: 1s;
}

.theme-switch-stars span:nth-child(4) {
    width: 1.5px;
    height: 1.5px;
    transform: translateY(-2px);
    animation-delay: 1.5s;
}

.theme-switch-stars span:nth-child(5) {
    width: 1px;
    height: 1px;
    transform: translateY(2px);
    animation-delay: 0.9s;
}

.theme-switch.is-sunset .theme-switch-stars {
    opacity: 0;
}

@keyframes theme-star-twinkle {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 1;
    }
}

.theme-switch-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 72% 78%, rgba(120, 130, 160, 0.4) 0%, rgba(120, 130, 160, 0) 42%),
        radial-gradient(circle at 28% 62%, rgba(120, 130, 160, 0.32) 0%, rgba(120, 130, 160, 0) 36%),
        radial-gradient(circle at 55% 25%, rgba(120, 130, 160, 0.26) 0%, rgba(120, 130, 160, 0) 30%),
        radial-gradient(circle at 35% 30%, #ffffff, #e4ecfb 55%, #b9c6e0 100%);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4), 0 0 12px 2px rgba(191, 210, 255, 0.4);
    transition: transform 0.55s cubic-bezier(0.65, 0, 0.35, 1), background 0.55s ease, box-shadow 0.55s ease;
}

.theme-switch.is-sunset .theme-switch-thumb {
    transform: translateX(28px);
    background: radial-gradient(circle at 35% 30%, #fff8e8, #ffd699 55%, #fb923c 100%);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4), 0 0 12px 2px rgba(255, 190, 120, 0.4);
}

.theme-switch-icon {
    width: 13px;
    height: 13px;
    opacity: 0;
    transform: scale(0.5) rotate(-20deg);
    transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.65, 0, 0.35, 1);
}

.theme-switch-icon.icon-moon {
    position: absolute;
    color: rgba(91, 107, 140, 0.65);
    opacity: 1;
    transform: scale(1.08) rotate(0deg);
    mix-blend-mode: multiply;
}

.theme-switch-icon.icon-moon path {
    fill: currentColor;
    stroke: none;
}

.theme-switch-icon.icon-sun {
    position: absolute;
    color: #c2410c;
}

.theme-switch.is-sunset .theme-switch-icon.icon-moon {
    opacity: 0;
    transform: scale(0.5) rotate(20deg);
}

.theme-switch.is-sunset .theme-switch-icon.icon-sun {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

@media (prefers-reduced-motion: reduce) {

    .theme-switch,
    .theme-switch-thumb,
    .theme-switch-cloud,
    .theme-switch-stars,
    .theme-switch-icon {
        transition: none;
    }

    .theme-switch-stars span {
        animation: none;
        opacity: 0.8;
    }
}

/* Sort / overflow dropdown menus */
.tb-menu {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.012));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 4px;
    min-width: 160px;
    z-index: 20;
    box-shadow: 0 16px 40px rgba(2, 6, 20, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Address bar */
.addressbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-1);
}

.breadcrumbs {
    flex: 1;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
    background: var(--bg-panel);
    border: 1px solid var(--border-2);
    border-radius: 10px;
    padding: 7px 12px;
    min-height: 20px;
}

.breadcrumbs a,
.breadcrumbs span.current {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    color: var(--text-2);
}

.breadcrumbs a:hover {
    background: var(--bg-hover-strong);
    color: var(--text-strong);
}

.breadcrumbs span.current {
    color: var(--text-strong);
    font-weight: 600;
}

.breadcrumbs .chev {
    color: var(--text-disabled);
    margin: 0 2px;
    font-size: 11px;
}

.searchbar {
    position: relative;
    width: 280px;
    flex-shrink: 0;
}

.searchbar svg {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    color: var(--text-3);
}

.searchbar input {
    width: 100%;
    background: var(--bg-panel);
    border: 1px solid var(--border-2);
    border-radius: 10px;
    color: var(--text-1);
    padding: 8px 10px 8px 30px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.searchbar input:focus {
    border-color: var(--accent-focus);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.18);
}

/* Body */
.body {
    flex: 1;
    display: flex;
    min-height: 0;
}

.sidebar {
    --sidebar-icon: var(--folder-color);
    width: 240px;
    flex-shrink: 0;
    background: var(--glass-soft);
    border-right: 1px solid var(--border-1);
    padding: 14px 10px;
    overflow-y: auto;
    overflow-x: hidden;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transition: width .25s ease, padding .25s ease, transform .25s ease;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 8px 16px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border-1);
}

.sidebar-brand-mark {
    position: relative;
    width: 44px;
    height: 44px;
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    background: transparent;
    border-radius: 12px;
    overflow: visible;
}

.sidebar-brand-mark .brand-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;

    filter:
        drop-shadow(0 4px 8px rgba(0, 0, 0, 0.35)) drop-shadow(0 0 8px rgba(var(--accent-rgb), 0.20));

    transition:
        transform 0.25s ease,
        filter 0.25s ease;
}

.sidebar-brand-mark .brand-logo:hover {
    transform: scale(1.08);

    filter:
        drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4)) drop-shadow(0 0 12px rgba(var(--accent-rgb), 0.40));
}

/* Default / mode gelap */
.brand-logo-dark {
    display: block;
}

.brand-logo-sunset {
    display: none;
}

/* Mode senja */
[data-theme="sunset"] .brand-logo-dark {
    display: none;
}

[data-theme="sunset"] .brand-logo-sunset {
    display: block;
}

.sidebar-brand-text {
    flex: 1;
    line-height: 1.3;
    min-width: 0;
}

.sidebar-brand-name {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-strong);
    letter-spacing: 0.01em;
}

.sidebar-brand-sub {
    margin-top: 3px;
    font-size: 10px;
    color: var(--text-label);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.sidebar-label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-label);
    padding: 10px 10px 4px;
    letter-spacing: 0.06em;
    font-weight: 700;
}

.sidebar-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 38px;
    padding: 8px 10px;
    margin-bottom: 2px;
    border-radius: 8px;
    color: var(--text-2);
    font-size: 13px;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.sidebar-item-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-item:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

.trash-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

.trash-icon {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.trash-icon-sunset,
[data-theme="sunset"] .trash-icon-dark {
    display: none;
}

[data-theme="sunset"] .trash-icon-sunset {
    display: block;
}

.sidebar-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--sidebar-icon);
    transition: color var(--theme-transition-duration) ease;
}

[data-theme="sunset"] .sidebar {
    --sidebar-icon: var(--folder-color);
}

.folder-icon {
    color: var(--folder-color);
    transition: color var(--theme-transition-duration) ease;
}

@media (prefers-reduced-motion: reduce) {
    .folder-icon {
        transition: none;
    }
}

.sidebar-item:hover > svg:not(.chevron),
.sidebar-item.active > svg:not(.chevron) {
    color: var(--accent-focus);
}

.sidebar-item:hover {
    background: var(--bg-hover);
    transform: translateX(2px);
}

.sidebar-item.active {
    background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.18), rgba(var(--accent-rgb), 0.04));
    color: var(--text-strong);
    font-weight: 600;
}

.sidebar-item.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    border-radius: 0 4px 4px 0;
    background: var(--accent);
    animation: pulse-glow 4s ease-in-out infinite;
}

.sidebar-item.trash-link svg {
    color: var(--text-3);
}

.sidebar-item.trash-link:hover svg {
    color: var(--error);
}

.sidebar-badge {
    margin-left: auto;
    background: var(--bg-hover-strong);
    color: var(--text-1);
    font-size: 11px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 999px;
    flex-shrink: 0;
    border: 1px solid var(--border-2);
}

.sidebar::-webkit-scrollbar,
.content::-webkit-scrollbar {
    width: 10px;
}

.sidebar::-webkit-scrollbar-track,
.content::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb,
.content::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.sidebar,
.content {
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) transparent;
}

.content {
    position: relative;
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    background-image: linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 34px 34px;
    animation: grid-drift 44s linear infinite;
}

@keyframes grid-drift {
    from {
        background-position: 0 0, 0 0;
    }

    to {
        background-position: 340px 340px, 340px 340px;
    }
}

.content::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        radial-gradient(1.6px 1.6px at 8% 15%, var(--sparkle-1), transparent 60%),
        radial-gradient(1.2px 1.2px at 18% 58%, var(--sparkle-2), transparent 60%),
        radial-gradient(1.8px 1.8px at 32% 10%, var(--sparkle-1), transparent 60%),
        radial-gradient(1.3px 1.3px at 47% 74%, var(--sparkle-2), transparent 60%),
        radial-gradient(1.5px 1.5px at 61% 30%, var(--sparkle-1), transparent 60%),
        radial-gradient(1.2px 1.2px at 74% 54%, var(--sparkle-2), transparent 60%),
        radial-gradient(1.7px 1.7px at 87% 20%, var(--sparkle-1), transparent 60%),
        radial-gradient(1.3px 1.3px at 27% 86%, var(--sparkle-2), transparent 60%),
        radial-gradient(1.4px 1.4px at 94% 68%, var(--sparkle-1), transparent 60%),
        radial-gradient(1.1px 1.1px at 55% 90%, var(--sparkle-2), transparent 60%);
    background-repeat: no-repeat;
    animation: twinkle 8s ease-in-out infinite;
}

.empty-state {
    text-align: center;
    color: var(--text-4);
    padding: 80px 20px;
    font-size: 14px;
}

.empty-state svg {
    width: 56px;
    height: 56px;
    color: var(--accent);
    opacity: 0.7;
    margin-bottom: 14px;
    padding: 14px;
    box-sizing: content-box;
    border-radius: 50%;
    background: rgba(var(--accent-rgb), 0.10);
}

/* Grid view */
.item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
    gap: 6px;
}

.item-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px 8px 12px;
    border-radius: 12px;
    border: 1px solid transparent;
    text-align: center;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.item-tile:hover {
    background: var(--bg-hover);
    box-shadow: 0 8px 20px rgba(2, 6, 20, 0.4);
    transform: translateY(-2px);
}

.item-tile.selected {
    background: var(--bg-selected);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.18);
}

.item-tile input[type="checkbox"] {
    position: absolute;
    top: 6px;
    left: 6px;
    width: 15px;
    height: 15px;
    opacity: 0;
    accent-color: var(--accent);
    z-index: 2;
}

.item-tile:hover input[type="checkbox"],
.item-tile.selected input[type="checkbox"] {
    opacity: 1;
}

.item-icon-wrap {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
}

.item-icon-wrap svg {
    width: 48px;
    height: 48px;
}

.file-chip {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.file-chip-word {
    background: rgba(37, 99, 235, 0.18);
    color: #7db8f5;
}

.file-chip-excel {
    background: rgba(34, 197, 94, 0.16);
    color: #7fd9a6;
}

.file-chip-ppt {
    background: rgba(245, 158, 11, 0.18);
    color: #f5a35c;
}

.file-chip-pdf {
    background: rgba(244, 63, 94, 0.16);
    color: #f08080;
}

.file-chip-image {
    background: rgba(168, 85, 247, 0.18);
    color: #c79bf0;
}

.file-chip-zip {
    background: rgba(56, 189, 248, 0.16);
    color: #7fd4d4;
}

.file-chip-other {
    background: var(--bg-hover-strong);
    color: var(--text-2);
}

.item-name {
    font-size: 12px;
    color: var(--text-1);
    word-break: break-word;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-open-link {
    position: absolute;
    inset: 0;
    z-index: 1;
}

button.item-open-link {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    display: block;
    width: 100%;
    height: 100%;
}

/* Real-looking file type icons (page silhouette + folded corner) */
.item-icon-wrap svg.file-icon {
    width: 42px;
    height: 51px;
}

.item-grid.list-view .item-icon-wrap svg.file-icon {
    width: 18px;
    height: 22px;
}

.file-icon-word {
    color: #4c8bf5;
}

.file-icon-excel {
    color: #34d399;
}

.file-icon-ppt {
    color: #f4834f;
}

.file-icon-pdf {
    color: #fb7185;
}

.file-icon-zip {
    color: #94a3b8;
}

.file-icon-video {
    color: #c084fc;
}

.file-icon-audio {
    color: #38bdf8;
}

.file-icon-other {
    color: #7487a3;
}

.item-thumb {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border-3);
    background: var(--bg-app);
}

.item-grid.list-view .item-thumb {
    width: 24px;
    height: 24px;
    border-radius: 4px;
}

/* List view */
.item-grid.list-view {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.item-grid.list-view .item-tile {
    flex-direction: row;
    align-items: center;
    text-align: left;
    padding: 9px 12px;
    border-radius: 10px;
    gap: 12px;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.006));
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.item-grid.list-view .item-tile:hover {
    transform: none;
    box-shadow: 0 6px 16px rgba(2, 6, 20, 0.35);
    border-color: var(--border-3);
}

.item-grid.list-view .item-icon-wrap {
    width: 26px;
    height: 26px;
    margin-bottom: 0;
}

.item-grid.list-view .item-icon-wrap svg {
    width: 22px;
    height: 22px;
}

.item-grid.list-view .file-chip {
    width: 22px;
    height: 22px;
    border-radius: 5px;
    font-size: 6px;
}

.item-grid.list-view .item-name {
    flex: 1;
    -webkit-line-clamp: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-grid.list-view .item-meta {
    display: flex;
    flex-direction: row;
    gap: 8px;
    color: var(--text-3);
    font-size: 12px;
    flex-shrink: 0;
    margin-top: 0;
}

.item-grid.list-view .item-tile input[type="checkbox"] {
    position: relative;
    opacity: 1;
    margin-right: 2px;
    z-index: 2;
}

.item-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    font-size: 10px;
    color: var(--text-3);
    margin-top: 3px;
}

.item-meta:empty {
    display: none;
}

/* Meta badges â€” pill-style tags used for size/date/location in list rows (file manager + trash) */
.item-grid.list-view .item-meta span {
    background: var(--bg-hover);
    color: var(--text-3);
    font-size: 11px;
    padding: 3px 9px;
    border-radius: 999px;
    white-space: nowrap;
    border: 1px solid var(--border-1);
}

.item-grid.list-view .item-meta span:empty {
    display: none;
}

.search-scope {
    font-size: 12px;
    color: var(--text-3);
    margin-bottom: 10px;
}

.search-scope b {
    color: var(--text-1);
}

/* Status bar */
.statusbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 16px;
    background: var(--glass-strong);
    border-top: 1px solid var(--border-1);
    font-size: 12px;
    color: var(--text-3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.statusbar .sep {
    color: var(--divider-faint);
}

/* Toast notification */
.toast-wrap {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
    width: 100%;
    max-width: 380px;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    background: var(--bg-elevated);
    border: 1px solid var(--border-2);
    border-left: 4px solid var(--accent);
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: 0 16px 40px rgba(2, 6, 20, 0.6);
}

.toast.success {
    border-left-color: var(--success);
}

.toast.error {
    border-left-color: var(--error);
}

/* Tambahan itwilayah: flash "warning" (session('warning')) butuh warna
   sendiri yang beda dari success/error, desain asli Folder cuma punya 2 */
.toast.warning {
    border-left-color: var(--warn);
}

.toast.warning .toast-icon {
    color: var(--warn);
    background: rgba(var(--warn-rgb), 0.18);
}

.toast-icon {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    margin-top: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(var(--accent-rgb), 0.18);
    color: var(--accent);
}

.toast-icon svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.5;
}

.toast.success .toast-icon {
    color: var(--success);
    background: rgba(var(--success-rgb), 0.18);
}

.toast.error .toast-icon {
    color: var(--error);
    background: rgba(var(--error-rgb), 0.18);
}

.toast-msg {
    flex: 1;
    font-size: 14px;
    color: var(--text-strong);
    line-height: 1.5;
    padding-top: 2px;
    font-weight: 600;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-3);
    font-size: 19px;
    line-height: 1;
    padding: 0 2px;
    flex-shrink: 0;
    transition: color 0.15s;
}

.toast-close:hover {
    color: var(--text-strong);
}

.toast-enter-active {
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-leave-active {
    transition: opacity 0.2s ease-in, transform 0.2s ease-in;
}

.toast-enter-from,
.toast-leave-to {
    opacity: 0;
    transform: translateY(-14px);
}

.toast-enter-to,
.toast-leave-from {
    opacity: 1;
    transform: translateY(0);
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(2, 6, 20, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-box {
    background: var(--bg-elevated);
    border: 1px solid var(--border-2);
    border-radius: 14px;
    width: 100%;
    max-width: 380px;
    padding: 20px;
    box-shadow: 0 24px 60px rgba(2, 6, 20, 0.65);
}

.modal-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 14px;
    color: var(--text-strong);
}

.modal-input {
    width: 100%;
    background: var(--bg-app);
    border: 1px solid var(--border-3);
    border-radius: 6px;
    color: var(--text-1);
    padding: 9px 10px;
    font-size: 13px;
    outline: none;
    margin-bottom: 16px;
}

.modal-input:focus {
    border-color: var(--accent-focus);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.16);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.modal-btn {
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background-color 0.15s ease, transform 0.1s ease;
}

.modal-btn:active {
    transform: scale(0.96);
}

.modal-btn.cancel {
    background: transparent;
    color: var(--text-2);
    font-weight: 500;
    border: 1px solid var(--border-2);
}

.modal-btn.cancel:hover {
    background: var(--bg-hover-strong);
}

.modal-btn.primary {
    background: linear-gradient(135deg, var(--accent-strong), var(--accent));
    color: #fff;
    box-shadow: 0 4px 14px rgba(var(--accent-rgb), 0.35);
}

.modal-btn.primary:hover {
    filter: brightness(1.08);
}

.modal-btn.danger {
    background: var(--error);
    color: #fff;
}

.modal-btn.danger:hover {
    background: var(--error-hover);
}

/* File preview modal â€” full screen */
.preview-overlay {
    padding: 0;
    background: rgba(2, 6, 20, 0.9);
}

.modal-box.preview-box {
    max-width: none;
    width: 100vw;
    height: 100vh;
    max-height: none;
    border-radius: 0;
    border: none;
    padding: 16px;
    display: flex;
    flex-direction: column;
}

.preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.preview-header .modal-title {
    flex: 1;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 16px;
}

.preview-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.preview-body {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-app);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-2);
}

.preview-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.preview-frame {
    width: 100%;
    height: 100%;
    border: none;
    background: #fff;
}

.preview-video {
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: 100%;
    background: #000;
    object-fit: contain;
}

.preview-audio-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 40px 20px;
    height: 100%;
}

.preview-audio {
    width: 100%;
    max-width: 480px;
}

.preview-unsupported {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-3);
}

.preview-unsupported .file-chip {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    font-size: 13px;
    margin: 0 auto 16px;
}

.preview-unsupported p {
    margin: 0 0 18px;
    font-size: 13px;
}

/* Office (Excel/Word) client-side preview */
.preview-office-wrap {
    width: 100%;
    height: 100%;
    overflow: auto;
}

.preview-loading {
    text-align: center;
    color: var(--text-3);
    font-size: 13px;
    padding: 60px 20px;
}

.preview-office {
    width: 100%;
    min-height: 100%;
    background: #ffffff;
    border-radius: 6px;
    padding: 24px;
    box-sizing: border-box;
}

.preview-table-wrap {
    overflow: auto;
}

.preview-table-wrap table {
    border-collapse: collapse;
    min-width: 100%;
}

.preview-table-wrap td,
.preview-table-wrap th {
    border: 1px solid #d7d7d7;
    padding: 4px 9px;
    font-size: 12.5px;
    color: #1a1a1a;
    white-space: nowrap;
    font-family: 'Segoe UI', sans-serif;
}

.preview-sheet-name {
    font-weight: 700;
    font-size: 13px;
    color: #333;
    margin: 22px 0 8px;
    padding-bottom: 4px;
    border-bottom: 2px solid var(--accent);
}

.preview-sheet-name:first-child {
    margin-top: 0;
}

.preview-doc {
    max-width: 760px;
    margin: 0 auto;
    color: #1f1f1f;
    font-size: 14px;
    line-height: 1.65;
    font-family: 'Segoe UI', sans-serif;
}

.preview-doc img {
    max-width: 100%;
    height: auto;
}

.preview-doc table {
    border-collapse: collapse;
    margin: 10px 0;
}

.preview-doc td,
.preview-doc th {
    border: 1px solid #ccc;
    padding: 5px 9px;
}

@media (max-width: 720px) {
    .modal-box.preview-box {
        padding: 10px;
    }

    .preview-office {
        padding: 14px;
    }
}

/* Catatan Temuan page */
.note-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 760px;
}

.note-card {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.009));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px 18px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
    transition: box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.note-card:hover {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.016));
    box-shadow: 0 8px 24px rgba(2, 6, 20, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.16);
}

.note-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.note-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-strong);
    margin: 0 0 4px;
}

.note-date {
    font-size: 11.5px;
    color: var(--text-3);
    margin: 0;
}

.note-desc {
    font-size: 13px;
    color: var(--text-2);
    line-height: 1.55;
    margin: 10px 0 0;
    white-space: pre-wrap;
}

.note-files {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.note-file {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012));
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 8px;
    padding: 6px 8px;
    max-width: 240px;
}

.note-file-open {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    padding: 0;
    min-width: 0;
    text-align: left;
}

.note-file-icon {
    width: 26px;
    height: 32px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.note-file-icon svg.file-icon {
    width: 22px;
    height: 27px;
}

.note-file-icon .item-thumb {
    width: 28px;
    height: 28px;
    border-radius: 5px;
}

.note-file-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.note-file-name {
    font-size: 12px;
    color: var(--text-1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.note-file-date {
    font-size: 10px;
    color: var(--text-3);
    white-space: nowrap;
}

.note-file-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

.note-file-actions form {
    display: contents;
}

.note-file-actions .tb-btn {
    padding: 5px;
}

.note-file-actions .tb-btn svg {
    width: 13px;
    height: 13px;
}

.note-file-size {
    font-size: 10.5px;
    color: var(--text-3);
    white-space: nowrap;
}

.note-add-file {
    display: flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    background: none;
    border: 1px dashed var(--border-3);
    border-radius: 8px;
    color: var(--text-3);
    font-size: 12px;
    padding: 7px 10px;
    margin-top: 12px;
}

.note-add-file:hover {
    color: var(--text-1);
    border-color: var(--accent);
}

.note-add-file svg {
    width: 14px;
    height: 14px;
}

.note-modal {
    max-width: 460px;
}

.note-textarea {
    min-height: 80px;
    resize: vertical;
    font-family: inherit;
}

.note-file-label {
    display: block;
    font-size: 12px;
    color: var(--text-3);
    margin-bottom: 16px;
}

.note-file-picker {
    display: block;
    width: 100%;
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-2);
}

.modal-box.confirm {
    text-align: center;
}

.modal-icon.warn {
    width: 48px;
    height: 48px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: rgba(var(--error-rgb), 0.15);
    color: var(--error);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-icon.warn svg {
    width: 24px;
    height: 24px;
}

.modal-box.confirm .modal-title {
    text-align: center;
}

.modal-desc {
    font-size: 13px;
    color: var(--text-3);
    line-height: 1.5;
    margin: 0 0 18px;
}

.modal-box.confirm .modal-actions {
    justify-content: center;
}

.modal-box.confirm .modal-btn {
    min-width: 96px;
}

@media (max-width: 720px) {
    .sidebar {
        display: none;
    }

    .searchbar {
        width: 160px;
    }
}

/* ==== Project management module ==== */

/* Sidebar collapsible groups */
.sidebar-group {
    display: flex;
    flex-direction: column;
}

.sidebar-group-toggle {
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    font-family: inherit;
    cursor: pointer;
}

.sidebar-group-toggle .chevron {
    width: 13px;
    height: 13px;
    margin-left: auto;
    flex-shrink: 0;
    color: var(--text-3);
    transition: transform 0.15s ease;
}

.sidebar-group-toggle .chevron.chevron-open {
    transform: rotate(90deg);
}

.sidebar-subitem {
    padding-left: 38px;
    min-height: 34px;
    font-size: 12.5px;
    position: relative;
}

.sidebar-subitem::before {
    content: "";
    position: absolute;
    left: 22px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--divider-faint);
}

.sidebar-subitem.active::before {
    background: var(--accent);
    box-shadow: 0 0 6px rgba(var(--accent-rgb), 0.8);
}

/* Dashboard stat cards */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.stat-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.008));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 16px 18px;
    overflow: hidden;
    box-shadow:
        0 8px 24px rgba(2, 6, 20, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.14),
        inset 0 -1px 0 rgba(0, 0, 0, 0.18);
    transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.stat-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background:
        linear-gradient(120deg, transparent 15%, rgba(var(--stat-rgb, var(--accent-rgb)), 0.95) 45%, transparent 70%),
        linear-gradient(135deg, rgba(var(--stat-rgb, var(--accent-rgb)), 0.35), transparent 60%);
    background-size: 260% 260%, 100% 100%;
    background-repeat: no-repeat;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    animation: border-shine 15s ease-in-out infinite;
}

.stat-card:hover {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.018));
    border-color: rgba(255, 255, 255, 0.16);
    box-shadow:
        0 12px 32px rgba(2, 6, 20, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.18);
    transform: translateY(-2px);
}

.stat-card-icon {
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--stat-rgb, var(--accent-rgb)), 0.16);
    color: rgb(var(--stat-rgb, var(--accent-rgb)));
    box-shadow: inset 0 0 0 1px rgba(var(--stat-rgb, var(--accent-rgb)), 0.25);
}

.stat-card-icon::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--shine-sweep);
    background-size: 200% 100%;
    animation: shine-sweep 15s ease-in-out infinite;
}

.stat-card-icon svg {
    position: relative;
    width: 22px;
    height: 22px;
}

.stat-card-body {
    min-width: 0;
}

.stat-card-label {
    font-size: 12px;
    color: var(--text-3);
    margin: 0 0 6px;
    font-weight: 600;
}

.stat-card-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-strong);
    margin: 0;
    line-height: 1;
}

.stat-card-accent {
    --stat-rgb: var(--accent-rgb);
}

.stat-card-success {
    --stat-rgb: var(--success-rgb);
}

.stat-card-warn {
    --stat-rgb: var(--warn-rgb);
}

.stat-card-purple {
    --stat-rgb: var(--purple-rgb);
}

.stat-grid .stat-card:nth-child(1)::before,
.stat-grid .stat-card:nth-child(1) .stat-card-icon::after {
    animation-delay: 0s;
}

.stat-grid .stat-card:nth-child(2)::before,
.stat-grid .stat-card:nth-child(2) .stat-card-icon::after {
    animation-delay: 2.2s;
}

.stat-grid .stat-card:nth-child(3)::before,
.stat-grid .stat-card:nth-child(3) .stat-card-icon::after {
    animation-delay: 4.4s;
}

.stat-grid .stat-card:nth-child(4)::before,
.stat-grid .stat-card:nth-child(4) .stat-card-icon::after {
    animation-delay: 6.6s;
}

.stat-grid .stat-card:nth-child(5)::before,
.stat-grid .stat-card:nth-child(5) .stat-card-icon::after {
    animation-delay: 8.8s;
}

.stat-grid .stat-card:nth-child(6)::before,
.stat-grid .stat-card:nth-child(6) .stat-card-icon::after {
    animation-delay: 11s;
}

.section-heading {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-label);
    margin: 0 0 12px;
}

/* Project list cards */
.project-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.project-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.006));
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
    transition: box-shadow 0.15s ease, border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

.project-card:hover {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.014));
    box-shadow: 0 8px 24px rgba(2, 6, 20, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.16);
    border-color: rgba(var(--accent-rgb), 0.4);
    transform: translateY(-1px);
}

.project-card-main {
    flex: 1;
    min-width: 0;
}

.project-card-code {
    font-size: 11px;
    color: var(--text-3);
    font-weight: 700;
    letter-spacing: 0.03em;
}

.project-card-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-strong);
    margin: 2px 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-card-meta {
    font-size: 12px;
    color: var(--text-3);
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.project-card-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
    width: 160px;
}

/* Status pill */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

.status-pill::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 6px currentColor;
}

.status-pill-baru {
    background: rgba(var(--accent-rgb), 0.14);
    color: var(--accent);
}

.status-pill-proses {
    background: rgba(37, 99, 235, 0.16);
    color: #6ea8f7;
}

.status-pill-menunggu {
    background: rgba(var(--warn-rgb), 0.16);
    color: var(--warn);
}

.status-pill-uat {
    background: rgba(var(--purple-rgb), 0.16);
    color: var(--purple);
}

.status-pill-selesai {
    background: rgba(var(--success-rgb), 0.16);
    color: var(--success);
}

.status-pill-lain {
    background: var(--bg-hover-strong);
    color: var(--text-3);
}

.priority-pill {
    display: inline-flex;
    align-items: center;
    font-size: 10.5px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--bg-hover-strong);
    color: var(--text-2);
    white-space: nowrap;
}

.priority-pill-urgent,
.priority-pill-tinggi {
    background: rgba(var(--error-rgb), 0.14);
    color: var(--error);
}

/* Progress bar */
.progress-bar {
    width: 100%;
    height: 7px;
    border-radius: 999px;
    background: var(--bg-hover-strong);
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent-strong), var(--accent));
    transition: width 0.3s ease;
}

.progress-bar-fill.complete {
    background: var(--success);
}

.progress-label {
    font-size: 11px;
    color: var(--text-3);
    text-align: right;
    margin-top: 3px;
}

/* Filter tabs (project index) */
.filter-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.filter-tab {
    background: var(--bg-panel);
    border: 1px solid var(--border-2);
    color: var(--text-2);
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.filter-tab:hover {
    border-color: var(--border-3);
    color: var(--text-1);
}

.filter-tab.active {
    background: linear-gradient(135deg, var(--accent-strong), var(--accent));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 14px rgba(var(--accent-rgb), 0.3);
}

.filter-tab .count {
    font-size: 10.5px;
    opacity: 0.8;
}

/* Project detail header */
.project-header {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.009));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 20px 22px;
    margin-bottom: 16px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.project-header-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.project-header-code {
    font-size: 12px;
    color: var(--text-3);
    font-weight: 700;
    letter-spacing: 0.03em;
}

.project-header-name {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-strong);
    margin: 4px 0 8px;
}

.project-header-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

/* Tabs (project detail) */
.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border-2);
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-3);
    font-size: 13px;
    font-weight: 600;
    padding: 10px 14px;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
}

.tab-btn:hover {
    color: var(--text-1);
}

.tab-btn.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.tab-btn .badge {
    background: var(--bg-hover-strong);
    color: var(--text-2);
    font-size: 10.5px;
    padding: 1px 7px;
    border-radius: 999px;
}

.tab-btn.active .badge {
    background: rgba(var(--accent-rgb), 0.16);
    color: var(--accent);
}

/* Form sections inside tabs */
.form-card {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.009));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 14px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.form-card-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-strong);
    margin: 0 0 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-field label {
    font-size: 12px;
    color: var(--text-3);
    font-weight: 600;
}

.form-field .modal-input {
    margin-bottom: 0;
}

.form-field-full {
    grid-column: 1 / -1;
}

.checklist {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-2);
}

.checklist-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
    flex-shrink: 0;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
}

.data-table th {
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-label);
    padding: 8px 10px;
    border-bottom: 1px solid var(--border-2);
}

.data-table td {
    padding: 9px 10px;
    border-bottom: 1px solid var(--border-1);
    color: var(--text-1);
    vertical-align: top;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover td {
    background: var(--bg-hover);
}

.data-table-wrap {
    overflow-x: auto;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.009));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 4px 12px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.timeline {
    display: flex;
    flex-direction: column;
}

.timeline-item {
    display: flex;
    gap: 14px;
    padding-bottom: 18px;
    position: relative;
}

.timeline-item:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 16px;
    bottom: 0;
    width: 1px;
    background: var(--border-3);
}

.timeline-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.7);
    flex-shrink: 0;
    margin-top: 3px;
}

.timeline-date {
    font-size: 11px;
    color: var(--text-3);
    margin-bottom: 2px;
}

.timeline-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-1);
}

.timeline-desc {
    font-size: 12.5px;
    color: var(--text-3);
    margin-top: 2px;
}

.uat-round-card {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 12px;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.009));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.uat-round-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

@media (max-width: 900px) {
    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .project-card {
        flex-wrap: wrap;
    }

    .project-card-side {
        width: 100%;
        align-items: flex-start;
    }
}

/* ==== "Senja" theme â€” a glowing moon over a warm city skyline, clouds drifting past ==== */
[data-theme="sunset"] {
    --bg-app: #1a0f2e;
    --bg-panel: #2a1a3d;
    --bg-elevated: #331f4a;
    --bg-hover: #3a2350;
    --bg-hover-strong: #472b61;
    --bg-selected: rgba(251, 146, 60, 0.16);
    --border-1: rgba(251, 191, 165, 0.08);
    --border-2: rgba(251, 191, 165, 0.14);
    --border-3: rgba(251, 191, 165, 0.22);
    --text-1: #f1e4f7;
    --text-strong: #fff7f0;
    --text-2: #cbb0d6;
    --text-3: #a988ab;
    --text-4: #96789c;
    --text-label: #a988ab;
    --text-disabled: #6b5470;
    --divider-faint: #4a3155;
    --folder-color: #f5b879;
    --accent: #fb923c;
    --accent-rgb: 251, 146, 60;
    --accent-focus: #fdba74;
    --accent-strong: #ea580c;
    --success: #34d399;
    --success-rgb: 52, 211, 153;
    --error: #fb7185;
    --error-rgb: 251, 113, 133;
    --error-hover: #f43f5e;
    --warn: #fbbf24;
    --warn-rgb: 251, 191, 36;
    --purple: #c084fc;
    --purple-rgb: 192, 132, 252;
    --shine-sweep: linear-gradient(115deg, transparent 20%, rgba(255, 240, 220, 0.35) 46%, rgba(255, 240, 220, 0.06) 54%, transparent 80%);
    --glass-strong: rgba(32, 19, 47, 0.8);
    --glass-soft: rgba(24, 14, 38, 0.86);
    --grid-line: transparent;
    --sparkle-1: rgba(255, 245, 230, 0.9);
    --sparkle-2: rgba(255, 200, 160, 0.65);
    --scrollbar-thumb: rgba(251, 191, 165, 0.2);
    color-scheme: dark;
}

[data-theme="sunset"] body {
    background:
        radial-gradient(ellipse 90% 55% at 50% 0%, #241a3d 0%, transparent 62%),
        linear-gradient(180deg, #140b26 0%, #2c1640 22%, #6b2158 45%, #c33d4a 65%, #e8703a 82%, #f5a856 100%);
}

[data-theme="sunset"] .content {
    background-image: none;
    animation: none;
    /* Frosted scrim so the sky/moon stays visible without ever fighting file/card legibility */
    background-color: rgba(15, 8, 24, 0.34);
}

/* The moon â€” off-center crater shading so the slow spin actually reads as motion */
[data-theme="sunset"] body::before {
    top: var(--celestial-top);
    left: auto;
    right: var(--celestial-right);
    bottom: auto;
    width: var(--celestial-size);
    height: var(--celestial-size);
    border-radius: 50%;
    filter: none;
    background:
        radial-gradient(circle at 40% 35%, #fff4cc 0%, #ffd293 50%, #f29370 100%);
    box-shadow: 0 0 45px 12px rgba(255, 185, 125, 0.3);
    animation: moon-glide 80s linear infinite;
}

[data-theme="sunset"].sunset-entering body::before {
    animation:
        sunset-rise var(--celestial-transition-duration) cubic-bezier(0.22, 0.61, 0.36, 1) backwards,
        moon-glide 80s linear var(--celestial-transition-duration) infinite;
}

@keyframes sunset-rise {
    from {
        opacity: 0;
        transform: translateY(85vh) scale(0.85);
    }

    30% {
        opacity: 0.65;
    }

    to {
        opacity: 1;
        transform: translate(0, 0) rotate(0deg);
    }
}

.theme-exiting-celestial {
    position: fixed;
    z-index: 0;
    pointer-events: none;
    animation: sunset-descend var(--celestial-transition-duration) cubic-bezier(0.4, 0, 0.6, 1) forwards;
}

@keyframes sunset-descend {
    from {
        opacity: var(--celestial-exit-opacity, 1);
        transform: var(--celestial-exit-transform, translate(0, 0));
    }

    to {
        opacity: 0;
        transform: translateY(85vh) scale(0.85);
    }
}

@media (prefers-reduced-motion: no-preference) {
    .sidebar,
    .content,
    .toolbar,
    .addressbar,
    .statusbar {
        transition: background-color var(--theme-transition-duration) ease, border-color var(--theme-transition-duration) ease, color var(--theme-transition-duration) ease;
    }

    .theme-switch,
    .theme-switch-thumb,
    .theme-switch-cloud,
    .theme-switch-stars,
    .theme-switch-icon {
        transition-duration: var(--theme-transition-duration);
    }
}

:root {
    --theme-transition-duration: 450ms;
    --celestial-transition-duration: 1800ms;
    --celestial-top: clamp(145px, 22vh, 240px);
    --celestial-right: 10vw;
    --celestial-size: clamp(110px, 16vmin, 190px);
}

.theme-background-fade {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    animation: theme-background-fade var(--theme-transition-duration) ease-in-out forwards;
}

@keyframes theme-background-fade {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes moon-glide {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    50% {
        transform: rotate(180deg);
    }

    100% {
        transform: translate(0, 0) rotate(360deg);
    }
}

/* Cloud layer 1 â€” high, soft, slow */
[data-theme="sunset"] body::after {
    top: calc(var(--celestial-top) + var(--celestial-size) * 0.15);
    left: auto;
    right: calc(var(--celestial-right) - var(--celestial-size));
    bottom: auto;
    width: calc(var(--celestial-size) * 3);
    height: var(--celestial-size);
    border-radius: 0;
    box-shadow: none;
    filter: none;
    background: url("../img/vault/sunset-clouds.svg") center / contain no-repeat;
    animation: cloud-walk-1 18s ease-in-out infinite alternate;
}

@keyframes cloud-walk-1 {
    from {
        transform: translateX(-2vw);
    }

    to {
        transform: translateX(2vw);
    }
}

/* Cloud layer 2 â€” lower, closer, walks past a little quicker for depth */
[data-theme="sunset"] .explorer::before {
    content: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    filter: blur(3px);
    background-image:
        radial-gradient(ellipse 210px 46px at 14% 74%, rgba(255, 160, 120, 0.22), transparent 70%),
        radial-gradient(ellipse 240px 52px at 46% 70%, rgba(255, 150, 112, 0.18), transparent 70%),
        radial-gradient(ellipse 190px 42px at 76% 76%, rgba(255, 172, 132, 0.2), transparent 70%),
        radial-gradient(ellipse 220px 48px at 100% 72%, rgba(255, 158, 118, 0.18), transparent 70%);
    background-repeat: repeat-x;
    background-size: 760px 100%;
    background-position: 0 0;
    animation: cloud-walk-2 70s linear infinite;
}

@keyframes cloud-walk-2 {
    from {
        background-position: 0 0;
    }

    to {
        background-position: -760px 0;
    }
}

/* A warm city skyline at dusk. */
[data-theme="sunset"] .explorer::after {
    content: "";
    position: fixed;
    inset: auto 0 0;
    z-index: -1;
    pointer-events: none;
    height: clamp(180px, 36vh, 400px);
    background: url("../img/vault/sunset-city.svg") center bottom / 100% 100% no-repeat;
}
/* Shooting stars, once in a while â€” three different paths/timings so it never streaks the same spot twice in a row */
[data-theme="sunset"] .body::before,
[data-theme="sunset"] .body::after,
[data-theme="sunset"] .addressbar::after {
    content: "";
    position: fixed;
    z-index: -1;
    pointer-events: none;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #fff;
    opacity: 0;
}

[data-theme="sunset"] .body::before {
    top: 8%;
    left: 4%;
    box-shadow: 0 0 6px 2px rgba(255, 255, 255, 0.9), -34px 10px 10px -3px rgba(255, 255, 255, 0.5);
    animation: shooting-star-a 26s ease-in infinite;
}

[data-theme="sunset"] .body::after {
    top: 14%;
    left: 62%;
    box-shadow: 0 0 6px 2px rgba(255, 255, 255, 0.9), 30px 8px 10px -3px rgba(255, 255, 255, 0.5);
    animation: shooting-star-b 33s ease-in infinite;
    animation-delay: 9s;
}

[data-theme="sunset"] .addressbar::after {
    top: 4%;
    left: 34%;
    box-shadow: 0 0 6px 2px rgba(255, 255, 255, 0.9), -22px 16px 10px -3px rgba(255, 255, 255, 0.5);
    animation: shooting-star-c 21s ease-in infinite;
    animation-delay: 15s;
}

@keyframes shooting-star-a {

    0%,
    87% {
        opacity: 0;
        transform: translate(0, 0);
    }

    88% {
        opacity: 1;
        transform: translate(0, 0);
    }

    93% {
        opacity: 1;
        transform: translate(34vw, 15vh);
    }

    94%,
    100% {
        opacity: 0;
        transform: translate(34vw, 15vh);
    }
}

@keyframes shooting-star-b {

    0%,
    90% {
        opacity: 0;
        transform: translate(0, 0);
    }

    91% {
        opacity: 1;
        transform: translate(0, 0);
    }

    95% {
        opacity: 1;
        transform: translate(-26vw, 11vh);
    }

    96%,
    100% {
        opacity: 0;
        transform: translate(-26vw, 11vh);
    }
}

@keyframes shooting-star-c {

    0%,
    84% {
        opacity: 0;
        transform: translate(0, 0);
    }

    85% {
        opacity: 1;
        transform: translate(0, 0);
    }

    90% {
        opacity: 1;
        transform: translate(21vw, 21vh);
    }

    91%,
    100% {
        opacity: 0;
        transform: translate(21vw, 21vh);
    }
}

@media (prefers-reduced-motion: reduce) {

    [data-theme="sunset"] body::before,
    [data-theme="sunset"] body::after,
    [data-theme="sunset"] .explorer::before,
    [data-theme="sunset"] .addressbar::before,
    [data-theme="sunset"] .addressbar::after,
    [data-theme="sunset"] .body::before,
    [data-theme="sunset"] .body::after {
        animation: none !important;
    }
}

/* Night sky: a softly lit moon and two layers of stars. */
[data-theme="dark"] body {
    background:
        radial-gradient(ellipse at 78% 28%, rgba(111, 149, 183, 0.25), transparent 42%),
        radial-gradient(ellipse at 30% 70%, rgba(50, 87, 116, 0.25), transparent 55%),
        linear-gradient(180deg, #050b16 0%, #102334 55%, #203e50 100%);
}

[data-theme="dark"] .content {
    background-image: none;
    background-color: rgba(6, 10, 22, 0.2);
    animation: none;
}

/* Crater shading gives the moon depth without an image asset. */
[data-theme="dark"] body::before {
    top: var(--celestial-top);
    left: auto;
    right: var(--celestial-right);
    bottom: auto;
    width: var(--celestial-size);
    height: var(--celestial-size);
    border-radius: 50%;
    filter: none;
    background:
        radial-gradient(circle at 30% 35%, rgba(129, 150, 182, 0.3) 0 8%, transparent 10%),
        radial-gradient(circle at 62% 62%, rgba(129, 150, 182, 0.24) 0 13%, transparent 16%),
        radial-gradient(circle at 35% 72%, rgba(129, 150, 182, 0.2) 0 6%, transparent 9%),
        radial-gradient(circle at 36% 30%, #fffef4 0%, #dce5f2 55%, #93a7c9 100%);
    box-shadow: inset -12px -8px 22px rgba(43, 62, 102, 0.28),
        0 0 45px 12px rgba(197, 216, 255, 0.2);
    animation:
        sunset-rise var(--celestial-transition-duration) cubic-bezier(0.22, 0.61, 0.36, 1) backwards,
        night-moon-spin 40s linear var(--celestial-transition-duration) infinite;
}

/* Small, distant stars. */
[data-theme="dark"] body::after {
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
    filter: none;
    box-shadow: none;
    background:
        radial-gradient(circle at 24px 38px, #dbe8ff 0 1px, transparent 1.6px) 0 0 / 173px 157px,
        radial-gradient(circle at 78px 94px, #9bb5db 0 0.7px, transparent 1.3px) 0 0 / 229px 193px,
        radial-gradient(circle at 140px 52px, #f5f1dc 0 1px, transparent 1.7px) 0 0 / 307px 263px;
    opacity: 0.65;
    animation: night-stars-twinkle 7s ease-in-out infinite alternate;
}

/* A few brighter stars, on a different twinkle rhythm. */
[data-theme="dark"] .explorer::before {
    content: "";
    position: fixed;
    z-index: -1;
    pointer-events: none;
    inset: 0;
    background:
        radial-gradient(circle at 12% 16%, #fff 0 1.3px, rgba(171, 204, 255, 0.3) 2px, transparent 5px),
        radial-gradient(circle at 38% 9%, #fff 0 1px, rgba(171, 204, 255, 0.3) 2px, transparent 4px),
        radial-gradient(circle at 57% 31%, #fff 0 1.4px, rgba(171, 204, 255, 0.3) 2px, transparent 5px),
        radial-gradient(circle at 91% 43%, #fff 0 1px, rgba(171, 204, 255, 0.3) 2px, transparent 4px),
        radial-gradient(circle at 28% 68%, #fff 0 1px, rgba(171, 204, 255, 0.3) 2px, transparent 4px);
    opacity: 0.65;
}

/* Soft aurora light drifts quietly behind the interface. */
[data-theme="dark"] .explorer::after {
    content: "";
    position: fixed;
    z-index: -1;
    pointer-events: none;
    inset: 0;
    background:
        radial-gradient(ellipse 55% 22% at 24% 34%, rgba(55, 173, 184, 0.13), transparent 75%),
        radial-gradient(ellipse 50% 28% at 65% 42%, rgba(105, 101, 209, 0.16), transparent 75%),
        radial-gradient(ellipse 40% 18% at 87% 64%, rgba(57, 119, 179, 0.1), transparent 75%);
    transform-origin: center;
    animation: night-aurora-drift 32s ease-in-out infinite alternate;
}

[data-theme="dark"] .body::before {
    content: "";
    position: fixed;
    top: 27vh;
    left: 42vw;
    width: 110px;
    height: 2px;
    z-index: -1;
    pointer-events: none;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, #c5e3ff);
    opacity: 0;
    transform: rotate(32deg);
    animation: night-shooting-star 13s linear 3s infinite;
}

/* Pine-covered riverbanks frame the reflected night sky. */
[data-theme="dark"] .body::after {
    content: "";
    position: fixed;
    inset: auto 0 0;
    height: clamp(180px, 36vh, 420px);
    z-index: -1;
    pointer-events: none;
    background: url("../img/vault/night-forest.svg") center bottom / 100% 100% no-repeat;
    opacity: 0.95;
}

@keyframes night-shooting-star {
    0%, 84% { opacity: 0; transform: translate(0, 0) rotate(32deg); }
    86% { opacity: 0.85; }
    94% { opacity: 0; transform: translate(30vw, 19vw) rotate(32deg); }
    100% { opacity: 0; transform: translate(30vw, 19vw) rotate(32deg); }
}

@keyframes night-aurora-drift {
    from {
        opacity: 0.5;
        transform: translate(-2vw, 2vh) scale(1.04) rotate(-3deg);
    }
    to {
        opacity: 0.95;
        transform: translate(2vw, -2vh) scale(1.1) rotate(3deg);
    }
}

@keyframes night-moon-spin {
    0% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: rotate(90deg); }
    50% { transform: rotate(180deg); }
    75% { transform: rotate(270deg); }
    100% { transform: translate(0, 0) rotate(360deg); }
}

@keyframes night-stars-twinkle {
    from {
        opacity: 0.4;
    }

    to {
        opacity: 0.85;
    }
}

@media (prefers-reduced-motion: reduce) {

    [data-theme="dark"] body::before,
    [data-theme="dark"] body::after,
    [data-theme="dark"] .explorer::before,
    [data-theme="dark"] .explorer::after,
    [data-theme="dark"] .body::before {
        animation: none !important;
    }

    .sidebar-item svg {
        transition: none;
    }
}

/* Keep one cloud layer and avoid duplicated animated stars. */
[data-theme] .content::before,
[data-theme="sunset"] .body::after,
[data-theme="sunset"] .addressbar::after {
    content: none;
}

/* =========================================================
   TAMBAHAN ITWILAYAH: tombol buka/tutup sidebar - di DESKTOP MAUPUN
   HP (desain asli "Folder" murni desktop & sidebar selalu tampil,
   tidak ada toggle sama sekali). Satu state Alpine (`sidebarOpen`,
   lihat vault-app.js) dipakai di kedua mode, defaultnya beda: HP mulai
   tertutup (hemat tempat), desktop mulai terbuka (seperti sebelumnya) -
   ditentukan otomatis lewat matchMedia saat halaman dimuat.
   ========================================================= */
.sidebar-backdrop {
    display: none;
}

/* Desktop (default): sidebar bagian dari flex row biasa, tinggal
   dikecilkan ke 0 waktu ditutup supaya .content otomatis melebar */
.body:not(.sidebar-open) .sidebar {
    width: 0;
    padding-left: 0;
    padding-right: 0;
    border-right-color: transparent;
}

@media (max-width: 900px) {

    /* HP/tablet: sidebar jadi overlay lepas dari alur flex, disembunyikan
       lewat transform (bukan width) supaya tetap 240px waktu digeser masuk.
       display:block !important WAJIB ada - desain asli "Folder" punya
       aturan sendiri "@media (max-width:720px) { .sidebar{display:none} }"
       (lihat baris ~1860) yang menyembunyikan sidebar total tanpa cara
       membukanya lagi; kalau tidak ditimpa di sini, transform di bawah ini
       tidak akan pernah kelihatan efeknya sama sekali di layar <720px. */
    .sidebar {
        display: block !important;
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 60;
        width: 240px !important;
        padding: 14px 10px !important;
        border-right-color: var(--border-1) !important;
        transform: translateX(-100%);
    }

    .body.sidebar-open .sidebar {
        transform: translateX(0);
        box-shadow: 0 0 40px rgba(2, 6, 20, .6);
    }

    .body.sidebar-open .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 55;
        background: rgba(2, 6, 20, .5);
    }

    .content {
        padding: 16px;
    }
}

@media (max-width: 640px) {
    .toolbar {
        padding: 10px;
    }

    .theme-toggle-wrap span,
    .tb-btn span {
        display: none;
    }
}

/* =========================================================
   TAMBAHAN ITWILAYAH: halaman yang belum dimigrasi ke desain baru
   masih punya wrapper lama .main-panel/.content-wrapper/
   .page-body-wrapper di dalam markup-nya sendiri (peninggalan
   template admin Bootstrap - lihat catatan di css.blade.php). CSS
   bawaan wrapper itu (style.css) menghitung width dengan asumsi ada
   sidebar 257px di sebelahnya (mis. "width: calc(100% - 257px)"),
   padahal sekarang wrapper itu sudah ada DI DALAM <main class="content">
   yang lebarnya sudah otomatis pas (flex: 1) - kalau dibiarkan, lebar
   dikurangi dua kali dan kontennya jadi sempit. Netralkan di sini
   sampai tiap halaman dirapikan satu per satu (Tahap 3).
   ========================================================= */
.content .main-panel,
.content .page-body-wrapper {
    width: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
}

/* Cuma lebar yang dinetralkan - padding/background TIDAK disentuh
   supaya halaman yang sudah punya style .content-wrapper sendiri
   (mis. dashboard_pusat.blade.php) tidak ikut berubah */
.content .content-wrapper {
    width: 100% !important;
}

/* =========================================================
   TAMBAHAN ITWILAYAH: tombol toggle tema gaya LAMA (.theme-toggle-btn),
   masih dipakai di halaman yang memang di luar cakupan migrasi shell
   baru (mis. user/login.blade.php - desain cyber sendiri). Konsepnya
   disamakan jadi Gelap/Senja lewat [data-theme] juga (lihat listener
   vanilla JS tambahan di theme-toggle.js).
   ========================================================= */
.theme-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid var(--border-2);
    background: rgba(var(--accent-rgb), 0.08);
    color: var(--accent);
    cursor: pointer;
    transition: background .2s ease, transform .2s ease;
}

.theme-toggle-btn:hover {
    background: rgba(var(--accent-rgb), 0.16);
    transform: translateY(-1px);
}

.theme-toggle-btn .mdi-white-balance-sunny,
.theme-toggle-btn .mdi-moon-waning-crescent {
    display: none;
}

[data-theme="dark"] .theme-toggle-btn .mdi-moon-waning-crescent {
    display: inline-block;
}

[data-theme="sunset"] .theme-toggle-btn .mdi-white-balance-sunny {
    display: inline-block;
}

/* Tambahan itwilayah: tombol tutup DI DALAM sidebar itu sendiri (selain
   tombol hamburger di toolbar utk membuka) - tampil di desktop maupun HP */
.sidebar-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    border: none;
    border-radius: 7px;
    background: transparent;
    color: var(--text-3);
    transition: background .15s ease, color .15s ease;
}

.sidebar-close-btn:hover {
    background: var(--bg-hover-strong);
    color: var(--text-strong);
}

.sidebar-close-btn svg {
    width: 15px;
    height: 15px;
}

/* Baris judul kecil "Menu" + tombol tutup, jadi mini-header sidebar -
   lebih rapi daripada tombol tutup mengambang sendirian */
.sidebar-top-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6px 8px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--border-1);
}

.sidebar-top-label {
    font-size: 11px;
    font-weight: 800;
    color: var(--text-label);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Tambahan itwilayah: brand/logo dipindah ke toolbar atas (bukan di
   dalam sidebar) - biar tetap kelihatan meski sidebar ditutup */
.tb-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 8px;
    border-radius: 9px;
}

.tb-brand:hover {
    background: var(--bg-hover-strong);
}

.tb-brand-mark {
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
}

.tb-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.tb-brand-name {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-strong);
}

.tb-brand-sub {
    font-size: 9px;
    font-weight: 600;
    color: var(--text-label);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

@media (max-width: 480px) {
    .tb-brand-text {
        display: none;
    }
}