﻿
.ltr {
    direction: ltr;
    text-align: left;
}
h6{
    font-size:13px;
}
h5{
    font-size:15px;
}
.hidden{
    display:none;
}

.form-group {
    text-align: right;
    margin-bottom: 15px;
}
small, .small {
    font-size: 0.75em;
}

.input-validation-error {
    border: solid 1px var(--fimobile-red) !important;
}
.valid {
    border: solid 1px var(--fimobile-green) !important;
}
.field-validation-error {
    font-size: 11px;
    margin-top: 3px;
    color: var(--fimobile-red);
}

label {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #334155;
}

.has-success .form-floating:before {
    content: "";
    position: absolute;
    left: 0;
    z-index: 1;
    height: 68%;
    top: 16%;
    width: 3px;
    border-radius: 2px;
    background-color: var(--fimobile-green);
}

.has-error .form-floating:before {
    content: "";
    position: absolute;
    left: 0;
    z-index: 1;
    height: 68%;
    top: 16%;
    width: 3px;
    border-radius: 2px;
    background-color: var(--fimobile-red);
}

.has-error .input-group {
    border-radius: var(--fimobile-input-rounded);
    border: solid 1px var(--fimobile-red);
}

.has-error .form-floating .form-control {
    border: solid 1px var(--fimobile-red);
}

.has-success .input-group {
    border-radius: var(--fimobile-input-rounded);
    border: solid 1px var(--fimobile-green);
}

.has-success .form-floating .form-control {
    border: solid 1px var(--fimobile-green);
}

.ui-pnotify-text {
    font-size: 13px;
}

body > .ui-pnotify {
    top: calc(12px + env(safe-area-inset-top, 0px));
    right: calc(12px + env(safe-area-inset-right, 0px));
}

@media (max-width: 480px) {
    .ui-pnotify-mobile-able.ui-pnotify {
        top: calc(env(safe-area-inset-top, 0px) + 8px) !important;
        right: 0 !important;
        left: 0 !important;
        padding-left: env(safe-area-inset-left, 0px);
        padding-right: env(safe-area-inset-right, 0px);
    }

    .ui-pnotify-mobile-able.ui-pnotify.stack-bottomleft,
    .ui-pnotify-mobile-able.ui-pnotify.stack-bottomright {
        top: auto !important;
        bottom: calc(env(safe-area-inset-bottom, 0px) + 8px) !important;
    }
}

.jconfirm .jconfirm-holder {
    padding-top: calc(50px + env(safe-area-inset-top, 0px));
    padding-bottom: calc(50px + env(safe-area-inset-bottom, 0px));
}

/* jquery-confirm themes hardcode a white box. The vendor sheet loads after this
   file, so each override stays one class more specific than the theme rule. */
.dark-mode .jconfirm.jconfirm-white .jconfirm-box,
.dark-mode .jconfirm.jconfirm-light .jconfirm-box,
.dark-mode .jconfirm.jconfirm-material .jconfirm-box,
.dark-mode .jconfirm.jconfirm-bootstrap .jconfirm-box,
.dark-mode .jconfirm.jconfirm-modern .jconfirm-box {
    background-color: var(--tb-surface);
    color: var(--tb-text);
    border-color: var(--tb-border);
    box-shadow: var(--tb-shadow-lg);
}

.dark-mode .jconfirm .jconfirm-box.loading:before {
    background: var(--tb-surface);
}

.dark-mode .jconfirm.jconfirm-white .jconfirm-box div.jconfirm-closeIcon,
.dark-mode .jconfirm.jconfirm-light .jconfirm-box div.jconfirm-closeIcon,
.dark-mode .jconfirm.jconfirm-material .jconfirm-box div.jconfirm-closeIcon,
.dark-mode .jconfirm.jconfirm-bootstrap .jconfirm-box div.jconfirm-closeIcon,
.dark-mode .jconfirm.jconfirm-modern .jconfirm-box div.jconfirm-closeIcon,
.dark-mode .jconfirm.jconfirm-white .jconfirm-box div.jconfirm-title-c,
.dark-mode .jconfirm.jconfirm-light .jconfirm-box div.jconfirm-title-c,
.dark-mode .jconfirm.jconfirm-material .jconfirm-box div.jconfirm-title-c,
.dark-mode .jconfirm.jconfirm-bootstrap .jconfirm-box div.jconfirm-title-c,
.dark-mode .jconfirm.jconfirm-modern .jconfirm-box div.jconfirm-title-c,
.dark-mode .jconfirm.jconfirm-white .jconfirm-box div.jconfirm-content,
.dark-mode .jconfirm.jconfirm-light .jconfirm-box div.jconfirm-content,
.dark-mode .jconfirm.jconfirm-material .jconfirm-box div.jconfirm-content,
.dark-mode .jconfirm.jconfirm-bootstrap .jconfirm-box div.jconfirm-content,
.dark-mode .jconfirm.jconfirm-modern .jconfirm-box div.jconfirm-content {
    color: var(--tb-text);
}

.dark-mode .jconfirm .jconfirm-box.jconfirm-type-dark .jconfirm-title-c .jconfirm-icon-c {
    color: var(--tb-text) !important;
}

.dark-mode .jconfirm .jconfirm-box div.jconfirm-content-pane::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.08);
}

.dark-mode .jconfirm .jconfirm-box .jconfirm-buttons button.btn-default,
.dark-mode .jconfirm.jconfirm-white .jconfirm-box .jconfirm-buttons button.btn-default,
.dark-mode .jconfirm.jconfirm-light .jconfirm-box .jconfirm-buttons button.btn-default,
.dark-mode .jconfirm.jconfirm-dark .jconfirm-box .jconfirm-buttons button.btn-default,
.dark-mode .jconfirm.jconfirm-black .jconfirm-box .jconfirm-buttons button.btn-default {
    background-color: var(--tb-surface-alt);
    color: var(--tb-text);
    box-shadow: none;
}

.dark-mode .jconfirm .jconfirm-box .jconfirm-buttons button.btn-default:hover,
.dark-mode .jconfirm.jconfirm-white .jconfirm-box .jconfirm-buttons button.btn-default:hover,
.dark-mode .jconfirm.jconfirm-light .jconfirm-box .jconfirm-buttons button.btn-default:hover,
.dark-mode .jconfirm.jconfirm-dark .jconfirm-box .jconfirm-buttons button.btn-default:hover,
.dark-mode .jconfirm.jconfirm-black .jconfirm-box .jconfirm-buttons button.btn-default:hover {
    background-color: var(--tb-border);
    color: var(--tb-text);
}

.dark-mode .jconfirm.jconfirm-bootstrap .jconfirm-box .jconfirm-buttons {
    border-top-color: var(--tb-border);
}

.dark-mode .jconfirm .jconfirm-box .form-control,
.dark-mode .jconfirm .jconfirm-box input,
.dark-mode .jconfirm .jconfirm-box textarea {
    background-color: var(--tb-input-bg);
    color: var(--tb-text);
    border-color: var(--tb-border);
}

.swal2-container {
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
}

form .form-control {
    border-color: var(--fimobile-theme-bordercolor);
    border-radius: var(--fimobile-input-rounded);
    padding: var(--fimobile-padding);
    padding-top: 10px;
    padding-bottom: 10px;
    height: auto;
    line-height: 32px;
    color: var(--tb-text, #0f172a);
    background-color: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.form-control:focus,
form .form-control:focus {
    border-color: var(--fimobile-theme-color);
    box-shadow: 0 0 0 4px var(--fimobile-theme-color-light);
}

form > .form-control {
    padding: 1rem 0.75rem;
}

form > .form-control, form > .form-select {
    height: calc(3.5rem + 2px);
    line-height: 1.25;
}

.input-group-text {
    border-top-left-radius: var(--fimobile-input-rounded);
    border-bottom-left-radius: var(--fimobile-input-rounded);
}

.select2-container .select2-selection--single {
    height: 55px !important;
    border-color: var(--fimobile-theme-bordercolor) !important;
    border-radius: var(--fimobile-input-rounded) !important;
    -webkit-box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.05);
}
    .select2-container .select2-selection--single .select2-selection__rendered {
        margin-top: 10px !important;
    }
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 55px !important;
    top: 0px !important;
    width: 25px !important;
}
.select2-search--dropdown .select2-search__field {
    outline: solid 1px var(--fimobile-theme-color) !important;
    border-radius: 7px !important;
    font-family: var(--tb-font, "Vazirmatn", Tahoma, sans-serif) !important;
}

.tb-picker-input {
    position: relative;
    cursor: pointer;
    pointer-events: auto;
}

.tb-picker-input .form-control,
.custom-date-picker,
.custom-time-picker,
.custom-date-picker[readonly],
.custom-time-picker[readonly] {
    cursor: pointer;
    pointer-events: auto !important;
}

.tb-picker-input .form-control {
    padding-inline-start: 2.75rem;
    background: rgba(15, 23, 42, 0.035);
}

.tb-picker-input-icon {
    position: absolute;
    inset-inline-start: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--fimobile-theme-color);
    font-size: 1.1rem;
    line-height: 1;
}

.custom-date-picker,
.custom-time-picker {
    cursor: pointer;
}

.tb-picker-overlay {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    background: rgba(15, 23, 42, 0.45);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    overscroll-behavior: contain;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.tb-picker-overlay.is-open {
    display: flex !important;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.tb-picker-sheet {
    width: 100%;
    max-width: 460px;
    max-height: min(92vh, 720px);
    background: var(--fimobile-card-color, #fff);
    border-radius: 28px 28px 0 0;
    box-shadow: 0 -12px 40px rgba(15, 23, 42, 0.18);
    padding: 0 18px calc(16px + env(safe-area-inset-bottom, 0px));
    transform: translateY(24px);
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.tb-picker-overlay.is-open .tb-picker-sheet {
    transform: translateY(0);
}

.tb-picker-handle {
    width: 48px;
    height: 5px;
    margin: 10px auto 0;
    border-radius: 99px;
    background: var(--fimobile-theme-bordercolor);
}

.tb-picker-head {
    text-align: center;
    padding: 12px 8px 4px;
}

.tb-picker-title {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: var(--tb-text);
}

.tb-picker-preview {
    margin: 6px 0 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--fimobile-theme-color);
}

.tb-picker-wheels {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 8px;
    margin: 8px 0 16px;
    padding: 8px;
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.04);
    user-select: none;
    -webkit-user-select: none;
}

.tb-picker-wheels-ltr {
    direction: ltr;
}

.tb-picker-wheel-col {
    flex: 0 0 84px;
    min-width: 72px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tb-picker-wheel-col-wide {
    flex: 1 1 132px;
    min-width: 118px;
    max-width: 160px;
}

.tb-picker-wheel-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--tb-text-muted);
    margin-bottom: 6px;
}

.tb-picker-colon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 22px;
    font-size: 28px;
    font-weight: 800;
    color: var(--tb-text);
    line-height: 1;
}

.tb-picker-wheel {
    --tb-picker-item-height: 44px;
    --tb-picker-visible-rows: 5;
    position: relative;
    width: 100%;
    height: calc(var(--tb-picker-item-height) * var(--tb-picker-visible-rows));
    overflow: hidden;
    touch-action: none;
    user-select: none;
    cursor: grab;
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
    mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
}

.tb-picker-wheel:active {
    cursor: grabbing;
}

.tb-picker-wheel-highlight {
    position: absolute;
    top: 50%;
    right: 4px;
    left: 4px;
    height: var(--tb-picker-item-height);
    margin-top: calc(var(--tb-picker-item-height) / -2);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06), 0 8px 18px rgba(15, 23, 42, 0.05);
    pointer-events: none;
    z-index: 0;
}

.tb-picker-wheel-list {
    position: relative;
    z-index: 1;
    margin: 0;
    list-style: none;
    will-change: transform;
}

.tb-picker-wheel-item,
.picker-item {
    height: var(--tb-picker-item-height, 44px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    font-weight: 600;
    color: var(--tb-text-muted);
    opacity: 0.32;
    transform: scale(0.92);
    transition: opacity 0.15s ease, transform 0.15s ease, color 0.15s ease;
}

.tb-picker-wheel-item.is-near {
    opacity: 0.55;
    transform: scale(0.96);
}

.tb-picker-wheel-item.is-selected {
    opacity: 1;
    transform: scale(1);
    color: var(--tb-text);
    font-weight: 800;
}

.tb-picker-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 4px;
}

.tb-picker-actions .btn {
    min-height: 48px;
}

.tb-picker-actions-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

body.tb-picker-open {
    overflow: hidden;
}

@media (min-width: 768px) {
    .tb-picker-overlay {
        align-items: center;
        padding: 24px;
    }

    .tb-picker-sheet {
        border-radius: 24px;
        transform: translateY(12px) scale(0.98);
    }

    .tb-picker-overlay.is-open .tb-picker-sheet {
        transform: none;
    }

    .tb-picker-handle {
        display: none;
    }
}

.dark-mode .tb-picker-sheet {
    background: #121826;
}

.dark-mode .tb-picker-wheels {
    background: rgba(255, 255, 255, 0.04);
}

.dark-mode .tb-picker-wheel-highlight {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.dark-mode .tb-picker-input .form-control {
    background: rgba(255, 255, 255, 0.06);
}

.fullscreen-modal {
    display: none;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: linear-gradient(45deg, var(--fimobile-page-bg-2) 0%, var(--fimobile-page-bg-1) 100%);
    z-index: 40;
}

.fullscreen-modal.show {
    display: flex;
    flex-direction: column;
    justify-content: stretch;
}

.fullscreen-modal-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    background: inherit;
}

.fullscreen-modal-handle {
    display: none;
}

.fullscreen-modal-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-shrink: 0;
    padding: 10px 12px;
    padding-top: calc(10px + env(safe-area-inset-top, 0px));
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
}

.fullscreen-modal-title {
    flex: 1;
    min-width: 0;
    text-align: center;
}

.fullscreen-modal-title h5 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
}

.fullscreen-modal-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 16px 16px calc(24px + env(safe-area-inset-bottom, 0px));
}

.fullscreen-modal-spinner {
    display: flex;
    justify-content: center;
    padding: 48px 0;
}

.fullscreen-modal.is-sheet {
    background: rgba(15, 23, 42, 0.45);
    justify-content: flex-end;
}

.fullscreen-modal.is-sheet .fullscreen-modal-panel {
    height: auto;
    max-height: min(92vh, 760px);
    width: 100%;
    margin: 0 auto;
    background: var(--fimobile-card-color);
    border-radius: 28px 28px 0 0;
    box-shadow: 0 -12px 40px rgba(15, 23, 42, 0.18);
}

.fullscreen-modal.is-sheet .fullscreen-modal-handle {
    display: block;
    width: 48px;
    height: 5px;
    margin: 10px auto 0;
    border-radius: 99px;
    background: var(--fimobile-theme-bordercolor);
}

.fullscreen-modal.is-sheet .fullscreen-modal-bar {
    background: transparent;
    box-shadow: none;
    padding-top: 4px;
}

.fullscreen-modal.is-sheet .fullscreen-modal-scroll {
    padding-top: 4px;
}

@media (min-width: 768px) {
    .fullscreen-modal.is-sheet {
        align-items: center;
        justify-content: center;
        padding: 24px;
    }

    .fullscreen-modal.is-sheet .fullscreen-modal-panel {
        max-width: 460px;
        border-radius: 24px;
        max-height: min(86vh, 720px);
    }
}

.form-check .form-check-input {
    float: initial;
}
.form-check .form-check-label {
    margin-right: 48px;
}

/* Indeterminate top progress bar. Replaces a full-viewport white overlay that hid the page
   on every AJAX request; the content now stays readable while a request is in flight.
   A faint track stays visible even if Safari drops the transform animation, and the bar
   uses physical left/translate3d because logical insets plus translateX do not paint in
   WebKit when the page is RTL. */
#ajax-busy {
    position: fixed;
    top: env(safe-area-inset-top, 0px);
    left: 0;
    right: 0;
    height: 3px;
    z-index: 2000;
    pointer-events: none;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    background: transparent;
}

    #ajax-busy.busy,
    html.is-navigating #ajax-busy {
        opacity: 1;
        visibility: visible;
        background: rgba(37, 99, 235, 0.28);
    }

    #ajax-busy .bar {
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        width: 38%;
        border-radius: 0 3px 3px 0;
        background: linear-gradient(90deg, var(--tb-primary-400, #60a5fa), var(--tb-primary-600, #2563eb));
        -webkit-transform: translate3d(-120%, 0, 0);
        transform: translate3d(-120%, 0, 0);
    }

    #ajax-busy.busy .bar,
    html.is-navigating #ajax-busy .bar {
        -webkit-animation: tb-indeterminate 1.05s ease-in-out infinite;
        animation: tb-indeterminate 1.05s ease-in-out infinite;
    }

@-webkit-keyframes tb-indeterminate {
    0% { -webkit-transform: translate3d(-120%, 0, 0); transform: translate3d(-120%, 0, 0); }
    100% { -webkit-transform: translate3d(320%, 0, 0); transform: translate3d(320%, 0, 0); }
}

@keyframes tb-indeterminate {
    0% { transform: translate3d(-120%, 0, 0); }
    100% { transform: translate3d(320%, 0, 0); }
}

.btn-loader {
    vertical-align: middle;
    display: inline-block;
    position: relative;
    width: 30px;
    height: 30px;
}

    .btn-loader div {
        box-sizing: border-box;
        display: block;
        position: absolute;
        width: 24px;
        height: 24px;
        margin: 3px;
        border: 4px solid #fff;
        border-radius: 50%;
        animation: btnloader 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
        border-color: #ffffff transparent transparent transparent;
    }

        .btn-loader div:nth-child(1) {
            animation-delay: -0.45s;
        }

        .btn-loader div:nth-child(2) {
            animation-delay: -0.3s;
        }

        .btn-loader div:nth-child(3) {
            animation-delay: -0.15s;
        }

@keyframes btnloader {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(-360deg);
    }
}

:root {
    /* The site defaults to light regardless of the OS setting. Declaring it stops the browser
       from painting native UI (scrollbars, autofill, date pickers) with its dark palette when
       the OS is in dark mode, which would otherwise clash with the light page. */
    color-scheme: light;

    --tb-font: "Vazirmatn", Tahoma, sans-serif;
    /* Radii mirror the mobile app's AppRadius scale (xs10/sm14/md18/lg22/xl28/xxl34) */
    --tb-radius: 22px;
    --tb-radius-sm: 14px;
    --tb-radius-md: 18px;
    --tb-radius-xl: 28px;
    --tb-radius-sheet: 34px;
    --tb-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
    --tb-shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.05);
    --tb-shadow-soft: 0 4px 14px rgba(15, 23, 42, 0.035);
    --tb-text: #0f172a;
    --tb-text-muted: #64748b;
    --tb-text-faint: #94a3b8;
    --tb-success: #10b981;
    --tb-danger: #f43f5e;
    --tb-warning: #f59e0b;
    --tb-info: #0ea5e9;
    --tb-violet: #7c3aed;
    --tb-primary: #2563eb;
    --tb-primary-dark: #1d4ed8;
    --tb-primary-soft: #eff4ff;
    --tb-gradient: linear-gradient(to bottom left, #60a5fa, #3b82f6, #4f46e5);
    --tb-brand-gradient: var(--tb-gradient);
    --tb-shadow-card: var(--tb-shadow-sm);
    --tb-input-bg: #f8fafc;
    --tb-page-bg: #f8fafc;
    --tb-btn-lg: 54px;
    --tb-btn-md: 46px;
    --tb-btn-sm: 38px;
    --tb-nav-height: 60px;
    --tb-primary-shadow: 0 8px 18px rgba(37, 99, 235, 0.26);

    /* Brand ramp, so components stop repeating literal blues */
    --tb-primary-50: #eff6ff;
    --tb-primary-100: #dbeafe;
    --tb-primary-400: #60a5fa;
    --tb-primary-500: #3b82f6;
    --tb-primary-600: #2563eb;
    --tb-primary-700: #1d4ed8;

    --tb-surface: #ffffff;
    --tb-surface-sunken: #f1f5f9;
    --tb-surface-alt: #f1f5f9;
    --tb-border: #e8eef5;
    --tb-border-strong: #cbd5e1;

    /* Layered elevation rather than a single shadow reused at every depth */
    --tb-shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.06);
    --tb-shadow-md: 0 10px 28px rgba(15, 23, 42, 0.09);
    --tb-shadow-lg: 0 24px 56px rgba(15, 23, 42, 0.13);

    --tb-radius-xs: 8px;
    --tb-radius-pill: 999px;

    /* Single source of truth for motion; zeroed under prefers-reduced-motion below */
    --tb-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
    --tb-duration-fast: 120ms;
    --tb-duration: 200ms;

    --tb-focus-ring: 0 0 0 3px rgba(37, 99, 235, 0.35);
}

