/* Rukukwe portal components.
   The Gentelella design system (#276) ships its primitives as React components over plain CSS classes; this is the
   same visual contract under the portal's rk- names so Razor components stay declarative. Every value comes from a
   token in tokens.css: no raw colours, no raw radii. Hover moves one surface step, focus is always --shadow-focus,
   and hierarchy comes from borders before shadows. */

/* ---- base ---------------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; }

body {
    font: var(--text-body);
    color: var(--ink);
    background: var(--surface-page);
    -webkit-font-smoothing: antialiased;
    font-feature-settings: 'cv11', 'ss01';
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); text-decoration: underline; }

:focus-visible { outline: none; box-shadow: var(--shadow-focus); }

.rk-num { font-variant-numeric: tabular-nums; }
.rk-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---- app shell ----------------------------------------------------------------------------- */
/* Gentelella's shell (#276): a fixed sidebar, a fixed topbar, and the page beside and below them. The
   sidebar collapses to a 64px rail (html.rk-rail, kept in a cookie like the theme) and slides in over
   the page on a phone (.rk-sidebar.is-open, behind a backdrop). */
.rk-shell { min-height: 100vh; background: var(--surface-app); }
.rk-shell-frame { min-height: 100vh; background: var(--surface-app); }

.rk-main {
    margin-inline-start: var(--sidebar-width);
    padding-top: var(--topbar-height);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin var(--duration-slow) var(--ease-standard);
}

/* The page itself: a column of header, cards and tables with the grid gap between them. */
.rk-page {
    flex: 1;
    min-width: 0;
    padding: var(--main-padding);
    display: flex;
    flex-direction: column;
    gap: var(--grid-gap);
}

.rk-footer {
    display: flex;
    justify-content: space-between;
    gap: var(--space-4);
    flex-wrap: wrap;
    padding: var(--space-4) var(--space-6);
    font-size: 14.5px;
    color: var(--ink-muted);
    border-top: 1px solid var(--border-color-light);
}

.rk-sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 95;
    background: var(--overlay-scrim);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}
.rk-sidebar-backdrop[hidden] { display: none; }

/* ---- sidebar ------------------------------------------------------------------------------- */
.rk-sidebar {
    position: fixed;
    inset-inline-start: 0; top: 0; bottom: 0;
    z-index: 100;
    width: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    overflow: hidden;
    transition: width var(--duration-slow) var(--ease-standard), transform var(--duration-slow) var(--ease-standard);
}

.rk-sidebar-brand {
    height: var(--topbar-height);
    padding: 0 var(--space-4);
    display: flex;
    align-items: center;
    gap: var(--space-2-5);
    border-bottom: 1px solid var(--sidebar-border);
    flex-shrink: 0;
}

/* The Rukukwe logo (#430, the design's mark): a white R on dark teal, the same image wherever the brand is drawn. */
.rk-brand-icon, .rk-auth-brand-icon, .rk-loader-brand-icon {
    flex-shrink: 0;
    background: url('../../img/rukukwe-logo.png') center / cover no-repeat;
    overflow: hidden;
}
.rk-brand-icon { width: 34px; height: 34px; border-radius: 6px; display: inline-flex; }

.rk-sidebar-brand-name {
    flex: 1;
    min-width: 0;
    font: 600 18px/24px var(--font-sans);
    letter-spacing: -0.2px;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rk-sidebar-brand-logo { height: 28px; width: auto; max-width: 160px; object-fit: contain; }
.rk-sidebar-brand.has-logo > .rk-brand-icon { display: none; }

/* The menu is what scrolls on a short window, between the brand and the signed-in user, which stay put (#316); the wheel
   stops at its end rather than moving the page. It still scrolls (wheel, trackpad, touch, keyboard) but draws no bar (#162). */
.rk-sidebar-nav {
    flex: 1; min-height: 0; padding: var(--space-2) 0; display: flex; flex-direction: column;
    overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none;
}
.rk-sidebar-nav::-webkit-scrollbar { display: none; }

.rk-sidebar-foot { border-top: 1px solid var(--sidebar-border); padding: var(--space-2); flex-shrink: 0; }

/* The signed-in person: initials on the brand gradient, their name and role, and a way to another business. */
.rk-sidebar-user {
    display: flex;
    align-items: center;
    gap: var(--space-2-5);
    padding: var(--space-2);
    border-radius: var(--radius-sm);
    transition: background var(--duration-fast) var(--ease-standard);
}
.rk-sidebar-user:hover { background: var(--sidebar-hover); }

.rk-sidebar-user-avatar {
    position: relative;
    width: 32px; height: 32px;
    flex-shrink: 0;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary), var(--primary-dk));
    color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font: 600 14.5px/1 var(--font-sans);
    text-transform: uppercase;
}
.rk-sidebar-user-avatar::after {
    content: '';
    position: absolute; bottom: -1px; inset-inline-end: -1px;
    width: 8px; height: 8px;
    border-radius: var(--radius-full);
    background: var(--green);
    border: 2px solid var(--sidebar-bg);
}

.rk-sidebar-user-info { flex: 1; min-width: 0; }
.rk-sidebar-user-name { color: #fff; font: 500 15px/1.2 var(--font-sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
a.rk-sidebar-user-name { display: block; text-decoration: none; }
a.rk-sidebar-user-name:hover, a.rk-sidebar-user-name:focus-visible { text-decoration: underline; }
.rk-sidebar-user-role { margin-top: 2px; color: var(--sidebar-text); font: 400 13px/1.2 var(--font-sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.rk-sidebar-user-more {
    width: 24px; height: 24px;
    flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: var(--radius-sm);
    color: var(--sidebar-text);
    opacity: 0;
    transition: opacity var(--duration-fast) var(--ease-standard);
}
.rk-sidebar-user:hover .rk-sidebar-user-more, .rk-sidebar-user-more:focus-visible { opacity: 1; }
.rk-sidebar-user-more:hover { color: #fff; text-decoration: none; }

.rk-nav-group { padding: 0 var(--space-2); margin-bottom: var(--space-0-5); }

.rk-nav-overline {
    padding: var(--space-4) var(--space-3) var(--space-1);
    font: 600 12px/19px var(--font-sans);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: rgba(123, 143, 163, 0.5);
}

/* A group that opens and closes (#432): its overline is a button with a chevron, turned down while it is open. The
   brighter grey is the design's, so the heading a person can press reads at 4.5:1 on the navy. */
.rk-nav-group-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
    width: 100%;
    border: 0;
    background: transparent;
    color: #8d98a8;
    text-align: start;
    cursor: pointer;
}
.rk-nav-group-toggle:hover { color: var(--sidebar-text-hover); }
.rk-nav-group-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; border-radius: var(--radius-sm); }
.rk-nav-group-chevron { flex: none; transform: rotate(90deg); transition: transform var(--duration-fast) var(--ease-standard); }
.rk-nav-group.is-closed .rk-nav-group-chevron { transform: none; }
.rk-nav-group.is-closed .rk-nav-group-items { display: none; }
@media (prefers-reduced-motion: reduce) { .rk-nav-group-chevron { transition: none; } }

/* ---- nav item ------------------------------------------------------------------------------ */
.rk-nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-2-5);
    width: 100%;
    min-height: var(--nav-item-height);
    margin-bottom: 1px;
    padding: 6px var(--space-3);
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--sidebar-text);
    font: 400 15.5px/24px var(--font-sans);
    text-align: left;
    cursor: pointer;
    transition: background var(--duration-fast) var(--ease-standard),
                color var(--duration-fast) var(--ease-standard);
}

.rk-nav-item:hover { background: var(--sidebar-hover); color: var(--sidebar-text-hover); text-decoration: none; }
.rk-nav-item:focus-visible { box-shadow: none; outline: 2px solid var(--primary); outline-offset: -2px; }

.rk-nav-item.is-active {
    background: var(--sidebar-active);
    color: var(--sidebar-text-active);
    font-weight: 500;
}

/* Glyphs sit at half strength until the row is hovered or active. */
.rk-nav-item > .rk-icon { opacity: 0.5; }
.rk-nav-item:hover > .rk-icon, .rk-nav-item.is-active > .rk-icon { opacity: 0.85; }

.rk-nav-item-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.rk-nav-item-count {
    margin-inline-start: auto;
    padding: 1px 6px;
    border-radius: 3px;
    background: var(--primary-lt);
    color: var(--primary);
    font: 600 12px/1.6 var(--font-sans);
    font-variant-numeric: tabular-nums;
}

/* Expandable groups are <details>: no JavaScript, and they keep working under static rendering. */
.rk-nav-expander { display: block; }
.rk-nav-expander > summary { list-style: none; }
.rk-nav-expander > summary::-webkit-details-marker { display: none; }
.rk-nav-expander > summary .rk-nav-chevron { margin-inline-start: auto; opacity: 0.55; transition: transform var(--duration-base) var(--ease-standard), opacity var(--duration-fast); }
.rk-nav-expander > summary:hover .rk-nav-chevron { opacity: 0.9; }
.rk-nav-expander[open] > summary .rk-nav-chevron { transform: rotate(90deg); opacity: 1; }
.rk-nav-expander.has-active > summary { color: var(--sidebar-text-hover); }
.rk-nav-expander.has-active > summary > .rk-icon { opacity: 0.85; }

/* The sub-rows hang off a hairline, each with its own tick; the active tick turns teal and reaches further. */
.rk-nav-children { position: relative; display: flex; flex-direction: column; padding: var(--space-1) 0 var(--space-1) 28px; }
.rk-nav-children::before {
    content: '';
    position: absolute;
    inset-inline-start: 19px; top: var(--space-1); bottom: var(--space-1);
    width: 1px;
    background: rgba(255, 255, 255, 0.10);
}

.rk-nav-item--nested { position: relative; min-height: 0; margin: 1px 0; padding: 7px var(--space-3); font-size: 15px; }
.rk-nav-item--nested::before {
    content: '';
    position: absolute;
    inset-inline-start: -9px; top: 50%;
    width: 8px; height: 1px;
    background: var(--sidebar-border);
    transform: translateY(-50%);
    transition: background var(--duration-fast), width var(--duration-fast);
}
.rk-nav-item--nested:hover::before { background: rgba(255, 255, 255, 0.25); }
.rk-nav-item--nested.is-active::before { background: var(--primary); width: 12px; inset-inline-start: -13px; }

/* ---- top bar ------------------------------------------------------------------------------- */
/* Fixed beside the sidebar: the menu toggle and a breadcrumb on the left; the theme, sign out and who you are on the right. */
.rk-topbar {
    position: fixed;
    top: 0;
    inset-inline-start: var(--sidebar-width);
    inset-inline-end: 0;
    z-index: 90;
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: 0 var(--space-6);
    background: color-mix(in srgb, var(--bg-surface) 85%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: inset-inline-start var(--duration-slow) var(--ease-standard);
}

.rk-topbar-left, .rk-topbar-right { display: flex; align-items: center; min-width: 0; }
.rk-topbar-left { gap: var(--space-3); flex: 1; }
.rk-topbar-right { gap: 2px; }

.rk-tb-btn {
    width: 32px; height: 32px;
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--ink-secondary);
    cursor: pointer;
    transition: background var(--duration-fast) var(--ease-standard), color var(--duration-fast) var(--ease-standard);
}
.rk-tb-btn:hover { background: var(--body-bg); color: var(--ink); text-decoration: none; }
.rk-sidebar-toggle { width: 34px; height: 34px; }
.rk-sidebar-toggle > .rk-icon { transition: transform var(--duration-base) var(--ease-standard); }

/* The theme button shows the theme you would switch to. */
.rk-theme-toggle .rk-theme-icon-light { display: none; }
[data-theme="dark"] .rk-theme-toggle .rk-theme-icon-light { display: inline-block; }
[data-theme="dark"] .rk-theme-toggle .rk-theme-icon-dark { display: none; }

.rk-tb-avatar {
    width: 28px; height: 28px;
    margin-inline-start: 6px;
    flex-shrink: 0;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary), var(--primary-dk));
    color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font: 600 13px/1 var(--font-sans);
    text-transform: uppercase;
}

.rk-breadcrumb { display: flex; align-items: center; gap: var(--space-1); min-width: 0; font-size: 15.5px; color: var(--ink-muted); }
.rk-breadcrumb a { color: inherit; }
.rk-breadcrumb a:hover { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.rk-breadcrumb-sep { color: var(--ink-disabled); }
.rk-breadcrumb-current { color: var(--ink); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- page header --------------------------------------------------------------------------- */
/* What you are looking at: a small uppercase pretitle (the business, and on the dashboard the day), the title, a
   line under it when the page has one to say, and the page's main actions on the right. */
.rk-page-header { margin-bottom: var(--space-1); }
.rk-page-header-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-3); }
.rk-page-header-titles { min-width: 0; }

.rk-page-pretitle {
    margin-bottom: 2px;
    font: 600 13px/19px var(--font-sans);
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: var(--ink-muted);
}

.rk-page-title {
    margin: 0;
    font: var(--text-page-title);
    letter-spacing: var(--page-title-tracking);
    color: var(--ink);
}

.rk-page-subtitle { display: block; margin-top: 2px; font: var(--text-small); color: var(--ink-muted); }
.rk-page-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---- icon ---------------------------------------------------------------------------------- */
.rk-icon { flex-shrink: 0; display: inline-block; vertical-align: middle; color: currentColor; }

/* A soft-cornered tile: stat cards and activity rows sit their icon on a 6% tint of its colour. */
.rk-icon-well {
    width: var(--icon-well);
    height: var(--icon-well);
    flex-shrink: 0;
    border-radius: var(--radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.rk-icon-well--primary { background: var(--primary-lt); color: var(--primary); }
.rk-icon-well--success { background: var(--green-lt); color: var(--green); }
.rk-icon-well--danger { background: var(--red-lt); color: var(--red); }
.rk-icon-well--warning { background: var(--yellow-lt); color: var(--yellow); }
.rk-icon-well--info { background: var(--blue-lt); color: var(--blue); }
.rk-icon-well--purple { background: var(--purple-lt); color: var(--purple); }
.rk-icon-well--neutral { background: var(--neutral-soft); color: var(--neutral-ink); }

/* ---- button -------------------------------------------------------------------------------- */
.rk-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: var(--button-height-md);
    padding: 0 var(--space-3);
    font: 500 15px/1 var(--font-sans);
    white-space: nowrap;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--duration-fast) var(--ease-standard),
                border-color var(--duration-fast) var(--ease-standard),
                color var(--duration-fast) var(--ease-standard);
}

.rk-btn:hover { text-decoration: none; }
.rk-btn--sm { height: var(--button-height-sm); padding: 0 var(--space-2-5); font-size: 14.5px; }
.rk-btn--lg { height: var(--button-height-lg); padding: 0 var(--space-4); font-size: 16px; }
.rk-btn--block { display: flex; width: 100%; }

.rk-btn--primary { background: var(--primary); color: var(--ink-on-primary); border-color: var(--primary-dk); }
.rk-btn--primary:hover { background: var(--primary-dk); color: var(--ink-on-primary); }
.rk-btn--primary:active { background: var(--primary-dk); }

/* Secondary is Gentelella's outline button: a white surface with a hairline and the faintest shadow. */
.rk-btn--secondary { background: var(--surface-card); color: var(--ink-secondary); border-color: var(--border); box-shadow: var(--shadow-xs); }
.rk-btn--secondary:hover { background: var(--surface-sunken); color: var(--ink); }
.rk-btn--secondary:active { background: var(--surface-hover); }

.rk-btn--ghost { background: transparent; color: var(--ink-secondary); }
.rk-btn--ghost:hover { background: var(--surface-sunken); color: var(--ink); }

.rk-btn--soft { background: var(--primary-lt); color: var(--primary); border-color: var(--primary); }
.rk-btn--soft:hover { background: color-mix(in srgb, var(--primary) 14%, transparent); color: var(--primary); }

.rk-btn--inverse { background: var(--surface-inverse); color: var(--ink-inverse); }
.rk-btn--inverse:hover { background: var(--text-secondary); color: var(--ink-inverse); }

.rk-btn--success { background: var(--green); color: #FFFFFF; border-color: var(--green-dk); }
.rk-btn--success:hover { background: var(--green-dk); color: #FFFFFF; }

.rk-btn--danger { background: var(--danger); color: #FFFFFF; border-color: var(--red-dk); }
.rk-btn--danger:hover { background: var(--red-dk); color: #FFFFFF; }

.rk-btn:disabled,
.rk-btn[aria-disabled="true"] {
    background: var(--surface-sunken);
    color: var(--ink-disabled);
    border-color: var(--border);
    box-shadow: none;
    cursor: not-allowed;
}

.rk-btn--ghost:disabled { background: transparent; border-color: transparent; }

/* ---- icon button --------------------------------------------------------------------------- */
.rk-iconbtn {
    position: relative;
    width: var(--control-height-md);
    height: var(--control-height-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface-card);
    color: var(--ink-secondary);
    cursor: pointer;
    transition: background var(--duration-fast) var(--ease-standard);
}

.rk-iconbtn:hover { background: var(--surface-sunken); text-decoration: none; color: var(--ink-secondary); }
.rk-iconbtn--sm { width: var(--control-height-sm); height: var(--control-height-sm); }
.rk-iconbtn--lg { width: var(--control-height-lg); height: var(--control-height-lg); }
.rk-iconbtn--round { border-radius: var(--radius-full); }
.rk-iconbtn--ghost { border-color: transparent; background: transparent; }
.rk-iconbtn:disabled { color: var(--ink-disabled); cursor: not-allowed; }

.rk-iconbtn-dot {
    position: absolute;
    top: 8px; right: 9px;
    width: 7px; height: 7px;
    border-radius: var(--radius-full);
    background: var(--danger);
    box-shadow: 0 0 0 2px var(--surface-card);
}

/* ---- badge --------------------------------------------------------------------------------- */
/* A status is a dot and coloured text, never a filled pill (Gentelella). The dot is drawn here unless the
   markup placed one itself. */
.rk-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    white-space: nowrap;
    font: 500 14px/19px var(--font-sans);
    font-variant-numeric: tabular-nums;
    color: var(--neutral-ink);
}

.rk-badge:not(:has(> .rk-badge-dot))::before { content: ''; width: 6px; height: 6px; flex-shrink: 0; border-radius: 50%; background: currentColor; }
.rk-badge--sm { font-size: 13px; }
.rk-badge--primary { color: var(--primary); }
.rk-badge--success { color: var(--green); }
.rk-badge--danger { color: var(--red); }
.rk-badge--warning { color: var(--warning-ink); }
.rk-badge--warning::before, .rk-badge--warning > .rk-badge-dot { background: var(--yellow); }
.rk-badge--info { color: var(--blue); }
.rk-badge--neutral { color: var(--neutral-ink); }
.rk-badge-dot { width: 6px; height: 6px; border-radius: var(--radius-full); background: currentColor; }

/* ---- avatar -------------------------------------------------------------------------------- */
.rk-avatar {
    border-radius: var(--radius-full);
    flex-shrink: 0;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--neutral-soft);
    color: var(--neutral-ink);
    font-family: var(--font-sans);
    font-weight: 600;
    line-height: 1;
}

.rk-avatar img { width: 100%; height: 100%; object-fit: cover; }
/* Initials sit on a 135° gradient of one accent, as Gentelella's avatars do. */
.rk-avatar--tint-0 { background: linear-gradient(135deg, var(--primary), var(--primary-dk)); color: #fff; }
.rk-avatar--tint-1 { background: linear-gradient(135deg, var(--blue), var(--blue-dk)); color: #fff; }
.rk-avatar--tint-2 { background: linear-gradient(135deg, var(--green), var(--green-dk)); color: #fff; }
.rk-avatar--tint-3 { background: linear-gradient(135deg, var(--purple), var(--purple-dk)); color: #fff; }

.rk-avatar-group { display: inline-flex; align-items: center; }
.rk-avatar-group > .rk-avatar { margin-left: -8px; box-shadow: 0 0 0 2px var(--surface-app); }
.rk-avatar-group > .rk-avatar:first-child { margin-left: 0; }

/* ---- card ---------------------------------------------------------------------------------- */
.rk-card {
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.rk-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    min-height: 44px;
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--border-color-light);
}

.rk-card-heading { min-width: 0; display: flex; align-items: center; gap: var(--space-2); }
.rk-card-title { margin: 0; font: var(--text-section-title); color: var(--ink); }
.rk-card-subtitle { margin: 1px 0 0; font: 400 14px/19px var(--font-sans); color: var(--ink-muted); }
.rk-card-actions { display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap; }
.rk-card-body { padding: var(--card-padding); flex: 1; min-width: 0; }
.rk-card-body--flush { padding: 0; }

/* ---- form controls ------------------------------------------------------------------------- */
.rk-field { display: flex; flex-direction: column; gap: var(--space-1-5); min-width: 0; }
.rk-label { font: var(--text-caption-medium); font-size: 15.5px; color: var(--ink); }
.rk-label-optional { color: var(--ink-muted); font-weight: 400; }
.rk-hint { font: var(--text-caption); color: var(--ink-muted); }
.rk-error { font: var(--text-caption); color: var(--danger-ink); }

.rk-control {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    height: var(--control-height-md);
    padding: 0 var(--space-3);
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: border-color var(--duration-fast) var(--ease-standard);
}

.rk-control:focus-within { border-color: var(--primary); box-shadow: var(--shadow-focus); }
.rk-control.is-invalid { border-color: var(--danger); }
.rk-control--sm { height: var(--control-height-sm); }

.rk-control input,
.rk-control select,
.rk-control textarea {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    font: var(--text-body);
    color: var(--ink);
    padding: 0;
    box-shadow: none;
}

.rk-control input:disabled, .rk-control select:disabled { color: var(--ink-disabled); }
.rk-control:has(input:disabled), .rk-control:has(select:disabled) { background: var(--surface-sunken); }
.rk-control select { appearance: none; cursor: pointer; }
.rk-control textarea { resize: vertical; padding: var(--space-2) 0; }
.rk-control--area { height: auto; align-items: flex-start; }

.rk-kbd {
    font: var(--text-caption-medium);
    color: var(--ink-secondary);
    background: var(--surface-sunken);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1px var(--space-1-5);
}

/* Switch: a checkbox with the track drawn on its label. */
.rk-switch { display: inline-flex; align-items: center; cursor: pointer; }
.rk-switch input { position: absolute; opacity: 0; width: 0; height: 0; }

.rk-switch-track {
    position: relative;
    width: 36px;
    height: 20px;
    border-radius: var(--radius-full);
    background: var(--border-strong);
    transition: background var(--duration-fast) var(--ease-standard);
}

.rk-switch-track::after {
    content: '';
    position: absolute;
    top: 2px; left: 2px;
    width: 16px; height: 16px;
    border-radius: var(--radius-full);
    background: var(--surface-card);
    box-shadow: var(--shadow-xs);
    transition: transform var(--duration-fast) var(--ease-standard);
}

.rk-switch input:checked + .rk-switch-track { background: var(--primary); }
.rk-switch input:checked + .rk-switch-track::after { transform: translateX(16px); }
.rk-switch input:focus-visible + .rk-switch-track { box-shadow: var(--shadow-focus); }
.rk-switch--sm .rk-switch-track { width: 32px; height: 18px; }
.rk-switch--sm .rk-switch-track::after { width: 14px; height: 14px; }
.rk-switch--sm input:checked + .rk-switch-track::after { transform: translateX(14px); }

/* ---- table --------------------------------------------------------------------------------- */
.rk-table-wrap { width: 100%; overflow-x: auto; }
.rk-table { width: 100%; border-collapse: separate; border-spacing: 0; }

.rk-table thead th {
    background: var(--surface-sunken);
    font: 600 13px/19px var(--font-sans);
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: var(--ink-muted);
    text-align: left;
    padding: var(--space-2) var(--space-3);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.rk-table thead th:first-child { border-radius: var(--radius-lg) 0 0 var(--radius-lg); }
.rk-table thead th:last-child { border-radius: 0 var(--radius-lg) var(--radius-lg) 0; }

.rk-table tbody td {
    height: var(--table-row-height);
    padding: var(--space-2) var(--space-3);
    font-size: 15.5px;
    line-height: 21.5px;
    color: var(--ink);
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.rk-table tbody tr:last-child td { border-bottom: 0; }
.rk-table tbody tr:hover td { background: var(--surface-app); }
.rk-table .rk-cell-end { text-align: right; }
.rk-table .rk-cell-num, .rk-table thead th.rk-cell-num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---- tabs ---------------------------------------------------------------------------------- */
.rk-tabs {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    background: var(--surface-sunken);
    border-radius: var(--radius);
}

.rk-tab {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1-5);
    height: 28px;
    padding: 0 14px;
    border: 0;
    border-radius: calc(var(--radius) - 2px);
    background: transparent;
    color: var(--ink-secondary);
    font: 500 15px/33.5px var(--font-sans);
    cursor: pointer;
    white-space: nowrap;
    transition: background var(--duration-fast) var(--ease-standard);
}

.rk-tab:hover { color: var(--ink); text-decoration: none; }
.rk-tab.is-active { background: var(--surface-card); color: var(--ink); box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06); }

/* Gentelella's underlined tabs: a hairline under the row, the chosen tab in the primary with a 2px rule. */
.rk-tabs--underline { display: flex; gap: 4px; padding: 0; background: none; border-radius: 0; border-bottom: 1px solid var(--border-color-light); }
/* On a phone the row scrolls sideways rather than pushing the page wide. */
@media (max-width: 640px) {
    .rk-tabs--underline { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
    .rk-tabs--underline::-webkit-scrollbar { display: none; }
    .rk-tabs.rk-tabs--underline .rk-tab { flex: none; margin-bottom: 0; }
}
.rk-tabs--underline .rk-tab {
    height: auto; padding: 9px 14px 11px; margin-bottom: -1px; border-radius: 0; border-bottom: 2px solid transparent;
    font: 500 15.5px/21.5px var(--font-sans); color: var(--ink-muted); transition: color 100ms, border-color 100ms;
}
.rk-tabs--underline .rk-tab:hover { color: var(--ink); }
.rk-tabs--underline .rk-tab.is-active { background: none; box-shadow: none; color: var(--primary); border-bottom-color: var(--primary); }

/* ---- feedback ------------------------------------------------------------------------------ */
/* Gentelella's banner: a tinted fill with a tinted hairline, the glyph in the tone's colour, the words in ink. */
.rk-alert {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: var(--space-3) var(--space-4);
    border: 1px solid color-mix(in srgb, var(--primary) 18%, transparent);
    border-radius: var(--radius);
    font: var(--text-small);
    background: var(--primary-lt);
    color: var(--ink);
}

.rk-alert > .rk-icon { color: var(--primary); }
.rk-alert--danger { background: var(--red-lt); border-color: color-mix(in srgb, var(--red) 22%, transparent); }
.rk-alert--danger > .rk-icon { color: var(--red); }
.rk-alert--success { background: var(--green-lt); border-color: color-mix(in srgb, var(--green) 22%, transparent); }
.rk-alert--success > .rk-icon { color: var(--green); }
.rk-alert--warning { background: var(--yellow-lt); border-color: color-mix(in srgb, var(--yellow) 22%, transparent); }
.rk-alert--warning > .rk-icon { color: var(--yellow); }
.rk-alert--info { background: var(--blue-lt); border-color: color-mix(in srgb, var(--blue) 22%, transparent); }
.rk-alert--info > .rk-icon { color: var(--blue); }
.rk-alert--neutral { background: var(--neutral-soft); border-color: var(--border); }
.rk-alert--neutral > .rk-icon { color: var(--ink-muted); }
.rk-alert-body { flex: 1; min-width: 0; }
.rk-alert-title { font: 500 15.5px/21.5px var(--font-sans); margin: 0 0 2px; color: var(--ink); }
/* A platform administrator working inside a business (#271): pinned above the page, its Leave button in line. */
.rk-acting { align-items: center; margin-bottom: var(--space-4); }

/* A record read as label and value pairs (#271): the platform's view of a business. */
.rk-dl { display: grid; grid-template-columns: max-content 1fr; gap: var(--space-2) var(--space-6); margin: 0 0 var(--space-4); }
.rk-dl dt { font: var(--text-caption); color: var(--ink-muted); }
.rk-dl dd { margin: 0; font: var(--text-small); }

.rk-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: var(--space-12) var(--space-6);
    text-align: center;
    color: var(--ink-muted);
}

.rk-empty > .rk-icon-well { width: 48px; height: 48px; margin-bottom: var(--space-2); border-radius: 50%; }
.rk-empty-title { margin: 0; font: 500 17px/24px var(--font-sans); color: var(--ink); }
.rk-empty-body { font: 400 15px/1.5 var(--font-sans); color: var(--ink-muted); max-width: 320px; }

/* ---- utilities ----------------------------------------------------------------------------- */
.rk-row { display: flex; align-items: center; gap: var(--space-2); }
.rk-row--between { justify-content: space-between; }
.rk-col { display: flex; flex-direction: column; gap: var(--space-2); }
.rk-grid { display: grid; gap: var(--grid-gap); }
.rk-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.rk-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rk-spacer { flex: 1; }
.rk-muted { color: var(--ink-muted); }
.rk-secondary { color: var(--ink-secondary); }
.rk-small { font: var(--text-small); }
.rk-caption { font: var(--text-caption); }

/* ---- responsive ---------------------------------------------------------------------------- */
@media (max-width: 1100px) {
    .rk-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* The rail: the sidebar keeps its glyphs and drops its words; a hovered row says its name beside it. */
@media (min-width: 769px) {
    html.rk-rail { --sidebar-width: var(--sidebar-rail-width); }
    html.rk-rail .rk-sidebar, html.rk-rail .rk-sidebar-nav { overflow: visible; }
    html.rk-rail .rk-sidebar-brand { padding: 0; justify-content: center; }
    html.rk-rail .rk-sidebar-brand-name, html.rk-rail .rk-sidebar-brand-logo { display: none; }
    html.rk-rail .rk-sidebar-brand.has-logo > .rk-brand-icon { display: inline-flex; }
    html.rk-rail .rk-nav-overline { display: none; }
    html.rk-rail .rk-nav-group.is-closed .rk-nav-group-items { display: block; }
    html.rk-rail .rk-nav-item { position: relative; justify-content: center; gap: 0; padding: var(--space-2); }
    html.rk-rail .rk-nav-item-label, html.rk-rail .rk-nav-item-count, html.rk-rail .rk-nav-chevron { display: none; }
    html.rk-rail .rk-nav-children { display: none; }
    html.rk-rail .rk-sidebar-user { justify-content: center; }
    html.rk-rail .rk-sidebar-user-info, html.rk-rail .rk-sidebar-user-more { display: none; }
    html.rk-rail .rk-sidebar-toggle > .rk-icon { transform: rotate(180deg); }
    html.rk-rail .rk-nav-item[data-rail-label]::after {
        content: attr(data-rail-label);
        position: absolute;
        inset-inline-start: calc(100% + 12px); top: 50%;
        transform: translateY(-50%) translateX(-4px);
        padding: 5px 9px;
        border-radius: var(--radius-sm);
        background: var(--ink);
        color: var(--surface-card);
        font: 500 14px/19px var(--font-sans);
        white-space: nowrap;
        box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
        opacity: 0;
        pointer-events: none;
        transition: opacity var(--duration-fast), transform var(--duration-fast);
        z-index: 110;
    }
    html.rk-rail .rk-nav-item[data-rail-label]:hover::after,
    html.rk-rail .rk-nav-item[data-rail-label]:focus-visible::after { opacity: 1; transform: translateY(-50%) translateX(0); }
    .rk-sidebar-backdrop { display: none !important; }
}

/* A phone: the sidebar slides in over the page from the menu button, and the page takes the whole width. */
@media (max-width: 768px) {
    .rk-sidebar { transform: translateX(-100%); }
    .rk-sidebar.is-open { transform: translateX(0); }
    .rk-main { margin-inline-start: 0; }
    .rk-topbar { inset-inline-start: 0; padding: 0 var(--space-3); }
    .rk-topbar .rk-breadcrumb { display: none; }
    .rk-page { padding: var(--space-3); }
    .rk-footer { padding: var(--space-3); }
    body.rk-sidebar-open { overflow: hidden; }
    .rk-grid--4, .rk-grid--2 { grid-template-columns: minmax(0, 1fr); }
}

/* ---- standalone input ---------------------------------------------------------------------- */
/* For forms built with Blazor's InputText, where wrapping every control in .rk-control would mean
   a div per field. Same shell, applied to the element itself. */
.rk-input {
    width: 100%;
    height: var(--control-height-md);
    padding: 0 var(--space-3);
    background: var(--surface-card);
    color: var(--ink);
    font: var(--text-body);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: border-color var(--duration-fast) var(--ease-standard);
}

.rk-input::placeholder { color: var(--ink-disabled); }
.rk-input:focus { outline: none; border-color: var(--primary); box-shadow: var(--shadow-focus); }
.rk-input:disabled, .rk-input[readonly] { background: var(--surface-sunken); color: var(--ink-secondary); }
.rk-input.invalid { border-color: var(--danger); }

/* Blazor's own validation output, so forms report errors in the design's voice. */
.validation-message { display: block; font: var(--text-caption); color: var(--danger-ink); }
.valid.modified:not([type=checkbox]) { border-color: var(--border-strong); }
.invalid { border-color: var(--danger); }

/* ---- auth pages ------------------------------------------------------------------------------ */
/* Sign In v2 (#340): the form in a column of its own on the left, and from 960px a dark panel beside it saying what
   the product does. A wizard drops the panel and takes the window. */
.rk-auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr); background: var(--surface-card); color: var(--ink); }
.rk-auth-panel { display: flex; flex-direction: column; min-height: 100vh; box-sizing: border-box; }
.rk-auth-default { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rk-auth-progress { height: 4px; background: var(--surface-sunken); }
.rk-auth-progress > span { display: block; height: 100%; background: var(--primary); transition: width 240ms cubic-bezier(0.2, 0, 0, 1); }

.rk-auth-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; padding: 20px 40px 0; }
.rk-auth-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.rk-auth-brand-icon { width: 32px; height: 32px; border-radius: 7px; display: flex; }
.rk-auth-brand-name { font: 600 19px/24px var(--font-sans); letter-spacing: -0.2px; color: var(--ink); }
.rk-auth-back {
    width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface-card);
    color: var(--ink); display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0;
}
.rk-auth-back:hover { background: var(--surface-sunken); }
.rk-auth-back:focus-visible { outline: none; box-shadow: var(--shadow-focus); }

.rk-auth-middle { flex: 1; display: flex; justify-content: center; padding: 40px; }
.rk-auth-card {
    width: 100%; max-width: 400px; margin: auto 0; display: flex; flex-direction: column; gap: 22px;
    animation: rk-auth-in var(--duration-slow) var(--ease-standard) both;
}
.rk-auth-card--wide { max-width: 560px; }

@keyframes rk-auth-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.rk-auth-heading { display: flex; flex-direction: column; gap: 6px; }
.rk-auth-heading h1 { margin: 0; font: 700 31px/1.2 var(--font-sans); letter-spacing: -0.6px; color: var(--ink); }
.rk-auth-sub { margin: 0; font: var(--text-body); color: var(--ink-secondary); text-wrap: pretty; }
.rk-auth-sub strong { font-weight: 500; color: var(--ink); }
.rk-auth-hello { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }

.rk-auth-step {
    font: 600 13px/19px var(--font-sans);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-muted);
}

.rk-auth-fields { display: flex; flex-direction: column; gap: 18px; }
/* The design's inputs and buttons stand 44px tall here. */
.rk-auth .rk-control { min-height: 44px; }
.rk-auth .rk-btn--lg { min-height: 44px; }
.rk-auth-reveal { border: 0; background: none; padding: 0 2px; cursor: pointer; font: 500 15px/1 var(--font-sans); color: var(--primary); }
.rk-auth-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 15px; margin-top: -4px; }
.rk-auth-check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font: 400 15.5px/21.5px var(--font-sans); color: var(--ink); }
.rk-auth-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--primary); }
.rk-auth-link { border: 0; background: none; padding: 0; cursor: pointer; font: 500 15px/21.5px var(--font-sans); color: var(--primary); }
.rk-auth-link:hover { color: var(--primary-dk); text-decoration: underline; }
.rk-auth-aside { display: flex; flex-direction: column; gap: 4px; padding-top: 18px; border-top: 1px solid var(--border-color-light); font: 400 15.5px/1.5 var(--font-sans); color: var(--ink-secondary); }
.rk-auth-aside-title { font-weight: 600; color: var(--ink); }
.rk-auth-note { font: var(--text-caption); color: var(--ink-muted); text-align: center; text-wrap: pretty; }

