/* ==========================================================
   MANAGEMENT SPA BABY - Custom CSS (melengkapi Tailwind)
   ========================================================== */

:root {
    --brand: #ec4899;
    --brand-dark: #be185d;
    --teal: #0d9488;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* Animasi masuk halus */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-up {
    animation: fadeUp .45s cubic-bezier(.22, 1, .36, 1) both;
}

.delay-1 { animation-delay: .06s; }
.delay-2 { animation-delay: .12s; }
.delay-3 { animation-delay: .18s; }

/* Sidebar */
.sidebar-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    border-radius: .75rem;
    padding: .6rem .8rem;
    font-size: .875rem;
    color: #cbd5e1;
    transition: background-color .18s ease, color .18s ease;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, .09);
    color: #fff;
}

.sidebar-link.active {
    background: linear-gradient(90deg, rgba(236, 72, 153, .28), rgba(13, 148, 136, .18));
    color: #fff;
    box-shadow: inset 3px 0 0 #f472a1;
}

.sidebar-group-title {
    font-size: .625rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, .45);
    padding: 0 .8rem;
    margin-top: 1.25rem;
    margin-bottom: .35rem;
}

/* Scrollbar */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* Tabel */
.table-wrap {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: .875rem;
}

.data-table thead th {
    background: #f8fafc;
    color: #64748b;
    font-size: .6875rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    text-align: left;
    font-weight: 600;
    padding: .75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.data-table tbody td {
    padding: .85rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    vertical-align: middle;
}

.data-table tbody tr:hover { background: #fff7fb; }
.data-table tbody tr:last-child td { border-bottom: 0; }

/* Input */
.field {
    width: 100%;
    border-radius: .75rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    padding: .6rem .85rem;
    font-size: .875rem;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

.field:focus {
    border-color: #f472a1;
    box-shadow: 0 0 0 4px #fce7f3;
}

.field-label {
    display: block;
    margin-bottom: .35rem;
    font-size: .8125rem;
    font-weight: 600;
    color: #475569;
}

/* Toggle */
.switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 24px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
    position: absolute;
    inset: 0;
    cursor: pointer;
    background: #cbd5e1;
    border-radius: 999px;
    transition: .2s;
}

.slider:before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: .2s;
}

input:checked + .slider { background: #db2777; }
input:checked + .slider:before { transform: translateX(18px); }

/* Modal sederhana */
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(15, 23, 42, .55);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-backdrop[hidden] { display: none; }

/* Laporan bulanan A4 (rapi untuk cetak) */
.report-sheet {
    width: 210mm;
    min-height: 297mm;
    margin: 0 auto;
    padding: 14mm;
    background: #fff;
    color: #111827;
    box-shadow: 0 12px 35px rgba(15, 23, 42, .14);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 9.5pt;
    line-height: 1.35;
}

.report-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10mm;
    padding-bottom: 4mm;
    border-bottom: 2px solid #0f172a;
}

.report-brand { display: flex; gap: 3mm; align-items: flex-start; }
.report-logo {
    flex: 0 0 10mm;
    height: 10mm;
    border-radius: 2mm;
    background: #be185d;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13pt;
}
.report-brand-name { font-size: 12.5pt; font-weight: 700; letter-spacing: .02em; }
.report-brand-detail { font-size: 8pt; color: #4b5563; }
.report-head-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1mm;
    text-align: right;
    font-size: 8pt;
    color: #4b5563;
}
.report-confidential {
    border: 1px solid #be185d;
    color: #be185d;
    border-radius: 1mm;
    padding: .6mm 2mm;
    font-weight: 700;
    letter-spacing: .1em;
    font-size: 7pt;
}

.report-title-block { text-align: center; margin: 6mm 0 5mm; }
.report-title-block h1 { margin: 0; font-size: 15pt; font-weight: 700; letter-spacing: .08em; }
.report-title-block p { margin: 2mm 0 0; font-size: 9pt; color: #4b5563; }

.report-meta { width: 100%; border-collapse: collapse; margin-bottom: 5mm; font-size: 8.5pt; }
.report-meta th, .report-meta td { border: 1px solid #cbd5e1; padding: 1.6mm 2.5mm; text-align: left; }
.report-meta th { width: 27mm; background: #f1f5f9; font-weight: 600; color: #334155; }
.report-meta td { font-weight: 600; }

.report-section { margin-bottom: 5mm; break-inside: avoid; page-break-inside: avoid; }
.report-section h2 {
    margin: 0 0 2.5mm;
    padding: 1.5mm 2.5mm;
    background: #f1f5f9;
    border-left: 3px solid #be185d;
    font-size: 10pt;
    font-weight: 700;
    letter-spacing: .06em;
}
.report-subtitle { margin: 3mm 0 1.5mm; font-size: 8.5pt; font-weight: 700; color: #334155; }

.report-table { width: 100%; border-collapse: collapse; font-size: 8.5pt; }
.report-table thead { display: table-header-group; }
.report-table th, .report-table td { border: 1px solid #cbd5e1; padding: 1.5mm 2mm; vertical-align: top; }
.report-table thead th { background: #f8fafc; color: #334155; font-weight: 700; text-align: left; font-size: 8pt; }
.report-table tbody tr { break-inside: avoid; page-break-inside: avoid; }
.report-num { text-align: right !important; white-space: nowrap; }
.report-strong { font-weight: 700; }
.report-total td, .report-total th { background: #f8fafc; font-weight: 700; }
.report-compact { font-size: 7.6pt; }
.report-compact th, .report-compact td { padding: 1.2mm 1.5mm; }
.report-kpi th { width: 32%; background: #f8fafc; text-align: left; font-weight: 600; color: #334155; }
.report-kpi td { width: 18%; text-align: right; font-weight: 600; }

.report-note { margin: 2mm 0 0; font-size: 7.8pt; color: #4b5563; }
.report-notes { margin: 0; padding-left: 5mm; font-size: 8pt; color: #374151; }
.report-notes li { margin-bottom: 1mm; }

.report-sign { margin-top: 8mm; break-inside: avoid; page-break-inside: avoid; }
.report-sign-intro { margin: 0 0 6mm; font-size: 8.5pt; }
.report-sign-grid { display: flex; gap: 12mm; }
.report-sign-box { flex: 1; text-align: center; font-size: 8.5pt; }
.report-sign-role { font-weight: 600; }
.report-sign-title { font-size: 8pt; color: #4b5563; }
.report-sign-line { height: 18mm; border-bottom: 1px solid #0f172a; margin: 0 6mm 2mm; }
.report-sign-name { font-weight: 700; }
.report-sign-date { font-size: 8pt; color: #4b5563; }

.report-foot {
    display: flex;
    justify-content: space-between;
    margin-top: 8mm;
    padding-top: 2mm;
    border-top: 1px solid #cbd5e1;
    font-size: 7pt;
    color: #6b7280;
}

/* Cetak / slip */
@media print {
    @page { size: A4; margin: 14mm; }
    body { background: #fff !important; }
    .no-print, aside, nav.sidebar, header.topbar { display: none !important; }
    main { margin: 0 !important; padding: 0 !important; }
    .print-area { box-shadow: none !important; border: 0 !important; margin: 0 auto !important; max-width: none !important; }
    .print-area.page-break { break-before: page; page-break-before: always; }
    .report-sheet { width: auto !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important; box-shadow: none !important; }
    .data-table thead th { background: #f1f5f9 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