.dark-mode {
    color-scheme: dark;

    --tb-surface: #111c2f;
    --tb-surface-sunken: #0b1220;
    --tb-surface-alt: #17253c;
    --tb-input-bg: #1b2942;
    --tb-page-bg: #0b1220;
    --tb-text: #f1f5f9;
    --tb-text-muted: #94a3b8;
    --tb-text-faint: #64748b;
    --tb-primary: #5b8def;
    --tb-primary-dark: #3b6fd6;
    --tb-primary-soft: rgba(91, 141, 239, 0.16);
    --tb-border: #24334d;
    --tb-border-strong: rgba(255, 255, 255, 0.18);
    --tb-shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.35);
    --tb-shadow-soft: 0 4px 14px rgba(0, 0, 0, 0.3);
    --tb-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.45);
    --tb-shadow-md: 0 10px 28px rgba(0, 0, 0, 0.5);
    --tb-shadow-lg: 0 24px 56px rgba(0, 0, 0, 0.6);
    --tb-focus-ring: 0 0 0 3px rgba(96, 165, 250, 0.45);
}

@media (prefers-reduced-motion: reduce) {
    :root {
        --tb-duration-fast: 0ms;
        --tb-duration: 0ms;
    }
}

html {
    height: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    min-height: 100%;
    min-height: 100vh;
    min-height: 100lvh;
    font-family: var(--tb-font);
    color: var(--tb-text);
    letter-spacing: -0.011em;
    line-height: 1.7;
}

body,
button,
input,
select,
textarea,
.form-control,
.form-select,
.btn,
.select2-container,
.select2-results,
.jconfirm,
.swal2-popup,
.ui-pnotify,
.picker-item,
.tb-picker-wheel-item,
.tb-picker-title,
.tb-picker-preview {
    font-family: var(--tb-font);
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--tb-font);
    color: var(--tb-text);
    letter-spacing: -0.022em;
    line-height: 1.45;
}

p {
    color: inherit;
}

.text-muted {
    color: var(--tb-text-muted) !important;
    opacity: 1;
}

.btn {
    text-transform: none;
    font-family: inherit;
    font-weight: 700;
    letter-spacing: 0;
    border-radius: 14px;
}

.btn-default:hover,
.btn-default:focus {
    background-color: var(--fimobile-theme-color-2);
    color: #fff;
}

.btn-light {
    color: var(--tb-text);
}

.btn-light:hover,
.btn-light:focus {
    color: var(--tb-text);
}

main.h-100 {
    min-height: 100%;
    min-height: 100vh;
    min-height: 100lvh;
}

.main-container {
    min-height: 100%;
}

.page-auth .main-container {
    padding-bottom: 32px;
}

.header {
    padding-top: calc(var(--fimobile-padding) + constant(safe-area-inset-top));
    padding-top: calc(var(--fimobile-padding) + env(safe-area-inset-top));
    padding-left: calc(var(--fimobile-padding) + constant(safe-area-inset-left));
    padding-left: calc(var(--fimobile-padding) + env(safe-area-inset-left));
    padding-right: calc(var(--fimobile-padding) + constant(safe-area-inset-right));
    padding-right: calc(var(--fimobile-padding) + env(safe-area-inset-right));
}

.header:after {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    height: auto;
    width: auto;
}

.header.position-fixed:after {
    opacity: 0.95;
}

.header .logo-small img {
    max-height: 36px;
}

.header h5 {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.brand-mark {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 28px;
}

.brand-mark img {
    width: 56px;
    height: 56px;
    object-fit: contain;
}

.brand-mark span {
    font-size: 13px;
    color: var(--tb-text-muted);
}

.page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.page-head h5 {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 800;
}

.page-head .page-head-desc {
    margin: 0;
    color: var(--tb-text-muted);
    font-size: 13.5px;
    line-height: 1.8;
}

.page-head .btn {
    white-space: nowrap;
}

.welcome-card,
.hero-card,
.action-card,
.item-card,
.setup-banner,
.auth-panel {
    border: 0;
    border-radius: var(--tb-radius);
    box-shadow: var(--tb-shadow-sm);
    background: var(--fimobile-card-color);
}

.hero-card {
    overflow: hidden;
    background: linear-gradient(135deg, var(--fimobile-theme-color) 0%, var(--fimobile-theme-color-2) 100%);
    color: #fff;
    box-shadow: var(--tb-shadow);
}

.hero-card .card-body {
    padding: 24px 20px;
}

    .hero-card h1 {
        font-size: 23px;
        font-weight: 800;
        margin-bottom: 10px;
        letter-spacing: -0.03em;
        color: inherit;
    }

    .hero-card p {
        margin-bottom: 20px;
        opacity: 0.94;
        line-height: 1.9;
        font-size: 14px;
        text-align: justify;
        font-weight: 400;
    }

.hero-kicker {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.2px;
    opacity: 0.88;
}

.hero-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: -8px 0 18px;
}

.hero-chips span {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.hero-note {
    margin: 14px 0 0;
    font-size: 12px;
    opacity: 0.9;
}

.hero-note a {
    color: #fff;
    font-weight: 700;
    text-decoration: underline;
}

.hero-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.welcome-card .card-body {
    padding: 16px;
}

.welcome-name {
    font-size: 19px;
    font-weight: 800;
    margin: 0 0 2px;
    color: var(--fimobile-theme-color);
}

.welcome-meta {
    margin: 0;
    color: var(--tb-text-muted);
    font-size: 13px;
}

.welcome-guide-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--fimobile-theme-color);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.welcome-guide-link i {
    font-size: 13px;
}

.quick-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 576px) {
    .quick-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 992px) {
    .quick-grid.cols-3 {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

.action-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.action-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--tb-shadow);
    color: inherit;
}

.action-card .action-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    background: var(--fimobile-theme-color-light);
    color: var(--fimobile-theme-color);
}

.action-card h6 {
    margin: 0 0 2px;
    font-size: 15px;
    font-weight: 700;
}

.action-card p {
    margin: 0;
    font-size: 13px;
    color: var(--tb-text-muted);
    line-height: 1.7;
}

.feature-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 768px) {
    .feature-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

.feature-card {
    text-align: center;
    padding: 22px 16px;
    border-radius: var(--tb-radius);
    background: var(--fimobile-card-color);
    box-shadow: var(--tb-shadow-sm);
}

.feature-card i {
    font-size: 28px;
    color: var(--fimobile-theme-color);
    display: block;
    margin-bottom: 10px;
}

.feature-card h3,
.feature-card h6 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 6px;
}

.feature-card p {
    margin: 0;
    font-size: 13px;
    color: var(--tb-text-muted);
    line-height: 1.8;
}

.setup-banner {
    background: linear-gradient(135deg, #fff7e6, #fff);
    border: 1px solid rgba(245, 158, 11, 0.35);
}

.setup-banner .setup-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(245, 158, 11, 0.2);
    color: #d97706;
    font-size: 22px;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 8px 0 14px;
}

.section-title h6 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
}

.item-card {
    margin-bottom: 12px;
}

.customer-search {
    position: relative;
}

.customer-search i {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    color: var(--tb-text-muted);
    pointer-events: none;
}

.customer-search .form-control {
    padding-right: 44px;
    border-radius: 16px;
    min-height: 48px;
    border: 0;
    box-shadow: var(--tb-shadow-sm);
    background: var(--fimobile-card-color);
}

.customer-search .form-control:focus {
    box-shadow: var(--tb-shadow);
}

.manual-booking-hint {
    margin: 0 0 12px;
    font-size: 12.5px;
    line-height: 1.8;
    color: var(--tb-text-muted);
}

.manual-booking-hint.is-member {
    color: var(--fimobile-theme-color);
}

.manual-booking-name.is-locked .form-control {
    background: var(--fimobile-theme-color-light);
}

.manual-end-time {
    min-height: 48px;
    display: flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 16px;
    background: var(--fimobile-card-color);
    box-shadow: var(--tb-shadow-sm);
    color: var(--tb-text-muted);
    font-weight: 700;
}

.manual-end-time.is-ready {
    color: var(--fimobile-theme-color);
    background: var(--fimobile-theme-color-light);
}

.manual-end-time.is-error {
    color: var(--fimobile-red, #dc3545);
}

.customer-dossier-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.customer-dossier-head h5 {
    font-size: 18px;
    font-weight: 800;
}

.customer-dossier-layout {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.customer-dossier-history {
    min-width: 0;
}

.customer-history {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
    max-height: min(36vh, 280px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 2px 2px 4px 0;
}

.customer-history-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 12px;
    border-radius: 14px;
    background: var(--fimobile-theme-color-light);
    flex-shrink: 0;
}

.customer-dossier textarea {
    min-height: 140px;
}

@media (min-width: 768px) {
    .customer-dossier-layout {
        display: grid;
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
        gap: 24px;
        align-items: start;
    }

    .customer-dossier-history {
        position: sticky;
        top: 0;
    }

    .customer-history {
        max-height: min(52vh, 420px);
    }
}

.item-card.is-inactive {
    opacity: 0.72;
}

.item-card .card-body {
    padding: 16px;
}

.item-meta {
    margin: 0;
    color: var(--tb-text-muted);
    font-size: 13px;
    line-height: 1.7;
}

.item-title {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 700;
}

.recent-companies {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.recent-company-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--tb-radius);
    background: var(--fimobile-card-color);
    box-shadow: var(--tb-shadow-sm);
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.recent-company-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--tb-shadow);
    color: inherit;
}

.recent-company-avatar,
.recent-company-avatar img {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    object-fit: cover;
    flex-shrink: 0;
}

.recent-company-avatar {
    display: block;
    overflow: hidden;
    background: var(--fimobile-theme-color-light);
}

.recent-company-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.recent-company-copy strong {
    font-size: 14px;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recent-company-copy span {
    font-size: 12px;
    color: var(--tb-text-muted);
    line-height: 1.6;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recent-company-arrow {
    color: var(--tb-text-muted);
    font-size: 16px;
    flex-shrink: 0;
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: var(--fimobile-theme-color-light);
    color: var(--fimobile-theme-color);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.status-badge.is-on {
    background: rgba(16, 185, 129, 0.14);
    color: #059669;
}

.status-badge.is-off {
    background: rgba(244, 63, 94, 0.12);
    color: #e11d48;
}

.status-badge.is-pending {
    background: rgba(245, 158, 11, 0.18);
    color: #d97706;
}

.status-badge.is-canceled {
    background: rgba(100, 116, 139, 0.16);
    color: #475569;
}

.info-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 100%;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
}

.info-chip i {
    font-size: 12px;
    flex-shrink: 0;
}

.info-chip span {
    min-width: 0;
}

.info-chip.is-price {
    background: var(--fimobile-theme-color-light);
    color: var(--fimobile-theme-color);
}

.info-chip.is-negotiable {
    background: rgba(100, 116, 139, 0.14);
    color: #475569;
}

.filter-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
    margin-bottom: 10px;
    -webkit-overflow-scrolling: touch;
}

.filter-tabs::-webkit-scrollbar {
    display: none;
}

.filter-chip {
    flex: 0 0 auto;
    border: 0;
    background: var(--fimobile-card-color);
    color: var(--tb-text-muted);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: var(--tb-shadow-sm);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.filter-chip.active {
    background: var(--fimobile-theme-color);
    color: #fff;
}

.filter-chip i {
    font-size: 13px;
}

.advanced-filter-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    flex-wrap: wrap;
}

.advanced-filter-panel {
    display: none;
    margin-bottom: 14px;
    padding: 16px;
    border-radius: var(--tb-radius);
    background: var(--fimobile-card-color);
    box-shadow: var(--tb-shadow-sm);
}

.advanced-filter-panel.is-open {
    display: block;
}

.advanced-filter-dates {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.advanced-filter-field {
    margin-bottom: 12px;
}

.advanced-filter-field label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--tb-text-muted);
}

.advanced-filter-date-input {
    position: relative;
}

.advanced-filter-date-input .form-control {
    min-height: 46px;
    border: 0;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.04);
    padding-left: 38px;
    cursor: pointer;
}

.advanced-filter-clear-date {
    position: absolute;
    top: 50%;
    left: 8px;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--tb-text-muted);
    display: none;
    align-items: center;
    justify-content: center;
}

.advanced-filter-date-input.has-value .advanced-filter-clear-date {
    display: inline-flex;
}

.advanced-filter-customer-results {
    margin-top: 8px;
    border-radius: 14px;
    overflow: hidden;
    background: var(--fimobile-card-color);
    box-shadow: var(--tb-shadow-sm);
}

.advanced-filter-customer-item {
    display: block;
    width: 100%;
    text-align: right;
    border: 0;
    background: transparent;
    padding: 12px 14px;
    border-bottom: 1px solid var(--fimobile-theme-bordercolor);
    cursor: pointer;
}

.advanced-filter-customer-item:last-child {
    border-bottom: 0;
}

.advanced-filter-customer-item strong {
    display: block;
    font-size: 13px;
}

.advanced-filter-customer-item span {
    display: block;
    font-size: 12px;
    color: var(--tb-text-muted);
}

.advanced-filter-customer-empty {
    padding: 12px 14px;
    font-size: 12px;
    color: var(--tb-text-muted);
}

.advanced-filter-selected {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 14px;
    background: var(--fimobile-theme-color-light);
    color: var(--fimobile-theme-color);
}

.advanced-filter-selected.is-visible {
    display: flex;
}

.advanced-filter-selected strong {
    font-size: 13px;
}

.advanced-filter-selected button {
    border: 0;
    background: transparent;
    color: inherit;
    width: 28px;
    height: 28px;
}

.advanced-filter-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 4px;
}

.advanced-filter-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
}

.advanced-filter-summary .chip {
    gap: 4px;
    cursor: pointer;
    border: 0;
}

.advanced-filter-summary .chip i {
    font-size: 11px;
}

@media (max-width: 420px) {
    .advanced-filter-dates {
        grid-template-columns: 1fr;
    }
}

.stat-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    gap: 8px;
}

.stat-card {
    text-align: center;
    padding: 12px 8px;
    border-radius: var(--tb-radius);
    background: var(--fimobile-card-color);
    box-shadow: var(--tb-shadow-sm);
}

a.stat-card {
    text-decoration: none;
    color: inherit;
}

.stat-card .stat-value {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.2;
    color: var(--fimobile-theme-color);
}

.stat-card.is-pending .stat-value {
    color: #d97706;
}

.stat-card.is-confirmed .stat-value {
    color: #059669;
}

.stat-card .stat-label {
    margin-top: 2px;
    font-size: 12px;
    font-weight: 600;
    color: var(--tb-text-muted);
}

.reservation-card {
    position: relative;
    overflow: hidden;
}

.reservation-card.is-clickable {
    cursor: pointer;
}

.reservation-card.is-clickable:active {
    transform: scale(0.995);
}

/* Layout mirrors the app's _ReservationCard: accent rail, tinted time rail, chips, actions. */
.reservation-card {
    --rc-tone: var(--tb-text-faint);
    --rc-tone-soft: rgba(148, 163, 184, 0.12);
    --rc-tone-line: rgba(148, 163, 184, 0.22);
}

.reservation-card.is-pending {
    --rc-tone: var(--tb-warning);
    --rc-tone-soft: rgba(245, 158, 11, 0.09);
    --rc-tone-line: rgba(245, 158, 11, 0.18);
}

.reservation-card.is-on,
.reservation-card.is-confirmed {
    --rc-tone: var(--tb-success);
    --rc-tone-soft: rgba(16, 185, 129, 0.09);
    --rc-tone-line: rgba(16, 185, 129, 0.18);
}

.reservation-card.is-off,
.reservation-card.is-rejected {
    --rc-tone: var(--tb-danger);
    --rc-tone-soft: rgba(244, 63, 94, 0.09);
    --rc-tone-line: rgba(244, 63, 94, 0.18);
}

.reservation-rail-accent {
    position: absolute;
    top: 14px;
    bottom: 14px;
    right: 0;
    width: 4px;
    border-radius: 4px 0 0 4px;
    background: var(--rc-tone);
}

.reservation-card .card-body {
    padding: 14px 16px 14px 14px;
}

.reservation-card-main {
    display: flex;
    align-items: center;
    gap: 12px;
}

.reservation-time-rail {
    flex: 0 0 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 10px 6px;
    border-radius: var(--tb-radius-sm);
    background: var(--rc-tone-soft);
    border: 1px solid var(--rc-tone-line);
    text-align: center;
}

.reservation-time {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.2;
    color: var(--tb-text);
    direction: ltr;
}

.reservation-time-meta {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--tb-text-muted);
}

.reservation-time-when {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    font-weight: 700;
    color: var(--rc-tone);
}

.reservation-card-copy {
    flex: 1;
    min-width: 0;
}

.reservation-card-title {
    margin-bottom: 2px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.reservation-card-subtitle {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 0 0 8px;
    font-size: 12.5px;
    color: var(--tb-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.reservation-card-subtitle i {
    font-size: 13px;
    flex-shrink: 0;
}

.reservation-card-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.reservation-card-chips .status-badge,
.reservation-card-chips .info-chip {
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
}

.reservation-card-arrow {
    flex-shrink: 0;
    font-size: 18px;
    color: var(--tb-text-faint);
}

.reservation-services {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 10px 0 0;
    color: var(--tb-text-muted);
    font-size: 12.5px;
    line-height: 1.6;
}

.reservation-services i {
    flex-shrink: 0;
    font-size: 13px;
}

.reservation-services span {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.reservation-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--tb-border);
}

.reservation-card-actions .btn {
    flex: 1;
    min-width: 0;
    min-height: var(--tb-btn-md);
    padding: 8px 12px;
    border-radius: var(--tb-radius-sm);
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.reservation-card-actions .btn i {
    font-size: 15px;
}

.reservation-detail-hero {
    text-align: center;
    padding: 8px 12px 18px;
    margin-bottom: 14px;
    border-radius: 20px;
    background: var(--fimobile-theme-color-light);
}

.reservation-detail-hero.is-pending {
    background: rgba(245, 158, 11, 0.16);
}

.reservation-detail-hero.is-on {
    background: rgba(16, 185, 129, 0.14);
}

.reservation-detail-hero.is-off,
.reservation-detail-hero.is-canceled {
    background: rgba(108, 117, 125, 0.12);
}

.reservation-detail-hero .status-badge {
    margin-bottom: 10px;
}

.reservation-detail-time {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0;
    font-size: 28px;
    font-weight: 800;
    line-height: 1.1;
    direction: ltr;
    color: var(--fimobile-theme-color);
}

.reservation-detail-time i {
    font-size: 16px;
    opacity: 0.7;
}

.reservation-detail-when {
    margin: 8px 0 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--tb-text-muted);
}

.reservation-detail-person {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin-bottom: 12px;
    border-radius: 18px;
    background: var(--fimobile-theme-color-light);
}

.reservation-detail-avatar {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--fimobile-card-color);
    color: var(--fimobile-theme-color);
    font-size: 22px;
}

.reservation-detail-person-copy {
    flex: 1;
    min-width: 0;
}

.reservation-detail-person-copy strong {
    display: block;
    font-size: 15px;
    font-weight: 800;
}

.reservation-detail-person-copy span {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: var(--tb-text-muted);
    direction: ltr;
    text-align: right;
}

.reservation-detail-call {
    flex-shrink: 0;
}

.reservation-detail-facts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 16px;
}

.reservation-detail-facts > div {
    padding: 12px;
    border-radius: 16px;
    background: var(--fimobile-theme-color-light);
}

.reservation-detail-facts .is-wide {
    grid-column: 1 / -1;
}

.reservation-detail-facts span {
    display: block;
    margin-bottom: 4px;
    font-size: 11px;
    color: var(--tb-text-muted);
}

.reservation-detail-facts strong {
    font-size: 14px;
    font-weight: 800;
}

.reservation-detail-facts strong.is-negotiable {
    font-size: 13px;
    font-weight: 700;
    color: var(--tb-text-muted);
}

.reservation-detail-services {
    margin-bottom: 8px;
    padding: 4px 14px;
    border-radius: 16px;
    background: var(--fimobile-theme-color-light);
}

.reservation-detail-services .reservation-service-row:last-child {
    border-bottom: 0;
}