.rk-auth-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; padding: 0 40px 20px; font: var(--text-caption); color: var(--ink-muted); }

.rk-auth-foot-links { display: flex; gap: var(--space-4); }
.rk-auth-foot-links a { color: inherit; text-decoration: none; }
.rk-auth-foot-links a:hover { color: var(--ink); text-decoration: underline; }
.rk-auth-check a { color: var(--primary); }

/* A page of fixed wording in the signed-out frame (#485, the privacy policy): headings, paragraphs and lists. */
.rk-legal { display: flex; flex-direction: column; gap: 14px; font: var(--text-body); color: var(--ink-secondary); }
.rk-legal h2 { margin: 14px 0 0; font: 600 20px/1.3 var(--font-sans); color: var(--ink); }
.rk-legal h3 { margin: 4px 0 0; font: 600 16px/1.4 var(--font-sans); color: var(--ink); }
.rk-legal p { margin: 0; text-wrap: pretty; }
.rk-legal ul { margin: 0; padding-inline-start: 20px; display: flex; flex-direction: column; gap: 6px; }
.rk-legal strong { font-weight: 600; color: var(--ink); }
.rk-legal a { color: var(--primary); }

/* A message inside the form: the reason a sign-in was refused, or the note that an email is
   already taken. Tone carries the meaning and the icon repeats it. */
.rk-auth-msg {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px 12px;
    border-radius: var(--radius-lg);
    font: var(--text-small);
}

.rk-auth-msg--danger { background: var(--danger-soft); color: var(--danger-ink); }
.rk-auth-msg--warning { background: var(--warning-soft); color: var(--warning-ink); }
.rk-auth-msg--success { background: var(--success-soft); color: var(--success-ink); }
.rk-auth-msg-body { flex: 1; display: flex; flex-direction: column; gap: var(--space-2); }

/* Confirming a signup's email with a code (#358). Without script the code is one wide field; portal.js marks the box
   is-enhanced, lays the field invisibly over six boxes and fills them as the digits are typed. */
.rk-auth-badge { width: 44px; height: 44px; border-radius: 8px; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; background: var(--primary-lt); color: var(--primary); }
.rk-otp-live, .rk-otp-expired { display: flex; flex-direction: column; gap: 14px; }
.rk-otp-live[hidden], .rk-otp-expired[hidden] { display: none; }
.rk-otp { position: relative; }
.rk-otp-input {
    box-sizing: border-box; width: 100%; height: 54px; padding: 0 14px; border: 1px solid var(--border-color); border-radius: 6px;
    background: var(--surface-card); color: var(--ink); font: 700 26.5px/1 var(--font-sans); letter-spacing: 0.5em; text-align: center;
    font-variant-numeric: tabular-nums; outline: none;
}
.rk-otp-input:focus { border-color: var(--primary); box-shadow: var(--shadow-focus); }
.rk-otp-input.is-invalid { border-color: var(--danger); }
.rk-otp-boxes { display: none; }
.rk-otp.is-enhanced .rk-otp-input { position: absolute; inset: 0; height: 100%; opacity: 0; caret-color: transparent; cursor: text; font-size: 19px; }
.rk-otp.is-enhanced .rk-otp-boxes { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.rk-otp-box {
    height: 54px; border-radius: 6px; border: 1px solid var(--border-color); background: var(--surface-card);
    display: flex; align-items: center; justify-content: center; font: 700 26.5px/1 var(--font-sans); color: var(--ink);
    font-variant-numeric: tabular-nums; transition: border-color 120ms, box-shadow 120ms;
}
.rk-otp-box.is-filled { border-color: var(--ink-muted); }
.rk-otp-box.is-current { border-color: var(--primary); box-shadow: var(--shadow-focus); }
.rk-otp.is-invalid .rk-otp-box { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.rk-otp-timer { display: flex; flex-direction: column; gap: 8px; font: 400 15px/21.5px var(--font-sans); }
.rk-otp-timer-text { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-secondary); white-space: nowrap; }
.rk-otp-timer-text strong { font-variant-numeric: tabular-nums; }
.rk-otp-timer-text.is-low { color: var(--danger-ink); }
.rk-otp-timer-bar { display: block; height: 4px; border-radius: 2px; background: var(--surface-sunken); overflow: hidden; }
.rk-otp-timer-bar > span { display: block; height: 100%; border-radius: 2px; background: var(--primary); transition: width 1s linear; }
.rk-otp-timer-bar > span.is-low { background: var(--danger); }
@media (prefers-reduced-motion: reduce) { .rk-otp-timer-bar > span, .rk-otp-box { transition: none; } }

/* A work email at a domain a business has claimed (#369): the business as a card, a note for its admins, and what
   happens next once asked. */
.rk-auth-badge--info { background: var(--info-soft); color: var(--info-ink); }
.rk-auth-badge--success { background: var(--success-soft); color: var(--success-ink); }
.rk-auth textarea.rk-input { height: auto; min-height: 64px; padding: 10px var(--space-3); resize: vertical; }
.rk-auth-org { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--border-color); border-radius: 8px; background: var(--surface-card); }
.rk-auth-org-mark { flex: 0 0 40px; height: 40px; border-radius: 8px; display: flex; align-items: center; justify-content: center; background: var(--primary); color: var(--ink-on-primary); font: 700 17px/1 var(--font-sans); }
.rk-auth-org-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rk-auth-org-name { font: 700 17px/24px var(--font-sans); color: var(--ink); }
.rk-auth-org-meta { font: 400 15px/21.5px var(--font-sans); color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rk-auth-next { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.rk-auth-next li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; align-items: start; font: 400 15.5px/21.5px var(--font-sans); color: var(--ink-secondary); }
.rk-auth-next li > span:last-child { padding-top: 3px; }
.rk-auth-next-n { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--surface-sunken); color: var(--ink-muted); font: 700 13px/1 var(--font-sans); }
.rk-auth-next li.is-done .rk-auth-next-n { background: var(--success-soft); color: var(--success-ink); }

/* The email carried into the second step, with a way back to change it. */
.rk-auth-email {
    display: flex;
    align-items: center;
    gap: 10px;
    height: var(--control-height-md);
    padding: 0 6px 0 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface-app);
}

.rk-auth-email-value {
    flex: 1;
    min-width: 0;
    font: var(--text-body);
    color: var(--ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Password strength: four bars that fill as the password improves. */
.rk-strength { display: flex; flex-direction: column; gap: var(--space-2); }
.rk-strength-bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-1); }
.rk-strength-bar { height: 4px; border-radius: var(--radius-full); background: var(--border); transition: background var(--duration-base) var(--ease-standard); }
.rk-strength-bar.is-weak { background: var(--danger); }
.rk-strength-bar.is-fair { background: var(--warning); }
.rk-strength-bar.is-good { background: var(--success); }
.rk-strength-label { font: var(--text-caption); color: var(--ink-muted); }

/* Choosing between clinics when an account opens more than one. */
.rk-clinics { display: flex; flex-direction: column; gap: 8px; }

.rk-clinic {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-card);
    cursor: pointer;
    text-align: left;
    width: 100%;
    font-family: var(--font-sans);
    transition: background var(--duration-fast) var(--ease-standard);
}

.rk-clinic:hover { background: var(--surface-app); }
.rk-clinic:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.rk-clinic-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rk-clinic-name { font: 600 17px/24px var(--font-sans); color: var(--ink); }
.rk-clinic-meta { font: var(--text-caption); color: var(--ink-muted); }

/* The dark panel (#340): kept in view while the form scrolls, the sample day in it, and the product line in a frosted
   box at the foot. Fixed copy: the page is anonymous, so nothing here is or could be a real tenant's data. */
.rk-auth-art { display: none; }
.rk-auth-art-frame {
    position: sticky; top: 16px; height: calc(100vh - 32px); border-radius: 12px; overflow: hidden; box-sizing: border-box;
    background: radial-gradient(ellipse 70% 60% at 30% 25%, rgba(26, 187, 156, 0.22), transparent), var(--sidebar-bg);
    display: flex; align-items: center; justify-content: center; padding: 48px 48px 200px;
}
.rk-auth-art .rk-preview-card { width: 100%; max-width: 400px; transform: rotate(-1.5deg); box-shadow: 0 24px 48px rgba(0, 0, 0, 0.28); }
.rk-auth-art-caption {
    position: absolute; left: 24px; right: 24px; bottom: 48px; max-width: 380px; padding: 18px 20px; border-radius: 8px;
    background: rgba(26, 35, 50, 0.86); color: #fff; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.rk-auth-art-title { font: 700 21.5px/1.3 var(--font-sans); letter-spacing: -0.2px; }
.rk-auth-art-text { margin-top: 6px; font: 400 15.5px/1.5 var(--font-sans); color: rgba(255, 255, 255, 0.8); }

.rk-preview-card {
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xs);
    padding: var(--space-5);
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.rk-preview-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding-bottom: var(--space-3); }
.rk-preview-title { display: flex; align-items: center; gap: var(--space-2); font: 600 19px/29px var(--font-sans); color: var(--ink); }
.rk-preview-date { font: var(--text-caption); color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.rk-preview-row { display: flex; align-items: center; gap: var(--space-3); padding: 10px 0; border-top: 1px solid var(--border); }
.rk-preview-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rk-preview-client { font: 500 15.5px/21.5px var(--font-sans); color: var(--ink); }
.rk-preview-service { font: var(--text-caption); color: var(--ink-muted); }
.rk-preview-time { font: var(--text-small); color: var(--ink-secondary); font-variant-numeric: tabular-nums; }

@media (min-width: 960px) {
    .rk-auth--art { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .rk-auth--art .rk-auth-art { display: block; position: relative; min-height: 100vh; padding: 16px; box-sizing: border-box; }
}
@media (max-width: 599px) {
    .rk-auth-top { padding: 20px 20px 0; }
    .rk-auth-middle { padding: 28px 20px; }
    .rk-auth-foot { padding: 0 20px 20px; }
}
@media (prefers-reduced-motion: reduce) {
    .rk-auth-card { animation: none; }
    .rk-auth-progress > span { transition: none; }
}

/* ---- dashboard ------------------------------------------------------------------------------ */
/* A stat card (#276): a tinted icon tile, an uppercase label, the figure, a line of detail, and sometimes a thin
   progress bar beneath the row. */
.rk-stat { padding: 0; }
.rk-stat-row { display: flex; align-items: center; gap: 14px; padding: var(--space-4); }
.rk-stat-body { flex: 1; min-width: 0; }

.rk-stat-label {
    font: 500 14px/1.3 var(--font-sans);
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: var(--ink-muted);
}

.rk-stat-value {
    font: var(--text-stat-value);
    letter-spacing: var(--stat-value-tracking);
    color: var(--ink);
}

.rk-stat-hint {
    margin-top: 2px;
    font: 400 13px/17px var(--font-sans);
    color: var(--ink-muted);
    overflow-wrap: anywhere;
}

.rk-stat-progress { padding: 0 var(--space-4) var(--space-3); }
.rk-progress { height: 5px; border-radius: 3px; background: var(--surface-sunken); overflow: hidden; }
.rk-progress-bar { height: 100%; border-radius: 3px; background: var(--primary); transition: width var(--duration-base) var(--ease-standard); }
.rk-progress-bar--success { background: var(--green); }
.rk-progress-bar--danger { background: var(--red); }
.rk-progress-bar--warning { background: var(--yellow); }
.rk-progress-bar--info { background: var(--blue); }
.rk-progress-bar--purple { background: var(--purple); }

/* The next seven days: one row per day, a thin bar for its share of the busiest day, and the count. Each row is
   a link to that day's calendar, so the chart is navigation rather than decoration. */
.rk-bars {
    display: flex;
    flex-direction: column;
    gap: var(--space-2-5);
}

.rk-bar {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr) 24px;
    align-items: center;
    gap: var(--space-2-5);
    font-size: 14.5px;
    color: inherit;
    text-decoration: none;
    border-radius: var(--radius-sm);
}

.rk-bar:hover { text-decoration: none; }
.rk-bar:hover .rk-bar-label { color: var(--primary); }
.rk-bar:focus-visible { outline: none; box-shadow: var(--shadow-focus); }

.rk-bar-track {
    display: block;
    height: 4px;
    border-radius: 2px;
    background: var(--surface-sunken);
    overflow: hidden;
}

.rk-bar-fill {
    display: block;
    height: 100%;
    border-radius: 2px;
    background: var(--primary);
    transition: width var(--duration-base) var(--ease-standard);
}

.rk-bar-count { text-align: right; font-weight: 600; color: var(--ink); }
.rk-bar-label { color: var(--ink-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Three tiles across, and the two-then-one split the dashboard's lower half uses. */
.rk-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rk-grid--2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }

/* Padding for a flush card that needs it back on one side only. */
.rk-card-pad { padding: var(--card-padding); }
.rk-card-pad-x { padding: 0 var(--card-padding) var(--card-padding); }

@media (max-width: 1100px) {
    .rk-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rk-grid--2-1 { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
    .rk-grid--3 { grid-template-columns: minmax(0, 1fr); }
}

/* ---- calendar ------------------------------------------------------------------------------- */
/* Filters sit in the card's heading slot, so the controls belong to the grid they change. */
.rk-filters {
    display: flex;
    align-items: flex-end;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.rk-field--inline { gap: var(--space-1); }
.rk-field--inline .rk-label { font: var(--text-caption); color: var(--ink-muted); }
.rk-input--sm { height: var(--control-height-sm); padding: 0 var(--space-2-5); font-size: 15.5px; }
select.rk-input { cursor: pointer; }

/* The calendar (#280, the Gentelella "Calendar" screen): a toolbar, then a time grid with a time gutter and one
   column per practitioner (day) or per day (week), 52px an hour, with hour rules drawn as a repeating gradient.
   Blocks sit in lanes beside the bookings they overlap and take their practitioner's colour (--who); cancelled and
   missed ones fade. A red line marks now on today's column. */
.rk-cal { padding: 0; overflow: hidden; }
.rk-cal-bar {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px;
    border-bottom: 1px solid var(--border-color-light);
}
.rk-cal-nav { display: flex; gap: 6px; }
.rk-cal-title { margin: 0; font: 600 17px/24px var(--font-sans); color: var(--ink); }
.rk-cal-views { margin-inline-start: auto; }
.rk-cal-filters { flex-basis: 100%; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rk-cal-filters > .rk-input { width: auto; min-width: 130px; }
.rk-flip { transform: scaleX(-1); }
.rk-cal-scroll { overflow-x: auto; }
.rk-cal-grid { min-width: 760px; }
.rk-cal-head, .rk-cal-body { display: grid; grid-template-columns: 56px repeat(var(--cal-cols), minmax(0, 1fr)); }
.rk-cal-head { border-bottom: 1px solid var(--border); }
.rk-cal-colhead {
    display: flex; flex-direction: column; min-width: 0; padding: 8px 10px;
    border-inline-start: 1px solid var(--border-color-light); color: var(--ink); text-decoration: none;
}
a.rk-cal-colhead:hover { background: var(--surface-sunken); color: var(--ink); }
.rk-cal-colhead.is-today { background: var(--primary-lt); }
.rk-cal-top { font: 600 13px/19px var(--font-sans); letter-spacing: 0.4px; text-transform: uppercase; color: var(--ink-muted); }
.rk-cal-label { display: flex; align-items: center; gap: 6px; min-width: 0; font: 600 18px/24px var(--font-sans); }
.rk-cal-colhead.is-today .rk-cal-label { color: var(--primary); }
.rk-day-colname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-cal-label .rk-caption { margin-left: auto; font-weight: 500; }
.rk-cal-swatch { width: 10px; height: 10px; flex: none; border-radius: 2px; }
.rk-cal-gutter { display: flex; flex-direction: column; }
.rk-cal-hour {
    height: 52px; padding: 0 8px; box-sizing: border-box; text-align: end; transform: translateY(-7px);
    font: 400 13px/17px var(--font-sans); color: var(--ink-muted);
}
.rk-cal-hour:first-child { visibility: hidden; }
.rk-cal-col {
    position: relative; height: var(--cal-height); border-inline-start: 1px solid var(--border-color-light);
    background-image: repeating-linear-gradient(to bottom, var(--border-color-light) 0, var(--border-color-light) 1px, transparent 1px, transparent 52px);
}
.rk-event {
    --who: var(--primary);
    position: absolute; box-sizing: border-box; overflow: hidden; padding: 4px 6px; border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--who) 8%, var(--surface-card)); border-inline-start: 3px solid var(--who);
    color: var(--ink); text-decoration: none; transition: box-shadow 120ms var(--ease);
}
.rk-event:hover { color: var(--ink); box-shadow: var(--shadow-sm); }
.rk-event:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.rk-event.is-open { box-shadow: 0 0 0 2px var(--surface-card), 0 0 0 4px var(--who); z-index: 1; }
.rk-event.is-faded { opacity: 0.5; }
.rk-event.is-cancelled .rk-event-head { text-decoration: line-through; }
.rk-event.is-short { padding-block: 2px; }
.rk-event.is-short .rk-event-what { display: none; }
.rk-event-head { display: block; font: 600 14px/18px var(--font-sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rk-event-what { display: block; font: 400 13px/17px var(--font-sans); color: var(--ink-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rk-cal-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--red); z-index: 2; pointer-events: none; }
.rk-cal-now::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
.rk-cal-legend {
    display: flex; gap: 16px; flex-wrap: wrap; padding: 10px 16px; border-top: 1px solid var(--border-color-light);
    font: 400 14px/19px var(--font-sans); color: var(--ink-muted);
}
.rk-cal-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.rk-cal .rk-month { border-top: 0; }
.rk-cal > .rk-empty { padding: 48px 16px; }

/* The action row under an appointment's detail: each action is its own form, so they lay out as a
   row of buttons rather than as a stack of forms. */
.rk-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
    margin-top: var(--space-5);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border);
}

.rk-cancel { display: flex; align-items: center; gap: var(--space-2); margin-left: auto; }
.rk-cancel .rk-input { width: 200px; }
.rk-cancel .rk-input--amount { width: 120px; }

.rk-total { border-top: 1px solid var(--border); padding-top: var(--space-2); }
.rk-mt-4 { margin-top: var(--space-4); }
.rk-mb-3 { margin-bottom: var(--space-3); }

@media (max-width: 900px) {
    .rk-week { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rk-cancel { margin-left: 0; width: 100%; }
    .rk-cancel .rk-input { flex: 1; width: auto; }
}

/* ---- reschedule ----------------------------------------------------------------------------- */
/* A strip of days to choose from, scrolling sideways rather than wrapping, so the shape of the
   choice stays the same however many days are offered. */
.rk-daypicker {
    display: flex;
    gap: var(--space-2);
    overflow-x: auto;
    padding-bottom: var(--space-2);
    scrollbar-width: thin;
}

.rk-daypick {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    width: 58px;
    padding: var(--space-2) 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-card);
    color: var(--ink);
    text-decoration: none;
    transition: border-color var(--duration-fast) var(--ease-standard);
}

.rk-daypick:hover { border-color: var(--primary); }
.rk-daypick:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.rk-daypick.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }
.rk-daypick.is-active .rk-daypick-date { color: #fff; }
.rk-daypick-dow { font: 600 12.5px/17px var(--font-sans); text-transform: uppercase; letter-spacing: 0.4px; }
.rk-daypick-date { font: 600 21.5px/26.5px var(--font-sans); letter-spacing: -0.4px; color: inherit; }
.rk-daypick-month { font: 400 13px/17px var(--font-sans); }

/* The free windows. Each is its own form so pressing one commits that time and nothing else. */
.rk-slots { display: flex; flex-wrap: wrap; gap: var(--space-2); }

.rk-slot {
    height: 32px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    background: var(--surface-card);
    color: var(--ink);
    font: var(--text-caption-medium);
    font-size: 15.5px;
    cursor: pointer;
    transition: border-color var(--duration-fast) var(--ease-standard), background var(--duration-fast) var(--ease-standard);
}

.rk-slot:hover { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-soft-ink); }
.rk-slot:focus-visible { outline: none; box-shadow: var(--shadow-focus); }

/* ---- catalog forms (#50) -------------------------------------------------------------------- */
/* Selects and text areas wear the input's dress; a form lays its fields out in a two-column grid
   that collapses on a narrow screen. */
select.rk-input, textarea.rk-input { width: 100%; }
textarea.rk-input { min-height: 88px; height: auto; padding-top: var(--space-2); padding-bottom: var(--space-2); resize: vertical; }

.rk-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-4) var(--space-5);
}

.rk-form-grid .rk-span-2 { grid-column: span 2; }

.rk-form-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-top: var(--space-6);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border);
}

.rk-form-actions .rk-push { margin-left: auto; }

/* A row of checkbox choices: a practitioner or a service to tick, with a price beside it. */
.rk-choice-list { display: flex; flex-direction: column; gap: var(--space-2); }

.rk-choice {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) 140px;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface-card);
}

.rk-choice input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }
.rk-choice-label { font: var(--text-small); color: var(--ink); cursor: pointer; }
.rk-choice-label .rk-muted { display: block; font: var(--text-caption); }

/* The week editor: seven rows of day, closed switch, open and close times. */
.rk-week-editor { display: flex; flex-direction: column; gap: var(--space-2); }

