/* ============================================================
   Sehat Indonesiaku sandbox theme — cloned look, rebuilt assets.
   All assets local (fonts bundled in ./fonts/). No CDN.
   ============================================================ */

@font-face {
    font-family: 'Manrope';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/manrope-400.woff2') format('woff2');
}
@font-face {
    font-family: 'Manrope';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('fonts/manrope-500.woff2') format('woff2');
}
@font-face {
    font-family: 'Manrope';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('fonts/manrope-600.woff2') format('woff2');
}
@font-face {
    font-family: 'Manrope';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('fonts/manrope-700.woff2') format('woff2');
}
@font-face {
    font-family: 'Manrope';
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url('fonts/manrope-800.woff2') format('woff2');
}

:root {
    --teal:        #00b8ac;
    --teal-dark:   #00968c;
    --teal-soft:   #e3f4f4;
    --red:         #e8543f;
    --ink:         #253038;
    --muted:       #8a94a6;
    --bg:          #f4f6f8;
    --card:        #ffffff;
    --border:      #dde3ec;
    --danger:      #c0392b;
    --danger-bg:   #fdeceb;
    --amber-ink:   #7c4a03;
    --amber-bg:    #fdeeba;
    --amber-edge:  #f2d478;
    --radius:      10px;
    --shadow:      0 2px 10px rgba(30, 45, 60, 0.08);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Manrope', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: #343434;
    font-size: 0.9rem;
    letter-spacing: 0.25px;
    line-height: 1.55;
    min-height: 100vh;
}

