:root {
    --bg: #fff8fb;
    --surface: rgba(255, 255, 255, 0.88);
    --surface-solid: #ffffff;
    --text: #273044;
    --muted: #7a8499;
    --border: #f0dce7;

    --blue: #8ecbff;
    --blue-strong: #4ea3f1;
    --blue-soft: #eaf6ff;

    --red: #ff9eb3;
    --red-strong: #f05f7d;
    --red-soft: #fff0f4;

    --yellow: #ffe59a;
    --yellow-strong: #f0b429;
    --yellow-soft: #fff8de;

    --green-soft: #e9fbe9;
    --green-text: #2f7d32;

    --shadow: 0 18px 45px rgba(112, 87, 105, 0.12);
    --shadow-sm: 0 8px 24px rgba(112, 87, 105, 0.09);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 11px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100%;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(142, 203, 255, .45), transparent 34%),
        radial-gradient(circle at top right, rgba(255, 229, 154, .65), transparent 30%),
        radial-gradient(circle at bottom left, rgba(255, 158, 179, .42), transparent 32%),
        var(--bg);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,.55) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.55) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,.65), transparent 75%);
}

.app-shell,
.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 22px 0 36px;
    position: relative;
}

.content-card {
    background: rgba(255,255,255,.58);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255,255,255,.82);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 22px;
}

.topbar {
    background: linear-gradient(135deg, rgba(255,255,255,.92), rgba(255,248,251,.78));
    border: 1px solid rgba(255,255,255,.95);
    box-shadow: var(--shadow);
    border-radius: 28px;
    padding: 18px;
    margin-bottom: 18px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
}

.brand-area {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-badge {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    color: #273044;
    font-weight: 900;
    letter-spacing: -.04em;
    background:
        linear-gradient(135deg, var(--blue), var(--yellow) 52%, var(--red));
    box-shadow: 0 12px 24px rgba(78,163,241,.18);
}

.topbar h1 {
    margin: 0;
    font-size: 24px;
    letter-spacing: -.04em;
    color: var(--text);
}

.topbar p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
}

nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}

nav a,
.user-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 9px 13px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: .18s ease;
}

nav a {
    color: #42506a;
    background: rgba(255,255,255,.72);
    border: 1px solid rgba(240,220,231,.8);
}

nav a:hover {
    transform: translateY(-1px);
    color: #253149;
    border-color: rgba(142,203,255,.95);
    box-shadow: var(--shadow-sm);
}

nav a.active {
    color: #17395c;
    background: linear-gradient(135deg, var(--blue-soft), #ffffff);
    border-color: rgba(142,203,255,.95);
}

.logout-link {
    background: var(--red-soft) !important;
    border-color: rgba(255,158,179,.8) !important;
    color: #a63f55 !important;
}

.user-pill {
    background: var(--yellow-soft);
    border: 1px solid rgba(255,229,154,.95);
    color: #7b5a0c;
}

h2,
h3 {
    letter-spacing: -.035em;
    color: var(--text);
}

h2 {
    margin: 4px 0 18px;
    font-size: 28px;
}

h3 {
    margin: 26px 0 12px;
    font-size: 19px;
}

.card {
    background: var(--surface);
    border: 1px solid rgba(255,255,255,.92);
    border-radius: var(--radius-lg);
    padding: 18px;
    margin-bottom: 18px;
    box-shadow: var(--shadow-sm);
}

.form label {
    display: block;
    margin: 11px 0 7px;
    color: #42506a;
    font-weight: 800;
    font-size: 13px;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #ecdde6;
    background: rgba(255,255,255,.88);
    color: var(--text);
    padding: 12px 13px;
    border-radius: 14px;
    font-size: 14px;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--blue-strong);
    box-shadow: 0 0 0 4px rgba(142,203,255,.32);
    background: #fff;
}

textarea {
    resize: vertical;
}

button {
    appearance: none;
    border: 0;
    cursor: pointer;
    margin-top: 16px;
    padding: 12px 18px;
    border-radius: 999px;
    color: #263143;
    font-weight: 900;
    letter-spacing: -.01em;
    background: linear-gradient(135deg, var(--yellow), var(--blue));
    box-shadow: 0 12px 26px rgba(78,163,241,.18);
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

button:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 34px rgba(78,163,241,.24);
    filter: saturate(1.05);
}

