* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #f3f6fb;
    color: #1f2937;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.help-assistant-root {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 1060;
    --help-brand: #2f8b73;
    --help-brand-dark: #23715e;
    --help-accent: #5b5cf6;
    --help-panel-bg: #f4f0e8;
    --help-text: #1f2937;
}

.help-assistant-launcher {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #7c3aed 100%);
    color: #fff;
    box-shadow: 0 16px 36px rgba(47, 67, 154, 0.28);
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.help-assistant-launcher:hover,
.help-assistant-launcher:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 20px 42px rgba(47, 67, 154, 0.34);
}

.help-assistant-launcher img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    filter: drop-shadow(0 5px 10px rgba(15, 23, 42, 0.18));
}

.help-assistant-backdrop {
    position: fixed;
    inset: 0;
    display: none;
    background: rgba(15, 23, 42, 0.28);
    pointer-events: none;
}

.help-assistant-panel {
    position: fixed;
    right: 22px;
    bottom: 88px;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    width: min(400px, calc(100vw - 28px));
    height: min(590px, calc(100vh - 112px));
    overflow: hidden;
    border: 1px solid rgba(31, 41, 55, 0.16);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 26px 62px rgba(15, 23, 42, 0.26);
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity 0.16s ease, transform 0.16s ease;
}

.help-assistant-root.is-open .help-assistant-backdrop {
    display: none;
}

.help-assistant-root.is-open .help-assistant-panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.help-assistant-root.is-open .help-assistant-launcher {
    display: none;
}

.help-assistant-header {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) 34px 34px;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-bottom: 0;
    background: var(--help-brand);
}

.help-assistant-header-icon,
.help-assistant-icon-button {
    display: grid;
    place-items: center;
    border-radius: 12px;
}

.help-assistant-header-icon {
    width: 54px;
    height: 54px;
    background: #fff;
    color: var(--help-accent);
    overflow: hidden;
    border: 0;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
}

.help-assistant-header-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 7px;
    background: #fff;
}

.help-assistant-header-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.help-assistant-header-copy strong {
    color: #fff;
    font-size: 1.2rem;
    line-height: 1.2;
}

.help-assistant-header-copy span,
.help-assistant-context {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.82rem;
}

.help-assistant-icon-button {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.help-assistant-icon-button:hover,
.help-assistant-icon-button:focus-visible {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

.help-assistant-context {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 14px;
    border-bottom: 1px solid rgba(31, 41, 55, 0.08);
    background: #fff;
    color: #64748b;
}

.help-assistant-context-logo {
    display: grid;
    flex: 0 0 22px;
    place-items: center;
    width: 22px;
    height: 22px;
    overflow: hidden;
    border: 1px solid rgba(47, 139, 115, 0.2);
    border-radius: 6px;
    background: #fff;
    color: var(--help-brand);
}

.help-assistant-context-logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 2px;
}

.help-assistant-context span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.help-assistant-messages {
    display: grid;
    align-content: start;
    gap: 12px;
    min-height: 0;
    padding: 14px;
    overflow-y: auto;
    background: var(--help-panel-bg);
}

.help-assistant-empty {
    display: grid;
    gap: 12px;
    align-content: start;
    justify-items: start;
    padding: 14px 4px;
    color: var(--help-text);
    text-align: left;
}

.help-assistant-empty[hidden] {
    display: none;
}

.help-assistant-empty-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #fff;
    color: var(--help-accent);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.help-assistant-empty-icon img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.help-assistant-empty h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
}

.help-assistant-empty p {
    margin: -4px 0 0;
    color: #64748b;
    font-size: 0.86rem;
    line-height: 1.35;
}

.help-assistant-prompts {
    display: grid;
    width: 100%;
    gap: 8px;
}

.help-assistant-prompts button {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 38px;
    gap: 9px;
    padding: 9px 12px;
    border: 1px solid rgba(47, 139, 115, 0.2);
    border-radius: 999px;
    background: #fff;
    color: #20332f;
    font-weight: 760;
    text-align: left;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.help-assistant-prompts button:hover,
.help-assistant-prompts button:focus-visible {
    border-color: rgba(47, 139, 115, 0.42);
    background: #f8fffb;
}

.help-assistant-message {
    display: grid;
    gap: 6px;
    max-width: 88%;
}

.help-assistant-message-enter {
    animation: help-assistant-message-in 0.22s ease-out both;
}

.help-assistant-message-user {
    justify-self: end;
}

.help-assistant-message-assistant,
.help-assistant-message-error {
    justify-self: start;
}

.help-assistant-bubble {
    padding: 10px 12px;
    border-radius: 15px;
    font-size: 0.9rem;
    line-height: 1.45;
    white-space: normal;
    overflow-wrap: anywhere;
}

.help-assistant-message-user .help-assistant-bubble {
    background: var(--help-brand);
    color: #fff;
    border-bottom-right-radius: 6px;
}

.help-assistant-message-assistant .help-assistant-bubble {
    border: 1px solid rgba(31, 41, 55, 0.08);
    background: #fff;
    color: var(--help-text);
    border-bottom-left-radius: 6px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.help-assistant-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 2px;
}

.help-assistant-suggestions button {
    min-height: 30px;
    padding: 6px 10px;
    border: 1px solid rgba(47, 139, 115, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #223f38;
    font-size: 0.78rem;
    font-weight: 760;
    line-height: 1.2;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.help-assistant-suggestions button:hover,
.help-assistant-suggestions button:focus-visible {
    border-color: rgba(47, 139, 115, 0.42);
    background: #f8fffb;
    color: #143d34;
}

.help-assistant-bubble strong {
    font-weight: 800;
}

.help-assistant-message-assistant .help-assistant-bubble strong {
    color: #223f38;
}

.help-assistant-bubble a {
    color: var(--help-brand-dark);
    font-weight: 800;
    text-decoration: underline;
    text-decoration-thickness: 0.08em;
    text-underline-offset: 3px;
}

.help-assistant-bubble a:hover,
.help-assistant-bubble a:focus-visible {
    color: #175b4b;
}

.help-assistant-message-error .help-assistant-bubble {
    border: 1px solid #f1c7c7;
    background: #fff5f5;
    color: #8a1f1f;
}

.help-assistant-message-loading .help-assistant-bubble {
    min-width: 72px;
}

.help-assistant-loader {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 20px;
}

.help-assistant-loader span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--help-brand);
    animation: help-assistant-pulse 1s ease-in-out infinite;
}

.help-assistant-loader span:nth-child(2) {
    animation-delay: 0.14s;
}

.help-assistant-loader span:nth-child(3) {
    animation-delay: 0.28s;
}

@keyframes help-assistant-pulse {
    0%,
    80%,
    100% {
        opacity: 0.35;
        transform: translateY(0);
    }

    40% {
        opacity: 1;
        transform: translateY(-3px);
    }
}

@keyframes help-assistant-message-in {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .help-assistant-message-enter,
    .help-assistant-loader span {
        animation: none;
    }
}

.help-assistant-citations {
    display: grid;
    gap: 3px;
    margin: 0;
    padding-left: 18px;
    color: #6b7280;
    font-size: 0.74rem;
}

.help-assistant-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    align-items: end;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid rgba(31, 41, 55, 0.08);
    background: #fff;
}

.help-assistant-input {
    width: 100%;
    min-height: 44px;
    max-height: 120px;
    resize: vertical;
    border: 1px solid rgba(47, 139, 115, 0.34);
    border-radius: 16px;
    padding: 10px 13px;
    color: var(--help-text);
    font: inherit;
}

.help-assistant-input:focus {
    border-color: var(--help-brand);
    outline: 3px solid rgba(47, 139, 115, 0.18);
}

.help-assistant-send {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 15px;
    background: #2fce62;
    color: #fff;
    box-shadow: 0 12px 24px rgba(47, 206, 98, 0.24);
}

.help-assistant-send:disabled {
    cursor: wait;
    opacity: 0.68;
}

@media (max-width: 575.98px) {
    .help-assistant-root {
        right: 14px;
        bottom: 14px;
    }

    .help-assistant-panel {
        inset: auto 12px 78px 12px;
        width: auto;
        height: min(540px, calc(100vh - 98px));
    }
}

a {
    color: #2E6FFF;
    font-weight: 650;
}

.auth-layout {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 24px;
    background:
        linear-gradient(135deg, rgba(46, 111, 255, 0.08), rgba(228, 179, 99, 0.12)),
        #f6f8fb;
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(260px, 0.82fr) minmax(320px, 1fr);
    width: min(100%, 920px);
    min-height: 620px;
    overflow: hidden;
    border: 1px solid #d8e1e8;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 20px 50px rgba(26, 43, 52, 0.12);
}

.auth-brand-panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 28px;
    padding: 36px;
    background: #153c3f;
    color: #f8fafc;
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 1.08rem;
    font-weight: 800;
    text-decoration: none;
}

.auth-logo img {
    display: block;
    width: 34px;
    height: 34px;
}

.auth-brand-copy {
    display: grid;
    gap: 12px;
}

.auth-eyebrow {
    margin: 0;
    color: #c4934d;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.auth-brand-title {
    max-width: 340px;
    margin: 0;
    color: #fff;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.12;
}

.auth-assurance {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.auth-assurance span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 9px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 6px;
    color: #e9f4f4;
    font-size: 0.78rem;
    font-weight: 700;
}

.auth-content {
    display: grid;
    align-content: center;
    gap: 16px;
    padding: 36px;
}

.tenant-context {
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.2;
}

.tenant-context-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.tenant-context-copy > span {
    color: #64748b;
    font-size: 0.82rem;
}

.replio-shell .sidebar,
.replio-shell .sidebar[data-background-color="dark"] {
    border-right: 0;
    background: #1a2035 !important;
    box-shadow: 8px 0 30px rgba(13, 20, 37, 0.22);
}

.replio-shell .sidebar .logo-header,
.replio-shell .sidebar .sidebar-logo,
.replio-shell .sidebar[data-background-color="dark"] .logo-header {
    min-height: 72px;
    padding-right: 16px;
    padding-left: 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    background: #1a2035 !important;
}

.replio-shell .sidebar .logo-header .navbar-brand {
    max-width: 164px;
    object-fit: contain;
}

.replio-sidebar-brand {
    display: inline-flex !important;
    align-items: center;
    min-width: 0;
    padding: 6px 12px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 6px 16px rgba(5, 13, 30, 0.18);
    text-decoration: none;
}

.replio-sidebar-brand-logo {
    height: 28px;
    width: auto;
    display: block;
    object-fit: contain;
}

.replio-shell .sidebar .sidebar-wrapper,
.replio-shell .sidebar .sidebar-content {
    background: transparent !important;
}

.replio-shell .sidebar .logo-header .btn-toggle,
.replio-shell .sidebar .logo-header .navbar-toggler,
.replio-shell .sidebar .logo-header .topbar-toggler {
    min-width: 34px;
    min-height: 34px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #f8fafc;
}

.replio-shell .sidebar .logo-header .btn-toggle:hover,
.replio-shell .sidebar .logo-header .navbar-toggler:hover,
.replio-shell .sidebar .logo-header .topbar-toggler:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.sidebar-context-card {
    position: relative;
    margin: 16px 18px 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: #202940;
    box-shadow: 0 16px 30px rgba(9, 14, 28, 0.2);
}

.sidebar-context-toggle {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 14px;
    align-items: center;
    width: 100%;
    gap: 11px;
    padding: 12px 13px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #fff;
    text-align: left;
}

.sidebar-context-toggle::after {
    justify-self: end;
    margin: 0;
    color: rgba(255, 255, 255, 0.54);
}

.sidebar-context-toggle:hover,
.sidebar-context-toggle:focus-visible {
    background: rgba(255, 255, 255, 0.05);
}

.context-company-logo,
.company-switch-logo {
    display: inline-grid;
    place-items: center;
    overflow: hidden;
    border-radius: 8px;
    background: #eef7f8;
    color: #2E6FFF;
    font-weight: 850;
}

.context-company-logo {
    width: 44px;
    min-width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.context-company-logo img,
.company-switch-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
}

.context-company-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.context-company-copy strong,
.context-company-copy span {
    overflow-wrap: anywhere;
}

.context-company-copy strong {
    color: #fff;
    font-size: 0.94rem;
    line-height: 1.25;
}

.context-company-copy span {
    color: rgba(238, 243, 251, 0.68);
    font-size: 0.78rem;
    font-weight: 650;
}

.context-company-copy .context-kicker {
    color: #d7a550;
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0;
    text-transform: uppercase;
}

.sidebar-company-menu {
    width: min(360px, calc(100vw - 30px));
    max-height: min(520px, calc(100vh - 120px));
    padding: 0;
    overflow: hidden;
    border: 1px solid #dfe6ef;
    border-radius: 8px;
    box-shadow: 0 22px 50px rgba(15, 23, 42, 0.22);
}

.sidebar-company-menu-heading {
    padding: 13px 15px 11px;
    border-bottom: 1px solid #e5edf3;
    background: #f8fafc;
}

.sidebar-company-menu-heading strong,
.sidebar-company-menu-heading small {
    display: block;
}

.sidebar-company-menu-heading strong {
    color: #1f2937;
    font-size: 0.94rem;
    font-weight: 850;
}

.sidebar-company-menu-heading small {
    color: #64748b;
    font-size: 0.78rem;
}

.company-switch-list {
    max-height: 340px;
    overflow-y: auto;
    border-top: 1px solid #e5edf3;
}

.sidebar-company-menu form {
    margin: 0;
}

.company-switch-item {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 58px;
    padding: 10px 14px;
    white-space: normal;
}