/* ---------- persistent demo banner ---------- */
.demo-banner {
    background: repeating-linear-gradient(135deg, var(--amber-bg), var(--amber-bg) 22px, #fbe89b 22px, #fbe89b 44px);
    border-bottom: 1px solid var(--amber-edge);
    color: var(--amber-ink);
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.2px;
    text-align: center;
    padding: 7px 16px;
}

/* ---------- top bar + wordmark (styled text, not an official asset) ---------- */
.topbar {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 28px;
}

.brand {
    display: inline-flex;
    flex-direction: column;
    text-decoration: none;
    line-height: 1.05;
    user-select: none;
}
.brand-row {
    color: var(--teal);
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.brand-flag {
    width: 46px;
    height: 16px;
    border-radius: 3px;
    background: linear-gradient(to bottom, var(--red) 0 50%, #f6f2ee 50% 100%);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}
.brand-sub {
    color: var(--teal);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 1.6px;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.topbar-unit { color: var(--ink); font-size: 14px; }

/* ---------- page + cards ---------- */
.page {
    max-width: 1080px;
    margin: 0 auto;
    padding: 28px 20px 60px;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: 28px 32px 32px;
}

.page-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 4px;
}
.muted { color: var(--muted); margin: 0 0 18px; }

.section-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--teal-dark);
    border-bottom: 2px solid var(--teal-soft);
    padding-bottom: 6px;
    margin: 26px 0 16px;
}
.section-title:first-of-type { margin-top: 8px; }

/* ---------- forms ---------- */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 24px;
}
@media (max-width: 720px) {
    .grid-2 { grid-template-columns: 1fr; }
    .form-card, .auth-card { padding: 20px; }
}

.field { margin-bottom: 16px; min-width: 0; }
.field-wide { grid-column: 1 / -1; }

.field label {
    display: block;
    font-size: 13.5px;
    font-weight: 500;
    margin-bottom: 6px;
}
.req { color: var(--danger); }

input[type="text"],
input[type="password"],
select,
textarea {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    font: inherit;
    color: var(--ink);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { height: auto; padding: 10px 14px; resize: vertical; }

input:focus, select:focus, textarea:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(23, 162, 162, 0.16);
}

input::placeholder, textarea::placeholder { color: #a7b0bf; }

select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23560' stroke-linecap='round' stroke-opacity='0.55' stroke-width='2'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
}

select:disabled {
    background-color: #e4e7ec;
    border-color: #d4d9e2;
    color: #98a1b0;
    cursor: not-allowed;
}

.inline-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.inline-row input { flex: 1; }

.hint { display: block; font-size: 12.5px; margin-top: 5px; min-height: 16px; }
.hint.ok  { color: #1d8a4e; }
.hint.err { color: var(--danger); }

/* ---------- buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    padding: 0 22px;
    font: inherit;
    font-weight: 600;
    border: 0;
    border-radius: var(--radius);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, transform 0.05s;
    white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-dark); }

.btn-neutral { background: #c9ced6; color: #333a45; }
.btn-neutral:hover { background: #b9bfc9; }

.btn-ghost {
    background: transparent;
    color: var(--teal-dark);
    border: 1px solid var(--border);
    height: 36px;
    padding: 0 14px;
    font-size: 13.5px;
}
.btn-ghost:hover { background: var(--teal-soft); }

.btn-sm { height: 36px; padding: 0 14px; font-size: 13.5px; }
.btn-block { width: 100%; margin-top: 8px; }

/* ---------- alerts ---------- */
.alert {
    border-radius: var(--radius);
    padding: 12px 16px;
    margin: 0 0 18px;
    font-size: 14px;
}
.alert-error {
    background: var(--danger-bg);
    border: 1px solid #f2c4c0;
    color: var(--danger);
}
.alert-error ul { margin: 6px 0 0; padding-left: 20px; }

/* ---------- login ---------- */
.auth-wrap {
    display: flex;
    justify-content: center;
    padding-top: 34px;
}
.auth-card { width: 420px; max-width: 100%; }

.captcha-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.captcha-row img {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    flex: 0 0 auto;
}
.captcha-row a {
    font-size: 20px;
    color: var(--muted);
    text-decoration: none;
    padding: 4px 6px;
    border-radius: 8px;
}
.captcha-row a:hover { color: var(--teal); background: var(--teal-soft); }
.captcha-row input {
    width: 110px;
    flex: 0 0 auto;
    letter-spacing: 4px;
    font-weight: 600;
}

.demo-hint {
    margin-top: 20px;
    background: var(--teal-soft);
    border: 1px dashed var(--teal);
    border-radius: var(--radius);
    padding: 10px 14px;
    font-size: 13px;
    text-align: center;
}
.demo-hint code {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1px 7px;
    font-size: 12.5px;
}

/* ---------- success / empty ---------- */
.success-card { text-align: center; padding-top: 44px; padding-bottom: 44px; }
.success-icon { color: var(--teal); }
.success-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
    flex-wrap: wrap;
}

.empty-state {
    text-align: center;
    color: var(--muted);
    padding: 48px 0;
}

/* ---------- list table ---------- */
.table-scroll { overflow-x: auto; margin-top: 8px; }

.data-table {
    border-collapse: collapse;
    width: 100%;
    font-size: 13.5px;
}
.data-table th {
    background: #e9edf2;
    color: var(--ink);
    text-align: left;
    font-weight: 600;
    padding: 10px 12px;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}
.data-table td {
    padding: 9px 12px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.data-table tbody tr:nth-child(even) { background: #f7fafb; }
.data-table tbody tr:hover { background: var(--teal-soft); }

/* ============================================================
   Login page — cloned from sehatindonesiaku.kemkes.go.id/auth/login
   (background pattern rebuilt in CSS/SVG — no official assets)
   ============================================================ */

.login-page {
    min-height: calc(100vh - 34px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    background-color: #eef6f4;
    background-image:
        /* subtle grid lines */
        linear-gradient(rgba(255, 255, 255, 0.45) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.45) 1px, transparent 1px),
        /* scattered plus signs */
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='340' height='340'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.55' stroke-width='10'%3E%3Cpath d='M60 40v40M40 60h40'/%3E%3Cpath d='M300 150v46M277 173h46'/%3E%3Cpath d='M120 260v40M100 280h40'/%3E%3C/g%3E%3Cg fill='%23ffffff' fill-opacity='0.5'%3E%3Ccircle cx='200' cy='60' r='10'/%3E%3Ccircle cx='70' cy='190' r='7'/%3E%3Ccircle cx='320' cy='310' r='9'/%3E%3C/g%3E%3C/svg%3E"),
        radial-gradient(circle at 20% 20%, #f2faf8 0%, #e3f2ee 45%, #d9ede9 100%);
    background-size: 60px 60px, 60px 60px, 340px 340px, cover;
}

.login-logo {
    align-self: flex-start;
    padding: 10px 16px;
}
.login-logo .brand { cursor: default; }

.login-card {
    background: var(--card);
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.30), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
    padding: 16px 24px 24px;
    width: 500px;
    max-width: calc(100% - 32px);
    margin-top: -60px;
}

.login-title {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    color: #343434;
    margin: 16px 0 8px;
}

.login-field { margin-top: 20px; }
.login-field > label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
    color: #343434;
}

.login-input {
    height: 44px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 0 12px;
    font: inherit;
    letter-spacing: inherit;
    color: #343434;
    background: #fff;
    outline: none;
    transition: border-color 0.15s;
}
.login-input::placeholder { color: #9ca3af; }
.login-input:focus { border-color: #111; }

.login-pass-wrap { position: relative; }
.login-pass-wrap .login-input { width: 100%; padding-right: 44px; }
.login-pass-toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    cursor: pointer;
    color: #6b7280;
    padding: 6px;
    border-radius: 6px;
    line-height: 0;
}
.login-pass-toggle:hover { color: #111; }

.login-captcha-row {
    display: flex;
    align-items: center;
    gap: 16px;
}
.login-captcha-row .login-captcha-input { flex: 0 0 70%; }
.login-captcha-img-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}
.login-captcha-img {
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    background: #fff;
    height: 44px;
    width: auto;
}
.login-captcha-refresh {
    border: 0;
    background: transparent;
    cursor: pointer;
    color: #374151;
    padding: 6px;
    border-radius: 8px;
    line-height: 0;
}
.login-captcha-refresh:hover { color: var(--teal); background: var(--teal-soft); }

.btn-masuk {
    width: 100%;
    height: 44px;
    margin-top: 24px;
    border: 0;
    border-radius: 8px;
    font: inherit;
    font-weight: 600;
    letter-spacing: inherit;
    cursor: pointer;
    transition: background 0.15s;
}
.btn-masuk:disabled {
    background: #e8e8e8;
    color: #9ca3af;
    cursor: not-allowed;
}
.btn-masuk:not(:disabled) {
    background: var(--teal);
    color: #fff;
}
.btn-masuk:not(:disabled):hover { background: var(--teal-dark); }

.login-help {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin: 32px 0 8px;
}
.login-help a {
    color: var(--teal);
    font-size: 14px;
    text-decoration: none;
}
.login-help a:hover { opacity: 0.85; text-decoration: underline; }

.login-footer {
    font-size: 14px;
    color: #565656;
    text-align: center;
    margin: 16px 0;
    padding: 0 16px;
}

.login-error {
    background: var(--danger-bg);
    border: 1px solid #f2c4c0;
    color: var(--danger);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13.5px;
    margin-top: 16px;
}

.demo-hint-login {
    margin-top: 16px;
    background: var(--teal-soft);
    border: 1px dashed var(--teal);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12.5px;
    text-align: center;
}
.demo-hint-login code {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 1px 6px;
    font-size: 12px;
}