.reservation-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.reservation-detail-actions .btn {
    flex: 1 1 140px;
    min-height: 46px;
}

.reservation-detail-note {
    margin: 16px 0 0;
    padding: 12px;
    border-radius: 14px;
    background: rgba(108, 117, 125, 0.12);
    color: var(--tb-text-muted);
    font-size: 13px;
    text-align: center;
}

.dark-mode .fullscreen-modal-bar,
.dark-mode .reservation-detail-avatar,
.dark-mode .reservation-detail-facts > div,
.dark-mode .reservation-detail-services {
    background: rgba(255, 255, 255, 0.08);
}

.dark-mode .fullscreen-modal.is-sheet .fullscreen-modal-panel {
    background: #121826;
}

.dark-mode .reservation-detail-person {
    background: rgba(255, 255, 255, 0.08);
}

.reservation-service-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--fimobile-theme-bordercolor);
}

.reservation-service-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    font-size: 12px;
    color: var(--tb-text-muted);
    white-space: nowrap;
}

.reservation-service-meta strong {
    color: inherit;
    font-size: 13px;
}

.reservation-service-meta strong.is-negotiable {
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    background: rgba(100, 116, 139, 0.14);
    padding: 3px 8px;
    border-radius: 999px;
}

.section-link {
    font-size: 12px;
    font-weight: 600;
    color: var(--fimobile-theme-color);
    text-decoration: none;
}

.detail-list {
    margin-bottom: 16px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--fimobile-theme-bordercolor);
    font-size: 13px;
}

.detail-row span {
    color: var(--tb-text-muted);
}

.detail-link {
    font-weight: 700;
    color: var(--fimobile-theme-color);
    direction: ltr;
}

.item-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.item-actions .btn {
    min-width: 40px;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    border-radius: var(--tb-radius);
    background: var(--fimobile-card-color);
    box-shadow: var(--tb-shadow-sm);
}

.empty-state i {
    font-size: 36px;
    color: var(--fimobile-theme-color);
    display: block;
    margin-bottom: 12px;
}

.empty-state h6 {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 6px;
}

.empty-state p {
    margin: 0 0 16px;
    color: var(--tb-text-muted);
    font-size: 14px;
    line-height: 1.9;
}

.fab-btn {
    position: fixed;
    left: 18px;
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));
    width: 56px;
    height: 56px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    z-index: 8;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.28);
}

.back-to-top {
    position: fixed;
    right: 16px;
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    width: 46px;
    height: 46px;
    padding: 0;
    border: 0;
    border-radius: 16px;
    background: var(--fimobile-theme-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
    z-index: 8;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.28);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease, background-color 0.2s ease;
}

body:has(.footer) .back-to-top {
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.back-to-top:hover,
.back-to-top:focus {
    background: var(--fimobile-theme-color-2);
    color: #fff;
}

.page-nearby-map .back-to-top {
    display: none;
}

.avatar-upload {
    position: relative;
    display: inline-block;
}

.avatar-upload img {
    width: 128px;
    height: 128px;
    object-fit: cover;
    border-radius: 28px;
    cursor: pointer;
    box-shadow: var(--tb-shadow);
}

.avatar-upload .avatar-edit {
    position: absolute;
    left: 6px;
    bottom: 6px;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: var(--fimobile-theme-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.form-section-title {
    font-size: 14px;
    font-weight: 800;
    margin: 8px 0 12px;
}

.form-sticky-actions {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 8;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    padding-left: calc(16px + env(safe-area-inset-left, 0px));
    padding-right: calc(16px + env(safe-area-inset-right, 0px));
    background: rgba(255, 255, 255, 0.86);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    backdrop-filter: blur(18px) saturate(1.4);
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 -12px 32px rgba(15, 23, 42, 0.1);
    border-radius: 22px 22px 0 0;
}

body:has(.footer) .form-sticky-actions:not(.is-modal) {
    bottom: var(--app-footer-height, calc(60px + env(safe-area-inset-bottom, 0px)));
    padding-bottom: 20px;
    border-radius: 0;
}

.fullscreen-modal .form-sticky-actions:not(.is-modal) {
    z-index: 42;
    bottom: 0;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}

.form-sticky-actions-inner {
    display: flex;
    align-items: stretch;
    gap: 10px;
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
}

.form-sticky-actions-inner > * {
    margin: 0 !important;
    min-width: 0;
    flex: 1 1 0;
}

.form-sticky-actions-inner > .btn,
.form-sticky-actions-inner > a.btn {
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto;
    box-shadow: none;
    white-space: nowrap;
}

.form-sticky-actions-inner > .btn-default,
.form-sticky-actions-inner > [type="submit"] {
    flex: 1.7 1 0;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.22);
}

.form-sticky-actions-inner > .btn-light,
.form-sticky-actions-inner > a.btn:not(.btn-default) {
    flex: 0.85 1 0;
    background: rgba(15, 23, 42, 0.06);
    border: 0;
    color: var(--tb-text);
}

form:has(> .form-sticky-actions),
.form-has-sticky-actions {
    padding-bottom: calc(var(--form-sticky-bar-height, 76px) + 8px);
}

.form-has-sticky-actions.form-sticky-in-modal {
    padding-bottom: 8px;
}

.form-sticky-actions.is-modal {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    z-index: 1;
    flex-shrink: 0;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    border-radius: 22px 22px 0 0;
}

.fullscreen-modal.is-sheet .form-sticky-actions.is-modal {
    border-radius: 0 0 24px 24px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
}

body:has(.form-sticky-actions:not(.is-modal)) .back-to-top {
    bottom: calc(var(--app-footer-height, 70px) + var(--form-sticky-bar-height, 76px) + 12px);
}

.dark-mode .form-sticky-actions {
    background: rgba(18, 24, 38, 0.9);
    border-top-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 -12px 32px rgba(0, 0, 0, 0.32);
}

.dark-mode .form-sticky-actions-inner > .btn-light,
.dark-mode .form-sticky-actions-inner > a.btn:not(.btn-default) {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

body.page-auth.h-100 {
    height: auto !important;
    min-height: 100%;
    background-color: var(--fimobile-page-bg-1);
}

body.page-auth main.auth-screen.h-100 {
    height: auto !important;
    min-height: 100vh;
    min-height: 100dvh;
}

:root main.auth-screen {
    min-height: 100%;
    width: 100%;
    max-width: none;
    padding-bottom: 32px;
    padding-left: 0;
    padding-right: 0;
}

.auth-screen .auth-form-col {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.auth-screen .auth-form-col > .auth-form-inner,
.auth-screen .auth-form-col > [class*="col-"] {
    width: 100%;
    max-width: none;
    flex: 0 0 auto;
    margin-left: 0;
    margin-right: 0;
    padding: 16px 16px 8px;
}

.auth-intro {
    margin-bottom: 16px;
}

.auth-intro-title {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.4;
}

.auth-intro-text {
    margin: 0;
    color: var(--tb-text-muted);
    font-size: 14px;
    line-height: 1.8;
}

.auth-card {
    padding: 18px 16px 16px;
    border: 0;
    border-radius: var(--tb-radius);
    box-shadow: var(--tb-shadow-sm);
}

.auth-card .input-group {
    flex-wrap: nowrap;
    max-width: 100%;
}

.auth-card .input-group-text {
    flex: 0 1 auto;
    padding-left: 10px;
    padding-right: 10px;
    font-size: 13px;
    white-space: nowrap;
}

.auth-card .input-group .form-control {
    min-width: 0;
}

.auth-panel {
    padding: 8px 4px 0;
}

.nav-segment {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 6px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.7);
    margin-bottom: 24px;
    box-shadow: inset 0 0 0 1px var(--fimobile-theme-bordercolor);
}

.nav-segment .nav-item {
    width: 100%;
    margin: 0;
}

.nav-segment .nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 12px;
    text-align: center;
    color: var(--tb-text-muted);
    font-size: 13px;
    font-weight: 600;
    padding: 10px 8px;
    width: 100%;
}

.nav-segment .nav-link.active {
    background: var(--fimobile-theme-color);
    color: #fff;
}

.auth-help {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: var(--tb-text-muted);
    text-align: right;
}

.auth-switch {
    margin-top: 8px;
    font-size: 13px;
}

.otp-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
}

.otp-length {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--fimobile-theme-color-light);
    color: var(--fimobile-theme-color);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.6;
}

.otp-field {
    position: relative;
    direction: ltr;
    max-width: 360px;
    margin-inline: auto;
}

.otp-boxes {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    pointer-events: none;
}

.otp-boxes span {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 58px;
    border: 1.5px solid var(--fimobile-theme-bordercolor);
    border-radius: 14px;
    background: #fff;
    color: var(--tb-text, #0f172a);
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.otp-boxes span:empty::before {
    content: "–";
    color: #cbd5e1;
    font-weight: 600;
}

.otp-boxes span.is-active {
    border-color: var(--fimobile-theme-color);
    box-shadow: 0 0 0 4px var(--fimobile-theme-color-light);
}

.otp-boxes span.is-filled {
    border-color: var(--fimobile-theme-color);
}

form .otp-field .form-control.otp-input {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100% !important;
    margin: 0;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none !important;
    color: transparent !important;
    caret-color: transparent;
    text-align: center;
    letter-spacing: 0;
    font-size: 16px !important;
    line-height: 58px !important;
}

form .otp-field .form-control.otp-input:focus,
form .otp-field .form-control.otp-input:focus-visible,
form .otp-field .form-control.otp-input.input-validation-error,
form .otp-field .form-control.otp-input.valid {
    outline: none;
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}

.otp-hint {
    margin: 8px 0 0;
    text-align: center;
    color: var(--tb-text-muted);
    font-size: 12px;
    line-height: 1.7;
}

.otp-input {
    text-align: center;
    direction: ltr;
    font-weight: 700;
}

.fullscreen-modal {
    z-index: 40;
}

body:has(.fullscreen-modal.show) .footer,
body:has(.fullscreen-modal.show) .fab-btn,
body:has(.fullscreen-modal.show) .back-to-top,
body:has(.fullscreen-modal.show) main .form-sticky-actions {
    visibility: hidden;
    pointer-events: none;
}

.footer {
    padding-bottom: constant(safe-area-inset-bottom);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    padding-left: constant(safe-area-inset-left);
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: constant(safe-area-inset-right);
    padding-right: env(safe-area-inset-right, 0px);
    background-color: var(--fimobile-footer);
    box-shadow:
        0 -5px 10px rgba(0, 0, 0, 0.07),
        0 50vh 0 0 var(--fimobile-footer);
}

.footer::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 50vh;
    background-color: var(--fimobile-footer);
    pointer-events: none;
}

.footer .nav-text {
    font-size: 11px;
    font-weight: 600;
}

.footer-icon-wrap {
    position: relative;
    display: inline-block;
}

.footer-badge {
    position: absolute;
    top: -5px;
    left: -9px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #f43f5e;
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    line-height: 16px;
    text-align: center;
    box-shadow: 0 0 0 2px var(--fimobile-footer, #fff);
}

.pending-notice {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--tb-radius);
    text-decoration: none;
    color: inherit;
    background: linear-gradient(135deg, #fff7e6, #fff);
    border: 1px solid rgba(245, 158, 11, 0.4);
    box-shadow: var(--tb-shadow-sm);
}

.pending-notice-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(245, 158, 11, 0.22);
    color: #d97706;
    font-size: 20px;
    flex-shrink: 0;
}

.pending-notice-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.pending-notice-copy strong {
    font-size: 14px;
    font-weight: 800;
}

.pending-notice-copy span {
    font-size: 12px;
    color: var(--tb-text-muted);
}

.pending-notice-arrow {
    color: #d97706;
    font-size: 16px;
}

.dark-mode .pending-notice {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.25);
    color: inherit;
}

.sidebar-wrap .closemenu {
    font-size: 13px;
}

.sidebar-user {
    padding: 4px 0 12px;
}

.sidebar .nav-link .col {
    font-size: 14px;
    font-weight: 500;
}

.public-page-card {
    padding: 16px;
    border-radius: var(--tb-radius);
    background: var(--fimobile-card-color);
    box-shadow: var(--tb-shadow-sm);
}

.public-page-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.public-page-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--fimobile-theme-color-light);
    color: var(--fimobile-theme-color);
    font-size: 20px;
    flex-shrink: 0;
}

.public-page-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.public-page-text strong {
    font-size: 14px;
    font-weight: 800;
}

.public-page-text span {
    font-size: 12px;
    color: var(--tb-text-muted);
    line-height: 1.7;
}

.public-page-url {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 6px 6px 12px;
    border-radius: 14px;
    background: var(--fimobile-theme-color-light);
    direction: ltr;
}

.public-page-link {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 700;
    color: var(--fimobile-theme-color);
    text-align: left;
    text-decoration: none;
}

.public-page-link:hover {
    color: var(--fimobile-theme-color-2);
}

.public-page-copy-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 36px;
    padding: 0 12px;
    border: 0;
    border-radius: 12px;
    background: var(--fimobile-theme-color);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
}

.public-page-copy-btn i {
    font-size: 14px;
}

.public-page-copy-btn:hover,
.public-page-copy-btn:focus {
    color: #fff;
    background: var(--fimobile-theme-color-2);
}

.public-page-copy-btn.is-copied,
.public-page-copy-btn.is-copied:hover,
.public-page-copy-btn.is-copied:focus {
    background: #059669;
}

.dark-mode {
    --tb-text: #f1f5f9;
    --tb-text-muted: #94a3b8;
}

.dark-mode label {
    color: #cbd5e1;
}

.dark-mode form .form-control {
    background-color: rgba(255, 255, 255, 0.06);
    color: inherit;
    box-shadow: none;
}

.dark-mode .input-group-text {
    background-color: rgba(255, 255, 255, 0.06);
    color: inherit;
    border-color: var(--fimobile-input-bordercolor, var(--tb-border));
    box-shadow: none;
}

.dark-mode .select2-container .select2-selection--single {
    background-color: rgba(255, 255, 255, 0.06) !important;
    border-color: var(--fimobile-input-bordercolor, var(--tb-border)) !important;
    color: inherit;
    box-shadow: none;
}

.dark-mode .select2-container .select2-selection--single .select2-selection__rendered {
    color: inherit !important;
}

.dark-mode .select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: var(--tb-text-muted, #94a3b8);
}

.dark-mode .select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: var(--tb-text-muted, #94a3b8) transparent transparent transparent;
}

.dark-mode .select2-dropdown {
    background-color: var(--fimobile-card-color, var(--tb-surface));
    border-color: var(--fimobile-input-bordercolor, var(--tb-border));
    color: inherit;
}

.dark-mode .select2-container--default .select2-results__option[aria-selected="true"] {
    background-color: rgba(255, 255, 255, 0.08);
}

.dark-mode .select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--fimobile-theme-color);
    color: #fff;
}

.dark-mode .select2-search--dropdown .select2-search__field {
    background-color: rgba(255, 255, 255, 0.06);
    color: inherit;
    border-color: var(--fimobile-input-bordercolor, var(--tb-border)) !important;
    outline-color: var(--fimobile-theme-color) !important;
}

.dark-mode .otp-boxes span {
    background: rgba(255, 255, 255, 0.06);
    color: #f1f5f9;
    box-shadow: none;
}

.dark-mode .otp-boxes span:empty::before {
    color: #64748b;
}

.dark-mode form .otp-field .form-control.otp-input {
    color: transparent !important;
    background: transparent !important;
}

.dark-mode .hero-card,
.dark-mode .setup-banner,
.dark-mode .feature-card,
.dark-mode .empty-state,
.dark-mode .auth-panel,
.dark-mode .item-card,
.dark-mode .action-card,
.dark-mode .welcome-card,
.dark-mode .stat-card,
.dark-mode .filter-chip,
.dark-mode .public-page-card,
.dark-mode .recent-company-card,
.dark-mode .package-card,
.dark-mode .company-status-card,
.dark-mode .customer-search .form-control {
    background: rgba(255, 255, 255, 0.06);
    color: inherit;
}

.dark-mode .manual-booking-name.is-locked .form-control {
    background: rgba(255, 255, 255, 0.08);
    color: inherit;
}

.dark-mode .manual-end-time {
    background: rgba(255, 255, 255, 0.06);
    color: inherit;
}

.dark-mode .manual-end-time.is-ready {
    background: rgba(255, 255, 255, 0.08);
    color: var(--fimobile-theme-color);
}

.dark-mode .hero-card {
    background: linear-gradient(135deg, var(--fimobile-theme-color) 0%, var(--fimobile-theme-color-2) 100%);
    color: #fff;
}

.dark-mode .public-page-url {
    background: rgba(255, 255, 255, 0.08);
}

.dark-mode .customer-history-row {
    background: rgba(255, 255, 255, 0.08);
}

.dark-mode .filter-chip.active {
    background: var(--fimobile-theme-color);
    color: #fff;
}

.dark-mode .advanced-filter-panel,
.dark-mode .advanced-filter-customer-results {
    background: rgba(255, 255, 255, 0.06);
}

.dark-mode .advanced-filter-selected {
    background: rgba(37, 99, 235, 0.28);
    color: #fff;
}

.dark-mode .advanced-filter-date-input .form-control {
    background: rgba(255, 255, 255, 0.08);
    color: inherit;
}

.dark-mode .reservation-card.is-pending .card-body {
    background: linear-gradient(270deg, rgba(245, 158, 11, 0.12), transparent 42%);
}

.dark-mode .info-chip.is-negotiable,
.dark-mode .reservation-service-meta strong.is-negotiable {
    background: rgba(148, 163, 184, 0.18);
    color: #cbd5e1;
}

.dark-mode .setup-banner {
    border-color: rgba(245, 158, 11, 0.2);
}

.page-company .main-container {
    padding-bottom: calc(118px + env(safe-area-inset-bottom, 0px));
}

.company-hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--tb-radius);
    margin-bottom: 22px;
    color: #fff;
    box-shadow: var(--tb-shadow);
}

.company-hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--fimobile-theme-color) 0%, var(--fimobile-theme-color-2, #1d4ed8) 100%);
}

.company-hero-body {
    position: relative;
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 24px 20px;
}

.company-avatar {
    width: 72px;
    height: 72px;
    border-radius: 22px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
    background: #fff;
}

.company-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.company-hero-copy h1 {
    font-size: 23px;
    font-weight: 800;
    margin: 0 0 4px;
    letter-spacing: -0.03em;
    color:white;
}

.company-handle {
    margin: 0 0 8px;
    font-size: 12px;
    opacity: 0.85;
    direction: ltr;
    text-align: right;
}

.chip-light {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.company-address {
    margin: 10px 0 0;
    font-size: 12px;
    opacity: 0.9;
}

.company-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.company-action {
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 18px;
    line-height: 1;
    text-decoration: none;
}

.company-action:hover,
.company-action:focus {
    background: rgba(255, 255, 255, 0.3);
    color: #fff;
}

.company-action-light {
    background: rgba(37, 99, 235, 0.08);
    color: var(--fimobile-theme-color);
}

.company-action-light:hover,
.company-action-light:focus {
    background: rgba(37, 99, 235, 0.14);
    color: var(--fimobile-theme-color);
}

.company-bio-card {
    margin: -8px 0 22px;
}

.company-bio {
    margin: 0;
    font-size: 14px;
    line-height: 1.9;
    color: var(--tb-text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.company-bio.is-expanded {
    display: block;
    -webkit-line-clamp: unset;
}

.company-bio-toggle {
    border: 0;
    background: none;
    padding: 0;
    margin-top: 4px;
    color: var(--fimobile-theme-color);
    font-size: 12px;
    font-weight: 700;
}

.company-map-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.company-map-head h5 {
    margin-bottom: 0;
}

.company-map-view #companyMap {
    height: 240px;
}

.company-hero-copy {
    min-width: 0;
}

.booking-section {
    margin-bottom: 24px;
}

.section-hint {
    font-size: 11px;
    color: var(--tb-text-muted);
}

.service-list {
    display: grid;
    gap: 10px;
}

.service-card {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    text-align: right;
    border: 1px solid transparent;
    border-radius: var(--tb-radius);
    background: var(--fimobile-card-color);
    box-shadow: var(--tb-shadow-sm);
    padding: 12px;
    color: inherit;
    position: relative;
}

.service-card.is-selected {
    border-color: var(--fimobile-theme-color);
    box-shadow: 0 0 0 3px var(--fimobile-theme-color-light);
}

.service-card-media {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    overflow: hidden;
    flex-shrink: 0;
}

.service-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-card-body {
    flex: 1;
    min-width: 0;
}

.service-card-title {
    display: block;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 6px;
}

.service-check {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--fimobile-theme-bordercolor);
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    flex-shrink: 0;
}

.service-card.is-selected .service-check {
    background: var(--fimobile-theme-color);
    border-color: var(--fimobile-theme-color);
    color: #fff;
}

.staff-scroller,
.date-scroller {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    padding: 2px 2px 10px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}

.staff-scroller::-webkit-scrollbar,
.date-scroller::-webkit-scrollbar {
    display: none;
}

.staff-chip,
.date-chip,
.slot-chip {
    border: 1px solid transparent;
    background: var(--fimobile-card-color);
    box-shadow: var(--tb-shadow-sm);
    color: inherit;
}

.staff-chip {
    flex: 0 0 92px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    border-radius: 18px;
}

.staff-chip-avatar,
.staff-chip-avatar img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.staff-chip-avatar.any {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--fimobile-theme-color-light);
    color: var(--fimobile-theme-color);
    font-size: 20px;
}