.rk-week-row {
    display: grid;
    grid-template-columns: 110px auto minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.rk-week-row .rk-day-name { font: var(--text-small); font-weight: 500; }
.rk-week-row.is-closed .rk-day-name { color: var(--ink-muted); }
.rk-week-row .rk-time-label { font: var(--text-caption); color: var(--ink-muted); }
input[type="time"].rk-input, input[type="date"].rk-input, input[type="datetime-local"].rk-input { font-variant-numeric: tabular-nums; }

/* A table row's trailing actions. */
.rk-table .rk-cell-actions { text-align: right; white-space: nowrap; }
.rk-table .rk-cell-actions .rk-btn { margin-left: var(--space-1); }
.rk-table tbody tr.is-inactive td { color: var(--ink-muted); }

@media (max-width: 760px) {
    .rk-form-grid { grid-template-columns: minmax(0, 1fr); }
    .rk-form-grid .rk-span-2 { grid-column: span 1; }
    .rk-choice { grid-template-columns: auto minmax(0, 1fr); }
    .rk-choice .rk-input { grid-column: span 2; }
    .rk-week-row { grid-template-columns: minmax(0, 1fr) auto; }
    .rk-week-row .rk-time-label, .rk-week-row .rk-input { grid-column: span 1; }
}

/* ---- clients and the appointment list (#51) ------------------------------------------------- */
/* Where a booking came from: an icon and a word, quieter than a status badge. */
.rk-channel-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font: var(--text-caption);
    color: var(--ink-secondary);
    white-space: nowrap;
}

/* The search box leads a filter row and takes the room the other controls leave. */
.rk-search-field { flex: 1 1 260px; min-width: 200px; }
.rk-search-field .rk-control input { font-size: 15.5px; }
.rk-search-field input[type="search"]::-webkit-search-cancel-button { cursor: pointer; }

/* The list's filters wrap onto a second line on anything narrower than a wide screen. */
.rk-filters--list { width: 100%; }
.rk-card-heading:has(> .rk-filters--list) { flex: 1 1 100%; }

/* A row of toggle pills: checkboxes that read as chips, several on at once. */
.rk-pills { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1); border: 0; margin: 0; padding: 0; min-width: 0; }
.rk-pills legend { float: left; margin-right: var(--space-2); font: var(--text-caption); color: var(--ink-muted); }

.rk-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 28px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    background: var(--surface-card);
    font: var(--text-caption);
    color: var(--ink-secondary);
    cursor: pointer;
    user-select: none;
}

.rk-pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rk-pill:hover { border-color: var(--border-strong); }
.rk-pill:focus-within { box-shadow: var(--shadow-focus); }
.rk-pill:has(input:checked) { background: var(--neutral-soft); color: var(--neutral-ink); border-color: transparent; }
.rk-pill--primary:has(input:checked) { background: var(--primary-soft); color: var(--primary-soft-ink); }
.rk-pill--success:has(input:checked) { background: var(--success-soft); color: var(--success-ink); }
.rk-pill--danger:has(input:checked)  { background: var(--danger-soft); color: var(--danger-ink); }
.rk-pill--warning:has(input:checked) { background: var(--warning-soft); color: var(--warning-ink); }

/* Previous and next under a paged list. */
.rk-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.rk-pagination { display: inline-flex; align-items: center; gap: 2px; }
.rk-page-btn {
    min-width: 30px; height: 30px; padding: 0 8px; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-card);
    font: 500 15px/1 var(--font-sans); color: var(--ink-secondary); text-decoration: none; transition: background 100ms, color 100ms;
}
a.rk-page-btn:hover { background: var(--surface-sunken); color: var(--ink); }
.rk-page-btn.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }
.rk-page-btn.is-disabled { opacity: 0.45; }
.rk-page-ellipsis { padding: 0 4px; font-size: 14.5px; color: var(--ink-disabled); }
.rk-spacer { flex: 1; }

/* The row whose appointment is open in the panel. */
.rk-table tbody tr.is-open td { background: var(--primary-soft); }

/* A read-only form keeps its layout; the browser greys the controls. */
.rk-fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }

/* ---- staff booking (#51; the Gentelella "New appointment" screen, #282) ------------------------------- */
/* The stepper and what has been chosen so far, each with a way back to change it. */
.rk-book-progress { padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.rk-stepper { display: flex; align-items: flex-start; width: 100%; margin: 0; padding: 0; list-style: none; }
.rk-stepper-step { display: flex; flex-direction: column; align-items: center; gap: 6px; flex-shrink: 0; min-width: 80px; }
.rk-stepper-num {
    position: relative; width: 30px; height: 30px; box-sizing: border-box; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: var(--surface-card); border: 1.5px solid var(--border); font: 600 14.5px/1 var(--font-sans); color: var(--ink-muted);
}
.rk-stepper-label { font: 500 14px/19px var(--font-sans); color: var(--ink-muted); text-align: center; }
.rk-stepper-step.is-done .rk-stepper-num { background: var(--primary); border-color: var(--primary); color: #fff; }
.rk-stepper-step.is-active .rk-stepper-num { border-color: var(--primary); color: var(--primary); box-shadow: 0 0 0 4px var(--primary-lt); }
.rk-stepper-step:is(.is-done, .is-active) .rk-stepper-label { color: var(--ink); }
.rk-stepper-line { flex: 1 1 auto; height: 2px; min-width: 16px; margin: 15px 4px 0; background: var(--border); transition: background 120ms; }
.rk-stepper-line.is-done { background: var(--primary); }
.rk-book-summary {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 0;
    padding-top: 12px; border-top: 1px solid var(--border-color-light);
}
.rk-book-summary dt { font: 400 13px/19px var(--font-sans); color: var(--ink-muted); }
.rk-book-summary dd { margin: 0; font: 600 15.5px/21.5px var(--font-sans); color: var(--ink); }
.rk-book-summary dd.rk-muted { color: var(--ink-muted); }
.rk-book-summary .rk-caption { font-size: 14.5px; }

/* Things to choose: cards in a grid, each a whole link; the service list is rows with a tick. */
.rk-book-search { margin-bottom: 10px; }
.rk-pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.rk-pick {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px; min-width: 0;
    border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-card);
    color: var(--ink); text-decoration: none; transition: border-color 120ms var(--ease), background 120ms var(--ease);
}
.rk-pick--lg { gap: 12px; padding: 14px; }
.rk-pick:hover { border-color: var(--primary); background: var(--primary-lt); color: var(--ink); text-decoration: none; }
.rk-pick:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.rk-pick-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rk-pick-name { font: 500 15.5px/21.5px var(--font-sans); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-pick--lg .rk-pick-name { font-weight: 600; }
.rk-pick-aside { white-space: nowrap; }
.rk-pick-any {
    width: 32px; height: 32px; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-dk)); color: #fff; font: 600 13px/1 var(--font-sans);
}
.rk-svc-list { display: flex; flex-direction: column; margin-top: -8px; }
.rk-svc-group { margin: var(--space-3) 0 0; }
.rk-svc-row {
    display: grid; grid-template-columns: 24px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 11px 0;
    border-bottom: 1px solid var(--border-color-light); color: var(--ink); text-decoration: none;
}
.rk-svc-row:hover { color: var(--ink); text-decoration: none; }
.rk-svc-row:hover .rk-svc-tick { border-color: var(--primary); }
.rk-svc-row:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.rk-svc-tick {
    display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; box-sizing: border-box;
    border: 1.5px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface-card); color: transparent;
}
.rk-svc-row.is-selected .rk-svc-tick { border-color: var(--primary); background: var(--primary); color: #fff; }
.rk-svc-price { min-width: 72px; text-align: end; font: 600 15.5px/21.5px var(--font-sans); color: var(--ink); white-space: nowrap; }
.rk-pick-total { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 14px; }
.rk-btn.is-disabled { opacity: 0.5; pointer-events: none; }
.rk-durations { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; }
.rk-durations .rk-field--inline { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* Free times, as pills with who takes each, then the notes and the booking. */
.rk-book-times { display: flex; flex-direction: column; gap: 14px; }
.rk-book-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 14px; border-top: 1px solid var(--border-color-light); }
.rk-slots { border: 0; margin: 0; padding: 0; min-width: 0; }
.rk-slot-choice { position: relative; }
.rk-slot-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rk-slot-choice .rk-slot { display: inline-flex; align-items: baseline; gap: 6px; line-height: 36px; }
.rk-slot-choice .rk-slot .rk-caption { color: inherit; opacity: 0.8; font-size: 14px; font-weight: 400; }
.rk-slot-choice input:checked + .rk-slot { border-color: var(--primary); background: var(--primary-lt); color: var(--primary); }
.rk-slot-choice input:focus-visible + .rk-slot { box-shadow: var(--shadow-focus); }

@media (max-width: 640px) {
    .rk-search-field { flex-basis: 100%; }
    .rk-stepper-step { min-width: 56px; }
}

/* ---- users, roles and settings (#52) -------------------------------------------------------- */
/* A secret shown once: big enough to read out, easy to select in one go. */
.rk-secret {
    display: inline-block;
    margin: var(--space-2) 0;
    padding: var(--space-2) var(--space-3);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-md);
    background: var(--surface-app);
    font: 600 21.5px/29px var(--font-mono, ui-monospace, monospace);
    letter-spacing: 0.04em;
    user-select: all;
}

/* A checkbox choice without the price column the catalogue pages give it. */
.rk-choice--plain { grid-template-columns: auto minmax(0, 1fr); }
/* The service editor's add-on settings (#324): the services an add-on goes with, as many to a row as fit. */
.rk-addon-for { border: 0; padding: 0; margin: 0; min-width: 0; }
.rk-addon-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--space-2); }
.rk-mr-1 { margin-right: var(--space-1); }

/* The tab strip may wrap on a narrow header. */
.rk-tabs--wrap { flex-wrap: wrap; }


.rk-overline { margin: 0 0 var(--space-2); font: 600 13px/19px var(--font-sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); }

/* Settings: a list of on/off choices, each with a line of explanation. */
.rk-switch-list { display: flex; flex-direction: column; gap: var(--space-2); }
.rk-switch-row {
    display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-3); align-items: start;
    padding: var(--space-2-5) var(--space-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
}
.rk-switch-row input[type="checkbox"] { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--primary); }
.rk-switch-row > span { display: flex; flex-direction: column; gap: 2px; font: var(--text-small); }

.rk-table--matrix td:not(:first-child), .rk-table--matrix th:not(:first-child) { text-align: center; width: 110px; }
.rk-table--matrix input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); }

/* The branding preview: the header a customer would see, in the tenant's own colour. */
.rk-brand-preview {
    display: flex; align-items: center; gap: var(--space-3);
    margin-bottom: var(--space-5);
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface-app);
}
.rk-brand-logo { width: 40px; height: 40px; border-radius: var(--radius-md); object-fit: contain; background: var(--surface-card); }
.rk-brand-name { font: 600 19px/26.5px var(--font-sans); color: var(--ink); }
.rk-input--colour { width: 72px; height: var(--control-height-md); padding: 2px; cursor: pointer; }

/* The calendar's month (#88): a count per day, each day a link to its day view. */
.rk-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--border); border-top: 1px solid var(--border); }
.rk-month-head { padding: var(--space-2); background: var(--surface-card); font: var(--text-caption); color: var(--ink-muted); text-align: center; }
.rk-month-day {
    display: flex; flex-direction: column; gap: 2px; min-height: 88px; padding: var(--space-2);
    background: var(--surface-card); color: var(--ink); text-decoration: none;
}
.rk-month-day:hover { background: var(--surface-sunken); }
.rk-month-day.is-outside { color: var(--ink-muted); background: var(--surface-page); }
.rk-month-day.is-today .rk-month-date { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--primary); color: var(--on-primary, #fff); }
.rk-month-date { font: var(--text-small); font-weight: 600; }
.rk-month-count { font: var(--text-body); font-weight: 600; color: var(--primary-soft-ink); }
@media (max-width: 700px) { .rk-month-day { min-height: 56px; } .rk-month-count .rk-caption { display: none; } }

/* RkBars (#61): bars for named things, columns for days. Lengths are set inline, invariantly. Its own
   rk-hbar-* names: the dashboard's week-ahead chart owns rk-bars and rk-bar-* (#151). */
.rk-hbars { display: flex; flex-direction: column; gap: var(--space-2); }
.rk-hbar-row { display: grid; grid-template-columns: minmax(96px, 200px) 1fr 56px; align-items: center; gap: var(--space-3); }
.rk-hbar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-hbar-track { height: 10px; border-radius: 999px; background: var(--border); overflow: hidden; }
.rk-hbar-fill { display: block; height: 100%; border-radius: 999px; background: var(--primary); }
.rk-hbar-value { text-align: right; }
.rk-columns { display: flex; align-items: flex-end; gap: 2px; height: 160px; padding-bottom: var(--space-2); }
.rk-column { flex: 1 1 0; min-width: 2px; height: 100%; display: flex; align-items: flex-end; }
.rk-column-fill { display: block; width: 100%; border-radius: 3px 3px 0 0; background: var(--primary); min-height: 1px; }
@media (max-width: 600px) { .rk-hbar-row { grid-template-columns: 96px 1fr 40px; } }

/* History (#57): who changed what, newest first. */
.rk-history { display: flex; flex-direction: column; gap: var(--space-2); margin-top: var(--space-3); }
.rk-history-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.rk-history-item { padding: var(--space-2) var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-card); }
.rk-history-old { color: var(--ink-muted); text-decoration: line-through; }

/* A component class that sets display must still yield to the hidden attribute (#142). */
.rk-badge[hidden], .rk-btn[hidden] { display: none; }

/* ---- Appearance (#133): the booking widget's theme editor, after the Claude Design mock-up ----------------
   An editor column and a sticky preview column. Everything is drawn in the portal's own tokens, so it follows
   light and dark mode; only the preset thumbnails, the swatches, the specimen and the preview itself show the
   tenant's theme colours, which are the same in either mode. */
.rk-appearance { display: flex; gap: var(--space-6); align-items: flex-start; flex-wrap: wrap; }
.rk-appearance-editor { flex: 1 1 560px; min-width: 0; display: flex; flex-direction: column; gap: var(--space-4); }
.rk-appearance-aside { flex: 1 1 400px; max-width: 480px; min-width: 0; position: sticky; top: 0; display: flex; flex-direction: column; gap: var(--space-4); }

.rk-appearance-savebar {
    position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap;
    padding: var(--space-3) var(--space-3) var(--space-3) var(--space-5);
    background: var(--surface-card); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow-xs);
}
.rk-appearance-savebar-text { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 2px; }
.rk-appearance-savebar-title { font: var(--text-body); font-weight: 600; color: var(--ink); }
.rk-btn.is-disabled { opacity: .5; pointer-events: none; }
.rk-appearance-errors { margin: 0; padding-left: 1.1em; }

.rk-appearance-section { background: var(--surface-card); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow-xs); }
.rk-appearance-section > summary {
    display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4) var(--space-5);
    cursor: pointer; list-style: none; color: var(--ink);
}
.rk-appearance-section > summary::-webkit-details-marker { display: none; }
.rk-appearance-chevron { color: var(--ink-muted); transition: transform var(--duration-fast, 120ms) ease; flex: none; }
.rk-appearance-section[open] > summary .rk-appearance-chevron { transform: rotate(90deg); }
.rk-appearance-section-title { font: var(--text-section-title); color: var(--ink); }
.rk-appearance-section-reset { margin-left: auto; }
.rk-appearance-section-body { padding: 0 var(--space-5) var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); }
.rk-appearance-section-body--rows { padding-bottom: var(--space-2); gap: 0; }
.rk-appearance-section-body--ruled { border-top: 1px solid var(--border); padding-top: var(--space-4); gap: var(--space-4); }
.rk-appearance-section-body > p { margin: 0; }

.rk-appearance-presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: var(--space-3); }
.rk-preset-card {
    display: flex; flex-direction: column; padding: 0; margin: 1px; text-align: left; font: inherit; cursor: pointer; overflow: hidden;
    background: var(--surface-card); border: 1px solid var(--border); border-radius: var(--radius-lg); color: var(--ink);
}
.rk-preset-card:hover { border-color: var(--border-strong); }
.rk-preset-card.is-selected { margin: 0; border: 2px solid var(--ink); }
.rk-preset-thumb { display: block; margin: 8px 8px 0; height: 76px; border: 1px solid; border-radius: var(--radius-md); overflow: hidden; }
.rk-preset-thumb-head { display: block; height: 22px; }
.rk-preset-thumb-body { display: flex; flex-direction: column; gap: 5px; padding: 8px 10px; }
.rk-preset-line { display: block; height: 5px; width: 70%; border-radius: 3px; opacity: .8; }
.rk-preset-line--short { width: 45%; opacity: .6; }
.rk-preset-pill { display: block; height: 14px; width: 44px; align-self: flex-end; }
.rk-preset-name { display: flex; align-items: center; gap: 6px; padding: 10px 12px 2px; font: var(--text-body); font-weight: 500; }
.rk-preset-name > span:first-child { flex: 1; }
.rk-preset-check { display: none; color: var(--ink); }
.rk-preset-card.is-selected .rk-preset-check { display: inline-block; }
.rk-preset-blurb { display: block; padding: 0 12px 12px; }

.rk-appearance-group { border-top: 1px solid var(--border); padding: 14px 0 6px; }
.rk-appearance-group-head { display: flex; align-items: baseline; gap: var(--space-2); margin-bottom: 4px; }
.rk-appearance-overline { font: var(--text-overline); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); }
.rk-appearance-row { display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-2) 0; flex-wrap: wrap; }
.rk-appearance-row[hidden] { display: none; }
.rk-appearance-row-label { flex: 1 1 180px; min-width: 0; padding-top: 6px; }
.rk-appearance-row-name { font: var(--text-body); color: var(--ink); }
.rk-appearance-var { font: var(--text-caption); font-family: var(--font-mono, ui-monospace, monospace); color: var(--ink-muted); }
.rk-appearance-edited {
    border: 0; height: 20px; padding: 0 6px; cursor: pointer;
    background: var(--surface-sunken); color: var(--ink-secondary); font: var(--text-caption); border-radius: var(--radius-sm);
}
.rk-appearance-edited[hidden] { display: none; }
.rk-appearance-control { padding-top: 6px; }
.rk-appearance-colour { display: flex; align-items: flex-start; gap: var(--space-2); }
.rk-appearance-swatch {
    position: relative; width: 32px; height: 32px; flex: none; overflow: hidden; cursor: pointer;
    border: 1px solid var(--border-strong); border-radius: var(--radius-md);
}
.rk-appearance-swatch > span { position: absolute; inset: 0; }
.rk-appearance-swatch > input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }
.rk-appearance-hex { width: 124px; text-transform: uppercase; }
.rk-appearance-hex[aria-invalid="true"] { border-color: var(--danger, #C62828); }
.rk-appearance-contrast { width: 150px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding-top: 4px; }
.rk-appearance-contrast .rk-badge:empty { display: none; }

.rk-appearance-selects { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--space-4); }
.rk-appearance-selects > p, .rk-appearance-section-body--ruled > p { margin: 0; }
.rk-appearance-line { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
.rk-appearance-line-label { flex: 1 1 180px; }
.rk-appearance-slider { display: flex; align-items: center; gap: var(--space-3); width: 280px; max-width: 100%; padding-top: 6px; }
.rk-appearance-line .rk-appearance-slider { padding-top: 0; }
.rk-appearance-slider input[type="range"] { flex: 1; accent-color: var(--ink); }
.rk-appearance-slider output { width: 44px; text-align: right; color: var(--ink); }
.rk-appearance-tabs {
    display: inline-flex; gap: 2px; padding: 2px; border-radius: var(--radius-md);
    background: var(--surface-sunken); border: 1px solid var(--border);
}
.rk-appearance-tab { position: relative; cursor: pointer; }
.rk-appearance-tab input { position: absolute; opacity: 0; width: 0; height: 0; }
.rk-appearance-tab span {
    display: inline-flex; align-items: center; height: 28px; padding: 0 var(--space-3);
    border-radius: calc(var(--radius-md) - 2px); font: var(--text-small); color: var(--ink-secondary);
}
.rk-appearance-tab input:checked + span { background: var(--surface-card); color: var(--ink); font-weight: 600; box-shadow: var(--shadow-xs); }
.rk-appearance-tab input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 1px; }

.rk-appearance-preview { padding: 0; overflow: hidden; }
.rk-appearance-preview-head { display: flex; align-items: center; gap: 10px; padding: var(--space-4) var(--space-5); }
.rk-appearance-preview-title { flex: 1; }
.rk-appearance-browserbar {
    display: flex; align-items: center; gap: var(--space-2); height: 28px; margin: 0 var(--space-3); padding: 0 10px;
    background: var(--surface-sunken); border: 1px solid var(--border); border-bottom: 0;
    border-radius: var(--radius-md) var(--radius-md) 0 0; font: var(--text-caption); color: var(--ink-muted);
}
.rk-appearance-browserbar > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-appearance-frame { margin: 0 var(--space-3) var(--space-3); border: 1px solid var(--border); border-radius: 0 0 var(--radius-md) var(--radius-md); overflow: hidden; }
.rk-appearance-frame iframe { display: block; width: 100%; height: 600px; border: 0; background: #FFFFFF; }

.rk-appearance-specimen { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-4) var(--space-5); }
.rk-appearance-specimen-grid {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); padding: var(--space-3);
    background: var(--rkb-card); border: 1px solid var(--border); border-radius: var(--radius-lg); font-family: var(--rkb-font-body); font-size: 17px;
}
.rk-appearance-specimen-item { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.rk-appearance-specimen-item .rk-caption { font-family: var(--font-sans); }
.rk-specimen-btn {
    font: inherit; font-weight: var(--rkb-weight-button); text-transform: var(--rkb-btn-transform); letter-spacing: var(--rkb-btn-tracking);
    padding: 8px 14px; border-radius: var(--rkb-radius-button); border: var(--rkb-border-width) solid;
}
.rk-specimen-btn--primary { background: var(--rkb-btn-primary-bg); color: var(--rkb-btn-primary-text); border-color: var(--rkb-btn-primary-border); }
.rk-specimen-btn--secondary { background: var(--rkb-btn-secondary-bg); color: var(--rkb-btn-secondary-text); border-color: var(--rkb-btn-secondary-border); }
.rk-specimen-btn--danger { background: var(--rkb-btn-danger-bg); color: var(--rkb-btn-danger-text); border-color: var(--rkb-btn-danger-border); }
.rk-specimen-btn--disabled { background: var(--rkb-btn-disabled-bg); color: var(--rkb-btn-disabled-text); border-color: var(--rkb-btn-disabled-bg); cursor: not-allowed; }

.rk-appearance-guard {
    display: flex; flex-direction: column; gap: 10px; padding: var(--space-4) var(--space-5);
    background: var(--surface-sunken); border-radius: var(--radius-xl); font: var(--text-small); color: var(--ink-secondary);
}
.rk-appearance-guard p { margin: 0; }

@media (max-width: 900px) {
    .rk-appearance-aside { position: static; max-width: none; }
}

/* ----- Saved reports (#144, Reports.dc.html) ------------------------------------------------------- */
/* Reports (#311): the list as the design's table, a report's parameters with quick dates, the result. */
.rk-reports { padding: 0; overflow: hidden; }
.rk-reports-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--border-color-light); }
.rk-reports-bar > .rk-caption { margin-inline-start: auto; }
.rk-reports-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rk-reports-well { flex: 0 0 24px; height: 24px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; background: var(--primary-lt); color: var(--primary); }
.rk-reports-text { display: flex; flex-direction: column; min-width: 0; max-width: 640px; }
.rk-reports > .rk-empty { padding: 40px 16px; }
.rk-report-params .rk-card-body { display: flex; flex-direction: column; gap: 12px; }
.rk-report-presets { display: flex; gap: 6px; flex-wrap: wrap; }
.rk-report-preset {
    display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: var(--radius-full);
    border: 1px solid var(--border); background: var(--surface-card); color: var(--ink-secondary); font: 500 14.5px/1 var(--font-sans); text-decoration: none;
}
.rk-report-preset:hover { border-color: var(--primary); color: var(--ink); text-decoration: none; }
.rk-report-preset.is-on { border-color: var(--primary); background: var(--primary-lt); color: var(--primary); }
.rk-report-stale { align-self: center; font: 400 14.5px/19px var(--font-sans); color: var(--warning-ink); }
.rk-report-filters .rk-label.rk-mono { font-family: var(--font-mono); font-size: 14.5px; color: var(--ink-secondary); }
.rk-report-search { flex: 1; min-width: 220px; max-width: 360px; display: flex; }
.rk-report-search > .rk-control { flex: 1; gap: 8px; }
.rk-report-search .rk-search-field { flex: 1 1 auto; min-width: 0; }
.rk-report-name { color: var(--ink); font-weight: 500; text-decoration: none; }
.rk-report-name:hover { color: var(--primary-hover); }
.rk-mono-link { font: 14.5px/19px var(--font-mono); color: var(--primary-soft-ink); }

.rk-report-head { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; justify-content: space-between; }
.rk-crumbs { display: flex; align-items: center; gap: 6px; font: var(--text-small); color: var(--ink-muted); }
.rk-crumbs a { color: var(--ink-secondary); text-decoration: none; }
.rk-crumbs a:hover { color: var(--ink); }
.rk-crumbs [aria-current] { color: var(--ink); }
.rk-url-chip {
    display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; max-width: 100%; overflow: hidden;
    border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-card);
    font: 14.5px/19px var(--font-mono); color: var(--ink-secondary); white-space: nowrap; text-overflow: ellipsis;
}

.rk-report-filters { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.rk-report-filters .rk-field { width: 170px; }
.rk-report-filters .rk-field:has(select) { width: 190px; }
@media (max-width: 560px) { .rk-report-filters .rk-field, .rk-report-filters .rk-field:has(select) { width: 100%; } }

/* A heading that sorts its column: the whole label is the link. */
.rk-sort { display: inline-flex; align-items: center; gap: 4px; color: inherit; text-decoration: none; }
.rk-sort:hover, .rk-sort.is-sorted { color: var(--ink); }
.rk-cell-num .rk-sort { flex-direction: row-reverse; }

/* The export menu: a <details> that opens a panel under its button, no script needed. */
.rk-menu { position: relative; }
.rk-menu > summary { list-style: none; cursor: pointer; }
.rk-menu > summary::-webkit-details-marker { display: none; }
.rk-menu-panel {
    position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: 260px; padding: 6px;
    display: flex; flex-direction: column; background: var(--surface-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
}
.rk-menu-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-md); color: var(--ink); text-decoration: none; }
.rk-menu-item:hover, .rk-menu-item:focus-visible { background: var(--surface-sunken); }
.rk-menu-item > span { display: flex; flex-direction: column; }
.rk-menu-label { font: var(--text-body); }
.rk-menu-note { margin: 4px 0 0; padding: 6px 10px 4px; border-top: 1px solid var(--border); }

/* The query, folded away under its heading. */
.rk-report-query { padding: 0; }
.rk-report-query > summary {
    display: flex; align-items: center; gap: var(--space-3); padding: 16px 24px; cursor: pointer; list-style: none;
}
.rk-report-query > summary::-webkit-details-marker { display: none; }
.rk-report-query-chevron { transition: transform var(--duration-fast, 120ms) ease; }
.rk-report-query[open] .rk-report-query-chevron { transform: rotate(90deg); }
.rk-report-query-body { padding: 0 24px 24px; display: flex; flex-direction: column; gap: var(--space-3); }
.rk-report-query-body p { margin: 0; }
.rk-sql {
    margin: 0; padding: 16px; background: var(--surface-sunken); border-radius: var(--radius-lg);
    font: 14.5px/24px var(--font-mono); color: var(--ink); white-space: pre-wrap; overflow-x: auto;
}
.rk-param-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.rk-param-chip {
    display: inline-flex; gap: 4px; align-items: center; height: 22px; padding: 0 8px;
    border-radius: var(--radius-sm); background: var(--surface-sunken); color: var(--ink-secondary);
}
.rk-param-chip code { font-family: var(--font-mono); }
.rk-report-missing { display: flex; flex-direction: column; align-items: center; gap: var(--space-3); padding: 32px 0; text-align: center; }
.rk-report-missing p { margin: 0; max-width: 420px; font: var(--text-small); }
@media (prefers-reduced-motion: reduce) { .rk-report-query-chevron { transition: none; } }

