/* Innora Design System & Core Stylesheet */
:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --secondary: #475569;
    --success: #10b981;
    --success-light: #ecfdf5;
    --danger: #ef4444;
    --danger-light: #fef2f2;
    --warning: #f59e0b;
    --warning-light: #fffbeb;
    --info: #06b6d4;
    --info-light: #ecfeff;
    --bg-body: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-subtle: #f1f5f9;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --border-focus: #93c5fd;
    --sidebar-width: 260px;
    --topbar-height: 64px;
    --mobile-nav-height: 64px;
    --touch-min: 44px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --sat: env(safe-area-inset-top, 0px);
    --sar: env(safe-area-inset-right, 0px);
    --sab: env(safe-area-inset-bottom, 0px);
    --sal: env(safe-area-inset-left, 0px);
}

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

* {
    margin: 0;
    padding: 0;
}

html {
    height: 100%;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    padding-top: var(--sat);
    padding-bottom: var(--sab);
    padding-left: var(--sal);
    padding-right: var(--sar);
    overflow-x: hidden;
    min-height: 100%;
    min-height: 100dvh;
    overscroll-behavior-x: none;
}

/* Prevent accidental double-tap / pinch zoom on app chrome (inputs keep native behavior) */
button,
a,
.btn,
.nav-item,
.bottom-nav-item,
.mobile-menu-toggle,
label,
summary,
.tab-btn,
.filter-chip {
    touch-action: manipulation;
}

body.sidebar-open {
    overflow: hidden;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
    transition: var(--transition);
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Empty State Component */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 14px;
}

.empty-state-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 6px;
}

.empty-state-desc {
    font-size: 13px;
    color: var(--text-muted);
    max-width: 360px;
    margin: 0 auto 18px;
}

/* Notification Drawer */
.notification-dropdown {
    position: absolute;
    top: 60px;
    right: 24px;
    width: 360px;
    max-height: 480px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.notification-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
}

.notification-list {
    overflow-y: auto;
    max-height: 380px;
}

.notification-item {
    padding: 12px 18px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    gap: 12px;
}

.notification-item:hover {
    background: #f8fafc;
}

.notification-item.unread {
    background: #eff6ff;
}

.notification-item-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #dbeafe;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.notification-item-content h5 {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 2px;
}

.notification-item-content p {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.3;
}

.notification-item-time {
    font-size: 10px;
    color: #94a3b8;
    margin-top: 4px;
}

/* Website Builder Canvas */
.wb-canvas-container {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 24px;
    align-items: flex-start;
}

.wb-sidebar-tools {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
}

.wb-preview-frame {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.wb-block-item {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 6px;
    background: #fff;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 8px;
    cursor: grab;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.wb-block-item:hover {
    border-color: var(--primary);
    background: #ffffff;
}

.wb-block-item.is-dragging {
    cursor: grabbing;
}

.image-upload-preview-box {
    width: 100%;
    height: 140px;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: #f8fafc;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.image-upload-preview-box:hover {
    border-color: var(--primary);
    background-color: #eff6ff;
}

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

a:hover {
    color: var(--primary-hover);
}

/* App Shell Layout */
.app-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.app-sidebar {
    width: var(--sidebar-width);
    background: #0f172a;
    color: #f8fafc;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    transition: var(--transition);
    overflow: hidden;
}

.sidebar-header {
    flex-shrink: 0;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-brand {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-brand i {
    font-size: 22px;
    color: #38bdf8;
}

.sidebar-property-selector {
    flex-shrink: 0;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.property-select-btn {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f8fafc;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 13px;
    transition: var(--transition);
}

.property-select-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-nav {
    padding: 8px 6px 14px 10px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.38) transparent;
}
.sidebar-nav::-webkit-scrollbar {
    width: 6px;
}
.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
    margin: 10px 0;
}
.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.28);
    border-radius: 99px;
}
.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(56, 189, 248, 0.55);
}
.sidebar-nav::-webkit-scrollbar-corner {
    background: transparent;
}

.nav-group-title {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    color: #64748b;
    padding: 12px 12px 6px;
    letter-spacing: 0.5px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: #94a3b8;
    border-radius: var(--radius-sm);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 2px;
    text-decoration: none;
}

.nav-item i {
    font-size: 17px;
    width: 20px;
    text-align: center;
}

.nav-item:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
}

.nav-item.active {
    color: #ffffff;
    background: var(--primary);
    font-weight: 600;
}

.sidebar-footer {
    flex-shrink: 0;
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-profile-badge {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #334155;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #38bdf8;
    font-weight: 600;
    font-size: 13px;
}

/* Main Content Area */
.app-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--bg-body);
}

.app-topbar {
    height: 60px;
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 90;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    color: var(--text-main);
    cursor: pointer;
    padding: 0;
    border-radius: var(--radius-sm);
    line-height: 1;
    width: var(--touch-min);
    height: var(--touch-min);
    min-width: var(--touch-min);
    min-height: var(--touch-min);
    flex-shrink: 0;
}

.mobile-menu-toggle:hover {
    background: var(--bg-surface-subtle);
}

.topbar-heading {
    display: flex;
    flex-direction: column;
}

.topbar-section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
    margin: 0;
}

.topbar-property-subtitle {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 1px;
}

.page-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: var(--transition);
}

.topbar-link-btn:hover {
    background: #f1f5f9;
    color: var(--primary);
}

.lang-selector-select {
    padding: 5px 8px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: #ffffff;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    outline: none;
    transition: var(--transition);
}

.lang-selector-select:focus {
    border-color: var(--primary);
}

/* Admin language switcher — matches topbar style, Google chrome hidden */
.innora-lang {
    position: relative;
    z-index: 50;
}
.innora-lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 0 10px 0 8px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: #ffffff;
    color: #334155;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    transition: var(--transition);
}
.innora-lang-btn:hover {
    background: #f1f5f9;
    color: var(--primary);
    border-color: #cbd5e1;
}
.innora-lang-btn.is-open {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.innora-lang-btn .innora-lang-ico {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eff6ff;
    color: var(--primary);
    font-size: 12px;
}
.innora-lang-code {
    letter-spacing: 0.04em;
    min-width: 1.6em;
}
.innora-lang-caret {
    font-size: 10px;
    opacity: 0.55;
}
.innora-lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 188px;
    padding: 6px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: #ffffff;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.14);
    display: none;
    z-index: 100;
}
.innora-lang-menu.is-open {
    display: grid;
    gap: 2px;
}
.innora-lang-option {
    appearance: none;
    border: 0;
    background: transparent;
    text-align: left;
    padding: 9px 12px;
    border-radius: 8px;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.innora-lang-option:hover {
    background: #f1f5f9;
}
.innora-lang-option.is-active {
    background: #eff6ff;
    color: var(--primary);
}
.innora-lang-option small {
    font-size: 11px;
    font-weight: 800;
    opacity: 0.65;
    letter-spacing: 0.04em;
}

/* Google Website Translator — полностью прячем родную панель/баннер.
   НЕ скрываем вложенные <font> — в них живёт переведённый текст. */
.goog-te-banner-frame.skiptranslate,
.goog-te-banner-frame,
iframe.goog-te-banner-frame,
.goog-te-balloon-frame,
#goog-gt-tt,
.goog-te-balloon,
.goog-tooltip,
.goog-tooltip:hover,
.goog-text-highlight,
#goog-gt-vt,
.VIpgJd-ZVi9od-ORHb-OEVmcd,
.VIpgJd-ZVi9od-l4eHX-hSRGPd,
.VIpgJd-ZVi9od-aZ2wEe-wOHMyf,
.goog-te-spinner-pos {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}
body {
    top: 0 !important;
    position: static !important;
}
html.translated-ltr,
html.translated-rtl {
    margin-top: 0 !important;
}
#google_translate_element {
    position: fixed !important;
    left: -9999px !important;
    top: 0 !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0.01 !important;
    z-index: -1 !important;
}
/* Keep gadget functional; only hide branding visually inside off-screen mount */
#google_translate_element .goog-logo-link {
    display: none !important;
}

.btn-icon {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #475569;
    position: relative;
    transition: var(--transition);
}

.btn-icon:hover {
    background: #f8fafc;
    color: var(--primary);
}

.badge-dot {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--danger);
    border: 2px solid #ffffff;
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(3px);
    z-index: 95;
    transition: opacity 0.2s ease;
}

.sidebar-backdrop.show {
    display: block;
}

.content-wrapper {
    padding: 24px;
    flex: 1;
}