.staff-chip-name {
    font-size: 12px;
    font-weight: 700;
}

.staff-chip-title {
    font-size: 10px;
    color: var(--tb-text-muted);
}

.date-chip {
    flex: 0 0 74px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 8px;
    border-radius: 18px;
}

.date-chip-name,
.date-chip-month {
    font-size: 11px;
    color: var(--tb-text-muted);
}

.date-chip-num {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.3;
}

.staff-chip.is-selected,
.date-chip.is-selected,
.slot-chip.is-selected {
    background: var(--fimobile-theme-color);
    color: #fff;
    border-color: var(--fimobile-theme-color);
}

.staff-chip.is-selected .staff-chip-title,
.date-chip.is-selected .date-chip-name,
.date-chip.is-selected .date-chip-month {
    color: rgba(255, 255, 255, 0.8);
}

.slot-caption {
    font-size: 12px;
    color: var(--tb-text-muted);
    margin-bottom: 10px;
}

.slot-period-scroller {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 2px 12px;
    margin-bottom: 4px;
    -webkit-overflow-scrolling: touch;
}

.slot-period-scroller::-webkit-scrollbar {
    display: none;
}

.slot-period {
    flex: 1 0 96px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 10px 12px;
    border-radius: 16px;
    border: 1px solid transparent;
    background: var(--fimobile-card-color);
    box-shadow: var(--tb-shadow-sm);
    color: inherit;
    text-align: right;
}

.slot-period-title {
    font-size: 13px;
    font-weight: 800;
}

.slot-period-meta {
    font-size: 10px;
    color: var(--tb-text-muted);
    white-space: nowrap;
}

.slot-period.is-selected {
    background: var(--fimobile-theme-color);
    border-color: var(--fimobile-theme-color);
    color: #fff;
}

.slot-period.is-selected .slot-period-meta {
    color: rgba(255, 255, 255, 0.8);
}

.slot-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    /*max-height: 280px;*/
    overflow-y: auto;
    padding-bottom: 4px;
}

@media (min-width: 768px) {
    .slot-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        max-height: 320px;
    }
}

.slot-chip {
    padding: 10px 6px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 700;
}

.slot-chip-time {
    display: block;
    direction: ltr;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

.empty-state-sm {
    padding: 24px 16px;
}

.booking-bar {
    position: fixed;
    right: 12px;
    left: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 15;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 20px;
    background: var(--fimobile-card-color);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
}

.booking-bar-copy {
    flex: 1;
    min-width: 0;
}

.booking-bar-title,
.booking-bar-meta {
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.booking-bar-title {
    font-size: 13px;
    font-weight: 800;
}

.booking-bar-meta {
    font-size: 11px;
    color: var(--tb-text-muted);
}

.booking-bar .btn {
    flex-shrink: 0;
    min-width: 108px;
}

.booking-sheet {
    position: fixed;
    inset: 0;
    z-index: 30;
}

.booking-sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}

.booking-sheet-panel {
    position: absolute;
    right: 0;
    left: 0;
    bottom: 0;
    background: var(--fimobile-card-color);
    border-radius: 28px 28px 0 0;
    padding: 12px 20px calc(20px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -12px 40px rgba(15, 23, 42, 0.18);
}

.booking-sheet-handle {
    width: 48px;
    height: 5px;
    border-radius: 99px;
    background: var(--fimobile-theme-bordercolor);
    margin: 4px auto 16px;
}

.booking-sheet-panel h5 {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 12px;
}

.auth-sheet-lead {
    color: var(--tb-text-muted);
    font-size: 13px;
    line-height: 1.8;
    margin-bottom: 16px;
}

.success-mark {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin: 8px auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 185, 129, 0.16);
    color: #059669;
    font-size: 32px;
}

body.sheet-open {
    overflow: hidden;
}

.dark-mode .service-card,
.dark-mode .staff-chip,
.dark-mode .date-chip,
.dark-mode .slot-chip,
.dark-mode .slot-period,
.dark-mode .booking-bar,
.dark-mode .booking-sheet-panel {
    background: rgba(255, 255, 255, 0.06);
}

.package-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

@media (min-width: 768px) {
    .package-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

.package-card {
    position: relative;
    padding: 22px 18px 18px;
    border-radius: var(--tb-radius);
    background: var(--fimobile-card-color);
    box-shadow: var(--tb-shadow-sm);
    border: 1px solid transparent;
}

.package-card.is-recommended {
    border-color: var(--fimobile-theme-color);
    box-shadow: var(--tb-shadow);
}

.package-card.is-current {
    border-color: #059669;
}

.package-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--fimobile-theme-color);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 999px;
    padding: 4px 10px;
}

.package-badge.is-free {
    background: #059669;
}

.package-card h5 {
    font-size: 16px;
    font-weight: 800;
    margin: 0 0 4px;
}

.package-duration {
    margin: 0 0 8px;
    font-size: 12px;
    color: var(--tb-text-muted);
}

.package-price {
    margin: 0 0 10px;
    font-size: 20px;
    font-weight: 800;
    color: var(--fimobile-theme-color);
}

.package-price-block {
    margin: 0 0 10px;
}

.package-price-block .package-price {
    margin: 0;
}

.package-price-old {
    margin: 0 0 2px;
    font-size: 13px;
    color: var(--tb-text-muted);
    text-decoration: line-through;
}

.package-discount {
    display: inline-block;
    background: #dc2626;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    border-radius: 999px;
    padding: 3px 8px;
    margin-bottom: 6px;
}

.package-sms-quota {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 700;
    color: #059669;
}

.package-sms-quota i {
    margin-left: 4px;
}

.package-grid-sms {
    grid-template-columns: 1fr 1fr;
}

.package-validity {
    margin: 0 0 8px;
    font-size: 11px;
    color: var(--tb-text-muted);
}

.package-validity i {
    margin-left: 4px;
}

.sms-expiry-notice {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    padding: 10px 12px;
    border-radius: var(--tb-radius);
    background: rgba(217, 119, 6, 0.08);
    border: 1px solid rgba(217, 119, 6, 0.25);
    color: var(--tb-text);
    font-size: 12px;
    line-height: 1.9;
}

.sms-expiry-notice i {
    color: #d97706;
    margin-top: 2px;
}

.sms-credit-list {
    list-style: none;
    padding: 0;
    margin: 0;
    border-radius: var(--tb-radius);
    background: var(--fimobile-card-color);
    box-shadow: var(--tb-shadow-sm);
    overflow: hidden;
}

.sms-credit-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
}

.sms-credit-item + .sms-credit-item {
    border-top: 1px solid var(--tb-border);
}

.sms-credit-title,
.sms-credit-expiry {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sms-credit-title strong {
    font-size: 13px;
}

.sms-credit-title small,
.sms-credit-expiry small {
    font-size: 11px;
    color: var(--tb-text-muted);
}

.sms-credit-expiry {
    align-items: flex-end;
    text-align: left;
    flex-shrink: 0;
}

.sms-credit-expiry em {
    font-style: normal;
    font-size: 12px;
    font-weight: 700;
}

.sms-credit-item.is-expiring .sms-credit-expiry em,
.sms-credit-item.is-expiring .sms-credit-expiry small:last-child {
    color: #d97706;
}

.dark-mode .sms-credit-list {
    background: rgba(255, 255, 255, 0.06);
}

.dark-mode .sms-expiry-notice {
    background: rgba(217, 119, 6, 0.14);
}

.section-hint {
    margin: -8px 0 0;
    font-size: 12px;
    color: var(--tb-text-muted);
    line-height: 1.8;
}

#sms-packages {
    scroll-margin-top: 88px;
}

.package-desc {
    margin: 0 0 16px;
    font-size: 12px;
    color: var(--tb-text-muted);
    line-height: 1.8;
}

.setup-banner.account-status-active {
    background: linear-gradient(135deg, #e8f8f1, #fff);
    border: 1px solid rgba(16, 185, 129, 0.28);
}

.dark-mode .setup-banner.account-status-active {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.28);
}

/* ==========================================================================
   Combined company status card (subscription + SMS balance)
   Replaces the separate .account-status-card and .sms-status-card, which always
   appeared stacked as a pair.
   ========================================================================== */

.company-status-card {
    display: block;
    border-radius: var(--tb-radius);
    background: var(--fimobile-card-color);
    box-shadow: var(--tb-shadow-sm);
    border: 1px solid transparent;
    /* The plan row carries a tinted gradient that must be clipped to the radius. */
    overflow: hidden;
}

/* --- Subscription row --- */

.company-status-plan {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow var(--tb-duration) var(--tb-ease);
}

.company-status-plan:hover,
.company-status-plan:focus {
    color: inherit;
}

.company-status-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    background: var(--fimobile-theme-color-light);
    color: var(--fimobile-theme-color);
}

.company-status-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.company-status-copy strong {
    font-size: 14px;
    font-weight: 800;
}

.company-status-copy span {
    font-size: 12px;
    color: var(--tb-text-muted);
    line-height: 1.7;
}

.company-status-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}

