/* ============================================================
   AsisDent — TEMA
   Minimalis modern: sage/teal lembut, bentuk organik, datar,
   banyak ruang kosong.

   ATURAN KETERBACAAN (jangan dilanggar):
   Teks utama memakai TINTA GELAP (--ink) di atas permukaan terang.
   Teks putih HANYA di atas elemen gelap (--blue-700/800).
   Teks putih di atas--blue-300/400 kontrasnya terlalu rendah.
   ============================================================ */

:root {
    /* Biru muda (dulu bernama sage — kini condong biru) */
    --blue-50:  #F5FAFD;
    --blue-100: #E8F3F9;
    --blue-200: #D5E8F2;
    --blue-300: #BCDAEA;
    --blue-400: #96C3DA;
    --blue-500: #6FA8C6;
    --blue-600: #5290B2;
    --blue-700: #3E7A99;   /* tombol utama (aman untuk teks putih, 4.7:1) */
    --blue-800: #2E5F79;
    --blue-900: #1D4054;

    /* Pasir / kuning lembut (aksen hangat, dibuat lebih pucat) */
    --sand-100: #FDFAEE;
    --sand-200: #FBF4DC;
    --sand-300: #F7EBC2;
    --sand-400: #F0DFA5;

    /* Permukaan — dibuat hampir putih */
    --cream: #FFFFFF;
    --paper: #FFFFFF;

    /* Teks — dibuat lebih gelap agar kontras tinggi */
    --ink: #102B3A;
    --body: #2B4A5C;
    --muted: #4F6B7C;
    --on-dark: #FFFFFF;
    --on-dark-soft: rgba(255, 255, 255, .92);

    /* Garis */
    --line: rgba(23, 62, 84, .16);
    --line-soft: rgba(23, 62, 84, .09);

    /* Bentuk */
    --r-sm: 10px;
    --r-md: 14px;
    --r-lg: 20px;
    --r-xl: 28px;
    --r-pill: 999px;

    /* Bayangan: sangat halus, tema ini mengandalkan bidang warna */
    --sh-1: 0 1px 2px rgba(16, 43, 58, .05);
    --sh-2: 0 2px 6px rgba(16, 43, 58, .06), 0 12px 28px -20px rgba(16, 43, 58, .20);
}

/* ------------------------------------------------------ Dasar ---- */
* { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    background: #F8FCFE;
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.65;
    color: var(--body);
    background: transparent;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
    margin: 0;
    color: var(--ink);
    line-height: 1.2;
    letter-spacing: -.015em;
    font-weight: 700;
}
h1 { font-size: clamp(1.95rem, 4.2vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 2.9vw, 2.15rem); }
h3 { font-size: 1.08rem; }
p { margin: 0; }

a { color: var(--blue-800); text-decoration-thickness: 1px; text-underline-offset: 2px; }

::selection { background: var(--sand-300); color: var(--ink); }

:focus-visible {
    outline: 3px solid var(--blue-600);
    outline-offset: 2px;
    border-radius: 6px;
}

/* ------------------------------------------- Latar bentuk organik --- */
.blob-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background: linear-gradient(168deg, #FFFFFF 0%, #F7FBFE 44%, #EDF5FA 100%);
}

.blob { position: absolute; display: block; }

.blob-1 {
    width: 44vw; height: 44vw; top: -16vw; right: -12vw;
    background: var(--blue-400); opacity: .30;
    border-radius: 62% 38% 46% 54% / 55% 47% 53% 45%;
}
.blob-2 {
    width: 40vw; height: 40vw; bottom: -18vw; right: -10vw;
    background: var(--sand-300); opacity: .62;
    border-radius: 48% 52% 62% 38% / 60% 42% 58% 40%;
}
.blob-3 {
    width: 34vw; height: 34vw; bottom: -14vw; left: -12vw;
    background: #FFFFFF; opacity: .95;
    border-radius: 55% 45% 40% 60% / 45% 60% 40% 55%;
}
.blob-4 {
    width: 24vw; height: 24vw; top: 26vh; left: -11vw;
    background: var(--blue-500); opacity: .18;
    border-radius: 45% 55% 58% 42% / 52% 48% 52% 48%;
}

@media (max-width: 760px) {
    .blob-1 { width: 78vw; height: 78vw; top: -26vw; right: -26vw; opacity: .24; }
    .blob-2 { width: 70vw; height: 70vw; bottom: -26vw; right: -20vw; opacity: .50; }
    .blob-3 { width: 60vw; height: 60vw; bottom: -20vw; left: -22vw; opacity: .88; }
    .blob-4 { display: none; }
}

