/**
 * Customer-facing UI — aligned with tenant customer display (kiosk / presentation).
 * Scope layouts with body.ark-cf (and optional .apt-book for embedded booking tweaks).
 */
:root {
    --cd-navy: #0a1a2f;
    --cd-navy-hover: #132942;
    --cd-charcoal: #1f2a44;
    --cd-slate: #334155;
    --cd-bg: #f5f7fa;
    --cd-bg-subtle: #e8eef4;
    --cd-surface: #ffffff;
    --cd-text: #1f2a44;
    --cd-text-secondary: #475569;
    --cd-muted: #64748b;
    --cd-border: rgba(51, 65, 85, 0.12);
    --cd-accent: #2ab7ca;
    --cd-accent-soft: rgba(42, 183, 202, 0.14);
    --cd-accent-foreground: #ffffff;
    --cd-gold: #d4a017;
    --cd-gold-hover: #b8890f;
    --cd-gold-soft: rgba(212, 160, 23, 0.14);
    --cd-success: #0d9488;
    --cd-success-soft: rgba(13, 148, 136, 0.12);
    --cd-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
    --cd-shadow: 0 4px 16px rgba(15, 23, 42, 0.07), 0 1px 4px rgba(15, 23, 42, 0.04);
    --cd-shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.09), 0 4px 12px rgba(15, 23, 42, 0.05);
    --cd-radius: 18px;
    --cd-radius-lg: 22px;
    --cd-radius-btn: 999px;
}

body.ark-cf {
    margin: 0;
    min-height: 100vh;
    font-family: "DM Sans", system-ui, sans-serif;
    background: var(--cd-bg);
    background-image:
        radial-gradient(ellipse 120% 80% at 50% -25%, rgba(10, 26, 47, 0.05), transparent),
        radial-gradient(ellipse 70% 50% at 100% 0%, rgba(42, 183, 202, 0.06), transparent);
    color: var(--cd-text);
    font-size: 1.0625rem;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

body.ark-cf .fw-semibold {
    font-weight: 600;
}

/* —— Standalone guest pages (estimate / RO PDF-style views) —— */
body.ark-cf .cf-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: clamp(1rem, 3vw, 2rem) clamp(1rem, 4vw, 2.5rem) clamp(2rem, 5vw, 3rem);
}

body.ark-cf .ark-card,
body.ark-cf .cf-card {
    background: var(--cd-surface);
    border: 1px solid var(--cd-border);
    border-radius: var(--cd-radius);
    box-shadow: var(--cd-shadow);
}

body.ark-cf.guest-simple .muted {
    color: var(--cd-muted);
}

body.ark-cf.guest-simple .btn-primary {
    background: var(--cd-navy);
    border-color: var(--cd-navy);
    border-radius: var(--cd-radius-btn);
    color: var(--cd-accent-foreground);
    font-weight: 700;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

body.ark-cf.guest-simple .btn-primary:hover {
    background: var(--cd-navy-hover);
    border-color: var(--cd-navy-hover);
    color: var(--cd-accent-foreground);
}

body.ark-cf.guest-simple .badge-light {
    background: var(--cd-accent-soft);
    color: var(--cd-accent);
    border-radius: var(--cd-radius-btn);
    font-weight: 600;
}

body.ark-cf.guest-simple .alert-success {
    background: var(--cd-success-soft);
    border: 1px solid rgba(13, 148, 136, 0.35);
    color: #115e59;
    border-radius: 14px;
}

body.ark-cf.guest-simple .btn-outline-primary {
    color: var(--cd-accent);
    border-color: rgba(42, 183, 202, 0.45);
    border-radius: var(--cd-radius-btn);
    font-weight: 600;
}

body.ark-cf.guest-simple .btn-outline-primary:hover {
    background: var(--cd-accent-soft);
    color: var(--cd-accent);
    border-color: var(--cd-accent);
}

body.ark-cf.inspection-guest .btn-primary {
    background: var(--cd-navy);
    border-color: var(--cd-navy);
    border-radius: var(--cd-radius-btn);
    color: var(--cd-accent-foreground);
    font-weight: 700;
}

body.ark-cf.inspection-guest .btn-primary:hover {
    background: var(--cd-navy-hover);
    border-color: var(--cd-navy-hover);
    color: var(--cd-accent-foreground);
}

/* —— Centered login (root layouts.app, AdminLTE login-page) —— */
body.ark-cf.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "DM Sans", system-ui, sans-serif;
}