.company-status-days {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    padding: 4px 8px;
    border-radius: var(--tb-radius-pill);
    background: var(--fimobile-theme-color-light);
    color: var(--fimobile-theme-color);
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.company-status-go {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 11px;
    font-weight: 700;
    color: var(--fimobile-theme-color);
    white-space: nowrap;
}

/* --- Plan states --- */

.company-status-card.is-active {
    border-color: rgba(16, 185, 129, 0.28);
}

.company-status-card.is-active .company-status-plan {
    background: linear-gradient(135deg, #e8f8f1, transparent 70%);
}

.company-status-card.is-active .company-status-icon {
    background: rgba(16, 185, 129, 0.16);
    color: #059669;
}

.company-status-card.is-active .company-status-days,
.company-status-card.is-active .company-status-go {
    color: #059669;
}

.company-status-card.is-active .company-status-days {
    background: rgba(16, 185, 129, 0.14);
}

.company-status-card.is-expiring,
.company-status-card.is-empty,
.company-status-card.is-expired {
    border-color: rgba(245, 158, 11, 0.4);
}

.company-status-card.is-expiring .company-status-plan,
.company-status-card.is-empty .company-status-plan,
.company-status-card.is-expired .company-status-plan {
    background: linear-gradient(135deg, #fff7e6, transparent 70%);
}

.company-status-card.is-expiring .company-status-icon,
.company-status-card.is-empty .company-status-icon,
.company-status-card.is-expired .company-status-icon {
    background: rgba(245, 158, 11, 0.22);
    color: #d97706;
}

.company-status-card.is-expiring .company-status-days,
.company-status-card.is-expiring .company-status-go,
.company-status-card.is-empty .company-status-go,
.company-status-card.is-expired .company-status-go {
    color: #d97706;
}

.company-status-card.is-expiring .company-status-days {
    background: rgba(245, 158, 11, 0.22);
}

/* --- SMS strip --- */

.company-status-sms {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    text-decoration: none;
    color: inherit;
    /* Sunken tone plus a hairline separates it from the plan row without a second card. */
    background: var(--tb-surface-sunken);
    border-top: 1px solid var(--tb-border);
    transition: box-shadow var(--tb-duration) var(--tb-ease);
}

.company-status-sms:hover,
.company-status-sms:focus {
    color: inherit;
}

.company-status-sms-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.company-status-sms-label i {
    font-size: 14px;
    color: var(--tb-text-muted);
}

.company-status-metrics {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    /* Sits between the label and the call to action. */
    justify-content: center;
}

.company-status-metric {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    white-space: nowrap;
}

.company-status-metric em {
    font-style: normal;
    font-size: 13px;
    font-weight: 800;
    color: var(--fimobile-theme-color);
    line-height: 1.2;
}

.company-status-metric small {
    font-size: 10px;
    color: var(--tb-text-muted);
}

.company-status-metric.is-muted em {
    color: var(--tb-text-muted);
    font-weight: 700;
}

.company-status-sms.is-low,
.company-status-sms.is-empty {
    background: rgba(245, 158, 11, 0.12);
    border-top-color: rgba(245, 158, 11, 0.28);
}

.company-status-sms.is-low .company-status-sms-label i,
.company-status-sms.is-empty .company-status-sms-label i,
.company-status-sms.is-low .company-status-metric em,
.company-status-sms.is-empty .company-status-metric em,
.company-status-sms.is-low .company-status-go,
.company-status-sms.is-empty .company-status-go {
    color: #d97706;
}

.company-status-sms.is-low .company-status-metric.is-muted em,
.company-status-sms.is-empty .company-status-metric.is-muted em {
    color: var(--tb-text-muted);
}

/* --- Dark mode --- */

.dark-mode .company-status-card.is-active {
    border-color: rgba(16, 185, 129, 0.28);
}

.dark-mode .company-status-card.is-active .company-status-plan {
    background: rgba(16, 185, 129, 0.12);
}

.dark-mode .company-status-card.is-expiring,
.dark-mode .company-status-card.is-empty,
.dark-mode .company-status-card.is-expired {
    border-color: rgba(245, 158, 11, 0.25);
}

.dark-mode .company-status-card.is-expiring .company-status-plan,
.dark-mode .company-status-card.is-empty .company-status-plan,
.dark-mode .company-status-card.is-expired .company-status-plan {
    background: rgba(245, 158, 11, 0.12);
}

/* The card itself is a translucent white overlay in dark mode, so the strip has to darken
   rather than lighten to still read as sunken. */
.dark-mode .company-status-sms {
    background: rgba(0, 0, 0, 0.22);
}

.dark-mode .company-status-sms.is-low,
.dark-mode .company-status-sms.is-empty {
    background: rgba(245, 158, 11, 0.1);
}

/* Hover tint as an inset shadow rather than a background: the state rules above set the
   background shorthand at a higher specificity, so a background-color hover would never win. */
@media (hover: hover) and (pointer: fine) {
    .company-status-plan:hover,
    .company-status-sms:hover {
        box-shadow: inset 0 0 0 999px rgba(15, 23, 42, 0.035);
    }

    .dark-mode .company-status-plan:hover,
    .dark-mode .company-status-sms:hover {
        box-shadow: inset 0 0 0 999px rgba(255, 255, 255, 0.06);
    }
}

/* Narrow phones: let the SMS strip wrap instead of squeezing the metrics. */
@media (max-width: 400px) {
    .company-status-sms {
        flex-wrap: wrap;
        row-gap: 6px;
    }

    .company-status-metrics {
        order: 3;
        width: 100%;
        justify-content: flex-start;
        gap: 12px;
    }

    .company-status-go {
        margin-inline-start: auto;
    }
}


.footer .nav .nav-item.centerbutton .nav-link .nav-menu-popover {
    flex-wrap: wrap;
    width: 300px;
    gap: 8px;
    justify-content: center;
}

.seo-landing {
    padding-bottom: calc(90px + env(safe-area-inset-bottom, 0px));
}

.seo-landing .section-heading {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.6;
}

@media (min-width: 768px) {
    .feature-grid-wide {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

.step-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

@media (min-width: 768px) {
    .step-list {
        grid-template-columns: 1fr 1fr;
    }
}

.step-card {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 16px;
    border-radius: var(--tb-radius);
    background: var(--fimobile-card-color);
    box-shadow: var(--tb-shadow-sm);
}

.step-num {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 800;
    background: var(--fimobile-theme-color-light);
    color: var(--fimobile-theme-color);
}

.step-card h3 {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 700;
}

.step-card p {
    margin: 0;
    font-size: 13px;
    color: var(--tb-text-muted);
    line-height: 1.8;
}

.audience-card {
    padding: 18px 16px;
    border-radius: var(--tb-radius);
    background: var(--fimobile-card-color);
    box-shadow: var(--tb-shadow-sm);
}

.audience-card > p {
    margin: 0 0 12px;
    font-size: 14px;
    color: var(--tb-text-muted);
    line-height: 1.9;
}

.audience-chips {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
}

.audience-chips li {
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: var(--fimobile-theme-color-light);
    color: var(--fimobile-theme-color);
}

.landing-trial .landing-trial-title {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 800;
}

.landing-trial p {
    margin: 0 0 16px;
    font-size: 14px;
    color: var(--tb-text-muted);
    line-height: 1.9;
}

.seo-article {
    padding: 20px 16px;
    border-radius: var(--tb-radius);
    background: var(--fimobile-card-color);
    box-shadow: var(--tb-shadow-sm);
}

.seo-article h2 {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.6;
}

.seo-article h3 {
    margin: 16px 0 6px;
    font-size: 14px;
    font-weight: 700;
}

.seo-article p {
    margin: 0 0 8px;
    font-size: 14px;
    color: var(--tb-text-muted);
    line-height: 2;
}

.seo-article p:last-child {
    margin-bottom: 0;
}

.faq-list {
    display: grid;
    gap: 10px;
}

.faq-item {
    border-radius: var(--tb-radius);
    background: var(--fimobile-card-color);
    box-shadow: var(--tb-shadow-sm);
    padding: 4px 16px 4px;
}

.faq-item summary {
    cursor: pointer;
    list-style: none;
    padding: 12px 0;
    font-size: 14px;
    font-weight: 700;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary:after {
    content: "+";
    float: left;
    font-weight: 700;
    color: var(--fimobile-theme-color);
}

.faq-item[open] summary:after {
    content: "–";
}

.faq-item p {
    margin: 0 0 14px;
    font-size: 14px;
    color: var(--tb-text-muted);
    line-height: 1.9;
}

.landing-slider {
    margin-top: 0;
}

.landing-swiper {
    position: relative;
    overflow: hidden;
    border-radius: var(--tb-radius);
    box-shadow: var(--tb-shadow);
}

.landing-swiper .swiper-slide {
    position: relative;
    height: 210px;
}

.landing-swiper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.landing-slide-caption {
    position: absolute;
    right: 0;
    left: 0;
    bottom: 0;
    z-index: 1;
    padding: 40px 16px 36px;
    background: linear-gradient(180deg, transparent 0%, rgba(37, 99, 235, 0.9) 100%);
    color: #fff;
    pointer-events: none;
}

.landing-slide-caption h2,
.landing-slide-caption .landing-slide-title {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.5;
}

.landing-slide-caption p {
    margin: 0;
    font-size: 12px;
    line-height: 1.7;
    opacity: 0.92;
}

.landing-swiper-pagination {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 10px !important;
    width: 100%;
    z-index: 2;
}

.landing-swiper-pagination .swiper-pagination-bullet {
    background: #fff;
    opacity: 0.45;
}

.landing-swiper-pagination .swiper-pagination-bullet-active {
    opacity: 1;
    background: #fff;
}

@media (min-width: 768px) {
    .landing-swiper .swiper-slide {
        height: 300px;
    }

    .landing-slide-caption {
        padding: 56px 22px 40px;
    }

    .landing-slide-caption h2,
    .landing-slide-caption .landing-slide-title {
        font-size: 20px;
    }

    .landing-slide-caption p {
        font-size: 14px;
    }
}

.landing-bottom-cta {
    text-align: center;
    padding: 24px 16px;
    border-radius: var(--tb-radius);
    background: var(--fimobile-card-color);
    box-shadow: var(--tb-shadow-sm);
}

.landing-bottom-cta h2 {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 800;
}

.landing-bottom-cta p {
    margin: 0 0 16px;
    font-size: 14px;
    color: var(--tb-text-muted);
    line-height: 1.9;
}

.dark-mode .step-card,
.dark-mode .audience-card,
.dark-mode .seo-article,
.dark-mode .faq-item,
.dark-mode .landing-bottom-cta {
    background: rgba(255, 255, 255, 0.06);
}

.legal-page {
    border: 0;
    border-radius: var(--tb-radius);
    box-shadow: var(--tb-shadow-sm);
}

.legal-page .card-body {
    padding: 24px 20px;
}

.legal-page h1 {
    margin: 0 0 20px;
    font-size: 22px;
    font-weight: 800;
}

.legal-page section {
    margin-bottom: 24px;
}

.legal-page h2 {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 800;
}

.legal-page p {
    margin: 0 0 12px;
    font-size: 14.5px;
    line-height: 2.05;
    color: var(--tb-text-muted);
}

.legal-page p:last-child {
    margin-bottom: 0;
}

.legal-page a {
    font-weight: 700;
}

.legal-signoff {
    margin-top: 8px;
    font-size: 14px;
    font-weight: 700;
    color: inherit;
}

.dark-mode .legal-page {
    background: rgba(255, 255, 255, 0.06);
}

.contact-card.instagram .action-icon {
    background: rgba(225, 48, 108, 0.12);
    color: #e1306c;
}

.contact-card.whatsapp .action-icon {
    background: rgba(37, 211, 102, 0.12);
    color: #25d366;
}

.contact-card.phone .action-icon {
    background: var(--fimobile-theme-color-light);
    color: var(--fimobile-theme-color);
}

.pwa-install-toast {
    z-index: 1090;
    bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    width: min(92vw, 420px);
    display: none;
}

.pwa-install-toast.is-visible {
    display: block;
}

.schedule-host {
    position: relative;
    min-width: 0;
    max-width: 100%;
    min-height: 160px;
    margin-bottom: 8px;
}

.schedule-host.is-loading::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: var(--tb-radius);
    background: rgba(255, 255, 255, 0.45);
}

.schedule-host-loading {
    display: flex;
    justify-content: center;
    padding: 36px 0;
}

.schedule-calendar {
    margin-bottom: 4px;
    min-width: 0;
    max-width: 100%;
}

.schedule-date-scroller {
    margin-bottom: 4px;
}

.schedule-date-chip {
    position: relative;
    flex: 0 0 64px;
    padding: 8px 6px 10px;
}

.schedule-date-chip .date-chip-name {
    white-space: nowrap;
    font-size: 10px;
}

.schedule-date-chip .date-chip-num {
    font-size: 18px;
    line-height: 1.2;
}

.schedule-date-chip .date-chip-month {
    font-size: 10px;
}

.schedule-date-chip.is-empty:not(.is-selected) {
    opacity: 0.78;
}

.schedule-date-chip.has-pending::after {
    content: "";
    position: absolute;
    top: 6px;
    left: 6px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #f59e0b;
}

.schedule-date-chip.is-selected.has-pending::after {
    background: #ffe08a;
}

.schedule-date-count {
    min-width: 18px;
    height: 16px;
    margin-top: 2px;
    padding: 0 5px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    background: var(--fimobile-theme-color-light);
    color: var(--fimobile-theme-color);
}

.schedule-date-count.is-empty {
    min-width: 8px;
    height: 3px;
    padding: 0;
    background: rgba(108, 117, 125, 0.28);
}

.schedule-date-chip.is-selected .schedule-date-count {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

.schedule-date-chip.is-selected .schedule-date-count.is-empty {
    background: rgba(255, 255, 255, 0.35);
}

.schedule-date-chip.is-today:not(.is-selected) {
    border-color: var(--fimobile-theme-color);
}

.schedule-day-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 4px 0 10px;
}

.schedule-day-title {
    margin: 0;
    font-size: 14px;
    font-weight: 800;
}

.schedule-day-summary {
    margin: 2px 0 0;
    font-size: 11px;
    color: var(--tb-text-muted);
}

.schedule-day-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.schedule-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    background: var(--fimobile-theme-color-light);
    color: var(--fimobile-theme-color);
}

.schedule-pill.is-pending {
    background: rgba(245, 158, 11, 0.2);
    color: #d97706;
}

.schedule-pill.is-confirmed {
    background: rgba(16, 185, 129, 0.16);
    color: #059669;
}

.schedule-day-body {
    margin-bottom: 16px;
}

.schedule-day-body .empty-state-sm {
    margin: 0;
    padding: 20px 14px;
}

.schedule-timeline {
    position: relative;
    max-height: min(42vh, 360px);
    overflow-y: auto;
    padding: 2px 0 4px 2px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.schedule-timeline-inner {
    position: relative;
}

.schedule-timeline-inner::before {
    content: "";
    position: absolute;
    top: 6px;
    bottom: 6px;
    right: 42px;
    width: 2px;
    background: var(--fimobile-theme-bordercolor);
}

.schedule-slot {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
    align-items: stretch;
    margin-bottom: 6px;
}

.schedule-slot.is-clickable {
    cursor: pointer;
}

.schedule-slot.is-clickable:active .schedule-slot-card {
    transform: scale(0.995);
}

.schedule-slot.is-past {
    opacity: 0.68;
}

.schedule-slot-time {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px 0;
}

.schedule-slot-start {
    font-size: 12px;
    font-weight: 800;
    line-height: 1.1;
    direction: ltr;
    color: var(--fimobile-theme-color);
}

.schedule-slot-end {
    margin-top: 2px;
    font-size: 10px;
    font-weight: 600;
    direction: ltr;
    color: var(--tb-text-muted);
}

.schedule-slot-time::after {
    content: "";
    position: absolute;
    top: 50%;
    left: -8px;
    width: 8px;
    height: 8px;
    margin-top: -4px;
    border-radius: 50%;
    background: var(--fimobile-card-color);
    border: 2px solid rgba(108, 117, 125, 0.45);
    box-shadow: 0 0 0 3px var(--fimobile-page-bg-1);
}

.schedule-slot.is-pending .schedule-slot-time::after {
    border-color: #f59e0b;
}

.schedule-slot.is-on .schedule-slot-time::after {
    border-color: #10b981;
}

.schedule-slot-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 52px;
    overflow: hidden;
    padding: 8px 10px 8px 12px;
    border-radius: 14px;
    background: var(--fimobile-card-color);
    box-shadow: var(--tb-shadow-sm);
}

.schedule-slot-card::before {
    content: "";
    position: absolute;
    top: 8px;
    bottom: 8px;
    right: 0;
    width: 3px;
    border-radius: 3px;
    background: rgba(108, 117, 125, 0.35);
}

.schedule-slot.is-pending .schedule-slot-card::before {
    background: #f59e0b;
}

.schedule-slot.is-on .schedule-slot-card::before {
    background: #10b981;
}

.schedule-slot.is-pending .schedule-slot-card {
    background: linear-gradient(270deg, rgba(245, 158, 11, 0.1), var(--fimobile-card-color) 48%);
}

.schedule-slot-main {
    flex: 1;
    min-width: 0;
}

.schedule-slot-name {
    display: block;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.3;
}

.schedule-slot-services {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    line-height: 1.4;
    color: var(--tb-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.schedule-slot-card .status-badge {
    flex-shrink: 0;
}

.schedule-now {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    margin: 0 0 6px;
}

.schedule-now span {
    grid-column: 2;
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #e11d48;
    font-size: 10px;
    font-weight: 800;
}

.schedule-now span::before {
    content: "";
    flex: 1;
    height: 2px;
    background: #f43f5e;
    border-radius: 2px;
    opacity: 0.7;
}

.dark-mode .schedule-host.is-loading::after {
    background: rgba(0, 0, 0, 0.28);
}

.dark-mode .schedule-slot-card,
.dark-mode .schedule-date-count {
    background: rgba(255, 255, 255, 0.06);
}

.dark-mode .schedule-slot.is-pending .schedule-slot-card {
    background: linear-gradient(270deg, rgba(245, 158, 11, 0.12), rgba(255, 255, 255, 0.06) 48%);
}

.dark-mode .schedule-date-chip.is-selected .schedule-date-count {
    background: rgba(255, 255, 255, 0.22);
}

.dark-mode .schedule-slot-time::after {
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 3px var(--fimobile-page-bg-1);
}

.map-view {
    position: relative;
}

.map-view #map {
    width: 100%;
    height: 400px;
    background: #eee;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    direction: ltr;
}

.map-my-location {
    position: absolute;
    bottom: 16px;
    right: 16px;
    z-index: 999999;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    touch-action: manipulation;
}

.map-center-pin {
    background: transparent;
    border: none;
}

.map-center-pin i {
    font-size: 32px;
    color: #f43f5e;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.page-nearby-map {
    overflow: hidden;
}

.page-nearby-map .nearby-map-main {
    padding: 0 !important;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
}

.nearby-map-stage {
    position: fixed;
    top: calc(72px + env(safe-area-inset-top, 0px));
    right: 0;
    left: 0;
    bottom: calc(70px + env(safe-area-inset-bottom, 0px));
    background: #e8eef5;
}

.nearby-map-stage #nearbyMap {
    width: 100%;
    height: 100%;
    direction: ltr;
}

.nearby-map-filters {
    position: absolute;
    top: 12px;
    right: 12px;
    left: 12px;
    z-index: 500;
    min-width: 0;
}

.nearby-map-chips {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    margin: 0;
    padding: 4px 2px 2px;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}

.nearby-map-chips .filter-chip {
    flex: 0 0 auto;
    white-space: nowrap;
    backdrop-filter: blur(10px);
}

.nearby-map-stage .map-my-location {
    bottom: 16px;
    z-index: 500;
}

.nearby-map-stage.has-popup .map-my-location {
    bottom: 168px;
}

.nearby-map-status {
    position: absolute;
    top: 62px;
    right: 16px;
    left: 16px;
    z-index: 500;
    text-align: center;
    background: rgba(255, 255, 255, 0.94);
    color: var(--tb-text, #0f172a);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.nearby-map-status.is-error {
    color: #e11d48;
}

.nearby-map-status.is-action {
    cursor: pointer;
}

.nearby-user-pin {
    background: transparent;
    border: none;
}

.nearby-user-pin span {
    display: block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #2563eb;
    border: 3px solid #fff;
    box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.22);
}

.leaflet-div-icon.nearby-company-marker {
    background: transparent;
    border: none;
}

.nearby-company-marker-bubble {
    display: block;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: #fff;
    border: 3px solid #fff;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.28), 0 0 0 2px #2563eb;
}

.nearby-company-marker-bubble img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.nearby-company-marker-caret {
    display: block;
    width: 0;
    height: 0;
    margin: -1px auto 0;
    border: 8px solid transparent;
    border-top-color: #2563eb;
}

.nearby-company-marker.is-active {
    z-index: 700 !important;
}

.nearby-company-marker.is-active .nearby-company-marker-bubble {
    transform: scale(1.12);
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.35), 0 0 0 3px #2563eb;
}

.nearby-map-popup {
    position: absolute;
    right: 12px;
    left: 12px;
    bottom: 16px;
    z-index: 600;
    background: var(--fimobile-card-color, #fff);
    border-radius: 22px;
    padding: 16px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.2);
}

.nearby-map-popup-close {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: var(--fimobile-theme-color-light, #eef4ff);
    color: var(--tb-text-muted, #64748b);
}

.nearby-map-popup-body {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding-left: 28px;
}

.nearby-map-popup-body img {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    object-fit: cover;
    flex-shrink: 0;
    background: #eee;
}

.nearby-map-popup-copy {
    min-width: 0;
}

.nearby-map-popup-copy strong {
    display: block;
    font-size: 15px;
    margin-bottom: 2px;
}

.nearby-map-popup-copy span,
.nearby-map-popup-copy p {
    display: block;
    font-size: 12px;
    color: var(--tb-text-muted, #64748b);
    margin: 0;
}

.nearby-map-popup-copy p {
    margin-top: 4px;
    line-height: 1.6;
}

.dark-mode .nearby-map-status,
.dark-mode .nearby-map-popup {
    background: rgba(20, 24, 36, 0.94);
}

.dark-mode .nearby-map-popup-close {
    background: rgba(255, 255, 255, 0.08);
}

.leaflet-top .leaflet-control {
    margin-top: 110px !important;
}
.leaflet-container .leaflet-control-attribution{
    display:none;
}
.main-container{
    padding-bottom:25px;
}

.card-transfer-intro p {
    margin: 0;
    font-size: 14px;
    line-height: 1.9;
    color: var(--tb-text-muted);
}

.bank-card {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    padding: 22px 20px 20px;
    color: #fff;
    background:
        radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.16), transparent 32%),
        linear-gradient(135deg, #1e3a8a 0%, #2563eb 52%, #1d4ed8 100%);
    box-shadow: 0 18px 40px rgba(37, 99, 235, 0.28);
}

.bank-card:before {
    content: "";
    position: absolute;
    inset: auto -40px -70px auto;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.bank-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    position: relative;
    z-index: 1;
}

.bank-card-brand {
    font-size: 13px;
    font-weight: 700;
    opacity: 0.92;
}

.bank-card-chip {
    width: 42px;
    height: 30px;
    border-radius: 7px;
    background: linear-gradient(135deg, #f5d76e, #c9a227 55%, #e8c547);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.bank-card-number-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
    position: relative;
    z-index: 1;
}

.bank-card-number {
    margin: 0;
    flex: 1;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-align: left;
}

.bank-card-copy {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    flex-shrink: 0;
    cursor: pointer;
}

.bank-card-copy:active {
    transform: scale(0.96);
}

.bank-card-copy:hover {
    background: rgba(255, 255, 255, 0.26);
}

.bank-card-meta {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.bank-card-meta span {
    display: block;
    font-size: 11px;
    opacity: 0.78;
    margin-bottom: 4px;
}

.bank-card-meta strong {
    display: block;
    font-size: 14px;
    font-weight: 800;
}

.card-transfer-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.card-transfer-steps li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 16px;
    border-radius: var(--tb-radius);
    background: var(--fimobile-card-color);
    box-shadow: var(--tb-shadow-sm);
}

.card-transfer-step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--fimobile-theme-color-light);
    color: var(--fimobile-theme-color);
    font-size: 13px;
    font-weight: 800;
}

.card-transfer-steps strong {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
}

.card-transfer-steps p {
    margin: 0;
    font-size: 13px;
    line-height: 1.8;
    color: var(--tb-text-muted);
}

.dark-mode .card-transfer-steps li {
    background: rgba(255, 255, 255, 0.06);
}

@media (max-width: 420px) {
    .bank-card-number {
        font-size: 16px;
        letter-spacing: 0.04em;
    }
}

/* Payment verify / result */
.payment-result {
    margin: 12px auto 24px;
    max-width: 520px;
    padding: 28px 22px 24px;
    border-radius: var(--tb-radius);
    background: var(--fimobile-card-color);
    box-shadow: var(--tb-shadow);
    text-align: center;
    border: 1px solid transparent;
}

.payment-result.is-success {
    border-color: rgba(5, 150, 105, 0.22);
}

.payment-result.is-error {
    border-color: rgba(225, 29, 72, 0.2);
}

.payment-result-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
}

.payment-result.is-success .payment-result-icon {
    background: rgba(5, 150, 105, 0.14);
    color: var(--tb-success);
}

.payment-result.is-error .payment-result-icon {
    background: rgba(225, 29, 72, 0.12);
    color: var(--tb-danger);
}

.payment-result-title {
    font-size: 20px;
    font-weight: 800;
    margin: 0 0 10px;
}

.payment-result.is-success .payment-result-title {
    color: var(--tb-success);
}

.payment-result.is-error .payment-result-title {
    color: var(--tb-danger);
}

.payment-result-message {
    margin: 0 0 20px;
    font-size: 14px;
    line-height: 1.9;
    color: var(--tb-text-muted);
}

.payment-result-meta {
    margin: 0 0 22px;
    padding: 14px 16px;
    border-radius: var(--tb-radius-sm);
    background: rgba(15, 23, 42, 0.04);
    text-align: right;
}

.payment-result-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.payment-result-meta-row + .payment-result-meta-row {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.payment-result-meta dt {
    margin: 0;
    font-size: 12px;
    color: var(--tb-text-muted);
    font-weight: 600;
}

.payment-result-meta dd {
    margin: 0;
    font-size: 14px;
    font-weight: 800;
    color: var(--tb-text);
    letter-spacing: 0.02em;
}

.payment-result-actions {
    display: grid;
    gap: 10px;
}

.payment-result-hint {
    margin: 18px 0 0;
    font-size: 12px;
    line-height: 1.8;
    color: var(--tb-text-muted);
}

.dark-mode .payment-result {
    background: rgba(255, 255, 255, 0.06);
}

.dark-mode .payment-result-meta {
    background: rgba(255, 255, 255, 0.06);
}

.dark-mode .payment-result-meta-row + .payment-result-meta-row {
    border-top-color: rgba(255, 255, 255, 0.08);
}

.setup-check-card {
    padding: 18px 16px 16px;
    border-radius: var(--tb-radius);
    background: var(--fimobile-card-color);
    box-shadow: var(--tb-shadow-sm);
}

.setup-check-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.setup-check-head h6 {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 800;
}

.setup-check-head p {
    margin: 0;
    font-size: 13px;
    line-height: 1.8;
    color: var(--tb-text-muted);
}

.setup-check-count {
    flex-shrink: 0;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    color: var(--fimobile-theme-color);
    background: var(--fimobile-theme-color-light);
}

.setup-check-progress {
    height: 8px;
    border-radius: 99px;
    overflow: hidden;
    background: rgba(37, 99, 235, 0.12);
    margin-bottom: 14px;
}

.setup-check-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--fimobile-theme-color);
}

.setup-check-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.setup-check-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    background: rgba(15, 23, 42, 0.03);
}

.setup-check-item:hover {
    background: rgba(37, 99, 235, 0.08);
    color: inherit;
}

.setup-check-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
    background: var(--fimobile-theme-color-light);
    color: var(--fimobile-theme-color);
}

.setup-check-list .is-done .setup-check-icon {
    background: rgba(5, 150, 105, 0.14);
    color: var(--tb-success);
}

.setup-check-copy {
    flex: 1;
    min-width: 0;
}

.setup-check-copy strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 2px;
}

.setup-check-copy strong em {
    margin-right: 6px;
    font-style: normal;
    font-size: 11px;
    font-weight: 700;
    color: var(--tb-text-muted);
}

.setup-check-copy span {
    display: block;
    font-size: 12px;
    line-height: 1.7;
    color: var(--tb-text-muted);
}

.setup-check-go {
    margin-top: 10px;
    color: var(--tb-text-muted);
    font-size: 14px;
}

.setup-check-list .is-done .setup-check-copy strong,
.setup-check-list .is-done .setup-check-copy span {
    color: var(--tb-text-muted);
}

.setup-check-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 14px;
}

.setup-guide-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 45;
    background: rgba(15, 23, 42, 0.45);
    align-items: flex-end;
    justify-content: center;
}

.setup-guide-overlay.is-open {
    display: flex !important;
}

.setup-guide-panel {
    width: 100%;
    max-height: min(92vh, 760px);
    display: flex;
    flex-direction: column;
    background: var(--fimobile-card-color);
    border-radius: 28px 28px 0 0;
    box-shadow: 0 -12px 40px rgba(15, 23, 42, 0.18);
}

.setup-guide-handle {
    display: block;
    width: 48px;
    height: 5px;
    margin: 10px auto 0;
    border-radius: 99px;
    background: var(--fimobile-theme-bordercolor);
}

.setup-guide-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 4px 8px 0;
}

.setup-guide-bar h5 {
    margin: 0;
    flex: 1;
    text-align: center;
    font-size: 15px;
    font-weight: 800;
}

.setup-guide-skip {
    color: var(--tb-text-muted);
    text-decoration: none;
    font-weight: 700;
}

.setup-guide-close {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--tb-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.setup-guide-body {
    min-height: 0;
    overflow-y: auto;
    padding: 8px 20px 4px;
}

.setup-guide-slide {
    display: none;
    text-align: center;
    padding: 8px 0 12px;
}

.setup-guide-slide.is-active {
    display: block;
}

.setup-guide-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: var(--fimobile-theme-color);
    background: var(--fimobile-theme-color-light);
}

.setup-guide-badge.is-done {
    color: var(--tb-success);
    background: rgba(5, 150, 105, 0.14);
}

.setup-guide-badge.is-optional {
    color: var(--tb-text-muted);
    background: rgba(15, 23, 42, 0.06);
}

.setup-guide-icon {
    width: 64px;
    height: 64px;
    margin: 16px auto 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--fimobile-theme-color);
    background: var(--fimobile-theme-color-light);
}

.setup-guide-slide h6 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 800;
}

.setup-guide-slide p {
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.9;
    color: var(--tb-text-muted);
}