.company-switch-item > span:last-child {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.company-switch-item strong,
.company-switch-item small {
    overflow-wrap: anywhere;
}

.company-switch-item strong {
    color: #1f2937;
    font-size: 0.9rem;
    font-weight: 850;
    line-height: 1.2;
}

.company-switch-item small {
    color: #64748b;
    font-size: 0.76rem;
}

.company-switch-item:hover,
.company-switch-item:focus-visible {
    background: #eef3ff;
}

.company-switch-item.active {
    background: #e6f3f4;
}

.company-switch-logo {
    width: 38px;
    min-width: 38px;
    height: 38px;
    border: 1px solid #dbe6ed;
    font-size: 0.9rem;
}

.company-switch-logo.platform-logo {
    background: #f7f1e6;
    color: #9b6b29;
}

.replio-nav {
    padding: 0 14px 22px;
}

.replio-nav .nav-section-title {
    margin: 18px 9px 7px;
    color: rgba(215, 224, 240, 0.52);
    font-size: 0.7rem;
    font-weight: 850;
    letter-spacing: 0;
    text-transform: uppercase;
}

.replio-nav .nav-section-title.nav-section-company,
.replio-nav .nav-section-title.nav-section-platform {
    display: flex;
    align-items: center;
    gap: 8px;
}

.replio-nav .nav-section-title.nav-section-company {
    color: #87cdd2;
}

.replio-nav .nav-section-title.nav-section-platform {
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: #d7a550;
}

.replio-nav > .nav-item {
    margin: 2px 0;
}

.replio-nav > .nav-item > a {
    min-height: 42px;
    padding: 9px 12px !important;
    border-radius: 8px;
    color: #b9c2d8;
    gap: 10px;
}

.sidebar-inline-form {
    margin: 0;
}

.sidebar-inline-form button {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 42px;
    gap: 10px;
    padding: 9px 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #b9c2d8;
    text-align: left;
}

.sidebar-inline-form button i {
    width: 22px;
    min-width: 22px;
    color: #94a0b8;
    font-size: 1rem;
    text-align: center;
}

.sidebar-inline-form button p {
    margin: 0;
    color: inherit;
    font-size: 0.91rem;
    font-weight: 720;
    line-height: 1.2;
}

.sidebar-inline-form button:hover,
.sidebar-inline-form button:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.sidebar-inline-form button:hover i,
.sidebar-inline-form button:focus-visible i {
    color: #fff;
}

.replio-nav > .nav-item > a i {
    width: 22px;
    min-width: 22px;
    margin-right: 0 !important;
    color: #94a0b8;
    font-size: 1rem;
    text-align: center;
}

.replio-nav > .nav-item > a p {
    margin: 0 !important;
    color: inherit;
    font-size: 0.91rem;
    font-weight: 720;
    line-height: 1.2;
}

.replio-nav > .nav-item > a:hover,
.replio-nav > .nav-item > a:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.replio-nav > .nav-item > a:hover i,
.replio-nav > .nav-item > a:focus-visible i {
    color: #fff;
}

.replio-shell .sidebar .nav.nav-secondary.replio-nav > .nav-item > a:hover,
.replio-shell .sidebar .nav.nav-secondary.replio-nav > .nav-item > a:focus-visible {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #fff !important;
}

.replio-shell .sidebar .nav.nav-secondary.replio-nav > .nav-item > a:hover i,
.replio-shell .sidebar .nav.nav-secondary.replio-nav > .nav-item > a:hover p,
.replio-shell .sidebar .nav.nav-secondary.replio-nav > .nav-item > a:focus-visible i,
.replio-shell .sidebar .nav.nav-secondary.replio-nav > .nav-item > a:focus-visible p {
    color: #fff !important;
}

.replio-nav > .nav-item.active > a,
.replio-nav > .nav-item.active > a:hover,
.replio-nav > .nav-item.active > a:focus-visible {
    background: #2E6FFF !important;
    color: #fff !important;
    box-shadow: 0 10px 18px rgba(46, 111, 255, 0.22);
}

.replio-nav > .nav-item.active > a i,
.replio-nav > .nav-item.active > a p {
    color: #fff !important;
}

.replio-shell .sidebar .nav.nav-secondary.replio-nav > .nav-item.active > a,
.replio-shell .sidebar .nav.nav-secondary.replio-nav > .nav-item.active > a:hover,
.replio-shell .sidebar .nav.nav-secondary.replio-nav > .nav-item.active > a:focus-visible {
    background: #2E6FFF !important;
    color: #fff !important;
}

.replio-shell .sidebar .nav.nav-secondary.replio-nav > .nav-item.active > a i,
.replio-shell .sidebar .nav.nav-secondary.replio-nav > .nav-item.active > a p,
.replio-shell .sidebar .nav.nav-secondary.replio-nav > .nav-item.active > a .nav-item-caption {
    color: #fff !important;
}

.replio-shell .sidebar .nav.nav-secondary.replio-nav > .nav-item.active > a::before {
    background: rgba(255, 255, 255, 0.32) !important;
}

.nav-item-caption {
    margin-left: auto;
    color: inherit;
    font-size: 0.72rem;
    opacity: 0.72;
}

.replio-main-panel > .container {
    max-width: none;
    padding-right: 32px;
    padding-left: 32px;
}

.replio-main-panel .page-inner {
    padding-top: 30px;
    padding-bottom: 42px;
}

.replio-navbar {
    position: static !important;
    transform: none !important;
    min-height: 72px;
    border-bottom: 0 !important;
    background: #171f35;
    box-shadow: 0 10px 30px rgba(13, 20, 37, 0.18);
}

.replio-shell .main-header {
    min-height: 72px;
}

.replio-navbar .container-fluid {
    gap: 18px;
    padding-left: 6px;
}

.tenant-context {
    position: relative;
    min-width: 390px;
    padding-left: 0;
}

.tenant-context-toggle {
    padding-left: 0;
}

.tenant-context-toggle {
    display: inline-flex;
    align-items: center;
    max-width: min(520px, 46vw);
    min-height: 78px;
    gap: 18px;
    padding: 7px 14px 7px 7px;
    border: 1px solid transparent;
    border-radius: 14px;
    background: transparent;
    color: #fff;
    text-align: left;
    transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}

.tenant-context-toggle:hover,
.tenant-context-toggle:focus {
    border-color: rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 12px 26px rgba(7, 12, 24, 0.14);
    outline: none;
}

.tenant-context-toggle::after {
    display: none;
}

.tenant-context-logo {
    display: inline-grid;
    width: 132px;
    height: 64px;
    flex: 0 0 132px;
    place-items: center;
    overflow: hidden;
    border: 0;
    border-radius: 12px;
    background: #fff;
    color: #2e6fff;
    box-shadow: 0 8px 20px rgba(5, 13, 30, 0.16);
}

.tenant-context-logo img {
    width: 100%;
    height: 100%;
    padding: 3px 6px;
    object-fit: contain;
}

.tenant-context-logo i {
    font-size: 1.35rem;
}

.tenant-context-copy {
    flex: 1 1 auto;
}

.tenant-context strong {
    display: block;
    overflow: hidden;
    color: #fff;
    font-size: 1.14rem;
    font-weight: 850;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.replio-navbar .tenant-context-copy > span {
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.78rem;
    font-weight: 750;
}

.tenant-context-chevron {
    flex: 0 0 auto;
    color: rgba(255, 255, 255, 0.48);
    font-size: 0.74rem;
}

.tenant-context-menu {
    width: 330px;
    margin-top: 8px;
    padding: 10px;
    border: 1px solid #dfe6ef;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 18px 42px rgba(13, 20, 37, 0.20);
}

.tenant-context-menu-heading {
    display: flex;
    flex-direction: column;
    padding: 8px 10px 10px;
    border-bottom: 1px solid #eef2f7;
    line-height: 1.2;
}

.tenant-context-menu-heading strong {
    color: #1f2937;
    font-size: 0.88rem;
    font-weight: 850;
}

.tenant-context-menu-heading small {
    color: #64748b;
    font-weight: 700;
}

.tenant-context-menu-list {
    max-height: 360px;
    overflow-y: auto;
    padding-top: 8px;
}

.tenant-context-menu-item {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    min-height: 58px;
    padding: 9px 10px;
    border-radius: 10px;
    color: #243042;
    white-space: normal;
}

.tenant-context-menu-item:hover,
.tenant-context-menu-item:focus {
    background: #f3f7ff;
    color: #1f2937;
}

.tenant-context-menu-item.active {
    background: #edf4ff;
    color: #1d4ed8;
}

.tenant-context-menu-item:disabled {
    opacity: 1;
    cursor: default;
}

.tenant-context-menu-logo {
    display: inline-grid;
    width: 46px;
    height: 42px;
    flex: 0 0 46px;
    place-items: center;
    overflow: hidden;
    border: 1px solid #dbe4ef;
    border-radius: 10px;
    background: #fff;
    color: #2e6fff;
    font-weight: 900;
}

.tenant-context-menu-logo img {
    width: 100%;
    height: 100%;
    padding: 4px;
    object-fit: contain;
}

.tenant-context-menu-item strong {
    display: block;
    color: inherit;
    font-size: 0.93rem;
    font-weight: 850;
    line-height: 1.15;
}

.tenant-context-menu-item small {
    display: block;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 700;
}

.page-context-title {
    display: flex;
    flex-direction: column;
    line-height: 1.14;
}

.page-context-title span {
    color: #d7a550;
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0;
    text-transform: uppercase;
}

.page-context-title strong {
    color: #f8fafc;
    font-size: 1.08rem;
    font-weight: 850;
}

.topbar-nav {
    gap: 10px;
    margin: 0;
    flex-direction: row !important;
    width: auto !important;
}

.topbar-nav .nav-item {
    display: flex;
    align-items: center;
}

.topbar-inline-form {
    margin: 0;
}

.replio-navbar .topbar-nav {
    margin-left: auto !important;
}

.replio-topbar-icon,
.profile-pic {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    border-radius: 8px;
    color: #f8fafc;
    text-decoration: none;
}

.replio-topbar-icon {
    justify-content: center;
    width: 42px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    background: rgba(255, 255, 255, 0.08);
}

.replio-topbar-icon:hover,
.replio-topbar-icon:focus-visible {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
}

.replio-role-badge {
    gap: 8px;
    width: auto;
    min-width: 42px;
    padding: 0 12px;
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.06em;
    line-height: 1;
    text-transform: uppercase;
}

.replio-role-badge i {
    font-size: 0.9rem;
}

.replio-role-badge-root {
    border-color: rgba(46, 111, 255, 0.42);
    background: linear-gradient(135deg, rgba(46, 111, 255, 0.32), rgba(106, 69, 255, 0.28));
    box-shadow: 0 10px 24px rgba(46, 111, 255, 0.16);
}

.replio-role-badge-static {
    cursor: default;
}

.topbar-user .profile-pic {
    gap: 10px;
    width: auto !important;
    min-width: 42px;
    padding: 4px 8px 4px 5px;
}

.replio-navbar .topbar-user {
    position: relative !important;
    width: auto !important;
}

.replio-navbar .topbar-user .dropdown-menu-end {
    right: 0 !important;
    left: auto !important;
}

.replio-navbar .topbar-user .profile-pic,
.replio-navbar .topbar-user .profile-pic .profile-username,
.replio-navbar .topbar-user .profile-pic .fw-bold {
    color: #fff !important;
}

.topbar-user .profile-pic:hover,
.topbar-user .profile-pic:focus-visible,
.topbar-user.show .profile-pic {
    color: #fff;
    background: rgba(255, 255, 255, 0.11);
}

.avatar-sm,
.avatar-lg {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
}

.avatar-sm {
    width: 34px;
    height: 34px;
}

.replio-navbar .topbar-user .avatar-sm,
.replio-navbar .topbar-user .avatar-img {
    display: inline-flex !important;
}

.avatar-lg {
    width: 58px;
    height: 58px;
}

.avatar-img {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

img.avatar-img {
    display: block;
    object-fit: cover;
}

.avatar-initials {
    background: linear-gradient(135deg, #2e7682, #d7a550);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 850;
    letter-spacing: 0;
}

.avatar-lg .avatar-initials {
    font-size: 1.08rem;
}

.profile-username {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    color: #fff;
    font-size: 0.92rem;
    white-space: nowrap;
}

.profile-username .op-7 {
    color: rgba(255, 255, 255, 0.68);
}

.dropdown-user {
    width: min(330px, calc(100vw - 24px));
    margin-top: 12px !important;
    padding: 0;
    overflow: hidden;
    border: 1px solid #dfe6ef;
    border-radius: 8px;
    box-shadow: 0 22px 50px rgba(15, 23, 42, 0.18);
}

.dropdown-user .user-box {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: #f8fafc;
}

.dropdown-user .u-text {
    min-width: 0;
}

.dropdown-user h4 {
    margin: 2px 0 4px;
    color: #1f2937;
    font-size: 1rem;
    font-weight: 850;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.dropdown-user .text-muted {
    margin: 0 0 9px;
    color: #64748b !important;
    font-size: 0.82rem;
    overflow-wrap: anywhere;
}

.dropdown-user .dropdown-divider {
    margin: 0;
}

.dropdown-user .dropdown-item {
    padding: 10px 16px;
    color: #334155;
    font-size: 0.91rem;
    font-weight: 700;
}

.dropdown-user .dropdown-item:hover,
.dropdown-user .dropdown-item:focus-visible {
    background: #eef3ff;
    color: #2559CC;
}

.platform-impersonation-menu {
    min-width: 360px;
}

.platform-impersonation-results {
    max-height: 270px;
    overflow-y: auto;
}

.platform-impersonation-results .dropdown-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-top: 10px;
    padding-bottom: 10px;
}

.platform-impersonation-results .dropdown-item small {
    color: #6c757d;
    font-size: 12px;
}

.dashboard-page {
    display: grid;
    gap: 18px;
}

.dashboard-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    padding: 22px;
    border: 1px solid #d8e1e8;
    border-radius: 8px;
    background: #fff;
}

.dashboard-hero h1 {
    margin: 4px 0 8px;
    color: #1d2c31;
    font-size: 1.65rem;
    font-weight: 800;
    line-height: 1.18;
}

.dashboard-hero p {
    max-width: 680px;
    margin: 0;
    color: #61727d;
    line-height: 1.55;
}

.dashboard-eyebrow {
    margin: 0;
    color: #9b6b29;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.dashboard-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.dashboard-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.dashboard-metric,
.dashboard-panel {
    border: 1px solid #d8e1e8;
    border-radius: 8px;
    background: #fff;
}

.dashboard-metric {
    display: grid;
    gap: 8px;
    min-height: 136px;
    padding: 16px;
    color: inherit;
    text-decoration: none;
}

.dashboard-metric:hover,
.dashboard-metric:focus-visible {
    border-color: #2E6FFF;
    color: inherit;
}

.dashboard-metric span,
.dashboard-metric small {
    color: #64748b;
}

.dashboard-metric strong {
    color: #1d2c31;
    font-size: 2rem;
    line-height: 1;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-items: start;
}

.dashboard-panel {
    min-width: 0;
    padding: 18px;
}

.dashboard-list,
.dashboard-definition-list {
    display: grid;
    gap: 10px;
    margin: 0;
}

.dashboard-list-item,
.dashboard-definition-list div,
.status-grid div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 56px;
    padding: 10px 12px;
    border: 1px solid #e3e8ef;
    border-radius: 8px;
    background: #f8fafc;
}

.dashboard-list-item div {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.dashboard-list-item strong,
.dashboard-list-item span,
.dashboard-definition-list dd,
.dashboard-definition-list small {
    overflow-wrap: anywhere;
}

.dashboard-list-item span,
.dashboard-definition-list dt,
.dashboard-definition-list small {
    color: #64748b;
}

.dashboard-list-item time,
.dashboard-definition-list dd,
.status-grid dd {
    margin: 0;
    color: #1f2937;
    font-weight: 800;
    text-align: right;
}

.dashboard-definition-list dd {
    display: grid;
    gap: 2px;
}

.dashboard-access-panel {
    max-width: 100%;
}

/* Dashboard iconography */
.dashboard-metric-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: start;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    font-size: 1.05rem;
    color: #fff;
    background: #2E6FFF;
}

.dashboard-metric--reservations .dashboard-metric-icon {
    background: #2563eb;
}

.dashboard-metric--conversations .dashboard-metric-icon {
    background: #0d9488;
}

.dashboard-metric--leads .dashboard-metric-icon {
    background: #7c3aed;
}

.dashboard-metric--incidents .dashboard-metric-icon {
    background: #ea580c;
}

.dashboard-list-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    color: #2E6FFF;
    background: #e8efff;
}

.dashboard-list-item > div {
    flex: 1 1 auto;
}

.dashboard-definition-list dt,
.status-grid dt,
.global-company-summary dt {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.dashboard-definition-list dt i,
.status-grid dt i,
.global-company-summary dt i {
    width: 16px;
    text-align: center;
    color: #94a3b8;
}

.section-heading h2 i,
h2 > i[class*="fa-"]:first-child,
h3 > i[class*="fa-"]:first-child {
    margin-right: 8px;
    color: #2E6FFF;
    font-size: 0.9em;
}

/* Buttons without the .btn class (which already uses flex gap) */
button:not(.btn) > i[class*="fa-"]:first-child {
    margin-right: 6px;
}

.global-company-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.global-company-card {
    display: grid;
    gap: 14px;
    min-width: 0;
    padding: 18px;
    border: 1px solid #d8e1e8;
    border-radius: 8px;
    background: #fff;
}

.global-company-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.global-company-card-header div {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.global-company-card-header strong,
.global-company-card-header span {
    overflow-wrap: anywhere;
}

.global-company-card-header strong {
    color: #1d2c31;
    font-size: 1rem;
    font-weight: 850;
    line-height: 1.2;
}

.global-company-card-header span {
    color: #64748b;
    font-size: 0.84rem;
}

.global-company-logo {
    display: inline-grid;
    place-items: center;
    overflow: hidden;
    width: 46px;
    min-width: 46px;
    height: 46px;
    border: 1px solid #dbe6ed;
    border-radius: 8px;
    background: #eef7f8;
    color: #2E6FFF;
    font-weight: 850;
}

.global-company-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
}

.global-company-summary {
    display: grid;
    gap: 8px;
    margin: 0;
}

.global-company-summary div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid #e3e8ef;
    border-radius: 8px;
    background: #f8fafc;
}

.global-company-summary dt {
    color: #64748b;
    font-size: 0.84rem;
}

.global-company-summary dd {
    margin: 0;
    color: #1d2c31;
    font-weight: 850;
}

.global-company-entry {
    display: flex;
    justify-content: flex-end;
    margin: 0;
}

.global-company-entry .btn {
    min-width: 108px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
    padding-bottom: 2px;
}

.page-header h1 {
    margin: 0 0 6px;
    color: #1d2c31;
    font-size: 1.55rem;
    font-weight: 850;
    line-height: 1.15;
}

.kai-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.kai-stat-card {
    display: flex;
    align-items: center;
    min-width: 0;
    min-height: 116px;
    gap: 16px;
    padding: 18px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(31, 45, 61, 0.07);
}

.kai-stat-icon {
    display: inline-flex;
    flex: 0 0 58px;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border-radius: 8px;
    color: #fff;
    font-size: 1.35rem;
}

.kai-stat-copy {
    display: grid;
    min-width: 0;
    gap: 4px;
}

.kai-stat-copy span,
.kai-stat-copy small {
    color: #7a8496;
    overflow-wrap: anywhere;
}

.kai-stat-copy span {
    font-size: 0.92rem;
    font-weight: 700;
}

.kai-stat-copy strong {
    color: #222a4a;
    font-size: 1.55rem;
    font-weight: 850;
    line-height: 1;
    overflow-wrap: anywhere;
}

.kai-stat-copy small {
    font-size: 0.8rem;
    line-height: 1.25;
}

.kai-stat-card-blue .kai-stat-icon {
    background: #3478e5;
}

.kai-stat-card-info .kai-stat-icon {
    background: #55a7eb;
}

.kai-stat-card-success .kai-stat-icon {
    background: #5ac94e;
}

.kai-stat-card-gold .kai-stat-icon {
    background: #d7a550;
}

.kai-stat-card-warning .kai-stat-icon {
    background: #e0a640;
}

.kai-stat-card-danger .kai-stat-icon {
    background: #dc2626;
}

.ops-check-title {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 260px;
}

.ops-check-icon {
    display: inline-flex;
    flex: 0 0 38px;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: #eef3ff;
    color: #2E6FFF;
}

.ops-action-copy {
    max-width: 460px;
    color: #475569 !important;
    font-size: 0.88rem;
    line-height: 1.4;
}

.ops-error-list {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.ops-error-item {
    min-width: 0;
    padding: 10px;
    border: 1px solid #dfe6ef;
    border-left: 3px solid #dc2626;
    border-radius: 8px;
    background: #fff;
}

.ops-error-header,
.ops-error-message,
.ops-error-context div {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    min-width: 0;
}

.ops-error-header strong,
.ops-error-message span,
.ops-error-context dd {
    min-width: 0;
    overflow-wrap: anywhere;
}

.ops-error-header span,
.ops-error-resource,
.ops-error-context dt {
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 800;
}

.ops-error-resource {
    margin-top: 3px;
}

.ops-error-message {
    align-items: flex-start;
    margin-top: 7px;
}

.ops-error-message code {
    flex: 0 0 auto;
    padding: 2px 6px;
    border-radius: 5px;
    background: #fee2e2;
    color: #991b1b;
    font-size: 0.72rem;
    font-weight: 850;
}

.ops-error-context {
    display: grid;
    gap: 4px;
    margin: 8px 0 0;
}

.ops-error-context dt,
.ops-error-context dd {
    margin: 0;
}

.ops-error-context dd {
    color: #334155;
    font-size: 0.78rem;
    font-weight: 750;
    text-align: right;
}

.ops-metric-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.ops-metric-card {
    display: grid;
    gap: 12px;
    min-width: 0;
    padding: 14px;
    border: 1px solid #dfe6ef;
    border-radius: 8px;
    background: #f8fafc;
}

.ops-metric-card-header {
    min-width: 0;
}

.ops-metric-card dl {
    display: grid;
    gap: 7px;
    margin: 0;
}

.ops-metric-card dl div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}

.ops-metric-card dt {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: capitalize;
}

.ops-metric-card dd {
    margin: 0;
    color: #1f2937;
    font-size: 0.85rem;
    font-weight: 850;
    text-align: right;
    overflow-wrap: anywhere;
}

.release-section-grid {
    display: grid;
    gap: 18px;
}

.release-section-card .table {
    min-width: 980px;
}

.kai-table-card {
    overflow: hidden;
}

.kai-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 22px;
    border-bottom: 1px solid #e7ecf3;
    background: #fff;
}

.kai-card-header h2 {
    margin: 0;
    color: #27304f;
    font-size: 1.08rem;
    font-weight: 850;
}

.kai-card-header p {
    margin: 4px 0 0;
    color: #7a8496;
    font-size: 0.9rem;
}

.fiscal-control-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.fiscal-control-card {
    display: grid;
    gap: 10px;
    min-width: 0;
    min-height: 132px;
    padding: 16px;
    border: 1px solid #dbe4ee;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(26, 40, 58, 0.06);
}

.fiscal-control-card div {
    display: grid;
    gap: 4px;
}

.fiscal-control-card span:not(.badge) {
    color: #718096;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
}

.fiscal-control-card strong {
    color: #202940;
    font-size: 1.2rem;
    font-weight: 850;
    line-height: 1.1;
    overflow-wrap: anywhere;
}

.fiscal-control-card p {
    margin: 0;
    color: #64748b;
    font-size: 0.86rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.fiscal-control-card .badge {
    justify-self: start;
}

.fiscal-evidence-table td:first-child {
    min-width: 230px;
}

.fiscal-evidence-table td:first-child strong,
.fiscal-evidence-table td:first-child small {
    display: block;
}

.fiscal-evidence-table td:first-child small {
    margin-top: 3px;
    color: #64748b;
}

.fiscal-evidence-form {
    display: grid;
    grid-template-columns: minmax(120px, 0.7fr) minmax(220px, 1.4fr) minmax(140px, 0.7fr) minmax(240px, 1.5fr) auto;
    gap: 8px;
    align-items: start;
}

.fiscal-evidence-form select,
.fiscal-evidence-form input,
.fiscal-evidence-form textarea {
    width: 100%;
    min-width: 0;
}

.fiscal-evidence-form textarea {
    min-height: 42px;
    resize: vertical;
}

.auth-card,
.panel-card {
    width: min(100%, 440px);
    margin: 0 auto;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: #fff;
    box-shadow: none;
}

.auth-card-header {
    display: grid;
    gap: 8px;
    margin-bottom: 22px;
}

.auth-card h1 {
    margin: 0;
    color: #1d2c31;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.08;
}

.auth-card .muted {
    margin: 0;
    color: #65727d;
    font-size: 0.95rem;
    line-height: 1.5;
}

.panel-card {
    width: min(100%, 760px);
    padding: 28px;
    border: 1px solid #e0e7ef;
    background: #fff;
    box-shadow: 0 12px 30px rgba(31, 45, 61, 0.07);
}

.card {
    border: 1px solid #e0e7ef;
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(31, 45, 61, 0.06);
}

.card .card-body {
    padding: 22px;
}

.form-row {
    display: grid;
    gap: 6px;
    margin-bottom: 16px;
}

.form-row label {
    color: #24343a;
    font-size: 0.9rem;
    font-weight: 750;
}

.form-row input,
.form-row select,
.form-row textarea {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid #b8c6ce;
    border-radius: 6px;
    background: #fff;
    color: #172126;
    font: inherit;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
    outline: 3px solid rgba(46, 111, 255, 0.16);
    border-color: #2E6FFF;
}

.form-row input[type="file"] {
    padding: 7px;
}

.form-row input[type="file"]::file-selector-button {
    min-height: 32px;
    margin-right: 10px;
    padding: 6px 10px;
    border: 1px solid #b8c6ce;
    border-radius: 6px;
    background: #f8fafc;
    color: #334155;
    font: inherit;
    font-weight: 700;
}

/* ---- Form modal header (Roplio blue) ---- */
.modal-header:not(.admin-modal-header) {
    align-items: center;
    gap: 12px;
    border-bottom: none;
    background: var(--brand-gradient, linear-gradient(135deg, #2E6FFF 0%, #6A45FF 100%));
    color: #fff;
}

.modal-header:not(.admin-modal-header) .modal-title {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: #fff;
    font-weight: 800;
}

.modal-header:not(.admin-modal-header) .modal-title i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex: none;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 0.95rem;
}

.modal-header:not(.admin-modal-header) .btn-close {
    filter: invert(1) grayscale(1) brightness(2);
    opacity: 0.85;
}

/* ---- Pretty radio choices (segmented buttons) ---- */
.choice-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.choice-option {
    position: relative;
    margin: 0;
}

.choice-option input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.choice-option > span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 42px;
    padding: 9px 15px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: #475569;
    font-weight: 700;
    transition: border-color .15s, background .15s, color .15s, box-shadow .15s;
}

.choice-option > span i {
    color: #94a3b8;
    transition: color .15s;
}

.choice-option input:hover + span {
    border-color: #94a3b8;
}

.choice-option input:checked + span {
    border-color: var(--brand-blue, #2E6FFF);
    background: rgba(46, 111, 255, 0.10);
    color: var(--brand-blue, #2E6FFF);
    box-shadow: inset 0 0 0 1px var(--brand-blue, #2E6FFF);
}

.choice-option input:checked + span i {
    color: var(--brand-blue, #2E6FFF);
}

.choice-option input:focus-visible + span {
    outline: 3px solid var(--brand-focus-primary, rgba(46, 111, 255, .35));
    outline-offset: 1px;
}

/* Priority/severity accent variants */
.choice-option input:checked + span.is-low {
    border-color: #16a34a;
    background: rgba(22, 163, 74, .10);
    color: #15803d;
    box-shadow: inset 0 0 0 1px #16a34a;
}

.choice-option input:checked + span.is-low i {
    color: #16a34a;
}

.choice-option input:checked + span.is-medium {
    border-color: #d97706;
    background: rgba(217, 119, 6, .10);
    color: #b45309;
    box-shadow: inset 0 0 0 1px #d97706;
}

.choice-option input:checked + span.is-medium i {
    color: #d97706;
}

.choice-option input:checked + span.is-high {
    border-color: #dc2626;
    background: rgba(220, 38, 38, .10);
    color: #b91c1c;
    box-shadow: inset 0 0 0 1px #dc2626;
}

.choice-option input:checked + span.is-high i {
    color: #dc2626;
}

/* ---- Inputs with a leading icon ---- */
.input-icon {
    position: relative;
    display: block;
}

.input-icon > i {
    position: absolute;
    left: 13px;
    top: 23px;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.95rem;
    pointer-events: none;
}

.input-icon > input,
.input-icon > select,
.input-icon > textarea {
    padding-left: 38px;
}

.input-icon > textarea + i,
.input-icon > i + textarea {
    /* keep icon near the top for textareas */
}

.two-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.three-cols {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0 18px;
    color: #35454c;
    font-weight: 650;
}

.checkbox-row input {
    width: 18px;
    height: 18px;
    accent-color: #2E6FFF;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 9px 15px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: #2E6FFF;
    color: #fff;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    gap: 8px;
}

.btn-sm {
    min-height: 34px;
    padding: 6px 11px;
    font-size: 0.86rem;
}

.btn:hover,
.btn:focus-visible {
    color: #fff;
    background: #2559CC;
}

.btn.btn-primary {
    border-color: transparent !important;
    background: var(--brand-gradient, linear-gradient(135deg, #2E6FFF 0%, #6A45FF 100%)) !important;
    color: #fff !important;
}

.btn.btn-primary:hover,
.btn.btn-primary:focus-visible {
    border-color: transparent !important;
    background: linear-gradient(135deg, #2559CC 0%, #5537CC 100%) !important;
    color: #fff !important;
}

.btn:focus-visible {
    outline: 3px solid rgba(46, 111, 255, 0.22);
    outline-offset: 2px;
}

/* ---- Modal footer: cancel (red) on the left, primary on the right ---- */
.modal-footer {
    justify-content: flex-end;
    gap: 10px;
}

.modal-footer > [data-bs-dismiss="modal"],
.modal-footer > form:first-child {
    margin-right: auto;
}

.modal-footer .btn[data-bs-dismiss="modal"] {
    border-color: #fecaca !important;
    background: #fff !important;
    color: #dc2626 !important;
}

.modal-footer .btn[data-bs-dismiss="modal"]:hover,
.modal-footer .btn[data-bs-dismiss="modal"]:focus-visible {
    border-color: #f87171 !important;
    background: #fef2f2 !important;
    color: #b91c1c !important;
}

.btn.btn-secondary {
    background: #fff !important;
    border-color: #b8c6ce !important;
    color: #334155 !important;
}

.btn.btn-secondary:hover,
.btn.btn-secondary:focus-visible {
    background: #eef3ff !important;
    color: #1d2c31 !important;
}

.btn.btn-link {
    min-height: auto;
    padding: 0;
    border-color: transparent;
    background: transparent !important;
    color: #2E6FFF !important;
    box-shadow: none;
}

.btn.btn-link:hover,
.btn.btn-link:focus-visible {
    background: transparent !important;
    color: #2559CC !important;
    text-decoration: underline;
}

.btn.btn-outline-secondary {
    background: #fff !important;
    border-color: #d1dbe5 !important;
    color: #334155 !important;
}

.btn.btn-outline-secondary:hover,
.btn.btn-outline-secondary:focus-visible {
    background: #f3f6fb !important;
    border-color: #aebdca !important;
    color: #1f2937 !important;
}

.auth-submit {
    width: 100%;
}

.auth-oauth-actions {
    margin-top: 12px;
}

.auth-google-btn {
    width: 100%;
    border-color: #cbd5e1 !important;
    background: #fff !important;
    color: #1f2937 !important;
}

.auth-google-btn:hover,
.auth-google-btn:focus-visible {
    border-color: #94a3b8 !important;
    background: #f8fafc !important;
    color: #0f172a !important;
}

.auth-secondary-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px 16px;
    margin-top: 16px;
    font-size: 0.92rem;
}

.auth-resend-form {
    margin-top: 12px;
}

.flash {
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background: #fff;
}

@media (max-width: 1180px) {
    .kai-stat-grid,
    .fiscal-control-grid,
    .dashboard-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .account-profile-card,
    .account-photo-panel {
        align-items: flex-start;
        flex-direction: column;
    }

    .account-grid,
    .account-form-grid {
        grid-template-columns: 1fr;
    }

    .account-section-card {
        padding: 16px;
    }

    .account-photo-card {
        position: static;
    }

    .account-actions {
        justify-content: stretch;
    }

    .account-actions .btn {
        width: 100%;
    }

    .replio-navbar {
        min-height: auto;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .replio-navbar .container-fluid {
        flex-wrap: wrap;
        gap: 10px 12px;
    }

    .tenant-context {
        min-width: 0;
        max-width: calc(100% - 104px);
    }

    .tenant-context-toggle {
        max-width: 100%;
        min-height: 62px;
        gap: 12px;
        padding: 5px 9px 5px 5px;
    }

    .tenant-context-logo {
        width: 92px;
        height: 52px;
        flex-basis: 92px;
        border-radius: 12px;
    }

    .tenant-context strong {
        font-size: 0.96rem;
    }

    .tenant-context-menu {
        width: min(330px, calc(100vw - 24px));
    }

    .page-context-title {
        order: 3;
        width: 100%;
    }

    .profile-username {
        display: none;
    }

    .topbar-nav {
        gap: 6px;
    }

    .dashboard-hero,
    .dashboard-grid,
    .dashboard-metrics,
    .global-company-grid,
    .fiscal-control-grid,
    .fiscal-evidence-form,
    .kai-stat-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-hero {
        display: grid;
        align-items: start;
        padding: 18px;
    }

    .dashboard-actions {
        justify-content: stretch;
    }

    .dashboard-actions .btn,
    .dashboard-metric {
        width: 100%;
    }

    .kai-card-header,
    .kai-stat-card {
        padding: 16px;
    }

    .auth-layout {
        align-items: stretch;
        padding: 0;
    }

    .auth-shell {
        grid-template-columns: 1fr;
        width: 100%;
        min-height: 100vh;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .auth-brand-panel {
        min-height: 188px;
        padding: 24px;
    }

    .auth-brand-title {
        max-width: 100%;
        font-size: 1.42rem;
    }

    .auth-content {
        align-content: start;
        padding: 28px 22px 34px;
    }

    .auth-card h1 {
        font-size: 1.7rem;
    }
}

@media (max-width: 420px) {
    .auth-brand-panel {
        padding: 22px 18px;
    }

    .auth-content {
        padding: 24px 18px 30px;
    }

    .auth-secondary-actions {
        display: grid;
        justify-content: stretch;
    }
}

.flash-error,
.flash-danger {
    border-color: #fecaca;
    color: #991b1b;
    background: #fff1f2;
}

.flash-success {
    border-color: #bbf7d0;
    color: #166534;
    background: #f0fdf4;
}

.flash-warning {
    border-color: #fde68a;
    color: #92400e;
    background: #fffbeb;
}

.loading-state,
.error-state {
    padding: 18px;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    color: #64748b;
    background: #f8fafc;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 30px 22px;
    border: 1px dashed #d7e0ea;
    border-radius: 12px;
    color: #64748b;
    text-align: center;
    background: linear-gradient(180deg, #ffffff 0%, #f6f9ff 100%);
}

.empty-state::before {
    content: "\f01c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-bottom: 6px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #eef3ff 0%, #e1ebff 100%);
    color: #2E6FFF;
    font-size: 1.3rem;
}

.empty-state a {
    color: #2E6FFF;
    font-weight: 750;
}

.loading-state {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #2563eb;
    font-weight: 600;
}

.loading-state::before {
    content: "";
    width: 20px;
    height: 20px;
    flex: none;
    border: 3px solid #bfdbfe;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: roplio-spin 0.7s linear infinite;
}

@keyframes roplio-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .loading-state::before {
        animation-duration: 1.6s;
    }
}

.error-state,
.form-error {
    border-color: #fecaca;
    color: #991b1b;
    background: #fff1f2;
}

.form-error {
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid #fecaca;
    border-radius: 6px;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1;
}

.badge-soft {
    background: #e8efff;
    color: #2E6FFF;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-neutral {
    background: #e2e8f0;
    color: #475569;
}

.integration-error-note {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-top: 6px;
    color: #991b1b;
    font-size: 0.78rem;
    line-height: 1.3;
}

.integration-error-note code {
    padding: 2px 6px;
    border-radius: 5px;
    background: #fee2e2;
    color: #991b1b;
    font-size: 0.72rem;
    font-weight: 850;
}

.alert {
    padding: 12px 14px;
    border: 1px solid #d8dee8;
    border-radius: 8px;
    background: #fff;
    color: #334155;
}

.alert strong {
    display: block;
    margin-bottom: 6px;
    color: #1f2937;
}

.alert ul {
    padding-left: 18px;
}

.alert-danger {
    border-color: #fecaca;
    background: #fff1f2;
    color: #991b1b;
}

.alert-warning {
    border-color: #fde68a;
    background: #fffbeb;
    color: #92400e;
}

.form-section-title {
    margin: 18px 0 10px;
    color: #94a3b8;
    font-size: 0.76rem;
    font-weight: 850;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.form-check-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0 4px;
    color: #334155;
    font-weight: 750;
}

.form-check-row input {
    width: 18px;
    height: 18px;
}

.company-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 2px 0;
}

.inline-form {
    display: inline;
}

.table-actions {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 7px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 8px;
    color: #64748b;
    font-size: 0.84rem;
    font-weight: 800;
    text-decoration: none;
}

.back-link:hover,
.back-link:focus-visible {
    color: #2559CC;
}

.client-page-header {
    align-items: flex-start;
}

.client-stat-grid {
    margin-bottom: 18px;
}

.client-tabs-shell {
    display: grid;
    gap: 14px;
}

.config-tabs-shell {
    margin-bottom: 18px;
}

.client-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px;
    border: 1px solid #dfe6ef;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(31, 45, 61, 0.05);
}

.client-tabs .nav-link {
    min-height: 38px;
    border-radius: 6px;
    color: #526173;
    font-weight: 800;
}

.client-tabs .nav-link i {
    margin-right: 7px;
    opacity: 0.9;
}

.client-tabs .nav-link:hover,
.client-tabs .nav-link:focus-visible {
    color: #2559CC;
    background: #eef3ff;
}

.client-tabs .nav-link.active {
    color: #fff;
    background: #2E6FFF;
    box-shadow: 0 8px 16px rgba(46, 111, 255, 0.20);
}

.client-tab-content {
    min-width: 0;
}

.client-tab-content .tab-pane {
    padding-top: 4px;
}

.client-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

.settings-layout-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    gap: 16px;
    align-items: start;
}

.company-branding-preview {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    padding: 14px;
    border: 1px solid #dfe6ef;
    border-radius: 8px;
    background: #f8fbfc;
}

.company-branding-logo {
    display: inline-grid;
    width: 68px;
    height: 68px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid #d6e0ea;
    border-radius: 8px;
    background: #fff;
    color: #2E6FFF;
    font-size: 1.05rem;
    font-weight: 900;
    object-fit: contain;
}

.company-branding-copy {
    min-width: 0;
    flex: 1 1 auto;
}

.company-branding-preview strong {
    display: block;
    color: #243042;
    font-weight: 850;
}

.company-branding-preview small {
    color: #64748b;
    font-weight: 650;
}

.company-logo-form {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.company-logo-file {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.company-logo-replace {
    margin-bottom: 0;
    white-space: nowrap;
}

.company-logo-remove {
    color: #64748b;
    font-weight: 800;
    text-decoration: none;
}

.company-logo-remove:hover {
    color: #dc2626;
}

@media (max-width: 575.98px) {
    .company-branding-preview {
        flex-wrap: wrap;
    }

    .company-logo-form {
        width: 100%;
        margin-left: 82px;
        flex-wrap: wrap;
    }
}

.client-info-card {
    min-width: 0;
}

.client-info-card .card-body {
    padding: 20px;
}

.operations-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.operation-card {
    display: flex;
    min-width: 0;
    min-height: 245px;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
    border: 1px solid #dfe6ef;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(31, 45, 61, 0.04);
}

.operation-card-head {
    display: flex;
    gap: 12px;
    align-items: center;
}

.operation-card-head h3 {
    margin: 0;
    color: #243042;
    font-size: 1rem;
    font-weight: 850;
}

.operation-card-head p {
    margin: 2px 0 0;
    color: #6c7888;
    font-size: 0.88rem;
    font-weight: 650;
}

.operation-icon {
    display: inline-grid;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 8px;
    background: #eaf5f6;
    color: #2E6FFF;
    font-size: 1.05rem;
}

.compact-definition-list {
    gap: 8px;
    margin-bottom: auto;
}

.compact-definition-list div {
    padding: 8px 0;
}

.integration-pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: auto;
}

.integration-pill {
    display: inline-flex;
    min-height: 32px;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border: 1px solid #dfe6ef;
    border-radius: 8px;
    background: #f6f8fb;
    color: #3a4656;
    font-size: 0.82rem;
    font-weight: 800;
}

.integration-pill small {
    color: #7c8796;
    font-size: 0.72rem;
    font-weight: 750;
}

.integration-pill.is-active {
    border-color: #bdebd0;
    background: #eafbf0;
    color: #217347;
}

.integration-pill.is-active small {
    color: #2f8b59;
}

.integration-pill.has-error {
    border-color: #fecaca;
    background: #fff1f2;
    color: #991b1b;
}

.integration-pill.has-error small {
    color: #b91c1c;
}

.client-timeline-list {
    display: grid;
    gap: 12px;
    margin-bottom: 0;
}

.section-heading h2,
.kai-card-header h2 {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0;
    color: #1f2d3d;
    font-weight: 900;
    letter-spacing: 0;
}

.section-heading-copy,
.kai-card-header > div {
    min-width: 0;
}

.section-heading-copy p {
    margin: 5px 0 0;
    color: #64748b;
    font-size: 0.86rem;
    font-weight: 650;
}

.section-title-icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid #cce5e8;
    border-radius: 8px;
    background: #eef9fa;
    color: #2E6FFF;
    font-size: 0.9rem;
}

.work-item-card {
    position: relative;
    padding: 14px 14px 14px 16px;
    border: 1px solid #dce6f2;
    border-left: 4px solid #2E6FFF;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(31, 53, 89, 0.05);
}

.work-item-card.has-actions {
    padding-right: 70px;
}

.work-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.work-card-title {
    min-width: 0;
}

.work-card-title strong {
    display: block;
    color: #223044;
    font-size: 0.98rem;
    font-weight: 900;
    text-transform: uppercase;
}

.work-card-meta {
    flex: 0 0 auto;
    max-width: 220px;
    color: #475569;
    font-size: 0.78rem;
    font-weight: 800;
    text-align: right;
}

.work-card-meta strong,
.work-card-meta small {
    display: block;
    line-height: 1.25;
}

.work-card-meta small {
    margin-top: 2px;
    color: #94a3b8;
    font-size: 0.72rem;
    font-weight: 750;
}

.work-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.work-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 26px;
    padding: 4px 8px;
    border: 1px solid #dce6f2;
    border-radius: 999px;
    background: #f8fafc;
    color: #475569;
    font-size: 0.72rem;
    font-weight: 900;
    line-height: 1;
}

.work-tag.is-open,
.work-tag.is-normal {
    border-color: #cbd5e1;
    background: #f8fafc;
    color: #334155;
}

.work-tag.is-progress {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
}

.work-tag.is-done,
.work-tag.is-low {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.work-tag.is-cancelled,
.work-tag.is-high {
    border-color: #fde68a;
    background: #fffbeb;
    color: #92400e;
}

.work-card-body {
    margin-top: 10px;
    color: #334155;
    line-height: 1.5;
}

.work-card-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
}

.work-floating-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-flex;
    gap: 6px;
    z-index: 1;
}

.icon-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0;
    border-radius: 8px;
}

.icon-action-btn.is-danger {
    border-color: #fecaca;
    background: #fff1f2;
    color: #b91c1c;
}

.icon-action-btn.is-danger:hover {
    border-color: #fca5a5;
    background: #ffe4e6;
    color: #991b1b;
}

.inline-action-form {
    display: inline-flex;
    margin: 0;
}

.admin-modal-header {
    align-items: flex-start;
    border-bottom: 1px solid #dfe6ef;
    background: #1a2035;
    color: #fff;
}

.admin-modal-header .modal-title {
    color: #fff;
    font-weight: 850;
}

.admin-modal-header .btn-close {
    filter: invert(1) grayscale(1) brightness(1.8);
    opacity: 0.9;
}

.modal-subtitle {
    margin: 4px 0 0;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.88rem;
    font-weight: 650;
}

.admin-modal-body {
    display: grid;
    gap: 14px;
    background: #f5f8fc;
}

.modal-dialog.modal-xl {
    max-width: min(1280px, calc(100vw - 48px));
}

.modal-section-card {
    padding: 16px;
    border: 1px solid #dce6f2;
    border-left: 4px solid #2E6FFF;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(31, 53, 89, 0.06);
}

.modal-section-card-warning {
    border-left-color: #d7a550;
}

.modal-section-card .form-row:last-child,
.modal-section-card .checkbox-row:last-child {
    margin-bottom: 0;
}

.modal-section-heading {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 14px;
    color: #24324a;
    font-size: 0.84rem;
    font-weight: 900;
    text-transform: uppercase;
}

.modal-section-heading i {
    color: #2E6FFF;
}

.segmented-control {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
    gap: 8px;
    min-width: 0;
}

.segmented-control.is-compact {
    grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
}

.segmented-control.segmented-control-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.segmented-option {
    position: relative;
    display: block;
    min-width: 0;
    margin: 0;
}

.segmented-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.segmented-option span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid #cbd8e5;
    border-radius: 8px;
    background: #fff;
    color: #334155;
    font-size: 0.9rem;
    font-weight: 850;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.segmented-option span::before {
    content: "";
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    border: 2px solid #9fb0c3;
    border-radius: 999px;
    background: #fff;
}

.segmented-control-inline .segmented-option span {
    min-height: 32px;
    padding: 6px 10px;
    font-size: 0.78rem;
}

.segmented-control-inline .segmented-option span::before {
    width: 11px;
    height: 11px;
    border-width: 2px;
}

.segmented-option input:checked + span {
    border-color: #2E6FFF;
    background: #eef9fa;
    color: #0f5b61;
    box-shadow: inset 0 0 0 1px rgba(46, 111, 255, 0.2), 0 6px 16px rgba(46, 111, 255, 0.08);
}

.segmented-option input:checked + span::before {
    border-color: #2E6FFF;
    box-shadow: inset 0 0 0 3px #2E6FFF;
}

.segmented-option input:focus-visible + span {
    outline: 2px solid rgba(46, 111, 255, 0.35);
    outline-offset: 2px;
}

.segmented-option:hover span {
    border-color: #2E6FFF;
}

.ai-test-result {
    padding: 10px 12px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.9rem;
    font-weight: 700;
}

.ai-test-result.is-ok {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.ai-test-result.is-error {
    border-color: #fecaca;
    background: #fff1f2;
    color: #991b1b;
}

.modal-checkbox-row {
    align-self: end;
    min-height: 46px;
    margin-bottom: 16px;
}

.role-toggle-grid,
.permission-grid,
.permission-chip-list {
    display: grid;
    gap: 10px;
}

.role-toggle-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.role-template-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.team-role-assignment-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
    gap: 14px;
    align-items: start;
}

.role-template-section,
.role-template-summary-card {
    min-width: 0;
}

.role-template-grid-grouped {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
}

.role-template-group-heading {
    grid-column: 1 / -1;
    margin-top: 2px;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.role-template-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
    margin: 0;
    padding: 13px;
    border: 1px solid #dce6f2;
    border-radius: 8px;
    background: #f8fafc;
    color: #334155;
    cursor: pointer;
}

.role-template-card:has(input:checked) {
    border-color: #2E6FFF;
    background: #eef9fa;
    box-shadow: inset 0 0 0 1px rgba(46, 111, 255, 0.18);
}

.role-template-card input {
    flex: 0 0 auto;
    margin-top: 3px;
}

.role-template-card span,
.role-template-card strong,
.role-template-card small {
    display: block;
    min-width: 0;
}

.role-template-card strong {
    color: #223044;
    font-weight: 850;
}

.role-template-card small {
    margin-top: 3px;
    color: #64748b;
    font-weight: 650;
    line-height: 1.35;
}

.role-template-grid-grouped .role-template-card {
    padding: 10px;
}

.role-template-grid-grouped .role-template-card strong {
    font-size: 0.95rem;
}

.role-template-grid-grouped .role-template-card small {
    font-size: 0.78rem;
}

.role-template-summary-content {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.role-template-summary-header {
    display: grid;
    grid-column: 1 / -1;
    gap: 3px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5edf3;
}

.role-template-summary-header strong {
    color: #223044;
    font-size: 1rem;
    font-weight: 850;
}

.role-template-summary-header span {
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 700;
}

.permission-preview-group {
    display: grid;
    gap: 7px;
    min-width: 0;
    padding: 8px;
    border: 1px solid #edf2f7;
    border-radius: 8px;
    background: #fbfdff;
}

.permission-preview-group > strong {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.permission-preview-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.permission-preview-list .permission-chip {
    padding: 3px 6px;
    font-size: 0.72rem;
}

.access-state-card {
    padding-block: 12px;
}

.access-state-card .modal-checkbox-row {
    min-height: 0;
    margin-bottom: 0;
}

.role-toggle-card,
.permission-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
    margin: 0;
    padding: 12px;
    border: 1px solid #dce6f2;
    border-radius: 8px;
    background: #f8fafc;
    color: #334155;
}

.role-toggle-card input,
.permission-check input {
    flex: 0 0 auto;
    margin-top: 3px;
}

.role-toggle-card strong,
.role-toggle-card small {
    display: block;
}

.role-toggle-card small {
    margin-top: 3px;
    color: #64748b;
    font-weight: 600;
    line-height: 1.35;
}

.permission-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.permission-group {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.permission-group > strong {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.permission-check {
    padding: 9px 10px;
    font-weight: 700;
}

.permission-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-width: 480px;
}

.permission-chip {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 8px;
    border-radius: 6px;
    background: #eef6f7;
    color: #2E6FFF;
    font-size: 0.78rem;
    font-weight: 750;
    line-height: 1.2;
}

.credential-block {
    overflow-x: auto;
    margin: 12px 0 0;
    padding: 14px;
    border: 1px solid #d2dce8;
    border-radius: 8px;
    background: #101828;
    color: #f8fafc;
    font-size: 0.86rem;
    line-height: 1.55;
    white-space: pre;
}

.credential-block code {
    color: inherit;
}

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

    .ops-metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .client-detail-grid {
        grid-template-columns: 1fr;
    }

    .settings-layout-grid {
        grid-template-columns: 1fr;
    }

    .operations-grid {
        grid-template-columns: 1fr;
    }

    .ops-metric-grid {
        grid-template-columns: 1fr;
    }

    .role-toggle-grid,
    .role-template-grid,
    .permission-grid,
    .team-role-assignment-grid,
    .role-template-summary-content {
        grid-template-columns: 1fr;
    }

    .table-actions {
        display: grid;
        justify-content: stretch;
    }

    .table-actions .btn,
    .table-actions .inline-form,
    .table-actions .inline-form .btn {
        width: 100%;
    }

    .client-tabs {
        display: grid;
    }

    .client-tabs .nav-link {
        width: 100%;
    }
}

.kai-table-card .card-body {
    padding: 0 22px 22px;
}

.kai-table-card .table {
    margin-bottom: 0;
}

.kai-table-card .table > :not(caption) > * > * {
    border-bottom-color: #edf2f7;
    padding: 15px 14px;
}

.kai-table-card .table thead th {
    color: #172126;
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Subtle leading icons on table column headers */
thead th > i[class*="fa-"]:first-child {
    margin-right: 6px;
    color: #94a3b8;
    font-size: 0.92em;
}

.kai-table-card .table tbody tr {
    min-height: 64px;
}

.kai-table-card .table tbody td {
    color: #111827;
    vertical-align: middle;
}

.kai-table-card .table tbody strong {
    color: #111827;
    font-weight: 850;
}

.kai-table-card .table-light > * {
    background: #f8fafc !important;
}

.booking-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.booking-tabs .btn.active,
.booking-tabs .btn[aria-current="page"] {
    border-color: #2E6FFF !important;
    background: #eaf6f7 !important;
    color: #2559CC !important;
    box-shadow: inset 0 0 0 1px rgba(46, 111, 255, 0.08);
}

.split-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.section-heading h2,
.modal-section-title {
    margin: 0;
    font-size: 1rem;
}

.form-grid,
.filter-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.filter-row {
    align-items: end;
}

.slot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.slot-tile {
    display: grid;
    gap: 8px;
    min-height: 132px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
}

.slot-tile strong,
.slot-tile span {
    display: block;
}

.timeline-list {
    display: grid;
    gap: 8px;
    margin-bottom: 18px;
}

.timeline-item {
    display: grid;
    gap: 3px;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.contact-link-list {
    display: grid;
    gap: 9px;
    margin-bottom: 18px;
}

.contact-link-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid #d8dee8;
    border-radius: 8px;
    background: #fff;
}

.contact-link-card.confirmed {
    border-color: #b7d8d2;
    background: #f4fbfa;
}

.contact-link-card.suggested {
    border-color: #f3d38b;
    background: #fffaf0;
}

.contact-link-card strong,
.contact-link-card span,
.contact-link-card small {
    display: block;
    overflow-wrap: anywhere;
}

.contact-link-card span,
.contact-link-card small {
    color: #64748b;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 22px;
    margin-bottom: 5px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 850;
    line-height: 1;
    text-transform: uppercase;
}

.status-pill.success {
    background: #dcfce7;
    color: #166534;
}

.status-pill.warning {
    background: #fef3c7;
    color: #92400e;
}

.conversation-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
    gap: 16px;
    align-items: start;
}

.conversation-list-panel,
.conversation-drawer {
    min-width: 0;
}

.conversation-list {
    display: grid;
    gap: 8px;
}

.conversation-row {
    width: 100%;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid #d8dee8;
    border-radius: 8px;
    background: #fff;
    color: inherit;
    text-align: left;
}

.conversation-row:hover,
.conversation-row:focus {
    border-color: #2563eb;
    outline: none;
}

.conversation-row-main,
.conversation-row-meta,
.conversation-thread-header,
.conversation-message,
.conversation-drawer-empty {
    display: grid;
    gap: 4px;
}

.conversation-row-main span,
.conversation-row-main small,
.conversation-row-meta,
.conversation-thread-header span,
.conversation-message time,
.conversation-drawer-empty span {
    color: #64748b;
    font-size: 0.9rem;
}

.conversation-row-main span,
.conversation-message p {
    overflow-wrap: anywhere;
}

.conversation-row-meta {
    justify-items: end;
}

.conversation-status {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #e0f2fe;
    color: #075985;
    font-size: 0.78rem;
    font-weight: 700;
}

.conversation-status-handoff {
    background: #fef3c7;
    color: #92400e;
}

.conversation-status-closed {
    background: #e2e8f0;
    color: #475569;
}

.conversation-drawer {
    position: sticky;
    top: 92px;
    max-height: calc(100vh - 120px);
    overflow: auto;
    padding: 14px;
    border: 1px solid #d8dee8;
    border-radius: 8px;
    background: #fff;
}

.conversation-thread {
    display: grid;
    gap: 14px;
}

.conversation-thread-header {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
}

.conversation-thread-header h2 {
    margin: 0;
    font-size: 1.1rem;
}

.conversation-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.conversation-messages {
    display: grid;
    gap: 10px;
}

.conversation-message {
    padding: 10px 12px;
    border-radius: 8px;
    background: #f8fafc;
}

.conversation-message-out {
    background: #eff6ff;
}

.conversation-message p {
    margin: 0;
}

.conversation-reply-form {
    display: grid;
    gap: 8px;
}

.conversation-reply-form textarea {
    width: 100%;
    min-height: 92px;
    padding: 9px 11px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font: inherit;
    resize: vertical;
}

.pipeline-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
}

.pipeline-column {
    min-width: 0;
    padding: 10px;
    border: 1px solid #d8dee8;
    border-radius: 8px;
    background: #f8fafc;
}

.pipeline-column-header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    color: #334155;
}

.pipeline-column-header span {
    min-width: 28px;
    height: 28px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: #e2e8f0;
    font-weight: 700;
}

.pipeline-items {
    display: grid;
    gap: 8px;
}

.pipeline-item {
    width: 100%;
    display: grid;
    gap: 5px;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: inherit;
    text-align: left;
}

.pipeline-item:hover,
.pipeline-item:focus {
    border-color: #2563eb;
    outline: none;
}

.pipeline-item span,
.pipeline-item small {
    overflow-wrap: anywhere;
}

.pipeline-item-title {
    font-weight: 700;
}

.pipeline-item small,
.pipeline-empty,
.contact-inline {
    color: #64748b;
}

.pipeline-empty {
    padding: 10px;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    background: #fff;
}

.contact-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 14px;
}

.contact-inline span {
    padding: 6px 8px;
    border: 1px solid #d8dee8;
    border-radius: 6px;
    background: #fff;
}

.status-grid.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 0;
}

.onboarding-card {
    width: min(100%, 860px);
}

.onboarding-steps,
.weekday-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0 18px;
}