/* ----- Theme token sheet (#148, "Theme Token Sheet") ------------------------------------------------ */
.rk-token-table { min-width: 1180px; }
.rk-token-table th, .rk-token-table td { white-space: nowrap; }
.rk-token-table tbody tr.rk-token-group th {
    padding: 14px 12px 4px; background: none; border: 0; text-align: left;
    font: var(--text-overline); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted);
}
.rk-token-table tbody tr.rk-token-group:hover th { background: none; }
.rk-token-vars { display: flex; flex-direction: column; gap: 2px; }
.rk-token-vars code { font: 14.5px/19px var(--font-mono); color: var(--ink); }
.rk-token-value { font-variant-numeric: tabular-nums; }
.rk-token-value > span:last-child { display: inline-block; max-width: 160px; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.rk-token-swatch {
    display: inline-block; width: 14px; height: 14px; margin-right: 6px; vertical-align: middle;
    border-radius: 4px; border: 1px solid var(--border-strong);
}
.rk-token-code { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: var(--space-4); }
.rk-token-code > div { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.rk-token-code pre { max-height: 720px; overflow: auto; }
.rk-token-notes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: var(--space-3); margin-top: var(--space-4); }
.rk-token-note {
    padding: 14px 16px; background: var(--surface-app); border: 1px solid var(--border); border-radius: var(--radius-lg);
    font: var(--text-small); color: var(--ink-secondary);
}
.rk-token-note strong { display: block; margin-bottom: 4px; font-weight: 600; color: var(--ink); }

/* ----- Dashboard (#276, "Rukukwe Portal" in the Claude Design project) ----------------------------- */
/* Today as a timeline: the time, a dot, who and what, and the status or the outcome buttons. Rows that have
   passed are muted; Now is a teal marker with a hairline running to the right. */
.rk-dash-today { min-width: 0; }
.rk-dash-side { display: flex; flex-direction: column; gap: var(--grid-gap); min-width: 0; }

.rk-timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.rk-timeline-row { display: grid; grid-template-columns: 52px 16px minmax(0, 1fr) auto; gap: var(--space-3); align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border-color-light); }
.rk-timeline-row:last-child { border-bottom: 0; }
.rk-timeline-time { font: 600 15.5px/21.5px var(--font-sans); letter-spacing: -0.2px; color: var(--ink-secondary); }
.rk-timeline-rail { display: flex; justify-content: center; }
.rk-timeline-dot { width: 10px; height: 10px; flex: none; box-sizing: border-box; border-radius: var(--radius-full); border: 2px solid var(--primary); background: transparent; }
.rk-timeline-row.is-past .rk-timeline-time, .rk-timeline-row.needs-outcome .rk-timeline-time { color: var(--ink-muted); }
.rk-timeline-row.is-past .rk-timeline-dot { border-color: var(--border); background: var(--border); }
.rk-timeline-row.needs-outcome .rk-timeline-dot { border-color: var(--yellow); background: var(--yellow-lt); }
.rk-timeline-row.is-now { grid-template-columns: 52px 16px minmax(0, 1fr); padding: 8px 0; border-bottom: 0; }
.rk-timeline-row.is-now .rk-timeline-time { font: 600 13px/19px var(--font-sans); letter-spacing: 0.4px; text-transform: uppercase; color: var(--primary); }
.rk-timeline-row.is-now .rk-timeline-dot { border-color: var(--primary); background: var(--primary); box-shadow: 0 0 0 3px var(--primary-lt); }
.rk-timeline-now { display: flex; align-items: center; gap: var(--space-2-5); min-width: 0; }
.rk-timeline-now-label { font: 600 14.5px/19px var(--font-sans); color: var(--primary); white-space: nowrap; }
.rk-timeline-now-line { flex: 1; height: 1px; background: var(--primary); opacity: 0.4; }
.rk-timeline-who { display: flex; align-items: center; gap: var(--space-3); min-width: 0; color: inherit; text-decoration: none; }
.rk-timeline-who:hover { text-decoration: none; }
.rk-timeline-who:hover .rk-timeline-client { color: var(--primary); }
.rk-timeline-text { display: flex; flex-direction: column; min-width: 0; }
.rk-timeline-text > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-timeline-client { font: 600 15.5px/21.5px var(--font-sans); color: var(--ink-secondary); }
.rk-timeline-desc { font: 400 14.5px/19px var(--font-sans); color: var(--ink-muted); }
.rk-timeline-row.is-past .rk-timeline-client, .rk-timeline-row.needs-outcome .rk-timeline-client { color: var(--ink-muted); }
.rk-timeline-end { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.rk-timeline-end form { display: flex; gap: 6px; }
.rk-timeline-foot { margin: 0; padding: 14px 0 4px 80px; font: 400 15px/21.5px var(--font-sans); color: var(--ink-muted); }

/* Recent activity: initials on a gradient, who did what (the actor in bold), and when and through which channel. */
.rk-activity { list-style: none; margin: 0; padding: 0; }
.rk-activity-item { display: flex; gap: var(--space-2-5); padding: 10px 0; border-bottom: 1px solid var(--border-color-light); }
.rk-activity-item:last-child { border-bottom: 0; }
.rk-activity-main { flex: 1; min-width: 0; }
.rk-activity-body { font: 400 15px/1.45 var(--font-sans); color: var(--ink-secondary); }
.rk-activity-body strong { color: var(--ink); font-weight: 500; }
.rk-activity-time { margin-top: 1px; font: 400 13px/17px var(--font-sans); color: var(--ink-muted); }

@media (max-width: 560px) {
    .rk-timeline-row { grid-template-columns: 44px 16px minmax(0, 1fr); }
    .rk-timeline-end { grid-column: 3; justify-content: flex-start; padding-top: 4px; }
    .rk-timeline-foot { padding-left: 0; }
}

/* ----- Business hours (#164, "Business Hours") ------------------------------------------------------ */
.rk-hours-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: var(--grid-gap); align-items: start; }
.rk-hours-card { padding: 24px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.rk-hours-head { display: flex; align-items: flex-start; gap: 12px; }
.rk-hours-head > .rk-icon, .rk-hours-head > svg { margin-top: 3px; }
.rk-hours-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rk-hours-week { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.rk-hours-week li {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center;
    height: 40px; padding: 0 12px; border-radius: var(--radius-md); font: 400 15.5px/21.5px var(--font-sans); color: var(--ink);
}
.rk-hours-week li.is-closed { color: var(--ink-muted); }
.rk-hours-week li.is-today { background: var(--primary-lt); font-weight: 600; }

/* A drawer that is its own address (#280): a dimmed page, the panel sliding in from the end edge. Closing is a link
   back; the scrim is that link too. */
.rk-drawer-backdrop { position: fixed; inset: 0; z-index: 1200; }
.rk-drawer-scrim { position: absolute; inset: 0; background: rgba(15, 22, 35, 0.4); backdrop-filter: blur(2px); animation: rk-fade-in 200ms ease; }
.rk-drawer {
    position: absolute; top: 0; inset-inline-end: 0; width: min(420px, 100vw); height: 100%;
    display: flex; flex-direction: column; background: var(--surface-card); box-shadow: -10px 0 30px rgba(0, 0, 0, 0.12);
    animation: rk-drawer-in 240ms var(--ease);
}
.rk-drawer-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border-color-light); }
.rk-drawer-head .rk-dialog-title { flex: 1; min-width: 0; }
.rk-drawer-head .rk-dialog-close { border-radius: 50%; }
.rk-drawer-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 16px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.rk-drawer-foot { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; padding: 12px 16px; border-top: 1px solid var(--border-color-light); }
.rk-drawer-foot .rk-appt-cancel[open] { flex-basis: 100%; }
@keyframes rk-drawer-in { from { transform: translateX(100%); } to { transform: none; } }
@keyframes rk-fade-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .rk-drawer, .rk-drawer-scrim { animation: none; } }

/* The appointment in the drawer: status and who, the when-card edged in the practitioner's colour, a row of action
   tiles, then Client, Booking, Payment and History as titled sections. */
.rk-appt-drawer-status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: -6px; }
.rk-appt-when-status--primary { background: var(--primary-lt); }
.rk-appt-when-status--info { background: var(--info-soft); }
.rk-appt-when-status--success { background: var(--success-soft); }
.rk-appt-when-status--warning { background: var(--warning-soft); }
.rk-appt-when-status--danger { background: var(--danger-soft); }
.rk-appt-drawer-status .rk-appt-when-status { align-self: auto; border: 0; }
.rk-appt-drawer .rk-appt-when {
    background: var(--surface-card); border: 1px solid var(--border); border-inline-start: 4px solid var(--who, var(--when));
}
.rk-appt-drawer .rk-appt-date-tile { flex-basis: 52px; height: auto; background: none; border: 0; box-shadow: none; padding-inline-end: 14px; border-inline-end: 1px solid var(--border-color-light); border-radius: 0; }
.rk-appt-drawer .rk-appt-date-dow { color: var(--who, var(--when)); }
.rk-appt-drawer .rk-appt-start { font-size: 26.5px; letter-spacing: -0.6px; }
.rk-appt-tiles { display: flex; gap: 6px; }
.rk-appt-tiles > form { display: contents; }
.rk-appt-tile {
    flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 2px;
    border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface-card); color: var(--ink);
    font: 500 14px/17px var(--font-sans); white-space: nowrap; cursor: pointer; text-decoration: none;
    transition: background 100ms, border-color 100ms;
}
.rk-appt-tile:hover { background: var(--surface-sunken); color: var(--ink); }
.rk-appt-tile.is-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.rk-appt-tile.is-primary:hover { background: var(--primary-dk); color: #fff; }
.rk-appt-tile:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.rk-appt-section-title { margin: 0 0 8px; font: 600 13px/19px var(--font-sans); letter-spacing: 0.4px; text-transform: uppercase; color: var(--ink-muted); }
.rk-appt-client-card { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--radius-lg); background: var(--surface-sunken); }
.rk-appt-client-card .rk-appt-client-name { font-size: 16px; }
.rk-appt-profile { font: 400 14.5px/19px var(--font-sans); white-space: nowrap; }
.rk-appt-facts--plain { border-top: 0; margin-top: -4px; }
.rk-appt-facts--plain .rk-appt-fact-row { grid-template-columns: 18px 100px minmax(0, 1fr); padding: 9px 0; }
.rk-appt-paycard { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.rk-appt-paycard-head { display: flex; flex-direction: column; gap: 8px; padding: 12px; }
.rk-appt-paycard-sum { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.rk-appt-paid { font: 600 21.5px/29px var(--font-sans); letter-spacing: -0.4px; color: var(--ink); white-space: nowrap; }
.rk-appt-paid > span { font-size: 15px; font-weight: 400; letter-spacing: 0; color: var(--ink-muted); }
.rk-appt-paybar { height: 6px; border-radius: 3px; background: var(--surface-sunken); overflow: hidden; }
.rk-appt-paybar > span { display: block; height: 100%; border-radius: 3px; background: var(--green); }
.rk-appt-paycard .rk-appt-transactions { padding: 0; gap: 0; border-top: 0; }
.rk-appt-paycard .rk-appt-transaction { padding: 10px 12px; border-top: 1px solid var(--border-color-light); }
.rk-appt-paycard-actions {
    display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 12px;
    border-top: 1px solid var(--border-color-light); background: var(--surface-sunken);
}
.rk-appt-paycard-actions > .rk-alert, .rk-appt-paycard-actions > .rk-appt-fold[open] { flex-basis: 100%; }
.rk-appt-paycard-actions .rk-appt-pay { background: var(--surface-card); }
.rk-appt-drawer .rk-history-list { max-height: 240px; }

/* A payment or refund on the order: a tinted icon tile, the method and when, the amount. */
.rk-appt-transactions { display: flex; flex-direction: column; gap: 8px; }
.rk-appt-transaction { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.rk-appt-tx-icon {
    width: 28px; height: 28px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center;
    background: var(--green-lt); color: var(--green);
}
.rk-appt-transaction:not(.is-succeeded):is(.is-failed, .is-cancelled) .rk-appt-tx-icon { background: var(--red-lt); color: var(--red); }
.rk-appt-transaction.is-pending .rk-appt-tx-icon { background: var(--yellow-lt); color: var(--yellow); }
.rk-appt-tx-what { display: flex; flex-direction: column; min-width: 0; }
.rk-appt-tx-what > .rk-small { font-weight: 500; color: var(--ink); }
.rk-appt-tx-amount { font: 600 15.5px/21.5px var(--font-sans); color: var(--ink); white-space: nowrap; }
.rk-appt-receipt { display: block; }
/* In the 420px drawer and the 480px modal the desk forms take two columns, the change line and the button a row each. */
:is(.rk-appt-drawer, .rk-appt-dialog) .rk-appt-pay--desk { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
:is(.rk-appt-drawer, .rk-appt-dialog) .rk-appt-pay--desk .rk-appt-change { grid-column: 1 / -1; }

/* A dialog that is its own address: a dimmed page and a panel over it. Closing is a link back. */
.rk-dialog-backdrop {
    position: fixed; inset: 0; z-index: 1200; display: flex; align-items: center; justify-content: center;
    padding: 24px; background: var(--overlay); backdrop-filter: blur(3px); overflow-y: auto;
}
.rk-dialog {
    width: 520px; max-width: 100%; max-height: calc(100vh - 32px); overflow-y: auto; box-sizing: border-box;
    display: flex; flex-direction: column; gap: 16px; padding: 24px;
    background: var(--surface-card); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow-md);
}
.rk-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.rk-dialog-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 16px; }

/* A day of the week: switch, name, then its times, or "Closed" while the switch is off (CSS alone, no script). */
.rk-hours-edit { display: flex; flex-direction: column; }
.rk-hours-row { display: grid; grid-template-columns: 130px 120px minmax(0, 1fr); gap: 12px; align-items: center; min-height: 48px; padding: 4px 0; }
.rk-hours-row + .rk-hours-row { border-top: 1px solid var(--border-color-light); }
.rk-hours-day { display: flex; flex-direction: column; font: 500 15.5px/21.5px var(--font-sans); color: var(--ink); }
.rk-hours-today { font: 400 14px/19px var(--font-sans); color: var(--primary); }
.rk-hours-switch { gap: 8px; font: 400 15.5px/21.5px var(--font-sans); color: var(--ink); }
.rk-hours-closed-label { display: none; color: var(--ink-muted); }
.rk-hours-row:has(.rk-switch input:not(:checked)) .rk-hours-open-label { display: none; }
.rk-hours-row:has(.rk-switch input:not(:checked)) .rk-hours-closed-label { display: inline; }
.rk-hours-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 14px; }
.rk-hours-error { display: block; }
.rk-hours-editor .rk-card-body { padding-top: 4px; }
.rk-hours-picker .rk-input { width: 170px; }
.rk-hours-layout { align-items: start; }
.rk-hours-side { display: flex; flex-direction: column; gap: var(--grid-gap); min-width: 0; }
.rk-hours-now { display: flex; flex-direction: column; padding-top: 4px; }
.rk-hours-now-row {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; padding: 9px 8px; margin: 0 -8px;
    border-radius: var(--radius); color: var(--ink); text-decoration: none;
}
.rk-hours-now-row:hover { background: var(--surface-sunken); color: var(--ink); text-decoration: none; }
.rk-hours-now-row.is-chosen { background: var(--primary-lt); }
.rk-hours-now-name { font: 500 15.5px/21.5px var(--font-sans); }
.rk-hours-now-row > .rk-caption { grid-column: 1 / -1; }
.rk-hours-closures { padding-top: 4px; }
.rk-hours-closure { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border-color-light); font: 400 15px/21.5px var(--font-sans); color: var(--ink); }
.rk-hours-closure:last-child { border-bottom: 0; }
@media (max-width: 640px) { .rk-hours-row { grid-template-columns: 96px minmax(0, 1fr); } .rk-hours-row > .rk-hours-times, .rk-hours-row > .rk-hours-closed { grid-column: 2; } }
.rk-hours-times { display: flex; align-items: center; gap: 8px; }
.rk-hours-times .rk-control { flex: 0 1 110px; min-width: 0; }
.rk-hours-closed { display: none; }
.rk-hours-row:has(.rk-switch input:not(:checked)) .rk-hours-times { display: none; }
.rk-hours-row:has(.rk-switch input:not(:checked)) .rk-hours-closed { display: inline; }
.rk-hours-row.is-invalid .rk-hours-times .rk-control:last-child { border-color: var(--danger); }
.rk-hours-errors { margin-top: 8px; font: var(--text-caption); color: var(--danger); }
.rk-hours-errors p { margin: 0; }
@media (max-width: 480px) {
    .rk-hours-row { grid-template-columns: 40px minmax(0, 1fr); padding: 6px 0; }
    .rk-hours-times, .rk-hours-closed { grid-column: 2; }
}

/* ----- Calendar (#166, "Calendar") ---------------------------------------------------------------- */
.rk-row--end { justify-content: flex-end; }

/* One appointment's detail (AppointmentPanel), as the Gentelella "All appointments" modal (#278): a modal header,
   then a when-card, the client, a detail list, the note, the history and the actions. A dialog on the calendar and
   the list, a card on a client's page. */
.rk-appt-card { padding: 0; display: flex; flex-direction: column; }
.rk-appt-dialog { padding: 0; gap: 0; width: 480px; }
:is(.rk-appt-card, .rk-appt-dialog) > .rk-dialog-head { align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--border-color-light); }
.rk-dialog-title { margin: 0; font: 600 18px/24px var(--font-sans); letter-spacing: -0.1px; color: var(--ink); }
.rk-dialog-close {
    width: 28px; height: 28px; flex: none; display: inline-flex; align-items: center; justify-content: center;
    border-radius: var(--radius-sm); color: var(--ink-muted); transition: background 100ms, color 100ms;
}
.rk-dialog-close:hover { background: var(--surface-sunken); color: var(--ink); }
.rk-appt-body { display: flex; flex-direction: column; gap: 16px; padding: 16px 18px; min-width: 0; }
.rk-appt-dialog .rk-appt-body { overflow-y: auto; }

.rk-appt-when {
    display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: var(--radius-lg);
    background: var(--neutral-soft); border: 1px solid var(--border-color-light); --when: var(--ink-muted);
}
.rk-appt-when--primary { background: var(--primary-soft); --when: var(--primary); }
.rk-appt-when--info { background: var(--info-soft); --when: var(--info); }
.rk-appt-when--success { background: var(--success-soft); --when: var(--success); }
.rk-appt-when--warning { background: var(--warning-soft); --when: var(--warning); }
.rk-appt-when--danger { background: var(--danger-soft); --when: var(--danger); }
.rk-appt-date-tile {
    flex: 0 0 56px; height: 62px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1;
    border-radius: var(--radius); background: var(--surface-card); border: 1px solid var(--border); box-shadow: var(--shadow-card);
}
.rk-appt-date-dow { font: 600 12px/1.1 var(--font-sans); letter-spacing: 0.5px; text-transform: uppercase; color: var(--when); }
.rk-appt-date-day { font: 600 26.5px/1.1 var(--font-sans); letter-spacing: -0.6px; color: var(--ink); }
.rk-appt-date-mon { font: 400 12.5px/1.1 var(--font-sans); color: var(--ink-muted); }
.rk-appt-when-time { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.rk-appt-start { font: 600 29px/1.15 var(--font-sans); letter-spacing: -0.7px; color: var(--ink); white-space: nowrap; }
.rk-appt-when-time .rk-small { font-size: 15px; }
.rk-appt-when.is-cancelled .rk-appt-start { text-decoration: line-through; }
.rk-appt-when-status {
    align-self: flex-start; display: inline-flex; align-items: center; height: 24px; padding: 0 10px;
    border-radius: var(--radius-full); background: var(--surface-card); border: 1px solid var(--border-color-light);
}

.rk-appt-client { display: flex; align-items: center; gap: 12px; }
.rk-appt-client-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rk-appt-client-name { font: 600 17px/24px var(--font-sans); color: var(--ink); }
.rk-appt-client-name:hover { color: var(--primary); }

.rk-appt-facts { margin: 0; border-top: 1px solid var(--border-color-light); }
.rk-appt-fact-row {
    display: grid; grid-template-columns: 18px 110px minmax(0, 1fr); align-items: center; gap: 10px;
    padding: 10px 0; border-bottom: 1px solid var(--border-color-light);
}
.rk-appt-fact-row > svg { color: var(--ink-muted); }
.rk-appt-fact-row > dt { font: 400 15px/21.5px var(--font-sans); color: var(--ink-muted); }
.rk-appt-fact-row > dd { margin: 0; }
.rk-appt-fact { display: flex; align-items: center; gap: 8px; min-width: 0; font: 400 15.5px/21.5px var(--font-sans); color: var(--ink); }
.rk-appt-fact strong { font-weight: 500; }
.rk-appt-fact .rk-muted { font-size: 14.5px; }
.rk-appt-fact--money { flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.rk-appt-price { font: 600 18px/24px var(--font-sans); letter-spacing: -0.3px; color: var(--ink); }

/* What can be done about the money: buttons that open their form in place, under the detail list. */
.rk-appt-money { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; margin-top: -8px; }
.rk-appt-money:empty { display: none; }
.rk-appt-money > .rk-alert, .rk-appt-money > .rk-appt-transactions, .rk-appt-fold[open] { flex-basis: 100%; }
.rk-appt-fold > summary, .rk-appt-cancel > summary { list-style: none; cursor: pointer; width: max-content; }
.rk-appt-fold > summary::-webkit-details-marker, .rk-appt-cancel > summary::-webkit-details-marker { display: none; }
.rk-appt-fold[open] > summary { display: none; }
.rk-appt-pay {
    display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 8px; align-items: start;
    padding: 12px; border-radius: var(--radius); background: var(--surface-sunken); border: 1px solid var(--border-color-light);
}
.rk-appt-pay .rk-input--amount { width: 100%; }

.rk-appt-note { display: flex; gap: 10px; padding: 10px 12px; border-radius: var(--radius); background: var(--yellow-lt); font: 400 15px/21.5px var(--font-sans); color: var(--ink); }
.rk-appt-note > svg { margin-top: 2px; flex: none; color: var(--yellow); }
.rk-appt-note-text { flex: 1; min-width: 0; text-wrap: pretty; }

.rk-appt-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 14px; border-top: 1px solid var(--border-color-light); }
.rk-appt-actions form { display: contents; }
.rk-appt-cancel-open {
    height: 32px; padding: 0 12px; display: inline-flex; align-items: center; border-radius: var(--radius-sm);
    color: var(--ink-secondary); font: 500 15.5px/21.5px var(--font-sans); transition: background 100ms, color 100ms;
}
.rk-appt-cancel-open:hover { background: var(--surface-sunken); color: var(--ink); }
.rk-appt-cancel[open] > summary { display: none; }
.rk-appt-cancel-form {
    display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: var(--radius);
    background: var(--danger-soft); color: var(--danger-ink);
}
.rk-appt-actions .rk-appt-cancel[open] { flex-basis: 100%; order: 10; }
@media (max-width: 560px) {
    .rk-appt-fact-row { grid-template-columns: 18px 96px minmax(0, 1fr); }
    .rk-appt-pay { grid-template-columns: minmax(0, 1fr); }
}
.rk-filters > .rk-tabs { align-self: flex-end; }

/* ----- Users (#168, "Users Roles Settings") --------------------------------------------------------- */
/* Users (#303): the underlined tabs and the search as the card's header, then the design's table. */
.rk-users-card { padding: 0; overflow: hidden; }
.rk-users-bar { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 4px 16px 0; border-bottom: 1px solid var(--border-color-light); }
.rk-users-bar > .rk-tabs--underline { border-bottom: 0; }
.rk-users-search { width: 240px; max-width: 100%; display: flex; padding-bottom: 8px; }
.rk-users-search .rk-search-field { flex: 1 1 auto; min-width: 0; }
.rk-users-table tbody td { height: 52px; }
.rk-users-table tbody tr.is-open td { background: var(--primary-lt); }
.rk-users-role { color: var(--ink); white-space: nowrap; }
.rk-users-role + .rk-users-role::before { content: ", "; color: var(--ink-muted); }
.rk-users-foot { padding: 10px 16px; margin: 0; border-top: 1px solid var(--border-color-light); }
.rk-users-card > .rk-empty { padding: 40px 16px; }
.rk-users-who { display: flex; align-items: center; gap: 10px; min-width: 0; color: inherit; text-decoration: none; }
.rk-users-who:hover .rk-users-name { color: var(--primary-hover); }
.rk-users-text { display: flex; flex-direction: column; min-width: 0; }
.rk-users-name { font: 500 15.5px/21.5px var(--font-sans); color: var(--ink); }

/* Requests to join from the business's own email domain (#369), above the staff list. */
.rk-users-requests { display: flex; flex-direction: column; gap: 12px; margin-bottom: var(--space-4); padding: 16px 20px 6px; }
.rk-users-requests-head { display: flex; flex-direction: column; gap: 2px; }
.rk-users-requests-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.rk-users-request { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border-color-light); }
.rk-users-request .rk-users-text { flex: 1; }
.rk-users-request-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 600px) { .rk-users-request { flex-wrap: wrap; } .rk-users-request-actions { width: 100%; } }
.rk-users-roles { display: block; }
.rk-users-none { padding: 32px 16px; text-align: center; margin: 0; }
/* The users dialogs in the Gentelella modal frame: the header ruled off, the rest inset, the actions ruled above. */
.rk-users-dialog { width: 560px; gap: 16px; padding: 0 0 16px; }
.rk-users-dialog > .rk-dialog-head { align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--border-color-light); }
.rk-users-dialog > :not(.rk-dialog-head) { margin-inline: 18px; }
.rk-users-dialog .rk-dialog-actions { margin-top: 0; padding-top: 12px; border-top: 1px solid var(--border-color-light); }
.rk-users-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rk-users-sep { width: 3px; height: 3px; border-radius: var(--radius-full); background: var(--ink-muted); }
.rk-users-banner { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius); background: var(--surface-sunken); border: 1px solid var(--border-color-light); color: var(--ink); }
.rk-users-banner--invited { background: var(--blue-lt); border-color: color-mix(in srgb, var(--blue) 22%, transparent); }
.rk-users-banner--deactivated { background: var(--surface-sunken); }
.rk-users-banner-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rk-users-banner-title { font: 500 15.5px/21.5px var(--font-sans); }
.rk-users-form { display: flex; flex-direction: column; gap: 16px; }
.rk-users-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rk-users-fields .rk-span-2 { grid-column: 1 / -1; }
.rk-users-deactivate { margin-top: -8px; }
.rk-users-deactivate > .rk-appt-cancel-open { border: 0; background: none; font-family: inherit; cursor: pointer; color: var(--danger-ink); }
.rk-users-deactivate > .rk-appt-cancel-open:hover { background: var(--danger-soft); color: var(--danger-ink); }