.setup-guide-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 700;
    background: rgba(15, 23, 42, 0.04);
    color: var(--tb-text);
    text-decoration: none;
}

.setup-guide-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px 0;
}

.setup-guide-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 99px;
    background: rgba(37, 99, 235, 0.22);
    cursor: pointer;
}

.setup-guide-dot.is-active {
    width: 18px;
    background: var(--fimobile-theme-color);
}

.setup-guide-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 14px 16px calc(16px + env(safe-area-inset-bottom, 0px));
}

body:has(.setup-guide-overlay.is-open) .footer,
body:has(.setup-guide-overlay.is-open) .fab-btn,
body:has(.setup-guide-overlay.is-open) .back-to-top {
    visibility: hidden;
    pointer-events: none;
}

@media (min-width: 768px) {
    .setup-guide-overlay.is-open {
        align-items: center;
        padding: 24px;
    }

    .setup-guide-panel {
        max-width: 460px;
        border-radius: 24px;
        max-height: min(86vh, 720px);
    }
}

.dark-mode .setup-check-card,
.dark-mode .setup-guide-panel {
    background: rgb(9 13 20);
    color: inherit;
}

.dark-mode .setup-check-item,
.dark-mode .setup-guide-link,
.dark-mode .setup-guide-badge.is-optional {
    background: rgba(255, 255, 255, 0.06);
}

.dark-mode .setup-check-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.header-desktop,
.footer-desktop,
.auth-aside {
    display: none;
}

.landing-trial-btn {
    width: 100%;
}

/* Desktop: website chrome, capped width, no stretched mobile UI */
@media (min-width: 992px) {
    :root {
        --tb-desktop-width: 1120px;
        --tb-header-height: 76px;
    }

    .container,
    .container-sm,
    .container-md,
    .container-lg,
    .container-xl,
    .container-xxl {
        max-width: var(--tb-desktop-width);
    }

    body.tb-site {
        background:
            radial-gradient(1200px 520px at 100% -10%, rgba(37, 99, 235, 0.16), transparent 55%),
            radial-gradient(900px 420px at -10% 110%, rgba(79, 70, 229, 0.12), transparent 50%),
            var(--fimobile-page-bg-1);
    }

    body.tb-site main {
        background: transparent;
    }

    .header {
        padding: 10px 24px;
        line-height: 1.4;
    }

    .header:after {
        border-radius: 0;
        opacity: 1;
        background: rgba(255, 255, 255, 0.92);
        box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
        -webkit-backdrop-filter: blur(16px) saturate(1.3);
        backdrop-filter: blur(16px) saturate(1.3);
    }

    .header.position-fixed:after {
        opacity: 1;
    }

    .header-mobile {
        display: none;
    }

    .header-desktop {
        display: flex;
        align-items: center;
        gap: 20px 28px;
        width: 100%;
        max-width: var(--tb-desktop-width);
        margin: 0 auto;
        min-height: 56px;
    }

    .header-brand {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        color: var(--tb-text);
        text-decoration: none;
        font-weight: 800;
        font-size: 18px;
        letter-spacing: -0.03em;
        flex-shrink: 0;
    }

    .header-brand:hover {
        color: var(--fimobile-theme-color);
    }

    .header-brand img {
        width: 40px;
        height: 40px;
        object-fit: contain;
        border-radius: 12px;
    }

    .header-nav {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 4px;
        min-width: 0;
    }

    .header-nav a {
        padding: 8px 12px;
        border-radius: 999px;
        color: var(--tb-text-muted);
        font-size: 14px;
        font-weight: 700;
        text-decoration: none;
        white-space: nowrap;
    }

    .header-nav a:hover,
    .header-nav a.is-active {
        color: var(--fimobile-theme-color);
        background: var(--fimobile-theme-color-light);
    }

    .header-page-title {
        margin: 0;
        flex: 1;
        min-width: 0;
        font-size: 16px;
        font-weight: 800;
        text-align: center;
    }

    .header-actions {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-inline-start: auto;
        flex-shrink: 0;
    }

    .header-btn {
        min-height: 40px;
        padding: 8px 16px;
        border-radius: 12px;
        font-size: 13px;
    }

    .header-actions .btn-44 {
        width: 40px;
        height: 40px;
    }

    .footer {
        position: relative;
        left: auto;
        bottom: auto;
        width: 100%;
        z-index: 1;
        margin-top: 28px;
        padding: 28px 24px 32px;
        border-radius: 0;
        background: rgba(255, 255, 255, 0.86);
        box-shadow: 0 -1px 0 rgba(15, 23, 42, 0.06);
    }

    .footer::after {
        display: none;
    }

    .footer > .container > .nav {
        display: none;
    }

    .footer-desktop {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px 24px;
        flex-wrap: wrap;
        max-width: var(--tb-desktop-width);
        margin: 0 auto;
        padding: 0;
    }

    .footer-desktop-brand {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        color: var(--tb-text);
        text-decoration: none;
        font-weight: 800;
    }

    .footer-desktop-brand img {
        width: 32px;
        height: 32px;
        object-fit: contain;
        border-radius: 9px;
    }

    .footer-desktop-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 8px 18px;
    }

    .footer-desktop-nav a {
        color: var(--tb-text-muted);
        text-decoration: none;
        font-size: 13px;
        font-weight: 700;
    }

    .footer-desktop-nav a:hover {
        color: var(--fimobile-theme-color);
    }

    .footer-desktop-copy {
        margin: 0;
        width: 100%;
        text-align: center;
        font-size: 12px;
        color: var(--tb-text-muted);
    }

    body:has(.footer) .back-to-top,
    .back-to-top,
    .fab-btn {
        bottom: 28px;
        z-index: 30;
    }

    body:has(.form-sticky-actions:not(.is-modal)) .back-to-top {
        bottom: calc(var(--form-sticky-bar-height, 76px) + 20px);
    }

    body:has(.footer) .form-sticky-actions:not(.is-modal) {
        bottom: 0;
        border-radius: 22px 22px 0 0;
    }

    .main-container {
        padding-bottom: 40px;
    }

    .page-company .main-container {
        padding-bottom: 120px;
    }

    .page-head h5 {
        font-size: 24px;
    }

    .welcome-card .card-body {
        padding: 20px 24px;
    }

    .hero-card {
        position: relative;
        isolation: isolate;
    }

    .hero-card::before {
        content: "";
        position: absolute;
        inset: auto -80px -90px auto;
        width: 240px;
        height: 240px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.12);
        z-index: 0;
    }

    .hero-card .card-body {
        position: relative;
        z-index: 1;
        padding: 40px 36px;
    }

    .hero-card h1 {
        font-size: 34px;
        line-height: 1.35;
        /*max-width: 18ch;*/
    }

    .hero-card p {
        font-size: 15px;
        /*max-width: 46ch;*/
        text-align: right;
    }

    .seo-landing {
        padding-bottom: 12px;
    }

    .page-auth .brand-mark {
        margin-bottom: 18px;
    }

    .hero-actions {
        display: flex;
        grid-template-columns: none;
        justify-content: flex-start;
    }

    .hero-actions .btn {
        width: auto;
        min-width: 168px;
        min-height: 48px;
        padding: 12px 20px;
    }

    .landing-hero-stage {
        display: grid;
        grid-template-columns: 1.05fr 0.95fr;
        gap: 24px;
        align-items: stretch;
        margin-bottom: 28px;
    }

    .landing-hero-stage .hero-card {
        margin-bottom: 0;
        min-height: 0;
    }

    .landing-hero-stage .landing-slider {
        position: relative;
        margin-bottom: 0;
        min-height: 380px;
        height: auto;
        overflow: hidden;
        border-radius: var(--tb-radius);
        box-shadow: var(--tb-shadow);
    }

    .landing-hero-stage .landing-swiper {
        position: absolute;
        inset: 0;
        height: 100% !important;
        min-height: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .landing-hero-stage .landing-swiper .swiper-wrapper,
    .landing-hero-stage .landing-swiper .swiper-slide {
        height: 100% !important;
        min-height: 0;
    }

    .landing-hero-stage .landing-swiper img {
        width: 100%;
        height: 100%;
        max-height: 100%;
        object-fit: cover;
        object-position: center;
    }

    .landing-slide-caption {
        padding: 72px 28px 48px;
    }

    .landing-slide-caption h2,
    .landing-slide-caption .landing-slide-title {
        font-size: 24px;
    }

    .landing-slide-caption p {
        font-size: 15px;
    }

    .seo-landing .stat-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
    }

    .stat-card {
        padding: 22px 16px;
    }

    .stat-card .stat-value {
        font-size: 32px;
    }

    .feature-grid,
    .feature-grid-wide {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
    }

    .feature-card {
        padding: 28px 22px;
        text-align: center;
        transition: transform 0.18s ease, box-shadow 0.18s ease;
    }

    .feature-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--tb-shadow);
    }

    .feature-card i {
        margin-bottom: 14px;
    }

    .step-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .seo-article,
    .legal-page .card-body,
    .landing-bottom-cta,
    .audience-card {
        padding: 28px 28px;
    }

    .faq-list {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .landing-trial .card-body {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding: 28px 32px;
    }

    .landing-trial-btn {
        width: auto;
        min-width: 240px;
    }

    .landing-bottom-cta .hero-actions {
        justify-content: center;
    }

    .company-home-board {
        display: grid;
        grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.85fr);
        gap: 24px;
        align-items: start;
    }

    .company-home-board > .schedule-host {
        grid-column: 1;
        grid-row: 1 / span 6;
        min-width: 0;
        min-height: 520px;
        margin-bottom: 0;
        padding: 18px 18px 8px;
        border-radius: var(--tb-radius);
        background: var(--fimobile-card-color);
        box-shadow: var(--tb-shadow-sm);
        overflow: hidden;
    }

    .company-home-board .schedule-calendar,
    .company-home-board .date-scroller {
        min-width: 0;
        max-width: 100%;
    }

    .date-scroller,
    .staff-scroller,
    .slot-period-scroller {
        scrollbar-width: thin;
        scrollbar-color: rgba(37, 99, 235, 0.35) transparent;
    }

    .staff-scroller::-webkit-scrollbar,
    .date-scroller::-webkit-scrollbar,
    .slot-period-scroller::-webkit-scrollbar {
        display: block;
        height: 6px;
    }

    .staff-scroller::-webkit-scrollbar-thumb,
    .date-scroller::-webkit-scrollbar-thumb,
    .slot-period-scroller::-webkit-scrollbar-thumb {
        background: rgba(37, 99, 235, 0.35);
        border-radius: 99px;
    }

    .company-home-board > .pending-notice,
    .company-home-board > .public-page-card,
    .company-home-board > .company-home-manage {
        grid-column: 2;
        margin-bottom: 0;
        min-width: 0;
        max-width: 100%;
    }

    .company-home-manage .quick-grid.cols-2 {
        grid-template-columns: 1fr;
        margin-bottom: 0 !important;
    }

    .company-home-manage .action-card {
        min-width: 0;
        max-width: 100%;
    }

    .customer-home-board {
        display: grid;
        grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
        gap: 24px;
        align-items: start;
    }

    .contact-list {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
    }

    .contact-list .action-card {
        margin-bottom: 0 !important;
    }

    .schedule-timeline {
        max-height: min(62vh, 560px);
    }

    .company-booking-layout:has(.company-booking-flow) {
        display: grid;
        grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.2fr);
        gap: 28px;
        align-items: start;
    }

    .company-booking-flow {
        min-width: 0;
    }

    .company-booking-intro {
        position: sticky;
        top: 96px;
        min-width: 0;
    }

    .company-hero-body {
        padding: 28px 24px;
    }

    .company-hero-copy h1 {
        font-size: 28px;
    }

    .company-booking-intro .setup-banner .btn {
        width: auto;
        min-width: 180px;
        display: inline-flex;
        margin-left: 8px;
    }

    .service-list {
        grid-template-columns: 1fr;
    }

    .slot-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        max-height: 380px;
    }

    .booking-bar {
        right: auto;
        left: 50%;
        transform: translateX(-50%);
        width: min(var(--tb-desktop-width), calc(100% - 48px));
        padding: 14px 16px;
    }

    .booking-sheet-panel {
        right: 50%;
        left: auto;
        transform: translateX(50%);
        width: min(480px, calc(100% - 48px));
        border-radius: 24px;
        bottom: 24px;
    }

    /* Auth pages: a centered two-panel card instead of a full-bleed 50/50 split */
    .page-auth .header-page-title {
        visibility: hidden;
    }

    .auth-aside {
        display: flex;
        align-items: stretch;
    }

    .page-auth main.auth-screen {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
        min-height: 100dvh;
        padding-bottom: 0;
        padding-left: 0;
        padding-right: 0;
        background:
            radial-gradient(720px 420px at 85% 0%, var(--fimobile-theme-color-light), transparent 70%),
            radial-gradient(560px 360px at 0% 100%, var(--fimobile-theme-color-light), transparent 70%),
            var(--fimobile-page-bg-1);
    }

    .auth-desktop-layout {
        display: grid;
        grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
        align-items: stretch;
        flex: 0 0 auto;
        width: calc(100% - 64px);
        max-width: 1040px;
        min-height: 560px;
        margin: 28px auto 48px;
        border-radius: 28px;
        background: var(--fimobile-card-color);
        overflow: hidden;
        box-shadow: 0 30px 80px rgba(15, 23, 42, 0.12), 0 2px 8px rgba(15, 23, 42, 0.04);
    }

    .auth-aside-inner {
        position: relative;
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 56px 48px;
        width: 100%;
        color: #fff;
        overflow: hidden;
        isolation: isolate;
        background:
            radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.16), transparent 36%),
            linear-gradient(145deg, var(--fimobile-theme-color) 0%, var(--fimobile-theme-color-2) 100%);
    }

    /* Soft decorative rings */
    .auth-aside-inner::before,
    .auth-aside-inner::after {
        content: "";
        position: absolute;
        z-index: -1;
        border-radius: 50%;
        border: 1px solid rgba(255, 255, 255, 0.18);
        pointer-events: none;
    }

    .auth-aside-inner::before {
        width: 360px;
        height: 360px;
        left: -140px;
        bottom: -140px;
        box-shadow: 0 0 0 48px rgba(255, 255, 255, 0.04);
    }

    .auth-aside-inner::after {
        width: 180px;
        height: 180px;
        left: 40px;
        top: -70px;
        background: rgba(255, 255, 255, 0.06);
    }

    .auth-aside-inner img {
        width: 64px;
        height: 64px;
        object-fit: contain;
        margin-bottom: 24px;
        border-radius: 18px;
        padding: 0;
        background: transparent;
        box-shadow: 0 12px 28px rgba(15, 23, 42, 0.22);
    }

    .auth-aside-kicker {
        align-self: flex-start;
        margin: 0 0 14px;
        padding: 5px 12px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.16);
        font-size: 12px;
        font-weight: 700;
    }

    .auth-aside-inner h2 {
        margin: 0 0 14px;
        font-size: 30px;
        font-weight: 800;
        color: #fff;
        line-height: 1.5;
        text-wrap: balance;
    }

    .auth-aside-inner > p {
        margin: 0 0 28px;
        font-size: 14px;
        line-height: 2;
        opacity: 0.9;
        color: #fff;
    }

    .auth-aside-points {
        list-style: none;
        margin: 0;
        padding: 0;
        display: grid;
        gap: 14px;
    }

    .auth-aside-points li {
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: 14px;
        font-weight: 600;
    }

    .auth-aside-points li::before {
        content: "\f272";
        font-family: bootstrap-icons;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        width: 26px;
        height: 26px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.2);
        font-size: 14px;
        line-height: 1;
    }

    .auth-form-col {
        display: flex;
        align-items: center;
        margin: 0;
        width: 100%;
        max-width: none;
    }

    .page-auth .auth-form-col > .auth-form-inner,
    .page-auth .auth-form-col > [class*="col-"] {
        width: 100%;
        max-width: 440px;
        flex: 1 1 auto;
        padding: 48px 32px;
        margin: 0 auto;
    }

    /* The aside already carries the logo on desktop */
    .page-auth .auth-form-col .brand-mark {
        display: none;
    }

    .page-auth .auth-intro {
        margin-bottom: 28px;
    }

    .page-auth .auth-intro-title {
        font-size: 26px;
        margin-bottom: 8px;
    }

    .page-auth .auth-card {
        padding: 0;
        background: transparent;
        box-shadow: none;
        border-radius: 0;
    }

    .page-auth .auth-card .nav-segment {
        background: var(--fimobile-page-bg-1);
    }

    .page-auth .auth-switch {
        margin-top: 24px;
        padding-top: 20px;
        border-top: 1px solid var(--fimobile-theme-bordercolor);
    }

    .page-nearby-map .footer {
        display: none;
    }

    .page-nearby-map .nearby-map-stage {
        top: var(--tb-header-height);
        bottom: 0;
        right: 0;
        left: 0;
    }

    .nearby-map-filters {
        top: 16px;
        right: 16px;
        left: 16px;
        width: auto;
        max-width: none;
    }

    .nearby-map-chips {
        padding: 8px 10px;
        background: rgba(255, 255, 255, 0.94);
        border-radius: 16px;
        box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
        scrollbar-width: thin;
        scrollbar-color: rgba(37, 99, 235, 0.35) transparent;
    }

    .nearby-map-chips::-webkit-scrollbar,
    .filter-tabs.nearby-map-chips::-webkit-scrollbar {
        display: block;
        height: 6px;
    }

    .nearby-map-chips::-webkit-scrollbar-thumb {
        background: rgba(37, 99, 235, 0.35);
        border-radius: 99px;
    }

    .nearby-map-status {
        top: 76px;
        right: auto;
        left: 50%;
        width: min(480px, calc(100% - 48px));
        transform: translateX(-50%);
    }

    .nearby-map-popup {
        right: auto;
        left: 24px;
        bottom: 24px;
        width: 380px;
    }

    .nearby-map-stage .map-my-location {
        bottom: 24px;
/*        left: 24px;
        right: auto;*/
    }

    .nearby-map-stage.has-popup .map-my-location {
        bottom: 24px;
        left: 420px;
        right: auto;
    }

    .dark-mode .nearby-map-chips {
        background: rgba(20, 24, 36, 0.94);
    }

    .form-sticky-actions-inner {
        max-width: var(--tb-desktop-width);
    }

    .quick-grid.cols-3 {
        grid-template-columns: 1fr 1fr;
    }

    .package-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .package-grid-sms {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .item-card .card-body {
        padding: 18px 20px;
    }

    .dark-mode .header:after,
    .dark-mode .footer {
        background: rgba(18, 24, 38, 0.92);
    }

    .dark-mode.tb-site {
        background:
            radial-gradient(1000px 480px at 100% -10%, rgba(37, 99, 235, 0.18), transparent 55%),
            #0b1220;
    }

    .dark-mode .auth-desktop-layout {
        background: #121826;
    }

    .dark-mode .company-home-board > .schedule-host {
        background: rgba(255, 255, 255, 0.06);
    }
}

.invite-card {
    padding: 16px;
    border-radius: var(--tb-radius);
    background: var(--fimobile-card-color);
    box-shadow: var(--tb-shadow-sm);
    border: 1px solid transparent;
}

.invite-card-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.invite-card-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.invite-card-copy strong {
    font-size: 14px;
    font-weight: 800;
}

.invite-card-copy span,
.invite-count span {
    font-size: 12px;
    color: var(--tb-text-muted);
    line-height: 1.7;
}

.invite-code-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    background: var(--fimobile-theme-color-light);
    margin-bottom: 12px;
}

.invite-code-box span {
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 3px;
    text-align: center;
    color: var(--fimobile-theme-color);
}

    .invite-code-box button span {
        color: var(--fimobile-theme-text);
        font-size: 15px;
    }

    .invite-code-box .btn {
        flex-shrink: 0;
        white-space: nowrap;
    }

.invite-count {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.invite-count strong {
    font-size: 22px;
    font-weight: 800;
    color: var(--fimobile-theme-color);
}

.dark-mode .invite-card {
    border-color: rgba(255, 255, 255, 0.06);
}

.dark-mode .invite-code-box {
    background: rgba(255, 255, 255, 0.06);
}

.auth-invite {
    margin-bottom: 16px;
    border: 1px solid var(--fimobile-theme-bordercolor);
    border-radius: 16px;
    background: #fff;
    overflow: hidden;
}

.auth-invite-toggle {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 12px 14px;
    cursor: pointer;
}

.auth-invite-toggle input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
    white-space: nowrap;
}

.auth-invite-copy {
    order: 1;
}