.onboarding-step {
    padding: 7px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    color: #475569;
    background: #fff;
    font-size: 0.88rem;
    font-weight: 700;
}

.onboarding-step.done {
    border-color: #bfdbfe;
    color: #1d4ed8;
    background: #eff6ff;
}

.onboarding-step.active {
    border-color: #2563eb;
    color: #fff;
    background: #2563eb;
}

.weekday-picker {
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.weekday-picker legend {
    width: 100%;
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
}

.muted {
    color: #64748b;
}

.tenant-list,
.status-grid {
    display: grid;
    gap: 12px;
}

.tenant-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.tenant-row-standalone {
    margin: 12px 0 18px;
    background: #f8fafc;
}

.tenant-row strong,
.tenant-row span {
    display: block;
}

.status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 18px 0;
}

.status-grid div {
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.status-grid dt {
    color: #64748b;
    font-size: 0.9rem;
}

.status-grid dd {
    margin: 3px 0 0;
    font-weight: 700;
}

.account-page {
    display: grid;
    gap: 18px;
    max-width: 1120px;
    margin: 0 auto;
}

.account-profile-card,
.account-section-card {
    border: 1px solid #d8e1e8;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(31, 45, 61, 0.07);
}

.account-profile-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 22px;
}

.account-profile-photo-wrap {
    position: relative;
    flex: 0 0 auto;
}