/* UI Cards & Grid */
.card {
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    overflow: hidden;
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-surface);
}

.card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-body {
    padding: 20px;
}

.grid-kpi {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.kpi-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
}

.kpi-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.kpi-icon-blue { background: #eff6ff; color: #2563eb; }
.kpi-icon-green { background: #ecfdf5; color: #10b981; }
.kpi-icon-purple { background: #faf5ff; color: #9333ea; }
.kpi-icon-amber { background: #fffbeb; color: #d97706; }

.kpi-info h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
}

.kpi-info p {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 2px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    outline: none;
}

.btn-primary {
    background: var(--primary);
    color: #ffffff;
}

.btn-primary:hover {
    background: var(--primary-hover);
    color: #ffffff;
}

.btn-secondary {
    background: var(--bg-surface-subtle);
    border-color: var(--border-color);
    color: var(--text-main);
}

.btn-secondary:hover {
    background: #e2e8f0;
}

.btn-success {
    background: var(--success);
    color: #ffffff;
}

.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: var(--danger);
    color: #ffffff;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-warning {
    background: #f59e0b;
    color: #0f172a;
    border-color: #d97706;
}

.btn-warning:hover {
    background: #d97706;
    color: #0f172a;
}

.btn-outline-primary {
    background: transparent;
    border-color: var(--primary);
    color: var(--primary);
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: #ffffff;
}

.btn-outline-secondary {
    background: transparent;
    border-color: var(--border-color);
    color: var(--text-main);
}

.btn-outline-secondary:hover {
    background: var(--bg-surface-subtle);
}

.btn-outline-light {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.35);
    color: #f8fafc;
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.55);
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

/* Finance / 1C export */
.fin-onec-hero .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.4);
}
.fin-onec-export-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
}
.fin-onec-export-grid a.btn {
    justify-content: center;
    text-align: center;
}