.auth-invite-switch {
    order: 2;
    position: relative;
    flex: 0 0 42px;
    width: 42px;
    height: 24px;
    margin-inline-start: auto;
    border-radius: 999px;
    background: #e2e8f0;
    transition: background-color 0.2s ease;
}

.auth-invite-switch::after {
    content: "";
    position: absolute;
    top: 3px;
    right: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.22);
    transition: transform 0.2s ease;
}

.auth-invite.is-open .auth-invite-switch {
    background: var(--fimobile-theme-color);
}

.auth-invite.is-open .auth-invite-switch::after {
    transform: translateX(-18px);
}

.auth-invite-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.auth-invite-copy strong {
    font-size: 14px;
    font-weight: 800;
    color: var(--tb-text, #0f172a);
}

.auth-invite-copy small {
    font-size: 12px;
    font-weight: 500;
    line-height: 1.6;
    color: var(--tb-text-muted);
}

.auth-invite-panel {
    padding: 0 14px 14px;
}

form .form-control.invitation-code-input {
    height: 48px;
    line-height: 1.2;
    padding-top: 10px;
    padding-bottom: 10px;
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 800;
    direction: ltr;
    text-align: center;
    background-color: #f8fafc;
    border-color: var(--fimobile-theme-bordercolor);
    box-shadow: none;
}

form .form-control.invitation-code-input:focus {
    background-color: #fff;
    border-color: var(--fimobile-theme-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
}

.dark-mode .auth-invite {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

.dark-mode .auth-invite-copy strong {
    color: #fff;
}

.dark-mode .auth-invite-switch {
    background: rgba(255, 255, 255, 0.16);
}

.dark-mode form .form-control.invitation-code-input {
    background-color: rgba(255, 255, 255, 0.06);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.08);
}

@media (min-width: 1200px) {
    .seo-landing .section-heading {
        font-size: 20px;
    }

    .legal-page {
        max-width: 780px;
        margin-right: auto;
        margin-left: auto;
    }

    .company-home-manage .quick-grid.cols-2 {
        grid-template-columns: 1fr;
    }
}


/* ==========================================================================
   Interaction, accessibility and motion layer
   ========================================================================== */

/* Splash screen.
   It used to stay up until window.load plus a 500ms timer and a slow fade. It is now dismissed
   on DOMContentLoaded, and the fade-in is delayed so quick navigations never flash it at all. */
.loader-wrap {
    animation: tb-loader-in var(--tb-duration) var(--tb-ease) 250ms both;
    transition: opacity 240ms var(--tb-ease), visibility 240ms linear;
}

@keyframes tb-loader-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.loader-wrap.is-hidden {
    /* The fade-in above uses fill-mode: both, and an animation's filled value outranks a normal
       declaration. Clearing it lets the fade-out actually apply. pointer-events is cleared in
       the same frame so an invisible splash cannot swallow the next tap on Safari, where
       transitionend is unreliable. */
    animation: none;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Keyboard focus.
   Bootstrap's default ring was being flattened by the template, leaving keyboard users with no
   visible focus. :focus-visible keeps pointer clicks clean while restoring it for keyboards. */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: 2px solid var(--tb-primary-600);
    outline-offset: 2px;
    border-radius: var(--tb-radius-xs);
}

.dark-mode :where(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline-color: var(--tb-primary-400);
}

form .form-control:focus-visible,
form .form-select:focus-visible {
    outline: none;
    box-shadow: var(--tb-focus-ring);
    border-color: var(--tb-primary-500);
}

.skip-link {
    position: fixed;
    inset-block-start: 0;
    inset-inline-start: 50%;
    transform: translate(50%, -120%);
    z-index: 3000;
    padding: 10px 18px;
    border-radius: 0 0 var(--tb-radius-sm) var(--tb-radius-sm);
    background: var(--tb-primary-600);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    transition: transform var(--tb-duration) var(--tb-ease);
}

.skip-link:focus {
    transform: translate(50%, 0);
    color: #fff;
}

/* Safari does not focus buttons on click and suppresses the tap flash (the template sets
   -webkit-tap-highlight-color: transparent on body). manipulation also drops the double-tap
   delay, so the first tap both navigates and shows feedback. */
a,
button,
.btn,
.nav-link,
.reservation-card.is-clickable,
.action-card,
.service-card,
.feature-card,
.setup-check-item,
.recent-company-card,
.invite-card {
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(37, 99, 235, 0.2);
}

.tb-btn-spinner,
a.is-navigating::after,
button.is-navigating::after {
    box-sizing: border-box;
    display: inline-block;
    width: 1em;
    height: 1em;
    margin-inline-end: 0.45em;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    vertical-align: -0.125em;
    -webkit-animation: tb-btn-spin 0.7s linear infinite;
    animation: tb-btn-spin 0.7s linear infinite;
}

a.is-navigating,
button.is-navigating {
    position: relative;
    pointer-events: none;
    cursor: progress;
}

a.is-navigating:not(.is-loading) > *,
button.is-navigating:not(.is-loading) > * {
    opacity: 0.4;
}

button.is-loading.is-navigating::after,
a.is-loading.is-navigating::after {
    content: none;
}

a.is-navigating::after,
button.is-navigating::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
}

.btn.is-loading {
    pointer-events: none;
    cursor: progress;
}

html.is-navigating,
html.is-navigating body {
    cursor: progress;
}

a.is-pressed,
button.is-pressed,
.btn.is-pressed,
.reservation-card.is-pressed,
.action-card.is-pressed,
.service-card.is-pressed,
.feature-card.is-pressed,
.setup-check-item.is-pressed,
.recent-company-card.is-pressed,
.invite-card.is-pressed {
    opacity: 0.72;
}

@-webkit-keyframes tb-btn-spin {
    to { -webkit-transform: rotate(-360deg); transform: rotate(-360deg); }
}

@keyframes tb-btn-spin {
    to { transform: rotate(-360deg); }
}

/* Pressed states. Touch users get no hover, so the press feedback is what confirms a tap. */
.action-card,
.feature-card,
.service-card,
.reservation-card,
.invite-card,
.setup-check-item,
.quick-grid > a {
    transition: transform var(--tb-duration-fast) var(--tb-ease),
                box-shadow var(--tb-duration) var(--tb-ease),
                border-color var(--tb-duration) var(--tb-ease);
}

.action-card:active,
.feature-card:active,
.service-card:active,
.reservation-card:active,
.invite-card:active,
.quick-grid > a:active {
    transform: scale(0.985);
}

@media (hover: hover) and (pointer: fine) {
    .action-card:hover,
    .feature-card:hover,
    .service-card:hover,
    .invite-card:hover,
    .quick-grid > a:hover {
        box-shadow: var(--tb-shadow-md);
        border-color: var(--tb-border-strong);
    }
}

.btn {
    transition: transform var(--tb-duration-fast) var(--tb-ease),
                box-shadow var(--tb-duration) var(--tb-ease),
                background-color var(--tb-duration) var(--tb-ease),
                color var(--tb-duration) var(--tb-ease);
}

.btn:active:not(:disabled) {
    transform: scale(0.97);
}

.btn:disabled,
.btn.disabled {
    cursor: not-allowed;
}

/* ------------------------------------------------------------------
   Mobile chrome aligned with the Flutter app (phone / PWA view).
   Desktop (≥992px) keeps the existing site header and footer.
   ------------------------------------------------------------------ */

.app-icon-btn {
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--tb-surface-sunken);
    color: var(--tb-text);
    text-decoration: none;
    flex-shrink: 0;
    line-height: 1;
}

.app-icon-btn i {
    font-size: 18px;
}

.app-icon-btn.is-glass {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.app-greeting,
.app-brand-top,
.app-page-bar,
.app-brand-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
}

.app-greeting-avatar,
.app-greeting-avatar img {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    object-fit: cover;
    flex-shrink: 0;
}

.app-greeting-text {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.app-greeting-hello {
    font-size: 12.5px;
    color: var(--tb-text-muted);
    line-height: 1.3;
}

.app-greeting-name {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-greeting-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.app-brand-top {
    justify-content: space-between;
}

.app-brand-top-logo,
.app-brand-bar,
.app-brand-row {
    color: #fff;
    text-decoration: none;
}

.app-brand-top-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 18px;
    font-weight: 800;
}

.app-brand-top-logo img,
.app-brand-logo {
    width: 46px;
    height: 46px;
    object-fit: contain;
    border-radius: 14px;
}

.app-brand-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.app-brand-copy {
    min-width: 0;
    flex: 1;
}

.app-brand-title,
.app-page-title {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.35;
}

.app-brand-subtitle,
.app-page-subtitle {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    opacity: 0.9;
}

.app-page-copy {
    min-width: 0;
    flex: 1;
}

.app-search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 52px;
    padding: 4px 16px;
    border-radius: 22px;
    background: var(--tb-surface);
    border: 1px solid var(--tb-border);
    box-shadow: var(--tb-shadow-card);
    text-decoration: none;
    color: inherit;
}

.app-search-icon {
    font-size: 20px;
    color: var(--tb-text-muted);
}

.app-search-hint {
    flex: 1;
    min-width: 0;
    color: #94a3b8;
    font-size: 14px;
}

.app-search-trail {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.09);
    color: var(--tb-primary-600);
    font-size: 11px;
    font-weight: 700;
}

.gradient-card {
    position: relative;
    overflow: hidden;
    padding: 20px;
    border-radius: 28px;
    background: var(--tb-brand-gradient);
    color: #fff;
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.24);
}

.gradient-card::before,
.gradient-card::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    pointer-events: none;
}

.gradient-card::before {
    width: 128px;
    height: 128px;
    top: -34px;
    left: -18px;
}

.gradient-card::after {
    width: 108px;
    height: 108px;
    bottom: -40px;
    right: -10px;
}

.gradient-card-copy,
.gradient-card-body,
.gradient-card-actions {
    position: relative;
    z-index: 1;
}

.gradient-card-copy strong,
.gradient-card-body strong {
    display: block;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 6px;
}

.gradient-card-copy p,
.gradient-card-body p {
    margin: 0 0 16px;
    font-size: 13px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.92);
}

.gradient-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.btn-on-gradient,
.btn-on-gradient-ghost {
    min-height: 46px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
}

.btn-on-gradient {
    background: #2563eb;
    color: #fff;
    border: 0;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
}

.btn-on-gradient-ghost {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.quick-grid.cols-2 {
    grid-template-columns: 1fr 1fr;
}

.action-card {
    position: relative;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--tb-border);
    background: var(--tb-surface);
}

.action-card .action-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    color: #fff;
    background: var(--tb-primary-600);
    box-shadow: 0 5px 12px rgba(37, 99, 235, 0.28);
}

.action-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.action-body strong {
    font-size: 15px;
    font-weight: 800;
}

.action-body small {
    font-size: 12px;
    color: var(--tb-text-muted);
    line-height: 1.4;
}

.action-chevron {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 99, 235, 0.1);
    color: var(--tb-primary-600);
    font-size: 14px;
}