/* ------------------------------------------------ Tataran isi ----- */
.wrap {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 22px;
    position: relative;
}
.wrap-narrow { max-width: 720px; }
.muted { color: var(--muted); }
.center { text-align: center; }

/* --------------------------------------------------- Tombol ------ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: var(--r-pill);
    border: 1px solid transparent;
    font: inherit;
    font-size: .925rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    text-decoration: none;
    transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
    white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--blue-700); color: var(--on-dark); }
.btn-primary:hover { background: var(--blue-800); }

.btn-outline { background: transparent; color: var(--blue-800); border-color: var(--blue-500); }
.btn-outline:hover { background: rgba(255, 255, 255, .6); border-color: var(--blue-700); }

.btn-ghost { background: rgba(255, 255, 255, .72); color: var(--body); border-color: var(--line); }
.btn-ghost:hover { background: #fff; color: var(--ink); }

.btn-quiet { background: transparent; color: var(--muted); }
.btn-quiet:hover { background: rgba(255, 255, 255, .6); color: var(--ink); }

.btn-danger { background: transparent; color: #A63A3A; border-color: rgba(166, 58, 58, .38); }
.btn-danger:hover { background: rgba(166, 58, 58, .08); }

.btn-lg { padding: 14px 30px; font-size: 1rem; }
.btn-sm { padding: 8px 16px; font-size: .85rem; }
.btn-xs { padding: 6px 13px; font-size: .8rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* --------------------------------------------------- Kartu ------- */
.card {
    background: var(--cream);
    border: 1px solid var(--line-soft);
    border-radius: var(--r-xl);
    padding: 28px;
    box-shadow: var(--sh-1);
}
.card h3 { margin-bottom: 10px; }
.card p { font-size: .93rem; color: var(--muted); }

.panel {
    background: var(--cream);
    border: 1px solid var(--line-soft);
    border-radius: var(--r-xl);
    padding: 28px;
    box-shadow: var(--sh-1);
    margin-bottom: 22px;
}
.panel h2 { font-size: 1.14rem; }
.panel .panel-sub { color: var(--muted); font-size: .875rem; margin: 6px 0 20px; }