button:active {
    transform: translateY(0);
}

.grid {
    display: grid;
    gap: 14px;
}

.grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stat {
    position: relative;
    overflow: hidden;
}

.stat::after {
    content: "";
    position: absolute;
    width: 120px;
    height: 120px;
    right: -36px;
    top: -38px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(142,203,255,.38), rgba(255,229,154,.48));
}

.stat span {
    display: block;
    color: var(--muted);
    margin-bottom: 8px;
    font-weight: 700;
    font-size: 13px;
}

.stat strong {
    display: block;
    font-size: 32px;
    letter-spacing: -.05em;
    color: var(--text);
}

.table-wrap {
    overflow-x: auto;
    background: var(--surface);
    border: 1px solid rgba(255,255,255,.92);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 22px;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 780px;
}

th,
td {
    text-align: left;
    padding: 13px 14px;
    border-bottom: 1px solid rgba(240,220,231,.75);
    vertical-align: top;
    font-size: 14px;
}

th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: rgba(255,248,251,.96);
    color: #566176;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

tbody tr {
    transition: background .16s ease;
}

tbody tr:hover {
    background: rgba(234,246,255,.58);
}

tbody tr:last-child td {
    border-bottom: 0;
}

tr.low {
    background: rgba(255,248,222,.78);
}

tr.low td:first-child::before {
    content: "⚠ ";
}

.alert {
    padding: 13px 15px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    border: 1px solid transparent;
    font-weight: 700;
}

.alert-success {
    background: var(--green-soft);
    color: var(--green-text);
    border-color: #cbefcb;
}

.alert-danger {
    background: var(--red-soft);
    color: #a63f55;
    border-color: rgba(255,158,179,.72);
}

.alert-info {
    background: var(--blue-soft);
    color: #23689e;
    border-color: rgba(142,203,255,.75);
}

a {
    color: var(--blue-strong);
    font-weight: 700;
}

a:hover {
    color: #2d80c7;
}

a.danger {
    color: var(--red-strong);
}

code {
    display: inline-block;
    max-width: 100%;
    background: #273044;
    color: #fff8fb;
    padding: 6px 9px;
    border-radius: 10px;
    overflow-wrap: anywhere;
}

/* Badge kecil otomatis untuk teks tipe filament jika nanti ingin dipakai */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--blue-soft);
    color: #23689e;
    font-size: 12px;
    font-weight: 800;
}

@media (max-width: 860px) {
    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    nav {
        justify-content: flex-start;
    }
}

@media (max-width: 760px) {
    .app-shell,
    .container {
        width: min(100% - 20px, 1180px);
        padding-top: 10px;
    }

    .content-card {
        padding: 14px;
        border-radius: 20px;
    }

    .topbar {
        border-radius: 22px;
        padding: 15px;
    }

    .brand-area {
        align-items: flex-start;
    }

    .logo-badge {
        width: 48px;
        height: 48px;
        border-radius: 16px;
    }

    nav a,
    .user-pill {
        min-height: 36px;
        font-size: 13px;
        padding: 8px 11px;
    }

    .grid.two {
        grid-template-columns: 1fr;
    }

    h2 {
        font-size: 24px;
    }

    .stat strong {
        font-size: 28px;
    }
}
.muted {
    color: var(--muted);
    font-size: 13px;
}

small {
    color: var(--muted);
}

.mini-list {
    margin: 0;
    padding-left: 18px;
}

.mini-list li {
    margin-bottom: 5px;
}

.btn-soft {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 16px;
    margin-left: 8px;
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 999px;
    text-decoration: none;
    background: var(--blue-soft);
    color: #23689e;
    border: 1px solid rgba(142,203,255,.75);
    font-weight: 900;
}

.actions {
    white-space: nowrap;
}

.icon-btn {
    width: 34px;
    height: 34px;
    min-width: 34px;
    padding: 0;
    margin: 0 3px 0 0;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    font-weight: 900;
}

.icon-btn.money {
    background: linear-gradient(135deg, var(--yellow), var(--blue));
    color: #263143;
}

.icon-btn.danger {
    background: var(--red-soft);
    color: #a63f55;
    border: 1px solid rgba(255,158,179,.72);
}

.filter-form button,
.filter-form .btn-soft {
    vertical-align: middle;
}