body.ark-cf.login-page .login-box {
    width: 100%;
    max-width: 28rem;
}

body.ark-cf.login-page .card {
    border-radius: var(--cd-radius) !important;
    border: 1px solid var(--cd-border) !important;
    box-shadow: var(--cd-shadow) !important;
}

body.ark-cf.login-page .card-primary.card-outline {
    border-top: 3px solid var(--cd-navy) !important;
}

body.ark-cf.login-page .btn-primary {
    background: var(--cd-navy);
    border-color: var(--cd-navy);
    border-radius: var(--cd-radius-btn);
    color: var(--cd-accent-foreground);
    font-weight: 700;
}

body.ark-cf.login-page .btn-primary:hover {
    background: var(--cd-navy-hover);
    border-color: var(--cd-navy-hover);
    color: var(--cd-accent-foreground);
}

/* —— Portal (AdminLTE top-nav) —— */
body.ark-cf.portal-shell .wrapper {
    background: transparent;
}

body.ark-cf.portal-shell.layout-footer-fixed .wrapper {
    overflow-x: clip;
}

/* Portal header: navy operational chrome (matches ARK-SMS SaaS identity). */
body.ark-cf.portal-shell .portal-topnav {
    position: relative;
    z-index: 1030;
    background: linear-gradient(180deg, #122742 0%, var(--cd-navy) 100%);
    border-bottom: 1px solid rgba(42, 183, 202, 0.22);
    box-shadow: 0 8px 28px rgba(10, 26, 47, 0.22);
}

body.ark-cf.portal-shell .portal-topnav__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0.55rem clamp(0.65rem, 2vw, 1.25rem) 0.5rem;
}

body.ark-cf.portal-shell .portal-topnav__masthead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    min-height: 2.5rem;
}

body.ark-cf.portal-shell .portal-topnav__brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    min-width: 0;
    text-decoration: none;
    color: inherit;
}

body.ark-cf.portal-shell .portal-topnav__shop {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.ark-cf.portal-shell .portal-topnav__account {
    flex-shrink: 0;
}

body.ark-cf.portal-shell .portal-topnav__logout-form {
    margin: 0;
}

body.ark-cf.portal-shell .portal-topnav__brand:hover .portal-topnav__title {
    color: #ffffff;
}

body.ark-cf.portal-shell .portal-topnav__kicker {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.58);
    line-height: 1.2;
}

body.ark-cf.portal-shell .portal-topnav__title {
    font-size: clamp(0.95rem, 2.5vw, 1.0625rem);
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
    line-height: 1.25;
}

body.ark-cf.portal-shell .portal-topnav__logo {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(42, 183, 202, 0.35);
    color: var(--cd-accent);
}

body.ark-cf.portal-shell .portal-topnav__logout-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    padding: 0.4rem 1rem;
    min-height: 2.25rem;
    line-height: 1.25;
    border-radius: var(--cd-radius-btn);
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: transparent;
    color: rgba(255, 255, 255, 0.92);
    font-weight: 600;
    font-size: 0.875rem;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

body.ark-cf.portal-shell .portal-topnav__logout-btn:hover {
    border-color: var(--cd-accent);
    color: #ffffff;
    background: rgba(42, 183, 202, 0.18);
}

body.ark-cf.portal-shell a.portal-topnav__logout-btn--link {
    text-decoration: none;
}