/* --------------------------------------------------- Lencana ----- */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--r-pill);
    font-size: .74rem;
    font-weight: 700;
    border: 1px solid;
    white-space: nowrap;
}
.badge-active { background: rgba(62, 122, 153, .12); border-color: rgba(62, 122, 153, .30); color: #2A5C75; }
.badge-trial { background: rgba(82, 144, 178, .12); border-color: rgba(82, 144, 178, .30); color: #2E6480; }
.badge-pending { background: var(--sand-200); border-color: rgba(180, 160, 80, .35); color: #6E5D16; }
.badge-expired { background: rgba(166, 58, 58, .09); border-color: rgba(166, 58, 58, .3); color: #8F3232; }
.badge-suspended { background: rgba(79, 107, 124, .10); border-color: var(--line); color: var(--muted); }

.chip {
    display: inline-block;
    padding: 3px 10px;
    border-radius: var(--r-pill);
    font-size: .72rem;
    font-weight: 700;
    background: var(--sand-200);
    color: #6E5D16;
}
.chip.teal { background: rgba(62, 122, 153, .13); color: #2A5C75; }
.chip.sky { background: rgba(82, 144, 178, .14); color: #2E6480; }

/* --------------------------------------------------- Alert ------- */
.alert {
    padding: 14px 18px;
    border-radius: var(--r-md);
    font-size: .9rem;
    border: 1px solid;
    margin-bottom: 20px;
    line-height: 1.55;
}
.alert-error { background: rgba(166, 58, 58, .07); border-color: rgba(166, 58, 58, .28); color: #8F3232; }
.alert-success { background: rgba(62, 122, 153, .10); border-color: rgba(62, 122, 153, .30); color: #2A5C75; }
.alert-info { background: rgba(82, 144, 178, .10); border-color: rgba(82, 144, 178, .28); color: #2E6480; }

/* --------------------------------------------------- Form -------- */
.field { display: grid; gap: 7px; }
.field label { font-size: .84rem; font-weight: 600; color: var(--ink); }
.field input, .field select, .field textarea {
    font: inherit;
    font-size: .95rem;
    color: var(--ink);
    padding: 12px 15px;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: #fff;
    width: 100%;
}
.field input::placeholder, .field textarea::placeholder { color: #8AA5B4; }
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none;
    border-color: var(--blue-600);
    box-shadow: 0 0 0 3px rgba(82, 144, 178, .20);
}
.field .hint { font-size: .78rem; color: var(--muted); }
form.stack { display: grid; gap: 16px; }

/* --------------------------------------------------- Tabel ------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.data th {
    text-align: left;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
    font-weight: 700;
}
table.data td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--line-soft);
    vertical-align: middle;
}
table.data tr:last-child td { border-bottom: 0; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row-actions form { display: inline-flex; gap: 6px; align-items: center; }
.empty { padding: 34px 0; text-align: center; color: var(--muted); font-size: .9rem; }

/* ------------------------------------------ Blok detail & statistik */
.detail-list { display: grid; gap: 0; }
.detail-row {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 13px 0;
    border-bottom: 1px solid var(--line-soft);
    font-size: .93rem;
}
.detail-row:last-child { border-bottom: 0; }
.detail-row span:first-child { color: var(--muted); }
.detail-row span:last-child { color: var(--ink); font-weight: 600; text-align: right; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 24px; }
.stat {
    background: var(--cream);
    border: 1px solid var(--line-soft);
    border-radius: var(--r-lg);
    padding: 20px 22px;
    box-shadow: var(--sh-1);
}
.stat .num { font-size: 1.85rem; font-weight: 800; color: var(--ink); letter-spacing: -.02em; line-height: 1.1; }
.stat .lbl { font-size: .8rem; color: var(--muted); margin-top: 4px; }

.page-head { padding: 46px 0 10px; }
.page-head h1 { font-size: clamp(1.6rem, 3.4vw, 2.1rem); }
.page-head p { margin-top: 10px; color: var(--muted); }

/* ------------------------------------------------ Kepala halaman -- */
.nav {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(252, 254, 255, .82);
    backdrop-filter: blur(12px) saturate(150%);
    border-bottom: 1px solid var(--line-soft);
}
.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 70px;
    flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand strong { display: block; color: var(--ink); font-size: 1.08rem; font-weight: 800; letter-spacing: -.01em; line-height: 1.2; }
.brand em { display: block; color: var(--muted); font-size: .72rem; font-style: normal; line-height: 1.3; }
.nav-links { display: flex; gap: 26px; font-size: .92rem; font-weight: 500; }
.nav-links a { color: var(--body); text-decoration: none; }
.nav-links a:hover { color: var(--blue-800); }
.nav-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; justify-content: flex-end; }

/* --------------------------------------------------- Footer ------ */
.footer {
    margin-top: 40px;
    padding: 60px 0 34px;
    background: rgba(252, 254, 255, .80);
    border-top: 1px solid var(--line-soft);
    backdrop-filter: blur(6px);
}
.footer-grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr; gap: 32px; }
.footer-grid h4 {
    font-size: .76rem;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--muted);
    margin-bottom: 14px;
}
.footer-grid a { display: block; font-size: .89rem; color: var(--body); margin-bottom: 9px; text-decoration: none; }
.footer-grid a:hover { color: var(--blue-800); text-decoration: underline; }
.brand-footer { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.brand-footer strong { font-weight: 800; color: var(--ink); }
.footer p.muted { font-size: .88rem; max-width: 27rem; }
.disclaimer {
    margin-top: 40px;
    padding: 20px 22px;
    border-radius: var(--r-lg);
    background: var(--sand-100);
    border: 1px solid rgba(170, 150, 80, .26);
    font-size: .82rem;
    font-style: italic;
    color: #3F3823;
    line-height: 1.7;
}
.copyright { margin-top: 20px; font-size: .77rem; color: var(--muted); text-align: center; }

/* --------------------------------------------------- Cetak ------- */
@media print {
    .blob-bg, .nav, .footer, .no-print { display: none !important; }
    html, body { background: #fff !important; }
    .card, .panel, .stat { box-shadow: none !important; border-color: #d8d8d8 !important; }
}

/* ------------------------------------------------ Responsif ------ */
@media (max-width: 980px) {
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 26px; }
}
@media (max-width: 720px) {
    .nav-links { display: none; }
    .stat-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .nav-inner { min-height: 0; padding-top: 12px; padding-bottom: 12px; }
    .nav-actions { width: 100%; justify-content: flex-start; gap: 8px; }
    .nav-actions .btn { padding: 8px 14px; font-size: .85rem; }
    .nav-actions .btn-quiet { padding: 8px 10px; }
    .card, .panel { padding: 22px; }
    .page-head { padding: 34px 0 6px; }
}
