/* ==========================================================================
   SIM RS Soebandi — Portal Pasien
   Desain modern, ringan, tanpa dependency gambar eksternal.
   ========================================================================== */

:root {
    --ps-primary: #0d9488;
    --ps-primary-2: #0f766e;
    --ps-accent: #2563eb;
    --ps-ink: #0f2733;
    --ps-muted: #64748b;
    --ps-line: #e2e8f0;
    --ps-soft: #f0fdfa;
    --ps-warn: #f59e0b;
    --ps-danger: #e11d48;
    --ps-success: #059669;
    --ps-shadow: 0 18px 48px rgba(15, 39, 51, .10);
    --ps-radius: 20px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.ps-body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", Inter, system-ui, -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
    color: var(--ps-ink);
    background:
        radial-gradient(circle at 12% 8%, rgba(13, 148, 136, .13), transparent 32%),
        radial-gradient(circle at 92% 18%, rgba(37, 99, 235, .11), transparent 30%),
        linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    -webkit-font-smoothing: antialiased;
}

.ps-body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: radial-gradient(rgba(15, 39, 51, .045) 1px, transparent 1px);
    background-size: 22px 22px;
    opacity: .6;
    z-index: 0;
}

.ps-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(16px);
    background: rgba(255, 255, 255, .82);
    border-bottom: 1px solid rgba(226, 232, 240, .9);
    box-shadow: 0 8px 30px rgba(15, 39, 51, .05);
}

.ps-nav-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 18px;
}

.ps-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--ps-ink);
    font-weight: 800;
    letter-spacing: -.4px;
}

.ps-brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 900;
    font-size: 17px;
    background: linear-gradient(135deg, var(--ps-primary), var(--ps-accent));
    box-shadow: 0 10px 22px rgba(13, 148, 136, .32);
}

.ps-brand small {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--ps-muted);
    letter-spacing: .4px;
}

.ps-nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.ps-nav-link {
    padding: 9px 15px;
    border-radius: 11px;
    text-decoration: none;
    color: var(--ps-muted);
    font-size: 14px;
    font-weight: 650;
    transition: .2s ease;
}

.ps-nav-link:hover,
.ps-nav-link.active {
    color: var(--ps-primary-2);
    background: rgba(13, 148, 136, .09);
}

.ps-user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 12px 7px 7px;
    border: 1px solid var(--ps-line);
    border-radius: 999px;
    background: #fff;
    font-size: 13px;
    font-weight: 700;
}

.ps-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    background: linear-gradient(135deg, #14b8a6, #2563eb);
}

.ps-logout {
    color: var(--ps-danger);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    padding: 8px 10px;
    border-radius: 10px;
}

.ps-logout:hover { background: rgba(225, 29, 72, .08); }

.ps-shell {
    position: relative;
    z-index: 1;
    max-width: 1180px;
    margin: 0 auto;
    padding: 32px 20px 72px;
}

.ps-hero {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    padding: 42px 44px;
    color: #fff;
    background: linear-gradient(120deg, #0f766e 0%, #0d9488 45%, #2563eb 130%);
    box-shadow: var(--ps-shadow);
}

.ps-hero::after {
    content: "";
    position: absolute;
    width: 340px;
    height: 340px;
    right: -90px;
    top: -140px;
    border-radius: 50%;
    border: 45px solid rgba(255, 255, 255, .10);
}

.ps-hero::before {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    right: 110px;
    bottom: -150px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
}

.ps-hero-content { position: relative; z-index: 2; max-width: 660px; }

.ps-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .16);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: .6px;
    text-transform: uppercase;
}

.ps-hero h1 {
    margin: 18px 0 12px;
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 850;
    line-height: 1.15;
    letter-spacing: -1.2px;
}

.ps-hero p {
    margin: 0 0 26px;
    font-size: 15px;
    line-height: 1.7;
    color: rgba(255, 255, 255, .88);
}

.ps-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 0;
    border-radius: 13px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.ps-btn:hover { transform: translateY(-2px); }

