/* Presensia Team — Manual Book (print + screen) */

:root {
    --navy-900: #0f1f38;
    --navy-700: #1e3a5f;
    --navy-600: #2d5a87;
    --blue-500: #3b82f6;
    --blue-50: #eff6ff;
    --emerald-500: #10b981;
    --emerald-50: #ecfdf5;
    --amber-500: #f59e0b;
    --amber-50: #fffbeb;
    --rose-500: #ef4444;
    --rose-50: #fef2f2;
    --violet-500: #8b5cf6;
    --violet-50: #f5f3ff;
    --text: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --surface: #ffffff;
    --line: #e2e8f0;
    --bg: #f8fafc;
}

@page {
    size: A4;
    margin: 20mm 18mm 25mm 18mm;
    @bottom-center { content: counter(page); font-size: 9pt; color: #94a3b8; }
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 10.5pt;
    line-height: 1.7;
    color: var(--text);
    background: var(--surface);
}

.page { max-width: 210mm; margin: 0 auto; padding: 15mm 18mm; }

@media print {
    .page { max-width: none; padding: 0; }
    .page-break { page-break-before: always; }
    .no-break { page-break-inside: avoid; }
    .toc a { text-decoration: none; color: var(--text); }
}

@media screen {
    body { background: #e2e8f0; }
    .page { background: white; margin: 20px auto; box-shadow: 0 4px 24px rgba(0,0,0,.08); border-radius: 4px; }
    .page-break { border-top: 2px dashed #cbd5e1; margin: 40px 0; padding-top: 40px; }
}

/* Cover */
.cover { text-align: center; padding: 60px 0; }
.cover-logo { width: 80px; height: 80px; margin: 0 auto 24px; background: var(--navy-700); border-radius: 20px; display: flex; align-items: center; justify-content: center; color: white; font-size: 32px; font-weight: 800; letter-spacing: -1px; }
.cover h1 { font-size: 28pt; font-weight: 800; color: var(--navy-900); line-height: 1.2; margin-bottom: 8px; }
.cover .subtitle { font-size: 14pt; color: var(--navy-600); font-weight: 500; margin-bottom: 40px; }
.cover .meta { font-size: 10pt; color: var(--text-muted); line-height: 2; }
.cover .version { display: inline-block; background: var(--blue-50); color: var(--blue-500); padding: 4px 16px; border-radius: 20px; font-weight: 600; font-size: 9pt; margin-top: 24px; }

/* TOC */
.toc { counter-reset: toc-section; }
.toc h2 { font-size: 16pt; margin-bottom: 20px; color: var(--navy-900); }
.toc-group { margin-bottom: 16px; }
.toc-group-title { font-size: 8pt; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-muted); font-weight: 700; margin-bottom: 6px; }
.toc ol { list-style: none; counter-reset: toc-item; }
.toc li { counter-increment: toc-item; }
.toc li a { display: flex; align-items: baseline; padding: 5px 0; border-bottom: 1px dotted var(--line); text-decoration: none; color: var(--text); font-size: 10pt; }
.toc li a:hover { color: var(--blue-500); }
.toc li a::before { content: counter(toc-item) ". "; font-weight: 600; color: var(--navy-600); min-width: 28px; }
.toc li.sub a { padding-left: 28px; font-size: 9.5pt; color: var(--text-secondary); }
.toc li.sub a::before { content: ""; min-width: 0; }

/* Headings */
h2 { font-size: 16pt; font-weight: 800; color: var(--navy-900); margin: 32px 0 12px; padding-bottom: 8px; border-bottom: 3px solid var(--navy-700); }
h2.section-karyawan { border-bottom-color: var(--violet-500); }
h2.section-admin { border-bottom-color: #1e40af; }
h3 { font-size: 13pt; font-weight: 700; color: var(--navy-700); margin: 24px 0 8px; }
h4 { font-size: 11pt; font-weight: 600; color: var(--text); margin: 16px 0 6px; }

p { margin-bottom: 10px; }
ul, ol { margin: 8px 0 12px 20px; }
li { margin-bottom: 4px; }

/* Callout boxes */
.callout { padding: 14px 16px; border-radius: 10px; margin: 14px 0; font-size: 9.5pt; line-height: 1.6; }
.callout-title { font-weight: 700; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.callout ul { margin-top: 6px; }
.callout.info { background: var(--blue-50); border-left: 4px solid var(--blue-500); }
.callout.info .callout-title { color: var(--blue-500); }
.callout.success { background: var(--emerald-50); border-left: 4px solid var(--emerald-500); }
.callout.success .callout-title { color: var(--emerald-500); }
.callout.warning { background: var(--amber-50); border-left: 4px solid var(--amber-500); }
.callout.warning .callout-title { color: var(--amber-500); }
.callout.danger { background: var(--rose-50); border-left: 4px solid var(--rose-500); }
.callout.danger .callout-title { color: var(--rose-500); }

/* Tables */
table { width: 100%; border-collapse: collapse; margin: 12px 0 16px; font-size: 9.5pt; }
th, td { padding: 8px 10px; text-align: left; border: 1px solid var(--line); }
th { background: var(--navy-700); color: white; font-weight: 600; font-size: 9pt; text-transform: uppercase; letter-spacing: 0.5px; }
th.col-narrow { width: 30%; }
tr:nth-child(even) { background: var(--bg); }
td code { background: var(--blue-50); padding: 1px 5px; border-radius: 4px; font-family: 'Courier New', monospace; font-size: 8.5pt; }

/* Steps */
.steps { counter-reset: step; list-style: none; margin-left: 0; }
.steps li { counter-increment: step; position: relative; padding-left: 40px; margin-bottom: 14px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 28px; height: 28px; background: var(--navy-700); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 9pt; }

/* Badge / role tag */
.role-tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 8pt; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.role-admin { background: #dbeafe; color: #1e40af; }
.role-hr { background: #d1fae5; color: #065f46; }
.role-manajer { background: #fef3c7; color: #92400e; }
.role-karyawan { background: #ede9fe; color: #5b21b6; }

/* Screenshot placeholder */
.screenshot { background: var(--bg); border: 2px dashed var(--line); border-radius: 10px; padding: 30px; text-align: center; color: var(--text-muted); font-size: 9pt; margin: 12px 0; font-style: italic; }

.manual-figure { margin: 16px 0 18px; text-align: center; page-break-inside: avoid; }
.manual-figure__img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    border: 1px solid var(--line);
    box-shadow: 0 4px 16px rgba(15, 31, 56, 0.08);
}
.manual-figure__img--mobile { max-width: 260px; }
.manual-figure__caption {
    font-size: 8.5pt;
    color: var(--text-muted);
    margin-top: 8px;
    font-style: italic;
}

/* Kbd */
kbd { background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; font-family: 'Courier New', monospace; font-size: 8.5pt; }

.footer-manual { text-align: center; color: var(--text-muted); font-size: 9pt; padding: 30px 0; border-top: 1px solid var(--line); margin-top: 40px; }
