:root {
    --rd-primary: #176d56;
    --rd-primary-rgb: 37, 87, 214;
    --rd-primary-dark: #173eab;
    --rd-secondary: #0f9f92;
    --rd-accent: #7657d6;
    --rd-success: #11845f;
    --rd-warning: #d78a13;
    --rd-danger: #cf3850;
    --rd-info: #1678a2;
    --rd-ink: #172238;
    --rd-heading: #10192b;
    --rd-muted: #68748a;
    --rd-subtle: #8d97aa;
    --rd-bg: #f4f6fa;
    --rd-surface: #ffffff;
    --rd-surface-2: #f8f9fc;
    --rd-surface-3: #eef2f8;
    --rd-line: #e3e8f1;
    --rd-line-strong: #d4dbe8;
    --rd-sidebar-bg: #111a2e;
    --rd-sidebar-bg-2: #17233d;
    --rd-sidebar-ink: #d8deeb;
    --rd-sidebar-muted: #8491aa;
    --rd-sidebar-width: 278px;
    --rd-sidebar-collapsed: 92px;
    --rd-topbar-height: 76px;
    --rd-radius-sm: 10px;
    --rd-radius: 16px;
    --rd-radius-lg: 22px;
    --rd-shadow-sm: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 14px rgba(16, 24, 40, .035);
    --rd-shadow: 0 12px 34px rgba(22, 34, 56, .075);
    --rd-shadow-lg: 0 24px 70px rgba(17, 29, 52, .16);
    --rd-focus: 0 0 0 .22rem rgba(var(--rd-primary-rgb), .14);
    --rd-transition: 180ms ease;
}