.ps-btn-primary {
    color: #fff;
    background: linear-gradient(135deg, #0f766e, #0d9488);
    box-shadow: 0 12px 24px rgba(13, 148, 136, .28);
}

.ps-btn-light {
    color: var(--ps-primary-2);
    background: #fff;
    box-shadow: 0 10px 22px rgba(15, 39, 51, .12);
}

.ps-btn-ghost {
    color: var(--ps-muted);
    background: #f1f5f9;
}

.ps-btn-danger {
    color: #fff;
    background: linear-gradient(135deg, #e11d48, #be123c);
}

.ps-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.ps-card {
    position: relative;
    background: #fff;
    border: 1px solid var(--ps-line);
    border-radius: var(--ps-radius);
    box-shadow: var(--ps-shadow);
    padding: 26px;
}

.ps-card + .ps-card { margin-top: 20px; }

.ps-card-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.ps-card-title h2,
.ps-card-title h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -.3px;
}

.ps-card-title p { margin: 4px 0 0; color: var(--ps-muted); font-size: 13px; }

.ps-section-label {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--ps-primary);
    margin-bottom: 10px;
}

.ps-grid { display: grid; gap: 20px; }
.ps-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ps-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.ps-stat {
    padding: 22px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--ps-line);
    box-shadow: 0 10px 30px rgba(15, 39, 51, .06);
    display: flex;
    align-items: center;
    gap: 16px;
}

.ps-stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    font-size: 21px;
    background: var(--ps-soft);
    color: var(--ps-primary);
}

.ps-stat-label { font-size: 12px; color: var(--ps-muted); font-weight: 650; }
.ps-stat-value { font-size: 24px; font-weight: 850; line-height: 1.2; }

.ps-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .4px;
}