body.ark-cf.portal-shell .portal-topnav__menu-wrap {
    margin-top: 0.45rem;
    padding-top: 0.45rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

body.ark-cf.portal-shell .portal-topnav__menu {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.2rem;
    list-style: none;
    margin: 0;
    padding: 0 0 0.2rem;
    min-height: 2.5rem;
}

body.ark-cf.portal-shell .portal-topnav__menu li {
    flex-shrink: 0;
}

body.ark-cf.portal-shell .portal-topnav__menu a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.38rem 0.65rem;
    border-radius: var(--cd-radius-btn);
    color: rgba(255, 255, 255, 0.78);
    font-weight: 600;
    font-size: 0.8125rem;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.15s ease, background 0.15s ease;
}

body.ark-cf.portal-shell .portal-topnav__menu a:hover {
    color: #ffffff;
    background: rgba(42, 183, 202, 0.14);
}

body.ark-cf.portal-shell .portal-topnav__menu a.is-active {
    color: #ffffff;
    background: rgba(42, 183, 202, 0.22);
}

@media (min-width: 1100px) {
    body.ark-cf.portal-shell .portal-topnav__menu-wrap {
        margin-top: 0.35rem;
    }
}

body.ark-cf.portal-shell .content-wrapper {
    background: transparent !important;
}

body.ark-cf.portal-shell .content-header {
    padding-top: 0.65rem;
    padding-bottom: 0.2rem;
}

body.ark-cf.portal-shell .content-header h1 {
    font-size: clamp(1.45rem, 3vw, 1.85rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--cd-text);
    margin-bottom: 0;
}

body.ark-cf.portal-shell section.content {
    padding-top: 0.25rem;
}

body.ark-cf.portal-shell .portal-content {
    max-width: 1100px;
}

body.ark-cf .portal-page-subtitle {
    font-size: 0.95rem;
    color: var(--cd-text-secondary);
    line-height: 1.45;
    max-width: 36rem;
}

body.ark-cf .portal-page-stack {
    display: flex;
    flex-direction: column;
    gap: 0;
}

body.ark-cf .portal-panel {
    background: var(--cd-surface);
    border: 1px solid var(--cd-border);
    border-radius: var(--cd-radius);
    box-shadow: var(--cd-shadow);
    overflow: hidden;
}

body.ark-cf .portal-panel--primary {
    border-color: rgba(42, 183, 202, 0.22);
    box-shadow: var(--cd-shadow), 0 0 0 1px rgba(42, 183, 202, 0.06);
}

body.ark-cf .portal-panel--balance {
    border-color: rgba(42, 183, 202, 0.18);
    background: linear-gradient(180deg, var(--cd-bg-subtle) 0%, var(--cd-surface) 52%);
}

body.ark-cf .portal-panel__header {
    padding: 0.65rem 1rem;
    border-bottom: 1px solid var(--cd-border);
    background: rgba(248, 250, 252, 0.85);
}

body.ark-cf .portal-panel__body {
    padding: 1rem 1.1rem 1.1rem;
}

body.ark-cf .portal-panel--primary .portal-panel__body {
    padding: 1.15rem 1.15rem 1.25rem;
}

body.ark-cf .portal-panel__headline {
    font-size: clamp(1.15rem, 2.5vw, 1.35rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--cd-text);
    margin: 0 0 0.35rem;
}

body.ark-cf .portal-panel__sub {
    font-size: 0.9375rem;
    margin-bottom: 0;
}

body.ark-cf .portal-panel__amount {
    font-size: 1.65rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--cd-text);
    letter-spacing: -0.02em;
}

body.ark-cf .portal-panel__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.5rem;
}

body.ark-cf .portal-history-col--divider {
    border-top: 1px solid var(--cd-border);
}

@media (min-width: 768px) {
    body.ark-cf .portal-history-col--divider {
        border-top: none;
        border-left: 1px solid var(--cd-border);
    }
}

body.ark-cf .portal-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.35rem;
}

