:root {
    --font-sans: 'Nunito', ui-sans-serif, system-ui, sans-serif;
    --font-serif: 'Cormorant Garamond', 'Times New Roman', serif;
    --color-ink: #3a2430;
    --color-body: #4d3340;
    --color-paper: #fbf4f7;
    --color-card: #fffafc;
    --color-line: #f0d4de;
    --color-muted: #8a6270;
    --color-clay: #d97a98;
    --color-clay-dark: #c45d7e;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.55;
    letter-spacing: 0.01em;
    background:
        radial-gradient(1100px 480px at 8% -12%, #fadce8 0%, transparent 58%),
        radial-gradient(900px 420px at 100% 0%, #f7e4ee 0%, transparent 48%),
        var(--color-paper);
    color: var(--color-body);
}

h1, h2, h3, .font-display {
    font-family: var(--font-serif);
    font-weight: 600;
    color: var(--color-ink);
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.font-display { font-optical-sizing: auto; }

.cp-brand-logo {
    display: block;
    height: 2.5rem;
    width: auto;
    max-width: 7.5rem;
    object-fit: contain;
    border-radius: 0.85rem;
}

.cp-brand-logo-lg {
    height: 3rem;
    max-width: 8.5rem;
}

.cp-brand-mark {
    display: flex;
    height: 3rem;
    width: 3rem;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border-radius: 0.95rem;
    background: #fde8f0;
    font-family: var(--font-serif);
    font-size: 1.35rem;
    color: var(--color-clay-dark);
}

.cp-kicker {
    font-family: var(--font-sans);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color-clay);
}

.cp-shell { max-width: 440px; }

.cp-card {
    background: var(--color-card);
    border: 1px solid var(--color-line);
    box-shadow: 0 14px 36px -20px rgba(196, 93, 126, 0.38);
}

.cp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 48px;
    border-radius: 999px;
    padding: 0.7rem 1.15rem;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-decoration: none;
    border: 0;
    cursor: pointer;
}

.cp-btn-primary {
    background: var(--color-clay);
    color: #fffafc;
}

.cp-btn-primary:hover { background: var(--color-clay-dark); }

.cp-btn-ghost {
    background: #fff;
    border: 1px solid var(--color-line);
    color: var(--color-ink);
}

.cp-input,
.cp-select,
.cp-textarea {
    width: 100%;
    border: 1px solid var(--color-line);
    background: #fff;
    border-radius: 16px;
    padding: 0.85rem 1rem;
    color: var(--color-ink);
    font: inherit;
    font-weight: 600;
}

.cp-textarea {
    min-height: 110px;
    resize: vertical;
    font-weight: 500;
}

.cp-input:focus,
.cp-select:focus,
.cp-textarea:focus {
    outline: 2px solid rgba(217, 122, 152, 0.4);
    border-color: var(--color-clay);
}

.cp-seg {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding: 5px;
    background: #f8eaf0;
    border-radius: 16px;
}

.cp-seg label {
    margin: 0;
    text-align: center;
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--color-muted);
    border-radius: 12px;
    padding: 0.55rem 0.2rem;
    cursor: pointer;
}

.cp-seg label.is-on {
    background: #fff;
    color: var(--color-ink);
    box-shadow: 0 4px 12px -6px rgba(196, 93, 126, 0.45);
}

.cp-seg input { display: none; }

.cp-seg.is-2 {
    grid-template-columns: repeat(2, 1fr);
}

.cp-seg.is-4 {
    grid-template-columns: repeat(4, 1fr);
}

.cp-seg.is-4 label {
    font-size: 0.7rem;
    padding: 0.55rem 0.1rem;
}

.cp-pickers {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.cp-pickers.is-2 {
    grid-template-columns: repeat(2, 1fr);
}

.cp-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    border-radius: 16px;
    padding: 8px 4px 6px;
    color: var(--color-muted);
    text-decoration: none;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.cp-nav a.is-on {
    color: var(--color-clay-dark);
    background: #fde8f0;
}

.cp-nav svg { width: 20px; height: 20px; }

.cp-time {
    display: inline-block;
    background: #fde8f0;
    color: #9b4564;
    border-radius: 999px;
    padding: 0.15rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 800;
}

.status-hadir { background: #fde8f0; color: #9b4564; }
.status-daring { background: #f3e6f4; color: #7a4d86; }
.status-ganti { background: #f8edd8; color: #7a4b12; }
.status-batal { background: #f8e4e8; color: #8a3d52; }

.cp-note {
    background: #fbf0f4;
    color: var(--color-body);
    border-radius: 16px;
    padding: 0.7rem 0.85rem;
    font-size: 0.9rem;
    line-height: 1.45;
}

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

.hidden { display: none !important; }

.cp-cal {
    background: var(--color-card);
    border: 1px solid var(--color-line);
    border-radius: 24px;
    padding: 10px 8px 12px;
    box-shadow: 0 14px 36px -20px rgba(196, 93, 126, 0.38);
}

.cp-cal-weekdays,
.cp-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
}

.cp-cal-weekdays button,
.cp-cal-dow {
    border: 0;
    background: transparent;
    color: var(--color-muted);
    font: inherit;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 6px 0;
    border-radius: 10px;
    cursor: pointer;
}

.cp-cal-dow.is-on {
    background: #fde8f0;
    color: var(--color-ink);
}

.cp-cal-grid {
    min-height: 220px;
}

.cp-cal-cell {
    display: flex;
    min-height: 52px;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    border-radius: 14px;
    padding: 6px 2px 8px;
    text-decoration: none;
    color: var(--color-ink);
    background: #fff;
}

.cp-cal-cell.is-out {
    opacity: 0.38;
}

.cp-cal-cell.is-today .cp-cal-num {
    background: var(--color-clay);
    color: #fffafc;
}

.cp-cal-cell.is-on {
    background: #fde8f0;
}

.cp-cal-num {
    display: inline-flex;
    width: 1.6rem;
    height: 1.6rem;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.cp-cal-dots {
    display: flex;
    gap: 3px;
    min-height: 6px;
}

.cp-cal-dots i {
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--color-clay);
}

.cp-cal-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

button.cp-cal-cell {
    width: 100%;
    border: 0;
    cursor: pointer;
    font: inherit;
}

.cp-cal-cell.is-pick {
    background: #fde8f0;
    box-shadow: inset 0 0 0 2px var(--color-clay);
}

.cp-cal-picks {
    margin: 10px 4px 0;
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--color-ink);
}

.cp-check {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid var(--color-line);
    border-radius: 16px;
    background: #fff;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-ink);
}

.cp-check input {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: var(--color-clay-dark);
}

.cp-check.is-on,
.cp-check:has(input:checked) {
    border-color: var(--color-clay);
    background: #fde8f0;
}
