/* =========================================================
   Patient Consultation — Design Tokens (InvoiceX-matched)
   ========================================================= */
:root {
    --navy-dark: #0f1c33;
    --navy: #16234a;
    --blue: #3d5af1;
    --blue-dark: #2f47d6;
    --blue-soft: #eef1fe;
    --bg: #f4f6fb;
    --card: #ffffff;
    --border: #e9ebf2;
    --text: #1b2436;
    --text-muted: #6b7585;
    --green: #1fa971;
    --green-soft: #e7f8ef;
    --red: #e23b3b;
    --red-soft: #fdecec;
    --amber: #f5a524;
    --amber-soft: #fef3e2;
    --purple: #7c5cf0;
    --purple-soft: #f1edfd;
    --cyan: #1aa7c9;
    --cyan-soft: #e6f7fb;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 2px 10px rgba(20, 30, 60, 0.06);
    --shadow-md: 0 8px 28px rgba(20, 30, 60, 0.10);
}

* { box-sizing: border-box; }
html, body {
    margin: 0;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
a { text-decoration: none; color: var(--blue); }
h1, h2, h3 { font-weight: 700; color: var(--navy); margin: 0 0 8px; }
p { margin: 0 0 12px; }

/* ===== Public Top bar ===== */
.top-bar { background: var(--navy-dark); color: #c7d0ea; font-size: 13px; }
.top-bar-inner { display: flex; gap: 24px; padding: 7px 0; align-items: center; }
.top-bar-right { margin-left: auto; }
.top-bar a { color: #c7d0ea; }
.top-bar a:hover { color: #fff; }

/* ===== Public Header ===== */
.site-header { background: #fff; box-shadow: var(--shadow); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; padding: 14px 0; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 21px; font-weight: 800; color: var(--blue); }
.brand img { height: 36px; }
.main-nav { margin-left: auto; display: flex; gap: 26px; align-items: center; }
.main-nav > a { color: var(--navy); font-weight: 600; padding: 6px 0; font-size: 14.5px; }
.main-nav > a:hover { color: var(--blue); }
.dropdown { position: relative; }
.dropdown > a { color: var(--navy); font-weight: 600; font-size: 14.5px; }
.dropdown-menu {
    display: none; position: absolute; top: 28px; left: 0; background: #fff;
    box-shadow: var(--shadow-md); border-radius: var(--radius-sm); min-width: 250px; padding: 8px 0; z-index: 60;
    border: 1px solid var(--border);
}
.dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu a { display: block; padding: 10px 18px; color: var(--navy); font-weight: 500; font-size: 14px; }
.dropdown-menu a:hover { background: var(--blue-soft); color: var(--blue); }

/* ===== Hero Slider ===== */
.hero-slider { position: relative; overflow: hidden; height: 460px; background: var(--navy-dark); }
.hero-slide {
    position: absolute; inset: 0; opacity: 0; transition: opacity 0.8s ease;
    background-size: cover; background-position: center;
    display: flex; align-items: center;
}
.hero-slide.active { opacity: 1; }
.hero-slide::before { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, rgba(15,28,51,0.85), rgba(61,90,241,0.35)); }
.hero-slide-content { position: relative; z-index: 2; color: #fff; max-width: 620px; padding: 0 60px; }
.hero-slide-content h2 { font-size: 38px; color: #fff; margin-bottom: 12px; }
.hero-slide-content p { font-size: 17px; color: #dfe5fb; }
.hero-dots { position: absolute; bottom: 20px; left: 0; right: 0; text-align: center; z-index: 3; }
.hero-dots span {
    display: inline-block; width: 11px; height: 11px; border-radius: 50%; background: rgba(255,255,255,0.45);
    margin: 0 5px; cursor: pointer;
}
.hero-dots span.active { background: #fff; }

/* ===== Sections ===== */
.section { padding: 60px 0; }
.section-title { text-align: center; margin-bottom: 36px; }
.section-title h2 { font-size: 30px; }
.section-title p { color: var(--text-muted); }

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 22px; }
.svc-card {
    background: var(--card); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow);
    text-align: center; transition: transform 0.2s, box-shadow 0.2s; border: 1px solid var(--border);
}
.svc-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.svc-card i { font-size: 32px; color: var(--blue); margin-bottom: 14px; }
.svc-card a.btn-link { display: inline-block; margin-top: 10px; font-weight: 600; }

/* ===== Buttons ===== */
.btn {
    display: inline-block; background: var(--blue); color: #fff; padding: 11px 24px; border-radius: var(--radius-sm);
    font-weight: 600; border: none; cursor: pointer; font-size: 14.5px; transition: background 0.15s;
}
.btn:hover { background: var(--blue-dark); }
.btn-outline { background: transparent; border: 1.5px solid #fff; color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,0.12); }
.btn-secondary { background: var(--navy); }
.btn-secondary:hover { background: var(--navy-dark); }
.btn-success { background: var(--green); }
.btn-success:hover { background: #178a5d; }
.btn-danger { background: var(--red); }
.btn-danger:hover { background: #c92e2e; }
.btn-light { background: #fff; border: 1px solid var(--border); color: var(--text); }
.btn-light:hover { background: #f7f8fb; }
.btn-small { padding: 6px 13px; font-size: 13px; border-radius: 6px; }

/* ===== Forms (public + auth) ===== */
.form-card { background: var(--card); border-radius: var(--radius); padding: 34px; box-shadow: var(--shadow); max-width: 760px; margin: 0 auto; border: 1px solid var(--border); }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; color: var(--navy); font-size: 13.5px; }
.form-control {
    width: 100%; padding: 10px 13px; border: 1px solid #dde1ea; border-radius: var(--radius-sm); font-size: 14px;
    background: #fbfcfe; color: var(--text); transition: border-color 0.15s, background 0.15s;
}
.form-control:focus { outline: none; border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px var(--blue-soft); }
.form-row { display: flex; gap: 16px; }
.form-row .form-group { flex: 1; }

/* Inline checkbox + label (works with asp:CheckBox Text="..." auto-rendered label) */
.form-check {
    display: flex; align-items: center; gap: 9px; margin-bottom: 14px;
}
.form-check input[type="checkbox"] {
    width: 17px; height: 17px; accent-color: var(--blue); cursor: pointer; flex-shrink: 0; margin: 0;
}
.form-check label { margin: 0; font-weight: 500; color: var(--text); font-size: 14px; cursor: pointer; }

.yn-table { width: 100%; border-collapse: collapse; margin-bottom: 8px; }
.yn-table td { padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.yn-table td.q { width: 65%; font-size: 14.5px; }
.yn-radio-group { display: flex; gap: 18px; align-items: center; }
.yn-radio-group label { font-weight: 400; margin: 0; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.yn-radio-group input[type="radio"] { accent-color: var(--blue); cursor: pointer; margin: 0; }

.section-block { border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 22px; background: var(--card); }
.section-block h3 { font-size: 17px; margin-top: 0; border-bottom: 2px solid var(--blue); padding-bottom: 8px; margin-bottom: 16px; color: var(--navy); }

.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 14px; border: 1px solid transparent; }
.alert-success { background: var(--green-soft); color: #157a4f; border-color: #b9e6cd; }
.alert-error { background: var(--red-soft); color: #b3261e; border-color: #f6c7c2; }
.alert-info { background: var(--blue-soft); color: var(--blue-dark); border-color: #c9d3fb; }

/* ===== Auth (Login / Register) — full-screen split ===== */
.auth-page { display: flex; min-height: 100vh; font-family: 'Inter', sans-serif; }

/* ── Left brand panel ── */
.auth-brand-panel {
    flex: 0 0 44%; display: flex; flex-direction: column;
    background: linear-gradient(145deg, var(--navy-dark) 0%, #1e3a8a 55%, var(--blue) 100%);
    padding: 52px 56px; overflow: hidden; position: relative;
}
.auth-brand-panel::before {
    content: ""; position: absolute; right: -80px; top: -80px;
    width: 320px; height: 320px; border-radius: 50%;
    background: rgba(255,255,255,0.04);
}
.auth-brand-panel::after {
    content: ""; position: absolute; left: -60px; bottom: -60px;
    width: 260px; height: 260px; border-radius: 50%;
    background: rgba(255,255,255,0.05);
}
.auth-brand-logo {
    display: flex; align-items: center; gap: 12px; margin-bottom: auto;
    font-size: 20px; font-weight: 800; color: #fff; position: relative; z-index: 1;
}
.auth-brand-logo .logo-icon {
    width: 42px; height: 42px; background: rgba(255,255,255,0.12);
    border-radius: 10px; display: flex; align-items: center; justify-content: center;
    font-size: 18px; color: #fff; flex-shrink: 0;
    backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,0.15);
}
.auth-brand-body { margin-top: auto; margin-bottom: auto; position: relative; z-index: 1; }
.auth-brand-body h1 {
    color: #fff; font-size: 32px; font-weight: 800; line-height: 1.25;
    margin: 0 0 14px; letter-spacing: -0.4px;
}
.auth-brand-body h1 span { color: #6ee7b7; }
.auth-brand-body p { color: #c7d3f5; font-size: 15px; line-height: 1.65; margin: 0 0 28px; }
.auth-features { list-style: none; padding: 0; margin: 0; }
.auth-features li {
    display: flex; align-items: center; gap: 12px; padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08); color: #e0e8ff; font-size: 14px;
}
.auth-features li:last-child { border-bottom: none; }
.auth-features .feat-icon {
    width: 32px; height: 32px; border-radius: 8px; background: rgba(255,255,255,0.1);
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; color: #6ee7b7; flex-shrink: 0;
}
.auth-brand-foot { margin-top: auto; color: #8a9cce; font-size: 12.5px; position: relative; z-index: 1; }

/* ── Right form panel ── */
.auth-form-panel {
    flex: 1; display: flex; align-items: center; justify-content: center;
    background: var(--bg); padding: 48px 32px;
}
.auth-form-card {
    width: 100%; max-width: 420px;
    background: var(--card); border-radius: 18px;
    padding: 44px 40px; border: 1px solid var(--border);
    box-shadow: 0 12px 40px rgba(20, 30, 70, 0.09);
}
.auth-form-card .form-icon {
    width: 52px; height: 52px; border-radius: 14px;
    background: var(--blue-soft); display: flex; align-items: center; justify-content: center;
    font-size: 22px; color: var(--blue); margin-bottom: 20px;
}
.auth-form-card h2 {
    font-size: 23px; font-weight: 800; color: var(--navy); margin: 0 0 6px; letter-spacing: -0.2px;
}
.auth-form-card .auth-subtitle { color: var(--text-muted); font-size: 14px; margin: 0 0 28px; line-height: 1.5; }

.auth-form-card .form-group { margin-bottom: 20px; }
.auth-form-card .form-group label {
    display: block; font-size: 13.5px; font-weight: 600; color: var(--navy); margin-bottom: 8px;
}
.auth-form-card .form-control {
    height: 46px; border-radius: var(--radius-sm); border: 1.5px solid var(--border);
    padding: 0 14px 0 40px; font-size: 14.5px; width: 100%; background: var(--bg);
    transition: border-color 0.18s, box-shadow 0.18s; color: var(--text);
}
.auth-form-card .form-control:focus {
    border-color: var(--blue); background: #fff;
    box-shadow: 0 0 0 3px rgba(61,90,241,0.12); outline: none;
}
.auth-input-wrap { position: relative; }
.auth-input-wrap .input-icon-glyph {
    position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
    color: #9ba8c4; font-size: 14px; pointer-events: none;
}
.auth-input-wrap .eye-toggle {
    position: absolute; right: 13px; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer; color: #9ba8c4;
    font-size: 14px; padding: 0; line-height: 1;
}
.auth-input-wrap .eye-toggle:hover { color: var(--blue); }

.auth-robot-row {
    display: flex; align-items: center; gap: 12px; padding: 14px 16px;
    border: 1.5px solid var(--border); border-radius: var(--radius-sm);
    background: var(--bg); cursor: pointer; user-select: none;
    transition: border-color 0.15s, background 0.15s; margin-bottom: 22px;
}
.auth-robot-row:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); }
.auth-robot-row input[type="checkbox"] {
    width: 18px; height: 18px; accent-color: var(--blue);
    cursor: pointer; flex-shrink: 0; margin: 0;
}
.auth-robot-row .robot-label { font-size: 14px; color: var(--text); font-weight: 500; flex: 1; }
.auth-robot-row .robot-icon { color: #9ba8c4; font-size: 22px; }

.auth-submit-btn {
    width: 100%; height: 48px; border-radius: var(--radius-sm);
    background: var(--blue); color: #fff; border: none; font-size: 15px;
    font-weight: 700; cursor: pointer; letter-spacing: 0.2px;
    transition: background 0.18s, box-shadow 0.18s, transform 0.12s;
}
.auth-submit-btn:hover { background: var(--blue-dark); box-shadow: 0 4px 16px rgba(61,90,241,0.3); }
.auth-submit-btn:active { transform: scale(0.98); }

.auth-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0; color: var(--text-muted); font-size: 13px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.auth-link-row { text-align: center; font-size: 14px; color: var(--text-muted); margin-top: 20px; }
.auth-link-row a { color: var(--blue); font-weight: 600; text-decoration: none; }
.auth-link-row a:hover { text-decoration: underline; }

/* ── Responsive ── */
@media (max-width: 960px) {
    .auth-brand-panel { flex: 0 0 40%; padding: 40px 36px; }
    .auth-brand-body h1 { font-size: 27px; }
}
@media (max-width: 720px) {
    .auth-page { flex-direction: column; }
    .auth-brand-panel { flex: none; padding: 30px 28px 28px; }
    .auth-brand-body { margin: 0; }
    .auth-brand-body h1 { font-size: 23px; }
    .auth-brand-body p, .auth-features { display: none; }
    .auth-brand-foot { display: none; }
    .auth-form-panel { padding: 28px 16px 40px; }
    .auth-form-card { padding: 32px 24px; border-radius: 14px; }
}
@media (max-width: 400px) {
    .auth-form-card { padding: 26px 18px; }
}

/* ===== Tables / dashboards ===== */
.data-table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--border); }
.data-table th { background: var(--navy); color: #fff; text-align: left; padding: 12px 14px; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.03em; font-weight: 600; }
.data-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 14px; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #f9fafd; }

.badge { display: inline-block; padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge-success { background: var(--green-soft); color: #157a4f; }
.badge-danger { background: var(--red-soft); color: #b3261e; }
.badge-warning { background: var(--amber-soft); color: #9a6307; }
.badge-muted { background: #f0f1f5; color: var(--text-muted); }

.stats { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 28px; }
.stat-card {
    background: var(--card); border-radius: var(--radius); padding: 20px 22px; flex: 1; min-width: 170px;
    box-shadow: var(--shadow); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px;
}
.stat-icon {
    width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.stat-icon.blue { background: var(--blue-soft); color: var(--blue); }
.stat-icon.green { background: var(--green-soft); color: var(--green); }
.stat-icon.amber { background: var(--amber-soft); color: var(--amber); }
.stat-icon.purple { background: var(--purple-soft); color: var(--purple); }
.stat-icon.cyan { background: var(--cyan-soft); color: var(--cyan); }
.stat-icon.red { background: var(--red-soft); color: var(--red); }
.stat-num { font-size: 28px; font-weight: 800; color: var(--text); line-height: 1; }
.stat-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; font-weight: 600; }
.stat-sub { font-size: 12.5px; color: var(--text-muted); margin-top: -4px; }

/* ===== Dashboard shell (sidebar + topbar) ===== */
.dash-shell { display: flex; min-height: 100vh; }
.dash-sidebar {
    width: 250px; background: linear-gradient(170deg, var(--navy-dark) 0%, var(--blue) 110%);
    color: #cdd5f2; flex-shrink: 0; display: flex; flex-direction: column; padding-bottom: 20px;
}
.dash-sidebar .sidebar-brand {
    display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 18px;
    padding: 20px 22px; border-bottom: 1px solid rgba(255,255,255,0.1);
}
.dash-sidebar .nav-section-label {
    font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: #9fadd9; font-weight: 700;
    padding: 18px 22px 8px;
}
.dash-sidebar a.nav-link {
    display: flex; align-items: center; gap: 11px; color: #d6dcf4; padding: 11px 22px; font-weight: 500; font-size: 14.5px;
    border-left: 3px solid transparent;
}
.dash-sidebar a.nav-link i { width: 18px; text-align: center; font-size: 14.5px; }
.dash-sidebar a.nav-link:hover { background: rgba(255,255,255,0.07); color: #fff; }
.dash-sidebar a.nav-link.active { background: rgba(255,255,255,0.14); color: #fff; border-left-color: #fff; font-weight: 700; }

.dash-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dash-topbar {
    background: #fff; border-bottom: 1px solid var(--border); display: flex; align-items: center;
    padding: 14px 28px; gap: 14px;
}
.dash-topbar .crumb-title { font-weight: 700; font-size: 16px; color: var(--navy); }
.dash-topbar .topbar-right { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.dash-topbar .user-chip { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; color: var(--navy); }
.dash-topbar .user-avatar {
    width: 32px; height: 32px; border-radius: 50%; background: var(--blue); color: #fff; display: flex;
    align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex-shrink: 0;
}
.dash-topbar .org-chip { color: var(--text-muted); font-size: 14px; display: flex; align-items: center; gap: 7px; }
.dash-content-area { padding: 28px; flex: 1; }
.dash-content-area h2 { font-size: 22px; margin-bottom: 18px; }

.panel { background: var(--card); border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); padding: 22px 24px; margin-bottom: 24px; }
.panel-title { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15.5px; margin-bottom: 16px; color: var(--navy); }
.panel-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.panel-title-row .panel-title { margin-bottom: 0; }
.panel-title-row .btn-small { white-space: nowrap; }

.filter-bar { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 20px; }
.filter-bar .form-group { margin-bottom: 0; min-width: 160px; }

/* ===== Footer ===== */
.site-footer { background: var(--navy-dark); color: #c7d0ea; padding: 24px 0; text-align: center; font-size: 14px; margin-top: 40px; }

/* ===== Signature Pad ===== */
.sig-pad-wrap { border: 1.5px dashed #c7cee0; border-radius: var(--radius-sm); background: #fbfcfe; position: relative; }
.sig-pad-canvas { width: 100%; height: 160px; display: block; cursor: crosshair; touch-action: none; border-radius: var(--radius-sm); }
.sig-pad-toolbar { display: flex; justify-content: flex-end; padding: 6px 8px; border-top: 1px solid var(--border); }
.sig-pad-hint {
    position: absolute; bottom: 8px; left: 12px; color: #aab4c6; font-size: 12.5px; pointer-events: none;
}
.sig-pad-wrap.has-content .sig-pad-hint { display: none; }

/* ===== Multi-step Form (all sections stacked, tabs act as scroll-spy nav) ===== */
.wizard-tabs {
    display: flex; gap: 4px; overflow-x: auto; background: #fff; border-radius: 999px;
    border: 1px solid var(--border); padding: 6px; margin-bottom: 20px; box-shadow: var(--shadow);
    position: sticky; top: 76px; z-index: 40;
}
.wizard-tab {
    flex: 0 0 auto; display: flex; align-items: center; gap: 9px;
    padding: 8px 16px 8px 8px; border-radius: 999px; border: none; background: transparent;
    color: var(--text-muted); font-weight: 600; font-size: 13.5px; cursor: pointer; white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}
.wizard-tab .wizard-tab-num {
    width: 24px; height: 24px; border-radius: 50%; background: #eef0f5; color: var(--text-muted);
    display: flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 700; flex-shrink: 0;
}
.wizard-tab:hover { background: #f3f4f8; }
.wizard-tab.active { background: var(--navy); color: #fff; }
.wizard-tab.active .wizard-tab-num { background: rgba(255,255,255,0.22); color: #fff; }
.wizard-tab.completed:not(.active) .wizard-tab-num { background: var(--green); color: #fff; }

.wizard-autosave {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--amber-soft);
    border: 1px solid #f5dba8; border-radius: var(--radius-sm); padding: 12px 18px; margin-bottom: 24px; font-size: 13.5px; color: #8a5d07;
}
.wizard-autosave .btn-small { background: var(--navy); color: #fff; border: none; }
.wizard-autosave .btn-small:hover { background: var(--navy-dark); }

.wizard-section { scroll-margin-top: 150px; margin-bottom: 24px; }
.wizard-section-badge {
    display: inline-block; background: var(--amber); color: #fff; font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.04em; padding: 4px 11px; border-radius: 999px; margin-right: 12px;
}
.wizard-section-header {
    background: var(--navy); color: #fff; border-radius: var(--radius-sm) var(--radius-sm) 0 0; padding: 16px 20px;
    display: flex; align-items: center; font-weight: 700; font-size: 17px;
}
.wizard-section-body { border: 1px solid var(--border); border-top: none; border-radius: 0 0 var(--radius-sm) var(--radius-sm); padding: 24px; background: var(--card); }

.wizard-nav { display: flex; justify-content: flex-end; gap: 12px; margin-top: 8px; }

/* ===== Validation ===== */
.field-validator { display: none !important; }
.validation-summary { display: none !important; }
.form-control.field-invalid { border-color: var(--red); background: var(--red-soft); }
.required-mark { color: var(--red); margin-left: 2px; }

/* ===== PGD Form: print-style entry layout (mirrors the printed PDF) ===== */
.pgd-header { position: relative; padding: 18px 150px 18px 28px; margin-bottom: 24px; border-radius: var(--radius); overflow: hidden; background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow); }
.pgd-header::before { content: ""; position: absolute; top: 0; left: 0; width: 140px; height: 100%; background: linear-gradient(135deg, #0c8599 0%, #1aa7c9 55%, #6fcf97 100%); clip-path: polygon(0 0, 100% 0, 0 100%); }
.pgd-header .pgd-logo { position: absolute; top: 16px; right: 22px; text-align: right; }
.pgd-header .pgd-logo img { max-height: 46px; max-width: 150px; }
.pgd-header .pgd-logo .brand-text { font-weight: 800; font-size: 16px; color: #0c8599; }
.pgd-header h2 { position: relative; margin: 0 0 4px; font-size: 19px; color: var(--navy); }
.pgd-header h2 .accent { color: #0c8599; }
.pgd-header p { position: relative; margin: 0; font-size: 12.5px; font-style: italic; color: var(--text-muted); }

.pgd-section-title { font-size: 14.5px; font-weight: 700; background: #eef6f7; border-left: 4px solid #0c8599; padding: 7px 12px; margin: 26px 0 10px; color: #0c4a55; border-radius: 4px; }
.pgd-section-title:first-of-type { margin-top: 0; }

.table-scroll { overflow-x: auto; margin-bottom: 10px; }
.table-scroll table.entry-grid th { width: auto; white-space: normal; }
.table-scroll table.entry-grid td { width: auto; }

table.entry-grid { width: 100%; border-collapse: collapse; margin-bottom: 10px; background: #fff; }
table.entry-grid th, table.entry-grid td { border: 1px solid var(--border); padding: 10px 12px; vertical-align: middle; font-size: 13px; }
table.entry-grid th { background: #f7f9fb; text-align: left; font-weight: 600; color: var(--navy); width: 20%; white-space: nowrap; }
table.entry-grid th.wide { white-space: normal; }
table.entry-grid td { width: 30%; }
table.entry-grid td.full { width: auto; }
table.entry-grid .form-control { margin: 0; background: #fff; min-width: 110px; }
table.entry-grid tr.sub-header th { background: #eef6f7; text-align: center; color: #0c4a55; white-space: normal; }

.pgd-foot-note { font-size: 11.5px; font-style: italic; color: var(--text-muted); margin: -2px 0 16px; }

.pgd-box-label { font-weight: 700; font-size: 13.5px; color: var(--navy); margin: 18px 0 6px; }
.pgd-box-label .hint { font-weight: 400; font-style: italic; color: var(--text-muted); font-size: 11.5px; display: inline; margin-left: 4px; }

@media (max-width: 700px) {
    table.entry-grid.stack-mobile, table.entry-grid.stack-mobile tbody, table.entry-grid.stack-mobile tr, table.entry-grid.stack-mobile th, table.entry-grid.stack-mobile td { display: block; width: 100% !important; }
    table.entry-grid.stack-mobile th { border-bottom: none; }
    table.entry-grid.stack-mobile td { border-top: none; margin-bottom: 6px; }
    .pgd-header { padding: 16px 16px 70px; }
    .pgd-header .pgd-logo { top: auto; bottom: 14px; right: 16px; }
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .dash-shell { flex-direction: column; }
    .dash-sidebar { width: 100%; flex-direction: row; overflow-x: auto; padding: 6px 0; }
    .dash-sidebar .sidebar-brand { display: none; }
    .dash-sidebar .nav-section-label { display: none; }
    .dash-sidebar a.nav-link { padding: 10px 16px; white-space: nowrap; border-left: none; border-bottom: 3px solid transparent; }
    .dash-sidebar a.nav-link.active { border-left: none; border-bottom-color: #fff; }
}

@media (max-width: 768px) {
    .header-inner { flex-wrap: wrap; }
    .main-nav { width: 100%; flex-wrap: wrap; margin-top: 10px; gap: 16px; }
    .hero-slide-content { padding: 0 24px; }
    .hero-slide-content h2 { font-size: 26px; }
    .form-row { flex-direction: column; }
    .dash-content-area { padding: 18px; }
    .dash-topbar { padding: 12px 16px; flex-wrap: wrap; }
    .stats { gap: 12px; }
    .stat-card { min-width: 140px; }
    .yn-table, .yn-table tbody, .yn-table tr, .yn-table td { display: block; width: 100%; }
    .yn-table tr { border-bottom: 1px solid var(--border); padding: 10px 0; }
    .yn-table td.q { width: 100%; margin-bottom: 8px; }
    .filter-bar { flex-direction: column; align-items: stretch; }
    .filter-bar .form-group { min-width: 0; }
}

@media (max-width: 480px) {
    .top-bar-inner { flex-wrap: wrap; gap: 10px; font-size: 12px; }
    .form-card { padding: 22px; }
    .auth-card { padding: 26px; }
}