.account-profile-photo,
.account-photo-preview {
    border-radius: 8px;
    background: linear-gradient(135deg, #2e7682, #d7a550);
    color: #fff;
}

.account-profile-photo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 116px;
    height: 116px;
    object-fit: cover;
    font-size: 1.8rem;
    font-weight: 850;
    box-shadow: 0 10px 22px rgba(31, 45, 61, 0.16);
}

.account-profile-photo-empty {
    letter-spacing: 0;
}

.account-profile-summary {
    min-width: 0;
}

.account-profile-summary h1 {
    margin: 3px 0 5px;
    color: #172126;
    font-size: 1.85rem;
    font-weight: 850;
    line-height: 1.1;
    overflow-wrap: anywhere;
}

.account-email {
    margin: 0;
    color: #64748b;
    font-weight: 650;
    overflow-wrap: anywhere;
}

.account-eyebrow {
    margin: 0;
    color: #9a651f;
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0;
    text-transform: uppercase;
}

.account-role-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}

.account-role-list span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 8px;
    border-radius: 6px;
    background: #edf5f6;
    color: #2559CC;
    font-size: 0.76rem;
    font-weight: 800;
}

.account-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
    gap: 18px;
    align-items: start;
}

.account-section-card {
    padding: 20px;
}

.account-section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid #edf1f6;
}