/* Forms */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 9px 12px;
    font-size: 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    color: var(--text-main);
    outline: none;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-primary { background: var(--primary, #2563eb); color: #ffffff; }
.badge-primary-subtle { background: var(--primary-light, #dbeafe); color: var(--primary, #2563eb); }
.badge-success { background: var(--success-light); color: var(--success); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-warning { background: var(--warning-light); color: #b45309; }
.badge-info { background: var(--info-light); color: var(--info); }
.badge-secondary { background: var(--bg-surface-subtle); color: var(--secondary); }
.badge-cashless { background: #0284c7; color: #ffffff; }
.badge-cash { background: #16a34a; color: #ffffff; }
.badge-credit { background: #d97706; color: #ffffff; }

/* Table View (Desktop) */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
}

.data-table th {
    background: var(--bg-surface-subtle);
    padding: 12px 16px;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.data-table th.sortable {
    cursor: pointer;
    user-select: none;
}
.data-table th.sortable:hover {
    color: var(--primary);
    background: #eef2ff;
}
.data-table th.sortable.is-sorted {
    color: var(--primary);
}
.data-table th .th-sort-ind {
    margin-left: 4px;
    font-size: 11px;
    opacity: 0.35;
    vertical-align: middle;
}
.data-table th .th-sort-ind.is-on {
    opacity: 1;
}

.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.data-table tbody tr:hover {
    background: #f8fafc;
}

/* Mobile Card View Transformation */
.mobile-card-list {
    display: none;
    flex-direction: column;
    gap: 12px;
}

.mobile-data-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: var(--shadow-sm);
}

.card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #f1f5f9;
}

.card-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.card-row-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    flex-shrink: 0;
    max-width: 38%;
}

.card-row-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    text-align: right;
    min-width: 0;
    max-width: 62%;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Modal Dialog */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(2px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    padding: 16px;
    padding-top: calc(16px + var(--sat));
    padding-bottom: calc(16px + var(--sab));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.modal-backdrop.show {
    opacity: 1;
    visibility: visible;
}

.modal-dialog {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 580px;
    max-height: min(90vh, 90dvh);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    transform: translateY(20px);
    transition: var(--transition);
    overflow: hidden;
}

.modal-backdrop.show .modal-dialog {
    transform: translateY(0);
}

.modal-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-muted);
    cursor: pointer;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 380px;
    width: 100%;
}

.toast {
    background: #0f172a;
    color: #ffffff;
    border-radius: var(--radius-md);
    padding: 14px 18px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: slideInUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transition: var(--transition);
}

.toast.toast-success { border-left: 4px solid var(--success); }
.toast.toast-error { border-left: 4px solid var(--danger); }
.toast.toast-warning { border-left: 4px solid var(--warning); }
.toast.toast-info { border-left: 4px solid var(--info); }

.toast-icon {
    font-size: 20px;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 2px;
}

.toast-message {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: #64748b;
    font-size: 16px;
    cursor: pointer;
}

@keyframes slideInUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #ffffff;
    border-top: 1px solid var(--border-color);
    z-index: 95;
    justify-content: space-around;
    align-items: center;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
}

.bottom-nav-item i {
    font-size: 18px;
}

.bottom-nav-item.active {
    color: var(--primary);
    font-weight: 700;
}

/* Mobile Responsive Breakpoints */
@media (max-width: 991px) {
    .app-sidebar {
        transform: translateX(-100%);
        width: min(86vw, 300px);
        padding-top: var(--sat);
        padding-bottom: var(--sab);
        box-shadow: none;
        visibility: hidden;
        pointer-events: none;
        transition: transform 0.25s ease, box-shadow 0.25s ease, visibility 0.25s;
    }

    .app-sidebar.mobile-open {
        transform: translateX(0);
        box-shadow: 8px 0 32px rgba(15, 23, 42, 0.35);
        visibility: visible;
        pointer-events: auto;
    }

    .app-main {
        margin-left: 0;
        padding-bottom: calc(var(--mobile-nav-height) + var(--sab) + 12px);
        width: 100%;
        max-width: 100vw;
        min-width: 0;
    }

    .mobile-menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .sidebar-backdrop.show {
        display: block;
    }

    .mobile-bottom-nav {
        display: flex;
        height: calc(var(--mobile-nav-height) + var(--sab));
        padding-bottom: var(--sab);
        padding-left: var(--sal);
        padding-right: var(--sar);
    }

    .content-wrapper {
        padding: 14px;
        max-width: 100%;
        overflow-x: hidden;
    }

    .d-none-mobile {
        display: none !important;
    }

    .nav-item {
        min-height: var(--touch-min);
        padding: 12px 16px;
        font-size: 14px;
    }

    /* Responsive Data View Component */
    .responsive-view-table {
        display: none !important;
    }

    .responsive-view-cards,
    .mobile-card-list.responsive-view-cards {
        display: flex !important;
    }

    .modal-backdrop {
        align-items: flex-end;
        justify-content: center;
        padding: 0;
        padding-top: var(--sat);
    }

    .modal-dialog {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        max-height: min(92vh, 92dvh, var(--vv-height, 92dvh)) !important;
        border-radius: 16px 16px 0 0;
        transform: translateY(24px);
    }

    .modal-backdrop.show .modal-dialog {
        transform: translateY(0);
    }

    .modal-header,
    .modal-footer {
        padding-left: calc(16px + var(--sal));
        padding-right: calc(16px + var(--sar));
    }

    .modal-footer {
        padding-bottom: calc(14px + var(--sab));
        flex-wrap: wrap;
        gap: 8px;
    }

    .modal-footer .btn {
        flex: 1 1 auto;
        min-height: var(--touch-min);
    }

    .modal-body {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
}

/* ========== Restaurant POS Terminal ========== */
.pos-terminal {
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #1e293b;
}

.pos-terminal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #020617;
    border-bottom: 1px solid #1e293b;
}

.pos-terminal-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pos-terminal-brand > i {
    font-size: 22px;
    color: #38bdf8;
}

.pos-terminal-brand strong {
    display: block;
    font-size: 12px;
    letter-spacing: 0.08em;
    color: #38bdf8;
}

.pos-terminal-brand span {
    font-size: 13px;
    color: #94a3b8;
}

.pos-terminal-clock {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 18px;
    font-weight: 700;
    color: #f8fafc;
}

.pos-terminal-body {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 0;
    min-height: 620px;
}

.pos-catalog-panel {
    padding: 14px;
    border-right: 1px solid #1e293b;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #111827;
}

.pos-search-row {
    position: relative;
    display: flex;
    gap: 6px;
    align-items: center;
}

.pos-search-row > i {
    position: absolute;
    left: 12px;
    color: #64748b;
    z-index: 1;
}

.pos-search-row .form-control {
    padding-left: 36px;
    background: #0f172a;
    border-color: #334155;
    color: #f1f5f9;
}

.pos-cat-bar {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.pos-cat-bar .btn {
    white-space: nowrap;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.pos-dishes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
    gap: 10px;
    overflow-y: auto;
    max-height: 500px;
    padding-right: 2px;
}

.pos-dish-tile {
    position: relative;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 10px;
    padding: 12px 10px;
    text-align: left;
    color: #e2e8f0;
    cursor: pointer;
    min-height: 118px;
    transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.pos-dish-tile:hover:not(:disabled) {
    transform: translateY(-1px);
    border-color: #38bdf8;
}

.pos-dish-tile.is-selected {
    border-color: #22c55e;
    box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.45);
}

.pos-dish-tile.is-stopped,
.pos-dish-tile:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.pos-dish-avatar {
    width: 100%;
    height: 72px;
    border-radius: 8px;
    background: #0ea5e9;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 22px;
    margin-bottom: 8px;
}

.pos-dish-photo {
    width: 100%;
    height: 72px;
    border-radius: 8px;
    background: #0f172a center/cover no-repeat;
    margin-bottom: 8px;
    border: 1px solid #334155;
}

.pos-dish-name {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 4px;
    max-height: 30px;
    overflow: hidden;
}

.pos-dish-meta {
    font-size: 10px;
    color: #94a3b8;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pos-dish-price {
    font-size: 13px;
    font-weight: 800;
    color: #4ade80;
}

.pos-dish-qty {
    position: absolute;
    top: 6px;
    right: 6px;
    background: #22c55e;
    color: #052e16;
    font-size: 11px;
    font-weight: 800;
    border-radius: 999px;
    padding: 1px 7px;
}

.pos-dish-stop {
    position: absolute;
    top: 6px;
    left: 6px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 4px;
    padding: 1px 5px;
}

.pos-cart-panel {
    padding: 14px;
    background: #0b1220;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pos-section-label {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #94a3b8;
    margin-bottom: 6px;
}

.pos-type-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.pos-cart-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    color: #94a3b8;
}

.pos-cart-items {
    flex: 1;
    min-height: 140px;
    max-height: 200px;
    overflow-y: auto;
    background: #111827;
    border: 1px solid #1e293b;
    border-radius: 8px;
    padding: 8px;
}

.pos-cart-empty {
    text-align: center;
    color: #64748b;
    font-size: 12px;
    padding: 28px 0;
}

.pos-cart-empty i {
    font-size: 24px;
    display: block;
    margin-bottom: 4px;
    opacity: 0.5;
}

.pos-notes-row .pos-note-pills {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.pos-notes-row .badge {
    cursor: pointer;
}

.pos-adjust-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.pos-adjust-row label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    margin-bottom: 2px;
}

.pos-pay-methods {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.pos-pay-option {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: #111827;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 8px 4px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
}

.pos-browse-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.pos-browse-nav strong {
    color: #e2e8f0;
    font-size: 14px;
}
.pos-cat-tile {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    text-align: left;
    padding: 16px;
    border: 1px solid #334155;
    border-radius: 12px;
    background: linear-gradient(160deg, #1e293b 0%, #0f172a 100%);
    color: #e2e8f0;
    cursor: pointer;
    min-height: 110px;
}
.pos-cat-tile:hover {
    border-color: #38bdf8;
    transform: translateY(-1px);
}
.pos-cat-tile i {
    font-size: 22px;
    color: #38bdf8;
}
.pos-cat-tile strong {
    font-size: 15px;
}
.pos-cat-tile span {
    font-size: 12px;
    color: #94a3b8;
}

.pos-cash-calc {
    background: #172554;
    border: 1px solid #1d4ed8;
    border-radius: 8px;
    padding: 10px;
}
.pos-cash-display {
    display: grid;
    gap: 4px;
    margin-bottom: 8px;
    font-size: 12px;
    color: #bfdbfe;
}
.pos-cash-display > div {
    display: flex;
    justify-content: space-between;
}
.pos-cash-change-line strong {
    color: #4ade80;
    font-size: 16px;
}
.pos-cash-pad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 8px;
}
.pos-cash-key {
    padding: 12px 0;
    border: 1px solid #1e3a8a;
    border-radius: 8px;
    background: #0f172a;
    color: #e2e8f0;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}
.pos-cash-key:hover {
    background: #1e293b;
}
.pos-cash-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 6px;
}
.pos-cash-hint {
    font-size: 11px;
    color: #93c5fd;
}

.pos-totals {
    background: #111827;
    border: 1px solid #1e293b;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 12px;
}

.pos-totals > div {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    color: #94a3b8;
}

.pos-total-line {
    border-top: 1px solid #334155;
    padding-top: 8px;
    margin-top: 4px;
    color: #f8fafc !important;
    font-weight: 800;
    font-size: 14px;
}

.pos-total-line span:last-child {
    font-size: 22px;
    color: #4ade80;
}

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

.pos-pay-btn {
    flex: 1;
    font-weight: 800;
    padding: 12px;
    font-size: 14px;
}

.pos-terminal .form-control,
.pos-terminal .form-control-sm,
.pos-terminal select {
    background: #0f172a;
    border-color: #334155;
    color: #f1f5f9;
}

@media (max-width: 900px) {
    .pos-terminal-body {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    .pos-catalog-panel {
        border-right: none;
        border-bottom: 1px solid #1e293b;
    }
    .pos-dishes-grid {
        max-height: 320px;
    }
}

/* ?? Corporate / B2B ?? */
.corp-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 16px;
    align-items: start;
}
.corp-kpi-strip {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.corp-kpi-card {
    margin: 0;
    padding: 14px 16px;
    border-left: 4px solid #0f172a;
    background: #fff;
}
.corp-kpi-card .corp-kpi-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .03em;
}
.corp-kpi-card .corp-kpi-value {
    font-size: 22px;
    font-weight: 800;
    margin-top: 4px;
    line-height: 1.1;
}
.corp-kpi-card .corp-kpi-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}
.corp-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}
.corp-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.corp-filter-chips .btn.active {
    background: #0f172a;
    color: #fff;
    border-color: #0f172a;
}
.corp-company-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}
.corp-company-card {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 14px 16px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
    position: relative;
}
.corp-company-card:hover,
.corp-company-card.is-active {
    border-color: #0f172a;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .08);
}
.corp-company-card .corp-co-name {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 4px;
    padding-right: 72px;
}
.corp-company-card .corp-co-meta {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.45;
}
.corp-company-card .corp-co-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    font-size: 11px;
}
.corp-company-card .corp-co-stats span {
    background: #f1f5f9;
    border-radius: 6px;
    padding: 3px 8px;
    color: #334155;
}
.corp-company-card .corp-co-badge {
    position: absolute;
    top: 12px;
    right: 12px;
}
.corp-event-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.corp-event-card {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 14px 16px;
    background: #fff;
    cursor: pointer;
    display: grid;
    grid-template-columns: 72px 1fr auto;
    gap: 14px;
    align-items: center;
    transition: border-color .15s, box-shadow .15s;
}
.corp-event-card:hover {
    border-color: #0284c7;
    box-shadow: 0 4px 14px rgba(2, 132, 199, .1);
}
.corp-event-date {
    text-align: center;
    background: #f0f9ff;
    border-radius: 8px;
    padding: 8px 4px;
    color: #0369a1;
}
.corp-event-date .d {
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
}
.corp-event-date .m {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 600;
}
.corp-event-body h4 {
    margin: 0 0 4px;
    font-size: 14px;
}
.corp-event-body .meta {
    font-size: 12px;
    color: var(--text-muted);
}
.corp-progress {
    height: 6px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 8px;
    max-width: 180px;
}
.corp-progress > i {
    display: block;
    height: 100%;
    background: #0284c7;
}
.corp-side {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.corp-side-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 14px;
}
.corp-side-card h3 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--text-muted);
    margin: 0 0 10px;
    font-weight: 700;
}
.corp-side-item {
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
    cursor: pointer;
}
.corp-side-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.corp-side-item:hover {
    color: #0284c7;
}
.corp-side-item .sub {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}
.corp-guide {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.corp-guide-step {
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    padding: 14px;
    background: #f8fafc;
}
.corp-guide-step .n {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #0f172a;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 8px;
}
.corp-guide-step h4 {
    margin: 0 0 4px;
    font-size: 13px;
}
.corp-guide-step p {
    margin: 0;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}
.corp-special-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.corp-special-panel {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 16px;
    background: #fff;
    min-height: 280px;
}
.corp-special-panel h3 {
    font-size: 15px;
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.corp-detail-pane {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: #f8fafc;
    padding: 16px;
    min-height: 200px;
    margin-top: 14px;
}
.corp-detail-pane.is-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
}
@media (max-width: 1100px) {
    .corp-layout { grid-template-columns: 1fr; }
    .corp-kpi-strip { grid-template-columns: repeat(2, 1fr); }
    .corp-guide { grid-template-columns: 1fr; }
    .corp-special-grid { grid-template-columns: 1fr; }
    .corp-event-card { grid-template-columns: 64px 1fr; }
    .corp-event-card .corp-event-actions { grid-column: 1 / -1; }
}

/* Form checkbox & range (global) */
input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
    width: 18px;
    height: 18px;
    border: 2px solid #94a3b8;
    border-radius: 4px;
    background-color: #fff;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 12px 12px;
    margin: 0;
    flex-shrink: 0;
    position: relative;
    cursor: pointer;
    vertical-align: middle;
    transition: border-color .15s, background-color .15s, box-shadow .15s;
}
input[type="checkbox"]:checked {
    background-color: #0f172a;
    border-color: #0f172a;
    /* White SVG checkmark ? scales with checkbox size */
    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='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.2l3 3.1 6-6.4'/%3E%3C/svg%3E");
}
input[type="checkbox"]:focus-visible {
    outline: 2px solid #0284c7;
    outline-offset: 2px;
}
input[type="checkbox"]:disabled {
    opacity: .45;
    cursor: not-allowed;
}
.qr-field-check input[type="checkbox"],
.qr-constructor-compact .qr-field-check input[type="checkbox"] {
    background-size: 70% 70%;
}
.form-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-main);
    cursor: pointer;
    user-select: none;
    margin: 0;
}
.form-check-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}
.form-check-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 12px 0 16px;
}
input[type="range"],
.form-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: #e2e8f0;
    outline: none;
    cursor: pointer;
    margin: 8px 0 0;
}
input[type="range"]::-webkit-slider-thumb,
.form-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #0f172a;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #94a3b8, 0 1px 3px rgba(15, 23, 42, .25);
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease;
}
input[type="range"]::-moz-range-thumb,
.form-range::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #0f172a;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #94a3b8, 0 1px 3px rgba(15, 23, 42, .25);
    cursor: pointer;
}
input[type="range"]:hover::-webkit-slider-thumb,
.form-range:hover::-webkit-slider-thumb {
    transform: scale(1.08);
}
input[type="range"]:focus-visible,
.form-range:focus-visible {
    outline: none;
}
input[type="range"]:focus-visible::-webkit-slider-thumb,
.form-range:focus-visible::-webkit-slider-thumb {
    box-shadow: 0 0 0 2px #0284c7, 0 1px 3px rgba(15, 23, 42, .25);
}
input[type="range"]::-moz-range-track,
.form-range::-moz-range-track {
    height: 6px;
    border-radius: 999px;
    background: #e2e8f0;
}
.data-table td.table-empty,
.data-table .table-empty {
    text-align: center !important;
    color: var(--text-muted);
    padding: 28px 16px !important;
    font-size: 13px;
}
.table-empty-icon {
    font-size: 32px;
    margin-bottom: 8px;
    line-height: 1;
}
.table-empty-title {
    font-weight: 700;
    font-size: 15px;
    color: var(--text-main);
    margin-bottom: 4px;
}
.table-empty-desc {
    font-size: 13px;
    color: var(--text-muted);
}
.corp-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}
.corp-side-empty {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.45;
    margin-bottom: 10px;
}
.corp-btn-block { width: 100%; }
.corp-btn-block + .corp-btn-block { margin-top: 6px; }
.corp-special-intro {
    margin: 0 0 14px;
    padding: 14px 16px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 10px;
}
.corp-special-intro h3 {
    margin: 0 0 8px;
    font-size: 15px;
}
.corp-special-intro .corp-prose {
    font-size: 13px;
    line-height: 1.55;
    color: var(--text-muted);
}
.corp-special-intro .corp-prose p { margin: 0 0 8px; }
.corp-special-intro .corp-prose p:last-child { margin-bottom: 0; }
.corp-panel-help {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0 0 12px;
    line-height: 1.45;
}
.corp-inline-form {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
    align-items: end;
}
.corp-tariff-form {
    display: grid;
    grid-template-columns: 1fr 1.2fr 80px 1fr auto;
    gap: 8px;
    margin-top: 8px;
    align-items: end;
}
.corp-contact-form {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr 1fr auto;
    gap: 8px;
    margin-top: 8px;
    align-items: end;
}
.corp-scroll-table { max-height: 320px; overflow: auto; }
.corp-muted-line { font-size: 12px; color: var(--text-muted); }
.w-full { width: 100%; }
.mb-0 { margin-bottom: 0; }
.mt-3 { margin-top: 12px; }

