* {
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Arial, sans-serif;
}

:root {
    --bg: #f7f8fc;
    --glass: rgba(255,255,255,.70);
    --glass-strong: rgba(255,255,255,.86);
    --line: rgba(255,255,255,.82);
    --text: #141416;
    --muted: #777d8d;
    --blue: #007aff;
    --purple: #af52de;
    --pink: #ff2d55;
    --green: #34c759;
    --orange: #ff9500;
    --red: #ff3b30;
    --gray: #8e8e93;
    --dark: #1c1c1e;
    --radius: 18px;
    --shadow: 0 18px 45px rgba(17,24,39,.08);
    --shadow-hover: 0 24px 60px rgba(17,24,39,.13);
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 8% 8%, rgba(0,122,255,.16), transparent 26%),
        radial-gradient(circle at 88% 15%, rgba(255,45,85,.12), transparent 23%),
        radial-gradient(circle at 65% 92%, rgba(175,82,222,.13), transparent 28%),
        linear-gradient(135deg, #f8fbff, #f6f7fb);
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.48) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.48) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,.22), transparent 75%);
    pointer-events: none;
    z-index: -2;
}

body::after {
    content: "";
    position: fixed;
    width: 320px;
    height: 320px;
    border-radius: 999px;
    right: -120px;
    top: 38%;
    background: linear-gradient(135deg, rgba(0,122,255,.16), rgba(175,82,222,.12));
    filter: blur(18px);
    animation: bgFloat 8s ease-in-out infinite alternate;
    z-index: -1;
}

@keyframes bgFloat {
    from { transform: translateY(-12px) scale(1); }
    to { transform: translateY(24px) scale(1.08); }
}

.sidebar {
    width: 218px;
    height: calc(100vh - 24px);
    position: fixed;
    top: 12px;
    left: 12px;
    padding: 14px;
    border-radius: 26px;
    background: var(--glass);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    animation: slideIn .45s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-16px); }
    to { opacity: 1; transform: translateX(0); }
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 850;
    margin-bottom: 20px;
    letter-spacing: -.2px;
}

.brand-icon {
    width: 36px;
    height: 36px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--blue), #5ac8fa);
    display: grid;
    place-items: center;
    color: white;
    box-shadow: 0 12px 24px rgba(0,122,255,.25);
}

.brand-icon svg {
    width: 19px;
    height: 19px;
}

.menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.menu a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #3a3a3c;
    padding: 10px 11px;
    border-radius: 16px;
    font-size: 13.5px;
    font-weight: 720;
    transition: .24s ease;
    overflow: hidden;
}

.menu a::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,122,255,.12), rgba(175,82,222,.08));
    opacity: 0;
    transition: .24s ease;
}

.menu a svg,
.menu a span {
    position: relative;
    z-index: 1;
}

.menu a svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.25;
}

.menu a:hover {
    transform: translateX(4px) scale(1.01);
    color: var(--blue);
}

.menu a:hover::before,
.menu a.active::before {
    opacity: 1;
}

.menu a.active {
    color: var(--blue);
    box-shadow: inset 0 0 0 1px rgba(0,122,255,.10);
}

.main {
    margin-left: 244px;
    padding: 14px;
    animation: fadeUp .45s ease;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero,
.box,
.card,
.stat-card,
.login-card {
    background: var(--glass);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hero {
    min-height: 92px;
    padding: 18px 20px;
    margin-bottom: 14px;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: "";
    position: absolute;
    width: 170px;
    height: 170px;
    right: -70px;
    top: -80px;
    background: linear-gradient(135deg, rgba(0,122,255,.18), rgba(255,45,85,.10));
    border-radius: 999px;
    animation: pulseBlob 4s ease-in-out infinite;
}

@keyframes pulseBlob {
    0%,100% { transform: scale(1); opacity: .85; }
    50% { transform: scale(1.12); opacity: 1; }
}

.hero h2 {
    position: relative;
    z-index: 1;
    margin: 0;
    font-size: 21px;
    letter-spacing: -.5px;
}

.hero p {
    position: relative;
    z-index: 1;
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13.5px;
    max-width: 70%;
}

.hero-icon {
    position: absolute;
    right: 18px;
    top: 17px;
    width: 46px;
    height: 46px;
    border-radius: 17px;
    background: rgba(0,122,255,.10);
    display: grid;
    place-items: center;
    color: var(--blue);
    animation: softFloat 3s ease-in-out infinite;
    z-index: 2;
}

.hero-icon svg {
    width: 25px;
    height: 25px;
}

@keyframes softFloat {
    0%,100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-5px) rotate(2deg); }
}

.cards,
.stats {
    display: grid;
    gap: 12px;
    margin-bottom: 14px;
}

.cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card,
.stat-card {
    position: relative;
    min-height: 118px;
    padding: 15px;
    transition: .24s ease;
    overflow: hidden;
}

.card::after,
.stat-card::after {
    content: "";
    position: absolute;
    inset: auto -35px -45px auto;
    width: 120px;
    height: 120px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(0,122,255,.12), rgba(175,82,222,.08));
    transition: .24s ease;
}

.card:hover,
.stat-card:hover {
    transform: translateY(-5px) scale(1.012);
    box-shadow: var(--shadow-hover);
}

.card:hover::after,
.stat-card:hover::after {
    transform: scale(1.16);
}

.icon,
.stat-icon {
    position: relative;
    z-index: 1;
    width: 37px;
    height: 37px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(0,122,255,.10);
    color: var(--blue);
    margin-bottom: 10px;
}