body.ark-cf .portal-badge {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    line-height: 1.2;
    background: var(--cd-bg-subtle);
    color: var(--cd-text-secondary);
}

body.ark-cf .portal-badge--muted {
    background: #f1f5f9;
    color: #64748b;
}

body.ark-cf .portal-badge--warning {
    background: #fff7ed;
    color: #9a3412;
}

body.ark-cf .portal-badge--info {
    background: #ecfeff;
    color: #0e7490;
}

body.ark-cf .portal-badge--success {
    background: #ecfdf5;
    color: #047857;
}

body.ark-cf .portal-badge--primary {
    background: rgba(10, 26, 47, 0.08);
    color: var(--cd-navy);
}

body.ark-cf .portal-badge--outline {
    background: transparent;
    border: 1px solid var(--cd-border);
    color: var(--cd-text-secondary);
}

body.ark-cf .portal-dashboard-card-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
}

body.ark-cf .portal-dashboard-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--cd-navy);
    text-decoration: none;
}

body.ark-cf .portal-dashboard-card-link:hover {
    color: var(--cd-navy-hover);
    text-decoration: none;
}

/* Portal repair order — section tabs (segment control, scroll on narrow screens) */
body.ark-cf .portal-ro-tabs-panel {
    background: var(--cd-surface);
    border: 1px solid var(--cd-border);
    border-radius: var(--cd-radius);
    box-shadow: var(--cd-shadow);
    margin-bottom: 1rem;
    overflow: hidden;
}

body.ark-cf .portal-ro-tablist {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.4rem;
    padding: 0.55rem 0.65rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    background: rgba(248, 250, 252, 0.9);
    border-bottom: 1px solid var(--cd-border);
}

body.ark-cf .portal-ro-tablist::-webkit-scrollbar {
    height: 5px;
}

body.ark-cf .portal-ro-tablist::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.15);
    border-radius: 999px;
}

body.ark-cf .portal-ro-tab {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--cd-text-secondary);
    text-decoration: none !important;
    border: 1px solid transparent;
    background: transparent;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

body.ark-cf .portal-ro-tab:hover {
    color: var(--cd-accent);
    background: rgba(42, 183, 202, 0.06);
}

body.ark-cf .portal-ro-tab:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(42, 183, 202, 0.25);
}

body.ark-cf .portal-ro-tab.active,
body.ark-cf .portal-ro-tab.nav-link.active {
    color: var(--cd-accent-foreground);
    background: var(--cd-navy);
    border-color: var(--cd-navy);
    box-shadow: 0 1px 3px rgba(10, 26, 47, 0.18);
}

body.ark-cf .portal-ro-tab-panes {
    padding-top: 0.25rem;
}

body.ark-cf .portal-ro-tab-panes > .tab-pane {
    outline: none;
}

/* Portal detail pages (RO / invoice show) — status strip + single primary CTA */
body.ark-cf .portal-detail-status-strip {
    border-radius: var(--cd-radius);
    padding: 1rem 1.15rem;
    margin-bottom: 1rem;
    border: 1px solid var(--cd-border);
    background: var(--cd-surface);
    box-shadow: var(--cd-shadow);
}

body.ark-cf .portal-detail-status-strip--action {
    border-color: var(--cd-border);
    border-left: 3px solid var(--cd-gold);
    background: var(--cd-surface);
}

