/* Patient portal — public booking & help pages */
:root {
    --pp-teal: #0f766e;
    --pp-teal-light: #14b8a6;
    --pp-bg: #f0fdfa;
    --pp-card: #ffffff;
    --pp-text: #1e293b;
    --pp-muted: #64748b;
    --pp-border: #e2e8f0;
    --pp-green: #059669;
    --pp-orange: #d97706;
    --pp-red: #dc2626;
    --pp-purple: #7c3aed;
    --pp-radius: 16px;
    --pp-shadow: 0 12px 32px rgba(15, 118, 110, 0.1);
}
* { box-sizing: border-box; }
body.pp-body {
    margin: 0;
    font-family: Tahoma, 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(160deg, #f0fdfa 0%, #ecfeff 50%, #f8fafc 100%);
    color: var(--pp-text);
    min-height: 100vh;
    line-height: 1.6;
}
.pp-wrap { max-width: 1040px; margin: 0 auto; padding: 24px 16px 48px; }
.pp-topbar {
    background: #0f766e;
    color: white;
    font-size: 13px;
}
.pp-topbar-inner {
    max-width: 1040px;
    margin: 0 auto;
    padding: 10px 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    align-items: center;
    justify-content: space-between;
}
.pp-topbar-label { font-weight: 700; }
.pp-topbar-hint { opacity: 0.9; flex: 1; min-width: 180px; }
.pp-topbar-link {
    color: white;
    font-weight: 700;
    text-decoration: none;
    background: rgba(255,255,255,0.15);
    padding: 6px 12px;
    border-radius: 999px;
}
.pp-topbar-link:hover { background: rgba(255,255,255,0.25); }
.pp-nav {
    display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
    justify-content: space-between; margin-bottom: 18px;
}
.pp-nav-brand {
    display: flex; align-items: center; gap: 10px; text-decoration: none;
}
.pp-nav-brand-text strong { display: block; color: var(--pp-teal); font-size: 17px; font-weight: 700; }
.pp-nav-brand-text small { display: block; color: var(--pp-muted); font-size: 12px; font-weight: 600; }
.mc-brand-logo--nav {
    width: 52px;
    height: auto;
    max-height: 58px;
    border-radius: 0;
    background: transparent;
    padding: 0;
    box-sizing: border-box;
}
.pp-nav-links { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pp-nav a, .pp-nav-link {
    text-decoration: none; color: var(--pp-teal); font-weight: 600; font-size: 14px;
    padding: 10px 14px; border-radius: 12px; background: white; border: 1px solid var(--pp-border);
    display: inline-flex; align-items: center; gap: 8px;
    min-height: 44px;
}
.pp-nav a:hover, .pp-nav-link:hover { background: #ccfbf1; }
.pp-nav-link--cta {
    background: linear-gradient(135deg, var(--pp-teal), var(--pp-teal-light));
    color: white !important;
    border-color: transparent;
    box-shadow: 0 6px 16px rgba(20, 184, 166, 0.25);
}
.pp-nav-link--cta:hover { filter: brightness(1.05); background: linear-gradient(135deg, var(--pp-teal), var(--pp-teal-light)); }
.pp-nav-link--staff { color: #475569 !important; background: #f8fafc; }
.pp-hero {
    background: linear-gradient(135deg, var(--pp-teal) 0%, var(--pp-teal-light) 100%);
    color: white; border-radius: var(--pp-radius); padding: 28px 24px;
    margin-bottom: 24px; box-shadow: var(--pp-shadow);
}
.pp-hero h1 { margin: 0 0 10px; font-size: 28px; }
.pp-hero-kicker {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 700;
    opacity: 0.85;
    letter-spacing: 0.02em;
}
.pp-hero p { margin: 0; opacity: 0.95; font-size: 15px; max-width: 640px; }
.pp-hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}
.pp-btn--hero {
    padding: 13px 22px;
    font-size: 15px;
}
.pp-btn--hero-outline {
    display: inline-flex;
    align-items: center;
    padding: 13px 22px;
    border-radius: 999px;
    border: 2px solid rgba(255,255,255,0.85);
    color: white;
    font-weight: 700;
    text-decoration: none;
    font-size: 15px;
}
.pp-btn--hero-outline:hover { background: rgba(255,255,255,0.12); }
.pp-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.pp-badges span {
    background: rgba(255,255,255,0.2); border: 1px solid rgba(255,255,255,0.25);
    padding: 6px 12px; border-radius: 999px; font-size: 13px;
}
.pp-card {
    background: var(--pp-card); border-radius: var(--pp-radius);
    padding: 22px; box-shadow: var(--pp-shadow); margin-bottom: 18px;
    border: 1px solid var(--pp-border);
}
.pp-card h2 { margin: 0 0 12px; font-size: 20px; color: var(--pp-teal); }
.pp-card h3 { margin: 0 0 8px; font-size: 17px; }
.pp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.pp-option {
    border: 2px solid var(--pp-border); border-radius: 14px; padding: 18px;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.pp-option:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.06); }
.pp-option.eligible { border-color: #99f6e4; background: #f0fdfa; }
.pp-option.disabled { opacity: 0.55; background: #f8fafc; }
.pp-option-icon { font-size: 32px; margin-bottom: 8px; }
.pp-option h3 { margin: 0 0 6px; font-size: 16px; }
.pp-option p { margin: 0 0 12px; font-size: 13px; color: var(--pp-muted); }
.pp-option .reason { font-size: 12px; color: var(--pp-orange); margin-bottom: 10px; }
.pp-btn {
    display: inline-block; border: 0; border-radius: 999px; padding: 11px 20px;
    background: linear-gradient(135deg, var(--pp-teal), var(--pp-teal-light));
    color: white; font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: none;
    box-shadow: 0 6px 16px rgba(20, 184, 166, 0.25);
}
.pp-btn:hover { filter: brightness(1.05); }
.pp-btn.secondary { background: #475569; box-shadow: none; }
.pp-btn.outline { background: white; color: var(--pp-teal); border: 2px solid var(--pp-teal); box-shadow: none; }
.pp-btn.small { padding: 8px 14px; font-size: 13px; }
.pp-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.pp-form label { display: block; font-weight: 700; margin-bottom: 6px; font-size: 14px; }
.pp-form input, .pp-form select, .pp-form textarea {
    width: 100%; padding: 12px; border: 1px solid var(--pp-border);
    border-radius: 10px; font: inherit; margin-bottom: 14px;
}
.pp-form input:focus, .pp-form textarea:focus {
    outline: none; border-color: var(--pp-teal); box-shadow: 0 0 0 3px rgba(15,118,110,0.12);
}
.pp-code {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border: 2px solid #6ee7b7; border-radius: 12px;
    padding: 16px; text-align: center; font-size: 26px; font-weight: 800;
    color: #065f46; letter-spacing: 2px; margin: 16px 0;
}
.pp-status {
    display: inline-block; padding: 6px 14px; border-radius: 999px;
    font-weight: 700; font-size: 13px;
}
.pp-status.waiting { background: #fef3c7; color: #92400e; }
.pp-status.done { background: #d1fae5; color: #065f46; }
.pp-status.cancel { background: #fee2e2; color: #991b1b; }
.pp-status.noshow { background: #f1f5f9; color: #475569; }
.pp-timeline { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.pp-timeline-step {
    flex: 1; min-width: 90px; text-align: center; padding: 12px 8px;
    border-radius: 10px; background: #f8fafc; border: 1px solid var(--pp-border); font-size: 12px;
}
.pp-timeline-step.done { background: #ecfdf5; border-color: #6ee7b7; color: #065f46; font-weight: 600; }
.pp-timeline-step .icon { font-size: 20px; display: block; margin-bottom: 4px; }
.pp-info-grid { display: grid; grid-template-columns: 140px 1fr; gap: 8px 12px; font-size: 14px; }
.pp-info-grid dt { font-weight: 700; color: var(--pp-muted); }
.pp-info-grid dd { margin: 0; }
.pp-alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; }
.pp-alert.success { background: #ecfdf5; color: #065f46; border: 1px solid #6ee7b7; }
.pp-alert.error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.pp-alert.info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.pp-lookup-hint { margin: 0 0 14px; font-size: 14px; color: var(--pp-muted); font-weight: 600; }
.pp-reservation-pick-list {
    list-style: none; margin: 0 0 16px; padding: 0;
    display: flex; flex-direction: column; gap: 10px;
}
.pp-reservation-pick {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 14px 16px; border: 2px solid var(--pp-border); border-radius: 12px;
    cursor: pointer; background: #f8fafc;
}
.pp-reservation-pick:has(input:checked) {
    border-color: var(--pp-teal-light); background: #ecfdf5;
}
.pp-reservation-pick input { margin-top: 4px; flex-shrink: 0; }
.pp-reservation-pick-body { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.pp-reservation-pick-body small { color: var(--pp-muted); font-size: 12px; font-weight: 600; }
.pp-scenario { border-right: 4px solid var(--pp-teal); padding-right: 14px; margin-bottom: 20px; }
.pp-scenario ol { margin: 8px 0 0; padding-right: 20px; color: var(--pp-muted); font-size: 14px; }
.pp-request-list { list-style: none; padding: 0; margin: 0; }
.pp-request-list li {
    padding: 12px; border-bottom: 1px solid var(--pp-border); font-size: 14px;
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px;
}
.pp-request-status { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: #fef3c7; }
.pp-request-status.completed { background: #d1fae5; }
.pp-request-status.rejected { background: #fee2e2; }

/* Patient playlist & channels */
.pp-playlist { margin-bottom: 28px; }
.pp-playlist-head { margin-bottom: 12px; }
.pp-playlist-head h2 { margin: 0 0 4px; font-size: 20px; color: var(--pp-teal); }
.pp-playlist-head p { margin: 0; font-size: 14px; color: var(--pp-muted); }
.pp-channel-row {
    display: flex; flex-wrap: nowrap; gap: 12px;
    overflow-x: auto; padding: 4px 2px 12px;
    scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
}
.pp-channel-row::-webkit-scrollbar { height: 6px; }
.pp-channel-row::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 999px; }
.pp-channel-chip {
    flex: 0 0 auto; min-width: 200px; max-width: 260px;
    display: flex; align-items: center; gap: 10px;
    padding: 14px 16px; border-radius: 14px;
    background: white; border: 2px solid var(--pp-border);
    text-decoration: none; color: var(--pp-text);
    scroll-snap-align: start;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
    border-right: 4px solid var(--ch-color, var(--pp-teal));
}
.pp-channel-chip:hover {
    transform: translateY(-2px);
    border-color: var(--ch-color, var(--pp-teal));
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}
.pp-channel-chip-icon { font-size: 28px; line-height: 1; }
.pp-channel-chip-body { flex: 1; min-width: 0; }
.pp-channel-chip-body strong { display: block; font-size: 14px; margin-bottom: 2px; }
.pp-channel-chip-body small { display: block; font-size: 12px; color: var(--pp-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-channel-chip-arrow { color: var(--ch-color, var(--pp-teal)); font-weight: 700; font-size: 16px; }
.pp-channel-hero {
    background: linear-gradient(135deg, var(--ch-color, var(--pp-teal)) 0%, color-mix(in srgb, var(--ch-color, var(--pp-teal)) 70%, white) 100%);
    color: white; border-radius: var(--pp-radius); padding: 22px 24px;
    margin-bottom: 24px; box-shadow: var(--pp-shadow);
}
.pp-channel-back {
    display: inline-block; color: rgba(255,255,255,0.9); text-decoration: none;
    font-size: 14px; margin-bottom: 14px; font-weight: 600;
}
.pp-channel-back:hover { color: white; text-decoration: underline; }
.pp-channel-hero-main { display: flex; align-items: center; gap: 16px; }
.pp-channel-hero-icon { font-size: 48px; line-height: 1; }
.pp-channel-hero h1 { margin: 0 0 6px; font-size: 26px; }
.pp-channel-hero p { margin: 0; opacity: 0.95; font-size: 15px; }
.pp-channel-features {
    list-style: none; padding: 0; margin: 0 0 16px;
    display: grid; gap: 8px;
}
.pp-channel-features li {
    font-size: 14px; color: var(--pp-muted);
    padding: 8px 12px; background: #f8fafc; border-radius: 8px;
}

.pp-payment-box {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0;
}
.pp-payment-item { text-align: center; padding: 14px; background: #f8fafc; border-radius: 10px; }
.pp-payment-item strong { display: block; font-size: 20px; color: var(--pp-teal); }
.pp-payment-item span { font-size: 12px; color: var(--pp-muted); }
@media (max-width: 1024px) {
    .pp-wrap { padding: 20px 14px 40px; }
    .pp-hero h1 { font-size: 24px; }
    .pp-nav { gap: 12px; }
}

.pp-btn.ghost { background: white; color: var(--pp-teal); border: 2px solid var(--pp-teal); box-shadow: none; }

.pp-action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.pp-action-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    padding: 22px 16px;
    background: white;
    border: 2px solid var(--pp-border);
    border-radius: 16px;
    text-decoration: none;
    color: var(--pp-text);
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
    min-height: 140px;
}

.pp-action-tile:hover {
    transform: translateY(-3px);
    border-color: var(--pp-teal-light);
    box-shadow: var(--pp-shadow);
}

.pp-action-tile--primary {
    border-color: #99f6e4;
    background: linear-gradient(180deg, #f0fdfa, white);
}

.pp-action-icon { font-size: 36px; line-height: 1; }
.pp-action-tile strong { font-size: 15px; color: var(--pp-teal); }
.pp-action-tile small { font-size: 12px; color: var(--pp-muted); line-height: 1.4; }

.pp-card--muted { background: #f8fafc; border-style: dashed; }
.pp-card--soon { opacity: 0.85; }
.pp-soon-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.pp-soon-row span {
    background: #f1f5f9;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    color: #94a3b8;
}

.pp-section { margin-bottom: 28px; }
.pp-section-head { margin-bottom: 14px; }
.pp-section-head h2 { margin: 0; font-size: 20px; color: var(--pp-teal); display: inline; }
.pp-section-en {
    display: inline-block;
    margin-right: 8px;
    font-size: 12px;
    color: var(--pp-muted);
    font-weight: 600;
}
.pp-section-head p { margin: 6px 0 0; font-size: 14px; color: var(--pp-muted); }
.pp-section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}
.pp-section-grid--info { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.pp-section-tile {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 18px;
    background: white;
    border: 2px solid var(--pp-border);
    border-radius: 14px;
    text-decoration: none;
    color: var(--pp-text);
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
    position: relative;
}
.pp-section-tile:hover {
    transform: translateY(-2px);
    border-color: var(--pp-teal-light);
    box-shadow: var(--pp-shadow);
}
.pp-section-tile--primary {
    border-color: #99f6e4;
    background: linear-gradient(180deg, #f0fdfa, white);
}
.pp-section-tile--static {
    background: #f8fafc;
    border-style: dashed;
    opacity: 0.92;
}
.pp-section-icon { font-size: 30px; line-height: 1; flex-shrink: 0; }
.pp-section-body strong { display: block; font-size: 15px; color: var(--pp-teal); margin-bottom: 4px; }
.pp-section-body small { display: block; font-size: 12px; color: var(--pp-muted); line-height: 1.45; }
.pp-section-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
    background: #ecfdf5;
    color: #065f46;
}
.pp-section-badge--muted { background: #e2e8f0; color: #64748b; }
.pp-footer {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid var(--pp-border);
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    font-size: 13px;
    color: var(--pp-muted);
}
.pp-footer-links { display: flex; flex-wrap: wrap; gap: 14px; }
.pp-footer-links a { color: var(--pp-teal); font-weight: 600; text-decoration: none; }
.pp-footer-links a:hover { text-decoration: underline; }
.pp-nav a .pp-nav-icon, .pp-nav-link .pp-nav-icon { font-size: 20px; line-height: 1; }

/* Doctors & clinics directory (from admin clinic timeline) */
.pp-hero--compact { padding: 22px 22px; }
.pp-hero--compact h1 { font-size: 24px; }
.pp-dir-toolbar {
    background: white;
    border: 1px solid var(--pp-border);
    border-radius: var(--pp-radius);
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: var(--pp-shadow);
}
.pp-dir-weekdays {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}
.pp-dir-day {
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid var(--pp-border);
    color: var(--pp-teal);
    background: #f8fafc;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}
.pp-dir-day:hover { background: #ccfbf1; }
.pp-dir-day--on {
    background: linear-gradient(135deg, var(--pp-teal), var(--pp-teal-light));
    color: white;
    border-color: transparent;
}
.pp-dir-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pp-dir-pill {
    font-size: 12px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 999px;
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}
.pp-dir-pill--soft { background: #f0f9ff; color: #0369a1; border-color: #bae6fd; }
.pp-dir-pill--warn { background: #fffbeb; color: #b45309; border-color: #fcd34d; }
.pp-dir-pill--muted { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }
.pp-dir-notice { margin-bottom: 20px; border-right: 4px solid var(--pp-orange); }
.pp-dir-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px;
    margin-bottom: 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--pp-muted);
}
.pp-dir-legend-item { display: inline-flex; align-items: center; gap: 8px; }
.pp-dir-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.pp-dir-legend-dot--normal { background: #14b8a6; box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.25); }
.pp-dir-legend-dot--override { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25); }
.pp-dir-legend-dot--empty { background: #cbd5e1; box-shadow: 0 0 0 3px rgba(203, 213, 225, 0.5); }

.pp-week-board {
    width: 100%;
    max-width: none;
    margin: 0 0 16px;
}
.ps-schedule .pp-dir-weekdays {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}
.pp-week-board .pp-section-head h2 { font-size: 26px; }
.pp-dir-table-panel--weekly {
    margin-bottom: 8px;
    overflow: visible;
    width: 100%;
}
.pp-dir-table-wrap--weekly {
    max-height: none;
    overflow: visible;
    width: 100%;
}
.pp-dir-table--weekly {
    min-width: 0 !important;
    width: 100%;
    table-layout: fixed;
}
.pp-dir-table--weekly thead th {
    position: static;
    text-align: center;
    padding: 12px 8px;
    font-size: 15px;
    white-space: nowrap;
}
.pp-dir-table--weekly .pp-dir-col-clinic {
    width: 128px;
    min-width: 0;
    max-width: 148px;
    white-space: normal;
    overflow: visible;
    text-align: right;
    font-size: 15px;
    line-height: 1.4;
    padding: 12px 10px;
    word-break: keep-all;
}
.pp-dir-table--weekly tbody tr:nth-child(8n+1) .pp-dir-col-clinic { background: #ecfdf5; color: #0f766e; }
.pp-dir-table--weekly tbody tr:nth-child(8n+2) .pp-dir-col-clinic { background: #fff7ed; color: #9a3412; }
.pp-dir-table--weekly tbody tr:nth-child(8n+3) .pp-dir-col-clinic { background: #eff6ff; color: #1d4ed8; }
.pp-dir-table--weekly tbody tr:nth-child(8n+4) .pp-dir-col-clinic { background: #f5f3ff; color: #6d28d9; }
.pp-dir-table--weekly tbody tr:nth-child(8n+5) .pp-dir-col-clinic { background: #fdf2f8; color: #be185d; }
.pp-dir-table--weekly tbody tr:nth-child(8n+6) .pp-dir-col-clinic { background: #f0fdfa; color: #0f766e; }
.pp-dir-table--weekly tbody tr:nth-child(8n+7) .pp-dir-col-clinic { background: #fefce8; color: #a16207; }
.pp-dir-table--weekly tbody tr:nth-child(8n+8) .pp-dir-col-clinic { background: #f8fafc; color: #334155; }
.pp-dir-table--weekly .pp-dir-col-day {
    width: auto;
    min-width: 0 !important;
}
.pp-dir-table--weekly .sticky-col { position: static; box-shadow: none; }
.pp-dir-table--weekly .pp-dir-matrix-cell {
    padding: 8px !important;
    font-size: 13px;
    line-height: 1.4;
    vertical-align: top;
}
.pp-dir-table--weekly tbody tr:nth-child(even) .pp-dir-matrix-cell { background: #fbfaf7; }
.pp-dir-table--weekly .pp-dir-matrix-cell--on { background: #ecfdf5 !important; }
.pp-dir-table--weekly .pp-dir-matrix-list { gap: 6px; }
.pp-dir-table--weekly .pp-dir-matrix-item { padding: 6px 8px; border-radius: 8px; }
.pp-dir-table--weekly .pp-dir-matrix-doc,
.pp-dir-table--weekly .pp-dir-matrix-time {
    display: block;
    font-size: 13px;
    line-height: 1.35;
    white-space: normal;
}
.pp-dir-table--weekly .pp-dir-matrix-spec { display: none; }
.pp-dir-table--weekly thead th {
    position: static;
    top: auto;
    z-index: 1;
    text-align: center;
    padding: 12px 8px;
    font-size: 15px;
}
.pp-dir-col-clinic {
    width: 140px;
    min-width: 140px;
    text-align: right;
    background: #f0fdfa;
    font-weight: 800;
    color: #0f766e;
    vertical-align: top;
}
.pp-dir-table--weekly thead .pp-dir-col-clinic {
    background: #0d9488;
    color: white;
    z-index: 4;
}
.sticky-col {
    position: sticky;
    right: 0;
    z-index: 2;
    box-shadow: -4px 0 8px rgba(15, 23, 42, 0.06);
}
.pp-dir-col-day { width: 11%; min-width: 108px; }
.pp-dir-col-day--on { background: #115e59 !important; }
.pp-dir-day-link {
    color: inherit;
    text-decoration: none;
    display: block;
    padding: 2px 0;
}
.pp-dir-day-link:hover { text-decoration: underline; }
.pp-dir-matrix-cell {
    vertical-align: top;
    padding: 8px !important;
    background: white;
    font-size: 12px;
    line-height: 1.45;
}
.pp-dir-matrix-cell--on {
    background: #ecfdf5;
    box-shadow: inset 0 0 0 2px #14b8a6;
}
.pp-dir-matrix-cell--empty {
    background: #f8fafc;
    text-align: center;
    color: #94a3b8;
}
.pp-dir-matrix-empty { font-weight: 700; }
.pp-dir-matrix-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.pp-dir-matrix-item {
    padding: 6px 8px;
    border-radius: 8px;
    background: #f0fdfa;
    border: 1px solid #99f6e4;
}
.pp-dir-matrix-item--override {
    background: #fffbeb;
    border-color: #fcd34d;
}
.pp-dir-matrix-doc {
    display: block;
    font-weight: 800;
    color: #0f172a;
    font-size: 12px;
}
.pp-dir-matrix-time {
    display: block;
    font-weight: 700;
    color: #0f766e;
    font-size: 11px;
    margin-top: 2px;
}
.pp-dir-matrix-spec {
    display: block;
    font-size: 10px;
    color: #64748b;
    margin-top: 2px;
}

.pp-dir-table-panel {
    background: white;
    border: 1px solid var(--pp-border);
    border-radius: var(--pp-radius);
    box-shadow: var(--pp-shadow);
    overflow: hidden;
}
.pp-dir-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.pp-dir-table-wrap--nested { border-radius: 0 0 12px 12px; }
.pp-dir-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    font-size: 14px;
    min-width: 640px;
    border: 1px solid #cbd5e1;
}
.pp-dir-table--clinic { min-width: 520px; }
.pp-dir-table--specialty { min-width: 560px; }
.pp-dir-table thead {
    background: linear-gradient(180deg, #0f766e 0%, #0d9488 100%);
    color: white;
    position: sticky;
    top: 0;
    z-index: 2;
}
.pp-dir-table th {
    text-align: right;
    padding: 14px 16px;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.02em;
    white-space: nowrap;
    border-bottom: 2px solid rgba(255, 255, 255, 0.15);
}
.pp-dir-table th:first-child { border-radius: 0; }
.pp-dir-table tbody tr {
    transition: background 0.15s ease;
}
.pp-dir-table tbody tr:nth-child(even) {
    background: #f8fafc;
}
.pp-dir-table tbody tr:hover {
    background: #ecfdf5;
}
.pp-dir-table td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--pp-border);
    border-left: 1px solid #f1f5f9;
    vertical-align: middle;
}
.pp-dir-table tbody tr:last-child td {
    border-bottom: none;
}
.pp-dir-row--override {
    background: #fffbeb !important;
}
.pp-dir-row--override:hover {
    background: #fef3c7 !important;
}
.pp-dir-col-num {
    width: 48px;
    text-align: center;
    color: var(--pp-muted);
    font-weight: 700;
    font-size: 12px;
}
.pp-dir-col-time { width: 88px; text-align: center; }
.pp-dir-col-status { width: 100px; text-align: center; }
.pp-dir-col-action { width: 88px; text-align: center; }
.pp-dir-cell-clinic {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: #0f766e;
}
.pp-dir-cell-icon { font-size: 18px; line-height: 1; }
.pp-dir-doctor-name { color: #0f172a; font-size: 14px; }
.pp-dir-spec-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
}
.pp-dir-time {
    display: inline-block;
    font-weight: 800;
    font-size: 13px;
    color: #0f766e;
    padding: 4px 10px;
    background: #f0fdfa;
    border-radius: 8px;
    border: 1px solid #99f6e4;
    font-variant-numeric: tabular-nums;
}
.pp-dir-status {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    padding: 5px 10px;
    border-radius: 999px;
    letter-spacing: 0.02em;
}
.pp-dir-status--fixed {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}
.pp-dir-status--override {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}
.pp-dir-table-foot {
    margin: 0;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--pp-muted);
    background: #f8fafc;
    border-top: 1px solid var(--pp-border);
}

.pp-dir-clinic-tables {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.pp-dir-clinic-block {
    background: white;
    border: 1px solid var(--pp-border);
    border-radius: var(--pp-radius);
    box-shadow: 0 4px 16px rgba(15, 118, 110, 0.06);
    overflow: hidden;
}
.pp-dir-clinic-block--empty { opacity: 0.88; }
.pp-dir-clinic-block-head {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 14px 18px;
    background: linear-gradient(90deg, #f0fdfa 0%, #ffffff 100%);
    border-bottom: 1px solid var(--pp-border);
}
.pp-dir-clinic-icon { font-size: 30px; line-height: 1; }
.pp-dir-clinic-block-head h3 { margin: 0; font-size: 17px; color: var(--pp-teal); }
.pp-dir-clinic-block-head small { color: var(--pp-muted); font-size: 12px; font-weight: 600; }
.pp-dir-empty {
    margin: 0;
    padding: 16px 18px;
    font-size: 13px;
    color: var(--pp-muted);
    line-height: 1.5;
}

.pp-dir-roster { display: flex; flex-direction: column; gap: 28px; }
.pp-dir-roster-title {
    margin: 0 0 12px;
    font-size: 18px;
    color: var(--pp-teal);
    border-right: 4px solid var(--pp-teal-light);
    padding-right: 10px;
}
.pp-dir-doctor-cell {
    background: #fafafa;
    border-left: 3px solid var(--pp-teal-light);
}
.pp-dir-book-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 6px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--pp-teal), var(--pp-teal-light));
    color: white !important;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(15, 118, 110, 0.2);
}
.pp-dir-book-btn:hover { filter: brightness(1.06); }

@media (max-width: 720px) {
    .ps-schedule .pp-dir-weekdays { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .pp-dir-table--weekly .pp-dir-col-day:not(.pp-dir-col-day--on),
    .pp-dir-table--weekly td.pp-dir-matrix-cell:not(.pp-dir-matrix-cell--on) {
        display: none;
    }
    .pp-dir-table--weekly .pp-dir-col-clinic {
        width: 38%;
        max-width: none;
    }
}
@media (max-width: 600px) {
    .pp-dir-table--master.pp-dir-table,
    .pp-dir-table--master { min-width: 0; }
    .pp-dir-table--master thead {
        display: none;
    }
    .pp-dir-table--master tbody tr {
        display: block;
        margin-bottom: 12px;
        border: 1px solid var(--pp-border);
        border-radius: 12px;
        overflow: hidden;
        background: white !important;
    }
    .pp-dir-table--master tbody tr.pp-dir-row--override {
        border-color: #fcd34d;
        background: #fffbeb !important;
    }
    .pp-dir-table--master td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        padding: 10px 14px;
        border-bottom: 1px solid #f1f5f9;
        text-align: left;
    }
    .pp-dir-table td:last-child { border-bottom: none; }
    .pp-dir-table td::before {
        content: attr(data-label);
        font-weight: 800;
        font-size: 11px;
        color: var(--pp-muted);
        flex-shrink: 0;
    }
    .pp-dir-table td.pp-dir-col-num::before { content: "#"; }
    .pp-dir-table td.pp-dir-col-action::before { content: ""; }
    .pp-dir-table td[rowspan] {
        display: block;
        border-left: none;
        background: #f0fdfa;
    }
    .pp-dir-col-time, .pp-dir-col-status, .pp-dir-col-num, .pp-dir-col-action {
        width: auto;
        text-align: inherit;
    }
}

@media (max-width: 640px) {
    .pp-payment-box { grid-template-columns: 1fr; }
    .pp-info-grid { grid-template-columns: 1fr; }
    .pp-info-grid dt { margin-top: 8px; }
    .pp-nav { flex-direction: column; align-items: stretch; }
    .pp-nav-links { justify-content: center; }
    .pp-nav a { text-align: center; min-height: 44px; display: flex; align-items: center; justify-content: center; }
    .pp-hero { padding: 22px 18px; }
    .pp-hero h1 { font-size: 22px; }
    .pp-btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
}