.account-section-header h2 {
    margin: 4px 0 0;
    color: #1d2c31;
    font-size: 1.12rem;
    font-weight: 850;
}

.account-form {
    display: grid;
    gap: 16px;
}

.account-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.account-field,
.account-field > div {
    display: grid;
    gap: 6px;
}

.account-field-wide {
    grid-column: 1 / -1;
}

.account-field label,
.account-field-label {
    margin: 0;
    color: #334155;
    font-size: 0.84rem;
    font-weight: 800;
}

.account-field input,
.account-field select {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid #b8c6ce;
    border-radius: 6px;
    background: #fff;
    color: #172126;
    font: inherit;
}

.account-field input:focus,
.account-field select:focus {
    outline: 3px solid rgba(46, 111, 255, 0.16);
    border-color: #2E6FFF;
}

.account-field ul {
    display: grid;
    gap: 4px;
    margin: 0;
    padding: 0;
    color: #991b1b;
    list-style: none;
    font-size: 0.82rem;
    font-weight: 700;
}

.account-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.account-photo-card {
    position: sticky;
    top: 92px;
}

.account-photo-panel {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}

.account-photo-preview {
    display: grid;
    flex: 0 0 86px;
    width: 86px;
    height: 86px;
    place-items: center;
    overflow: hidden;
    font-size: 1.35rem;
    font-weight: 850;
}

.account-photo-preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.account-photo-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.account-photo-copy strong {
    color: #1f2937;
    font-weight: 850;
    overflow-wrap: anywhere;
}

.account-photo-copy span {
    color: #64748b;
    font-size: 0.86rem;
    font-weight: 650;
}

.account-file-picker {
    position: relative;
}

