/* Style bersama (pelengkap Tailwind). Komponen dashboard & menu publik. */

.bg-dotted-pattern {
    background-color: #f4f4f3;
    background-image: radial-gradient(#e5e7eb 1px, transparent 1px);
    background-size: 16px 16px;
}

.min-h-dvh-safe { min-height: 100vh; min-height: 100dvh; }
[x-cloak], .hidden-important { display: none !important; }

/* ---------- Form ---------- */
.label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    color: #71717a;
    text-transform: uppercase;
    margin-bottom: 6px;
}
.hint { font-size: 12px; color: #71717a; margin-top: 6px; line-height: 1.45; }
.input, .select, .textarea {
    width: 100%;
    border: 1px solid #e4e4e7;
    background: #fafafa;
    border-radius: 14px;
    padding: 12px 14px;
    font-size: 14px;
    color: #18181b;
    transition: border-color .15s, box-shadow .15s, background .15s;
    font-family: inherit;
}
.input:focus, .select:focus, .textarea:focus {
    outline: none;
    border-color: #18181b;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(24, 24, 27, .08);
}
.input-sm { padding: 8px 10px; border-radius: 10px; font-size: 13px; }
.input-prefix { position: relative; }
.input-prefix > span {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    font-size: 14px; color: #a1a1aa; pointer-events: none;
}
.input-prefix > .input { padding-left: 40px; }
.input-prefix > .input-sm { padding-left: 34px; }
.input-prefix > span.sm { left: 10px; font-size: 13px; }
.textarea { min-height: 96px; resize: vertical; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: #27272a; cursor: pointer; }
.check input { margin-top: 2px; width: 18px; height: 18px; accent-color: #18181b; flex-shrink: 0; }

/* ---------- Tombol ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border-radius: 14px; padding: 11px 18px; font-size: 14px; font-weight: 700;
    border: 1px solid transparent; cursor: pointer; white-space: nowrap;
    transition: background .15s, transform .1s, border-color .15s, color .15s;
    text-decoration: none; line-height: 1.2;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: #18181b; color: #fff; }
.btn-primary:hover { background: #000; }
.btn-ghost { background: #fff; color: #18181b; border-color: #e4e4e7; }
.btn-ghost:hover { background: #f4f4f5; }
.btn-danger { background: #fff; color: #dc2626; border-color: #fecaca; }
.btn-danger:hover { background: #fef2f2; }
.btn-sm { padding: 7px 12px; font-size: 12px; border-radius: 10px; }
.btn-icon { padding: 7px; border-radius: 10px; }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* ---------- Kartu & label ---------- */
.card { background: #fff; border: 1px solid #e4e4e7; border-radius: 20px; }
.card-pad { padding: 20px; }
@media (min-width: 640px) { .card-pad { padding: 24px; } }
.badge {
    display: inline-flex; align-items: center; gap: 6px; border-radius: 999px;
    padding: 3px 10px; font-size: 11px; font-weight: 700; white-space: nowrap;
}
.badge-green { background: #ecfdf5; color: #047857; }
.badge-amber { background: #fffbeb; color: #b45309; }
.badge-red { background: #fef2f2; color: #b91c1c; }
.badge-gray { background: #f4f4f5; color: #52525b; }
.dot { width: 7px; height: 7px; border-radius: 999px; background: currentColor; display: inline-block; }

.alert { border-radius: 14px; padding: 12px 16px; font-size: 13px; font-weight: 600; margin-bottom: 16px; }
.alert-success { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.alert-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-warn { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }

.page-title { font-size: 22px; font-weight: 800; letter-spacing: -.02em; color: #18181b; }
.page-sub { font-size: 13px; color: #71717a; margin-top: 4px; }

/* Toggle switch dari checkbox */
.switch { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span {
    position: absolute; inset: 0; background: #d4d4d8; border-radius: 999px; transition: background .15s; cursor: pointer;
}
.switch span::before {
    content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px;
    background: #fff; border-radius: 999px; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.switch input:checked + span { background: #16a34a; }
.switch input:checked + span::before { transform: translateX(18px); }
.switch input:focus-visible + span { box-shadow: 0 0 0 3px rgba(22, 163, 74, .3); }

.thumb { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; background: #f4f4f5; flex-shrink: 0; }
.thumb-empty { display: flex; align-items: center; justify-content: center; color: #a1a1aa; }

/* Tabel ringan */
.table { width: 100%; font-size: 13px; border-collapse: collapse; }
.table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #71717a; font-weight: 700; padding: 10px 12px; border-bottom: 1px solid #e4e4e7; }
.table td { padding: 12px; border-bottom: 1px solid #f4f4f5; vertical-align: middle; }

/* Nav dashboard */
.nav-link {
    display: flex; align-items: center; gap: 12px; border-radius: 12px; padding: 9px 12px;
    font-size: 14px; font-weight: 600; color: #52525b; transition: background .15s, color .15s;
}
.nav-link:hover { background: #f4f4f5; color: #18181b; }
.nav-link.active { background: #18181b; color: #fff; }
.nav-link svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-group { margin: 18px 12px 6px; font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #a1a1aa; }

@media print {
    .no-print { display: none !important; }
    body { background: #fff !important; }
}