body.ark-cf .portal-detail-status-strip--success {
    border-color: rgba(5, 150, 105, 0.35);
    background: linear-gradient(135deg, #ecfdf5 0%, #fff 55%);
}

body.ark-cf .portal-detail-status-strip--info {
    border-color: rgba(42, 183, 202, 0.25);
    background: linear-gradient(135deg, var(--cd-accent-soft) 0%, #fff 60%);
}

body.ark-cf .portal-detail-status-strip--neutral {
    background: #f8fafc;
}

body.ark-cf .portal-detail-status-strip--muted {
    opacity: 0.92;
    background: #f1f5f9;
}

body.ark-cf .portal-detail-status-strip__label {
    font-size: clamp(1.1rem, 2.5vw, 1.35rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--cd-text);
}

body.ark-cf .portal-detail-status-strip__meta {
    margin-top: 0.25rem;
}

body.ark-cf .portal-detail-status-strip__subtitle {
    margin-top: 0.5rem;
    font-size: 0.95rem;
    line-height: 1.45;
    color: var(--cd-text-secondary);
    max-width: 40rem;
}

body.ark-cf .portal-ro-address-list li {
    list-style-type: disc;
}

body.ark-cf .portal-apt-card__stretched {
    position: absolute;
    inset: 0;
    z-index: 1;
}

body.ark-cf .portal-apt-card .portal-apt-card__actions,
body.ark-cf .portal-apt-card .portal-apt-card__main {
    position: relative;
    z-index: 2;
}

body.ark-cf .portal-ro-line-item {
    border-color: var(--cd-border) !important;
}

body.ark-cf .portal-detail-primary-btn {
    border-radius: var(--cd-radius-btn);
    font-weight: 700;
}

body.ark-cf .portal-detail-sticky {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1020;
    padding: 0.65rem 0.75rem calc(0.65rem + env(safe-area-inset-bottom, 0));
    margin: 1rem -0.5rem -0.5rem;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0) 0%, rgba(248, 250, 252, 0.97) 35%, #f8fafc 100%);
    border-top: 1px solid var(--cd-border);
}

body.ark-cf .portal-work-summary-text {
    font-size: 1rem;
    line-height: 1.55;
    color: var(--cd-text);
}

body.ark-cf .portal-timeline-row:last-child {
    border-bottom: none !important;
}

@media (min-width: 768px) {
    body.ark-cf .portal-detail-sticky.d-md-none {
        display: none !important;
    }
}

body.ark-cf.portal-shell .card,
body.ark-cf .portal-card {
    background: var(--cd-surface);
    border: 1px solid var(--cd-border) !important;
    border-radius: var(--cd-radius) !important;
    box-shadow: var(--cd-shadow);
}

body.ark-cf.portal-shell .card-header,
body.ark-cf .portal-card .card-header {
    background: transparent !important;
    border-bottom: 1px solid var(--cd-border) !important;
    font-weight: 700;
    font-size: 1rem;
    color: var(--cd-text);
    padding: 1rem 1.25rem;
    border-radius: var(--cd-radius) var(--cd-radius) 0 0 !important;
}

body.ark-cf.portal-shell .card-body,
body.ark-cf .portal-card .card-body {
    padding: 1.15rem 1.35rem;
}

/* Portal buttons: navy default (operational SaaS); gold reserved for conversion (.portal-btn-conversion). */
body.ark-cf.portal-shell a.btn-primary,
body.ark-cf.portal-shell button.btn-primary,
body.ark-cf.portal-shell .btn-primary {
    background: var(--cd-navy);
    border: 1px solid var(--cd-navy);
    color: #ffffff;
    border-radius: var(--cd-radius-btn);
    font-weight: 700;
    box-shadow: 0 1px 2px rgba(10, 26, 47, 0.12);
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

body.ark-cf.portal-shell a.btn-primary:hover,
body.ark-cf.portal-shell a.btn-primary:focus,
body.ark-cf.portal-shell button.btn-primary:hover,
body.ark-cf.portal-shell button.btn-primary:focus,
body.ark-cf.portal-shell .btn-primary:hover,
body.ark-cf.portal-shell .btn-primary:focus {
    background: var(--cd-navy-hover);
    border-color: var(--cd-navy-hover);
    color: #ffffff;
}

body.ark-cf.portal-shell a.btn-primary.portal-btn-conversion,
body.ark-cf.portal-shell button.btn-primary.portal-btn-conversion,
body.ark-cf.portal-shell .btn-primary.portal-btn-conversion {
    background: var(--cd-gold);
    border-color: var(--cd-gold);
    color: #1a1408;
    box-shadow: 0 1px 2px rgba(212, 160, 23, 0.22);
}

body.ark-cf.portal-shell a.btn-primary.portal-btn-conversion:hover,
body.ark-cf.portal-shell a.btn-primary.portal-btn-conversion:focus,
body.ark-cf.portal-shell button.btn-primary.portal-btn-conversion:hover,
body.ark-cf.portal-shell button.btn-primary.portal-btn-conversion:focus,
body.ark-cf.portal-shell .btn-primary.portal-btn-conversion:hover,
body.ark-cf.portal-shell .btn-primary.portal-btn-conversion:focus {
    background: var(--cd-gold-hover);
    border-color: var(--cd-gold-hover);
    color: #0f0d06;
}

body.ark-cf.portal-shell .btn-primary:focus-visible {
    outline: 2px solid rgba(42, 183, 202, 0.65);
    outline-offset: 2px;
}

body.ark-cf.portal-shell .btn-primary.portal-btn-conversion:focus-visible {
    outline-color: rgba(212, 160, 23, 0.85);
}

body.ark-cf.portal-shell .btn-primary:disabled,
body.ark-cf.portal-shell .btn-primary.disabled {
    opacity: 0.55;
    color: #ffffff;
}

body.ark-cf.portal-shell .btn-primary.portal-btn-conversion:disabled,
body.ark-cf.portal-shell .btn-primary.portal-btn-conversion.disabled {
    color: #1a1408;
}

body.ark-cf.portal-shell .btn-outline-primary {
    color: var(--cd-navy);
    border-color: rgba(10, 26, 47, 0.35);
    border-radius: var(--cd-radius-btn);
    font-weight: 600;
}

body.ark-cf.portal-shell .btn-outline-primary:hover {
    background: rgba(10, 26, 47, 0.06);
    color: var(--cd-navy);
    border-color: var(--cd-navy);
}

body.ark-cf.portal-shell .btn-outline-secondary {
    border-radius: var(--cd-radius-btn);
    font-weight: 600;
    border-color: var(--cd-border);
    color: var(--cd-text-secondary);
}

body.ark-cf.portal-shell .btn-outline-secondary:hover {
    background: var(--cd-bg-subtle);
    border-color: var(--cd-muted);
    color: var(--cd-text);
}

body.ark-cf.portal-shell .btn-sm {
    border-radius: 12px;
    font-weight: 600;
}

body.ark-cf.portal-shell .text-primary {
    color: var(--cd-navy) !important;
}

body.ark-cf.portal-shell .main-footer {
    background: transparent !important;
    border-top: 1px solid var(--cd-border);
    color: var(--cd-muted);
    font-size: 0.8125rem;
    padding: 1rem 1.25rem;
}

body.ark-cf.portal-shell .main-footer a {
    color: var(--cd-accent);
    font-weight: 600;
}

body.ark-cf .portal-empty {
    color: var(--cd-muted);
}

body.ark-cf .portal-empty--compact i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

body.ark-cf .portal-section-title {
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--cd-text-secondary);
    margin: 0 0 0.65rem;
}

body.ark-cf .portal-apt-header-actions .btn {
    width: 100%;
}

@media (min-width: 768px) {
    body.ark-cf .portal-apt-header-actions .btn {
        width: auto;
    }
}

body.ark-cf .portal-apt-empty .portal-panel__body {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

body.ark-cf .portal-apt-card .portal-panel__body {
    padding: 1rem 1.1rem 1.05rem;
}

@media (max-width: 575.98px) {
    body.ark-cf .portal-apt-card__actions .btn-sm {
        min-height: 2.5rem;
        padding-top: 0.45rem;
        padding-bottom: 0.45rem;
    }
}

body.ark-cf.portal-shell .alert {
    border-radius: 14px;
    border: 1px solid var(--cd-border);
}

body.ark-cf.portal-shell .alert-success {
    background: var(--cd-success-soft);
    border-color: rgba(13, 148, 136, 0.35);
    color: #134e4a;
}

body.ark-cf.portal-shell .alert-warning {
    background: #fffbeb;
    border-color: #fcd34d;
    color: #92400e;
}

body.ark-cf.portal-shell .form-control {
    border-radius: 12px;
    border-color: rgba(15, 23, 42, 0.12);
}

body.ark-cf.portal-shell .form-control:focus {
    border-color: var(--cd-accent);
    box-shadow: 0 0 0 3px var(--cd-accent-soft);
}

body.ark-cf.portal-shell .border-bottom {
    border-color: var(--cd-border) !important;
}

body.ark-cf.portal-shell .card-primary.card-outline {
    border-top: 3px solid var(--cd-accent) !important;
}

body.ark-cf.portal-shell .card-primary.card-outline .card-header {
    border-bottom-color: var(--cd-border);
}

/* —— Inspection / minimal guest wrapper —— */
body.ark-cf.inspection-guest .content-wrapper {
    background: transparent !important;
}

body.ark-cf.inspection-guest .card {
    border-radius: var(--cd-radius);
    border: 1px solid var(--cd-border);
    box-shadow: var(--cd-shadow);
}

/* —— Legacy storefront + user dashboard (AdminLTE shell) —— */
body.ark-cf:not(.portal-shell):not(.guest-simple):not(.apt-book) .wrapper .content-wrapper {
    background: transparent !important;
}

body.ark-cf:not(.portal-shell):not(.guest-simple):not(.apt-book) .main-footer {
    background: rgba(255, 255, 255, 0.92) !important;
    border-top: 1px solid var(--cd-border);
    color: var(--cd-muted);
}

body.ark-cf:not(.portal-shell):not(.guest-simple):not(.apt-book) .main-header {
    border-bottom: 1px solid var(--cd-border) !important;
    background: rgba(255, 255, 255, 0.98) !important;
}

body.ark-cf:not(.portal-shell):not(.guest-simple):not(.apt-book) .card,
body.ark-cf:not(.portal-shell):not(.guest-simple):not(.apt-book) .small-box {
    border-radius: var(--cd-radius) !important;
    border-color: var(--cd-border) !important;
    box-shadow: var(--cd-shadow-sm);
}

body.ark-cf:not(.portal-shell):not(.guest-simple):not(.apt-book) .btn-primary {
    background: var(--cd-navy);
    border-color: var(--cd-navy);
    border-radius: var(--cd-radius-btn);
    font-weight: 700;
}

body.ark-cf:not(.portal-shell):not(.guest-simple):not(.apt-book) .btn-primary:hover {
    background: var(--cd-navy-hover);
    border-color: var(--cd-navy-hover);
}

body.ark-cf:not(.portal-shell):not(.guest-simple):not(.apt-book) .content-header h1 {
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--cd-text);
}

/* —— Online booking (apt) —— */
body.ark-cf.apt-book {
    font-family: "DM Sans", system-ui, sans-serif;
}

body.ark-cf.apt-book:not(.apt-embedded) {
    background: var(--cd-bg);
    background-image:
        radial-gradient(ellipse 120% 80% at 50% -20%, rgba(42, 183, 202, 0.07), transparent),
        radial-gradient(ellipse 80% 50% at 100% 50%, rgba(13, 148, 136, 0.05), transparent);
}

body.ark-cf.apt-book:not(.apt-embedded) .apt-header {
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--cd-border);
    box-shadow: var(--cd-shadow-sm);
}