.account-file-native {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.account-file-drop {
    display: grid;
    gap: 4px;
    min-height: 78px;
    padding: 14px;
    border: 1px dashed #93a8b4;
    border-radius: 8px;
    background: #f8fafc;
    color: #334155;
    cursor: pointer;
    transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.account-file-drop strong {
    color: #2559CC;
    font-size: 0.96rem;
    font-weight: 850;
}

.account-file-drop span {
    color: #64748b;
    font-size: 0.84rem;
    font-weight: 650;
    overflow-wrap: anywhere;
}

.account-file-picker.has-file .account-file-drop,
.account-file-native:focus-visible + .account-file-drop,
.account-file-drop:hover {
    border-color: #2E6FFF;
    background: #edf7f8;
    box-shadow: 0 0 0 3px rgba(46, 111, 255, 0.1);
}

.profile-photo {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    background: #e2e8f0;
}

.usage-alerts,
.usage-metrics {
    display: grid;
    gap: 12px;
    margin-bottom: 18px;
}

.usage-alerts {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.usage-alert {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid #facc15;
    border-radius: 8px;
    background: #fefce8;
    color: #713f12;
}

.usage-alert-exceeded {
    border-color: #fecaca;
    background: #fff1f2;
    color: #991b1b;
}

.usage-metrics {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.usage-metrics article {
    display: grid;
    gap: 4px;
    min-height: 80px;
    padding: 12px 14px;
    border: 1px solid #d8dee8;
    border-radius: 8px;
    background: #fff;
}

.usage-metrics article span {
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 750;
}

.usage-metrics article strong {
    color: #1f2937;
    font-size: 1.35rem;
    font-weight: 850;
}

.metric-tile {
    display: grid;
    align-content: space-between;
    min-height: 132px;
    padding: 14px;
    border: 1px solid #d8dee8;
    border-radius: 8px;
    background: #fff;
}

.metric-head,
.metric-foot,
.usage-totals,
.invoice-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.metric-head {
    align-items: flex-start;
}

.metric-head span,
.metric-foot,
.invoice-meta span {
    color: #64748b;
}

.metric-head strong {
    font-size: 1.35rem;
}

.usage-bar {
    width: 100%;
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
}

.usage-bar-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #2563eb;
}

.usage-bar-warning {
    background: #f59e0b;
}

.usage-bar-exceeded {
    background: #dc2626;
}

.usage-totals {
    flex-wrap: wrap;
}

.usage-totals span {
    padding: 7px 10px;
    border: 1px solid #d8dee8;
    border-radius: 6px;
    background: #fff;
    font-weight: 700;
}

.invoice-meta {
    margin-bottom: 14px;
}

.invoice-document-card {
    overflow: hidden;
    border: 0;
    background: #fff;
    box-shadow: 0 18px 42px rgba(31, 45, 61, 0.1);
}

.invoice-document-card .card-body {
    padding: 34px;
}

.invoice-document-header,
.invoice-brand-block,
.invoice-footer-grid,
.invoice-address-grid {
    display: grid;
    gap: 18px;
}

.invoice-document-header {
    grid-template-columns: minmax(0, 1fr) minmax(180px, auto);
    align-items: start;
    padding-bottom: 24px;
    border-bottom: 1px solid #e2e8f0;
}

.invoice-brand-block {
    grid-template-columns: 82px minmax(0, 1fr);
    align-items: center;
}

.invoice-brand-block h2,
.invoice-address-grid h3,
.invoice-footer-grid h3 {
    margin: 0;
    color: #1f2937;
    font-size: 1.05rem;
    font-weight: 900;
}

.invoice-brand-block p,
.invoice-address-grid p,
.invoice-footer-grid p {
    margin: 3px 0 0;
    color: #64748b;
    font-weight: 650;
}

.invoice-logo-frame {
    display: inline-grid;
    width: 76px;
    height: 76px;
    place-items: center;
    overflow: hidden;
    border: 1px solid #dbe5ef;
    border-radius: 8px;
    background: #f8fafc;
}

.invoice-logo-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.invoice-logo-frame span {
    color: #2E6FFF;
    font-size: 1.25rem;
    font-weight: 900;
}

.invoice-title-block {
    display: grid;
    justify-items: end;
    gap: 8px;
    color: #64748b;
    text-align: right;
}

.invoice-title-block strong {
    color: #111827;
    font-size: 2rem;
    font-weight: 900;
    line-height: 1;
}

.invoice-title-block > span:last-child {
    color: #243042;
    font-weight: 800;
}

.invoice-rectifies-badge {
    margin: 18px 0 0;
}

.invoice-address-grid {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 0.8fr);
    margin: 26px 0;
}

.invoice-address-grid > section {
    min-width: 0;
    padding: 18px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fbfdff;
}

.invoice-address-grid > section > span {
    display: block;
    margin-bottom: 8px;
    color: #2559CC;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.invoice-meta-panel dl,
.invoice-total-panel dl {
    display: grid;
    gap: 10px;
    margin: 0;
}

.invoice-meta-panel dl > div,
.invoice-total-panel dl > div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
}

.invoice-meta-panel dt,
.invoice-total-panel dt {
    color: #64748b;
    font-weight: 750;
}

.invoice-meta-panel dd,
.invoice-total-panel dd {
    margin: 0;
    color: #1f2937;
    font-weight: 850;
    text-align: right;
}

.invoice-lines-table {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.invoice-lines-table table {
    margin-bottom: 0;
}

.invoice-lines-table thead th {
    border-bottom: 0;
    background: #243447;
    color: #fff;
    font-size: 0.78rem;
    text-transform: uppercase;
}

.invoice-footer-grid {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 0.75fr);
    align-items: start;
    margin-top: 24px;
}

.invoice-footer-grid > section {
    min-width: 0;
}

.invoice-footer-grid small {
    color: #64748b;
    font-weight: 650;
}

.invoice-total-panel {
    padding: 16px;
    border-radius: 8px;
    background: #f8fafc;
}

.invoice-total-row {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid #d7e0ea;
}

.invoice-total-row dt,
.invoice-total-row dd {
    color: #111827;
    font-size: 1.05rem;
    font-weight: 900;
}

.fiscal-ops-table td {
    vertical-align: top;
}

.fiscal-inline-control {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.fiscal-inline-control select {
    min-width: 150px;
    height: 36px;
    padding: 6px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    color: #243447;
    font-weight: 700;
}

.fiscal-inline-control .form-error {
    flex-basis: 100%;
    margin: 0;
}

.fiscal-blocker-list {
    display: grid;
    gap: 4px;
    margin: 8px 0 0;
    padding-left: 18px;
    color: #6b7280;
    font-size: 0.82rem;
}

.fiscal-series-row td {
    background: #f8fafc;
    border-top: 0;
}

.fiscal-series-list {
    display: inline-flex;
    margin-left: 8px;
    vertical-align: middle;
}

@media (max-width: 420px) {
    .auth-layout {
        padding: 18px 10px;
    }

    .auth-card,
    .panel-card {
        padding: 18px;
    }

    .tenant-row,
    .page-header {
        align-items: stretch;
        flex-direction: column;
    }

    .status-grid,
    .two-cols,
    .three-cols,
    .split-grid,
    .form-grid,
    .filter-row,
    .fiscal-control-grid,
    .status-grid.compact,
    .conversation-shell,
    .conversation-row,
    .conversation-thread-header {
        grid-template-columns: 1fr;
    }

    .conversation-drawer {
        position: static;
        max-height: none;
    }

    .conversation-row-meta {
        justify-items: start;
    }

    .metric-head,
    .metric-foot,
    .usage-alert,
    .invoice-meta,
    .invoice-document-header,
    .invoice-address-grid,
    .invoice-footer-grid {
        align-items: flex-start;
        flex-direction: column;
    }

    .invoice-document-card .card-body {
        padding: 20px;
    }

    .invoice-document-header,
    .invoice-address-grid,
    .invoice-footer-grid,
    .invoice-brand-block {
        grid-template-columns: 1fr;
    }

    .invoice-title-block {
        justify-items: start;
        text-align: left;
    }

    .invoice-brand-block {
        justify-items: start;
    }

    .fiscal-evidence-form {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   UX polish layer (Roplio) — additive, brand-aligned
   ============================================================ */

/* Pill-shaped status badges */
.badge {
    border-radius: 999px;
    padding: 4px 11px;
    letter-spacing: .2px;
}

/* Sidebar active item: brand gradient instead of flat blue */
.replio-nav > .nav-item.active > a,
.replio-nav > .nav-item.active > a:hover,
.replio-nav > .nav-item.active > a:focus-visible,
.replio-shell .sidebar .nav.nav-secondary.replio-nav > .nav-item.active > a,
.replio-shell .sidebar .nav.nav-secondary.replio-nav > .nav-item.active > a:hover,
.replio-shell .sidebar .nav.nav-secondary.replio-nav > .nav-item.active > a:focus-visible {
    background: var(--brand-gradient, linear-gradient(135deg, #2E6FFF 0%, #6A45FF 100%)) !important;
    box-shadow: 0 10px 20px rgba(46, 111, 255, 0.28);
}

/* Depth + lift on primary buttons */
.btn.btn-primary {
    box-shadow: 0 6px 14px rgba(46, 111, 255, 0.24);
    transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}

.btn.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(46, 111, 255, 0.30);
}

.btn.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(46, 111, 255, 0.22);
}

/* Subtle elevation on interactive cards */
.dashboard-metric,
.kai-table-card,
.dashboard-panel,
.global-company-card {
    transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}

.dashboard-metric:hover,
.global-company-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(20, 33, 61, 0.10);
}

/* Consistent brand focus ring on form controls */
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus,
.input-icon > input:focus,
.input-icon > select:focus {
    outline: 3px solid var(--brand-focus-primary, rgba(46, 111, 255, .30));
    outline-offset: 0;
    border-color: #2E6FFF;
}

/* Gradient avatars + status dot (UI macros) */
.ui-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex: none;
    border-radius: 50%;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1;
    color: #fff;
    text-transform: uppercase;
    overflow: hidden;
    background: linear-gradient(135deg, hsl(var(--avatar-hue, 224) 95% 62%) 0%, hsl(calc(var(--avatar-hue, 224) + 20) 88% 58%) 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.ui-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ui-avatar.avatar-sm {
    width: 28px;
    height: 28px;
    font-size: 0.72rem;
}

.ui-avatar.avatar-lg {
    width: 48px;
    height: 48px;
    font-size: 1.05rem;
}

/* Cell that pairs an avatar with a name/sub-line */
.cell-identity {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.cell-identity > div {
    min-width: 0;
}

.cell-identity-logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: contain;
    background: #fff;
    border: 1px solid #e5e7eb;
    flex: 0 0 auto;
    padding: 2px;
}

.status-badge {
    gap: 6px;
}

.status-badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex: none;
    opacity: 0.85;
}

.empty-state-text { margin: 0; }
.empty-state .btn { margin-top: 10px; }

/* Skeleton loaders for AJAX content */
.skeleton-list {
    display: grid;
    gap: 10px;
    padding: 6px 0;
}

.skeleton-row {
    height: 54px;
    border-radius: 10px;
    background: linear-gradient(90deg, #eef2f7 25%, #f7fafe 37%, #eef2f7 63%);
    background-size: 400% 100%;
    animation: skeleton-shimmer 1.25s ease-in-out infinite;
}

.skeleton-row:nth-child(odd) { opacity: 0.92; }

@keyframes skeleton-shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: 0 0; }
}

@media (prefers-reduced-motion: reduce) {
    .skeleton-row { animation-duration: 3s; }
}

/* Fix: metric badge icons must be white over the colored chip */
.dashboard-metric-icon i {
    color: #fff;
}

/* Reuse the empty-state look for the conversation drawer placeholder */
.conversation-drawer-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 220px;
    padding: 32px 22px;
    border: 1px dashed #d7e0ea;
    border-radius: 12px;
    text-align: center;
    background: linear-gradient(180deg, #ffffff 0%, #f6f9ff 100%);
}

.conversation-drawer-empty::before {
    content: "\f4ad";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-bottom: 6px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #eef3ff 0%, #e1ebff 100%);
    color: #2E6FFF;
    font-size: 1.4rem;
}

.conversation-drawer-empty strong {
    color: #1f2937;
    font-size: 1rem;
}

/* SweetAlert2 — brand tweaks */
.swal2-container { z-index: 20000; }
.swal2-popup { font-family: inherit; border-radius: 14px; }
.swal2-popup.roplio-swal-toast { font-weight: 650; }
.swal2-styled.swal2-confirm {
    background: var(--brand-blue, #2E6FFF) !important;
    box-shadow: none !important;
    border-radius: 8px !important;
}
.swal2-styled.swal2-confirm:focus { box-shadow: 0 0 0 3px var(--brand-focus-primary, rgba(46,111,255,.35)) !important; }

/* ===== Leads module ===== */
.lead-filters { display: grid; gap: 14px; margin-bottom: 18px; }
.lead-filter-search { max-width: 540px; }
.lead-filter-group { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.lead-filter-label {
    min-width: 96px;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: #64748b;
}
.lead-filter-group .choice-option > span {
    min-height: 36px;
    padding: 7px 12px;
    font-size: 0.85rem;
}

.lead-row--unseen { background: rgba(46, 111, 255, .04); }
.lead-row--unseen td:first-child strong { font-weight: 850; }
.lead-unread-dot {
    width: 9px;
    height: 9px;
    flex: none;
    border-radius: 50%;
    background: var(--brand-blue, #2E6FFF);
    box-shadow: 0 0 0 3px rgba(46, 111, 255, .18);
}

.lead-actions { justify-content: flex-end; }
.icon-action-btn.is-whatsapp { color: #1ebe5d; }
.icon-action-btn.is-whatsapp:hover { border-color: #86efac; background: #ecfdf3; color: #15803d; }

.lead-quick-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 2px 0 16px;
}
.lead-quick-actions .is-whatsapp i { color: #1ebe5d; }
.lead-quick-actions .lead-delete-form { margin-left: auto; margin-bottom: 0; }
.lead-delete-btn { color: #b91c1c !important; }
.lead-delete-btn:hover { border-color: #fca5a5 !important; background: #fef2f2 !important; color: #991b1b !important; }

/* Lead bulk selection */
.lead-check-col { width: 38px; text-align: center; }
.lead-check-col input {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--brand-blue, #2E6FFF);
}

.lead-bulk-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding: 10px 14px;
    border: 1px solid #cfe0ff;
    border-radius: 12px;
    background: linear-gradient(180deg, #f4f8ff 0%, #eef3ff 100%);
}
.lead-bulk-count { font-size: 0.9rem; font-weight: 650; color: #1f2937; }
.lead-bulk-count strong { color: var(--brand-blue, #2E6FFF); }
.lead-bulk-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }

/* Lead pagination */
.lead-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #e7edf5;
}
.lead-pagination-controls { display: inline-flex; align-items: center; gap: 10px; }
.lead-pagination-current { font-size: 0.86rem; font-weight: 750; color: #475569; }

/* ===== Mobile off-canvas navigation ===== */
.roplio-mobile-nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex: none;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 1.05rem;
}

.roplio-nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1029;
    background: rgba(8, 13, 27, 0.55);
}

@media (max-width: 991px) {
    .roplio-mobile-nav-toggle {
        display: inline-flex;
    }

    html.nav_open .roplio-nav-backdrop {
        display: block;
    }

    .replio-shell .sidebar {
        z-index: 1031;
    }

    /* Hide KaiAdmin's own (broken-font) togglers; ours lives in the topbar */
    .replio-shell .sidebar .logo-header .navbar-toggler,
    .replio-shell .sidebar .logo-header .topbar-toggler {
        display: none !important;
    }

    .tenant-context {
        min-width: 0;
    }

    .tenant-context-toggle {
        max-width: calc(100vw - 130px);
        min-height: 60px;
        gap: 10px;
    }

    .tenant-context-logo {
        width: 84px;
        height: 46px;
        flex: 0 0 84px;
    }
}

/* ===== Setup checklist (dashboard) ===== */
.setup-checklist {
    border-left: 4px solid var(--brand-blue, #2E6FFF);
}

.setup-checklist-progress-label {
    font-size: 0.85rem;
    font-weight: 750;
    color: var(--brand-blue, #2E6FFF);
}

.setup-checklist-progress {
    height: 8px;
    margin: 4px 0 16px;
    border-radius: 999px;
    background: #e7edf8;
    overflow: hidden;
}

.setup-checklist-progress > span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--brand-gradient, linear-gradient(135deg, #2E6FFF 0%, #6A45FF 100%));
    transition: width .3s ease;
}

.setup-checklist-steps {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.setup-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border: 1px solid #e3e8ef;
    border-radius: 10px;
    background: #f8fafc;
}

.setup-step.is-done {
    border-style: dashed;
    background: #f4faf6;
}

.setup-step.is-done strong {
    color: #64748b;
    font-weight: 650;
    text-decoration: line-through;
}

.setup-step-check,
.setup-step-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex: none;
    border-radius: 50%;
}

.setup-step-check {
    background: #dcfce7;
    color: #16a34a;
}

.setup-step-icon {
    background: #e8efff;
    color: var(--brand-blue, #2E6FFF);
}

.setup-step-copy {
    display: grid;
    gap: 1px;
    min-width: 0;
}

.setup-step-copy small {
    color: #64748b;
}

.setup-step-action {
    margin-left: auto;
    flex: none;
}

.setup-checklist-footer {
    margin: 14px 0 0;
    color: #64748b;
    font-size: 0.9rem;
}

/* Sidebar unseen-count badge */
.nav-item-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    margin-left: auto;
    padding: 0 7px;
    border-radius: 999px;
    background: var(--brand-gradient, linear-gradient(135deg, #2E6FFF 0%, #6A45FF 100%));
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
}

.replio-nav > .nav-item.active > a .nav-item-badge {
    background: rgba(255, 255, 255, 0.25);
}

/* Release/ops check states: a clear "valid" mark per item */
.ops-check-icon.is-ready {
    background: #dcfce7;
    color: #16a34a;
}

.ops-check-icon.is-blocked {
    background: #fee2e2;
    color: #dc2626;
}

.ops-check-icon.is-attention {
    background: #fef3c7;
    color: #d97706;
}

/* ===== Asistente de alta/edicion de empresas (platform wizard) ===== */
.company-wizard {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1.25rem;
    align-items: start;
}
.wizard-timeline {
    display: flex;
    flex-direction: column;
    position: relative;
    padding-left: 0;
}
.wizard-step {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    position: relative;
}
.wizard-step + .wizard-step::before {
    content: '';
    position: absolute;
    left: calc(0.75rem + 17px);
    top: -14px;
    height: 14px;
    width: 2px;
    background: rgba(120, 130, 150, 0.35);
}
.wizard-step-marker {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(120, 130, 150, 0.18);
    font-size: 0.85rem;
}
.wizard-step-copy { display: flex; flex-direction: column; line-height: 1.25; }
.wizard-step-copy small { opacity: 0.65; }
.wizard-step.active { background: rgba(99, 102, 241, 0.14); }
.wizard-step.active .wizard-step-marker { background: #6366f1; color: #fff; }
.wizard-step.ready:hover { background: rgba(120, 130, 150, 0.12); }
.wizard-step.locked { opacity: 0.45; }
.wizard-checklist { list-style: none; padding: 0; margin: 0; }
.wizard-checklist li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid rgba(120, 130, 150, 0.15);
}
.wizard-checklist li.done i { color: #22c55e; }
.wizard-checklist li.pending i { color: #f59e0b; }
.wizard-checklist li a { margin-left: auto; }
@media (max-width: 900px) {
    .company-wizard { grid-template-columns: 1fr; }
    .wizard-timeline { flex-direction: row; flex-wrap: wrap; }
    .wizard-step + .wizard-step::before { display: none; }
    .wizard-step-copy small { display: none; }
}

/* ===== Grupos plegables del menu lateral ===== */
.nav-group { list-style: none; }
.nav-group-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: none;
    border: 0;
    cursor: pointer;
    color: inherit;
    font: inherit;
    text-align: left;
}
.nav-group-toggle .fa-chevron-down { font-size: 0.65rem; opacity: 0.6; transition: transform 0.15s ease; }
.nav-group.open .nav-group-toggle .fa-chevron-down { transform: rotate(180deg); }
.nav-group-items { display: none; list-style: none; padding-left: 0; margin: 0; }
.nav-group.open .nav-group-items { display: block; }

/* ===== Agenda de reservas (vista dia) ===== */
.reservation-toolbar { display: flex; justify-content: flex-end; margin-bottom: 0.75rem; }
.reservation-toolbar .btn.active { background: #6366f1; border-color: #6366f1; color: #fff; }
.agenda-controls { display: flex; align-items: center; gap: 0.4rem; }
.agenda-controls input[type="date"] { max-width: 170px; }
.agenda-day-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.5rem; }
.agenda-grid {
    position: relative;
    border: 1px solid rgba(120, 130, 150, 0.25);
    border-radius: 10px;
    overflow: hidden;
    background: rgba(120, 130, 150, 0.04);
}
.agenda-hour {
    position: absolute;
    left: 0;
    right: 0;
    height: 60px;
    border-top: 1px dashed rgba(120, 130, 150, 0.22);
    cursor: pointer;
}
.agenda-hour:hover { background: rgba(99, 102, 241, 0.07); }
.agenda-hour-label {
    position: absolute;
    top: 2px;
    left: 8px;
    font-size: 0.72rem;
    opacity: 0.6;
}
.agenda-block {
    position: absolute;
    border-radius: 8px;
    padding: 4px 8px;
    overflow: hidden;
    font-size: 0.78rem;
    line-height: 1.25;
    border-left: 4px solid #6366f1;
    background: rgba(99, 102, 241, 0.16);
    z-index: 2;
}
.agenda-block.status-confirmed { border-left-color: #22c55e; background: rgba(34, 197, 94, 0.16); }
.agenda-block.status-pending { border-left-color: #f59e0b; background: rgba(245, 158, 11, 0.16); }
.agenda-block.status-cancelled { border-left-color: #94a3b8; background: rgba(148, 163, 184, 0.14); opacity: 0.65; text-decoration: line-through; }
.agenda-block.status-no_show { border-left-color: #ef4444; background: rgba(239, 68, 68, 0.14); }
.agenda-block-time { font-weight: 600; font-size: 0.72rem; opacity: 0.8; display: flex; gap: 0.35rem; align-items: center; }
.agenda-block-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agenda-block-meta { opacity: 0.75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agenda-empty {
    position: absolute;
    inset: 40% 0 auto 0;
    text-align: center;
    opacity: 0.6;
}

/* ===== Tablas como tarjetas en movil ===== */
@media (max-width: 640px) {
    .table-cards-mobile thead { display: none; }
    .table-cards-mobile, .table-cards-mobile tbody, .table-cards-mobile tr, .table-cards-mobile td { display: block; width: 100%; }
    .table-cards-mobile tr {
        border: 1px solid rgba(120, 130, 150, 0.25);
        border-radius: 10px;
        margin-bottom: 0.75rem;
        padding: 0.6rem 0.8rem;
    }
    .table-cards-mobile td { border: 0; padding: 0.2rem 0; }
    .table-cards-mobile td.text-end { text-align: left; }
    .agenda-controls { flex-wrap: wrap; }
}

/* ===== Pagina de prueba de agentes de voz (transcripcion + debug) ===== */
.voice-test-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 1rem; align-items: start; }
@media (max-width: 1000px) { .voice-test-grid { grid-template-columns: 1fr; } }
.voice-test-controls { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.voice-transcript {
    min-height: 220px;
    max-height: 380px;
    overflow-y: auto;
    border: 1px solid rgba(120, 130, 150, 0.25);
    border-radius: 10px;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: rgba(120, 130, 150, 0.05);
}
.voice-bubble { max-width: 85%; padding: 0.5rem 0.75rem; border-radius: 12px; font-size: 0.9rem; }
.voice-bubble small { display: block; opacity: 0.55; font-size: 0.7rem; margin-bottom: 2px; }
.voice-bubble.from-user { align-self: flex-end; background: rgba(99, 102, 241, 0.18); border-bottom-right-radius: 4px; }
.voice-bubble.from-agent { align-self: flex-start; background: rgba(120, 130, 150, 0.16); border-bottom-left-radius: 4px; }
.voice-metrics { display: flex; gap: 1.5rem; margin-top: 0.9rem; }
.voice-metrics div { display: flex; flex-direction: column; }
.voice-metrics strong { font-size: 1.1rem; }
.voice-metrics small { opacity: 0.6; }
.voice-event-log {
    max-height: 180px;
    overflow-y: auto;
    font-size: 0.74rem;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 8px;
    padding: 0.6rem;
    white-space: pre-wrap;
}
.voice-turns td { font-size: 0.85rem; vertical-align: top; }
.voice-turn-content { max-width: 320px; white-space: pre-wrap; word-break: break-word; }

/* ===== Radiografia de turnos (debug de voz) ===== */
.voice-turn-list { max-height: 460px; overflow-y: auto; display: flex; flex-direction: column; gap: 0.6rem; }
.voice-turn { border: 1px solid rgba(120, 130, 150, 0.25); border-radius: 10px; padding: 0.55rem 0.7rem; font-size: 0.85rem; }
.voice-turn.has-warning { border-color: rgba(245, 158, 11, 0.7); background: rgba(245, 158, 11, 0.07); }
.voice-turn-head { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.3rem; flex-wrap: wrap; }
.voice-turn-user { opacity: 0.7; margin-bottom: 0.2rem; }
.voice-turn-reply { white-space: pre-wrap; }
.voice-turn-tools { margin-top: 0.25rem; font-size: 0.78rem; opacity: 0.8; }
.voice-turn-warn { margin-top: 0.25rem; font-size: 0.78rem; color: #d97706; }
.lat-chip { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 0.74rem; font-weight: 600; }
.lat-chip.lat-ok { background: rgba(34, 197, 94, 0.18); color: #16a34a; }
.lat-chip.lat-warn { background: rgba(245, 158, 11, 0.18); color: #d97706; }
.lat-chip.lat-bad { background: rgba(239, 68, 68, 0.18); color: #dc2626; }

/* ===== Catalogo de voces ===== */
.voice-catalog { display: flex; flex-direction: column; gap: 0.45rem; max-height: 380px; overflow-y: auto; }
.voice-row { display: flex; align-items: center; gap: 0.7rem; padding: 0.4rem 0.5rem; border: 1px solid rgba(120, 130, 150, 0.22); border-radius: 10px; }
.voice-row-copy { flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
.voice-row-copy code { font-size: 0.72rem; }

/* ===== Historial de llamadas de agentes de voz ===== */
.company-logo-chip { width: 30px; height: 30px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; background: rgba(120, 130, 150, 0.18); overflow: hidden; flex: 0 0 30px; }
.company-logo-chip img { width: 100%; height: 100%; object-fit: cover; }
.call-outcome { padding: 0.35rem 0; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; font-size: 0.88rem; }
.call-transcript { max-height: 420px; }
.call-tool-chip { align-self: center; font-size: 0.72rem; opacity: 0.65; padding: 2px 10px; border-radius: 999px; border: 1px dashed rgba(120, 130, 150, 0.4); cursor: help; }

/* ===== Agenda en vivo (página de prueba de voz) ===== */
.voice-agenda { max-height: 360px; overflow-y: auto; display: flex; flex-direction: column; gap: 0.6rem; }
.agenda-day-head { font-weight: 600; font-size: 0.86rem; margin-bottom: 0.25rem; text-transform: capitalize; }
.agenda-row { display: grid; grid-template-columns: 48px 44px 1fr 1fr auto; align-items: center; gap: 0.5rem; padding: 0.3rem 0.5rem; border: 1px solid rgba(120,130,150,0.2); border-radius: 8px; font-size: 0.82rem; margin-bottom: 0.25rem; transition: background-color 0.6s ease, border-color 0.6s ease; }
.agenda-time { font-weight: 700; }
.agenda-party { opacity: 0.8; white-space: nowrap; }
.agenda-resource { opacity: 0.9; }
.agenda-who { opacity: 0.7; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agenda-status { font-size: 0.72rem; padding: 1px 8px; border-radius: 999px; font-weight: 600; white-space: nowrap; }
.agenda-status.status-confirmed { background: rgba(34,197,94,0.18); color: #16a34a; }
.agenda-status.status-pending { background: rgba(245,158,11,0.18); color: #d97706; }
.agenda-status.status-cancelled, .agenda-status.status-no_show { background: rgba(239,68,68,0.16); color: #dc2626; }
.agenda-row.is-cancelled { opacity: 0.5; }
.agenda-row.is-cancelled .agenda-time, .agenda-row.is-cancelled .agenda-resource { text-decoration: line-through; }
.agenda-row.is-recent { border-color: rgba(34,197,94,0.8); background: rgba(34,197,94,0.12); animation: agendaPulse 1.2s ease; }
@keyframes agendaPulse { 0% { background: rgba(34,197,94,0.45); } 100% { background: rgba(34,197,94,0.12); } }
.agenda-recent-chip { background: rgba(34,197,94,0.18); color: #16a34a; padding: 0 6px; border-radius: 4px; }

/* ===== Timeline de reservas (vista plano de turno, tipo Tableo) ===== */
.tl-wrap { font-size: 0.85rem; }
.tl-summary { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; font-size: 0.88rem; }
.tl-scroll { overflow-x: auto; border: 1px solid rgba(120,130,150,0.22); border-radius: 12px; -webkit-overflow-scrolling: touch; }
.tl-grid { min-width: 720px; }
.tl-rowhead { position: sticky; left: 0; z-index: 3; flex: 0 0 132px; width: 132px; padding: 0 0.6rem; display: flex; flex-direction: column; justify-content: center; background: var(--card-bg, #fff); border-right: 1px solid rgba(120,130,150,0.25); }
.tl-row { display: flex; align-items: stretch; min-height: 40px; border-bottom: 1px solid rgba(120,130,150,0.12); }
.tl-header { position: sticky; top: 0; z-index: 4; min-height: 30px; background: var(--card-bg, #fff); }
.tl-header .tl-rowhead { z-index: 5; font-weight: 600; }
.tl-track { position: relative; flex: 1 1 auto; min-width: 560px; }
.tl-tick { position: absolute; top: 0; bottom: 0; border-left: 1px dashed rgba(120,130,150,0.18); }
.tl-tick.is-hour { border-left-color: rgba(120,130,150,0.4); }
.tl-tick-label { position: absolute; top: 6px; left: 4px; font-size: 0.72rem; color: #6b7280; white-space: nowrap; }
.tl-zone { position: sticky; left: 0; padding: 0.3rem 0.7rem; font-weight: 700; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.03em; background: rgba(120,130,150,0.10); border-bottom: 1px solid rgba(120,130,150,0.2); }
.tl-table-name { font-weight: 600; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-table-cap { font-size: 0.72rem; opacity: 0.7; }
.tl-slot { position: absolute; top: 0; bottom: 0; cursor: pointer; border-left: 1px solid rgba(120,130,150,0.10); }
.tl-slot.is-hour { border-left-color: rgba(120,130,150,0.3); }
.tl-slot:hover { background: rgba(59,130,246,0.10); }
.tl-bar { position: absolute; top: 4px; bottom: 4px; border-radius: 7px; padding: 0 7px; display: flex; align-items: center; gap: 5px; color: #fff; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.18); cursor: pointer; z-index: 2; }
.tl-bar:hover { filter: brightness(1.08); box-shadow: 0 2px 6px rgba(0,0,0,0.28); }
.tl-bar-party { font-weight: 800; font-size: 0.82rem; flex: 0 0 auto; }
.tl-bar-name { font-size: 0.78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-bar-bot { font-size: 0.7rem; opacity: 0.9; flex: 0 0 auto; }
.tl-bar.status-confirmed { background: #16a34a; }
.tl-bar.status-pending { background: #d97706; }
.tl-bar.status-cancelled, .tl-bar.status-no_show { background: #9ca3af; }
.tl-empty { padding: 1.4rem; text-align: center; color: #6b7280; }
.tl-legend { margin-top: 0.5rem; font-size: 0.78rem; color: #4b5563; display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.tl-dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.tl-dot.status-confirmed { background: #16a34a; }
.tl-dot.status-pending { background: #d97706; }

/* ===== Reservas: CRM (detalle, ficha de cliente, formularios) ===== */
.row-clickable { cursor: pointer; }
.row-clickable:hover { background: rgba(46,111,255,0.06); }

.reservation-search-form { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.reservation-search { flex: 1 1 280px; max-width: 440px; margin: 0; }

/* Stepper +/- de personas */
.qty-stepper { display: inline-flex; align-items: stretch; border: 1px solid rgba(120,130,150,0.32); border-radius: 10px; overflow: hidden; max-width: 160px; }
.qty-stepper input[type="number"] { border: 0; text-align: center; width: 56px; -moz-appearance: textfield; background: transparent; }
.qty-stepper input[type="number"]::-webkit-outer-spin-button, .qty-stepper input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-btn { border: 0; background: rgba(120,130,150,0.12); color: inherit; width: 40px; cursor: pointer; font-size: 0.9rem; display: flex; align-items: center; justify-content: center; }
.qty-btn:hover { background: rgba(46,111,255,0.18); color: #2E6FFF; }

/* Ficha de cliente dentro del detalle de reserva */
.res-customer { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem; margin-bottom: 1rem; border: 1px solid rgba(120,130,150,0.2); border-radius: 12px; background: rgba(120,130,150,0.05); }
.res-customer-main { flex: 1 1 auto; min-width: 0; }
.res-customer-name { font-weight: 700; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.res-customer-meta { display: flex; flex-wrap: wrap; gap: 0.2rem 0.9rem; font-size: 0.82rem; color: #6b7280; margin-top: 0.2rem; }
.res-customer-meta a { color: #2E6FFF; text-decoration: none; }
.res-meta-line { display: flex; gap: 0.4rem; align-items: center; margin-top: 0.6rem; flex-wrap: wrap; }

.res-history { margin-top: 0.75rem; }
.res-history > summary { cursor: pointer; font-weight: 600; font-size: 0.85rem; }
.res-history-list { list-style: none; margin: 0.5rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.2rem; }
.res-history-list li { display: flex; align-items: center; gap: 0.6rem; font-size: 0.82rem; padding: 0.3rem 0; border-bottom: 1px solid rgba(120,130,150,0.12); }
.res-history-date { font-weight: 600; }
.res-history-party { color: #6b7280; }

.res-actions { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.res-actions-spacer { flex: 1 1 auto; }

/* Bloques de formulario con leyenda */
.form-block { border: 1px solid rgba(120,130,150,0.2); border-radius: 12px; padding: 0.85rem 0.9rem 0.4rem; margin-bottom: 1rem; }
.form-block > legend { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 700; color: #6b7280; padding: 0 0.4rem; width: auto; margin: 0; float: none; }

/* Cliente reconocido por teléfono */
.contact-lookup-feedback { margin-top: 0.35rem; font-size: 0.82rem; color: #16a34a; font-weight: 600; }
.contact-lookup-feedback.is-found::before { content: "✓ "; font-weight: 800; }

/* ===== Plano del local: lienzo, mesas, editor ===== */
.floor-canvas { position: relative; width: 100%; aspect-ratio: 1000 / 640; border: 1px solid rgba(120,130,150,0.28); border-radius: 14px; overflow: hidden; background-color: #f7f8fb; background-image: linear-gradient(rgba(120,130,150,0.10) 1px, transparent 1px), linear-gradient(90deg, rgba(120,130,150,0.10) 1px, transparent 1px); background-size: 4% 6.25%; }
.floor-canvas-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #6b7280; text-align: center; padding: 1rem; }

.floor-table { position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; box-sizing: border-box; border: 1.5px solid rgba(80,90,110,0.45); border-radius: 9px; background: #fff; color: #1f2937; overflow: hidden; padding: 2px; user-select: none; box-shadow: 0 1px 2px rgba(0,0,0,0.10); }
.floor-table.shape-round { border-radius: 50%; }
.floor-table.shape-square { border-radius: 9px; }
.floor-table.shape-rectangle { border-radius: 9px; }
.floor-table-name { font-weight: 700; font-size: clamp(0.6rem, 1.1vw, 0.82rem); line-height: 1.05; text-align: center; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.floor-table-info { font-size: clamp(0.55rem, 1vw, 0.74rem); opacity: 0.85; }
.floor-table-badge { position: absolute; top: 2px; right: 4px; background: #dc2626; color: #fff; font-size: 0.6rem; font-weight: 800; min-width: 14px; height: 14px; border-radius: 7px; display: flex; align-items: center; justify-content: center; padding: 0 3px; }

/* Vista de reservas: color por estado */
.floor-canvas--view .floor-table { cursor: pointer; }
.floor-canvas--view .floor-area, .floor-canvas--view .floor-element { pointer-events: none; }
.floor-table.is-free { background: #fff; border-color: rgba(80,90,110,0.4); }
.floor-table.is-reserved { background: #16a34a; border-color: #15803d; color: #fff; }
.floor-canvas--view .floor-table:hover { filter: brightness(1.05); box-shadow: 0 2px 6px rgba(0,0,0,0.22); }

/* Capas: zonas (fondo) < elementos < mesas */
.floor-area { position: absolute; border: 1.5px dashed; border-radius: 12px; z-index: 1; box-sizing: border-box; }
.floor-area-label { position: absolute; top: 4px; left: 8px; font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.03em; pointer-events: none; z-index: 1; }
.floor-area-fill { position: absolute; inset: 0; opacity: 0.13; border-radius: inherit; pointer-events: none; }
.floor-element { position: absolute; z-index: 2; box-sizing: border-box; border: 1px solid rgba(0,0,0,0.16); border-radius: 7px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: #fff; overflow: hidden; font-size: clamp(0.6rem, 1.2vw, 0.85rem); }
.floor-element > i { font-size: clamp(0.8rem, 1.8vw, 1.3rem); }
.floor-element-label { font-size: clamp(0.5rem, 1vw, 0.7rem); line-height: 1; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.floor-element.type-wall { border-radius: 3px; }
.floor-element.is-text { background: transparent !important; border-color: transparent; }
.floor-element-text { font-weight: 700; font-size: clamp(0.7rem, 1.5vw, 1rem); color: #1f2937; }
.floor-table { z-index: 3; }

/* Editor: arrastrar */
.floor-canvas--edit .floor-table,
.floor-canvas--edit .floor-area,
.floor-canvas--edit .floor-element { cursor: grab; touch-action: none; }
.floor-canvas--edit .floor-table:active,
.floor-canvas--edit .floor-area:active,
.floor-canvas--edit .floor-element:active { cursor: grabbing; }
.floor-table.is-selected { border-color: #2E6FFF; box-shadow: 0 0 0 3px rgba(46,111,255,0.28); z-index: 7; }
.floor-area.is-selected, .floor-element.is-selected { outline: 3px solid rgba(46,111,255,0.55); outline-offset: 1px; z-index: 6; }

/* Inspector: paleta de color de zona y título de elemento */
.floor-color-group { display: inline-flex; gap: 0.3rem; flex-wrap: wrap; }
.floor-color-btn { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; }
.floor-color-btn.active { border-color: #111827; box-shadow: 0 0 0 2px #fff inset; }
.floor-inspector-title { font-weight: 700; margin-bottom: 0.2rem; }
.floor-add-element select { min-width: 132px; }

/* Campo con botón de copiar (URL de webhook, etc.) */
.input-with-copy { display: flex; gap: 0.5rem; align-items: center; }
.input-with-copy input { flex: 1 1 auto; min-width: 0; }
.input-with-copy .btn { flex: 0 0 auto; }

.floor-editor-toolbar { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.85rem; }
.floor-editor-hint { font-size: 0.82rem; flex: 1 1 200px; }
.floor-editor-status { font-size: 0.82rem; color: #6b7280; font-weight: 600; }
.floor-editor-body { display: flex; gap: 1rem; align-items: flex-start; }
.floor-editor-body .floor-canvas { flex: 1 1 auto; min-width: 0; }
.floor-inspector { flex: 0 0 250px; border: 1px solid rgba(120,130,150,0.22); border-radius: 12px; padding: 0.85rem; background: rgba(120,130,150,0.04); }
.floor-inspector-empty { color: #6b7280; font-size: 0.85rem; text-align: center; padding: 1rem 0.25rem; }
.floor-inspector-form { display: flex; flex-direction: column; gap: 0.7rem; }
.floor-shape-group { display: inline-flex; gap: 0.35rem; }
.floor-shape-btn { width: 40px; height: 36px; border: 1px solid rgba(120,130,150,0.32); border-radius: 8px; background: #fff; cursor: pointer; }
.floor-shape-btn.active { border-color: #2E6FFF; color: #2E6FFF; background: rgba(46,111,255,0.10); }
.floor-size-label { min-width: 56px; text-align: center; font-size: 0.82rem; font-variant-numeric: tabular-nums; }
.floor-inspector-delete { padding-left: 0; }
@media (max-width: 720px) { .floor-editor-body { flex-direction: column; } .floor-inspector { flex-basis: auto; width: 100%; } }

/* Vista Plano (reservas): cabecera, bandejas, leyenda */
.floor-wrap { font-size: 0.86rem; }
.floor-summary { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.floor-summary .btn { margin-left: auto; }
.floor-empty { text-align: center; padding: 2rem 1rem; color: #6b7280; border: 1px dashed rgba(120,130,150,0.4); border-radius: 12px; }
.floor-empty p { margin-bottom: 0.75rem; }
.floor-tray { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.75rem; padding: 0.6rem 0.7rem; border: 1px solid rgba(120,130,150,0.22); border-radius: 10px; }
.floor-tray--warn { border-color: rgba(217,119,6,0.5); background: rgba(217,119,6,0.07); }
.floor-tray-label { font-size: 0.8rem; font-weight: 600; color: #4b5563; }
.floor-chip { border: 1px solid rgba(120,130,150,0.35); border-radius: 999px; background: #fff; padding: 0.2rem 0.7rem; font-size: 0.8rem; cursor: pointer; }
.floor-chip.is-reserved { background: #16a34a; border-color: #15803d; color: #fff; }
.floor-chip:hover { filter: brightness(1.04); }
.floor-legend { margin-top: 0.6rem; font-size: 0.78rem; color: #4b5563; display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.floor-dot { width: 12px; height: 12px; border-radius: 4px; display: inline-block; border: 1px solid rgba(80,90,110,0.4); }
.floor-dot.is-free { background: #fff; }
.floor-dot.is-reserved { background: #16a34a; border-color: #15803d; }

/* Barra de día compartida (Plano + Agenda) */
.reservation-daybar { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.85rem; }
.reservation-daynav { display: inline-flex; align-items: center; gap: 0.35rem; }
.reservation-daynav input[type="date"] { min-width: 150px; }
.reservation-daylabel { font-weight: 700; font-size: 0.95rem; }
.reservation-turno { margin-left: auto; }
@media (max-width: 575px) { .reservation-turno { margin-left: 0; } .reservation-daylabel { width: 100%; order: 3; } }

/* ===== Onboarding paso 2: layout en dos columnas + vista previa de reservas ===== */
.onboarding-card--split { width: min(100%, 1120px); }
.onboarding-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 360px); gap: 1.6rem; align-items: start; }
.onboarding-split .form-hint { display: block; margin-top: 0.25rem; font-size: 0.76rem; color: #64748b; line-height: 1.3; }

.booking-preview-panel { position: sticky; top: 1rem; }

.bp { border: 1px solid rgba(120,130,150,0.22); border-radius: 14px; background: rgba(120,130,150,0.04); padding: 0.9rem 1rem 1rem; font-size: 0.85rem; }
.bp-head { margin-bottom: 0.6rem; }
.bp-badge { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: #2563eb; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 999px; padding: 3px 9px; }
.bp-warn { color: #b45309; background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: 0.7rem 0.85rem; font-weight: 600; }

.bp-section { margin-top: 0.9rem; }
.bp-section:first-of-type { margin-top: 0.3rem; }
.bp-section-title { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: #475569; margin-bottom: 0.5rem; }
.bp-section-title b { color: #2563eb; }

.bp-chips { display: flex; flex-wrap: wrap; gap: 5px; max-height: 96px; overflow-y: auto; }
.bp-chip { font-size: 0.76rem; font-weight: 600; font-variant-numeric: tabular-nums; color: #1e3a8a; background: #eff6ff; border: 1px solid #dbeafe; border-radius: 6px; padding: 2px 7px; }
.bp-chip--more { color: #64748b; background: rgba(120,130,150,0.10); border-color: rgba(120,130,150,0.25); }

.bp-note { font-size: 0.76rem; color: #64748b; margin: 0.5rem 0 0; line-height: 1.35; }
.bp-note--lanes { margin-top: 0.4rem; }
.bp-note b { color: #334155; }

.bp-axis { position: relative; height: 16px; margin-bottom: 3px; }
.bp-tick { position: absolute; top: 0; transform: translateX(-50%); font-size: 0.66rem; color: #94a3b8; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bp-tick:first-child { transform: translateX(0); }

.bp-lanes { display: flex; flex-direction: column; gap: 4px; padding: 6px 0; background:
    repeating-linear-gradient(90deg, transparent, transparent calc(25% - 1px), rgba(120,130,150,0.16) calc(25% - 1px), rgba(120,130,150,0.16) 25%);
    border-radius: 8px; }
.bp-lane { position: relative; height: 22px; background: rgba(120,130,150,0.06); border-radius: 5px; }
.bp-book { position: absolute; top: 2px; bottom: 2px; background: #16a34a; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18); }
.bp-buf { position: absolute; top: 2px; bottom: 2px; border-radius: 4px; background-image: repeating-linear-gradient(45deg, rgba(217,119,6,0.55) 0, rgba(217,119,6,0.55) 4px, rgba(217,119,6,0.18) 4px, rgba(217,119,6,0.18) 8px); }

.bp-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.9rem; margin-top: 0.6rem; font-size: 0.76rem; color: #475569; }
.bp-swatch { display: inline-block; width: 11px; height: 11px; border-radius: 3px; vertical-align: -1px; margin-right: 3px; }
.bp-swatch--book { background: #16a34a; }
.bp-swatch--buffer { background-image: repeating-linear-gradient(45deg, rgba(217,119,6,0.7) 0, rgba(217,119,6,0.7) 3px, rgba(217,119,6,0.2) 3px, rgba(217,119,6,0.2) 6px); }

@media (max-width: 860px) {
    .onboarding-card--split { width: min(100%, 860px); }
    .onboarding-split { grid-template-columns: 1fr; }
    .booking-preview-panel { position: static; order: -1; }
}