/* Roles as cards: a real checkbox, hidden, with the card drawn around it. */
.rk-role-cards-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: -6px; }
.rk-role-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.rk-role-card {
    position: relative; display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; cursor: pointer;
    border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface-card);
    transition: background var(--duration-fast) ease, border-color var(--duration-fast) ease;
}
.rk-role-card:hover { background: var(--surface-app); }
.rk-role-card input { position: absolute; opacity: 0; width: 0; height: 0; }
.rk-role-card:has(input:checked) { background: var(--primary-soft); border-color: var(--primary); }
.rk-role-card:has(input:focus-visible) { box-shadow: var(--shadow-focus); }
.rk-role-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rk-role-card-name { font: 600 15.5px/21.5px var(--font-sans); color: var(--ink); }
.rk-role-card-check {
    width: 18px; height: 18px; flex: none; box-sizing: border-box; display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-full); border: 1.5px solid var(--border); color: transparent;
}
.rk-role-card:has(input:checked) .rk-role-card-check { background: var(--primary); border-color: var(--primary); color: var(--surface-card); }
@media (max-width: 560px) {
    .rk-role-cards, .rk-users-fields { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .rk-role-card { transition: none; } }

/* ----- Roles (#170, "Users Roles Settings") --------------------------------------------------------- */
.rk-roles { display: flex; flex-wrap: wrap; gap: var(--grid-gap); align-items: flex-start; }
.rk-roles-list, .rk-roles-panel {
    min-width: 0; background: var(--surface-card); border: 1px solid var(--border);
    border-radius: var(--radius-xl); box-shadow: var(--shadow-xs); display: flex; flex-direction: column;
}
/* Roles (#305): the roles as the design's cards in a column, the open one's groups as panels beside them. */
.rk-roles-list { flex: 1 1 300px; padding: 0; gap: 12px; background: none; border: 0; box-shadow: none; }
.rk-roles-item {
    display: flex; flex-direction: column; gap: 14px; padding: 16px; border-radius: var(--radius-lg);
    background: var(--surface-card); border: 1px solid var(--border); box-shadow: var(--shadow-card);
    color: inherit; text-decoration: none; transition: border-color var(--duration-fast) var(--ease-standard);
}
.rk-roles-item:hover { border-color: var(--primary); text-decoration: none; color: inherit; }
.rk-roles-item.is-active { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-lt); background: var(--surface-card); }
.rk-roles-item:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.rk-roles-item-head { display: flex; align-items: flex-start; gap: 12px; }
.rk-roles-item-id { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rk-roles-item-title { display: flex; align-items: center; gap: 8px; }
.rk-roles-item-name { font: 600 17.5px/24px var(--font-sans); color: var(--ink); white-space: nowrap; }
.rk-roles-tag { padding: 2px 6px; border-radius: var(--radius-sm); background: var(--surface-sunken); font: 600 12px/17px var(--font-sans); letter-spacing: 0.3px; text-transform: uppercase; color: var(--ink-muted); }
.rk-roles-well { flex: 0 0 40px; height: 40px; border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: center; background: var(--primary-lt); color: var(--primary); }
.rk-roles-well--purple { background: var(--purple-lt); color: var(--purple); }
.rk-roles-well--blue { background: var(--blue-lt); color: var(--blue); }
.rk-roles-well--green { background: var(--green-lt); color: var(--green); }
.rk-roles-well--yellow { background: var(--yellow-lt); color: var(--yellow); }
.rk-roles-well--azure { background: var(--azure-lt); color: var(--azure); }
.rk-roles-meter { display: flex; flex-direction: column; gap: 5px; }
.rk-roles-meter-head { display: flex; justify-content: space-between; font: 400 14px/19px var(--font-sans); color: var(--ink-muted); }
.rk-roles-meter-head > span:last-child { font-weight: 600; color: var(--ink); }
.rk-roles-meter-bar { height: 5px; border-radius: 3px; background: var(--surface-sunken); overflow: hidden; }
.rk-roles-meter-bar > span { display: block; height: 100%; }
.rk-roles-meter-bar > .rk-roles-well--purple { background: var(--purple); }
.rk-roles-meter-bar > .rk-roles-well--blue { background: var(--blue); }
.rk-roles-meter-bar > .rk-roles-well--green { background: var(--green); }
.rk-roles-meter-bar > .rk-roles-well--yellow { background: var(--yellow); }
.rk-roles-meter-bar > .rk-roles-well--azure { background: var(--azure); }
.rk-roles-meter-bar > .rk-roles-well--primary { background: var(--primary); }
.rk-roles-item-head .rk-push { margin-left: auto; white-space: nowrap; }
.rk-roles-item-members { display: flex; align-items: center; gap: 8px; padding-top: 10px; border-top: 1px solid var(--border-color-light); }
.rk-roles-item-members .rk-avatar { box-shadow: 0 0 0 2px var(--surface-card); }
.rk-avatar--more { background: var(--surface-sunken); color: var(--ink-secondary); }
.rk-roles-panel { flex: 2 1 520px; padding: 16px; gap: 16px; }
.rk-roles-grants { display: flex; flex-direction: column; gap: 20px; }
.rk-roles-panel-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px solid var(--border-color-light); }
.rk-roles-panel-title { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 2px; }
.rk-roles-panel-title .rk-card-title { margin: 0; font: 600 19px/29px var(--font-sans); }
.rk-roles-key {
    font: 500 14.5px/19px var(--font-mono, monospace); color: var(--ink-muted);
    background: var(--surface-sunken); border-radius: var(--radius-sm); padding: 2px 6px;
}
.rk-roles-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; align-items: start; }
.rk-roles-group { border: 1px solid var(--border-color-light); border-radius: var(--radius-lg); overflow: hidden; }
.rk-roles-group-head .rk-overline { margin: 0; flex: 1; min-width: 0; font: 600 15.5px/21.5px var(--font-sans); letter-spacing: 0; text-transform: none; color: var(--ink); }
.rk-roles-group-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--surface-sunken); color: var(--ink-secondary); }
.rk-roles-perms { display: flex; flex-direction: column; }
.rk-roles-perm { display: flex; align-items: center; gap: 12px; padding: 9px 12px; cursor: pointer; border-top: 1px solid var(--border-color-light); }
.rk-roles-perm-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rk-roles-perm-label { font: 400 15px/21.5px var(--font-sans); color: var(--ink); }
.rk-roles-perm code { font: 12.5px/17px var(--font-mono, monospace); color: var(--ink-muted); }
.rk-roles-perm:has(input:focus-visible) .rk-switch-track { box-shadow: var(--shadow-focus); }
.rk-roles-groups:disabled .rk-roles-perm { cursor: default; }
.rk-roles-groups:disabled .rk-switch { opacity: 0.6; cursor: default; }
.rk-roles-own { display: flex; flex-direction: column; gap: 8px; padding-top: 16px; border-top: 1px solid var(--border); }
.rk-roles-own p { margin: 0; }
.rk-roles-own-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.rk-roles-own .rk-input { width: 220px; max-width: 100%; }
.rk-roles-panel > .rk-caption { margin: 0; }
.rk-roles-dialog { width: 420px; gap: 20px; }
@media (prefers-reduced-motion: reduce) { .rk-roles-item { transition: none; } }

/* ----- Settings (#174; the Gentelella "Settings" screen, #309) ----------------------------------------------- */
/* The sections' menu is the design's tab bar: underlined, in a card that stays under the topbar while the page scrolls.
   Every section stays on the page; the bar jumps to it, and portal.js marks the one in view. */
/* Two columns (#338): the sections menu down the left, kept in view while the sections scroll past on the right. */
.rk-settings { display: grid; grid-template-columns: 220px minmax(0, 1fr); align-items: start; gap: var(--grid-gap); }
.rk-settings-nav {
    position: sticky; top: calc(var(--topbar-height) + 8px); z-index: 20; display: flex; flex-direction: column; gap: 2px; padding: 8px;
    max-height: calc(100vh - var(--topbar-height) - 24px); overflow-y: auto; scrollbar-width: thin; box-sizing: border-box;
    background: var(--surface-card); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
}
.rk-settings-nav-item {
    display: flex; align-items: center; gap: 9px; padding: 8px 10px; flex: none; border-radius: var(--radius-md);
    white-space: nowrap; color: var(--ink-muted); font: 500 15.5px/21.5px var(--font-sans);
    text-decoration: none; transition: color 100ms, background-color 100ms;
}
.rk-settings-nav-item:hover { color: var(--ink); background: var(--surface-sunken); text-decoration: none; }
.rk-settings-nav-item.is-active { color: var(--primary); background: var(--primary-soft); box-shadow: inset 3px 0 0 var(--primary); }
.rk-settings-nav-item:focus-visible { outline: none; box-shadow: inset var(--shadow-focus); }
.rk-settings-body { min-width: 0; display: flex; flex-direction: column; gap: var(--grid-gap); }
/* A section is a card: its title ruled off as the card's header, the rest inset beneath. */
.rk-settings-section {
    scroll-margin-top: calc(var(--topbar-height) + 16px); background: var(--surface-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-card); padding: 0 0 16px; display: flex; flex-direction: column; gap: 12px;
}
.rk-settings-section > :not(.rk-settings-head) { margin-inline: 16px; }
.rk-settings-section > .rk-settings-head { padding: 12px 16px; border-bottom: 1px solid var(--border-color-light); }
.rk-settings-section .rk-alert { margin: 0; }
/* A section that is only a way to another page (Booking page › Appearance, #440): its heading and button, nothing under them. */
.rk-settings-section--link { padding-bottom: 0; }
.rk-settings-section--link > .rk-settings-head { border-bottom: 0; }
.rk-settings-head { display: flex; flex-direction: column; gap: 2px; }
.rk-settings-head--split { flex-direction: row; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.rk-settings-title { margin: 0; font: var(--text-section-title); color: var(--ink); }
.rk-settings-head > .rk-small { font-size: 14px; line-height: 19px; }
.rk-settings-form { display: flex; flex-direction: column; gap: 16px; }
.rk-settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.rk-settings-narrow { max-width: 320px; }
.rk-settings-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 4px; }
.rk-input[readonly] { background: var(--surface-app); color: var(--ink-secondary); }
.rk-settings-toggles { display: flex; flex-direction: column; }
.rk-settings-toggle { display: flex; align-items: center; gap: 16px; padding: 12px 0; cursor: pointer; }
.rk-settings-toggle + .rk-settings-toggle { border-top: 1px solid var(--border-color-light); }
.rk-settings-toggle:has(input:focus-visible) .rk-switch-track { box-shadow: var(--shadow-focus); }
.rk-settings-toggle-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rk-settings-toggle-label { font: 500 15.5px/21.5px var(--font-sans); color: var(--ink); }
.rk-settings-head--split .rk-settings-lead { width: 200px; flex: none; }
.rk-settings-matrix-wrap { overflow-x: auto; }
.rk-settings-matrix { min-width: 520px; display: flex; flex-direction: column; }
.rk-settings-matrix-head, .rk-settings-matrix-row { display: grid; grid-template-columns: minmax(0, 1fr) 88px 88px; gap: 16px; align-items: center; padding: 0 16px; }
.rk-settings-matrix-head { height: 36px; background: var(--surface-sunken); border-radius: var(--radius-lg); font: 500 14.5px/19px var(--font-sans); color: var(--ink-secondary); }
.rk-settings-matrix-head span + span, .rk-settings-matrix-row > span + span { text-align: center; }
.rk-settings-matrix-row { padding-top: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.rk-settings-matrix-row .rk-settings-toggle-label { font: 500 15.5px/21.5px var(--font-sans); }
.rk-settings-matrix-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rk-settings-matrix-row input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; }
.rk-settings-wa { display: flex; align-items: center; gap: 16px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-lg); flex-wrap: wrap; }
.rk-settings-wa-icon {
    width: 36px; height: 36px; flex: none; border-radius: var(--radius-full); background: var(--success-soft); color: var(--success-ink);
    display: flex; align-items: center; justify-content: center;
}
.rk-settings-wa-text { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 2px; }
.rk-settings-wa-number { font: 500 17px/24px var(--font-sans); color: var(--ink); }
.rk-settings-more { border-top: 1px solid var(--border); padding-top: 12px; }
.rk-settings-more-summary {
    display: inline-flex; align-items: center; gap: 6px; cursor: pointer; list-style: none;
    font: 500 15.5px/21.5px var(--font-sans); color: var(--primary);
}
.rk-settings-more-summary::-webkit-details-marker { display: none; }
.rk-settings-more[open] .rk-settings-more-summary { margin-bottom: 16px; }
.rk-settings-more[open] .rk-settings-more-summary svg { transform: rotate(180deg); }
.rk-settings-link { display: flex; align-items: center; gap: 8px; }
.rk-settings-link-value {
    flex: 1; min-width: 0; height: 40px; display: flex; align-items: center; padding: 0 12px; box-sizing: border-box;
    border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-app);
    font: var(--text-body); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rk-settings-code-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rk-settings-code {
    margin: 0; padding: 14px 16px; background: var(--surface-sunken); border-radius: var(--radius-lg);
    font: 14.5px/24px var(--font-mono, monospace); color: var(--ink); white-space: pre-wrap; word-break: break-all;
}
.rk-settings-copied:empty { display: none; }
/* A phone keeps the strip: the menu across the top, scrolled sideways. */
@media (max-width: 900px) {
    .rk-settings { grid-template-columns: minmax(0, 1fr); }
    .rk-settings-nav { position: static; flex-direction: row; gap: 4px; padding: 4px 8px; max-height: none; overflow: auto hidden; scrollbar-width: none; }
    .rk-settings-nav::-webkit-scrollbar { display: none; }
    .rk-settings-nav-item.is-active { box-shadow: inset 0 -2px 0 var(--primary); }
}
@media (prefers-reduced-motion: reduce) { .rk-settings-nav-item { transition: none; } }

/* ----- All appointments (#181, Gentelella #278) ---------------------------------------------------------- */
/* A filter card, then the list as a card of its own: the design's table, footer and empty state. */
.rk-appts { padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.rk-appts-filters { display: flex; flex-direction: column; gap: 12px; }
.rk-appts-selects { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.rk-appts-search { min-width: 0; gap: 8px; }
.rk-appts-search input[type="search"]::-webkit-search-cancel-button { cursor: pointer; }
.rk-appts-actions { display: flex; justify-content: flex-end; gap: 8px; }
.rk-appts-actions:not(:has(> :not(noscript))) { display: none; }
.rk-appts-list { padding: 0; overflow: hidden; }
.rk-appts-foot {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    padding: 10px 16px; border-top: 1px solid var(--border-color-light); font: 400 14.5px/19px var(--font-sans); color: var(--ink-muted);
}
.rk-appts-foot .rk-pager { flex: 0 1 auto; }
.rk-appts-list > .rk-empty { padding: 48px 16px; }

/* Appointment rows: a grid of links, so the whole row opens the appointment, drawn as the design's table
   (uppercase head on the secondary surface, light row rules, secondary ink). The client and price columns come
   and go with the page (a client's own page leaves the client out). */
.rk-appt-list-wrap { overflow-x: auto; }
.rk-appt-list {
    --appt-cols: 130px minmax(140px, 1fr) 130px 110px 120px;
    display: flex; flex-direction: column; min-width: 700px;
}
.rk-appt-list.has-client { --appt-cols: 130px minmax(180px, 1.4fr) minmax(140px, 1fr) 130px 110px 120px; min-width: 880px; }
.rk-appt-list.has-price { --appt-cols: 130px minmax(140px, 1fr) 130px 110px 120px 96px; }
.rk-appt-list.has-client.has-price { --appt-cols: 130px minmax(180px, 1.4fr) minmax(140px, 1fr) 130px 110px 120px 96px; min-width: 960px; }
.rk-appt-list-head, .rk-appt-row { display: grid; grid-template-columns: var(--appt-cols); gap: 16px; align-items: center; padding: 0 16px; }
.rk-appt-list-head {
    padding-block: 8px; background: var(--surface-sunken); border-bottom: 1px solid var(--border);
    font: 600 13px/19px var(--font-sans); letter-spacing: 0.3px; text-transform: uppercase; color: var(--ink-muted);
}
.rk-appt-row {
    padding-block: 8px; border-bottom: 1px solid var(--border-color-light); color: var(--ink-secondary); text-decoration: none;
    font: 400 15.5px/21.5px var(--font-sans); transition: background 80ms;
}
.rk-appt-row:last-child { border-bottom: 0; }
.rk-appt-row:hover, .rk-appt-row.is-open { background: var(--surface-sunken); color: var(--ink-secondary); }
.rk-appt-row:focus-visible { outline: none; box-shadow: inset var(--shadow-focus); }
.rk-appt-row > * { min-width: 0; }
.rk-appt-row-stack { display: flex; flex-direction: column; min-width: 0; }
.rk-appt-row-strong { font: 500 15.5px/21.5px var(--font-sans); color: var(--ink); }
.rk-appt-row-client { display: flex; align-items: center; gap: 10px; }
.rk-appt-row-service { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.rk-appt-row-note { display: inline-flex; color: var(--yellow); }
.rk-appt-row-price { align-items: flex-end; text-align: right; }
.rk-appt-row-price .rk-appt-row-strong { font-weight: 600; letter-spacing: -0.2px; }
.rk-appt-row-price .rk-caption { font-size: 14px; }
.rk-appt-row .rk-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-appt-list-head .rk-cell-num { text-align: right; }

/* The lock line under a finished appointment, and its history as the design's timeline, scrolling in place. */
.rk-appt-locked { display: flex; align-items: center; gap: 8px; padding-top: 14px; border-top: 1px solid var(--border-color-light); }
.rk-appt-locked-text {
    flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: var(--radius);
    background: var(--surface-sunken); font: 400 14.5px/19px var(--font-sans); color: var(--ink-muted);
}
.rk-appt-locked-text > svg { flex: none; }
:is(.rk-appt-card, .rk-appt-dialog) .rk-history { margin-top: 0; gap: 10px; }
:is(.rk-appt-card, .rk-appt-dialog) .rk-history > .rk-label { margin: 0; font: 600 13px/19px var(--font-sans); letter-spacing: 0.4px; text-transform: uppercase; color: var(--ink-muted); }
:is(.rk-appt-card, .rk-appt-dialog) .rk-history-list {
    position: relative; gap: 0; max-height: 200px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
    padding: 2px 6px 2px 24px;
}
:is(.rk-appt-card, .rk-appt-dialog) .rk-history-item { position: relative; padding: 0 0 18px; border: 0; border-radius: 0; background: none; }
:is(.rk-appt-card, .rk-appt-dialog) .rk-history-item:last-child { padding-bottom: 0; }
:is(.rk-appt-card, .rk-appt-dialog) .rk-history-item::before {
    content: ""; position: absolute; left: -22px; top: 4px; width: 12px; height: 12px; box-sizing: border-box; z-index: 1;
    border-radius: var(--radius-full); border: 2px solid var(--border); background: var(--surface-card);
}
:is(.rk-appt-card, .rk-appt-dialog) .rk-history-item:first-child::before { border-color: var(--primary); background: var(--primary); }
:is(.rk-appt-card, .rk-appt-dialog) .rk-history-item::after {
    content: ""; position: absolute; left: -17px; top: 16px; bottom: -4px; width: 2px; background: var(--border-color-light);
}
:is(.rk-appt-card, .rk-appt-dialog) .rk-history-item:last-child::after { display: none; }
:is(.rk-appt-card, .rk-appt-dialog) .rk-history-item strong { font-weight: 500; font-size: 15.5px; color: var(--ink); }
:is(.rk-appt-card, .rk-appt-dialog) .rk-history-item .rk-caption { font-size: 14.5px; line-height: 21.5px; }

/* A toast for a finished action: bottom right with a green edge, fading on its own after a few seconds, or dismissed. */
.rk-toast-host { position: fixed; right: 16px; bottom: 16px; z-index: 1000; max-width: calc(100vw - 32px); animation: rk-toast-life 3s ease forwards; }
.rk-toast {
    display: flex; align-items: center; gap: var(--space-2-5); width: 360px; max-width: 100%; padding: 10px 14px 10px 11px; box-sizing: border-box;
    background: var(--surface-card); color: var(--ink); border: 1px solid var(--border); border-inline-start: 3px solid var(--green);
    border-radius: var(--radius); box-shadow: var(--shadow-popover); font: 500 15.5px/21.5px var(--font-sans);
}
.rk-toast-icon { width: 24px; height: 24px; flex: none; display: inline-flex; align-items: center; justify-content: center; color: var(--green); }
.rk-toast-text { flex: 1; min-width: 0; }
.rk-toast-title { font: 500 15.5px/21.5px var(--font-sans); color: var(--ink); }
.rk-toast-close { display: flex; padding: 4px; color: var(--ink-muted); }
.rk-toast-close:hover { color: var(--ink); }
@keyframes rk-toast-life {
    0% { opacity: 0; transform: translateY(8px); }
    6%, 88% { opacity: 1; transform: none; }
    100% { opacity: 0; visibility: hidden; }
}
@media (prefers-reduced-motion: reduce) { .rk-toast-host { animation: none; } }

/* ---- detail pages (#185): the header, two columns, sections and details the facility and practitioner pages share */
.rk-client-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.rk-client-id { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 6px; }
.rk-client-id .rk-page-title { margin: 0; }
.rk-client-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font: var(--text-small); color: var(--ink-muted); }

.rk-client-layout { display: flex; flex-wrap: wrap; gap: var(--grid-gap); align-items: flex-start; }
.rk-client-main { flex: 2 1 560px; min-width: 0; display: flex; flex-direction: column; gap: var(--grid-gap); }
.rk-client-side { flex: 1 1 320px; min-width: 0; position: sticky; top: 24px; }
.rk-client-section { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.rk-client-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* A coloured dot. */
.rk-dot { width: 8px; height: 8px; flex: none; border-radius: var(--radius-full); background: var(--ink-muted); }
.rk-dot--primary { background: var(--primary); }
.rk-dot--success { background: var(--success); }
.rk-dot--danger { background: var(--danger); }
.rk-dot--warning { background: var(--warning); }

.rk-nowrap { white-space: nowrap; }

/* Activity: the client's own history as a timeline, each entry a dot on a line. */
.rk-client-activity .rk-history { margin-top: 0; }
.rk-client-activity .rk-history > .rk-label { display: none; }
.rk-client-activity .rk-history-list { gap: 0; }
.rk-client-activity .rk-history-item { position: relative; padding: 0 0 16px 24px; border: 0; border-radius: 0; background: none; }
.rk-client-activity .rk-history-item::before {
    content: ""; position: absolute; left: 2px; top: 5px; width: 8px; height: 8px; border-radius: var(--radius-full); background: var(--border);
}
.rk-client-activity .rk-history-item:first-child::before { background: var(--primary); }
.rk-client-activity .rk-history-item::after { content: ""; position: absolute; left: 5.5px; top: 15px; bottom: 0; width: 1px; background: var(--border); }
.rk-client-activity .rk-history-item:last-child::after { display: none; }

/* Details: read as rows, edited in place. */
.rk-detail-rows { display: flex; flex-direction: column; margin: 0; }
.rk-detail-row { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; }
.rk-detail-row + .rk-detail-row { border-top: 1px solid var(--border); }
.rk-detail-row > svg { margin-top: 2px; flex: none; }
.rk-detail-row > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rk-detail-row dd { margin: 0; font: 17px/24px var(--font-sans); color: var(--ink); overflow-wrap: anywhere; white-space: pre-wrap; }
.rk-detail-row dd.rk-muted { color: var(--ink-muted); }
.rk-client-form { display: flex; flex-direction: column; gap: 14px; }
.rk-client-form-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rk-client-form textarea.rk-input { height: auto; min-height: 80px; resize: vertical; padding-block: 10px; }
.rk-client-form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border); }
@media (max-width: 420px) { .rk-client-form-pair { grid-template-columns: 1fr; } }

/* ---- one client (#185; the Gentelella "Client Detail" screen, #286) ------------------------------------- */
/* A small tag: a 6% tint behind its own colour, as the design's tier and state labels. */
.rk-tag {
    display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: var(--radius-full);
    font: 600 14px/1 var(--font-sans); white-space: nowrap; background: var(--neutral-soft); color: var(--neutral-ink);
}
.rk-tag--success { background: var(--green-lt); color: var(--green); }
.rk-tag--info { background: var(--blue-lt); color: var(--blue); }
.rk-tag--purple { background: var(--purple-lt); color: var(--purple); }
.rk-tag--warning { background: var(--yellow-lt); color: var(--warning-ink); }
.rk-tag--danger { background: var(--red-lt); color: var(--red); }

/* The profile: avatar, name with its tier, the meta line and the ways to reach them, then the counts as a strip. */
.rk-client-profile { overflow: hidden; }
.rk-cd-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 20px; background: linear-gradient(var(--primary-lt), var(--primary-lt)), var(--surface-card); }
.rk-cd-id { flex: 1; min-width: 240px; display: flex; flex-direction: column; gap: 8px; }
.rk-client-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rk-client-name { margin: 0; font: 600 24px/31px var(--font-sans); letter-spacing: -0.4px; color: var(--ink); }
.rk-cd-meta { margin-top: 2px; font: 400 15px/21.5px var(--font-sans); color: var(--ink-muted); }
.rk-client-contacts { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rk-contact-chip {
    display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px;
    border: 1px solid var(--border); border-radius: var(--radius-full); background: var(--surface-card);
    font: 400 14.5px/1 var(--font-sans); color: var(--ink-secondary); text-decoration: none; white-space: nowrap;
    transition: background 100ms, color 100ms;
}
.rk-contact-chip:hover { background: var(--surface-sunken); color: var(--ink); text-decoration: none; }
.rk-client-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.rk-stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); border-top: 1px solid var(--border-color-light); }
.rk-stat-cell { display: flex; flex-direction: column; padding: 12px 16px; border-inline-end: 1px solid var(--border-color-light); min-width: 0; }
.rk-stat-cell:last-child { border-inline-end: 0; }
.rk-stat-cell-label { font: 600 13px/19px var(--font-sans); letter-spacing: 0.4px; text-transform: uppercase; color: var(--ink-muted); }
.rk-stat-cell-value { margin-top: 2px; font: 600 24px/31px var(--font-sans); letter-spacing: -0.5px; color: var(--ink); white-space: nowrap; }
.rk-stat-cell-sub { min-height: 16px; font: 400 14px/19px var(--font-sans); color: var(--ink-muted); white-space: nowrap; }

/* The staff note, as a strip under the profile. */
.rk-client-note {
    display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px; border-radius: var(--radius);
    background: var(--yellow-lt); border: 1px solid var(--border-color-light); font: 400 15.5px/21.5px var(--font-sans); color: var(--ink);
}
.rk-client-note > svg { flex: none; margin-top: 2px; color: var(--yellow); }

/* Two columns: the visits, then habits and details. */
.rk-cd-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--grid-gap); align-items: start; }
.rk-cd-main, .rk-cd-side { display: flex; flex-direction: column; gap: var(--grid-gap); min-width: 0; }
@media (max-width: 1100px) { .rk-cd-layout { grid-template-columns: minmax(0, 1fr); } }

/* The next visit: a primary card with a solid date tile, what, with whom and through what, Move and Open. */
.rk-client-next { padding: 16px; gap: 12px; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-lt); }
.rk-client-next-label { font: 600 13px/19px var(--font-sans); letter-spacing: 0.4px; text-transform: uppercase; color: var(--primary); }
.rk-client-next-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.rk-date-tile { flex: 0 0 52px; height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; border-radius: var(--radius); background: var(--surface-sunken); }
.rk-date-tile--solid { background: var(--primary); color: #fff; }
.rk-date-tile-dow { font: 600 12px/1.2 var(--font-sans); letter-spacing: 0.4px; text-transform: uppercase; }
.rk-date-tile-day { font: 600 24px/1.2 var(--font-sans); letter-spacing: -0.5px; }
.rk-date-tile-mon { font: 400 12.5px/1.2 var(--font-sans); }
.rk-client-next-what { flex: 1; min-width: 180px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.rk-client-next-title { font: 600 19px/26.5px var(--font-sans); letter-spacing: -0.2px; color: var(--ink); }
.rk-client-next-what .rk-badge { margin-top: 4px; }
.rk-client-next-actions { display: flex; gap: 8px; }

/* Visits by month: day, a status dot, what and when, the price and how it stands. The whole row opens it. */
.rk-client-visits { padding: 4px 16px 12px; max-height: 380px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.rk-client-month { padding: 12px 0 4px; font: 600 13px/19px var(--font-sans); letter-spacing: 0.4px; text-transform: uppercase; color: var(--ink-muted); }
.rk-client-visit {
    display: grid; grid-template-columns: 44px 12px minmax(0, 1fr) auto; align-items: center; gap: 12px;
    padding: 9px 8px; margin: 0 -8px; border-radius: var(--radius); color: inherit; text-decoration: none; transition: background 80ms;
}
.rk-client-visit:hover, .rk-client-visit.is-open { background: var(--surface-sunken); color: inherit; text-decoration: none; }
.rk-client-visit-day { display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.rk-client-visit-day > span:first-child { font: 600 12px/1.2 var(--font-sans); text-transform: uppercase; color: var(--ink-muted); }
.rk-client-visit-day > span:last-child { font: 600 20.5px/1.2 var(--font-sans); letter-spacing: -0.4px; color: var(--ink); }
.rk-client-visit-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ink-muted); box-shadow: 0 0 0 3px var(--neutral-soft); }
.rk-client-visit-dot--primary { background: var(--primary); box-shadow: 0 0 0 3px var(--primary-lt); }
.rk-client-visit-dot--info { background: var(--blue); box-shadow: 0 0 0 3px var(--blue-lt); }
.rk-client-visit-dot--success { background: var(--green); box-shadow: 0 0 0 3px var(--green-lt); }
.rk-client-visit-dot--warning { background: var(--yellow); box-shadow: 0 0 0 3px var(--yellow-lt); }
.rk-client-visit-dot--danger { background: var(--red); box-shadow: 0 0 0 3px var(--red-lt); }
.rk-client-visit-what { display: flex; flex-direction: column; min-width: 0; }
.rk-client-visit-service { font: 600 15.5px/21.5px var(--font-sans); color: var(--ink); }
.rk-client-visit-end { display: flex; flex-direction: column; align-items: flex-end; white-space: nowrap; }
.rk-client-visit-price { font: 600 15.5px/21.5px var(--font-sans); color: var(--ink); }
.rk-client-visit.is-cancelled :is(.rk-client-visit-service, .rk-client-visit-price) { text-decoration: line-through; color: var(--ink-muted); }

/* Habits, then how often they show up as one bar of completed, cancelled and missed. */
.rk-client-habits { padding-top: 4px; }
.rk-client-habit { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border-color-light); }
.rk-client-habit > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.rk-client-habit-icon { width: 28px; height: 28px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; background: var(--primary-lt); color: var(--primary); }
.rk-client-habit-value { font: 500 15.5px/21.5px var(--font-sans); color: var(--ink); }
.rk-client-shows { padding-top: 12px; }
.rk-client-shows-head { display: flex; justify-content: space-between; margin-bottom: 6px; font: 400 14.5px/19px var(--font-sans); }
.rk-client-shows-bar { display: flex; height: 6px; border-radius: 3px; overflow: hidden; background: var(--surface-sunken); }
.rk-client-shows-bar .is-done, .rk-client-shows-key .is-done { background: var(--green); }
.rk-client-shows-bar .is-cancelled, .rk-client-shows-key .is-cancelled { background: var(--red); opacity: 0.6; }
.rk-client-shows-bar .is-noshow, .rk-client-shows-key .is-noshow { background: var(--yellow); }
.rk-client-shows-key { display: flex; gap: 12px; margin-top: 6px; font: 400 13px/19px var(--font-sans); color: var(--ink-muted); }
.rk-client-shows-key i { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; vertical-align: 1px; }

/* Details: label and value in two columns, edited in place. */
.rk-cd-card .rk-card-body { padding-top: 8px; }
.rk-cd-fields { margin: 0; }
.rk-cd-field { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border-color-light); font: 400 15.5px/21.5px var(--font-sans); }
.rk-cd-field:last-child { border-bottom: 0; }
.rk-cd-field dt { color: var(--ink-muted); }
.rk-cd-field dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; white-space: pre-wrap; }
.rk-cd-field dd.rk-muted { color: var(--ink-disabled); }