.action-card.tone-primary { border-color: rgba(37, 99, 235, 0.16); background: linear-gradient(160deg, rgba(37, 99, 235, 0.09), var(--tb-surface) 60%); }
.action-card.tone-primary .action-icon { background: linear-gradient(160deg, #2563eb, #1d4ed8); }
.action-card.tone-success { border-color: rgba(16, 185, 129, 0.16); background: linear-gradient(160deg, rgba(16, 185, 129, 0.09), var(--tb-surface) 60%); }
.action-card.tone-success .action-icon { background: linear-gradient(160deg, #10b981, #059669); box-shadow: 0 5px 12px rgba(16, 185, 129, 0.28); }
.action-card.tone-success .action-chevron { background: rgba(16, 185, 129, 0.1); color: #059669; }
.action-card.tone-warning { border-color: rgba(245, 158, 11, 0.18); background: linear-gradient(160deg, rgba(245, 158, 11, 0.1), var(--tb-surface) 60%); }
.action-card.tone-warning .action-icon { background: linear-gradient(160deg, #f59e0b, #d97706); box-shadow: 0 5px 12px rgba(245, 158, 11, 0.28); }
.action-card.tone-warning .action-chevron { background: rgba(245, 158, 11, 0.12); color: #d97706; }
.action-card.tone-info { border-color: rgba(59, 130, 246, 0.16); background: linear-gradient(160deg, rgba(59, 130, 246, 0.09), var(--tb-surface) 60%); }
.action-card.tone-info .action-icon { background: linear-gradient(160deg, #3b82f6, #2563eb); }
.action-card.tone-violet { border-color: rgba(124, 58, 237, 0.16); background: linear-gradient(160deg, rgba(124, 58, 237, 0.09), var(--tb-surface) 60%); }
.action-card.tone-violet .action-icon { background: linear-gradient(160deg, #7c3aed, #6d28d9); box-shadow: 0 5px 12px rgba(124, 58, 237, 0.28); }
.action-card.tone-violet .action-chevron { background: rgba(124, 58, 237, 0.1); color: #7c3aed; }
.action-card.tone-slate { border-color: rgba(100, 116, 139, 0.18); background: linear-gradient(160deg, rgba(100, 116, 139, 0.08), var(--tb-surface) 60%); }
.action-card.tone-slate .action-icon { background: linear-gradient(160deg, #64748b, #475569); box-shadow: 0 5px 12px rgba(100, 116, 139, 0.24); }
.action-card.tone-slate .action-chevron { background: rgba(100, 116, 139, 0.12); color: #475569; }

.section-title-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.section-subtitle {
    font-size: 12.5px;
    color: var(--tb-text-muted);
}

.hero-title-app {
    display: none;
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.35;
}

.hero-stat-chips {
    display: none;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0 0;
}

.hero-stat-chips span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
    font-size: 11px;
    font-weight: 600;
}

.hero-stat-chips b {
    font-size: 16px;
    font-weight: 800;
}

.app-feature-list {
    display: none;
}

.feature-tile {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    margin-bottom: 8px;
    border-radius: 22px;
    background: var(--tb-surface);
    border: 1px solid var(--tb-border);
    box-shadow: var(--tb-shadow-card);
    text-decoration: none;
    color: inherit;
}

.feature-tile strong {
    display: block;
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 2px;
}

.feature-tile p {
    margin: 0;
    font-size: 12.5px;
    color: var(--tb-text-muted);
    line-height: 1.8;
}

.feature-tile-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
}

.feature-tile-icon.tone-primary { background: rgba(37, 99, 235, 0.1); color: #2563eb; }
.feature-tile-icon.tone-success { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.feature-tile-icon.tone-warning { background: rgba(245, 158, 11, 0.12); color: #d97706; }
.feature-tile-icon.tone-violet { background: rgba(79, 70, 229, 0.1); color: #4f46e5; }

.feature-tile-chevron {
    margin-right: auto;
    color: #94a3b8;
    align-self: center;
}

.app-sheet {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.app-sheet[hidden] {
    display: none !important;
}

.app-sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    opacity: 0;
    transition: opacity 200ms ease;
}

.app-sheet-panel {
    position: relative;
    width: 100%;
    max-height: 90vh;
    overflow: auto;
    padding: 12px 20px calc(20px + env(safe-area-inset-bottom, 0px));
    border-radius: 34px 34px 0 0;
    background: var(--tb-surface);
    transform: translateY(16px);
    transition: transform 220ms ease;
}

.app-sheet.is-open .app-sheet-backdrop {
    opacity: 1;
}

.app-sheet.is-open .app-sheet-panel {
    transform: none;
}

.app-sheet-handle {
    display: block;
    width: 44px;
    height: 4px;
    margin: 4px auto 14px;
    border-radius: 999px;
    background: var(--tb-border-strong);
}

.app-sheet-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.app-sheet-title {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
}

.app-sheet-subtitle {
    margin: 2px 0 0;
    font-size: 13px;
    color: var(--tb-text-muted);
}

.app-sheet-close {
    margin-right: auto;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: var(--tb-surface-sunken);
    color: var(--tb-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

body.app-sheet-open {
    overflow: hidden;
}

.footer.app-dock {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: none;
    border-radius: 0;
    border-top: 0.6px solid rgba(232, 238, 245, 0.9);
    min-height: var(--tb-nav-height);
}

.footer.app-dock .nav {
    max-width: none;
}

.footer.app-dock .nav .nav-item .nav-link {
    position: relative;
    color: #94a3b8;
    padding-top: 10px;
}

.footer.app-dock .nav .nav-item .nav-link span .nav-icon {
    font-size: 22px;
    width: 24px;
    height: 24px;
    line-height: 24px;
}

.footer.app-dock .nav .nav-item .nav-link span .nav-text {
    font-size: 11px;
    font-weight: 500;
    margin-top: 4px;
}

.footer.app-dock .nav .nav-item .nav-link.active {
    color: var(--fimobile-theme-color);
}

.footer.app-dock .nav .nav-item .nav-link.active .nav-text {
    font-weight: 700;
}

.footer.app-dock .nav .nav-item .nav-link.active::before {
    content: "";
    position: absolute;
    top: 0;
    right: 50%;
    transform: translateX(50%);
    width: 20px;
    height: 3px;
    border-radius: 999px;
    background: var(--fimobile-theme-color);
}

.footer.app-dock .nav .nav-item .nav-link {
    background: transparent;
}

.footer.app-dock button.nav-link {
    width: 100%;
    border: 0;
}

@media (max-width: 991.98px) {
    body.tb-site {
        background: linear-gradient(to bottom left, #f8fafc, #eef2ff);
    }

    /* background-attachment: fixed on main paints a detached layer in iOS
       Safari and leaves a blank strip when the toolbar resizes. */
    main {
        background-attachment: scroll;
    }

    .dark-mode.body.tb-site,
    body.tb-site.dark-mode {
        background: linear-gradient(to bottom left, #0b1220, #101a2e);
    }

    .btn-lg.btn-default,
    .page-auth .btn-lg {
        min-height: var(--tb-btn-lg);
        border-radius: var(--tb-radius-md);
    }

    .sidebar-wrap,
    .header-mobile .menu-btn {
        display: none !important;
    }

    body[data-page="profile"] .header.app-page-header {
        display: none !important;
    }

    body.menu-open,
    html.menu-open {
        overflow: auto;
    }

    .header.app-home-header.is-brand:after,
    .header.app-home-header.is-greeting:after,
    .header.app-brand-header:after {
        display: none;
    }

    .header.app-home-header.is-greeting {
        position: relative !important;
        background: transparent;
        padding-bottom: 4px;
    }

    .header.app-brand-header {
        position: relative !important;
        padding: 0;
        background: transparent;
    }

    .app-brand-bar {
        position: relative;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 16px 20px 28px;
        background: var(--tb-brand-gradient);
        border-radius: 0 0 34px 34px;
        color: #fff;
        min-height: 0;
    }

    .app-brand-bar::before,
    .app-brand-bar::after {
        content: "";
        position: absolute;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.14);
        pointer-events: none;
    }

    .app-brand-bar::before {
        width: 150px;
        height: 150px;
        top: -44px;
        left: -22px;
    }

    .app-brand-bar::after {
        width: 104px;
        height: 104px;
        bottom: -34px;
        right: 20px;
    }

    .app-brand-row,
    .app-brand-subtitle {
        position: relative;
        z-index: 1;
    }

    .app-brand-title {
        color: #fff;
        font-size: 22px;
        flex: 1;
        min-width: 0;
    }

    .app-brand-subtitle {
        display: block;
        font-size: 14px;
        font-weight: 700;
        opacity: 0.92;
        padding-right: 4px;
    }

    .app-brand-logo {
        width: 50px;
        height: 50px;
    }

    .welcome-card {
        display: none;
    }

    .page-auth .brand-mark {
        display: none;
    }

    /* Safari measures a position:fixed header too tall while the URL bar shows
       or hides, and that number is applied as main's padding-top — a gap under
       the bar that stays after the toolbar settles. Keep the bar in normal flow
       on phones, with a fixed inset above the title. .position-fixed is
       !important, so the override has to be too. height:100% on main would also
       end the sticky range after one screen. */
    main.h-100:has(> .header.app-page-header) {
        height: auto !important;
    }

    .header.app-page-header {
        position: sticky !important;
        top: 0;
        line-height: normal;
        padding: 0;
        margin: 0;
        background: var(--tb-surface);
    }

    .header.app-page-header:after {
        border-radius: 0;
        opacity: 1;
    }

    .header.app-page-header .header-bar {
        display: flex;
        flex-direction: column;
        line-height: normal;
    }

    .header.app-page-header .header-mobile {
        margin: 0;
        padding: calc(12px + env(safe-area-inset-top, 0px)) 20px 12px;
        padding-left: calc(20px + env(safe-area-inset-left, 0px));
        padding-right: calc(20px + env(safe-area-inset-right, 0px));
    }

    body[data-page="profile"] .profile-hub {
        padding-top: env(safe-area-inset-top, 0px);
    }

    /* Fixed inset under the bar. A JS measurement of the header grows when
       Safari's URL bar moves; this value does not. */
    body:not([data-page="profile"]) .header.app-page-header + .main-container {
        padding-top: 20px;
    }

    body[data-page="landing"] .header.app-home-header.is-brand {
        position: absolute !important;
        top: 0;
        right: 0;
        left: 0;
        z-index: 5;
        background: transparent;
        padding: env(safe-area-inset-top, 0px) 0 0;
    }

    body[data-page="landing"] .header.app-home-header.is-brand .app-brand-top {
        margin: 0;
        padding: 16px 20px 0;
        background: transparent;
        color: #fff;
    }

    body[data-page="landing"] .header.app-home-header.is-brand + .main-container {
        padding-top: 0;
    }

    body[data-page="landing"] .landing-hero-stage {
        margin: 0 -15px 16px;
    }

    body[data-page="landing"] .hero-card {
        position: relative;
        overflow: hidden;
        isolation: isolate;
        border-radius: 0 0 34px 34px;
        margin-bottom: 0 !important;
        box-shadow: none;
        background: var(--tb-brand-gradient);
    }

    body[data-page="landing"] .hero-card::before,
    body[data-page="landing"] .hero-card::after {
        content: "";
        position: absolute;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.14);
        pointer-events: none;
        z-index: 0;
    }

    body[data-page="landing"] .hero-card::before {
        width: 170px;
        height: 170px;
        top: -50px;
        left: -30px;
    }

    body[data-page="landing"] .hero-card::after {
        width: 130px;
        height: 130px;
        bottom: -30px;
        right: -20px;
    }

    body[data-page="landing"] .hero-card .card-body {
        position: relative;
        z-index: 1;
        display: flex;
        flex-direction: column;
        padding: calc(72px + env(safe-area-inset-top, 0px)) 20px 28px;
    }

    body[data-page="landing"] .hero-lead,
    body[data-page="landing"] .hero-chips,
    body[data-page="landing"] .hero-actions,
    body[data-page="landing"] .hero-card h1,
    body[data-page="landing"] .landing-slider,
    body[data-page="landing"] .stat-row,
    body[data-page="landing"] .feature-grid-wide,
    body[data-page="landing"] .seo-article,
    body[data-page="landing"] .landing-trial,
    body[data-page="landing"] .landing-bottom-cta,
    body[data-page="landing"] .audience-card,
    body[data-page="landing"] [aria-labelledby="landing-features-title"],
    body[data-page="landing"] [aria-labelledby="landing-business-steps-title"],
    body[data-page="landing"] [aria-labelledby="landing-customer-steps-title"],
    body[data-page="landing"] [aria-labelledby="landing-audience-title"],
    body[data-page="landing"] [aria-labelledby="landing-faq-title"] {
        display: none !important;
    }

    body[data-page="landing"] .hero-title-app {
        display: block;
        color: #fff;
        font-size: 26px;
        font-weight: 800;
        letter-spacing: -0.04em;
        line-height: 1.35;
        margin: 8px 0 6px;
    }

    body[data-page="landing"] .hero-kicker {
        display: block;
        opacity: 0.9;
        font-size: 14px;
        font-weight: 600;
        margin: 0;
    }

    body[data-page="landing"] .hero-stat-chips {
        display: flex;
        margin-top: 16px;
    }

    .app-feature-list,
    .app-guest-cta {
        display: block;
    }

    .page-auth .main-container,
    .page-auth .auth-screen {
        padding-top: 0;
    }
}

@media (min-width: 992px) {
    .app-feature-list,
    .app-guest-cta,
    .hero-title-app,
    .hero-stat-chips {
        display: none !important;
    }

    body[data-page="landing"] .app-search-bar {
        display: none !important;
    }

    .app-search-bar {
        max-width: 420px;
    }

    .quick-grid.cols-2 {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .company-home-manage .quick-grid.cols-2 {
        grid-template-columns: 1fr;
    }

    .action-card {
        flex-direction: row;
        align-items: center;
    }

    .action-chevron {
        position: static;
        margin-right: auto;
        background: transparent;
    }

    .header.app-brand-header .header-mobile {
        display: none;
    }
}

.dark-mode .footer.app-dock {
    background: rgba(17, 28, 47, 0.96);
    border-top-color: rgba(36, 51, 77, 0.8);
}

.dark-mode .app-icon-btn {
    background: #17253c;
    color: #f1f5f9;
}

.dark-mode .app-icon-btn.is-glass {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.dark-mode .app-search-bar,
.dark-mode .feature-tile,
.dark-mode .app-sheet-panel {
    background: #111c2f;
    border-color: #24334d;
}

.dark-mode .app-search-trail {
    background: rgba(91, 141, 239, 0.2);
    color: #5b8def;
}

.dark-mode .header.app-page-header .header-mobile {
    background: #111c2f;
    border-bottom-color: #24334d;
}

.profile-hub {
    padding-bottom: 8px;
}

.profile-identity {
    border: 0;
    margin-bottom: 12px;
    border-radius: var(--tb-radius);
    box-shadow: var(--tb-shadow-sm);
}

.profile-identity .card-body {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
}

.profile-identity-avatar {
    width: 68px;
    height: 68px;
    border-radius: 22px;
    object-fit: cover;
    flex-shrink: 0;
}

.profile-identity-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.profile-identity-copy strong {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.profile-identity-copy span {
    font-size: 13px;
    color: var(--tb-text-muted);
}

.profile-identity-copy .status-badge {
    margin-top: 6px;
    background: var(--tb-surface-sunken);
    color: var(--tb-text-muted);
}

.profile-tile,
.profile-invite {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin-bottom: 8px;
    padding: 14px 16px;
    border: 1px solid var(--tb-border);
    border-radius: var(--tb-radius);
    background: var(--tb-surface);
    box-shadow: var(--tb-shadow-sm);
    color: inherit;
    text-align: right;
    text-decoration: none;
    cursor: pointer;
}

button.profile-tile {
    appearance: none;
}

.profile-tile-icon {
    width: 40px;
    height: 40px;
    border-radius: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(37, 99, 235, 0.1);
    color: var(--tb-primary-600);
    font-size: 18px;
}

.profile-tile-copy {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.profile-tile-copy strong {
    font-size: 15px;
    font-weight: 800;
}

.profile-tile-copy small {
    font-size: 12.5px;
    color: var(--tb-text-muted);
    line-height: 1.4;
}

.profile-tile-chevron {
    color: #94a3b8;
    font-size: 16px;
}

.profile-tile-switch {
    margin: 0;
    padding: 0;
    min-height: 0;
    pointer-events: none;
}

.profile-tile-switch .form-check-input {
    margin: 0;
    width: 2.4em;
    height: 1.3em;
}

.profile-tile.is-danger .profile-tile-icon {
    background: rgba(244, 63, 94, 0.1);
    color: #e11d48;
}

.profile-tile.is-danger strong,
.profile-tile.is-danger .profile-tile-chevron {
    color: #e11d48;
}

.profile-invite-code {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 10px;
    border: 1px solid var(--tb-border);
    background: var(--tb-surface-sunken);
    color: inherit;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.4px;
}

.profile-invite-code.is-copied {
    border-color: #10b981;
    color: #059669;
}

.profile-guest {
    border: 0;
    border-radius: var(--tb-radius);
    box-shadow: var(--tb-shadow-sm);
}

.profile-guest-icon {
    width: 72px;
    height: 72px;
    margin: 8px auto 16px;
    border-radius: 23px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 99, 235, 0.1);
    color: var(--tb-primary-600);
    font-size: 32px;
}

.profile-guest-title {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 8px;
}

.profile-guest p {
    color: var(--tb-text-muted);
    margin-bottom: 20px;
    line-height: 1.7;
}

.dark-mode .profile-identity,
.dark-mode .profile-tile,
.dark-mode .profile-invite,
.dark-mode .profile-guest {
    background: #111c2f;
    border-color: #24334d;
}

.dark-mode .profile-invite-code {
    background: #17253c;
    border-color: #24334d;
}

/* Tap targets. The WCAG 2.5.8 floor is 24px; 44px is the comfortable touch size. */
.footer .nav-link,
.header .btn-44,
.slot-chip,
.filter-tabs > * {
    min-block-size: 44px;
}

/* Long lists: let the browser skip layout and paint for off-screen rows. */
.reservation-card,
.customer-list-item,
.staff-list-item {
    content-visibility: auto;
    contain-intrinsic-size: auto 120px;
}

/* Horizontal scrollers snap instead of drifting between items. */
.date-scroller,
.staff-scroller,
.slot-period-scroller,
.nearby-map-chips {
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
}

    .date-scroller::-webkit-scrollbar,
    .staff-scroller::-webkit-scrollbar,
    .slot-period-scroller::-webkit-scrollbar,
    .nearby-map-chips::-webkit-scrollbar {
        display: none;
    }

    .date-scroller > *,
    .staff-scroller > *,
    .slot-period-scroller > *,
    .nearby-map-chips > * {
        scroll-snap-align: start;
    }

/* Images should not push layout around while they load. */
img {
    max-inline-size: 100%;
}

/* Persian text reads better without hyphen-free overflow on narrow cards. */
.reservation-card,
.service-card,
.legal-page p {
    overflow-wrap: anywhere;
}

/* Respect the OS setting for anything the template animates on a loop. */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .loader-wrap {
        animation: none;
    }

    #ajax-busy .bar,
    #ajax-busy.busy .bar,
    html.is-navigating #ajax-busy .bar {
        -webkit-animation: none !important;
        animation: none !important;
        -webkit-transform: none !important;
        transform: none !important;
        width: 100%;
    }

    .tb-btn-spinner,
    a.is-navigating::after,
    button.is-navigating::after {
        -webkit-animation: none !important;
        animation: none !important;
    }
}

/* ==========================================================================
   Modal forms — mirror the mobile app's form pages (AppPageHeader, AppFormSection,
   AppTextField, AppSwitchField, AppQuickPicks, AppBottomActionBar)
   ========================================================================== */

.fullscreen-modal-subtitle {
    margin: 2px 0 0;
    font-size: 12px;
    line-height: 1.6;
    color: var(--tb-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fullscreen-modal-subtitle:empty {
    display: none;
}

.fullscreen-modal:not(.is-sheet) .fullscreen-modal-content {
    max-width: 640px;
    margin: 0 auto;
}

/* On wider screens a form modal is a centered dialog over the page, not a blank full screen */
@media (min-width: 768px) {
    .fullscreen-modal:not(.is-sheet) {
        background: rgba(15, 23, 42, 0.42);
        -webkit-backdrop-filter: blur(3px);
        backdrop-filter: blur(3px);
        padding: 32px 24px;
    }

    .fullscreen-modal.show:not(.is-sheet) {
        align-items: center;
        justify-content: center;
    }

    .fullscreen-modal:not(.is-sheet) .fullscreen-modal-panel {
        width: 100%;
        max-width: 640px;
        height: auto;
        max-height: min(90vh, 900px);
        overflow: hidden;
        border-radius: var(--tb-radius-xl);
        background: var(--tb-page-bg);
        box-shadow: var(--tb-shadow-lg);
        animation: tbDialogIn 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
    }

    .fullscreen-modal:not(.is-sheet) .fullscreen-modal-bar {
        padding: 14px 16px;
        background: var(--tb-surface);
        border-bottom: 1px solid var(--tb-border);
        box-shadow: none;
    }

    .fullscreen-modal:not(.is-sheet) .fullscreen-modal-scroll {
        flex: 1 1 auto;
        padding: 20px 24px 24px;
    }

    .fullscreen-modal:not(.is-sheet) .form-sticky-actions.is-modal {
        padding: 14px 24px;
        border-radius: 0;
        box-shadow: none;
        background: var(--tb-surface);
        border-top: 1px solid var(--tb-border);
    }
}

@keyframes tbDialogIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.985);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fullscreen-modal .fullscreen-modal-panel {
        animation: none !important;
    }
}

/* Form layout */
.tb-form-sections {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.tb-form-section {
    padding: 18px;
    background: var(--tb-surface);
    border: 1px solid var(--tb-border);
    border-radius: var(--tb-radius);
    box-shadow: var(--tb-shadow-soft);
}

.tb-form-section-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.tb-form-section-icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--tb-primary-soft);
    color: var(--tb-primary);
    font-size: 18px;
}

.tb-form-section-head h6 {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
}

.tb-form-section-head p {
    margin: 2px 0 0;
    font-size: 12px;
    line-height: 1.6;
    color: var(--tb-text-muted);
}

.tb-form-section-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tb-form-section-body .form-group,
.tb-form-pair .form-group {
    margin-bottom: 0;
}

.tb-form-pair {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
}

@media (min-width: 520px) {
    .tb-form-pair {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Field: label above with icon, required mark and an optional badge */
.tb-field-label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 2px 7px;
    font-size: 13px;
    font-weight: 700;
    color: var(--tb-text);
}

.tb-field-label > .bi {
    font-size: 15px;
    color: var(--tb-text-muted);
}

.tb-field-label-text {
    flex: 1;
    min-width: 0;
}

.tb-field-required {
    color: var(--tb-danger);
}

.tb-field-badge {
    font-size: 11px;
    font-weight: 600;
    color: var(--tb-text-faint);
}

.tb-field-helper {
    display: flex;
    align-items: flex-start;
    gap: 5px;
    margin: 6px 2px 0;
    font-size: 11.5px;
    line-height: 1.7;
    color: var(--tb-text-muted);
}

.tb-field-helper .bi {
    margin-top: 2px;
    font-size: 12px;
    color: var(--tb-text-faint);
}

.tb-field .form-control,
.tb-field .form-select {
    min-height: 50px;
    border-color: var(--tb-border);
    border-radius: var(--tb-radius-sm);
    background-color: var(--tb-input-bg);
    box-shadow: none;
}

.tb-field .form-control:focus,
.tb-field .form-select:focus {
    background-color: var(--tb-surface);
}

.tb-field textarea.form-control {
    min-height: 104px;
    line-height: 1.8;
    resize: vertical;
}

.tb-field select.form-control {
    -webkit-appearance: none;
    appearance: none;
    padding-left: 40px;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: left 14px center;
    background-size: 14px 12px;
}

.tb-field input[type="number"] {
    -moz-appearance: textfield;
}

.tb-field input[type="number"]::-webkit-inner-spin-button,
.tb-field input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.tb-input-affix {
    position: relative;
}

.tb-input-affix .form-control {
    padding-left: 72px;
}

.tb-input-suffix {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    font-size: 12.5px;
    font-weight: 700;
    color: var(--tb-text-muted);
    pointer-events: none;
}

/* Switch row: tappable as a whole, tinted when on */
.tb-switch-field {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 10px 12px;
    border: 1.2px solid var(--tb-border);
    border-radius: var(--tb-radius-sm);
    background: var(--tb-input-bg);
    color: var(--tb-text);
    font-weight: inherit;
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease;
}

.tb-switch-field:has(.form-check-input:checked) {
    background: var(--tb-primary-soft);
    border-color: rgba(37, 99, 235, 0.38);
}

.tb-switch-field-icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 11px;
    background: var(--tb-surface-alt);
    color: var(--tb-text-muted);
    font-size: 17px;
    transition: color 0.18s ease, background-color 0.18s ease;
}

.tb-switch-field:has(.form-check-input:checked) .tb-switch-field-icon {
    background: var(--tb-surface);
    color: var(--tb-primary);
}

.tb-switch-field-text {
    flex: 1;
    min-width: 0;
}

.tb-switch-field-text strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
}

.tb-switch-field-text small {
    display: block;
    font-size: 11.5px;
    line-height: 1.6;
    color: var(--tb-text-muted);
}

.tb-switch-field .form-switch {
    flex: none;
    margin: 0;
    padding: 0;
    min-height: 0;
}

.tb-switch-field .form-switch .form-check-input {
    float: none;
    width: 2.6em;
    height: 1.45em;
    margin: 0;
    cursor: pointer;
}

/* Quick picks under numeric fields */
.tb-quick-picks {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.tb-quick-pick {
    padding: 5px 12px;
    border: 1px solid var(--tb-border);
    border-radius: 999px;
    background: var(--tb-surface-alt);
    color: var(--tb-text-muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.6;
    transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.tb-quick-pick:hover {
    border-color: var(--tb-border-strong);
    color: var(--tb-text);
}

.tb-quick-pick.is-active {
    border-color: rgba(37, 99, 235, 0.5);
    background: var(--tb-primary-soft);
    color: var(--tb-primary);
}

.tb-quick-pick:focus-visible {
    outline: 2px solid var(--tb-primary);
    outline-offset: 2px;
}

/* Image picker row */
.tb-media-field {
    display: flex;
    align-items: center;
    gap: 16px;
}

.tb-media-field .avatar-upload img {
    width: 84px;
    height: 84px;
    border-radius: 22px;
    background: var(--tb-surface-alt);
    box-shadow: var(--tb-shadow-xs);
}

.tb-media-field .avatar-upload .avatar-edit {
    left: -4px;
    bottom: -4px;
    width: 28px;
    height: 28px;
    border-radius: 9px;
    border: 2px solid var(--tb-surface);
    font-size: 13px;
}

.tb-media-field-text {
    flex: 1;
    min-width: 0;
}

.tb-media-field-text strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
}

.tb-media-field-text p {
    margin: 2px 0 10px;
    font-size: 11.5px;
    line-height: 1.6;
    color: var(--tb-text-muted);
}

.tb-media-field-text .btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--tb-border);
    border-radius: 11px;
    background: var(--tb-surface-alt);
    color: var(--tb-text);
    font-size: 12.5px;
}

.tb-media-field-text .btn:hover {
    border-color: var(--tb-border-strong);
}

/* Multi-select tiles (services) */
.tb-check-tiles {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
}

@media (min-width: 520px) {
    .tb-check-tiles {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.tb-check-tile {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 11px 12px;
    border: 1.2px solid var(--tb-border);
    border-radius: var(--tb-radius-sm);
    background: var(--tb-input-bg);
    color: var(--tb-text);
    font-weight: inherit;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.tb-check-tile input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.tb-check-tile-mark {
    flex: none;
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border: 1.5px solid var(--tb-border-strong);
    border-radius: 7px;
    background: var(--tb-surface);
    color: #fff;
    font-size: 14px;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.tb-check-tile-mark .bi {
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.tb-check-tile:has(input:checked) {
    border-color: rgba(37, 99, 235, 0.45);
    background: var(--tb-primary-soft);
}

.tb-check-tile:has(input:checked) .tb-check-tile-mark {
    border-color: var(--tb-primary);
    background: var(--tb-primary);
}

.tb-check-tile:has(input:checked) .tb-check-tile-mark .bi {
    opacity: 1;
    transform: none;
}

.tb-check-tile:has(input:focus-visible) {
    outline: 2px solid var(--tb-primary);
    outline-offset: 2px;
}

.tb-check-tile-text {
    flex: 1;
    min-width: 0;
}

.tb-check-tile-text strong {
    display: block;
    font-size: 13.5px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tb-check-tile-text small {
    display: block;
    font-size: 11.5px;
    color: var(--tb-text-muted);
}

.tb-form-section .empty-state {
    padding: 16px 8px;
}

.tb-form-section .manual-end-time {
    min-height: 50px;
    border: 1px solid var(--tb-border);
    border-radius: var(--tb-radius-sm);
    background: var(--tb-input-bg);
    box-shadow: none;
}

.tb-form-section .manual-end-time.is-ready {
    border-color: rgba(37, 99, 235, 0.35);
    background: var(--tb-primary-soft);
}

.tb-form-section .manual-booking-hint {
    margin: -8px 2px 0;
}

.tb-form-section .customer-search .form-control {
    border: 1px solid var(--tb-border);
    box-shadow: none;
    background: var(--tb-input-bg);
}

.dark-mode .tb-switch-field:has(.form-check-input:checked),
.dark-mode .tb-check-tile:has(input:checked),
.dark-mode .tb-quick-pick.is-active,
.dark-mode .tb-form-section .manual-end-time.is-ready {
    border-color: rgba(91, 141, 239, 0.5);
}

.dark-mode .fullscreen-modal:not(.is-sheet) .fullscreen-modal-bar {
    background: var(--tb-surface);
}