body.ark-cf.apt-book:not(.apt-embedded) .apt-header-title {
    color: var(--cd-text);
    font-weight: 700;
    letter-spacing: -0.02em;
}

body.ark-cf.apt-book:not(.apt-embedded) .apt-header-subtitle {
    color: var(--cd-muted);
}

body.ark-cf.apt-book:not(.apt-embedded) .apt-container {
    background: var(--cd-surface);
    border: 1px solid var(--cd-border);
    border-radius: var(--cd-radius);
    box-shadow: var(--cd-shadow);
}

body.ark-cf.apt-book:not(.apt-embedded) .apt-step-heading {
    color: var(--cd-text);
}

body.ark-cf.apt-book:not(.apt-embedded) .apt-progress-item.is-done .apt-progress-dot {
    background: var(--cd-accent);
    border-color: #1f8fa3;
    color: var(--cd-accent-foreground);
}

body.ark-cf.apt-book:not(.apt-embedded) .apt-progress-item.is-current .apt-progress-dot {
    background: var(--cd-success);
    border-color: #0f766e;
    color: #fff;
    box-shadow: 0 0 0 3px var(--cd-success-soft);
}

body.ark-cf.apt-book:not(.apt-embedded) .apt-progress-item.is-current .apt-progress-label {
    color: var(--cd-accent);
}