/* Activity: the record's history as the design's timeline. */
.rk-cd-activity .rk-history { margin-top: 0; }
.rk-cd-activity .rk-history > .rk-label { display: none; }
.rk-cd-activity .rk-history-list { gap: 0; padding-left: 24px; }
.rk-cd-activity .rk-history-item { position: relative; padding: 0 0 18px; border: 0; border-radius: 0; background: none; }
.rk-cd-activity .rk-history-item::before {
    content: ""; position: absolute; left: -22px; top: 4px; width: 12px; height: 12px; box-sizing: border-box; z-index: 1;
    border-radius: 50%; border: 2px solid var(--border); background: var(--surface-card);
}
.rk-cd-activity .rk-history-item:first-child::before { border-color: var(--primary); background: var(--primary); }
.rk-cd-activity .rk-history-item::after { content: ""; position: absolute; left: -17px; top: 16px; bottom: -4px; width: 2px; background: var(--border-color-light); }
.rk-cd-activity .rk-history-item:last-child::after { display: none; }

/* The details form, shared with the facility and practitioner pages. */
.rk-client-new { max-width: 560px; }

/* ---- the service catalogue (#189): the Claude Design "Services" screen --------------------------- */
.rk-services { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.rk-services-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.rk-services-search { width: 240px; max-width: 100%; }
.rk-services-wrap { overflow-x: auto; }
.rk-services-list { min-width: 780px; display: flex; flex-direction: column; }
.rk-services-head, .rk-services-row {
    display: grid; grid-template-columns: minmax(240px, 2.2fr) 110px 110px minmax(150px, 1fr) 150px 24px; gap: 16px; align-items: center; padding: 0 16px;
}
.rk-services-head { height: 40px; background: var(--surface-sunken); border-radius: var(--radius-lg); font: 500 14.5px/19px var(--font-sans); color: var(--ink-secondary); }
.rk-services-row { position: relative; min-height: 64px; padding-block: 10px; border-bottom: 1px solid var(--border); transition: background var(--duration-fast) var(--ease-standard); }
.rk-services-row:hover, .rk-services-row.is-open { background: var(--surface-app); }
.rk-services-row.is-hidden > :not(.rk-services-switch) { opacity: .7; }
.rk-services-name { display: flex; align-items: center; gap: 12px; min-width: 0; }
.rk-services-well {
    width: 36px; height: 36px; flex: none; border-radius: var(--radius-full); display: flex; align-items: center; justify-content: center;
    background: var(--primary-soft); color: var(--primary-soft-ink);
}
.rk-services-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
/* The name is the row's link, stretched over the whole row; the switch sits above it and keeps its own click. */
.rk-services-link { font: 500 17px/24px var(--font-sans); color: var(--ink); text-decoration: none; }
.rk-services-link::after { content: ""; position: absolute; inset: 0; }
.rk-services-link:hover { color: var(--ink); text-decoration: none; }
.rk-services-link:focus-visible { outline: none; }
.rk-services-link:focus-visible::after { box-shadow: var(--shadow-focus); border-radius: var(--radius-md); }
.rk-services-mins { display: inline-flex; align-items: center; gap: 6px; font: var(--text-small); color: var(--ink); }
.rk-services-price { font: 500 17px/24px var(--font-sans); color: var(--ink); text-align: right; }
.rk-services-who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rk-services-nobody { color: var(--warning-ink); }
.rk-services-switch { position: relative; z-index: 1; }
.rk-services-none { padding: 40px 16px; text-align: center; font: var(--text-body); color: var(--ink-muted); }

.rk-avatar-stack { display: inline-flex; align-items: center; flex: none; }
.rk-avatar-stack > * + * { margin-left: -8px; }
.rk-avatar-stack > .rk-avatar { box-shadow: 0 0 0 2px var(--surface-card); }
.rk-avatar-more {
    display: inline-flex; align-items: center; justify-content: center; height: 24px; min-width: 24px; padding: 0 6px; box-sizing: border-box;
    border-radius: var(--radius-full); background: var(--surface-sunken); box-shadow: 0 0 0 2px var(--surface-card);
    font: 600 13px/1 var(--font-sans); color: var(--ink-secondary);
}

/* A switch that is a submit button (a form per row), drawn like .rk-switch--sm. */
.rk-switch-btn {
    display: inline-flex; align-items: center; gap: 10px; padding: 0; border: 0; background: none; cursor: pointer;
    font: var(--text-small); color: var(--ink);
}
.rk-switch-btn .rk-switch-track { width: 32px; height: 18px; }
.rk-switch-btn .rk-switch-track::after { width: 14px; height: 14px; }
.rk-switch-btn[aria-checked="true"] .rk-switch-track { background: var(--primary); }
.rk-switch-btn[aria-checked="true"] .rk-switch-track::after { transform: translateX(14px); }
.rk-switch-btn:focus-visible { outline: none; }
.rk-switch-btn:focus-visible .rk-switch-track { box-shadow: var(--shadow-focus); }

/* The service dialog. */
.rk-service-dialog { width: 540px; }
.rk-service-form { display: flex; flex-direction: column; gap: 18px; margin-top: 16px; }
.rk-service-form-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rk-service-who { display: flex; flex-direction: column; gap: 10px; }
.rk-service-who-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.rk-service-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rk-person-chip {
    display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px 0 6px; box-sizing: border-box;
    border: 1px solid var(--border); border-radius: var(--radius-full); background: var(--surface-card);
    font: 500 15.5px/21.5px var(--font-sans); color: var(--ink); cursor: pointer;
    transition: background var(--duration-fast) var(--ease-standard), border-color var(--duration-fast) var(--ease-standard);
}
.rk-person-chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.rk-person-chip .rk-person-chip-check { display: none; color: var(--primary); }
.rk-person-chip:has(input:checked) { background: var(--primary-soft); border-color: var(--primary); }
.rk-person-chip:has(input:checked) .rk-person-chip-check { display: inline-block; }
.rk-person-chip:has(input:focus-visible) { box-shadow: var(--shadow-focus); }
.rk-service-bookable { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-lg); }
.rk-service-bookable > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rk-service-form-actions { display: flex; align-items: center; gap: 8px; padding-top: 16px; border-top: 1px solid var(--border); flex-wrap: wrap; }
@media (max-width: 480px) { .rk-service-form-pair { grid-template-columns: 1fr; } }
.rk-services-head .rk-cell-num { text-align: right; }

/* ---- Services as cards (#293, the Gentelella "Services" screen) ------------------------------------------ */
.rk-services-bar { margin-bottom: 0; }
.rk-services-note { flex: 1 1 100%; }
.rk-svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--grid-gap); }
.rk-svc-card { position: relative; transition: border-color 120ms var(--ease); }
.rk-svc-card:hover, .rk-svc-card.is-open { border-color: var(--primary); }
.rk-svc-card.is-hidden { opacity: 0.6; }
.rk-svc-card-body { flex: 1; display: flex; flex-direction: column; gap: 14px; padding: 16px; }
.rk-svc-card-head { display: flex; align-items: flex-start; gap: 12px; }
.rk-svc-card-well {
    flex: 0 0 40px; height: 40px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center;
    background: var(--primary-lt); color: var(--primary);
}
.rk-svc-card-well--blue { background: var(--blue-lt); color: var(--blue); }
.rk-svc-card-well--purple { background: var(--purple-lt); color: var(--purple); }
.rk-svc-card-well--yellow { background: var(--yellow-lt); color: var(--yellow); }
.rk-svc-card-well--green { background: var(--green-lt); color: var(--green); }
.rk-svc-card-well--azure { background: var(--azure-lt); color: var(--azure); }
.rk-svc-card-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rk-svc-card .rk-services-link { font: 600 17px/24px var(--font-sans); }
.rk-svc-card .rk-services-link::after { border-radius: var(--radius-lg); }
.rk-svc-card-price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.rk-svc-card-price > span:first-child { font: 600 26.5px/33.5px var(--font-sans); letter-spacing: -0.5px; color: var(--ink); }
.rk-svc-card-price > span:last-child { font: 400 15px/21.5px var(--font-sans); color: var(--ink-muted); }
.rk-svc-card-who { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--ink-muted); }
.rk-svc-card-who:has(.rk-services-nobody) { color: var(--warning-ink); }
.rk-svc-card-foot {
    position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 16px; border-top: 1px solid var(--border-color-light);
}

/* The service dialog: the form, and beside it how the service reads on the booking page and whether it can be booked. */
.rk-modal-body.rk-service-edit { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; }
.rk-service-edit-form, .rk-service-edit-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.rk-section-label { font: 600 13px/19px var(--font-sans); letter-spacing: 0.4px; text-transform: uppercase; color: var(--ink-muted); }
.rk-control--affix { padding-left: 0; overflow: hidden; }
.rk-affix { align-self: stretch; display: flex; align-items: center; padding: 0 10px; background: var(--surface-sunken); border-right: 1px solid var(--border); color: var(--ink-muted); font-size: 15.5px; }
.rk-modal .rk-person-chip { height: 30px; padding: 0 12px; font-size: 15px; }
.rk-modal .rk-person-chip:has(input:checked) { color: var(--primary); }
.rk-warning-ink { color: var(--warning-ink); }
.rk-service-preview { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--radius-lg); background: var(--surface-sunken); }
.rk-service-preview-card {
    display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: var(--radius-lg);
    background: var(--surface-card); border: 1px solid var(--primary);
}
.rk-service-preview-card.is-hidden { opacity: 0.5; border-color: var(--border); }
.rk-service-preview-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font: 600 17px/24px var(--font-sans); color: var(--ink); }
.rk-service-preview-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.rk-service-preview-book { display: inline-flex; align-items: center; height: 26px; padding: 0 12px; border-radius: var(--radius-sm); background: var(--primary); color: #fff; font: 500 14.5px/1 var(--font-sans); }
.rk-toggle-row { display: flex; align-items: center; gap: 12px; }
.rk-toggle-row > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rk-toggle-row-label { font: 500 15.5px/21.5px var(--font-sans); color: var(--ink); }
@media (max-width: 720px) { .rk-modal-body.rk-service-edit { grid-template-columns: minmax(0, 1fr); } }

/* ---- the team (#193): the Claude Design "Practitioners" screen ---------------------------------- */
.rk-team-bar { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 4px 16px 0; }
.rk-team-bar > .rk-tabs--underline { border-bottom: 0; }
.rk-team-bar > .rk-team-branch { margin-bottom: 8px; }
.rk-team-branch { width: 200px; max-width: 100%; }
.rk-team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--grid-gap); align-items: stretch; }
.rk-team-card { position: relative; display: flex; flex-direction: column; padding: 0; overflow: hidden; transition: border-color var(--duration-fast) var(--ease-standard); }
.rk-team-card:hover { border-color: var(--primary); }
.rk-team-card.is-off { opacity: .6; }
.rk-team-card-body { padding: 16px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.rk-team-card-head { display: flex; align-items: center; gap: 12px; }
.rk-team-card-head > .rk-badge { position: relative; z-index: 1; flex: none; }
.rk-team-avatar { position: relative; flex: none; display: inline-flex; }
.rk-team-dot { position: absolute; right: 0; bottom: 0; width: 12px; height: 12px; border-radius: var(--radius-full); border: 2px solid var(--surface-card); background: var(--ink-muted); box-sizing: border-box; }
.rk-team-dot.is-on { background: var(--success); }
.rk-team-id { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
/* The name is the card's link, stretched over the card. */
.rk-team-link { font: 600 17px/24px var(--font-sans); color: var(--ink); text-decoration: none; }
.rk-team-link::after { content: ""; position: absolute; inset: 0; }
.rk-team-link:hover { color: var(--ink); text-decoration: none; }
.rk-team-link:focus-visible { outline: none; }
.rk-team-link:focus-visible::after { box-shadow: var(--shadow-focus); border-radius: var(--radius-xl); }
.rk-team-services { display: flex; flex-wrap: wrap; gap: 6px; }
.rk-team-chip {
    display: inline-flex; align-items: center; height: 22px; padding: 0 8px; box-sizing: border-box; white-space: nowrap;
    border-radius: var(--radius-sm); background: var(--surface-sunken); font: 400 14px/19px var(--font-sans); color: var(--ink-secondary);
}
.rk-team-warn { display: inline-flex; align-items: center; gap: 6px; font: var(--text-caption); color: var(--warning-ink); }
.rk-team-warn--strip, .rk-team-services > .rk-team-warn {
    display: flex; padding: 8px 12px; border-radius: var(--radius); background: var(--yellow-lt);
    border: 1px solid color-mix(in srgb, var(--yellow) 22%, transparent); color: var(--ink);
}
.rk-team-warn--strip > svg, .rk-team-services > .rk-team-warn > svg { color: var(--yellow); }
.rk-team-services:has(> .rk-team-warn) { display: block; }
.rk-team-card-foot {
    margin: 0 16px; padding: 10px 0 14px; border-top: 1px solid var(--border-color-light);
    display: flex; align-items: baseline; justify-content: space-between; gap: 4px 12px; flex-wrap: wrap;
}
.rk-team-strong { font-weight: 600; color: var(--ink); }
.rk-team-booked { flex-basis: 100%; }
.rk-person-chip--plain { padding: 0 12px; }
.rk-grow { flex: 1; }
.rk-team-bar > .rk-team-branch { width: 200px; flex: none; }

/* ---- Notifications (#307): the outbox by day, the templates as cards ------------------------------------- */
.rk-notif { padding: 0; overflow: hidden; }
.rk-notif-bar { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 4px 16px 0; border-bottom: 1px solid var(--border-color-light); }
.rk-notif-bar > .rk-tabs--underline { border-bottom: 0; }
/* What gets sent (#440): its sections are cards of their own, under the tab bar. */
.rk-notif-sending { margin-top: var(--grid-gap); }
.rk-notif-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-bottom: 8px; }
.rk-notif-filters .rk-input { width: 150px; height: 32px; }
.rk-notif-outbox { padding: 0 16px 8px; }
.rk-notif-day { padding: 14px 0 6px; font: 600 13px/19px var(--font-sans); letter-spacing: 0.4px; text-transform: uppercase; color: var(--ink-muted); }
.rk-notif-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 8px; margin: 0 -8px; border-radius: var(--radius); }
.rk-notif-row:hover { background: var(--surface-sunken); }
.rk-notif-row.is-failed { background: var(--red-lt); }
.rk-notif-icon { width: 36px; height: 36px; border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: center; }
.rk-notif-icon.is-whatsapp { background: var(--green-lt); color: var(--green); }
.rk-notif-icon.is-email { background: var(--blue-lt); color: var(--blue); }
.rk-notif-what { display: flex; flex-direction: column; min-width: 0; }
.rk-notif-what > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-notif-title { font: 600 15.5px/21.5px var(--font-sans); color: var(--ink); }
.rk-notif-title > .rk-muted { font-weight: 400; }
.rk-notif-error { margin-top: 2px; font: 400 14px/19px var(--font-sans); color: var(--red); }
.rk-notif-end { display: flex; align-items: center; gap: 12px; }
.rk-notif-when { display: flex; flex-direction: column; align-items: flex-end; min-width: 72px; }
.rk-notif-templates { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; padding: 16px; }
.rk-notif-template { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--border-color-light); border-radius: var(--radius-lg); background: var(--surface-sunken); }
.rk-notif-template > div:first-child { display: flex; flex-direction: column; }
.rk-notif-template-name { font: 600 15.5px/21.5px var(--font-sans); color: var(--ink); }
.rk-notif-sample { margin: 0; padding: 10px 12px; border-radius: var(--radius); background: var(--surface-card); border: 1px solid var(--border-color-light); font: 400 15px/1.5 var(--font-sans); color: var(--ink-secondary); }
.rk-notif-channels { display: flex; gap: 8px; }
.rk-notif-channel {
    flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--radius);
    border: 1px solid var(--border); background: var(--surface-card); color: var(--ink-secondary); text-decoration: none;
}
.rk-notif-channel:hover { border-color: var(--primary); color: var(--ink-secondary); text-decoration: none; }
.rk-notif-channel-text { flex: 1; min-width: 0; display: flex; flex-direction: column; font: 400 13px/18px var(--font-sans); }
.rk-notif-channel-name { font: 500 14.5px/19px var(--font-sans); color: var(--ink); }
.rk-notif-custom { color: var(--primary); }
.rk-notif-edit { font: 400 14px/19px var(--font-sans); color: var(--primary); }
.rk-notif > .rk-empty { padding: 40px 16px; }

/* ---- one practitioner (#195): the Claude Design "Practitioner Detail" screen ------------------- */
.rk-meta-dot { width: 3px; height: 3px; border-radius: var(--radius-full); background: var(--ink-muted); }
.rk-client-meta-item { display: inline-flex; align-items: center; gap: 6px; }
.rk-prac-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.rk-prac-section-title { flex: 1; min-width: 240px; display: flex; flex-direction: column; gap: 2px; }
.rk-prac-indent { padding-left: 28px; text-wrap: pretty; }
.rk-prac-services { display: flex; flex-direction: column; gap: 16px; }
.rk-prac-svc-wrap { overflow-x: auto; }
.rk-prac-svc-list { min-width: 520px; display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.rk-prac-svc {
    display: grid; grid-template-columns: 24px minmax(0, 1fr) 90px 150px; gap: 14px; align-items: center; padding: 12px 16px;
    background: var(--surface-card); cursor: pointer; transition: background var(--duration-fast) var(--ease-standard);
}
.rk-prac-svc + .rk-prac-svc { border-top: 1px solid var(--border); }
.rk-prac-svc.is-off { background: var(--surface-app); }
.rk-prac-svc > input[type="checkbox"] { width: 18px; height: 18px; margin: 0; accent-color: var(--primary); }
.rk-prac-svc-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rk-prac-svc-title { font: 500 17px/24px var(--font-sans); color: var(--ink); }
.rk-prac-away-form { display: flex; flex-direction: column; gap: 14px; padding: 16px; border-radius: var(--radius-lg); background: var(--surface-sunken); }
.rk-prac-away-form .rk-service-chips { border: 0; margin: 0; padding: 0; }
.rk-prac-away-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rk-prac-away-list { display: flex; flex-direction: column; }
.rk-prac-away { display: flex; align-items: center; gap: 14px; padding: 12px 0; }
.rk-prac-away + .rk-prac-away { border-top: 1px solid var(--border); }
.rk-prac-away-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rk-prac-away-range { font: 500 17px/24px var(--font-sans); color: var(--ink); }
.rk-prac-well { width: 36px; height: 36px; flex: none; border-radius: var(--radius-full); display: flex; align-items: center; justify-content: center; background: var(--surface-sunken); color: var(--ink-secondary); }
.rk-prac-well--info { background: var(--info-soft); color: var(--info-ink); }
.rk-prac-well--warning { background: var(--warning-soft); color: var(--warning-ink); }
.rk-prac-well--primary { background: var(--primary-soft); color: var(--primary-soft-ink); }
.rk-prac-status { display: flex; align-items: center; gap: 10px; padding-top: 12px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.rk-danger-text { color: var(--danger); }
.rk-danger-text:hover { background: var(--danger-soft); color: var(--danger); }

/* ---- Facilities as cards (#299, the Gentelella "Facilities" screen) ------------------------------------------- */
.rk-site-tabs { padding: 4px 16px 0; }
.rk-site-tabs .rk-tabs--underline { border-bottom: 0; }
.rk-site-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--grid-gap); align-items: stretch; }
.rk-site-card.is-off { opacity: 0.6; }
.rk-site-card > .rk-card-head { flex-wrap: nowrap; }
.rk-site-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rk-site-link { color: var(--ink); text-decoration: none; }
.rk-site-link:hover { color: var(--primary); text-decoration: none; }
.rk-site-body { display: flex; flex-direction: column; gap: 12px; padding-top: 12px; }
/* The week, a cell a day: the day, a dot, opening and closing; today ringed in the primary, closed days greyed. */
.rk-site-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--border-color-light); border-radius: var(--radius); overflow: hidden; }
.rk-site-week .rk-branch-day {
    display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 2px 9px; width: auto; height: auto;
    border: 0; border-radius: 0; background: var(--surface-card); color: var(--ink);
}
.rk-site-week .rk-branch-day + .rk-branch-day { border-inline-start: 1px solid var(--border-color-light); }
.rk-site-week .rk-branch-day.is-closed { background: var(--surface-sunken); color: var(--ink-muted); }
.rk-site-week .rk-branch-day.is-today { background: var(--primary-lt); box-shadow: inset 0 0 0 1px var(--primary); font-weight: 400; }
.rk-site-day { font: 600 12.5px/1 var(--font-sans); letter-spacing: 0.4px; text-transform: uppercase; color: var(--ink-muted); }
.rk-branch-day.is-today .rk-site-day { color: var(--primary); }
.rk-site-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--green); }
.rk-branch-day.is-closed .rk-site-dot { background: var(--border-strong); }
.rk-site-open { font: 600 14.5px/1.15 var(--font-sans); letter-spacing: -0.2px; }
.rk-site-close { min-height: 13px; font: 400 13px/1.15 var(--font-sans); color: var(--ink-muted); }
.rk-site-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.rk-site-panel { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 10px 12px; border-radius: var(--radius); background: var(--surface-sunken); }
.rk-site-panel.is-closing { background: var(--yellow-lt); }
.rk-site-member { display: flex; align-items: center; gap: 8px; min-width: 0; font: 400 15px/21.5px var(--font-sans); color: var(--ink); white-space: nowrap; }
.rk-site-closure { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 8px; align-items: start; }
.rk-site-closure > svg { margin-top: 2px; color: var(--ink-muted); }
.rk-site-panel.is-closing .rk-site-closure > svg { color: var(--yellow); }
.rk-site-closure > span { display: flex; flex-direction: column; min-width: 0; }
.rk-site-closure-day { font: 600 15px/21.5px var(--font-sans); color: var(--ink); }
.rk-site-panel:not(.is-closing) .rk-site-closure-day { font-weight: 400; color: var(--ink-muted); }
.rk-site-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; padding: 10px 16px; border-top: 1px solid var(--border-color-light); }
.rk-site-zone { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; font: 400 14px/19px var(--font-sans); color: var(--ink-muted); white-space: nowrap; }

/* ---- branches (#197): the Claude Design "Facilities" screen ------------------------------------ */
.rk-branches { padding: 0; overflow: hidden; }
.rk-branch {
    position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 20px 32px; padding: 20px 24px;
    transition: background var(--duration-fast) var(--ease-standard);
}
.rk-branch + .rk-branch { border-top: 1px solid var(--border); }
.rk-branch:hover { background: var(--surface-app); }
.rk-branch.is-off > :not(.rk-branch-name) { opacity: .65; }
.rk-branch.is-off .rk-branch-text { opacity: .65; }
.rk-branch-name { flex: 1 1 300px; min-width: 260px; display: flex; align-items: center; gap: 14px; }
.rk-branch-well { width: 44px; height: 44px; flex: none; border-radius: var(--radius-full); background: var(--surface-sunken); display: flex; align-items: center; justify-content: center; color: var(--ink-secondary); }
.rk-branch-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rk-branch-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rk-branch-link { font: 600 19px/29px var(--font-sans); color: var(--ink); text-decoration: none; white-space: nowrap; }
.rk-branch-link::after { content: ""; position: absolute; inset: 0; }
.rk-branch-link:hover { color: var(--ink); text-decoration: none; }
.rk-branch-link:focus-visible { outline: none; }
.rk-branch-link:focus-visible::after { box-shadow: var(--shadow-focus); }
.rk-branch-pill {
    display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; white-space: nowrap; flex: none;
    border-radius: var(--radius-full); background: var(--surface-sunken); font: 500 14.5px/19px var(--font-sans); color: var(--ink-secondary);
}
.rk-branch-pill-dot { width: 6px; height: 6px; border-radius: var(--radius-full); background: var(--ink-muted); }
.rk-branch-pill--open { background: var(--success-soft); color: var(--success-ink); }
.rk-branch-pill--open .rk-branch-pill-dot { background: var(--success); }
.rk-branch-week { flex: 0 1 250px; min-width: 210px; display: flex; flex-direction: column; gap: 6px; }
.rk-branch-days { display: grid; grid-template-columns: repeat(7, 24px); gap: 4px; }
.rk-branch-day {
    height: 24px; box-sizing: border-box; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center;
    background: var(--surface-sunken); border: 1px solid var(--surface-sunken); font: 500 14.5px/19px var(--font-sans); color: var(--ink);
}
.rk-branch-day.is-closed { background: transparent; border-color: var(--border); color: var(--ink-muted); }
.rk-branch-day.is-today { border-color: var(--ink-muted); font-weight: 600; }
.rk-branch-team { flex: 0 1 220px; min-width: 200px; display: flex; align-items: center; gap: 10px; }
.rk-branch-team-text { min-width: 0; display: flex; flex-direction: column; }
.rk-branch-team-names { font: 500 15.5px/21.5px var(--font-sans); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-branch-foot { flex: 1 1 200px; min-width: 180px; display: flex; align-items: center; gap: 8px; color: var(--ink-muted); }
.rk-branch-foot.is-closing { color: var(--warning-ink); }
.rk-branch-foot > svg { flex: none; }
.rk-facility-dialog { width: 600px; }
.rk-facility-address { display: flex; flex-direction: column; gap: 8px; }
.rk-facility-address-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.2fr) minmax(0, .8fr); gap: 8px; }
.rk-facility-settings { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.rk-facility-setting { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.rk-facility-setting + .rk-facility-setting { border-top: 1px solid var(--border); }
.rk-facility-setting > svg { flex: none; }
.rk-facility-setting > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rk-facility-setting > .rk-input { width: 210px; flex: none; }
.rk-facility-setting--note { background: var(--surface-app); }
@media (max-width: 560px) { .rk-facility-address-row { grid-template-columns: 1fr; } .rk-facility-setting { flex-wrap: wrap; } .rk-facility-setting > .rk-input { width: 100%; } }
.rk-tabs--fit { align-self: flex-start; }
.rk-branch { padding-right: 56px; }
.rk-branch .rk-branch-chevron { position: absolute; right: 24px; top: 50%; transform: translateY(-50%); }
.rk-branch { column-gap: 24px; }
.rk-branch-name { flex-basis: 260px; min-width: 240px; }
.rk-branch-foot { flex-basis: 170px; min-width: 160px; }

/* ---- one facility (#206): the Claude Design "Facility Detail" screen ---------------------------- */
.rk-fac-well { width: 56px; height: 56px; }
/* The details card is narrower than the new-facility dialog: two fields a row, the second the short one. */
.rk-client-side .rk-facility-address-row { grid-template-columns: minmax(0, 1fr) 110px; }
.rk-fac-week { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.rk-fac-day { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 10px 16px; background: var(--surface-card); }
.rk-fac-day + .rk-fac-day { border-top: 1px solid var(--border); }
.rk-fac-day.is-today { background: var(--surface-app); }
.rk-fac-day-name { font: 500 17px/24px var(--font-sans); color: var(--ink); }
.rk-fac-day.is-today .rk-fac-day-name { font-weight: 600; }
.rk-fac-place { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rk-fac-place-pick { width: 210px; max-width: 100%; }
.rk-fac-warning { display: inline-flex; align-items: center; gap: 6px; font: var(--text-small); color: var(--warning-ink); }
.rk-fac-team { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.rk-fac-member {
    display: flex; align-items: center; gap: 12px; padding: 12px 16px; color: inherit; font-weight: 400; text-decoration: none;
    transition: background var(--duration-fast) var(--ease-standard);
}
.rk-fac-member + .rk-fac-member { border-top: 1px solid var(--border); }
.rk-fac-member:hover { background: var(--surface-app); color: inherit; text-decoration: none; }
.rk-fac-member-name { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rk-fac-member-title { font: 500 17px/24px var(--font-sans); color: var(--ink); }
.rk-fac-member-services { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.rk-fac-service {
    display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border: 1px solid var(--border); border-radius: var(--radius-full);
    font: 500 14.5px/19px var(--font-sans); color: var(--ink-secondary);
}
.rk-fac-active { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-lg); }
.rk-fac-active-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; text-wrap: pretty; }
.rk-fac-active-title { font: 500 15.5px/21.5px var(--font-sans); color: var(--ink); }
/* A switch that is a submit button: its state is aria-checked, and pressing it posts the change. */
.rk-switch-button { padding: 0; border: 0; background: none; }
.rk-switch-button[aria-checked="true"] .rk-switch-track { background: var(--primary); }
.rk-switch-button[aria-checked="true"] .rk-switch-track::after { transform: translateX(16px); }
.rk-switch-button:focus-visible .rk-switch-track { box-shadow: var(--shadow-focus); }
@media (max-width: 560px) {
    .rk-fac-day { grid-template-columns: 96px minmax(0, 1fr) auto; }
    .rk-fac-member-services { display: none; }
}


/* Desk payments and refunds (#213): the method, the amounts and the reference on one row, the transactions under them. */
.rk-appt-pay--desk { grid-template-columns: 120px 110px 110px minmax(0, 1fr) auto; }
.rk-appt-pay--desk .rk-appt-change { grid-column: 1 / -2; align-self: center; }
@media (max-width: 720px) { .rk-appt-pay--desk { grid-template-columns: minmax(0, 1fr); } }


/* The Gentelella modal (#284): a header with the title and close, a body, and a footer of actions at the end.
   A dialog that is its own address, like .rk-dialog; forms inside it keep body and footer as their own parts. */
.rk-modal { width: 480px; padding: 0; gap: 0; }
.rk-modal--lg { width: 720px; }
.rk-modal > .rk-dialog-head { align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--border-color-light); }
.rk-modal-form { display: flex; flex-direction: column; min-height: 0; }
.rk-modal-body { display: flex; flex-direction: column; gap: 12px; padding: 16px 18px; overflow-y: auto; }
.rk-modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--border-color-light); }
.rk-modal .rk-form-grid { gap: 12px; }
.rk-required { color: var(--red); }
.rk-field-error { font: var(--text-caption); color: var(--danger-ink); }

/* A table whose rows open something: the row's one link stretches over it. */
.rk-table--rows tbody tr { position: relative; }
.rk-table--rows tbody tr:hover td { background: var(--surface-sunken); }
.rk-row-link { color: var(--ink); font-weight: 500; text-decoration: none; }
.rk-row-link::after { content: ""; position: absolute; inset: 0; }
.rk-row-link:hover { color: var(--ink); }
.rk-row-link:focus-visible { outline: none; }
.rk-table--rows tbody tr:has(.rk-row-link:focus-visible) { box-shadow: inset var(--shadow-focus); }
.rk-card-foot { padding: 10px 16px; border-top: 1px solid var(--border-color-light); }
.rk-strong { font-weight: 600; color: var(--ink); }

/* Clients (#284): the search with the count at the end, then the list as the design's table. */
.rk-clients { padding: 0; overflow: hidden; }
.rk-clients-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--border-color-light); }
.rk-clients-search { flex: 1; min-width: 220px; max-width: 420px; }
.rk-clients-bar > .rk-caption { margin-inline-start: auto; }
.rk-clients .rk-table thead th { border-radius: 0; padding: 8px 16px; }
.rk-clients .rk-table tbody td { padding: 8px 16px; color: var(--ink-secondary); border-bottom-color: var(--border-color-light); }
.rk-clients-who { display: flex; align-items: center; gap: 10px; }
.rk-clients-name { display: flex; flex-direction: column; min-width: 0; white-space: nowrap; }
.rk-clients > .rk-empty { padding: 48px 16px; }