/* Front Desk ? guest reception requests */
.fd-rx-shell { display: flex; flex-direction: column; gap: 14px; }
.fd-rx-hero {
    display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center;
    padding: 16px 18px; border-radius: 16px;
    background: linear-gradient(120deg, rgba(14,165,233,.12), rgba(99,102,241,.1));
    border: 1px solid rgba(14,165,233,.18);
}
.fd-rx-hero-title { font-size: 16px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.fd-rx-hero-sub { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.fd-rx-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.fd-rx-chip {
    border: 1px solid var(--border-color); background: var(--card-bg, #fff); color: var(--text-main);
    border-radius: 999px; padding: 8px 12px; font-size: 12px; font-weight: 700; cursor: pointer;
}
.fd-rx-chip b { margin-left: 4px; color: var(--primary); }
.fd-rx-chip.is-on { background: #0f172a; color: #fff; border-color: #0f172a; }
.fd-rx-chip.is-on b { color: #93c5fd; }
.fd-rx-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px;
}
.fd-rx-card {
    background: var(--card-bg, #fff); border: 1px solid var(--border-color); border-radius: 16px;
    padding: 14px; display: flex; flex-direction: column; gap: 10px;
    border-top: 3px solid #94a3b8; box-shadow: 0 8px 20px rgba(15,23,42,.04);
}
.fd-rx-card.is-new { border-top-color: #f59e0b; }
.fd-rx-card.is-prog { border-top-color: #0ea5e9; }
.fd-rx-card.is-done { border-top-color: #22c55e; }
.fd-rx-card-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.fd-rx-badge {
    font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
    padding: 4px 8px; border-radius: 999px; background: #f1f5f9; color: #334155;
}
.fd-rx-card.is-new .fd-rx-badge { background: rgba(245,158,11,.15); color: #b45309; }
.fd-rx-card.is-prog .fd-rx-badge { background: rgba(14,165,233,.15); color: #0369a1; }
.fd-rx-card.is-done .fd-rx-badge { background: rgba(34,197,94,.15); color: #15803d; }
.fd-rx-card-top time { font-size: 11px; color: var(--text-muted); }
.fd-rx-guest { display: flex; gap: 10px; align-items: center; }
.fd-rx-avatar {
    width: 40px; height: 40px; border-radius: 12px; background: #0f172a; color: #fff;
    display: inline-flex; align-items: center; justify-content: center; font-weight: 800;
}
.fd-rx-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.fd-rx-topic {
    font-size: 12px; font-weight: 700; color: var(--primary);
    background: rgba(37,99,235,.08); border-radius: 8px; padding: 6px 8px; width: fit-content;
}
.fd-rx-msg {
    margin: 0; font-size: 13px; line-height: 1.45; color: var(--text-main);
    white-space: pre-wrap; flex: 1; min-height: 40px;
}
.fd-rx-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.fd-rx-empty {
    text-align: center; padding: 48px 20px; color: var(--text-muted);
    border: 1px dashed var(--border-color); border-radius: 16px;
}
.fd-rx-empty i { font-size: 36px; display: block; margin-bottom: 10px; }
.fd-rx-empty strong { display: block; color: var(--text-main); margin-bottom: 6px; }

/* QR room cards */
.qr-room-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px;
}
.qr-room-card {
    border: 1px solid var(--border-color); border-radius: 16px; padding: 14px;
    background: var(--card-bg, #fff); display: flex; flex-direction: column; gap: 10px;
}
.qr-room-card-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.qr-room-preview {
    display: flex; gap: 12px; align-items: center;
    background: linear-gradient(145deg, #0f766e, #115e59); color: #fff;
    border-radius: 14px; padding: 12px;
}
.qr-room-preview img {
    width: 72px; height: 72px; border-radius: 10px; background: #fff; padding: 4px;
}
.qr-room-preview strong { display: block; font-size: 13px; }
.qr-room-preview span { font-size: 11px; opacity: .85; }
.qr-room-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.qr-tab-card > .qr-tab-body {
    padding: 0;
}
.qr-tab-card .settings-layout {
    border: 0;
    border-radius: 0;
    min-height: 480px;
}
.qr-constructor-in-panel {
    border: 0;
    border-radius: 0;
    padding: 0;
    background: transparent;
}
.qr-constructor-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}
.qr-room-num { font-size: 16px; }
.qr-room-type { font-size: 12px; color: var(--text-muted); }
.qr-room-url { margin-top: 6px; font-size: 10px; opacity: .8; word-break: break-all; }
.qr-room-missing {
    padding: 18px;
    border: 1px dashed var(--border-color);
    border-radius: 12px;
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
}
.qr-poster-constructor { margin-bottom: 8px; }
.qr-constructor-shell {
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px;
    background: linear-gradient(180deg, #f8fafc, #fff);
}
.qr-constructor-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-start;
    margin-bottom: 14px;
}
.qr-constructor-title {
    margin: 0;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.qr-constructor-sub {
    margin: 4px 0 0;
    font-size: 12px;
    color: var(--text-muted);
}
.qr-constructor-hint {
    font-size: 12px;
    color: var(--text-muted);
    align-self: center;
}
.qr-constructor-grid {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 18px;
}
@media (max-width: 900px) {
    .qr-constructor-grid { grid-template-columns: 1fr; }
}
.qr-constructor-label {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.qr-constructor-label-gap { margin-top: 14px; }
.qr-style-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 10px;
}
.qr-style-card {
    appearance: none;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: #fff;
    padding: 10px;
    text-align: left;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.qr-style-card strong { font-size: 13px; }
.qr-style-card small { font-size: 11px; color: var(--text-muted); }
.qr-style-card.is-on {
    border-color: #0f766e;
    box-shadow: 0 0 0 2px rgba(15, 118, 110, .18);
}
.qr-style-swatch {
    height: 42px;
    border-radius: 10px;
    margin-bottom: 4px;
}
.qr-style-card.style-teal .qr-style-swatch { background: linear-gradient(135deg, #0b3d3a, #14b8a6); }
.qr-style-card.style-midnight .qr-style-swatch { background: linear-gradient(135deg, #0f172a, #6366f1); }
.qr-style-card.style-champagne .qr-style-swatch { background: linear-gradient(135deg, #443022, #d4af78); }
.qr-style-card.style-forest .qr-style-swatch { background: linear-gradient(135deg, #143024, #22c55e); }
.qr-style-card.style-minimal .qr-style-swatch { background: linear-gradient(135deg, #f8fafc, #cbd5e1); border: 1px solid #e2e8f0; }
.qr-layout-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 10px;
}
.qr-layout-card {
    appearance: none;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: #fff;
    padding: 10px;
    text-align: left;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.qr-layout-card strong { font-size: 13px; }
.qr-layout-card small { font-size: 11px; color: var(--text-muted); }
.qr-layout-card.is-on {
    border-color: #0f766e;
    box-shadow: 0 0 0 2px rgba(15, 118, 110, .18);
}
.qr-layout-preview {
    height: 42px;
    border-radius: 10px;
    margin-bottom: 4px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden;
}
.qr-layout-preview::before,
.qr-layout-preview::after {
    content: '';
    position: absolute;
    background: #94a3b8;
    border-radius: 2px;
}
.qr-layout-card.layout-classic .qr-layout-preview::before {
    left: 18%; right: 18%; top: 10%; height: 42%; border-radius: 4px; background: #cbd5e1;
}
.qr-layout-card.layout-classic .qr-layout-preview::after {
    left: 18%; right: 18%; bottom: 10%; height: 28%;
    background: repeating-linear-gradient(#94a3b8, #94a3b8 3px, transparent 3px, transparent 6px);
}
.qr-layout-card.layout-split .qr-layout-preview::before {
    left: 10%; width: 36%; top: 14%; bottom: 14%; border-radius: 4px; background: #cbd5e1;
}
.qr-layout-card.layout-split .qr-layout-preview::after {
    right: 10%; width: 36%; top: 14%; bottom: 14%;
    background: repeating-linear-gradient(#94a3b8, #94a3b8 3px, transparent 3px, transparent 6px);
}
.qr-layout-card.layout-spotlight .qr-layout-preview::before {
    left: 28%; right: 28%; top: 16%; bottom: 28%; border-radius: 6px; background: #64748b;
}
.qr-layout-card.layout-spotlight .qr-layout-preview::after {
    left: 16%; right: 16%; bottom: 10%; height: 12%; border-radius: 3px;
}
.qr-layout-card.layout-banner .qr-layout-preview::before {
    left: 0; right: 0; top: 0; height: 28%; border-radius: 0; background: #64748b;
}
.qr-layout-card.layout-banner .qr-layout-preview::after {
    left: 22%; right: 22%; top: 40%; bottom: 14%; border-radius: 4px; background: #cbd5e1;
}
.qr-layout-card.layout-stack .qr-layout-preview::before {
    left: 14%; right: 14%; top: 10%; height: 34%; border-radius: 4px; background: #cbd5e1;
}
.qr-layout-card.layout-stack .qr-layout-preview::after {
    left: 14%; right: 14%; top: 52%; bottom: 10%;
    background:
        linear-gradient(#94a3b8, #94a3b8) 0 0 / 100% 28% no-repeat,
        linear-gradient(#94a3b8, #94a3b8) 0 38% / 100% 28% no-repeat,
        linear-gradient(#94a3b8, #94a3b8) 0 76% / 100% 24% no-repeat;
}
.qr-field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 10px;
}
.qr-field-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    padding: 6px 8px;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
}
.qr-field-check:hover { background: #f1f5f9; }
.qr-field-check input[type="checkbox"] { width: 16px; height: 16px; }

/* Compact QR poster constructor */
.qr-constructor-compact { padding: 10px 12px; border-radius: 10px; background: #fff; }
.qr-constructor-compact .qr-constructor-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 8px; margin-bottom: 8px; flex-wrap: wrap;
}
.qr-constructor-compact .qr-constructor-title {
    margin: 0; font-size: 13px; font-weight: 800; display: inline-flex; align-items: center; gap: 6px;
}
.qr-constructor-toolbar {
    display: grid;
    grid-template-columns: 110px 1fr 1fr 1fr;
    gap: 6px;
    margin: 8px 0;
}
.qr-constructor-compact .qr-style-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
}
.qr-constructor-compact .qr-layout-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 4px;
}
.qr-constructor-compact .qr-constructor-label {
    font-size: 10px;
    margin: 6px 0 4px;
}
.qr-constructor-compact .qr-constructor-label-gap { margin-top: 8px; }
.qr-constructor-compact .qr-style-card,
.qr-constructor-compact .qr-layout-card {
    padding: 5px; border-radius: 8px; gap: 2px; min-width: 0;
}
.qr-constructor-compact .qr-style-swatch,
.qr-constructor-compact .qr-layout-preview { height: 22px; border-radius: 5px; margin-bottom: 0; }
.qr-constructor-compact .qr-style-card strong,
.qr-constructor-compact .qr-layout-card strong {
    font-size: 10px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.qr-constructor-compact .qr-style-card small,
.qr-constructor-compact .qr-layout-card small { display: none; }
.qr-constructor-compact .qr-field-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2px 6px;
}
.qr-constructor-compact .qr-field-check {
    padding: 3px 4px; font-size: 11px; gap: 5px;
}
.qr-constructor-compact .qr-field-check input[type="checkbox"] { width: 14px; height: 14px; }
.qr-constructor-hint { font-size: 11px; color: var(--text-muted); }
@media (max-width: 900px) {
    .qr-constructor-toolbar { grid-template-columns: 1fr 1fr; }
    .qr-constructor-compact .qr-style-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .qr-constructor-compact .qr-field-grid { grid-template-columns: 1fr 1fr; }
}

/* Accommodation type cards */
.acc-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 18px;
}
.acc-type-card {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border-color);
}
.acc-type-cover {
    position: relative;
    height: 180px;
    background: #e2e8f0 center/cover no-repeat;
}
.acc-type-cover-fade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.7) 0%, transparent 60%);
}
.acc-type-badge-cat {
    position: absolute;
    top: 12px;
    left: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    background: #2563eb;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
}
.acc-type-badge-photos {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0,0,0,.65);
    color: #fff;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 4px;
}
.acc-type-cover-meta {
    position: absolute;
    bottom: 12px;
    left: 14px;
    right: 14px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 10px;
}
.acc-type-name {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 1px 3px rgba(0,0,0,.8);
}
.acc-type-code { color: rgba(255,255,255,.85); font-size: 11px; }
.acc-type-price-wrap { text-align: right; }
.acc-type-price {
    color: #fff;
    font-size: 17px;
    font-weight: 800;
    text-shadow: 0 1px 3px rgba(0,0,0,.8);
}
.acc-type-price-wrap small { color: rgba(255,255,255,.75); font-size: 10px; }
.acc-type-body {
    padding: 14px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
}
.acc-type-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.acc-type-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
    margin: 0 0 8px;
}
.acc-type-thumbs {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}
.acc-type-thumb {
    width: 44px;
    height: 32px;
    border-radius: 4px;
    background: #e2e8f0 center/cover no-repeat;
    border: 1px solid #cbd5e1;
    flex-shrink: 0;
}
.acc-type-thumb-more {
    background: #0f172a;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
}
.acc-type-amenities-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
}
.acc-type-amenities {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 8px;
}
.acc-type-amenity {
    background: #f1f5f9;
    color: #334155;
    font-size: 11px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 6px;
}
.acc-type-amenity i { color: var(--primary); margin-right: 2px; }
.acc-type-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}
.acc-type-btn-main { flex: 1; }
.rest-dish-desc {
    font-size: 11px;
    color: var(--text-muted);
    margin: 4px 0 10px;
    line-height: 1.3;
}


/* Kitchen hub ? presence, guides, layout */
.k-presence {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    white-space: nowrap;
    line-height: 1.2;
}
.k-presence-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.k-presence.is-online {
    background: rgba(34, 197, 94, .12);
    color: #15803d;
}
.k-presence.is-online .k-presence-dot {
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, .2);
}
.k-presence.is-offline {
    background: rgba(239, 68, 68, .1);
    color: #b91c1c;
}
.k-presence.is-offline .k-presence-dot { background: #ef4444; }
.k-presence.is-unknown {
    background: #f1f5f9;
    color: #64748b;
}
.k-presence.is-unknown .k-presence-dot { background: #94a3b8; }
.k-presence-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
}
.k-presence-row:last-child { border-bottom: 0; }
.k-guide {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-main);
    margin-bottom: 14px;
}
.k-guide-steps {
    margin: 8px 0 0;
    padding-left: 18px;
}
.k-guide-steps li { margin-bottom: 4px; }
.k-guide code {
    font-size: 12px;
    background: #e2e8f0;
    padding: 1px 6px;
    border-radius: 4px;
}
.k-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
    margin-bottom: 14px;
}
.k-form-row > div { min-width: 140px; flex: 1; }
.k-form-row-tight { margin-top: 10px; }
.k-code-input { max-width: 110px; flex: 0 0 110px; }
.k-muted { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.k-hint, .k-error { font-size: 13px; margin-bottom: 10px; }
.k-error { color: #b91c1c; }
.k-token code {
    font-size: 11px;
    word-break: break-all;
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
}
.k-actions-cell {
    white-space: nowrap;
    vertical-align: middle;
    text-align: right;
}
.k-actions {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: flex-end;
    align-items: center;
    max-width: 100%;
}
.k-items { font-size: 12px; max-width: 320px; }
.k-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}
.k-kpi {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 14px;
}
.k-kpi-num { font-size: 22px; font-weight: 800; color: var(--text-main); }
.k-kpi-num.is-warn { color: #d97706; }
.k-kpi-num.is-info { color: #0284c7; }
.k-kpi-num.is-ok { color: #16a34a; }
.k-kpi-num.is-bad { color: #dc2626; }
.k-monitor-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.k-panel { padding: 14px 16px; }
.k-panel h4 { margin: 0 0 8px; font-size: 14px; }
.k-settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.k-section-gap { margin-top: 22px; }
.k-save-btn { margin-top: 4px; }
@media (max-width: 900px) {
    .k-kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .k-monitor-grid, .k-settings-grid { grid-template-columns: 1fr; }
}

/* Print agent (admin inline) */
.k-pa-log {
    background: var(--bg-surface-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    font-size: 12px;
    max-height: 160px;
    overflow: auto;
    white-space: pre-wrap;
    font-family: ui-monospace, Consolas, monospace;
    color: var(--text-main);
    margin: 0;
}
#pa-inline-status.is-err { color: var(--danger); }
#pa-inline-status.is-ok { color: var(--success); }

/* Hide Leaflet attribution on all maps */
.leaflet-control-attribution,
.leaflet-bottom.leaflet-right {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Hotel settings: sidebar categories */
.settings-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 0;
    min-height: 520px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-surface);
}
.settings-nav {
    background: #f8fafc;
    border-right: 1px solid var(--border-color);
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.settings-nav-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    color: var(--text-main);
    font-size: 13px;
    font-weight: 600;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}
.settings-nav-btn i { color: var(--text-muted); font-size: 15px; width: 18px; text-align: center; }
.settings-nav-btn:hover { background: #eef2ff; }
.settings-nav-btn.is-active {
    background: #eff6ff;
    color: var(--primary);
}
.settings-nav-btn.is-active i { color: var(--primary); }
.settings-nav-hint {
    font-size: 10px;
    font-weight: 500;
    color: var(--text-muted);
    margin-top: 2px;
    line-height: 1.3;
}
.settings-panels {
    padding: 18px 20px 24px;
    max-height: calc(100vh - 180px);
    overflow-y: auto;
}
.settings-panel { display: none; }
.settings-panel.is-active { display: block; }
.settings-panel-title {
    font-size: 16px;
    font-weight: 800;
    margin: 0 0 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.settings-panel-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0 0 16px;
    line-height: 1.45;
}
.settings-sticky-save {
    position: sticky;
    bottom: 0;
    background: linear-gradient(180deg, transparent, #fff 28%);
    padding-top: 16px;
    margin-top: 8px;
}
@media (max-width: 900px) {
    .settings-layout {
        grid-template-columns: 1fr;
    }
    .settings-nav {
        flex-direction: row;
        flex-wrap: wrap;
        border-right: 0;
        border-bottom: 1px solid var(--border-color);
    }
    .settings-nav-btn {
        flex: 1 1 auto;
        min-width: 140px;
    }
    .settings-nav-hint { display: none; }
    .settings-panels { max-height: none; }
}

/* Yield pricing — preset picker */
.yield-presets-menu {
    position: relative;
    display: inline-block;
}
.yield-presets-panel {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 120;
    width: min(420px, calc(100vw - 32px));
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
    overflow: hidden;
}
.yield-presets-panel.is-open {
    display: block;
}
.yield-presets-head {
    padding: 12px 14px 10px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(180deg, #f8fafc, #fff);
}
.yield-presets-head-title {
    font-size: 13px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.01em;
}
.yield-presets-head-sub {
    margin-top: 2px;
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.35;
}
.yield-presets-list {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.yield-preset-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    text-align: left;
    padding: 10px 10px 11px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    color: inherit;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.yield-preset-item:hover,
.yield-preset-item:focus-visible {
    background: var(--primary-light);
    border-color: #bfdbfe;
    box-shadow: 0 1px 0 rgba(37, 99, 235, 0.06);
    outline: none;
}
.yield-preset-icon {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}
.yield-preset-icon.is-blue { background: #eff6ff; color: #2563eb; }
.yield-preset-icon.is-red { background: #fef2f2; color: #dc2626; }
.yield-preset-icon.is-violet { background: #ede9fe; color: #7c3aed; }
.yield-preset-icon.is-amber { background: #fffbeb; color: #d97706; }
.yield-preset-body {
    min-width: 0;
    flex: 1;
}
.yield-preset-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.yield-preset-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
}
.yield-preset-tag {
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 2px 7px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
}
.yield-preset-desc {
    margin-top: 2px;
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.4;
}
.yield-preset-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
}
.yield-preset-chip {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #334155;
    white-space: nowrap;
}

.innora-dialog { display:flex; gap:14px; align-items:flex-start; }
.innora-dialog-ico { width:42px; height:42px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center; font-size:20px; flex-shrink:0; }
.innora-dialog-text { margin:6px 0 0; font-size:14px; line-height:1.55; color:var(--text-main, #1e293b); }
.innora-prompt .innora-dialog-text { margin:0 0 12px; }
.wh-page { display:flex; flex-direction:column; gap:16px; }
.wh-layout { display:grid; grid-template-columns:232px minmax(0,1fr); min-height:560px; align-items:stretch; }
.wh-side { background:#f8fafc; border-right:1px solid var(--border-color); padding:10px 8px 16px; display:flex; flex-direction:column; gap:2px; overflow-y:auto; max-height:calc(100vh - 170px); }
.wh-nav-label { font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.04em; color:var(--text-muted); padding:10px 12px 6px; }
.wh-nav-btn { display:flex; align-items:center; gap:8px; width:100%; text-align:left; border:0; background:transparent; color:var(--text-main); font-size:13px; font-weight:600; padding:8px 10px; border-radius:8px; cursor:pointer; }
.wh-nav-btn i { color:var(--text-muted); font-size:14px; width:16px; text-align:center; flex-shrink:0; }
.wh-nav-btn:hover { background:#eef2ff; }
.wh-nav-btn.is-active { background:#eff6ff; color:var(--primary); }
.wh-nav-btn.is-active i { color:var(--primary); }
.wh-nav-count { margin-left:auto; font-size:10px; font-weight:700; color:var(--text-muted); background:#e2e8f0; border-radius:999px; min-width:20px; text-align:center; padding:1px 6px; }
.wh-nav-btn.is-active .wh-nav-count { background:#dbeafe; color:var(--primary); }
.wh-main { padding:16px 18px 24px; overflow-y:auto; max-height:calc(100vh - 170px); display:flex; flex-direction:column; gap:14px; }
.wh-main-hd { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; flex-wrap:wrap; }
.wh-main-title { font-size:16px; font-weight:800; margin:0 0 4px; display:flex; align-items:center; gap:8px; }
.wh-main-title i { color:var(--primary); }
.rs-dish-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(250px,1fr)); gap:14px; }
.rs-dish-card { margin:0; overflow:hidden; display:flex; flex-direction:column; justify-content:space-between; border:1px solid var(--border-color); background:#fff; border-radius:12px; }
.rs-dish-card.is-off { border-color:#fca5a5; opacity:.9; background:#fff5f5; }
@media (max-width: 900px) {
    .wh-layout { grid-template-columns:1fr; }
    .wh-side { flex-direction:row; flex-wrap:wrap; max-height:none; border-right:0; border-bottom:1px solid var(--border-color); }
    .wh-nav-label { width:100%; padding-bottom:0; }
    .wh-nav-btn { width:auto; }
    .wh-main { max-height:none; }
}
.wh-toolbar { display:flex; justify-content:space-between; gap:16px; flex-wrap:wrap; align-items:flex-end; padding:14px 16px; background:#fff; border:1px solid var(--border-color); border-radius:12px; }
.wh-toolbar-dates { display:flex; gap:10px; align-items:flex-end; flex-wrap:wrap; }
.wh-toolbar-dates label { font-size:11px; font-weight:700; color:var(--text-muted); display:flex; flex-direction:column; gap:4px; text-transform:uppercase; letter-spacing:.02em; }
.wh-kpi { display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:12px; margin-bottom:0; }
.wh-kpi-card { background:#fff; border:1px solid var(--border-color); border-radius:12px; padding:14px 16px; display:flex; gap:12px; align-items:center; box-shadow:0 1px 2px rgba(15,23,42,.04); }
.wh-kpi-ico { width:40px; height:40px; border-radius:10px; background:#f1f5f9; display:inline-flex; align-items:center; justify-content:center; font-size:18px; color:var(--primary); flex-shrink:0; }
.wh-kpi-card.warn { background:#fffbeb; border-color:#fde68a; }
.wh-kpi-card.warn .wh-kpi-ico { background:#fef3c7; color:#b45309; }
.wh-kpi-card.danger { background:#fef2f2; border-color:#fecaca; }
.wh-kpi-card.danger .wh-kpi-ico { background:#fee2e2; color:#b91c1c; }
.wh-kpi-n { font-size:22px; font-weight:800; line-height:1.1; }
.wh-kpi-l { font-size:11px; color:var(--text-muted); margin-top:3px; }
.wh-panel { background:#fff; border:1px solid var(--border-color); border-radius:12px; overflow:hidden; box-shadow:0 1px 2px rgba(15,23,42,.04); }
.wh-panel-hd { padding:12px 16px; border-bottom:1px solid var(--border-color); background:#f8fafc; }
.wh-panel-title { font-size:13px; font-weight:800; display:flex; align-items:center; gap:8px; }
.wh-panel-title i { color:var(--primary); }
.wh-panel-bd { padding:0; }
.wh-panel-bd .responsive-data-view { margin:0; }
.wh-panel-bd .data-table { margin:0; }
.wh-empty { padding:28px 16px; text-align:center; color:var(--text-muted); font-size:13px; }
.wh-qty-cell { font-weight:800; color:var(--primary); }
.wh-head { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; flex-wrap:wrap; margin-bottom:16px; }
.wh-title { font-size:16px; font-weight:800; margin:0 0 4px; }
.wh-lead { font-size:12px; color:var(--text-muted); margin:0; max-width:420px; }
.wh-h4 { font-size:14px; font-weight:800; margin:22px 0 10px; }
.wh-muted { font-size:12px; color:var(--text-muted); }
.wh-product-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(160px,1fr)); gap:10px; }
.wh-product-card { border:1px solid var(--border-color); border-radius:var(--radius-md); padding:12px; background:#fff; }
.wh-product-card.is-low { border-color:#fecaca; background:#fff5f5; }
.wh-product-cat { font-size:10px; font-weight:700; text-transform:uppercase; color:var(--text-muted); }
.wh-product-name { font-weight:700; margin:4px 0; }
.wh-product-qty { font-size:15px; font-weight:800; color:var(--primary); }
.wh-lot-expired { background:#fff5f5; }
.wh-lot-expiring { background:#fffbeb; }
.wh-recipe-line { font-size:11px; color:#334155; margin-top:6px; line-height:1.35; }
.wh-recipe-missing { font-size:11px; color:#b45309; margin-top:6px; }
.wh-recipe-row { display:grid; grid-template-columns:1fr 90px 72px 36px; gap:6px; margin-bottom:6px; align-items:center; }
.wh-report-filters { display:flex; gap:12px; align-items:flex-end; flex-wrap:wrap; margin-bottom:16px; }
.wh-report-filters label { font-size:12px; font-weight:600; color:var(--text-muted); display:flex; flex-direction:column; gap:4px; }

/* Website builder — block structure */
.wb-block-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 6px;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.wb-block-item.is-dragging {
    opacity: 0.55;
    border-style: dashed;
}
.wb-block-item.drag-over {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
    background: #f8fafc;
}
.wb-block-drag {
    flex-shrink: 0;
    width: 22px;
    color: #94a3b8;
    cursor: grab;
    padding-top: 4px;
    text-align: center;
    user-select: none;
}
.wb-block-drag:active { cursor: grabbing; }
.wb-block-meta {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}
.wb-block-title-row {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}
.wb-block-type {
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 700;
}
.wb-block-name {
    font-size: 12px;
    color: var(--text-main);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.wb-block-desc {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.wb-block-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
    max-width: 118px;
}
.wb-block-actions .btn {
    padding: 2px 6px;
    font-size: 11px;
}

/* PWA / mobile app shell */
.pwa-install-banner {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    z-index: 120;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #0f172a;
    color: #f8fafc;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.35);
}
.pwa-install-banner[hidden] { display: none !important; }
.pwa-install-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 12px;
    line-height: 1.35;
    min-width: 0;
}
.pwa-install-copy strong { font-size: 13px; }
.pwa-install-actions { display: flex; gap: 6px; flex-shrink: 0; }

body.innora-standalone .app-topbar {
    padding-top: calc(10px + env(safe-area-inset-top, 0px));
}
body.innora-standalone .mobile-bottom-nav {
    height: calc(60px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
}
body.innora-standalone .app-main {
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
}

@media (max-width: 991px) {
    .app-topbar {
        position: sticky;
        top: 0;
        z-index: 80;
        gap: 6px;
        padding: 6px 10px;
        padding-left: calc(10px + var(--sal));
        padding-right: calc(10px + var(--sar));
        min-height: 52px;
        height: auto;
        flex-wrap: nowrap;
        transition: transform 0.28s ease, box-shadow 0.28s ease;
        will-change: transform;
    }
    .app-topbar.is-hidden {
        transform: translateY(calc(-100% - 2px));
        box-shadow: none;
        pointer-events: none;
    }
    .topbar-left {
        min-width: 0;
        flex: 1;
        gap: 6px;
    }
    .topbar-heading {
        min-width: 0;
        flex: 1;
    }
    .topbar-section-title,
    .page-title {
        font-size: 15px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }
    .topbar-property-subtitle {
        font-size: 11px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: min(42vw, 160px);
    }
    .topbar-right {
        gap: 2px;
        flex-wrap: nowrap;
        flex-shrink: 0;
        align-items: center;
    }
    .topbar-right > * {
        flex-shrink: 0;
    }
    .mobile-menu-toggle {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
        border-radius: 10px;
        background: #f1f5f9;
        border: 1px solid var(--border-color);
        font-size: 20px;
    }
    .topbar-link-btn,
    .innora-lang-btn,
    .app-topbar .btn-icon {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
        padding: 0;
        justify-content: center;
        align-items: center;
        border-radius: 10px;
        gap: 0;
    }
    .topbar-link-btn span,
    .topbar-right .btn-label,
    .innora-lang-btn .innora-lang-code,
    .innora-lang-btn .innora-lang-caret {
        display: none !important;
    }
    .innora-lang-btn .innora-lang-ico {
        width: auto;
        height: auto;
        background: transparent;
        font-size: 18px;
    }
    .app-topbar .btn-icon {
        font-size: 18px;
        position: relative;
    }
    .content-wrapper {
        padding: 12px;
    }
    .card, .panel, .kpi-card, .settings-layout, .wb-canvas-container {
        border-radius: 12px;
        max-width: 100%;
    }
    .card-header {
        flex-wrap: wrap;
        gap: 10px;
        align-items: flex-start;
    }
    .card-header > div:last-child,
    .card-actions,
    .toolbar-actions {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }
    .card-header .btn,
    .card-actions .btn,
    .toolbar-actions .btn {
        min-height: var(--touch-min);
    }
    .wb-canvas-container {
        grid-template-columns: 1fr !important;
    }
    .wb-preview-frame iframe {
        height: 420px !important;
    }

    /* Tables: scroll only inside wrapper; cards hide the table */
    .table-responsive,
    .table-responsive-wrapper,
    .table-scroll,
    .responsive-data-view {
        margin: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
    }
    .responsive-data-view:has(.responsive-view-cards) {
        overflow: visible;
    }
    .table-scroll > table.data-table:not(.responsive-view-table),
    .table-responsive > table.data-table:not(.responsive-view-table),
    .table-responsive-wrapper > table.data-table:not(.responsive-view-table) {
        min-width: 640px;
    }
    table.data-table.responsive-view-table {
        min-width: 0 !important;
    }

    .mobile-data-card {
        border-radius: 12px;
        padding: 14px;
        margin-bottom: 0;
        background: var(--bg-surface);
        border: 1px solid var(--border-color);
        box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
        overflow: hidden;
    }
    .mobile-data-card .btn,
    .mobile-data-card .btn-sm {
        min-height: 40px;
        min-width: 40px;
        padding: 8px 12px;
    }
    .mobile-data-card .mcard-title {
        font-weight: 700;
        font-size: 14px;
        margin-bottom: 6px;
        overflow-wrap: anywhere;
    }
    .mobile-data-card .mcard-row {
        display: flex;
        justify-content: space-between;
        gap: 10px;
        font-size: 12px;
        padding: 4px 0;
        border-bottom: 1px dashed var(--border-color);
    }
    .mobile-data-card .mcard-row:last-child { border-bottom: none; }

    .bottom-nav-item {
        flex: 1;
        min-width: 0;
        min-height: var(--touch-min);
        padding: 6px 2px;
        border: none;
        background: transparent;
        font-family: inherit;
        -webkit-tap-highlight-color: transparent;
    }
    .bottom-nav-item span {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .bottom-nav-item i {
        font-size: 20px;
    }

    .form-row,
    .filters-bar,
    .toolbar-row,
    .fd-subtab-bar,
    .unit-filter-bar,
    .settings-tabs,
    .subtabs {
        flex-direction: column;
        align-items: stretch !important;
        gap: 8px;
    }
    .filters-bar,
    .toolbar-row,
    .fd-subtab-bar,
    .unit-filter-bar,
    .settings-tabs,
    .subtabs {
        flex-direction: row !important;
        flex-wrap: wrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 2px;
    }
    .filters-bar .btn,
    .fd-subtab-btn,
    .unit-filter-btn,
    .subtab-btn {
        flex: 0 0 auto;
        white-space: nowrap;
        min-height: 40px;
    }

    .form-group {
        width: 100%;
        min-width: 0;
    }
    .form-control,
    .form-select,
    select,
    input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
    textarea {
        font-size: 16px !important; /* iOS: prevent input zoom */
        min-height: var(--touch-min);
        max-width: 100%;
    }
    textarea {
        min-height: 88px;
    }
    .btn {
        min-height: var(--touch-min);
    }
    .btn-sm {
        min-height: 40px;
        padding: 8px 12px;
    }
    .btn-icon,
    .btn-icon-only {
        min-width: var(--touch-min);
        min-height: var(--touch-min);
    }

    .kpi-grid,
    .stats-grid,
    .dashboard-kpis,
    .dash-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }
    .kpi-card,
    .stat-card {
        min-width: 0;
        overflow: hidden;
    }
    .kpi-card .kpi-value,
    .stat-card .stat-value {
        font-size: clamp(18px, 5vw, 24px);
        overflow-wrap: anywhere;
    }

    .toast-container,
    #toast-container {
        left: 12px !important;
        right: 12px !important;
        bottom: calc(var(--mobile-nav-height) + var(--sab) + 12px) !important;
        max-width: none !important;
    }

    .dropdown-menu,
    .notif-dropdown,
    .lang-dropdown {
        max-width: calc(100vw - 24px);
        right: 8px !important;
        left: auto !important;
    }

    img, svg, video, canvas, iframe {
        max-width: 100%;
        height: auto;
    }

    .empty-state {
        padding: 32px 16px;
    }

    /* POS terminal inside admin */
    .pos-terminal-body {
        grid-template-columns: 1fr !important;
        min-height: 0;
    }
}

@media (max-width: 576px) {
    .app-topbar {
        padding: 6px 8px;
        padding-left: calc(8px + var(--sal));
        padding-right: calc(8px + var(--sar));
        min-height: 50px;
    }

    .topbar-section-title,
    .page-title {
        font-size: 14px;
    }

    .content-wrapper {
        padding: 10px;
    }

    .card {
        margin-bottom: 14px;
        border-radius: var(--radius-sm);
    }

    .card-header {
        padding: 12px 14px;
    }

    .card-body {
        padding: 12px;
    }

    .kpi-grid,
    .stats-grid,
    .dashboard-kpis,
    .dash-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }

    .wb-block-actions {
        max-width: 100%;
        width: 100%;
        justify-content: flex-start;
    }
    .wb-block-item {
        flex-wrap: wrap;
    }
    .wb-block-meta {
        flex: 1 1 calc(100% - 40px);
    }

    .modal-header h3,
    .modal-title {
        font-size: 16px;
        line-height: 1.3;
        overflow-wrap: anywhere;
    }
}

@media (max-width: 359px) {
    .kpi-grid,
    .stats-grid,
    .dashboard-kpis {
        grid-template-columns: 1fr !important;
    }
    .bottom-nav-item span {
        font-size: 9px;
    }
}

/* Landscape phones: reclaim vertical space */
@media (max-width: 991px) and (orientation: landscape) {
    .app-topbar {
        min-height: 48px;
    }
    .mobile-bottom-nav {
        height: calc(52px + var(--sab));
    }
    .modal-dialog {
        max-height: min(96vh, 96dvh) !important;
    }
}

@media print {
    body.pa-printing-ticket * { visibility: hidden !important; }
    body.pa-printing-ticket #pa-print-area,
    body.pa-printing-ticket #pa-print-area * { visibility: visible !important; }
    body.pa-printing-ticket #pa-print-area {
        position: absolute; left: 0; top: 0; width: 80mm;
        color: #000; background: #fff; display: block !important;
    }
}