.ps-badge::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.ps-badge.wait { color: #b45309; background: #fffbeb; }
.ps-badge.approve { color: #0369a1; background: #f0f9ff; }
.ps-badge.checkin { color: #4338ca; background: #eef2ff; }
.ps-badge.checkout { color: #047857; background: #ecfdf5; }
.ps-badge.cancel { color: #64748b; background: #f1f5f9; }
.ps-badge.noshow { color: #be123c; background: #fff1f2; }

.ps-kv { display: grid; grid-template-columns: 150px 1fr; gap: 10px 18px; font-size: 14px; }
.ps-kv dt { color: var(--ps-muted); font-weight: 600; }
.ps-kv dd { margin: 0; font-weight: 700; }

.ps-timeline {
    display: flex;
    align-items: flex-start;
    gap: 0;
    margin: 26px 0 8px;
}

.ps-step {
    flex: 1;
    position: relative;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--ps-muted);
}

.ps-step::before {
    content: "";
    position: absolute;
    top: 15px;
    left: -50%;
    width: 100%;
    height: 3px;
    background: var(--ps-line);
    z-index: 0;
}

.ps-step:first-child::before { display: none; }

.ps-step-dot {
    position: relative;
    z-index: 1;
    width: 32px;
    height: 32px;
    margin: 0 auto 9px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #fff;
    border: 3px solid var(--ps-line);
    color: var(--ps-muted);
    font-size: 13px;
    font-weight: 850;
}

.ps-step.done { color: var(--ps-primary-2); }
.ps-step.done::before { background: var(--ps-primary); }
.ps-step.done .ps-step-dot {
    background: var(--ps-primary);
    border-color: var(--ps-primary);
    color: #fff;
}

.ps-step.current .ps-step-dot {
    border-color: var(--ps-accent);
    color: var(--ps-accent);
    box-shadow: 0 0 0 6px rgba(37, 99, 235, .10);
}

.ps-queue {
    margin-top: 22px;
    padding: 22px;
    border-radius: 18px;
    background: linear-gradient(135deg, #ecfdf5, #f0f9ff);
    border: 1px dashed rgba(13, 148, 136, .35);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.ps-queue-number { font-size: 30px; font-weight: 900; color: var(--ps-primary-2); letter-spacing: -.5px; }

.ps-empty {
    text-align: center;
    padding: 54px 24px;
}

.ps-empty-icon {
    width: 86px;
    height: 86px;
    margin: 0 auto 20px;
    border-radius: 26px;
    display: grid;
    place-items: center;
    font-size: 36px;
    background: var(--ps-soft);
    color: var(--ps-primary);
}

.ps-empty h3 { margin: 0 0 8px; font-size: 20px; font-weight: 850; }
.ps-empty p { color: var(--ps-muted); font-size: 14px; margin-bottom: 22px; }

/* Wizard */
.ps-stepper-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}

.ps-stepper-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 750;
    color: var(--ps-muted);
}

.ps-stepper-item span {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #f1f5f9;
    color: var(--ps-muted);
    font-weight: 850;
}

.ps-stepper-item.active { color: var(--ps-primary-2); }
.ps-stepper-item.active span { background: var(--ps-primary); color: #fff; }
.ps-stepper-line { flex: 1; height: 3px; border-radius: 3px; background: var(--ps-line); }
.ps-stepper-line.done { background: var(--ps-primary); }

.ps-wizard-step { display: none; animation: psFade .28s ease; }
.ps-wizard-step.active { display: block; }

@keyframes psFade {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.ps-field { margin-bottom: 18px; }
.ps-field label { display: block; font-size: 13px; font-weight: 750; margin-bottom: 7px; }
.ps-field .ps-hint { display: block; font-size: 11px; color: var(--ps-muted); margin-top: 5px; }

.ps-input {
    width: 100%;
    border: 1.5px solid var(--ps-line);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 14px;
    color: var(--ps-ink);
    background: #fff;
    outline: none;
    transition: border .18s ease, box-shadow .18s ease;
}

.ps-input:focus {
    border-color: var(--ps-primary);
    box-shadow: 0 0 0 4px rgba(13, 148, 136, .12);
}

.ps-input[readonly] { background: #f8fafc; color: var(--ps-muted); }

.ps-patient-card {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 18px;
    border-radius: 16px;
    background: linear-gradient(135deg, #f0fdfa, #eff6ff);
    border: 1px solid rgba(13, 148, 136, .18);
    margin-bottom: 22px;
}

.ps-patient-card .ps-avatar { width: 52px; height: 52px; font-size: 18px; }

.ps-tt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 12px;
    max-height: 310px;
    overflow-y: auto;
    padding-right: 4px;
}

.ps-tt-card {
    position: relative;
    border: 1.5px solid var(--ps-line);
    border-radius: 14px;
    padding: 14px;
    cursor: pointer;
    transition: .18s ease;
    background: #fff;
}

.ps-tt-card:hover { border-color: var(--ps-primary); transform: translateY(-2px); }
.ps-tt-card.selected {
    border-color: var(--ps-primary);
    background: var(--ps-soft);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, .12);
}
.ps-tt-card strong { display: block; font-size: 14px; }
.ps-tt-card small { color: var(--ps-muted); font-size: 11px; }

.ps-mode {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.ps-mode label {
    flex: 1;
    border: 1.5px solid var(--ps-line);
    border-radius: 13px;
    padding: 13px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    transition: .18s ease;
}

.ps-mode label.active { border-color: var(--ps-primary); background: var(--ps-soft); color: var(--ps-primary-2); }

.ps-summary {
    border-radius: 16px;
    border: 1px solid var(--ps-line);
    overflow: hidden;
}

.ps-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 16px;
    font-size: 14px;
}

.ps-summary-row:nth-child(odd) { background: #f8fafc; }
.ps-summary-row span:first-child { color: var(--ps-muted); }
.ps-summary-row span:last-child { font-weight: 750; text-align: right; }

.ps-check {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-top: 18px;
    font-size: 13px;
    color: var(--ps-muted);
    line-height: 1.6;
}

.ps-check input { margin-top: 4px; width: 17px; height: 17px; accent-color: var(--ps-primary); }

.ps-wizard-foot {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 26px;
    padding-top: 20px;
    border-top: 1px solid var(--ps-line);
}

.ps-alert {
    border-radius: 14px;
    padding: 14px 16px;
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 18px;
}

.ps-alert-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.ps-alert-warn { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }

.ps-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ps-table th, .ps-table td { padding: 14px 12px; text-align: left; border-bottom: 1px solid var(--ps-line); }
.ps-table th { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--ps-muted); }
.ps-table tbody tr:hover { background: #f8fafc; }

.ps-footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 22px 20px 30px;
    color: var(--ps-muted);
    font-size: 12px;
    border-top: 1px solid var(--ps-line);
}

/* Auth */
.ps-auth-wrap {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.05fr .95fr;
}

.ps-auth-art {
    position: relative;
    overflow: hidden;
    padding: 54px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #fff;
    background: linear-gradient(145deg, #0f766e, #0d9488 55%, #1d4ed8);
}

.ps-auth-art::before {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    border: 60px solid rgba(255, 255, 255, .08);
    top: -170px;
    right: -150px;
}

.ps-auth-art::after {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .07);
    bottom: -130px;
    left: -70px;
}

.ps-auth-art-content { position: relative; z-index: 2; max-width: 480px; }
.ps-auth-art h1 { font-size: clamp(30px, 4vw, 46px); font-weight: 880; line-height: 1.12; letter-spacing: -1.2px; }
.ps-auth-art p { font-size: 15px; line-height: 1.8; color: rgba(255, 255, 255, .86); }

.ps-cross {
    position: relative;
    width: 92px;
    height: 92px;
    margin: 30px 0;
    border-radius: 24px;
    background: rgba(255, 255, 255, .14);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25);
}

.ps-cross::before, .ps-cross::after {
    content: "";
    position: absolute;
    background: #fff;
    border-radius: 8px;
    left: 50%; top: 50%;
    transform: translate(-50%, -50%);
}
.ps-cross::before { width: 48px; height: 14px; }
.ps-cross::after { width: 14px; height: 48px; }

.ps-auth-feature {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 14px;
    font-size: 14px;
    font-weight: 650;
    color: rgba(255, 255, 255, .92);
}
.ps-auth-feature b {
    width: 26px; height: 26px; border-radius: 50%;
    display: grid; place-items: center;
    background: rgba(255, 255, 255, .2);
    font-size: 12px;
}

.ps-auth-panel {
    display: grid;
    place-items: center;
    padding: 48px 32px;
}

.ps-auth-card { width: 100%; max-width: 430px; }
.ps-auth-card h2 { font-size: 30px; font-weight: 850; letter-spacing: -.7px; margin-bottom: 8px; }
.ps-auth-card > p { color: var(--ps-muted); font-size: 14px; margin-bottom: 28px; }
.ps-auth-card .ps-btn { width: 100%; padding: 14px; }

.ps-auth-switch { text-align: center; margin-top: 22px; font-size: 13px; color: var(--ps-muted); }
.ps-auth-switch a { color: var(--ps-primary-2); font-weight: 800; text-decoration: none; }

.ps-auth-brand-mobile { display: none; }

/* Home */
.ps-home-feature {
    padding: 24px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--ps-line);
    box-shadow: 0 10px 30px rgba(15, 39, 51, .06);
    transition: transform .2s ease, box-shadow .2s ease;
}
.ps-home-feature:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(15, 39, 51, .11);
}
.ps-home-feature .ps-stat-icon { margin-bottom: 16px; }
.ps-home-feature h3 { margin: 0 0 8px; font-size: 16px; font-weight: 820; }
.ps-home-feature p { margin: 0; color: var(--ps-muted); font-size: 13px; line-height: 1.7; }

@media (max-width: 900px) {
    .ps-auth-wrap { grid-template-columns: 1fr; }
    .ps-auth-art { display: none; }
    .ps-auth-brand-mobile { display: flex; margin-bottom: 26px; }
    .ps-auth-panel { padding: 32px 20px; }
    .ps-grid-3, .ps-grid-2 { grid-template-columns: 1fr; }
    .ps-hero { padding: 32px 26px; border-radius: 22px; }
    .ps-nav-links { display: none; }
    .ps-kv { grid-template-columns: 120px 1fr; }
}

@media (max-width: 560px) {
    .ps-shell { padding: 20px 14px 56px; }
    .ps-card { padding: 20px; }
    .ps-user-chip span.ps-user-name { display: none; }
    .ps-queue { flex-direction: column; align-items: flex-start; }
    .ps-timeline { flex-direction: column; gap: 14px; }
    .ps-step::before { display: none; }
    .ps-step { display: flex; align-items: center; gap: 10px; text-align: left; }
    .ps-step-dot { margin: 0; }
}