/* ---- Payments (#289): what needs a person, then every payment and refund -------------------------------- */
.rk-pay-attention-list { padding: 4px 16px 8px; }
.rk-pay-attention-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border-color-light); }
.rk-pay-attention-row:last-child { border-bottom: 0; }
/* #452: what a row offers, the booking and Mark as read; a read row (Show read) is muted. */
.rk-pay-attention-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.rk-pay-attention-row.is-read .rk-pay-attention-what { opacity: 0.7; }
@media (max-width: 640px) { .rk-pay-attention-row { grid-template-columns: 32px minmax(0, 1fr); } .rk-pay-attention-actions { grid-column: 2; justify-content: flex-start; } }
.rk-pay-attention-icon { width: 32px; height: 32px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; background: var(--neutral-soft); color: var(--ink-secondary); }
.rk-pay-attention-icon--danger { background: var(--red-lt); color: var(--red); }
.rk-pay-attention-icon--warning { background: var(--yellow-lt); color: var(--yellow); }
.rk-pay-attention-what { display: flex; flex-direction: column; min-width: 0; }
.rk-pay-attention-title { font: 600 15.5px/21.5px var(--font-sans); color: var(--ink); }
.rk-pay-list { overflow: hidden; }
.rk-pay-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rk-pay-filters .rk-input { width: auto; min-width: 140px; }
.rk-pay-list > .rk-empty { padding: 40px 16px; }

/* A flat table: the design's table inside a card, rules light, cells on the secondary ink with a strong first line. */
.rk-table--flat thead th { border-radius: 0; padding: 8px 16px; }
.rk-table--flat tbody td { padding: 8px 16px; color: var(--ink-secondary); border-bottom-color: var(--border-color-light); }
.rk-table--flat tbody tr:hover td { background: var(--surface-sunken); }
.rk-cell-strong { display: block; font-weight: 600; color: var(--ink); }
.rk-cell-sub { display: block; font-size: 14.5px; color: var(--ink-muted); }

/* ---- Receipts (#295): the search and filters as the card's header, numbers in mono, View, PDF and Send ------- */
.rk-receipts-filters {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px;
    border-bottom: 1px solid var(--border-color-light);
}
.rk-receipts-search { flex: 1; min-width: 200px; max-width: 320px; gap: 8px; }
.rk-receipts-filters > select.rk-input { width: auto; min-width: 170px; }
.rk-mono { font-family: var(--font-mono); font-size: 14.5px; color: var(--ink); }
.rk-receipt-actions { display: inline-flex; align-items: center; gap: 4px; }

/* Receipts' Send menu is the export menu (.rk-menu, above) with a shorter list whose items are a form's buttons. */
.rk-receipt-actions .rk-menu { display: inline-block; }
.rk-menu-list {
    position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; min-width: 160px; padding: 4px;
    display: flex; flex-direction: column; background: var(--surface-card); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow-popover);
}
button.rk-menu-item { width: 100%; border: 0; background: none; font: 400 15.5px/21.5px var(--font-sans); text-align: left; cursor: pointer; }

/* ---- a service's own page (#330): the Gentelella "Service Detail" screen ---------------------------------------- */
.rk-svc-head-actions { display: flex; align-items: center; gap: 14px; }
.rk-svc-head-actions form { margin: 0; }
.rk-svc-detail { align-items: start; }
.rk-svc-stack { gap: var(--grid-gap); min-width: 0; }
.rk-svc-pad { padding: 12px 16px; display: flex; flex-direction: column; gap: var(--space-2); }
.rk-svc-team td { vertical-align: middle; }
.rk-svc-team tr.is-inactive .rk-svc-person { opacity: 0.6; }
.rk-svc-price-col { width: 150px; }
.rk-svc-x-col { width: 48px; }
.rk-svc-person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rk-svc-person-name { font-size: 15.5px; font-weight: 500; color: var(--ink); }
.rk-svc-team .rk-control--affix input { width: 100%; min-width: 0; }
.rk-svc-team-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 16px; border-top: 1px solid var(--border); }
.rk-svc-team-foot select { flex: 1 1 180px; max-width: 280px; }
.rk-svc-team-foot .rk-push { margin-left: auto; white-space: nowrap; }

/* Fixed or per block: a two-option segment from plain radios; the fields of the one not chosen step aside (no script). */
.rk-svc-pricing { display: flex; flex-direction: column; gap: var(--space-4); }
.rk-svc-models { display: inline-flex; align-self: flex-start; padding: 3px; gap: 2px; border-radius: var(--radius-lg); background: var(--surface-sunken); }
.rk-svc-model { position: relative; display: inline-flex; }
.rk-svc-model input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.rk-svc-model span { height: 28px; padding: 0 14px; display: inline-flex; align-items: center; border-radius: var(--radius-md); font-size: 15.5px; font-weight: 500; color: var(--ink-secondary); }
.rk-svc-model input:checked + span { background: var(--surface-card); color: var(--ink); box-shadow: 0 1px 2px rgba(30, 38, 51, 0.08); }
.rk-svc-model input:focus-visible + span { box-shadow: var(--shadow-focus); }
.rk-svc-pricing:has(input[value="PerBlock"]:checked) .rk-svc-fixed-only { display: none; }
.rk-svc-pricing:not(:has(input[value="PerBlock"]:checked)) .rk-svc-block-only { display: none; }
.rk-svc-preview { align-items: center; margin: 0; }

.rk-svc-addon { display: flex; flex-direction: column; gap: var(--space-4); }
.rk-svc-toggle { justify-content: space-between; }
.rk-svc-toggle-text { display: flex; flex-direction: column; gap: 2px; }
.rk-svc-addon-for { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.rk-svc-addon:not(:has(#is-addon:checked)) .rk-svc-addon-for { display: none; }

.rk-svc-facts { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.rk-svc-facts dt { font-size: 14.5px; font-weight: 500; color: var(--ink-muted); margin-top: var(--space-2); }
.rk-svc-facts dt:first-child { margin-top: 0; }
.rk-svc-facts dd { margin: 0; font-size: 15.5px; color: var(--ink); }
.rk-history-card .rk-card-body { max-height: 360px; overflow-y: auto; overscroll-behavior: contain; }
.rk-history-card .rk-history { margin-top: 0; }
.rk-svc-team input::placeholder { color: var(--ink-disabled); }
@media (max-width: 640px) {
    .rk-svc-team th:nth-child(2), .rk-svc-team td:nth-child(2) { display: none; }   /* the branch: the price box needs the room */
    .rk-svc-price-col { width: 120px; }
}

/* ---- Settings › Booking form (#334): the business's own questions ---------------------------------------------------- */
.rk-bf-table td { vertical-align: top; }
.rk-bf-table tr.is-retired td { opacity: 0.55; }
.rk-bf-label { font-size: 15.5px; font-weight: 500; color: var(--ink); }
.rk-bf-actions { display: flex; align-items: center; justify-content: flex-end; gap: 4px; flex-wrap: wrap; }
.rk-bf-form:not(:has(#qKind option[value="Choice"]:checked)) .rk-bf-options { display: none; }
.rk-answers { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.rk-answers div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 12px; font-size: 15.5px; }
.rk-answers dt { color: var(--ink-muted); }
.rk-answers dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; white-space: pre-line; }
.rk-bf-form .rk-bf-wide { grid-column: 1 / -1; }

/* ----- Setup wizard (Sign In v2, #343) -------------------------------------------------------------------- */
/* Steps 1 and 2 at /signup, 3 to 5 and the last page at /{slug}/welcome: the auth frame with no panel, a 560px
   column, a step bar across the top, and the step's own Continue beside "Step N of 5". */
.rk-wiz-top { display: flex; align-items: center; gap: 12px; }
.rk-wiz-step { font: 700 13px/19px var(--font-sans); text-transform: uppercase; letter-spacing: 0.4px; color: var(--ink-muted); white-space: nowrap; }
.rk-wiz-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.rk-wiz-terms { display: flex; flex-direction: column; gap: 4px; }
.rk-wiz-terms .rk-error { padding-inline-start: 24px; }

.rk-wiz-slug {
    display: flex; align-items: center; min-height: 44px; border: 1px solid var(--border); border-radius: var(--radius-md);
    background: var(--surface-card); overflow: hidden;
}
.rk-wiz-slug:focus-within { border-color: var(--primary); box-shadow: var(--shadow-focus); }
.rk-wiz-slug.is-invalid { border-color: var(--danger); }
.rk-wiz-slug-prefix {
    align-self: stretch; display: flex; align-items: center; padding: 0 10px; background: var(--surface-sunken);
    border-inline-end: 1px solid var(--border); font: 400 15.5px/21.5px var(--font-sans); color: var(--ink-muted); white-space: nowrap;
}
.rk-wiz-slug input { flex: 1; min-width: 0; align-self: stretch; padding: 0 10px; border: 0; outline: none; background: transparent; font: var(--text-body); color: var(--ink); }

/* A choice is a card with its radio hidden inside; the picked one takes the primary's border, ring and tint. */
.rk-wiz-choice { position: relative; cursor: pointer; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-card); transition: border-color 100ms, box-shadow 100ms, background 100ms; }
.rk-wiz-choice input { position: absolute; opacity: 0; width: 0; height: 0; }
.rk-wiz-choice:hover { border-color: var(--border-strong); }
.rk-wiz-choice:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26, 187, 156, 0.14); background: var(--primary-lt); }
.rk-wiz-choice:has(input:focus-visible) { box-shadow: var(--shadow-focus); }
.rk-wiz-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.rk-wiz-cat { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; }
.rk-wiz-cat-icon { width: 32px; height: 32px; border-radius: 6px; display: flex; align-items: center; justify-content: center; }
.rk-wiz-cat-label { font: 700 15.5px/21.5px var(--font-sans); color: var(--ink); }
.rk-wiz-sizes { display: flex; flex-direction: column; gap: 8px; }
.rk-wiz-size { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 12px; align-items: center; padding: 14px 16px; }
.rk-wiz-radio { width: 18px; height: 18px; border-radius: 50%; box-sizing: border-box; border: 1.5px solid var(--border-strong); background: var(--surface-card); }
.rk-wiz-size:has(input:checked) .rk-wiz-radio { border: 5px solid var(--primary); }
.rk-wiz-size-label { display: block; font: 700 17px/24px var(--font-sans); color: var(--ink); }
.rk-wiz-size-sub { display: block; font: 400 15px/21.5px var(--font-sans); color: var(--ink-muted); }

.rk-wiz-mobile { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 8px; }
.rk-wiz-mobile .rk-switch-track { flex: none; order: 2; margin-inline-start: auto; }
.rk-wiz-place { display: flex; flex-direction: column; gap: 14px; }
.rk-auth-fields:has(.rk-wiz-mobile input:checked) .rk-wiz-place { display: none; }

.rk-wiz-done-icon { width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--primary-lt); color: var(--primary); }
.rk-wiz-next { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.rk-wiz-next-head { padding: 12px 16px; border-bottom: 1px solid var(--border-color-light); font: 700 13px/19px var(--font-sans); text-transform: uppercase; letter-spacing: 0.4px; color: var(--ink-muted); }
.rk-wiz-next-row { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border-color-light); text-decoration: none; }
.rk-wiz-next-row:last-child { border-bottom: 0; }
.rk-wiz-next-row:hover { background: var(--surface-sunken); text-decoration: none; }
.rk-wiz-next-n { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--surface-sunken); font: 700 14.5px/1 var(--font-sans); color: var(--ink-secondary); }
.rk-wiz-next-title { display: block; font: 500 15.5px/21.5px var(--font-sans); color: var(--ink); }
.rk-wiz-next-sub { display: block; font: 400 14.5px/19px var(--font-sans); color: var(--ink-muted); }
@media (max-width: 599px) { .rk-wiz-top .rk-btn { display: none; } }

/* Step 6, the services (#351): a row a service, ticked, named, timed and priced in place; a header from 600px. */
.rk-wiz-svcs { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.rk-wiz-svc { display: grid; grid-template-columns: 20px minmax(0, 1fr) minmax(0, 1fr); gap: 8px 10px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--border-color-light); }
.rk-wiz-svc > .rk-wiz-svc-name { grid-column: 2 / -1; }
.rk-wiz-svc > select.rk-input { grid-column: 2; }
.rk-wiz-svc:has(.rk-wiz-tick:not(:checked)) { background: var(--surface-sunken); }
.rk-wiz-svc:has(.rk-wiz-tick:not(:checked)) :is(.rk-input, .rk-wiz-price) { opacity: 0.55; }
.rk-wiz-svc .rk-input { height: 36px; min-width: 0; width: 100%; box-sizing: border-box; }
.rk-wiz-svc--head { display: none; padding: 8px 12px; background: var(--surface-sunken); font: 700 13px/19px var(--font-sans); text-transform: uppercase; letter-spacing: 0.4px; color: var(--ink-muted); }
.rk-wiz-tick { width: 16px; height: 16px; margin: 0; accent-color: var(--primary); }
.rk-wiz-price { display: flex; align-items: center; height: 36px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-card); overflow: hidden; }
.rk-wiz-price:focus-within { border-color: var(--primary); box-shadow: var(--shadow-focus); }
.rk-wiz-price-prefix { align-self: stretch; display: flex; align-items: center; padding: 0 10px; background: var(--surface-sunken); border-inline-end: 1px solid var(--border); font: 400 15.5px/1 var(--font-sans); color: var(--ink-muted); }
.rk-wiz-price input { flex: 1; min-width: 0; align-self: stretch; padding: 0 10px; border: 0; outline: none; background: transparent; font: var(--text-body); color: var(--ink); }
.rk-wiz-add-row { display: flex; align-items: center; gap: 8px; width: 100%; padding: 12px; border: 0; background: var(--surface-card); font: 500 15.5px/21.5px var(--font-sans); color: var(--primary); cursor: pointer; }
.rk-wiz-add-row:hover { background: var(--surface-sunken); }
.rk-wiz-count { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font: 400 15px/21.5px var(--font-sans); color: var(--ink-secondary); margin-top: -8px; }
@media (min-width: 600px) {
    .rk-wiz-svc { grid-template-columns: 20px minmax(0, 1fr) 110px 110px; }
    .rk-wiz-svc > .rk-wiz-svc-name, .rk-wiz-svc > select.rk-input { grid-column: auto; }
    .rk-wiz-svc--head { display: grid; }
}

/* Step 7, who takes bookings (#351): a card a person, the services they do as chips, ticked by a hidden checkbox. */
.rk-wiz-person { display: flex; flex-direction: column; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-card); }
.rk-wiz-person.is-on, .rk-wiz-person:has(.rk-wiz-me input:checked) { border-color: var(--primary); }
.rk-wiz-person:has(.rk-wiz-me input:not(:checked)) { border-color: var(--border); }
.rk-wiz-person-head { display: flex; align-items: center; gap: 12px; }
.rk-wiz-person-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rk-wiz-person-name { font: 700 17px/24px var(--font-sans); color: var(--ink); }
.rk-wiz-person-fields { flex: 1; min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; }
.rk-wiz-person-fields .rk-input { height: 36px; width: 100%; box-sizing: border-box; }
.rk-wiz-person-fields .rk-field { gap: 4px; }
.rk-wiz-me { display: inline-flex; align-items: center; gap: 8px; flex: none; white-space: nowrap; }
.rk-wiz-remove { width: 32px; height: 36px; flex: none; border: 0; border-radius: 4px; background: transparent; color: var(--ink-muted); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.rk-wiz-remove:hover { background: var(--surface-sunken); color: var(--ink); }
.rk-wiz-person-svcs { display: flex; flex-direction: column; gap: 6px; padding-top: 10px; border-top: 1px solid var(--border-color-light); }
.rk-wiz-person:has(.rk-wiz-me input:not(:checked)) .rk-wiz-me-svcs { display: none; }
.rk-wiz-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rk-wiz-chip { position: relative; cursor: pointer; }
.rk-wiz-chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.rk-wiz-chip span {
    display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--border);
    background: var(--surface-card); font: 500 15px/1 var(--font-sans); color: var(--ink-secondary); white-space: nowrap;
}
.rk-wiz-chip input:checked + span { border-color: var(--primary); background: var(--primary-lt); color: var(--primary); }
.rk-wiz-chip input:checked + span::before { content: "✓ "; white-space: pre; }
.rk-wiz-chip input:focus-visible + span { box-shadow: var(--shadow-focus); }
.rk-wiz-add-person { display: flex; align-items: center; justify-content: center; gap: 8px; height: 48px; border-radius: 8px; border: 1px dashed var(--border); background: transparent; font: 500 15.5px/21.5px var(--font-sans); color: var(--primary); cursor: pointer; }
.rk-wiz-add-person:hover { background: var(--surface-sunken); }