.icon svg,
.stat-icon svg {
    width: 20px;
    height: 20px;
}

.card span,
.stat-card span {
    position: relative;
    z-index: 1;
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 720;
}

.card h1,
.stat-card h1 {
    position: relative;
    z-index: 1;
    font-size: 29px;
    margin: 4px 0 0;
    letter-spacing: -.9px;
}

.box {
    padding: 16px;
    margin-bottom: 14px;
}

h3 {
    margin: 0 0 12px;
    font-size: 16px;
    letter-spacing: -.2px;
}

label {
    font-weight: 720;
    font-size: 12.5px;
    color: #3a3a3c;
}

input,
select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(209,213,219,.82);
    border-radius: 14px;
    margin: 7px 0 10px;
    outline: none;
    font-size: 13.5px;
    background: rgba(255,255,255,.78);
    transition: .22s ease;
}

input:hover,
select:hover {
    background: rgba(255,255,255,.92);
}

input:focus,
select:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(0,122,255,.13);
    transform: translateY(-1px);
}

.form-grid {
    display: grid;
    grid-template-columns: 1.2fr .8fr 140px auto;
    gap: 11px;
    align-items: end;
}

button,
.btn {
    border: none;
    min-height: 38px;
    padding: 10px 13px;
    border-radius: 14px;
    background: var(--blue);
    color: white;
    font-size: 12.5px;
    font-weight: 780;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: .22s ease;
    box-shadow: 0 10px 20px rgba(0,122,255,.16);
    white-space: nowrap;
}

button:hover,
.btn:hover {
    transform: translateY(-2px) scale(1.015);
    filter: brightness(.98);
}

button:active,
.btn:active {
    transform: scale(.97);
}

.btn-red {
    background: var(--red);
    box-shadow: 0 10px 20px rgba(255,59,48,.16);
}

.btn-green {
    background: var(--green);
    box-shadow: 0 10px 20px rgba(52,199,89,.16);
}

.btn-gray {
    background: var(--gray);
    box-shadow: 0 10px 20px rgba(142,142,147,.14);
}

.btn-dark {
    background: var(--dark);
    box-shadow: 0 10px 20px rgba(28,28,30,.16);
}

.btn-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 12px;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
    border-radius: 16px;
    background: rgba(255,255,255,.35);
}

table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
}

th {
    text-align: left;
    background: rgba(242,242,247,.82);
    padding: 10px;
    font-size: 12.5px;
    color: #5b6170;
    font-weight: 800;
}

td {
    padding: 10px;
    font-size: 13.5px;
    border-bottom: 1px solid rgba(229,231,235,.78);
    vertical-align: middle;
}

tbody tr {
    transition: .18s ease;
}

tbody tr:hover {
    background: rgba(0,122,255,.055);
    transform: scale(1.002);
}

tbody tr:last-child td {
    border-bottom: none;
}

.badge {
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.aktif {
    background: rgba(52,199,89,.16);
    color: #1f8f43;
}

.nonaktif {
    background: rgba(255,59,48,.14);
    color: #c92a22;
}

.empty {
    text-align: center;
    color: var(--muted);
    padding: 26px;
}

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.login-card {
    width: 100%;
    max-width: 380px;
    padding: 25px;
    animation: fadeUp .45s ease;
}

.login-logo {
    width: 56px;
    height: 56px;
    border-radius: 19px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--blue), #5ac8fa);
    color: white;
    margin-bottom: 17px;
    box-shadow: 0 12px 30px rgba(0,122,255,.26);
    animation: softFloat 3s ease-in-out infinite;
}

.login-logo svg {
    width: 29px;
    height: 29px;
}

.error {
    background: rgba(255,59,48,.12);
    color: #c92a22;
    padding: 10px;
    border-radius: 14px;
    margin-bottom: 14px;
    font-size: 12.5px;
}

.footer {
    margin-top: 18px;
    text-align: center;
    font-size: 12px;
    color: var(--muted);
}

@media(max-width: 1050px) {
    .cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .form-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media(max-width: 820px) {
    .sidebar {
        width: calc(100% - 24px);
        height: auto;
        position: relative;
        top: 12px;
        left: 12px;
        margin-bottom: 12px;
    }

    .brand {
        margin-bottom: 12px;
    }

    .menu {
        display: grid;
        grid-template-columns: repeat(6, 1fr);
        gap: 6px;
    }

    .menu a {
        justify-content: center;
        padding: 9px;
        font-size: 12px;
        border-radius: 14px;
    }

    .menu a span {
        display: none;
    }

    .main {
        margin-left: 0;
        padding: 16px 12px;
    }

    .hero p {
        max-width: 100%;
        padding-right: 54px;
    }
}

@media(max-width: 560px) {
    .menu {
        grid-template-columns: repeat(3, 1fr);
    }

    .cards,
    .stats,
    .form-grid,
    .btn-grid {
        grid-template-columns: 1fr;
    }

    .hero,
    .box,
    .card,
    .stat-card {
        border-radius: 17px;
    }

    .hero {
        padding: 16px;
    }

    .hero h2 {
        font-size: 19px;
    }

    .hero p {
        padding-right: 0;
        max-width: 100%;
    }

    .hero-icon {
        position: static;
        margin-top: 12px;
    }

    .card,
    .stat-card {
        min-height: 106px;
    }

    .card h1,
    .stat-card h1 {
        font-size: 26px;
    }

    th,
    td {
        padding: 9px;
        font-size: 12px;
    }

    .btn {
        padding: 9px 10px;
        min-height: 34px;
        font-size: 12px;
    }

    .login-card {
        padding: 22px;
    }
}