body.ark-cf.apt-book:not(.apt-embedded) .apt-book-nav__link {
    color: var(--cd-accent);
}

body.ark-cf.apt-book:not(.apt-embedded) .apt-book-nav__link:hover {
    color: #1f8fa3;
    background: var(--cd-accent-soft);
}

body.ark-cf.apt-book:not(.apt-embedded) .apt-form .btn-primary {
    background: var(--cd-navy);
    border-color: var(--cd-navy);
    border-radius: var(--cd-radius-btn);
    font-weight: 700;
}

body.ark-cf.apt-book:not(.apt-embedded) .apt-form .btn-primary:hover {
    background: var(--cd-navy-hover);
    border-color: var(--cd-navy-hover);
}

body.ark-cf.apt-book:not(.apt-embedded) .apt-form .form-control:focus {
    border-color: var(--cd-accent);
    box-shadow: 0 0 0 3px var(--cd-accent-soft);
}

@media (prefers-reduced-motion: reduce) {
    body.ark-cf .portal-appointment-card:hover {
        transform: none;
    }
}

/* —— Reputation funnel: 5★ “share publicly” page (gold CTAs; wins over generic guest link styles) —— */
body.ark-cf.guest-simple.ark-rf-submitted {
    background: linear-gradient(165deg, #f5f7fa 0%, #eef2f7 55%, #e8eef4 100%);
}

body.ark-cf.guest-simple.ark-rf-submitted a.ark-rf-btn-primary,
body.ark-cf.guest-simple.ark-rf-submitted a.ark-rf-btn-primary:visited {
    background: var(--cd-gold) !important;
    border: 1px solid var(--cd-gold-hover) !important;
    color: #1a1408 !important;
    -webkit-text-fill-color: #1a1408 !important;
    box-shadow: 0 2px 6px rgba(10, 26, 47, 0.08);
    box-sizing: border-box;
    max-width: min(20rem, 100%);
}

body.ark-cf.guest-simple.ark-rf-submitted a.ark-rf-btn-primary:hover {
    background: var(--cd-gold-hover) !important;
    border-color: #a07812 !important;
    color: #0f0d06 !important;
    -webkit-text-fill-color: #0f0d06 !important;
}

body.ark-cf.guest-simple.ark-rf-submitted .ark-rf-cta--facebook-only a.ark-rf-btn-secondary,
body.ark-cf.guest-simple.ark-rf-submitted .ark-rf-cta--facebook-only a.ark-rf-btn-secondary:visited {
    background: var(--cd-gold) !important;
    border: 1px solid var(--cd-gold-hover) !important;
    color: #1a1408 !important;
    -webkit-text-fill-color: #1a1408 !important;
    box-sizing: border-box;
    max-width: min(20rem, 100%);
}

body.ark-cf.guest-simple.ark-rf-submitted .ark-rf-cta--facebook-only a.ark-rf-btn-secondary:hover {
    background: var(--cd-gold-hover) !important;
    border-color: #a07812 !important;
    color: #0f0d06 !important;
    -webkit-text-fill-color: #0f0d06 !important;
}