/* Settings › Payments (#409): the providers card, the policies and the two side cards, drawn as the design's "Payment Settings". */
.rk-pay-card { margin-bottom: var(--grid-gap); min-width: 0; }
.rk-pay-heading { flex: 1; flex-direction: column; align-items: flex-start; gap: 2px; }
.rk-pay-inset { padding: 12px 16px 0; }
.rk-pay-providers { display: flex; flex-direction: column; padding: 4px 0; }
.rk-pay-provider { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; padding: 14px 16px; border-bottom: 1px solid var(--border-color-light); background: var(--surface-card); }
.rk-pay-provider:last-child { border-bottom: 0; }
.rk-pay-provider.is-on { background: var(--primary-lt); }
.rk-pay-mark { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; color: #fff; font: 700 14px/1 var(--font-sans); letter-spacing: -0.2px; }
.rk-pay-mark--sm { flex-basis: 36px; width: 36px; height: 36px; }
.rk-pay-provider-text { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rk-pay-provider-name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; color: var(--ink); }
.rk-pay-provider-meta { display: flex; flex-wrap: wrap; gap: 2px 12px; font: var(--text-small); color: var(--ink-muted); }
.rk-pay-provider-meta > * { white-space: nowrap; }
.rk-pay-provider-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 6px; }
.rk-pay-divider { width: 1px; height: 24px; background: var(--border-color-light); margin: 0 4px; }
.rk-pay-env { height: 20px; padding: 0 8px; border-radius: 4px; display: inline-flex; align-items: center; font: 700 13px/1 var(--font-sans); white-space: nowrap; }
.rk-pay-env--live { background: var(--green-lt); color: var(--green); }
.rk-pay-env--sandbox { background: var(--yellow-lt); color: var(--warning-ink); }
.rk-pay-env--default { background: var(--primary-lt); color: var(--primary); }
.rk-pay-grid { align-items: start; }
.rk-pay-grid > .rk-pay-card, .rk-pay-side .rk-pay-card { margin-bottom: 0; }
.rk-pay-side { display: flex; flex-direction: column; gap: var(--grid-gap); min-width: 0; }
.rk-pay-side-body { display: flex; flex-direction: column; gap: 10px; }
.rk-pay-side-body p { margin: 0; }
.rk-pay-rule { display: flex; flex-direction: column; gap: 1px; }
.rk-pay-policy { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border-color-light); }
.rk-pay-policy.is-retired { opacity: 0.7; }
.rk-pay-policy-icon { width: 36px; height: 36px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; }
.rk-pay-tone--blue { background: var(--blue-lt); color: var(--blue); }
.rk-pay-tone--green { background: var(--green-lt); color: var(--green); }
.rk-pay-tone--yellow { background: var(--yellow-lt); color: var(--warning-ink); }
.rk-pay-tone--primary { background: var(--primary-lt); color: var(--primary); }
.rk-pay-tone--neutral { background: var(--surface-sunken); color: var(--ink-muted); }
.rk-pay-policy-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rk-pay-policy-actions { display: flex; gap: 4px; }
.rk-pay-policies-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.rk-pay-catalog { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.rk-pay-pick { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-card); color: inherit; text-decoration: none; }
.rk-pay-pick:hover { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-lt); color: inherit; }
.rk-pay-pick.is-added { opacity: 0.55; }
.rk-pay-pick-head { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.rk-pay-pick-head strong { flex: 1; min-width: 0; }
.rk-pay-selected { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 8px; background: var(--surface-sunken); }
.rk-pay-selected-text { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 2px; color: var(--ink); }
.rk-pay-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.rk-pay-hook { display: flex; flex-direction: column; gap: 6px; }
.rk-pay-hook-row { display: flex; gap: 8px; }
.rk-pay-hook-url { flex: 1; min-width: 0; padding: 9px 12px; border-radius: 4px; border: 1px solid var(--border); background: var(--surface-sunken); font: 14px/18px var(--font-mono); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-pay-preview { padding: 10px 12px; border-radius: 6px; background: var(--primary-lt); font: var(--text-small); color: var(--ink); }
.rk-pay-policy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rk-modal-foot .rk-pay-back { margin-inline-end: auto; }
@media (max-width: 768px) {
    .rk-pay-provider-actions { margin-inline-start: 0; flex-wrap: wrap; }
    .rk-pay-policy { grid-template-columns: 36px minmax(0, 1fr); }
    .rk-pay-policy-actions { grid-column: 2; }
    .rk-pay-policy-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---- page loader (#413, the design's "Page Loader") ----------------------------------------- */
/* Two gears, the larger in the business's accent and the smaller muted, turning against each other. In the shell
   it covers the content area only (the sidebar and topbar stay), with a card in the middle over the faded page; in
   the signed-out frame it is the whole screen with the brand. portal.js shows and hides it (data-rk-loader). */
.rk-loader {
    position: fixed; top: var(--topbar-height); bottom: 0; inset-inline-start: var(--sidebar-width); inset-inline-end: 0; z-index: 80;
    display: flex; align-items: center; justify-content: center; padding: var(--space-6);
    background: color-mix(in srgb, var(--surface-page) 55%, transparent);
    animation: rk-loader-in var(--duration-base) var(--ease-out);
}
.rk-loader[hidden] { display: none; }
.rk-loader-card {
    display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 320px; padding: 28px 32px; text-align: center;
    background: var(--surface-card); border: 1px solid var(--border-color); border-radius: var(--radius-md);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(4, 32, 69, 0.08);
}
.rk-loader-text { display: flex; flex-direction: column; gap: 4px; }
.rk-loader-title { margin: 0; font: 600 17px/24px var(--font); color: var(--ink); }
.rk-loader-sub { margin: 0; min-height: 19px; font: 400 14.5px/19px var(--font); color: var(--ink-muted); }
.rk-loader--full { inset: 0; z-index: 1300; background: var(--surface-card); }
.rk-loader--full .rk-loader-card { gap: 18px; background: transparent; border: 0; box-shadow: none; }
.rk-loader-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.rk-loader-brand-icon { width: 32px; height: 32px; border-radius: 8px; display: inline-flex; }
.rk-loader-brand-name { font: 600 19px/1 var(--font); color: var(--ink); }
@keyframes rk-loader-in { from { opacity: 0; } to { opacity: 1; } }

.rk-gears { position: relative; display: inline-block; width: 58px; height: 53px; }
.rk-gear { display: inline-flex; align-items: center; justify-content: center; }
.rk-gear--big { position: absolute; left: 0; bottom: 0; color: var(--primary); animation: rk-gear-cw 2.4s linear infinite; }
.rk-gear--small { position: absolute; right: 0; top: 0; color: var(--ink-muted); animation: rk-gear-ccw 1.35s linear infinite; }
@keyframes rk-gear-cw { to { transform: rotate(360deg); } }
@keyframes rk-gear-ccw { to { transform: rotate(-360deg); } }

/* The button that submitted a form, while its post is on its way: the small gear before its label, and no second press. */
.rk-btn.is-busy { cursor: progress; opacity: 0.85; }
.rk-gear--btn { animation: rk-gear-cw 1.6s linear infinite; margin-inline-end: 2px; }

@media (prefers-reduced-motion: reduce) {
    .rk-gear--big, .rk-gear--small, .rk-gear--btn { animation-duration: 6s; }
    .rk-loader { animation: none; }
}
@media (max-width: 768px) {
    .rk-loader:not(.rk-loader--full) { inset-inline-start: 0; padding: var(--space-3); }
}

/* ---- booking templates (#442) ---------------------------------------------------------------- */
.rk-tpl-inuse { display: inline-flex; align-items: center; gap: var(--space-2); padding: 8px 12px; border-radius: var(--radius-md); background: var(--surface-card); border: 1px solid var(--border); font-size: 14px; }
.rk-tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 18px; }
.rk-tpl-card { margin: 0; padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.rk-tpl-card.is-in-use { outline: 2px solid var(--primary); outline-offset: -2px; }
.rk-tpl-thumb { position: relative; display: block; height: 230px; overflow: hidden; background: var(--bg-surface-secondary); border-bottom: 1px solid var(--border); cursor: zoom-in; }
.rk-tpl-thumb iframe { position: absolute; top: 0; left: 0; width: 1280px; height: 800px; border: 0; transform: scale(0.29); transform-origin: 0 0; pointer-events: none; }
.rk-tpl-thumb--soon { cursor: default; display: flex; align-items: center; justify-content: center; background: repeating-linear-gradient(135deg, var(--bg-surface-secondary), var(--bg-surface-secondary) 12px, var(--surface-card) 12px, var(--surface-card) 24px); }
.rk-tpl-soon-name { font-size: 20px; font-weight: 600; color: var(--ink-secondary); }
.rk-tpl-badge { position: absolute; top: 10px; left: 10px; height: 24px; padding: 0 10px; border-radius: 999px; background: var(--primary); color: #fff; font-size: 12.5px; font-weight: 600; display: inline-flex; align-items: center; }
.rk-tpl-badge--soon { background: var(--ink); }
.rk-tpl-body { padding: 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.rk-tpl-name { font-size: 17px; font-weight: 600; }
.rk-tpl-desc { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--ink-secondary); }
.rk-tpl-steps { display: flex; flex-wrap: wrap; gap: 4px; }
.rk-tpl-step { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 4px; background: var(--bg-surface-secondary); color: var(--ink-secondary); font-size: 13px; white-space: nowrap; }
.rk-tpl-best { font-size: 13.5px; color: var(--ink-muted); }
/* How Chat shows on the business's own website (#469): a pair of radios under the Chat card's steps. */
.rk-tpl-display { margin: 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg-surface-secondary); }
.rk-tpl-display legend { padding: 0 4px; font-size: 13px; font-weight: 600; color: var(--ink-secondary); }
.rk-tpl-display-options { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.rk-tpl-display-option { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink); cursor: pointer; }
.rk-tpl-display-option input { width: 16px; height: 16px; margin: 0; accent-color: var(--primary); cursor: pointer; }
.rk-tpl-display-note { margin: 6px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--ink-muted); }
.rk-tpl-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 6px; }
.rk-tpl-actions > * { flex: 1; justify-content: center; }
.rk-tpl-used { background: color-mix(in srgb, var(--primary) 14%, transparent); color: var(--primary-dk); border: 0; cursor: default; font-weight: 600; }
.rk-tpl-used--soon { background: var(--bg-surface-secondary); color: var(--ink-secondary); font-weight: 500; }
/* A state, not a refused control: these override the generic disabled look. */
.rk-btn.rk-tpl-used[aria-disabled="true"] { background: color-mix(in srgb, var(--primary) 14%, transparent); color: var(--primary-dk); cursor: default; }
.rk-btn.rk-tpl-used--soon[aria-disabled="true"] { background: var(--bg-surface-secondary); color: var(--ink-secondary); }
.rk-btn.rk-tpl-pv-used[aria-disabled="true"] { background: rgba(255, 255, 255, 0.15); color: #fff; border-color: transparent; cursor: default; }

.rk-tpl-pv { position: fixed; inset: 0; z-index: 1100; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 16px; background: rgba(15, 23, 42, 0.82); }
.rk-tpl-pv-bar { position: relative; z-index: 1; width: 100%; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; color: #fff; }
.rk-tpl-pv-title { flex: 1; min-width: 0; }
.rk-tpl-pv-name { font-size: 17px; font-weight: 600; }
.rk-tpl-pv-sub { font-size: 13.5px; opacity: 0.8; }
.rk-tpl-pv-devices { display: inline-flex; gap: 2px; padding: 3px; border-radius: 8px; background: rgba(255, 255, 255, 0.12); }
.rk-tpl-pv-devices a { display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border-radius: 6px; color: #fff; font-size: 14px; font-weight: 500; text-decoration: none; }
.rk-tpl-pv-devices a.is-active { background: #fff; color: #1a2332; }
.rk-tpl-pv-used { background: rgba(255, 255, 255, 0.15); color: #fff; border: 0; cursor: default; }
.rk-tpl-pv-close { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 6px; background: rgba(255, 255, 255, 0.15); color: #fff; }
.rk-tpl-pv-close:hover { color: #fff; background: rgba(255, 255, 255, 0.25); }
.rk-tpl-pv-stage { position: absolute; inset: 0; }
.rk-tpl-pv-frame { position: relative; flex: 1; min-height: 0; width: 1280px; max-width: 100%; border: 0; border-radius: 10px; background: #fff; box-shadow: 0 24px 48px rgba(0, 0, 0, 0.3); }
.rk-tpl-pv-frame.is-phone { width: 390px; border-radius: 24px; }

/* ---- Booking page (#459, the design's "Booking Page") ------------------------------------------------------------------ */
/* One card for the booking page (its link and address beside a small live preview), then the embed steps and the branding
   side by side on a wide screen. Everything stacks on a phone. */
.rk-bp { display: flex; flex-direction: column; gap: var(--grid-gap); }
.rk-bp .rk-card { margin: 0; }
.rk-bp-moved { margin: 0; }
.rk-bp-hero { overflow: hidden; }
.rk-bp-hero-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 18px 20px; border-bottom: 1px solid var(--border-color-light); }
.rk-bp-hero-icon { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 10px; background: var(--primary-lt); color: var(--primary); display: flex; align-items: center; justify-content: center; }
.rk-bp-hero-text { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 2px; }
.rk-bp-hero-name { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rk-bp-hero-name h2 { margin: 0; font: 600 17px/24px var(--font-sans); color: var(--ink); }
.rk-bp-live { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; background: var(--green-lt); color: var(--green); font: 600 12.5px/1 var(--font-sans); }
.rk-bp-live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(47, 179, 68, 0.18); }
.rk-bp-hero-body { display: grid; grid-template-columns: minmax(0, 1fr) 380px; }
.rk-bp-hero-main { padding: 20px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.rk-bp-label { font: 600 12px/16px var(--font-sans); text-transform: uppercase; letter-spacing: 0.4px; color: var(--ink-muted); }
.rk-bp-link { display: flex; align-items: stretch; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-card); overflow: hidden; }
.rk-bp-link-text { flex: 1; min-width: 0; display: flex; align-items: center; height: 48px; padding: 0 14px; font: 15px/1 var(--font-mono, ui-monospace, monospace); overflow: hidden; white-space: nowrap; }
.rk-bp-link-text strong { color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
.rk-bp-link-host { color: var(--ink-muted); white-space: nowrap; }
.rk-bp-link-copy { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; padding: 0 16px; border: 0; border-inline-start: 1px solid var(--border); background: var(--primary); color: #fff; font: 600 14px/1 var(--font-sans); cursor: pointer; white-space: nowrap; }
.rk-bp-link-copy:hover { background: var(--primary-dk); }
.rk-bp-link-copy:focus-visible, .rk-bp-code-copy:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.rk-bp-share { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rk-bp-share .rk-spacer { flex: 1; }
.rk-bp-address { display: flex; flex-direction: column; gap: 10px; }
.rk-bp-address-field { display: flex; align-items: center; height: 44px; border-radius: 6px; border: 1px solid var(--primary); box-shadow: 0 0 0 3px var(--primary-lt); background: var(--surface-card); overflow: hidden; }
.rk-bp-address-field.is-invalid { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-lt); }
.rk-bp-address-field .rk-bp-link-host { padding: 0 4px 0 12px; font: 14.5px/1 var(--font-mono, ui-monospace, monospace); }
.rk-bp-address-field input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; font: 600 14.5px/1 var(--font-mono, ui-monospace, monospace); color: var(--ink); }
.rk-bp-error { color: var(--red); }
.rk-bp-warn { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 10px; padding: 12px 14px; border-radius: 6px; background: var(--yellow-lt); font: 14px/1.5 var(--font-sans); color: var(--ink); }
.rk-bp-warn > .rk-icon { color: var(--warning-ink); margin-top: 3px; }
.rk-bp-address-actions { display: flex; gap: 8px; justify-content: flex-end; }
.rk-bp-hero-side { background: var(--surface-sunken); border-inline-start: 1px solid var(--border-color-light); padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.rk-bp-side-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rk-bp-browser { border-radius: 8px; overflow: hidden; border: 1px solid var(--border); background: #fff; box-shadow: 0 2px 6px rgba(30, 38, 51, 0.06); }
.rk-bp-browser-bar { display: flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; background: var(--surface-card); border-bottom: 1px solid var(--border-color-light); }
.rk-bp-browser-bar > span:not(.rk-bp-browser-url) { width: 7px; height: 7px; border-radius: 50%; background: #e6e7eb; }
.rk-bp-browser-url { flex: 1; margin-inline-start: 6px; height: 14px; border-radius: 4px; background: var(--surface-sunken); font: 9.5px/14px var(--font-mono, ui-monospace, monospace); padding: 0 6px; color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rk-bp-browser-view { position: relative; height: 200px; overflow: hidden; }
.rk-bp-browser-view iframe { position: absolute; top: 0; left: 0; width: 1280px; height: 800px; border: 0; transform: scale(0.265); transform-origin: 0 0; pointer-events: none; }
.rk-bp-links { display: flex; flex-direction: column; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-card); overflow: hidden; }
.rk-bp-links a { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; color: inherit; text-decoration: none; }
.rk-bp-links a + a { border-top: 1px solid var(--border-color-light); }
.rk-bp-links a:hover { background: var(--surface-sunken); }
.rk-bp-links-icon { width: 32px; height: 32px; border-radius: 6px; display: flex; align-items: center; justify-content: center; background: var(--primary-lt); color: var(--primary); }
.rk-bp-links-text { min-width: 0; display: flex; flex-direction: column; }
.rk-bp-links-text strong { font: 600 14.5px/20px var(--font-sans); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rk-bp-links-cta { font: 500 13.5px/1 var(--font-sans); color: var(--primary); white-space: nowrap; }
.rk-bp-lower { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: var(--grid-gap); align-items: start; }
.rk-bp-steps { list-style: none; margin: 0; padding: 16px; display: flex; flex-direction: column; gap: 18px; }
.rk-bp-steps > li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px; align-items: start; }
.rk-bp-step-no { width: 26px; height: 26px; border-radius: 50%; background: var(--primary-lt); color: var(--primary); display: flex; align-items: center; justify-content: center; font: 700 13px/1 var(--font-sans); }
.rk-bp-step { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.rk-bp-step h3 { margin: 0; font: 600 14.5px/24px var(--font-sans); color: var(--ink); }
.rk-bp-step p { margin: 0; }
.rk-bp-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.rk-bp-tile { display: flex; flex-direction: column; gap: 10px; padding: 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-card); color: inherit; text-decoration: none; min-width: 0; }
.rk-bp-tile:hover { border-color: var(--primary); color: inherit; text-decoration: none; }
.rk-bp-tile.is-on { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-lt); }
.rk-bp-tile-art { position: relative; height: 72px; border-radius: 6px; background: var(--surface-sunken); border: 1px solid var(--border-color-light); padding: 8px; display: flex; flex-direction: column; gap: 4px; overflow: hidden; }
.rk-bp-art-line { width: 70%; height: 4px; border-radius: 2px; background: #e6e7eb; }
.rk-bp-art-line--head { width: 45%; height: 6px; border-radius: 3px; background: #d6dae1; }
.rk-bp-art-line--short { width: 55%; }
.rk-bp-art-form { margin-top: 4px; flex: 1; border-radius: 4px; border: 1.5px solid var(--primary); background: var(--primary-lt); display: flex; align-items: center; justify-content: center; gap: 3px; }
.rk-bp-art-form > span { width: 14px; height: 10px; border-radius: 2px; background: var(--primary); opacity: 0.5; }
.rk-bp-art-form > span.is-on { opacity: 1; }
.rk-bp-art-button { position: absolute; right: 8px; bottom: 8px; height: 16px; padding: 0 8px; border-radius: 999px; background: var(--primary); color: #fff; font: 700 8.5px/16px var(--font-sans); }
.rk-bp-tile-text { display: flex; align-items: flex-start; gap: 8px; }
.rk-bp-tile-text > span:last-child { min-width: 0; display: flex; flex-direction: column; }
.rk-bp-tile-text strong { font: 600 14px/20px var(--font-sans); color: var(--ink); }
.rk-bp-radio { flex: 0 0 16px; height: 16px; margin-top: 2px; border-radius: 50%; box-sizing: border-box; border: 1.5px solid var(--border); background: var(--surface-card); }
.rk-bp-tile.is-on .rk-bp-radio { border: 5px solid var(--primary); }
.rk-bp-code { position: relative; border-radius: 8px; background: #1a2332; overflow: hidden; }
.rk-bp-code pre { margin: 0; padding: 14px 16px; padding-inline-end: 96px; font: 13px/1.6 var(--font-mono, ui-monospace, monospace); color: #d7e1ef; white-space: pre-wrap; word-break: break-all; background: transparent; }
.rk-bp-code-copy { position: absolute; top: 8px; right: 8px; height: 30px; padding: 0 10px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, 0.18); background: rgba(255, 255, 255, 0.08); color: #fff; font: 500 13px/1 var(--font-sans); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.rk-bp-code-copy:hover { background: rgba(255, 255, 255, 0.16); }
.rk-bp-csp { font: 13.5px/1.5 var(--font-sans); color: var(--ink-muted); }
.rk-bp-csp summary { cursor: pointer; color: var(--ink-secondary); font-weight: 500; }
.rk-bp-csp p { padding-top: 6px; }
.rk-bp-brand-body { display: flex; flex-direction: column; gap: 18px; }
.rk-bp-brand-body .rk-alert { margin: 0; }
.rk-bp-brand-preview { border-radius: 8px; border: 1px solid var(--border); overflow: hidden; }
.rk-bp-brand-bar { display: block; height: 6px; background: var(--bp-accent); }
.rk-bp-brand-row { display: flex; align-items: center; gap: 12px; padding: 14px; background: var(--surface-card); }
.rk-bp-brand-logo, .rk-bp-brand-initials { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 8px; object-fit: contain; }
.rk-bp-brand-initials { background: var(--bp-accent); color: #fff; display: flex; align-items: center; justify-content: center; font: 700 15px/1 var(--font-sans); }
.rk-bp-brand-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rk-bp-brand-name strong { font: 600 15.5px/21px var(--font-sans); color: var(--ink); }
.rk-bp-brand-book { height: 32px; padding: 0 14px; border-radius: 6px; background: var(--bp-accent); color: #fff; display: inline-flex; align-items: center; font: 600 14px/1 var(--font-sans); white-space: nowrap; }
.rk-bp-field { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.rk-bp-drop { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 8px; border: 1.5px dashed var(--border); background: var(--surface-sunken); cursor: pointer; }
.rk-bp-drop:hover, .rk-bp-drop:focus-within { border-color: var(--primary); }
.rk-bp-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.rk-bp-drop-icon { width: 36px; height: 36px; border-radius: 8px; background: var(--surface-card); border: 1px solid var(--border); color: var(--ink-muted); display: flex; align-items: center; justify-content: center; }
.rk-bp-drop-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rk-bp-drop-text strong { font: 500 14.5px/20px var(--font-sans); color: var(--ink); }
.rk-bp-logo-more { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; font: 13.5px/1.4 var(--font-sans); }
.rk-bp-url { flex: 1; min-width: 200px; }
.rk-bp-url summary { cursor: pointer; color: var(--primary); }
.rk-bp-url .rk-input { margin-top: 8px; }
.rk-bp-linkbtn { padding: 0; border: 0; background: none; font: inherit; color: var(--primary); cursor: pointer; }
.rk-bp-linkbtn--danger { color: var(--red); }
.rk-bp-swatches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 2px; }
.rk-bp-swatch { position: relative; width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--surface-card); background: var(--sw); box-shadow: 0 0 0 1px var(--border); cursor: pointer; }
.rk-bp-swatch:has(input:checked) { box-shadow: 0 0 0 2px var(--sw); }
.rk-bp-swatch:has(input:focus-visible), .rk-bp-custom:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 3px; }
.rk-bp-swatch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.rk-bp-custom { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--border); font: 13.5px/1 var(--font-sans); color: var(--ink-secondary); cursor: pointer; }
.rk-bp-custom:has(input[type="radio"]:checked) { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-lt); }
.rk-bp-custom input[type="radio"] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rk-bp-custom input[type="color"] { width: 18px; height: 18px; padding: 0; border: 0; background: none; cursor: pointer; }
.rk-bp-brand-foot { display: flex; justify-content: flex-end; padding-top: 12px; border-top: 1px solid var(--border-color-light); }
.rk-visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* What a Copy said, as a toast at the foot of the window (#459); empty, it takes no room. */
.rk-bp-copied:empty { display: none; }
.rk-bp-copied { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90; padding: 8px 14px; border-radius: 999px; background: var(--ink); color: var(--surface-card); font: 500 14px/1.3 var(--font-sans); box-shadow: var(--shadow-card); }
@media (max-width: 1199px) { .rk-bp-lower { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 1099px) {
    .rk-bp-hero-body { grid-template-columns: minmax(0, 1fr); }
    .rk-bp-hero-side { border-inline-start: 0; border-top: 1px solid var(--border-color-light); }
}
@media (max-width: 560px) {
    .rk-bp-tiles { grid-template-columns: minmax(0, 1fr); }
    .rk-bp-link { flex-direction: column; }
    .rk-bp-link-copy { justify-content: center; height: 44px; border-inline-start: 0; border-top: 1px solid var(--border); }
    .rk-bp-share .rk-spacer { display: none; }
}

/* ---- Booking rules (#462, the design's "Booking Rules") --------------------------------------------------------------- */
/* What a client goes through as a strip of steps, then the booking steps and the times on the left and cancellation on the
   right. Switches are checkboxes and chips are radios; :has() shows the choice and dims what a switch makes moot. */
.rk-br { display: flex; flex-direction: column; gap: var(--grid-gap); }
.rk-br .rk-card { margin: 0; }
.rk-br-notice { margin: 0; }
.rk-br-eyebrow { margin: 0; padding: 0; font: 600 12px/16px var(--font-sans); text-transform: uppercase; letter-spacing: 0.4px; color: var(--ink-muted); }
.rk-br-flow { overflow: hidden; }
.rk-br-flow-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px 20px; border-bottom: 1px solid var(--border-color-light); }
.rk-br-count { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; background: var(--surface-sunken); font: 13px/1 var(--font-sans); color: var(--ink-secondary); white-space: nowrap; }
.rk-br-flow-scroll { padding: 18px 20px; overflow-x: auto; }
.rk-br-steps { list-style: none; margin: 0; padding: 0; display: flex; align-items: flex-start; min-width: 540px; }
.rk-br-step { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; min-width: 74px; }
.rk-br-step + .rk-br-step::before { content: ""; position: absolute; top: 17px; right: calc(50% + 22px); left: calc(-50% + 22px); height: 2px; background: var(--primary); }
.rk-br-step.is-off::before { background: var(--border); }
.rk-br-step-dot { width: 36px; height: 36px; border-radius: 50%; box-sizing: border-box; display: flex; align-items: center; justify-content: center; background: var(--primary-lt); border: 2px solid var(--primary); color: var(--primary); }
.rk-br-step.is-off { opacity: 0.55; }
.rk-br-step.is-off .rk-br-step-dot { background: var(--surface-card); border-style: dashed; border-color: var(--border); color: var(--ink-muted); }
.rk-br-step.is-done .rk-br-step-dot { background: var(--green); border-color: var(--green); color: #fff; }
.rk-br-step.is-pending .rk-br-step-dot { background: var(--yellow); border-color: var(--yellow); color: #fff; }
.rk-br-step-name { font: 600 13px/18px var(--font-sans); color: var(--ink); white-space: nowrap; }
.rk-br-step.is-off .rk-br-step-name { text-decoration: line-through; }
.rk-br-step-sub { font: 12px/1.3 var(--font-sans); color: var(--ink-muted); }
.rk-br-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--grid-gap); align-items: start; }
.rk-br-col { display: flex; flex-direction: column; gap: var(--grid-gap); min-width: 0; }
.rk-br-card { min-width: 0; }
.rk-br-form { display: flex; flex-direction: column; }
.rk-br-card-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border-color-light); }
.rk-br-card-head .rk-card-title { margin: 0; }
.rk-br-card-head .rk-card-subtitle { margin: 2px 0 0; }
.rk-br-card-icon { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.rk-br-card-icon--primary { background: var(--primary-lt); color: var(--primary); }
.rk-br-card-icon--blue { background: var(--blue-lt); color: var(--blue); }
.rk-br-card-icon--yellow { background: var(--yellow-lt); color: var(--warning-ink); }
.rk-br-toggles { display: flex; flex-direction: column; padding: 4px 16px 8px; }
.rk-br-toggles--after { padding-top: 0; }
.rk-br-toggle { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 0; cursor: pointer; }
.rk-br-toggle + .rk-br-toggle { border-top: 1px solid var(--border-color-light); }
.rk-br-toggle-icon { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; background: var(--surface-sunken); color: var(--ink-muted); }
.rk-br-toggle:has(input:checked) .rk-br-toggle-icon { background: var(--primary-lt); color: var(--primary); }
.rk-br-toggle-text { min-width: 0; display: flex; flex-direction: column; }
.rk-br-toggle-label { font: 500 15px/21px var(--font-sans); color: var(--ink); }
.rk-br-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rk-br-switch { position: relative; width: 40px; height: 22px; border-radius: 999px; background: var(--border); transition: background 120ms; }
.rk-br-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); transition: left 150ms; }
.rk-br-toggle input:checked ~ .rk-br-switch { background: var(--primary); }
.rk-br-toggle input:checked ~ .rk-br-switch::after { left: 20px; }
.rk-br-toggle input:focus-visible ~ .rk-br-switch { box-shadow: var(--shadow-focus); }
.rk-br-form:has(.rk-br-ask-practitioner input:not(:checked)) .rk-br-any { opacity: 0.5; }
.rk-br-arrival { margin: 0; padding: 14px 16px 6px; border: 0; border-top: 1px solid var(--border-color-light); display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.rk-br-arrival legend { float: left; width: 100%; margin-bottom: 10px; }
.rk-br-arrival-choices { clear: both; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.rk-br-choice { position: relative; display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; align-items: start; padding: 12px 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-card); cursor: pointer; }
.rk-br-choice::before { content: ""; width: 18px; height: 18px; margin-top: 1px; border-radius: 50%; box-sizing: border-box; border: 1.5px solid var(--border); background: var(--surface-card); }
.rk-br-choice:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-lt); }
.rk-br-choice:has(input:checked)::before { border: 5px solid var(--primary); }
.rk-br-choice:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.rk-br-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rk-br-choice-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rk-br-choice-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font: 600 15px/21px var(--font-sans); color: var(--ink); }
.rk-br-body { padding: 16px; display: flex; flex-direction: column; gap: 18px; }
.rk-br-field { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.rk-br-field--ruled { padding-top: 16px; border-top: 1px solid var(--border-color-light); }
.rk-br-field-head { float: left; width: 100%; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 0; margin-bottom: 8px; font: 500 15px/21px var(--font-sans); color: var(--ink); }
.rk-br-field-head + * { clear: both; }
.rk-br-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rk-br-chip { position: relative; display: inline-flex; align-items: center; height: 34px; padding: 0 12px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface-card); font: 500 14px/1 var(--font-sans); color: var(--ink); cursor: pointer; white-space: nowrap; }
.rk-br-chip:hover { border-color: var(--primary); }
.rk-br-chip:has(input:checked) { border-color: var(--primary); background: var(--primary); color: #fff; }
.rk-br-chip:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.rk-br-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rk-br-sample { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border-radius: 6px; background: var(--surface-sunken); }
.rk-br-time { display: inline-flex; align-items: center; height: 26px; padding: 0 8px; border-radius: 4px; border: 1px solid var(--border); background: var(--surface-card); font: 600 13px/1 var(--font-sans); color: var(--ink); font-variant-numeric: tabular-nums; }
.rk-br-foot { display: flex; justify-content: flex-end; padding: 12px 16px; border-top: 1px solid var(--border-color-light); }
.rk-br-cancel .rk-br-notice-field { padding: 14px 16px 16px; }
.rk-br-cancel:has(.rk-br-may-cancel input:not(:checked)):has(.rk-br-may-move input:not(:checked)) .rk-br-notice-field { opacity: 0.5; }
.rk-br-timeline { margin-top: 6px; padding: 14px; border-radius: 8px; border: 1px solid var(--border-color-light); background: var(--surface-sunken); }
.rk-br-bar { position: relative; height: 10px; border-radius: 5px; background: var(--green-lt); overflow: hidden; }
.rk-br-bar > span { position: absolute; top: 0; bottom: 0; right: 0; background: var(--red); opacity: 0.25; border-left: 2px solid var(--red); }
.rk-br-bar-ends { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; font: 12.5px/1.3 var(--font-sans); color: var(--ink-muted); }
.rk-br-bar-ends strong { color: var(--ink); font-weight: 600; }
.rk-br-legend { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font: 13.5px/1.4 var(--font-sans); color: var(--ink); }
.rk-br-legend li { display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: 8px; align-items: center; }
.rk-br-key { width: 10px; height: 10px; border-radius: 2px; }
.rk-br-key--ok { background: var(--green); }
.rk-br-key--cut { background: var(--red); opacity: 0.5; }
@media (max-width: 1199px) { .rk-br-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---- The bell (#466, the design's "Notification Dropdown") ------------------------------------------------------------ */
/* A <details> in the topbar: the summary is the bell with the unread count; the panel drops below it. All and Unread are
   two radios read by :has(), so the dropdown needs no script; portal.js only closes it on Escape or a click outside. */
.rk-bell { position: relative; }
.rk-bell > summary { list-style: none; }
.rk-bell > summary::-webkit-details-marker { display: none; }
.rk-bell-btn { position: relative; cursor: pointer; }
.rk-bell[open] > .rk-bell-btn { background: var(--surface-sunken); }
.rk-bell-badge { position: absolute; top: -3px; right: -5px; min-width: 15px; height: 15px; padding: 0 3px; box-sizing: content-box; border: 2px solid var(--surface-card); border-radius: 999px; background: var(--red); color: #fff; font: 600 9.5px/15px var(--font-sans); text-align: center; }
.rk-bell-panel { position: absolute; top: 46px; right: 0; z-index: 120; width: 400px; max-width: calc(100vw - 24px); border-radius: 10px; overflow: hidden; background: var(--surface-card); border: 1px solid var(--border); box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16); }
.rk-bell-head { display: flex; align-items: center; gap: 8px; padding: 14px 16px 10px; }
.rk-bell-title { font: 600 15px/20px var(--font-sans); color: var(--ink); }
.rk-bell-new { height: 20px; padding: 0 7px; border-radius: 999px; background: var(--red-lt); color: var(--red); font: 600 12px/20px var(--font-sans); }
.rk-bell-markall { margin: 0 0 0 auto; }
.rk-bell-markall button { border: 0; background: transparent; padding: 4px 0; font: 500 13px/1 var(--font-sans); color: var(--primary); cursor: pointer; white-space: nowrap; }
.rk-bell-markall button:disabled { color: var(--ink-muted); cursor: default; }
.rk-bell-tabs { display: flex; gap: 4px; padding: 0 16px; border-bottom: 1px solid var(--border-color-light); }
.rk-bell-tab-input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rk-bell-tab { height: 34px; padding: 0 10px; margin-bottom: -1px; display: inline-flex; align-items: center; border-bottom: 2px solid transparent; font: 500 13.5px/1 var(--font-sans); color: var(--ink-secondary); cursor: pointer; }
.rk-bell-tab-input:checked + .rk-bell-tab { border-bottom-color: var(--primary); color: var(--primary); font-weight: 600; }
.rk-bell-tab-input:focus-visible + .rk-bell-tab { box-shadow: inset var(--shadow-focus); }
.rk-bell-list { max-height: 440px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.rk-bell-group-label { position: sticky; top: 0; z-index: 1; padding: 6px 16px; background: var(--surface-sunken); border-bottom: 1px solid var(--border-color-light); font: 600 11.5px/16px var(--font-sans); text-transform: uppercase; letter-spacing: 0.4px; color: var(--ink-muted); }
.rk-bell-item { display: grid; grid-template-columns: 34px minmax(0, 1fr) 10px; gap: 12px; align-items: start; padding: 12px 16px; border-bottom: 1px solid var(--border-color-light); background: var(--surface-card); color: inherit; text-decoration: none; }
.rk-bell-item:hover { background: var(--surface-sunken); color: inherit; text-decoration: none; }
.rk-bell-item.is-unread { background: var(--primary-lt); }
.rk-bell-tile { width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.rk-bell-tile--primary { background: var(--primary-lt); color: var(--primary); }
.rk-bell-tile--green { background: var(--green-lt); color: var(--green); }
.rk-bell-tile--yellow { background: var(--yellow-lt); color: var(--warning-ink); }
.rk-bell-tile--red { background: var(--red-lt); color: var(--red); }
.rk-bell-tile--blue { background: var(--blue-lt); color: var(--blue); }
.rk-bell-text { min-width: 0; display: flex; flex-direction: column; }
.rk-bell-item-title { font: 500 14px/20px var(--font-sans); color: var(--ink); }
.rk-bell-item.is-unread .rk-bell-item-title { font-weight: 600; }
.rk-bell-item-body { margin-top: 1px; font: 13px/1.45 var(--font-sans); color: var(--ink-secondary); }
.rk-bell-item-time { margin-top: 4px; font: 12px/1.3 var(--font-sans); color: var(--ink-muted); }
.rk-bell-dot { width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; }
.rk-bell-item.is-unread .rk-bell-dot { background: var(--primary); }
.rk-bell-panel:has(#rk-bell-unread:checked) .rk-bell-item:not(.is-unread),
.rk-bell-panel:has(#rk-bell-unread:checked) .rk-bell-group:not(:has(.is-unread)) { display: none; }
.rk-bell-empty { display: none; padding: 40px 16px; text-align: center; flex-direction: column; align-items: center; gap: 2px; font: 13px/1.4 var(--font-sans); color: var(--ink-muted); }
.rk-bell-empty strong { font: 600 14px/20px var(--font-sans); color: var(--ink); }
.rk-bell-empty-icon { width: 40px; height: 40px; margin-bottom: 8px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--green-lt); color: var(--green); }
.rk-bell-empty.is-all, .rk-bell-panel:has(#rk-bell-unread:checked) .rk-bell-empty.is-unread { display: flex; }
.rk-bell-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--border-color-light); background: var(--surface-sunken); font: 500 13px/1 var(--font-sans); }
.rk-bell-foot a + a { color: var(--ink-secondary); }
@media (max-width: 480px) { .rk-bell-panel { position: fixed; top: calc(var(--topbar-height) + 4px); right: 12px; left: 12px; width: auto; max-width: none; } }