[data-theme="dark"] {
    --rd-ink: #dce4f2;
    --rd-heading: #f6f8fc;
    --rd-muted: #99a6bb;
    --rd-subtle: #748198;
    --rd-bg: #0c1321;
    --rd-surface: #121c2e;
    --rd-surface-2: #172338;
    --rd-surface-3: #1c2a41;
    --rd-line: #26354d;
    --rd-line-strong: #33445f;
    --rd-sidebar-bg: #08101d;
    --rd-sidebar-bg-2: #101a2c;
    --rd-sidebar-ink: #dce4f2;
    --rd-sidebar-muted: #8290a8;
    --rd-shadow-sm: 0 1px 2px rgba(0, 0, 0, .16), 0 5px 18px rgba(0, 0, 0, .12);
    --rd-shadow: 0 14px 38px rgba(0, 0, 0, .22);
    --rd-shadow-lg: 0 28px 78px rgba(0, 0, 0, .38);
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body {
    min-height: 100%;
    margin: 0;
    background: var(--rd-bg);
    color: var(--rd-ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.55;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
a { color: var(--rd-primary); text-decoration: none; }
a:hover { color: var(--rd-primary-dark); }
img, svg { max-width: 100%; }
::selection { background: rgba(var(--rd-primary-rgb), .2); }

[data-theme="dark"] .text-dark { color: var(--rd-heading) !important; }
[data-theme="dark"] .text-secondary { color: var(--rd-muted) !important; }
[data-theme="dark"] .bg-white { background-color: var(--rd-surface) !important; }
[data-theme="dark"] .bg-light { background-color: var(--rd-surface-2) !important; }
[data-theme="dark"] .border, [data-theme="dark"] .border-top,
[data-theme="dark"] .border-bottom, [data-theme="dark"] .border-start,
[data-theme="dark"] .border-end { border-color: var(--rd-line) !important; }

.rd-skip-link {
    position: fixed;
    inset-block-start: -80px;
    inset-inline-start: 20px;
    z-index: 2000;
    background: var(--rd-heading);
    color: #fff;
    padding: 10px 16px;
    border-radius: 0 0 10px 10px;
    transition: var(--rd-transition);
}
.rd-skip-link:focus { inset-block-start: 0; color: #fff; }

/* Application shell */
.rd-sidebar {
    position: fixed;
    inset-block: 0;
    inset-inline-start: 0;
    z-index: 1040;
    width: var(--rd-sidebar-width);
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(circle at 10% -5%, rgba(126, 174, 88, .18), transparent 32%),
        linear-gradient(180deg, var(--rd-sidebar-bg-2), var(--rd-sidebar-bg));
    color: var(--rd-sidebar-ink);
    border-inline-end: 1px solid rgba(255,255,255,.055);
    transition: width var(--rd-transition), transform var(--rd-transition);
    overflow: hidden;
}
.rd-sidebar-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 14px 18px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.16) transparent;
}
.rd-sidebar-scroll::-webkit-scrollbar { width: 5px; }
.rd-sidebar-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,.16); border-radius: 99px; }
.rd-brand {
    min-height: 88px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    padding: 17px 20px;
    border-bottom: 1px solid rgba(255,255,255,.07);
    flex: 0 0 auto;
}
.rd-brand:hover { color: #fff; }
.rd-brand-mark {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    background: linear-gradient(145deg, var(--rd-primary), #7eae58 55%, var(--rd-secondary));
    box-shadow: 0 12px 28px rgba(var(--rd-primary-rgb), .32);
}
.rd-brand-mark svg { width: 27px; fill: #fff; }
.rd-brand-copy { min-width: 0; line-height: 1.25; }
.rd-brand-name { display: block; font-size: 16px; font-weight: 820; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rd-brand-meta { display: block; margin-top: 4px; color: #94a1b9; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rd-nav-label {
    padding: 20px 13px 7px;
    color: var(--rd-sidebar-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
    white-space: nowrap;
}
.rd-nav-link {
    position: relative;
    min-height: 46px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 3px 0;
    padding: 10px 12px;
    color: #bac4d7;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 660;
    white-space: nowrap;
    transition: color var(--rd-transition), background var(--rd-transition), border-color var(--rd-transition), transform var(--rd-transition);
}
.rd-nav-link > i { width: 22px; flex: 0 0 22px; font-size: 18px; text-align: center; }
.rd-nav-link:hover { color: #fff; background: rgba(255,255,255,.07); transform: translateX(2px); }
.rd-nav-link.active {
    color: #fff;
    background: linear-gradient(100deg, rgba(var(--rd-primary-rgb), .43), rgba(126, 174, 88, .12));
    border-color: rgba(145, 158, 255, .24);
    box-shadow: inset 3px 0 0 #7eae58;
}
[dir="rtl"] .rd-nav-link.active { box-shadow: inset -3px 0 0 #7eae58; }
.rd-nav-badge {
    margin-inline-start: auto;
    min-width: 22px;
    height: 22px;
    display: inline-grid;
    place-items: center;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(255,255,255,.12);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
}
.rd-nav-badge.danger { background: #d7445d; }
.rd-sidebar-footer {
    flex: 0 0 auto;
    margin: 0 14px 15px;
    padding: 13px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 14px;
    background: rgba(255,255,255,.035);
    color: #9ca8be;
    font-size: 11px;
}
.rd-sidebar-footer strong { display: block; margin-bottom: 2px; color: #d9e0ed; font-size: 12px; }
.rd-shell { min-height: 100vh; margin-inline-start: var(--rd-sidebar-width); transition: margin var(--rd-transition); }
.rd-topbar {
    position: sticky;
    inset-block-start: 0;
    z-index: 1020;
    min-height: var(--rd-topbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 0 28px;
    background: color-mix(in srgb, var(--rd-surface) 91%, transparent);
    border-bottom: 1px solid var(--rd-line);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}
.rd-topbar-start, .rd-topbar-end { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rd-icon-btn {
    position: relative;
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 42px;
    border: 1px solid var(--rd-line);
    border-radius: 12px;
    background: var(--rd-surface);
    color: var(--rd-ink);
    font-size: 18px;
    transition: var(--rd-transition);
}
.rd-icon-btn:hover { color: var(--rd-primary); border-color: rgba(var(--rd-primary-rgb), .35); background: rgba(var(--rd-primary-rgb), .055); transform: translateY(-1px); }
.rd-icon-count {
    position: absolute;
    inset-block-start: -5px;
    inset-inline-end: -4px;
    min-width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    padding: 0 4px;
    border: 2px solid var(--rd-surface);
    border-radius: 99px;
    background: var(--rd-danger);
    color: #fff;
    font-size: 9px;
    font-weight: 850;
}
.rd-search-trigger {
    width: min(430px, 38vw);
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border: 1px solid var(--rd-line);
    border-radius: 12px;
    background: var(--rd-surface-2);
    color: var(--rd-muted);
    text-align: start;
    transition: var(--rd-transition);
}
.rd-search-trigger:hover { border-color: rgba(var(--rd-primary-rgb), .32); background: var(--rd-surface); box-shadow: var(--rd-shadow-sm); }
.rd-search-trigger i { font-size: 16px; }
.rd-search-trigger span { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 23px;
    padding: 0 6px;
    border: 1px solid var(--rd-line-strong);
    border-bottom-width: 2px;
    border-radius: 6px;
    background: var(--rd-surface);
    color: var(--rd-subtle);
    font-size: 10px;
    font-weight: 800;
}
.rd-branch-chip {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 11px;
    border: 1px solid var(--rd-line);
    border-radius: 12px;
    background: var(--rd-surface);
}
.rd-branch-chip i { color: var(--rd-secondary); }
.rd-branch-chip small { display: block; color: var(--rd-muted); font-size: 9px; font-weight: 750; text-transform: uppercase; letter-spacing: .07em; }
.rd-branch-chip strong { display: block; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.rd-user-trigger {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 4px 7px 4px 4px;
    border: 1px solid transparent;
    border-radius: 13px;
    background: transparent;
    color: var(--rd-ink);
    transition: var(--rd-transition);
}
.rd-user-trigger:hover, .rd-user-trigger.show { background: var(--rd-surface-2); border-color: var(--rd-line); }
.rd-user-copy { max-width: 155px; text-align: start; line-height: 1.25; }
.rd-user-copy strong, .rd-user-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-user-copy strong { font-size: 12px; color: var(--rd-heading); }
.rd-user-copy small { margin-top: 2px; color: var(--rd-muted); font-size: 10px; }
.rd-content { padding: 28px 30px 48px; }
.rd-content-inner { width: 100%; max-width: 1720px; margin: 0 auto; }
.rd-sidebar-backdrop { display: none; }
.mobile-menu { display: none; }

body.rd-sidebar-collapsed .rd-sidebar { width: var(--rd-sidebar-collapsed); }
body.rd-sidebar-collapsed .rd-shell { margin-inline-start: var(--rd-sidebar-collapsed); }
body.rd-sidebar-collapsed .rd-brand { padding-inline: 22px; }
body.rd-sidebar-collapsed .rd-brand-copy,
body.rd-sidebar-collapsed .rd-nav-label,
body.rd-sidebar-collapsed .rd-nav-link > span:not(.rd-nav-badge),
body.rd-sidebar-collapsed .rd-sidebar-footer { opacity: 0; visibility: hidden; width: 0; overflow: hidden; }
body.rd-sidebar-collapsed .rd-nav-link { justify-content: center; padding-inline: 10px; }
body.rd-sidebar-collapsed .rd-nav-link > i { margin: 0; }
body.rd-sidebar-collapsed .rd-nav-badge { position: absolute; inset-block-start: 4px; inset-inline-end: 4px; min-width: 17px; height: 17px; padding: 0 3px; font-size: 8px; }

/* Page and surface system */
.rd-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 24px;
}
.rd-page-title { min-width: 0; }
.rd-page-eyebrow { margin-bottom: 5px; color: var(--rd-primary); font-size: 11px; font-weight: 820; letter-spacing: .1em; text-transform: uppercase; }
.rd-page-title h1 { margin: 0; color: var(--rd-heading); font-size: clamp(24px, 2vw, 31px); font-weight: 820; letter-spacing: -.035em; line-height: 1.18; }
.rd-page-title p { max-width: 760px; margin: 7px 0 0; color: var(--rd-muted); font-size: 13.5px; }
.rd-page-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.rd-card {
    position: relative;
    background: var(--rd-surface);
    border: 1px solid var(--rd-line);
    border-radius: var(--rd-radius);
    box-shadow: var(--rd-shadow-sm);
}
.rd-card-hover { transition: transform var(--rd-transition), box-shadow var(--rd-transition), border-color var(--rd-transition); }
.rd-card-hover:hover { transform: translateY(-2px); box-shadow: var(--rd-shadow); border-color: rgba(var(--rd-primary-rgb), .22); }
.rd-card-header {
    min-height: 66px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 19px;
    border-bottom: 1px solid var(--rd-line);
}
.rd-card-header h2, .rd-card-header h3, .rd-card-header h4 { margin: 0; color: var(--rd-heading); font-size: 15px; font-weight: 780; }
.rd-card-header strong { color: var(--rd-heading); }
.rd-card-subtitle { margin-top: 2px; color: var(--rd-muted); font-size: 11.5px; }
.rd-card-body { padding: 19px; }
.rd-card-footer { padding: 14px 19px; border-top: 1px solid var(--rd-line); background: var(--rd-surface-2); border-radius: 0 0 var(--rd-radius) var(--rd-radius); }
.rd-surface { padding: 16px; border: 1px solid var(--rd-line); border-radius: 13px; background: var(--rd-surface-2); }
.rd-divider { height: 1px; margin: 18px 0; background: var(--rd-line); }
.rd-section-title { margin: 0 0 13px; color: var(--rd-heading); font-size: 14px; font-weight: 780; }
.section-anchor { scroll-margin-top: 96px; }

/* Buttons and form controls */
.btn { font-weight: 680; border-radius: 10px; transition: var(--rd-transition); }
.btn:hover { transform: translateY(-1px); }
.btn-rd {
    border: 1px solid transparent;
    background: linear-gradient(135deg, var(--rd-primary), color-mix(in srgb, var(--rd-primary) 72%, #7eae58));
    color: #fff;
    box-shadow: 0 8px 20px rgba(var(--rd-primary-rgb), .22);
}
.btn-rd:hover, .btn-rd:focus { color: #fff; background: linear-gradient(135deg, var(--rd-primary-dark), var(--rd-primary)); box-shadow: 0 10px 24px rgba(var(--rd-primary-rgb), .28); }
.btn-soft { border: 1px solid rgba(var(--rd-primary-rgb), .11); background: rgba(var(--rd-primary-rgb), .085); color: var(--rd-primary); }
.btn-soft:hover { border-color: rgba(var(--rd-primary-rgb), .2); background: rgba(var(--rd-primary-rgb), .14); color: var(--rd-primary-dark); }
.btn-neutral { border: 1px solid var(--rd-line); background: var(--rd-surface); color: var(--rd-ink); }
.btn-neutral:hover { border-color: var(--rd-line-strong); background: var(--rd-surface-2); color: var(--rd-heading); }
.btn-danger-soft { border: 1px solid rgba(207,56,80,.14); background: rgba(207,56,80,.09); color: var(--rd-danger); }
.btn-success-soft { border: 1px solid rgba(17,132,95,.14); background: rgba(17,132,95,.09); color: var(--rd-success); }
.btn-icon { width: 36px; height: 36px; display: inline-grid; place-items: center; padding: 0; }
.btn:focus-visible, .form-control:focus, .form-select:focus, .form-check-input:focus { box-shadow: var(--rd-focus); }
.form-label { margin-bottom: 6px; color: var(--rd-ink); font-size: 12px; font-weight: 730; }
.form-control, .form-select, .input-group-text {
    min-height: 42px;
    border-color: var(--rd-line-strong);
    border-radius: 10px;
    background-color: var(--rd-surface);
    color: var(--rd-ink);
    font-size: 13px;
}
.form-control, .form-select { padding: .62rem .75rem; }
.form-control::placeholder { color: var(--rd-subtle); }
.form-control:focus, .form-select:focus { border-color: rgba(var(--rd-primary-rgb), .56); background-color: var(--rd-surface); color: var(--rd-ink); }
.input-group > .form-control:not(:first-child), .input-group > .form-select:not(:first-child) { border-start-start-radius: 0; border-end-start-radius: 0; }
.input-group > .input-group-text:first-child { border-start-end-radius: 0; border-end-end-radius: 0; }
.input-group-text { color: var(--rd-muted); }
.form-text { color: var(--rd-muted); font-size: 10.5px; }
.form-check-input { background-color: var(--rd-surface); border-color: var(--rd-line-strong); }
.form-check-input:checked { background-color: var(--rd-primary); border-color: var(--rd-primary); }
textarea.form-control { min-height: 92px; resize: vertical; }
.rd-field-note { display: flex; align-items: flex-start; gap: 7px; margin-top: 7px; color: var(--rd-muted); font-size: 10.5px; }
.rd-form-section + .rd-form-section { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--rd-line); }
.rd-form-section-title { display: flex; align-items: center; gap: 9px; margin-bottom: 15px; color: var(--rd-heading); font-size: 14px; font-weight: 780; }
.rd-form-section-title i { color: var(--rd-primary); }

/* Tables and lists */
.table { --bs-table-bg: transparent; --bs-table-color: var(--rd-ink); margin: 0; color: var(--rd-ink); }
.table > :not(caption) > * > * { background: transparent; box-shadow: none; }
.table thead th {
    padding: 11px 13px;
    border-bottom: 1px solid var(--rd-line-strong);
    background: var(--rd-surface-2);
    color: var(--rd-muted);
    font-size: 10px;
    font-weight: 820;
    letter-spacing: .065em;
    text-transform: uppercase;
    white-space: nowrap;
}
.table tbody td { padding: 13px; border-bottom-color: var(--rd-line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table-hover > tbody > tr:hover > * { --bs-table-accent-bg: rgba(var(--rd-primary-rgb), .035); color: var(--rd-ink); }
.rd-table-link { color: var(--rd-heading); font-weight: 730; }
.rd-table-link:hover { color: var(--rd-primary); }
.rd-list { margin: 0; padding: 0; list-style: none; }
.rd-list-item { display: flex; align-items: flex-start; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--rd-line); }
.rd-list-item:first-child { padding-top: 0; }
.rd-list-item:last-child { padding-bottom: 0; border-bottom: 0; }
.rd-list-content { min-width: 0; flex: 1 1 auto; }
.rd-list-title { color: var(--rd-heading); font-weight: 720; line-height: 1.35; }
.rd-list-meta { margin-top: 3px; color: var(--rd-muted); font-size: 11px; }
.rd-empty { padding: 42px 18px; text-align: center; color: var(--rd-muted); }
.rd-empty-icon { width: 58px; height: 58px; display: grid; place-items: center; margin: 0 auto 12px; border-radius: 18px; background: var(--rd-surface-3); color: var(--rd-primary); font-size: 24px; }
.rd-empty i { font-size: 36px; display: block; margin-bottom: 9px; color: var(--rd-subtle); }
.rd-empty h3 { margin: 0 0 5px; color: var(--rd-heading); font-size: 15px; }
.rd-empty p { max-width: 440px; margin: 0 auto; font-size: 12px; }

/* Avatars, badges, status */
.avatar, .rd-avatar {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: inline-grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(var(--rd-primary-rgb), .1);
    border-radius: 13px;
    background: linear-gradient(145deg, rgba(var(--rd-primary-rgb), .15), rgba(126,174,88,.13));
    color: var(--rd-primary);
    font-size: 13px;
    font-weight: 820;
    text-transform: uppercase;
}
.rd-avatar.sm { width: 32px; height: 32px; flex-basis: 32px; border-radius: 10px; font-size: 11px; }
.rd-avatar.lg { width: 60px; height: 60px; flex-basis: 60px; border-radius: 18px; font-size: 20px; }
.rd-avatar.xl { width: 76px; height: 76px; flex-basis: 76px; border-radius: 22px; font-size: 25px; }
.badge-soft, .rd-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: .38rem .58rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}
.badge-soft.primary, .rd-badge.primary { background: rgba(var(--rd-primary-rgb), .1); border-color: rgba(var(--rd-primary-rgb), .12); color: var(--rd-primary); }
.badge-soft.success, .rd-badge.success { background: rgba(17,132,95,.1); border-color: rgba(17,132,95,.12); color: var(--rd-success); }
.badge-soft.warning, .rd-badge.warning { background: rgba(215,138,19,.11); border-color: rgba(215,138,19,.13); color: var(--rd-warning); }
.badge-soft.danger, .rd-badge.danger { background: rgba(207,56,80,.1); border-color: rgba(207,56,80,.13); color: var(--rd-danger); }
.badge-soft.info, .rd-badge.info { background: rgba(22,120,162,.1); border-color: rgba(22,120,162,.13); color: var(--rd-info); }
.badge-soft.neutral, .rd-badge.neutral { background: var(--rd-surface-3); border-color: var(--rd-line); color: var(--rd-muted); }
.rd-priority { width: 8px; height: 8px; display: inline-block; border-radius: 50%; }
.rd-priority.low { background: var(--rd-subtle); }
.rd-priority.normal { background: var(--rd-info); }
.rd-priority.high { background: var(--rd-warning); }
.rd-priority.urgent { background: var(--rd-danger); box-shadow: 0 0 0 4px rgba(207,56,80,.1); }
.status-dot { display: inline-block; width: 8px; height: 8px; margin-inline-end: 7px; border-radius: 50%; }
.status-scheduled { background: #6f7d91; }
.status-confirmed { background: #2f6bde; }
.status-arrived { background: #1592ba; }
.status-in_chair { background: #7657d6; }
.status-completed { background: #11845f; }
.status-no_show { background: #d78a13; }
.status-cancelled { background: #cf3850; }

/* Metrics */
.rd-kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.rd-stat, .rd-kpi { min-height: 150px; padding: 18px; overflow: hidden; }
.rd-kpi { display: flex; flex-direction: column; justify-content: space-between; }
.rd-kpi::after, .rd-stat::after {
    content: "";
    position: absolute;
    width: 120px;
    height: 120px;
    inset-inline-end: -54px;
    inset-block-end: -58px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--rd-primary-rgb), .11), transparent 70%);
    pointer-events: none;
}
.rd-kpi-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.rd-kpi-icon, .rd-stat .icon {
    width: 43px;
    height: 43px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: rgba(var(--rd-primary-rgb), .09);
    color: var(--rd-primary);
    font-size: 19px;
}
.rd-kpi-icon.success { background: rgba(17,132,95,.1); color: var(--rd-success); }
.rd-kpi-icon.warning { background: rgba(215,138,19,.1); color: var(--rd-warning); }
.rd-kpi-icon.danger { background: rgba(207,56,80,.1); color: var(--rd-danger); }
.rd-kpi-icon.info { background: rgba(22,120,162,.1); color: var(--rd-info); }
.rd-kpi-label, .rd-stat .label { margin-top: 15px; color: var(--rd-muted); font-size: 11px; font-weight: 760; text-transform: uppercase; letter-spacing: .045em; }
.rd-kpi-value, .rd-stat .value { margin-top: 4px; color: var(--rd-heading); font-size: clamp(21px, 2vw, 29px); font-weight: 840; letter-spacing: -.035em; line-height: 1.15; }
.rd-kpi-foot { display: flex; align-items: center; gap: 6px; margin-top: 9px; color: var(--rd-muted); font-size: 10.5px; }
.rd-trend-up { color: var(--rd-success); font-weight: 760; }
.rd-trend-down { color: var(--rd-danger); font-weight: 760; }
.rd-mini-metric { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--rd-line); }
.rd-mini-metric:last-child { border-bottom: 0; }
.rd-mini-metric-label { color: var(--rd-muted); font-size: 11.5px; }
.rd-mini-metric-value { color: var(--rd-heading); font-weight: 790; }
.metric-bar, .rd-progress { height: 7px; overflow: hidden; border-radius: 99px; background: var(--rd-surface-3); }
.metric-bar > span, .rd-progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--rd-primary), var(--rd-secondary)); }
.rd-ring {
    --value: 0;
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: conic-gradient(var(--rd-primary) calc(var(--value) * 1%), var(--rd-surface-3) 0);
    position: relative;
}
.rd-ring::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--rd-surface); }
.rd-ring strong { position: relative; z-index: 1; color: var(--rd-heading); font-size: 15px; }

/* Alerts and flash */
.alert { border: 1px solid transparent; border-radius: 13px; font-size: 12.5px; }
.alert-success { background: rgba(17,132,95,.09); border-color: rgba(17,132,95,.16); color: color-mix(in srgb, var(--rd-success) 88%, var(--rd-heading)); }
.alert-danger { background: rgba(207,56,80,.09); border-color: rgba(207,56,80,.16); color: color-mix(in srgb, var(--rd-danger) 88%, var(--rd-heading)); }
.alert-warning { background: rgba(215,138,19,.1); border-color: rgba(215,138,19,.17); color: color-mix(in srgb, var(--rd-warning) 78%, var(--rd-heading)); }
.alert-info { background: rgba(22,120,162,.09); border-color: rgba(22,120,162,.16); color: color-mix(in srgb, var(--rd-info) 88%, var(--rd-heading)); }
.rd-flash-stack { position: relative; z-index: 5; margin-bottom: 18px; }
.rd-alert-strip { display: flex; align-items: flex-start; gap: 11px; padding: 13px 15px; border: 1px solid; border-radius: 13px; }
.rd-alert-strip + .rd-alert-strip { margin-top: 8px; }
.rd-alert-strip i { margin-top: 1px; font-size: 17px; }
.rd-alert-strip.critical { background: rgba(207,56,80,.095); border-color: rgba(207,56,80,.2); color: var(--rd-danger); }
.rd-alert-strip.warning { background: rgba(215,138,19,.095); border-color: rgba(215,138,19,.2); color: var(--rd-warning); }
.rd-alert-strip.info { background: rgba(22,120,162,.085); border-color: rgba(22,120,162,.18); color: var(--rd-info); }
.rd-alert-strip .rd-alert-copy { flex: 1 1 auto; color: var(--rd-ink); }
.rd-alert-strip .rd-alert-copy strong { color: var(--rd-heading); }

/* Patient 360 */
.rd-patient-hero {
    padding: 21px;
    background:
        linear-gradient(120deg, rgba(var(--rd-primary-rgb), .085), transparent 45%),
        var(--rd-surface);
}
.rd-patient-identity { display: flex; align-items: center; gap: 16px; min-width: 0; }
.rd-patient-name { margin: 0; color: var(--rd-heading); font-size: 24px; font-weight: 820; letter-spacing: -.025em; }
.rd-patient-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 5px; color: var(--rd-muted); font-size: 11.5px; }
.rd-patient-meta span { display: inline-flex; align-items: center; gap: 5px; }
.rd-info-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.rd-info-item { min-width: 0; padding: 12px 13px; border: 1px solid var(--rd-line); border-radius: 12px; background: var(--rd-surface-2); }
.rd-info-label { color: var(--rd-muted); font-size: 9.5px; font-weight: 780; letter-spacing: .06em; text-transform: uppercase; }
.rd-info-value { margin-top: 4px; color: var(--rd-heading); font-size: 12.5px; font-weight: 670; overflow-wrap: anywhere; }
.rd-timeline { position: relative; margin: 0; padding: 0; list-style: none; }
.rd-timeline::before { content: ""; position: absolute; inset-block: 10px; inset-inline-start: 17px; width: 1px; background: var(--rd-line-strong); }
.rd-timeline-item { position: relative; display: flex; gap: 13px; padding: 0 0 19px; }
.rd-timeline-item:last-child { padding-bottom: 0; }
.rd-timeline-icon { position: relative; z-index: 1; width: 35px; height: 35px; flex: 0 0 35px; display: grid; place-items: center; border: 4px solid var(--rd-surface); border-radius: 50%; background: var(--rd-surface-3); color: var(--rd-primary); font-size: 12px; }
.rd-timeline-icon.success { color: var(--rd-success); }
.rd-timeline-icon.warning { color: var(--rd-warning); }
.rd-timeline-icon.danger { color: var(--rd-danger); }
.rd-timeline-copy { min-width: 0; flex: 1 1 auto; padding-top: 4px; }
.rd-timeline-title { color: var(--rd-heading); font-weight: 710; }
.rd-timeline-detail { margin-top: 2px; color: var(--rd-muted); font-size: 11px; }
.rd-timeline-time { margin-top: 4px; color: var(--rd-subtle); font-size: 9.5px; }

/* Schedule and queue */
.rd-schedule-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.rd-schedule-nav { display: flex; align-items: center; gap: 7px; }
.rd-schedule-title { min-width: 175px; color: var(--rd-heading); font-size: 16px; font-weight: 790; text-align: center; }
.rd-segmented { display: inline-flex; gap: 3px; padding: 3px; border: 1px solid var(--rd-line); border-radius: 11px; background: var(--rd-surface-2); }
.rd-segmented button, .rd-segmented a { padding: 6px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--rd-muted); font-size: 11px; font-weight: 740; }
.rd-segmented .active { background: var(--rd-surface); color: var(--rd-primary); box-shadow: var(--rd-shadow-sm); }
.rd-calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--rd-line); border-inline-start: 1px solid var(--rd-line); }
.rd-calendar-weekday { padding: 9px; border-inline-end: 1px solid var(--rd-line); border-bottom: 1px solid var(--rd-line); background: var(--rd-surface-2); color: var(--rd-muted); font-size: 9px; font-weight: 820; letter-spacing: .07em; text-align: center; text-transform: uppercase; }
.rd-calendar-day { min-height: 118px; padding: 7px; border-inline-end: 1px solid var(--rd-line); border-bottom: 1px solid var(--rd-line); background: var(--rd-surface); cursor: pointer; transition: var(--rd-transition); overflow: hidden; }
.rd-calendar-day:hover { background: rgba(var(--rd-primary-rgb), .035); }
.rd-calendar-day.outside { background: var(--rd-surface-2); color: var(--rd-subtle); }
.rd-calendar-day.today { box-shadow: inset 0 0 0 2px rgba(var(--rd-primary-rgb), .45); }
.rd-calendar-date { width: 27px; height: 27px; display: grid; place-items: center; margin-bottom: 5px; border-radius: 9px; color: var(--rd-ink); font-size: 11px; font-weight: 770; }
.rd-calendar-day.today .rd-calendar-date { background: var(--rd-primary); color: #fff; }
.rd-calendar-event { display: block; margin-top: 4px; padding: 4px 6px; border-inline-start: 3px solid currentColor; border-radius: 5px; background: var(--rd-surface-3); color: var(--rd-primary); font-size: 9.5px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-calendar-event.completed { color: var(--rd-success); }
.rd-calendar-event.cancelled { color: var(--rd-danger); text-decoration: line-through; }
.rd-calendar-event.block { color: var(--rd-muted); }
.rd-agenda { display: none; }
.rd-agenda.active { display: block; }
.rd-agenda-day { margin-bottom: 13px; border: 1px solid var(--rd-line); border-radius: 13px; overflow: hidden; }
.rd-agenda-date { display: flex; justify-content: space-between; padding: 10px 13px; background: var(--rd-surface-2); color: var(--rd-heading); font-size: 11px; font-weight: 780; }
.rd-agenda-event { width: 100%; display: grid; grid-template-columns: 72px 1fr auto; gap: 12px; align-items: center; padding: 11px 13px; border: 0; border-top: 1px solid var(--rd-line); background: var(--rd-surface); color: var(--rd-ink); text-align: start; }
.rd-agenda-event:hover { background: rgba(var(--rd-primary-rgb), .035); }
.rd-queue-lane { min-height: 300px; padding: 13px; border: 1px dashed var(--rd-line-strong); border-radius: 15px; background: var(--rd-surface-2); }
.rd-queue-lane-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; color: var(--rd-heading); font-size: 12px; font-weight: 790; }
.rd-queue-card { padding: 13px; border: 1px solid var(--rd-line); border-radius: 12px; background: var(--rd-surface); box-shadow: var(--rd-shadow-sm); }
.rd-queue-card + .rd-queue-card { margin-top: 9px; }
.rd-wait-timer { color: var(--rd-warning); font-size: 10px; font-weight: 800; }

/* Clinical */
.tooth {
    position: relative;
    width: 47px;
    height: 62px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 5px;
    border: 2px solid var(--rd-line-strong);
    border-radius: 48% 48% 40% 40%;
    background: var(--rd-surface);
    color: var(--rd-ink);
    cursor: pointer;
    font-size: 10px;
    font-weight: 820;
    transition: var(--rd-transition);
}
.tooth:hover, .tooth.selected { transform: translateY(-3px); border-color: var(--rd-primary); box-shadow: 0 8px 16px rgba(var(--rd-primary-rgb), .12); }
.tooth.caries { background: rgba(207,56,80,.13); border-color: var(--rd-danger); }
.tooth.filled { background: rgba(22,120,162,.12); border-color: var(--rd-info); }
.tooth.crown { background: rgba(215,138,19,.14); border-color: var(--rd-warning); }
.tooth.missing { opacity: .32; text-decoration: line-through; }
.tooth.rct { background: rgba(118,87,214,.13); border-color: var(--rd-accent); }
.tooth.implant { background: rgba(17,132,95,.13); border-color: var(--rd-success); }
.odontogram { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; padding: 17px 0; }
.rd-clinical-nav { position: sticky; inset-block-start: calc(var(--rd-topbar-height) + 16px); }
.rd-note { padding: 15px; border: 1px solid var(--rd-line); border-radius: 13px; background: var(--rd-surface); }
.rd-note + .rd-note { margin-top: 11px; }
.rd-note-signed { border-inline-start: 3px solid var(--rd-success); }
.rd-soap-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.rd-soap-block { padding: 10px; border-radius: 10px; background: var(--rd-surface-2); }
.rd-soap-block small { display: block; margin-bottom: 4px; color: var(--rd-primary); font-size: 9px; font-weight: 830; letter-spacing: .07em; text-transform: uppercase; }

/* Operations and communication */
.rd-worklist-item { padding: 14px; border: 1px solid var(--rd-line); border-radius: 13px; background: var(--rd-surface); transition: var(--rd-transition); }
.rd-worklist-item + .rd-worklist-item { margin-top: 9px; }
.rd-worklist-item:hover { border-color: rgba(var(--rd-primary-rgb), .22); box-shadow: var(--rd-shadow-sm); }
.rd-worklist-item.overdue { border-inline-start: 3px solid var(--rd-danger); }
.rd-message { display: flex; gap: 11px; padding: 13px 0; border-bottom: 1px solid var(--rd-line); }
.rd-message:last-child { border-bottom: 0; }
.rd-message.unread { padding-inline: 10px; border-radius: 11px; background: rgba(var(--rd-primary-rgb), .055); }
.rd-rating { display: inline-flex; gap: 2px; color: #e1a11c; }
.rd-rating .muted { color: var(--rd-line-strong); }

/* Command search */
.rd-command-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1080;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 9vh 16px 20px;
    background: rgba(7, 13, 25, .56);
    backdrop-filter: blur(6px);
}
.rd-command-backdrop.open { display: flex; }
.rd-command {
    width: min(680px, 100%);
    max-height: min(720px, 82vh);
    overflow: hidden;
    border: 1px solid var(--rd-line-strong);
    border-radius: 18px;
    background: var(--rd-surface);
    box-shadow: var(--rd-shadow-lg);
}
.rd-command-input-wrap { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--rd-line); }
.rd-command-input-wrap i { color: var(--rd-primary); font-size: 19px; }
.rd-command-input { flex: 1 1 auto; border: 0; outline: 0; background: transparent; color: var(--rd-heading); font-size: 16px; }
.rd-command-input::placeholder { color: var(--rd-subtle); }
.rd-command-results { max-height: 540px; overflow-y: auto; padding: 8px; }
.rd-command-item { display: flex; align-items: center; gap: 11px; padding: 10px; border-radius: 11px; color: var(--rd-ink); }
.rd-command-item:hover, .rd-command-item.active { background: rgba(var(--rd-primary-rgb), .075); color: var(--rd-ink); }
.rd-command-item-icon { width: 37px; height: 37px; display: grid; place-items: center; flex: 0 0 37px; border-radius: 11px; background: var(--rd-surface-3); color: var(--rd-primary); }
.rd-command-item-copy { min-width: 0; flex: 1 1 auto; }
.rd-command-item-copy strong, .rd-command-item-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-command-item-copy strong { color: var(--rd-heading); font-size: 12px; }
.rd-command-item-copy small { margin-top: 2px; color: var(--rd-muted); font-size: 10px; }
.rd-command-type { color: var(--rd-subtle); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.rd-command-footer { display: flex; align-items: center; gap: 13px; padding: 9px 14px; border-top: 1px solid var(--rd-line); background: var(--rd-surface-2); color: var(--rd-muted); font-size: 9.5px; }

/* Bootstrap overlays */
.dropdown-menu {
    --bs-dropdown-bg: var(--rd-surface);
    --bs-dropdown-color: var(--rd-ink);
    --bs-dropdown-border-color: var(--rd-line);
    --bs-dropdown-link-color: var(--rd-ink);
    --bs-dropdown-link-hover-color: var(--rd-heading);
    --bs-dropdown-link-hover-bg: var(--rd-surface-2);
    min-width: 220px;
    padding: 7px;
    border-radius: 13px;
    box-shadow: var(--rd-shadow);
}
.dropdown-item { padding: 8px 10px; border-radius: 8px; font-size: 12px; }
.dropdown-header { color: var(--rd-muted); font-size: 9px; font-weight: 820; letter-spacing: .07em; text-transform: uppercase; }
.dropdown-divider { border-color: var(--rd-line); }
.modal-content, .offcanvas {
    --bs-modal-bg: var(--rd-surface);
    --bs-modal-color: var(--rd-ink);
    --bs-offcanvas-bg: var(--rd-surface);
    --bs-offcanvas-color: var(--rd-ink);
    color: var(--rd-ink);
    background: var(--rd-surface);
    border: 1px solid var(--rd-line);
    border-radius: 18px;
    box-shadow: var(--rd-shadow-lg);
}
.modal-header, .modal-footer, .offcanvas-header { border-color: var(--rd-line); }
.offcanvas { --bs-offcanvas-width: min(520px, 94vw); border-radius: 0; }
.btn-close { filter: none; }
[data-theme="dark"] .btn-close { filter: invert(1) grayscale(1); }
.nav-pills { gap: 5px; }
.nav-pills .nav-link { border-radius: 9px; color: var(--rd-muted); font-size: 11.5px; font-weight: 730; }
.nav-pills .nav-link:hover { background: var(--rd-surface-2); color: var(--rd-heading); }
.nav-pills .nav-link.active { background: var(--rd-primary); color: #fff; }
.pagination { --bs-pagination-bg: var(--rd-surface); --bs-pagination-border-color: var(--rd-line); --bs-pagination-color: var(--rd-primary); --bs-pagination-hover-bg: var(--rd-surface-2); --bs-pagination-hover-border-color: var(--rd-line-strong); --bs-pagination-active-bg: var(--rd-primary); --bs-pagination-active-border-color: var(--rd-primary); }
.page-link { border-radius: 8px !important; margin: 0 2px; font-size: 11px; }

/* Guest / public */
.rd-guest-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 7% 4%, rgba(126,174,88,.17), transparent 30%),
        radial-gradient(circle at 93% 0%, rgba(var(--rd-primary-rgb), .2), transparent 32%),
        var(--rd-bg);
}
.guest-shell { min-height: 100vh; display: grid; place-items: center; padding: 30px 18px; }
.guest-card { width: min(1120px, 100%); overflow: hidden; border: 1px solid rgba(255,255,255,.1); border-radius: 26px; background: var(--rd-surface); box-shadow: var(--rd-shadow-lg); }
.guest-side {
    min-height: 650px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 44px;
    color: #fff;
    background:
        radial-gradient(circle at 80% 15%, rgba(126, 174, 88, .20), transparent 28%),
        radial-gradient(circle at 10% 85%, rgba(23, 109, 86, .14), transparent 31%),
        linear-gradient(145deg, #173c33, #35664f 64%, #527f70);
}
.guest-side h1 { max-width: 540px; margin: 0; font-size: clamp(34px, 4vw, 48px); font-weight: 840; line-height: 1.06; letter-spacing: -.045em; }
.guest-side p { max-width: 500px; color: rgba(255,255,255,.72); font-size: 14px; }
.guest-form { padding: 44px; }
.guest-form h2 { color: var(--rd-heading); }
.feature { display: flex; align-items: center; gap: 10px; margin: 12px 0; color: rgba(255,255,255,.8); font-size: 12.5px; }
.feature i { color: #6ee7d6; }
.rd-guest-stat-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; margin-top: 30px; }
.rd-guest-stat { padding: 12px; border: 1px solid rgba(255,255,255,.11); border-radius: 12px; background: rgba(255,255,255,.055); backdrop-filter: blur(8px); }
.rd-guest-stat strong { display: block; font-size: 16px; }
.rd-guest-stat small { color: rgba(255,255,255,.62); font-size: 9.5px; }

/* Portal */
.rd-portal-welcome {
    padding: 24px;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 90% 15%, rgba(255,255,255,.16), transparent 25%),
        linear-gradient(125deg, color-mix(in srgb, var(--rd-primary) 88%, #173c33), color-mix(in srgb, var(--rd-primary) 55%, var(--rd-secondary)));
}
.rd-portal-welcome h1 { margin: 0; font-size: 28px; font-weight: 830; }
.rd-portal-welcome p { max-width: 620px; margin: 7px 0 0; color: rgba(255,255,255,.74); }
.rd-appointment-ticket { padding: 17px; border: 1px solid var(--rd-line); border-radius: 14px; background: var(--rd-surface); }
.rd-appointment-ticket + .rd-appointment-ticket { margin-top: 10px; }

/* Utility */
.rd-clickable { cursor: pointer; }
.rd-muted { color: var(--rd-muted); }
.rd-heading { color: var(--rd-heading); }
.rd-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.rd-truncate { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-sticky-aside { position: sticky; inset-block-start: calc(var(--rd-topbar-height) + 18px); }
.rd-scroll-x { overflow-x: auto; scrollbar-width: thin; }
.rd-scroll-y { overflow-y: auto; scrollbar-width: thin; }
.print-only { display: none; }
.rd-card canvas { display: block; max-width: 100%; }

@media (max-width: 1399px) {
    .rd-kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .rd-content { padding-inline: 24px; }
}

@media (max-width: 1199px) {
    .rd-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rd-search-trigger { width: min(330px, 32vw); }
    .rd-branch-chip { display: none; }
    .rd-info-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 991.98px) {
    :root { --rd-topbar-height: 68px; }
    .rd-sidebar { transform: translateX(-105%); box-shadow: var(--rd-shadow-lg); }
    [dir="rtl"] .rd-sidebar { transform: translateX(105%); }
    .rd-sidebar.open { transform: translateX(0); }
    .rd-shell, body.rd-sidebar-collapsed .rd-shell { margin-inline-start: 0; }
    body.rd-sidebar-collapsed .rd-sidebar { width: var(--rd-sidebar-width); }
    body.rd-sidebar-collapsed .rd-brand-copy,
    body.rd-sidebar-collapsed .rd-nav-label,
    body.rd-sidebar-collapsed .rd-nav-link > span:not(.rd-nav-badge),
    body.rd-sidebar-collapsed .rd-sidebar-footer { opacity: 1; visibility: visible; width: auto; }
    body.rd-sidebar-collapsed .rd-nav-link { justify-content: flex-start; padding-inline: 12px; }
    body.rd-sidebar-collapsed .rd-nav-badge { position: static; min-width: 22px; height: 22px; padding: 0 6px; font-size: 10px; }
    .rd-sidebar-backdrop { position: fixed; inset: 0; z-index: 1035; background: rgba(5,10,20,.48); backdrop-filter: blur(2px); }
    .rd-sidebar-backdrop.show { display: block; }
    .mobile-menu { display: inline-grid; }
    .rd-desktop-collapse { display: none; }
    .rd-topbar { padding-inline: 15px; }
    .rd-content { padding: 20px 15px 38px; }
    .rd-user-copy { display: none; }
    .rd-search-trigger { width: 42px; height: 42px; justify-content: center; padding: 0; }
    .rd-search-trigger span, .rd-search-trigger .rd-kbd { display: none; }
    .rd-page-header { align-items: flex-start; }
    .rd-calendar-day { min-height: 96px; }
    .rd-sticky-aside, .rd-clinical-nav { position: static; }
    .guest-side { min-height: 430px; }
}

@media (max-width: 767.98px) {
    .rd-page-header { flex-direction: column; margin-bottom: 19px; }
    .rd-page-actions { width: 100%; justify-content: flex-start; }
    .rd-page-actions .btn { flex: 1 1 auto; }
    .rd-kpi-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .rd-kpi, .rd-stat { min-height: 138px; padding: 15px; }
    .rd-kpi-value, .rd-stat .value { font-size: 21px; }
    .rd-card-header, .rd-card-body { padding-inline: 15px; }
    .rd-info-grid { grid-template-columns: 1fr; }
    .rd-patient-identity { align-items: flex-start; }
    .rd-patient-name { font-size: 21px; }
    .rd-calendar-grid { display: none; }
    .rd-agenda { display: block; }
    .rd-schedule-toolbar { align-items: stretch; }
    .rd-schedule-nav { justify-content: space-between; width: 100%; }
    .rd-schedule-title { min-width: 0; flex: 1; }
    .rd-agenda-event { grid-template-columns: 62px 1fr; }
    .rd-agenda-event > :last-child { grid-column: 2; }
    .rd-soap-grid { grid-template-columns: 1fr; }
    .guest-shell { padding: 0; place-items: stretch; }
    .guest-card { border: 0; border-radius: 0; min-height: 100vh; }
    .guest-side, .guest-form { padding: 30px 22px; }
    .guest-side { min-height: 360px; }
    .rd-guest-stat-grid { display: none; }
    .table-responsive .table { min-width: 720px; }
}

@media (max-width: 575.98px) {
    .rd-topbar-end { gap: 6px; }
    .rd-topbar .rd-icon-btn { width: 38px; height: 38px; flex-basis: 38px; }
    .rd-user-trigger { padding: 2px; }
    .rd-user-trigger > i { display: none; }
    .rd-kpi-grid { grid-template-columns: 1fr; }
    .rd-kpi { min-height: 126px; }
    .rd-page-actions .btn { width: 100%; }
    .rd-card { border-radius: 14px; }
    .rd-patient-hero { padding: 16px; }
    .rd-patient-identity { flex-direction: column; }
    .rd-command-backdrop { padding: 0; align-items: stretch; }
    .rd-command { max-height: 100vh; border: 0; border-radius: 0; }
    .offcanvas { --bs-offcanvas-width: 100vw; }
}

[dir="rtl"] .rd-shell { margin-right: var(--rd-sidebar-width); margin-left: 0; }
[dir="rtl"] body.rd-sidebar-collapsed .rd-shell { margin-right: var(--rd-sidebar-collapsed); margin-left: 0; }
[dir="rtl"] .rd-nav-link:hover { transform: translateX(-2px); }
[dir="rtl"] .rd-timeline::before { right: 17px; left: auto; }
@media (max-width: 991.98px) {
    [dir="rtl"] .rd-shell, [dir="rtl"] body.rd-sidebar-collapsed .rd-shell { margin-right: 0; }
}

@media print {
    :root { --rd-bg: #fff; --rd-surface: #fff; --rd-ink: #111; --rd-heading: #000; --rd-line: #ddd; }
    body { background: #fff; color: #111; font-size: 11pt; }
    .rd-sidebar, .rd-topbar, .rd-sidebar-backdrop, .rd-command-backdrop, .no-print, .btn, form { display: none !important; }
    .rd-shell { margin: 0 !important; }
    .rd-content { padding: 0; }
    .rd-card { break-inside: avoid; border-color: #ddd; box-shadow: none; }
    .print-only { display: block; }
    a { color: #000; text-decoration: none; }
}

/* Operational inbox and status-dot aliases */
.rd-priority.primary { background: var(--rd-primary); }
.rd-priority.success { background: var(--rd-success); }
.rd-priority.warning { background: var(--rd-warning); }
.rd-priority.danger { background: var(--rd-danger); box-shadow: 0 0 0 4px rgba(207,56,80,.1); }
.rd-priority.info { background: var(--rd-info); }
.rd-priority.neutral { background: var(--rd-subtle); }
.rd-notification-row { border-bottom: 1px solid var(--rd-line); }
.rd-notification-row:last-child { border-bottom: 0; }
.rd-notification-row.unread { background: rgba(var(--rd-primary-rgb), .045); }
.rd-notification-button { width: 100%; display: flex; align-items: center; gap: 14px; padding: 17px 19px; border: 0; background: transparent; color: inherit; text-align: inherit; }
.rd-notification-button:hover { background: var(--rd-surface-2); }
.rd-notification-icon { width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; border-radius: 13px; background: var(--rd-surface-3); color: var(--rd-primary); }
.rd-notification-icon.success { background: rgba(17,132,95,.1); color: var(--rd-success); }
.rd-notification-icon.warning { background: rgba(215,138,19,.11); color: var(--rd-warning); }
.rd-notification-icon.danger { background: rgba(207,56,80,.1); color: var(--rd-danger); }
.rd-notification-icon.info { background: rgba(22,120,162,.1); color: var(--rd-info); }
.rd-unread-dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: var(--rd-primary); box-shadow: 0 0 0 4px rgba(var(--rd-primary-rgb), .1); }

/* Professional appointment workspace */
.rd-schedule-shell { overflow: hidden; }
.rd-schedule-legend { align-items: center; gap: 12px; color: var(--rd-muted); font-size: 10px; font-weight: 700; }
.rd-schedule-legend span { display: inline-flex; align-items: center; gap: 6px; }
.rd-schedule-loading { display: none; align-items: center; justify-content: center; gap: 9px; min-height: 54px; color: var(--rd-muted); font-size: 11px; }
.rd-schedule-loading.show { display: flex; }
.rd-schedule-error { grid-column: 1 / -1; min-height: 300px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; color: var(--rd-muted); text-align: center; }
.rd-schedule-error > i { color: var(--rd-warning); font-size: 28px; }
.rd-calendar-more { width: 100%; margin-top: 4px; padding: 2px 5px; border: 0; background: transparent; color: var(--rd-muted); font-size: 9px; font-weight: 750; text-align: start; }
.rd-calendar-more:hover { color: var(--rd-primary); }
.rd-detail { height: 100%; padding: 12px 13px; border: 1px solid var(--rd-line); border-radius: 11px; background: var(--rd-surface-2); }
.rd-detail > span { display: block; margin-bottom: 4px; color: var(--rd-muted); font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.rd-detail > strong { color: var(--rd-heading); font-size: 12px; }
@media (max-width: 575.98px) {
    .rd-schedule-nav .btn { padding-inline: 8px; }
    .rd-agenda-event { grid-template-columns: 1fr; }
    .rd-agenda-event > :last-child { grid-column: 1; justify-self: start; }
}

/* Live patient flow */
.rd-queue-board { display: grid; grid-template-columns: repeat(4, minmax(245px, 1fr)); gap: 13px; overflow-x: auto; padding-bottom: 4px; }
.rd-queue-board .rd-queue-lane { min-width: 245px; }
.rd-queue-card.has-alert { border-inline-start: 3px solid var(--rd-warning); }
.rd-queue-time { color: var(--rd-heading); font-size: 11px; white-space: nowrap; }
.rd-queue-alert { display: flex; align-items: flex-start; gap: 7px; padding: 8px 9px; border-radius: 9px; background: rgba(207,56,80,.08); color: var(--rd-danger); font-size: 9.5px; font-weight: 700; }
.rd-queue-alert.warning { background: rgba(215,138,19,.1); color: var(--rd-warning); }
.rd-chair-timer { color: var(--rd-info); font-size: 10px; font-weight: 800; }
.rd-wait-timer.urgent { color: var(--rd-danger); }
.rd-queue-empty { min-height: 170px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--rd-subtle); font-size: 10px; text-align: center; }
.rd-queue-empty i { font-size: 23px; }
@media (max-width: 1399.98px) { .rd-queue-board { grid-template-columns: repeat(4, minmax(260px, 1fr)); } }

/* Public and authentication experience */
.rd-guest-body { min-height: 100vh; background: radial-gradient(circle at 10% 4%, rgba(var(--rd-primary-rgb), .13), transparent 31%), radial-gradient(circle at 92% 10%, rgba(126,174,88,.12), transparent 27%), var(--rd-bg); }
.rd-public-header { width: min(1320px, calc(100% - 32px)); min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0 auto; padding: 12px 0; }
.rd-public-brand { display: flex; align-items: center; gap: 11px; color: var(--rd-heading); }
.rd-public-brand:hover { color: var(--rd-heading); }
.rd-public-brand > span:last-child { display: flex; flex-direction: column; line-height: 1.2; }
.rd-public-brand strong { font-size: 14px; font-weight: 830; }
.rd-public-brand small { margin-top: 3px; color: var(--rd-muted); font-size: 9.5px; }
.rd-public-nav { display: flex; align-items: center; gap: 8px; }
.rd-public-nav > a:not(.btn) { padding: 7px 9px; color: var(--rd-muted); font-size: 11px; font-weight: 720; }
.rd-public-nav > a.active, .rd-public-nav > a:not(.btn):hover { color: var(--rd-primary); }
.guest-shell { width: 100%; min-height: calc(100vh - 128px); display: grid; place-items: center; padding: 24px 16px 42px; }
.guest-card { width: min(100%, 1100px); overflow: hidden; border: 1px solid rgba(214,222,236,.85); border-radius: 27px; background: var(--rd-surface); box-shadow: 0 28px 85px rgba(17,29,52,.16); }
.guest-card-auth { max-width: 1040px; }
.guest-card-booking { max-width: 1180px; }
.guest-side { min-height: 640px; display: flex; flex-direction: column; justify-content: space-between; gap: 38px; padding: clamp(34px, 5vw, 58px); background: linear-gradient(145deg, #101a31 0%, #1c315b 57%, var(--rd-primary) 145%); color: #fff; position: relative; overflow: hidden; }
.guest-side::before { content: ""; position: absolute; width: 380px; height: 380px; inset: -150px -170px auto auto; border: 1px solid rgba(255,255,255,.13); border-radius: 50%; box-shadow: 0 0 0 58px rgba(255,255,255,.035), 0 0 0 118px rgba(255,255,255,.025); }
.guest-side > * { position: relative; z-index: 1; }
.guest-side h1 { max-width: 590px; margin: 18px 0 14px; color: #fff; font-size: clamp(31px, 4vw, 47px); font-weight: 850; letter-spacing: -.045em; line-height: 1.07; }
.guest-side > div > p { max-width: 560px; margin: 0; color: rgba(231,237,249,.78); font-size: 14px; line-height: 1.75; }
.rd-guest-kicker { display: inline-flex; align-items: center; gap: 7px; padding: 6px 9px; border: 1px solid rgba(255,255,255,.14); border-radius: 999px; background: rgba(255,255,255,.08); color: #dfeaff; font-size: 9.5px; font-weight: 820; letter-spacing: .07em; text-transform: uppercase; }
.rd-guest-feature-list { display: grid; gap: 12px; }
.feature { display: flex; align-items: flex-start; gap: 12px; padding: 12px; border: 1px solid rgba(255,255,255,.09); border-radius: 13px; background: rgba(255,255,255,.045); }
.feature > i { margin-top: 2px; color: #74dfd4; font-size: 16px; }
.feature span { display: flex; flex-direction: column; }
.feature strong { color: #fff; font-size: 11.5px; }
.feature small { margin-top: 3px; color: rgba(225,233,247,.68); font-size: 9.5px; line-height: 1.5; }
.rd-guest-trust { display: flex; align-items: flex-start; gap: 9px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.12); color: rgba(225,233,247,.72); font-size: 9.5px; line-height: 1.55; }
.rd-guest-trust i { margin-top: 2px; color: #74dfd4; }
.guest-form { display: flex; flex-direction: column; justify-content: center; padding: clamp(30px, 5vw, 58px); }
.rd-auth-heading h2 { margin: 14px 0 7px; color: var(--rd-heading); font-size: clamp(25px, 3vw, 33px); font-weight: 840; letter-spacing: -.035em; }
.rd-auth-heading p { margin: 0; color: var(--rd-muted); font-size: 12px; line-height: 1.65; }
.rd-input-group .input-group-text { border-inline-end: 0; background: var(--rd-surface); color: var(--rd-muted); }
.rd-input-group .form-control { border-inline-start: 0; }
.rd-input-group .form-control:focus { border-color: var(--rd-line-strong); box-shadow: none; }
.rd-input-group:focus-within { border-radius: var(--rd-radius-sm); box-shadow: var(--rd-focus); }
.rd-auth-divider { display: flex; align-items: center; gap: 12px; margin: 25px 0 14px; color: var(--rd-subtle); font-size: 9px; font-weight: 780; letter-spacing: .06em; text-transform: uppercase; }
.rd-auth-divider::before, .rd-auth-divider::after { content: ""; height: 1px; flex: 1; background: var(--rd-line); }
.rd-booking-steps { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.rd-booking-steps li { display: flex; align-items: flex-start; gap: 12px; }
.rd-booking-steps li > span { width: 29px; height: 29px; flex: 0 0 29px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.16); border-radius: 10px; background: rgba(255,255,255,.09); color: #fff; font-size: 10px; font-weight: 840; }
.rd-booking-steps div { display: flex; flex-direction: column; }
.rd-booking-steps strong { color: #fff; font-size: 11.5px; }
.rd-booking-steps small { margin-top: 3px; color: rgba(225,233,247,.66); font-size: 9.5px; line-height: 1.5; }
.rd-booking-success { display: flex; align-items: flex-start; gap: 12px; padding: 15px; border: 1px solid rgba(17,132,95,.18); border-radius: 14px; background: rgba(17,132,95,.08); }
.rd-booking-success > span { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 12px; background: rgba(17,132,95,.13); color: var(--rd-success); font-size: 20px; }
.rd-booking-success strong { color: var(--rd-heading); }
.rd-booking-success p { margin: 3px 0 0; color: var(--rd-muted); font-size: 10.5px; }
.rd-form-section { margin: 0 0 24px; padding: 0; border: 0; }
.rd-form-section legend { width: 100%; display: flex; align-items: center; gap: 9px; margin-bottom: 14px; padding-bottom: 9px; border-bottom: 1px solid var(--rd-line); color: var(--rd-heading); font-size: 12px; font-weight: 800; }
.rd-form-section legend span { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 8px; background: rgba(var(--rd-primary-rgb), .1); color: var(--rd-primary); font-size: 9px; }
.rd-form-display { min-height: 39px; display: flex; align-items: center; gap: 8px; padding: 8px 11px; border: 1px dashed var(--rd-line-strong); border-radius: var(--rd-radius-sm); color: var(--rd-muted); font-size: 10.5px; }
.rd-consent-box { padding: 14px; border: 1px solid var(--rd-line); border-radius: 13px; background: var(--rd-surface-2); }
.rd-consent-box strong { display: block; color: var(--rd-heading); font-size: 11px; }
.rd-consent-box small { display: block; margin-top: 4px; color: var(--rd-muted); font-size: 9.5px; line-height: 1.55; }
.rd-public-footer { width: min(1320px, calc(100% - 32px)); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 9px; margin: -19px auto 0; padding: 14px 0 24px; color: var(--rd-subtle); font-size: 9px; }
@media (max-width: 991.98px) {
    .guest-side { min-height: auto; }
    .guest-card-booking .guest-side { padding-bottom: 36px; }
}
@media (max-width: 575.98px) {
    .rd-public-header { width: calc(100% - 24px); }
    .rd-public-brand small, .rd-public-nav > a:not(.btn) { display: none; }
    .guest-shell { padding-inline: 10px; }
    .guest-card { border-radius: 20px; }
    .guest-side, .guest-form { padding: 27px 22px; }
    .guest-side h1 { font-size: 30px; }
    .rd-public-footer { width: calc(100% - 28px); }
}

/* Patient portal */
.rd-portal-health-notice { display: flex; align-items: flex-start; gap: 13px; padding: 16px; border: 1px solid rgba(215,138,19,.2); border-radius: 15px; background: rgba(215,138,19,.075); }
.rd-portal-health-icon { width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; border-radius: 13px; background: rgba(215,138,19,.13); color: var(--rd-warning); font-size: 19px; }
.rd-portal-health-notice strong { color: var(--rd-heading); }
.rd-portal-health-notice p { margin: 3px 0 0; color: var(--rd-muted); font-size: 10.5px; }
.rd-portal-next { display: grid; grid-template-columns: auto minmax(0,1fr) minmax(220px, .45fr); gap: 18px; align-items: center; padding: 20px; border: 1px solid rgba(var(--rd-primary-rgb), .17); border-radius: 18px; background: linear-gradient(125deg, rgba(var(--rd-primary-rgb), .09), var(--rd-surface) 58%); box-shadow: var(--rd-shadow-sm); }
.rd-portal-next-date { width: 67px; height: 70px; display: grid; place-items: center; align-content: center; border-radius: 17px; background: var(--rd-primary); color: #fff; box-shadow: 0 12px 24px rgba(var(--rd-primary-rgb), .2); }
.rd-portal-next-date strong { font-size: 24px; line-height: 1; }
.rd-portal-next-date span { margin-top: 4px; font-size: 9px; font-weight: 820; letter-spacing: .08em; text-transform: uppercase; }
.rd-portal-next h2 { margin: 1px 0 4px; color: var(--rd-heading); font-size: 19px; font-weight: 810; }
.rd-portal-next p { margin: 0; color: var(--rd-muted); font-size: 11px; }
.rd-portal-next-note { display: flex; align-items: flex-start; gap: 8px; padding: 11px; border-radius: 11px; background: var(--rd-surface-2); color: var(--rd-muted); font-size: 9.5px; line-height: 1.5; }
.rd-portal-next-note i { color: var(--rd-info); }
.rd-section-label { margin: 0; color: var(--rd-muted); font-size: 9px; font-weight: 820; letter-spacing: .08em; text-transform: uppercase; }
.rd-portal-appointment { display: grid; grid-template-columns: 72px minmax(0,1fr) auto; gap: 13px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--rd-line); }
.rd-portal-appointment:last-of-type { border-bottom: 0; }
.rd-portal-appointment-time { display: flex; flex-direction: column; padding: 8px 9px; border-radius: 10px; background: var(--rd-surface-2); text-align: center; }
.rd-portal-appointment-time strong { color: var(--rd-heading); font-size: 11px; }
.rd-portal-appointment-time span { color: var(--rd-muted); font-size: 9px; }
.rd-portal-history summary { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid var(--rd-line); border-radius: 10px; color: var(--rd-heading); cursor: pointer; font-size: 10.5px; font-weight: 720; list-style: none; }
.rd-portal-history summary::-webkit-details-marker { display: none; }
.rd-portal-plan { padding: 16px; border: 1px solid var(--rd-line); border-radius: 14px; background: var(--rd-surface); }
.rd-portal-plan + .rd-portal-plan { margin-top: 13px; }
.rd-portal-plan h3 { margin: 0; color: var(--rd-heading); font-size: 14px; font-weight: 780; }
.rd-portal-plan-summary { margin-top: 12px; padding: 10px 11px; border-radius: 10px; background: var(--rd-surface-2); color: var(--rd-ink); font-size: 10.5px; }
.rd-portal-plan-summary span { display: block; margin-bottom: 3px; color: var(--rd-muted); font-size: 8.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.rd-document-row, .rd-invoice-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rd-line); }
.rd-document-row:last-child, .rd-invoice-row:last-child { border-bottom: 0; }
.rd-document-icon { width: 39px; height: 39px; flex: 0 0 39px; display: grid; place-items: center; border-radius: 11px; background: rgba(var(--rd-primary-rgb), .09); color: var(--rd-primary); font-size: 16px; }
.rd-invoice-row { justify-content: space-between; }
.rd-recall-card { display: flex; align-items: flex-start; gap: 12px; }
.rd-recall-icon { width: 45px; height: 45px; flex: 0 0 45px; display: grid; place-items: center; border-radius: 14px; background: rgba(126,174,88,.10); color: var(--rd-secondary); font-size: 19px; }
.rd-recall-card strong { color: var(--rd-heading); }
.rd-recall-card p { margin: 3px 0 7px; color: var(--rd-muted); font-size: 10px; }
.rd-toggle-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
.rd-toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 10px; border: 1px solid var(--rd-line); border-radius: 9px; color: var(--rd-ink); font-size: 9.5px; }
.rd-check-pill input { position: absolute; opacity: 0; pointer-events: none; }
.rd-check-pill span { display: block; padding: 6px 9px; border: 1px solid var(--rd-line); border-radius: 999px; color: var(--rd-muted); font-size: 9.5px; cursor: pointer; }
.rd-check-pill input:checked + span { border-color: rgba(var(--rd-primary-rgb), .25); background: rgba(var(--rd-primary-rgb), .09); color: var(--rd-primary); font-weight: 720; }
.rd-star-input { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.rd-star-input input { position: absolute; opacity: 0; pointer-events: none; }
.rd-star-input label { color: var(--rd-line-strong); cursor: pointer; font-size: 25px; transition: var(--rd-transition); }
.rd-star-input label:hover, .rd-star-input label:hover ~ label, .rd-star-input input:checked ~ label { color: #e1a11c; transform: translateY(-1px); }
@media (max-width: 991.98px) { .rd-portal-next { grid-template-columns: auto minmax(0,1fr); } .rd-portal-next-note { grid-column: 1 / -1; } }
@media (max-width: 575.98px) { .rd-portal-next { grid-template-columns: 1fr; } .rd-portal-next-date { width: 58px; height: 60px; } .rd-portal-next-note { grid-column: auto; } .rd-portal-appointment { grid-template-columns: 62px minmax(0,1fr); } .rd-portal-appointment > :last-child { grid-column: 2; justify-self: start; } .rd-toggle-grid { grid-template-columns: 1fr; } .rd-document-row { align-items: flex-start; flex-wrap: wrap; } .rd-document-row .btn { margin-inline-start: 51px; } }

/* Clinical workspace enhancements */
.rd-clinical-tabs .nav-link { display: inline-flex; align-items: center; white-space: nowrap; }
.rd-tab-count { min-width: 19px; height: 19px; display: inline-grid; place-items: center; margin-inline-start: 5px; padding: 0 5px; border-radius: 999px; background: var(--rd-surface-3); color: var(--rd-muted); font-size: 8.5px; }
.nav-pills .nav-link.active .rd-tab-count { background: rgba(255,255,255,.18); color: #fff; }
.rd-clinical-chart-note { display: flex; align-items: flex-start; gap: 9px; padding: 11px 12px; border: 1px solid rgba(22,120,162,.14); border-radius: 11px; background: rgba(22,120,162,.065); color: var(--rd-muted); font-size: 10.5px; }
.rd-clinical-chart-note i { color: var(--rd-info); font-size: 15px; }
.tooth.perio-alert::after { content: ""; position: absolute; inset-block-start: 4px; inset-inline-end: 4px; width: 8px; height: 8px; border: 2px solid var(--rd-surface); border-radius: 50%; background: var(--rd-danger); }
.rd-condition-key { display: inline-flex; align-items: center; gap: 6px; color: var(--rd-muted); font-size: 9.5px; }
.rd-condition-key .tooth { width: 19px; height: 25px; min-width: 19px; padding: 0; border-width: 1px; pointer-events: none; }
.rd-perio-dot { width: 9px; height: 9px; display: inline-block; border-radius: 50%; background: var(--rd-danger); }
.rd-tooth-number { min-width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: rgba(var(--rd-primary-rgb),.1); color: var(--rd-primary); font-size: 17px; font-weight: 820; }
.rd-clinical-guard { display: flex; align-items: flex-start; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--rd-line); }
.rd-clinical-guard:last-child { border-bottom: 0; }
.rd-clinical-guard > i { width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center; border-radius: 9px; background: var(--rd-surface-3); color: var(--rd-primary); }
.rd-clinical-guard.danger > i { background: rgba(207,56,80,.1); color: var(--rd-danger); }
.rd-clinical-guard span { display: block; color: var(--rd-muted); font-size: 8.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.rd-clinical-guard strong { display: block; margin-top: 2px; color: var(--rd-heading); font-size: 10.5px; line-height: 1.45; }
.rd-plan-card { padding: 16px; border: 1px solid var(--rd-line); border-radius: 14px; background: var(--rd-surface); }
.rd-plan-card + .rd-plan-card { margin-top: 14px; }
.rd-plan-card h3 { margin: 0; color: var(--rd-heading); font-size: 14px; font-weight: 790; }
.rd-plan-summary { margin-top: 11px; padding: 10px 11px; border-radius: 10px; background: var(--rd-surface-2); color: var(--rd-ink); font-size: 10.5px; white-space: pre-line; }
.rd-plan-summary > span { display: block; margin-bottom: 3px; color: var(--rd-muted); font-size: 8px; font-weight: 820; letter-spacing: .07em; text-transform: uppercase; }
.rd-plan-item { margin-bottom: 10px; padding: 13px; border: 1px solid var(--rd-line); border-radius: 12px; background: var(--rd-surface-2); }
.rd-prescription-card { padding: 15px; border: 1px solid var(--rd-line); border-radius: 13px; }
.rd-prescription-card + .rd-prescription-card { margin-top: 12px; }
.rd-medicine-row { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-top: 1px solid var(--rd-line); }
.rd-consent-record { display: flex; align-items: flex-start; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--rd-line); }
.rd-consent-record:first-child { padding-top: 0; }
.rd-consent-record:last-child { padding-bottom: 0; border-bottom: 0; }
#signatureCanvas { width: 100%; height: 190px; display: block; border: 1px dashed var(--rd-line-strong); border-radius: 13px; background: #fff; cursor: crosshair; touch-action: none; }
@media (max-width: 767.98px) { .rd-soap-grid { grid-template-columns: 1fr; } .odontogram { gap: 5px; } .tooth { width: 39px; height: 53px; } }

/* Settings workspace */
.rd-settings-nav .nav-link { display: flex; align-items: center; gap: 10px; padding: 10px 11px; }
.rd-settings-nav .nav-link i { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 8px; background: var(--rd-surface-3); color: var(--rd-primary); }
.rd-settings-nav .nav-link.active i { background: rgba(255,255,255,.17); color: #fff; }
.rd-resource-color { width: 13px; height: 38px; flex: 0 0 13px; border-radius: 6px; background: var(--resource-color, var(--rd-primary)); }

/* Team and access workspace */
.rd-workspace-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 3px;
    scrollbar-width: thin;
}
.rd-workspace-tabs .nav-link {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}
.rd-callout {
    border: 1px solid var(--rd-line);
    border-radius: 13px;
    background: var(--rd-surface-2);
    color: var(--rd-ink);
}
.rd-check-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-height: 54px;
    padding: 11px 12px;
    border: 1px solid var(--rd-line);
    border-radius: 11px;
    background: var(--rd-surface);
    cursor: pointer;
    transition: var(--rd-transition);
}
.rd-check-card:hover {
    border-color: rgba(var(--rd-primary-rgb), .35);
    background: rgba(var(--rd-primary-rgb), .035);
    transform: translateY(-1px);
}
.rd-check-card:has(.form-check-input:checked) {
    border-color: rgba(var(--rd-primary-rgb), .45);
    background: rgba(var(--rd-primary-rgb), .07);
    box-shadow: 0 0 0 3px rgba(var(--rd-primary-rgb), .05);
}
.rd-check-card .form-check-input {
    flex: 0 0 auto;
    margin-top: 2px;
}
.rd-check-card span {
    min-width: 0;
}
.rd-check-card strong,
.rd-check-card small {
    display: block;
}
.rd-check-card strong {
    color: var(--rd-heading);
    font-size: 10.5px;
    line-height: 1.35;
}
.rd-check-card small {
    margin-top: 2px;
    color: var(--rd-muted);
    font-size: 8.5px;
    line-height: 1.35;
}
