:root {
    --sb-width: 264px;
    --sb-width-collapsed: 78px;
    --sb-bg: #101a2e;
    --sb-bg-2: #0b1322;
    --accent: #4f6df5;
    --accent-2: #7b5cf0;
    --topbar-h: 64px;
    --body-bg: #f2f5fa;
    --card-radius: 14px;
}

* { outline-color: var(--accent); }

html, body {
    height: 100%;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--body-bg);
    font-size: .925rem;
    color: #1e293b;
}

/* ============ App shell ============ */
.app-sidebar {
    position: fixed;
    inset-inline-start: 0;
    top: 0;
    bottom: 0;
    width: var(--sb-width);
    background: linear-gradient(180deg, var(--sb-bg) 0%, var(--sb-bg-2) 100%);
    display: flex;
    flex-direction: column;
    z-index: 1045;
    transition: width .25s ease, transform .25s ease;
    overflow-x: hidden;
}

.app-main {
    min-height: 100vh;
    margin-inline-start: var(--sb-width);
    display: flex;
    flex-direction: column;
    transition: margin .25s ease;
}

body.sidebar-collapsed .app-sidebar { width: var(--sb-width-collapsed); }
body.sidebar-collapsed .app-main { margin-inline-start: var(--sb-width-collapsed); }
body.sidebar-collapsed .app-sidebar .label,
body.sidebar-collapsed .app-sidebar .brand-text,
body.sidebar-collapsed .app-sidebar .sidebar-brand-logo,
body.sidebar-collapsed .app-sidebar .nav-section,
body.sidebar-collapsed .app-sidebar .sidebar-foot { display: none; }
body.sidebar-collapsed .app-sidebar .nav-subitem { padding-inline-start: 1.65rem; }
body.sidebar-collapsed .collapse:not(.show) { display: block; }

/* ============ Sidebar ============ */
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 1.15rem 1.35rem;
    border-bottom: 1px solid rgba(255,255,255,.07);
    flex-shrink: 0;
}

.brand-mark {
    width: 38px; height: 38px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    font-weight: 700;
    font-size: 1.25rem;
    box-shadow: 0 4px 14px rgba(79,109,245,.45);
}

.sidebar-brand-fallback {
    display: none;
}

.sidebar-brand-logo {
    position: relative;
    width: 79px;
    height: 38px;
    flex: 0 0 79px;
    overflow: hidden;
}

.sidebar-brand-logo img {
    position: absolute;
    width: 95px;
    height: auto;
    max-width: none;
    inset-inline-start: -7px;
    top: -22px;
    display: block;
    mix-blend-mode: screen;
}

body.sidebar-collapsed .app-sidebar .sidebar-brand-fallback {
    display: inline-flex;
}

.brand-text {
    color: #e2e8f0;
    font-size: 1.12rem;
    white-space: nowrap;
}
.brand-text b { color: #fff; }

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: .75rem .8rem 1rem;
}

.nav-section {
    font-size: .68rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #64748b;
    padding: 1.1rem .85rem .4rem;
    white-space: nowrap;
}

.nav-item, .nav-subitem {
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: .66rem .85rem;
    margin-bottom: .18rem;
    border-radius: 10px;
    color: #94a3b8;
    text-decoration: none;
    font-weight: 500;
    transition: background .15s ease, color .15s ease;
    white-space: nowrap;
}

.nav-item svg {
    width: 21px; height: 21px;
    flex-shrink: 0;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.nav-item .chevron {
    margin-inline-start: auto;
    width: 16px; height: 16px;
    stroke: currentColor; fill: none; stroke-width: 2;
    transition: transform .2s ease;
}
.nav-parent[aria-expanded="true"] .chevron { transform: rotate(90deg); }

.nav-item:hover, .nav-subitem:hover {
    background: rgba(255,255,255,.06);
    color: #e2e8f0;
}

.nav-item.active {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    box-shadow: 0 4px 14px rgba(79,109,245,.4);
}

.nav-subitem {
    font-size: .87rem;
    padding: .48rem .85rem .48rem 3.05rem;
}
.nav-subitem.active {
    color: #c7d2fe;
    background: rgba(79,109,245,.22);
    position: relative;
}
.nav-subitem.active::before {
    content: '';
    position: absolute;
    inset-inline-start: 1.55rem;
    top: 50%; translate: 0 -50%;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

.collapse.show + *, .sidebar-nav .collapse { margin-bottom: .2rem; }

.sidebar-foot {
    padding: 1rem 1.35rem;
    border-top: 1px solid rgba(255,255,255,.07);
    color: #475569;
    font-size: .74rem;
    white-space: nowrap;
}
.sidebar-settings {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    border-radius: 9px;
    transition: color .15s ease, background-color .15s ease;
}
.sidebar-settings:hover,
.sidebar-settings:focus-visible,
.sidebar-settings.active {
    color: #fff;
    background: rgba(255,255,255,.1);
}
.sidebar-settings:focus-visible {
    outline: 2px solid #818cf8;
    outline-offset: 2px;
}
.sidebar-settings svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Scrollbar */
.sidebar-nav::-webkit-scrollbar { width: 5px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 3px; }

/* ============ Topbar ============ */
.app-topbar {
    height: var(--topbar-h);
    background: #fff;
    border-bottom: 1px solid #e6eaf2;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 1.4rem;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.global-request-progress {
    --request-progress: 0;
    position: absolute;
    inset-inline: 0;
    bottom: -1px;
    height: 3px;
    overflow: hidden;
    pointer-events: none;
    opacity: 0;
    transition: opacity .14s ease;
}
.global-request-progress span {
    display: block;
    width: 100%;
    height: 100%;
    transform: scaleX(var(--request-progress));
    transform-origin: left center;
    background: linear-gradient(90deg, #4f6df5, #7b5cf0, #16b8a6);
    box-shadow: 0 0 8px rgba(79, 109, 245, .55);
    transition: transform .2s ease-out;
}
.global-request-progress.is-visible { opacity: 1; }
.global-request-progress.is-complete span { transition-duration: .1s; }

@media (prefers-reduced-motion: reduce) {
    .global-request-progress,
    .global-request-progress span { transition: none; }
}

.icon-btn {
    border: none;
    background: transparent;
    width: 40px; height: 40px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    transition: background .15s ease;
}
.icon-btn:hover { background: #eef2f9; }
.icon-btn svg {
    width: 22px; height: 22px;
    stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round;
}

.topbar-title {
    font-size: 1.08rem;
    font-weight: 600;
    margin: 0;
    color: #0f172a;
}

.topbar-right { margin-inline-start: auto; }

.user-chip {
    display: flex;
    align-items: center;
    gap: .6rem;
    border: 1px solid #e6eaf2;
    background: #fff;
    border-radius: 999px;
    padding: .28rem .75rem .28rem .32rem;
    cursor: pointer;
}
.user-chip:hover { box-shadow: 0 2px 10px rgba(15,23,42,.08); }
.user-chip .chevron { width: 15px; height: 15px; stroke: #64748b; fill: none; stroke-width: 2; }

.avatar {
    position: relative;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.avatar img {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: 2;
    background: #fff;
}
.avatar-initials { color: #fff; font-size: .82rem; font-weight: 700; }

.user-name { font-weight: 600; color: #334155; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }

.user-menu { border: 1px solid #eceff5; border-radius: 12px; padding: .35rem; }
.menu-ico { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ============ Content ============ */
.app-content {
    flex: 1;
    padding: 1.6rem;
}

.card {
    border-radius: var(--card-radius);
    border: 1px solid #e9edf5;
}

.app-footer {
    padding: 1rem 1.6rem;
    color: #94a3b8;
    font-size: .8rem;
}

.module-placeholder { max-width: 720px; margin: 4vh auto 0; }
.placeholder-icon {
    width: 76px; height: 76px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(79,109,245,.12), rgba(123,92,240,.12));
    display: flex;
    align-items: center;
    justify-content: center;
}
.placeholder-icon svg {
    width: 34px; height: 34px;
    stroke: var(--accent);
    fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

/* ============ Login page ============ */
.login-body { background: #eef2fb; }

.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.login-brand {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(145deg, rgba(8, 18, 38, .88) 0%, rgba(11, 19, 34, .72) 52%, rgba(20, 30, 54, .58) 100%),
        url('../images/UBora_Hero.jpg') 52% center / cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.brand-inner { position: relative; z-index: 2; color: #cbd5e1; max-width: 420px; }
.brand-logo-image {
    display: block;
    width: 92px;
    height: auto;
    margin-bottom: 1.15rem;
    object-fit: contain;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 16px;
    box-shadow: 0 10px 26px rgba(0, 0, 0, .26);
}
.tagline {
    max-width: 390px;
    margin: 0;
    color: #fff;
    font-size: clamp(1.35rem, 2vw, 1.75rem);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -.015em;
    text-wrap: balance;
}

.brand-points { list-style: none; padding: 0; margin-top: 2.2rem; }
.brand-points li {
    position: relative;
    padding: .45rem 0 .45rem 1.8rem;
    color: #aebcd6;
}
.brand-points li::before {
    content: '';
    position: absolute;
    inset-inline-start: 0; top: .95rem;
    width: 17px; height: 17px;
    border-radius: 50%;
    background: rgba(99,132,255,.18);
}
.brand-points li::after {
    content: '';
    position: absolute;
    inset-inline-start: .38rem; top: 1.22rem;
    width: 7px; height: 4px;
    border-inline-start: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    transform: rotate(-45deg);
}

.brand-glow { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; z-index: 1; }
.brand-glow.g1 { width: 380px; height: 380px; background: #4f6df5; top: -120px; inset-inline-end: -80px; }
.brand-glow.g2 { width: 320px; height: 320px; background: #7b5cf0; bottom: -110px; inset-inline-start: -60px; }

.login-panel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 2.5rem 5rem;
}

.login-card {
    width: 100%;
    max-width: 430px;
    background: #fff;
    border-radius: 18px;
    padding: 2.6rem 2.4rem;
    box-shadow: 0 20px 50px rgba(23,37,84,.1);
}
.login-card h2 { font-weight: 700; color: #0f172a; }
.setup-card { max-width: 540px; padding-block: 2rem; }
.setup-kicker { display: block; margin-bottom: .35rem; color: var(--accent); font-size: .72rem; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.setup-complete-shell { min-height: 100vh; display: grid; place-items: center; padding: 1rem; }
.setup-complete-card { max-width: 440px; }
.setup-complete-icon { width: 58px; height: 58px; margin: 0 auto 1rem; display: grid; place-items: center; border-radius: 50%; background: #dcfce7; color: #15803d; font-size: 1.8rem; font-weight: 700; }
.login-card .form-label { font-weight: 600; font-size: .84rem; color: #334155; }
.login-card .form-control {
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    padding: .65rem .95rem;
}
.login-card .form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(79,109,245,.14);
}
.login-powered-by {
    position: absolute;
    inset-inline-end: 1.75rem;
    bottom: 1.35rem;
    display: flex;
    align-items: center;
    gap: .55rem;
    color: #7b879a;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .02em;
}
.login-powered-by img {
    display: block;
    width: 106px;
    height: auto;
}
.btn-primary {
    --bs-btn-bg: var(--accent);
    --bs-btn-border-color: var(--accent);
    --bs-btn-hover-bg: #3f57d6;
    --bs-btn-hover-border-color: #3f57d6;
    --bs-btn-active-bg: #3a50c9;
    --bs-btn-active-border-color: #3a50c9;
    border-radius: 10px;
    font-weight: 600;
}

/* ============ Responsive / mobile ============ */
@media (max-width: 991.98px) {
    .app-sidebar { transform: translateX(-100%); width: var(--sb-width); box-shadow: 0 0 40px rgba(0,0,0,.3); }
    body.rtl-mode .app-sidebar { transform: translateX(100%); }
    body.sidebar-open .app-sidebar { transform: translateX(0); }
    .app-main { margin-inline-start: 0 !important; }
    body.sidebar-collapsed .collapse:not(.show) { display: none; }
    body.sidebar-collapsed .app-sidebar .label,
    body.sidebar-collapsed .app-sidebar .brand-text { display: inline; }
    body.sidebar-collapsed .app-sidebar .nav-section { display: block; }
    .login-shell { grid-template-columns: 1fr; }
    .login-brand { display: none; }
    .login-panel { min-height: 100vh; padding: 2rem 1rem 5rem; }
    .login-powered-by { inset-inline-end: 1.25rem; bottom: 1rem; }
}

.app-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,.45);
    z-index: 1040;
    opacity: 0;
    transition: opacity .2s ease;
}
body.sidebar-open .app-backdrop { display: block; opacity: 1; }

/* ============ Company module: slot picker ============ */
.company-modal .modal-content {
    height: min(760px, 92vh);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.company-modal .modal-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-bottom: 0;
}
.modal-fixed-block { flex-shrink: 0; }

.picker-scroll {
    flex: 1;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #e9edf5;
    border-radius: 12px;
    padding: 1rem;
    min-height: 120px;
}

.slot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(46px, 1fr));
    gap: .45rem;
}

.slot {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    border-radius: 8px;
    border: 1.5px solid #86efac;
    background: #dcfce7;
    font-size: .78rem;
    font-weight: 600;
    color: #166534;
    cursor: pointer;
    user-select: none;
    transition: all .12s ease;
}

.slot:hover { border-color: var(--accent); transform: translateY(-1px); }

.slot-is-selected {
    background: linear-gradient(135deg, var(--accent), var(--accent-2)) !important;
    border-color: transparent !important;
    color: #fff !important;
    box-shadow: 0 3px 10px rgba(79,109,245,.35);
}

.slot-is-taken {
    background: #fee2e2;
    border-color: #fecaca;
    color: #b91c1c;
    cursor: not-allowed;
    pointer-events: auto;
}
.slot-is-taken:hover { transform: none; }

.slot-is-pooled {
    background: #fef3c7;
    border-color: #fde68a;
    color: #92400e;
}

.slot-is-unavailable {
    background: #e2e8f0;
    border-style: dashed;
    color: #94a3b8;
    cursor: not-allowed;
}
.slot-is-unavailable:hover { transform: none; border-color: #cbd5e1; color: #94a3b8; }

.legend-box {
    display: inline-block;
    width: 16px; height: 16px;
    border-radius: 5px;
    vertical-align: middle;
    margin-inline-end: .25rem;
}

#floorTabs .nav-link {
    font-size: .82rem;
    padding: .3rem .9rem;
    color: #475569;
    border-radius: 8px;
}
#floorTabs .nav-link.active {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
}

.table thead th {
    font-size: .72rem;
    letter-spacing: .05em;
    border-bottom: 1px solid #eef1f7;
    padding: .85rem;
    white-space: nowrap;
}
.table td { padding: .8rem; }

/* ============ Company module: toolbar, search & pagination ============ */
.search-box {
    position: relative;
    min-width: 300px;
}
.search-box svg {
    position: absolute;
    inset-inline-start: .8rem;
    top: 50%;
    translate: 0 -50%;
    width: 16px; height: 16px;
    stroke: #94a3b8;
    fill: none; stroke-width: 2; stroke-linecap: round;
    pointer-events: none;
}
.search-box .form-control {
    padding-inline-start: 2.3rem;
    border-radius: 10px;
    height: 40px;
}

.pagination-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem;
    padding: .8rem 1.25rem;
    border-top: 1px solid #eef1f7;
    font-size: .84rem;
    color: #64748b;
}
.page-btn {
    min-width: 32px; height: 32px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    color: #475569;
    font-size: .82rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 .4rem;
    transition: all .12s ease;
}
.page-btn:hover:not(:disabled) { background: #eef2f9; }
.page-btn.active {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    font-weight: 600;
}
.page-btn:disabled { opacity: .4; cursor: default; }

.page-size-select {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: .3rem 1.7rem .3rem .6rem;
    font-size: .82rem;
    color: #334155;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2364748b' fill='none' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right .55rem center;
    appearance: none;
}

.custom-size-input {
    width: 74px;
    border: 1px solid var(--accent);
    border-radius: 8px;
    padding: .3rem .5rem;
    font-size: .82rem;
}

.code-badge {
    display: inline-block;
    padding: .28rem .7rem;
    border-radius: 999px;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    color: #4338ca;
    font-weight: 600;
    font-size: .76rem;
    letter-spacing: .02em;
}

.legend-available {
    background: #dcfce7;
    border: 1.5px solid #86efac;
}

.badge-visitor {
    background: #e0f2fe;
    border: 1px solid #bae6fd;
    color: #075985;
}
.badge-employee {
    background: #e0e7ff;
    border: 1px solid #c7d2fe;
    color: #3730a3;
}
.badge-pool {
    background: #fef9c3;
    border: 1px solid #fde68a;
    color: #854d0e;
    font-weight: 600;
}
.badge-unassigned {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #64748b;
}
.badge-slot-occupied {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-weight: 600;
}
.badge-slot-free {
    background: #dcfce7;
    border: 1px solid #86efac;
    color: #166534;
    font-weight: 600;
}
.badge-slot-available {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857;
    font-weight: 600;
}
.badge-slot-unavailable {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #c2410c;
    font-weight: 600;
}
.availability-action {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    white-space: nowrap;
}
.availability-action svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ============ Top bar notifications ============ */
.topbar-right {
    display: flex;
    align-items: center;
    gap: .6rem;
}

.impersonation-control {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    padding: .28rem .35rem .28rem .7rem;
    border: 1px solid #fed7aa;
    border-radius: 999px;
    background: #fff7ed;
    color: #9a3412;
}

.impersonation-company {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .78rem;
    font-weight: 600;
}

.impersonation-return {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    border: 0;
    border-radius: 999px;
    padding: .35rem .7rem;
    background: #c2410c;
    color: #fff;
    font-size: .78rem;
    font-weight: 700;
    white-space: nowrap;
}

.impersonation-return:hover { background: #9a3412; }
.impersonation-return:focus-visible { outline: 3px solid rgba(251, 146, 60, .35); outline-offset: 2px; }
.impersonation-return svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

#notifBellWrap .icon-btn { display: inline-flex; }

.notif-badge {
    position: absolute;
    top: 2px;
    inset-inline-end: 2px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: .62rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.notif-menu { width: 360px; max-width: calc(100vw - 24px); border-radius: 14px; padding: 0; overflow: hidden; }

.notif-list { max-height: 380px; overflow-y: auto; }

.notif-item {
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #f1f4f9;
    transition: background .12s ease;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: #f6f8fc; }
.notif-item.unseen { background: #eef3ff; }
.notif-item.unseen:hover { background: #e7edff; }

.notif-dot {
    width: 8px; height: 8px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--accent);
}

/* ============ Data tables: fixed header + stable layout ============ */
.data-card .table-responsive {
    max-height: calc(100vh - 320px);
    min-height: 220px;
    overflow-y: auto;
    overflow-x: auto;
    scrollbar-gutter: stable;
}

.data-card .table thead th {
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 5;
    box-shadow: inset 0 -1px 0 #e6eaf2;
}

.data-card .table td {
    white-space: nowrap;
}

/* ============ Dashboard ============ */
.ops-dashboard {
    --ops-primary: #5b5ce2;
    --ops-primary-soft: #eef0ff;
    --ops-green: #0f9f82;
    --ops-green-soft: #e5f8f2;
    --ops-amber: #d68a09;
    --ops-amber-soft: #fff6df;
    --ops-red: #df4a5e;
    --ops-red-soft: #fff0f2;
    --ops-border: #e6ebf2;
    --ops-muted: #718096;
    color: #172033;
}

.ops-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.15rem;
}

.ops-eyebrow,
.ops-panel-kicker {
    color: var(--ops-primary);
    font-size: .68rem;
    font-weight: 750;
    letter-spacing: .105em;
    text-transform: uppercase;
}

.ops-heading h1 {
    margin: .1rem 0 .2rem;
    color: #101828;
    font-size: 1.65rem;
    font-weight: 750;
    letter-spacing: -.025em;
}

.ops-heading p {
    margin: 0;
    color: var(--ops-muted);
    font-size: .84rem;
}

.ops-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .65rem;
    flex-wrap: wrap;
}

.ops-controls .form-select {
    width: min(290px, 45vw);
    min-height: 40px;
    border-color: var(--ops-border);
    border-radius: 10px;
    font-size: .82rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .03);
}

.ops-refresh {
    min-height: 40px;
    padding: .55rem .85rem;
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    border: 1px solid var(--ops-border);
    border-radius: 10px;
    background: #fff;
    color: #344054;
    font-size: .8rem;
    font-weight: 650;
    transition: border-color .18s ease, box-shadow .18s ease, color .18s ease;
}

.ops-refresh:hover,
.ops-refresh:focus-visible {
    border-color: #b9c2ed;
    box-shadow: 0 4px 12px rgba(79, 70, 229, .1);
    color: var(--ops-primary);
}

.ops-refresh svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ops-refresh.is-loading svg { animation: ops-spin .8s linear infinite; }
.ops-updated { min-width: 92px; color: #8993a4; font-size: .73rem; text-align: end; }
.ops-error { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-radius: 12px; }

.ops-kpi-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: .85rem;
    margin-bottom: .9rem;
}

.ops-kpi,
.ops-panel {
    border: 1px solid var(--ops-border);
    background: #fff;
    box-shadow: 0 4px 18px rgba(15, 23, 42, .045);
}

.ops-kpi {
    min-width: 0;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: .75rem;
    border-radius: 14px;
}

.ops-kpi-primary {
    border-color: transparent;
    background: linear-gradient(135deg, #5759dc 0%, #6966e8 100%);
    color: #fff;
    box-shadow: 0 8px 22px rgba(79, 70, 229, .2);
}

.ops-kpi-icon {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: rgba(255, 255, 255, .16);
    color: inherit;
}

.ops-kpi-icon.blue { background: #eaf0ff; color: #4771e7; }
.ops-kpi-icon.green { background: var(--ops-green-soft); color: var(--ops-green); }
.ops-kpi-icon.violet { background: #f0ebff; color: #805ad5; }
.ops-kpi-icon.cyan { background: #e6f7fb; color: #1496b3; }
.ops-kpi-icon.amber { background: var(--ops-amber-soft); color: var(--ops-amber); }
.ops-kpi-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ops-kpi > div:last-child { min-width: 0; }
.ops-kpi span { display: block; margin-bottom: .2rem; color: #697586; font-size: .7rem; font-weight: 600; white-space: nowrap; }
.ops-kpi strong { display: block; color: #101828; font-size: 1.45rem; font-weight: 760; line-height: 1.05; letter-spacing: -.025em; }
.ops-kpi small { display: block; margin-top: .25rem; overflow: hidden; color: #98a2b3; font-size: .65rem; text-overflow: ellipsis; white-space: nowrap; }
.ops-kpi-primary span, .ops-kpi-primary small { color: rgba(255, 255, 255, .72); }
.ops-kpi-primary strong { color: #fff; }

.ops-primary-grid,
.ops-secondary-grid {
    display: grid;
    gap: .9rem;
    margin-bottom: .9rem;
}

.ops-primary-grid { grid-template-columns: minmax(0, 1.9fr) minmax(300px, .8fr); }
.ops-secondary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ops-panel { min-width: 0; border-radius: 15px; overflow: hidden; }
.ops-panel-head { min-height: 68px; padding: 1rem 1.1rem .6rem; display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.ops-panel-head h2 { margin: .12rem 0 0; color: #172033; font-size: .95rem; font-weight: 700; letter-spacing: -.01em; }
.ops-chip { padding: .3rem .55rem; border: 1px solid #e8e9fb; border-radius: 999px; background: #f8f8ff; color: #6768a4; font-size: .66rem; font-weight: 650; white-space: nowrap; }
.ops-live { display: inline-flex; align-items: center; gap: .35rem; color: #667085; font-size: .69rem; font-weight: 600; }
.ops-live i { width: 7px; height: 7px; border-radius: 50%; background: #12b886; box-shadow: 0 0 0 4px rgba(18, 184, 134, .11); }
.ops-chart { position: relative; height: 285px; padding: .4rem 1rem 1rem; }
.ops-chart-large { height: 380px; }
.ops-empty { position: absolute; inset: 0; display: grid; place-items: center; color: #98a2b3; font-size: .8rem; }

.ops-health-list {
    padding: .25rem 1.1rem 1.1rem;
    display: grid;
    gap: .65rem;
}

.ops-health-row {
    padding: .75rem .85rem;
    border: 1px solid #edf0f5;
    border-radius: 12px;
    background: linear-gradient(135deg, #fff 0%, #fbfcfe 100%);
}

.ops-health-top {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: .7rem;
}

.ops-health-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 10px;
}

.ops-health-icon.violet { background: #f0ebff; color: #7659d7; }
.ops-health-icon.cyan { background: #e6f7fb; color: #1496b3; }
.ops-health-icon.amber { background: var(--ops-amber-soft); color: var(--ops-amber); }
.ops-health-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ops-health-name, .ops-health-metric { min-width: 0; }
.ops-health-name strong, .ops-health-name small, .ops-health-metric strong, .ops-health-metric small { display: block; }
.ops-health-name strong { color: #344054; font-size: .76rem; font-weight: 700; }
.ops-health-name small { margin-top: .16rem; overflow: hidden; color: #98a2b3; font-size: .64rem; text-overflow: ellipsis; white-space: nowrap; }
.ops-health-metric { text-align: end; }
.ops-health-metric strong { color: #101828; font-size: .9rem; font-weight: 750; }
.ops-health-metric small { margin-top: .12rem; color: #98a2b3; font-size: .59rem; white-space: nowrap; }
.ops-health-track { height: 6px; margin-top: .68rem; overflow: hidden; border-radius: 999px; background: #e8edf2; }
.ops-health-track span { width: var(--health-value); height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg, #12b8a6, #35cbb7); transition: width .45s ease; }

.ops-actions-panel { display: flex; flex-direction: column; }
.ops-action-summary { padding: .2rem 1rem .9rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: .45rem; }
.ops-action-summary > div { min-width: 0; padding: .7rem .55rem; border: 1px solid #edf0f5; border-radius: 11px; background: #fbfcfe; text-align: center; }
.ops-action-summary strong { display: block; margin: .2rem 0 .05rem; color: #182230; font-size: 1rem; }
.ops-action-summary small { display: block; color: #7d8797; font-size: .58rem; line-height: 1.25; }
.ops-action-icon { width: 23px; height: 23px; margin: auto; display: grid; place-items: center; border-radius: 7px; font-size: .66rem; font-weight: 800; }
.ops-action-icon.amber { background: var(--ops-amber-soft); color: var(--ops-amber); }
.ops-action-icon.red { background: var(--ops-red-soft); color: var(--ops-red); }
.ops-action-icon.blue { background: var(--ops-primary-soft); color: var(--ops-primary); }
.ops-action-list { padding: 0 1rem 1rem; }
.ops-action-list-title { margin: .2rem 0 .35rem; color: #98a2b3; font-size: .63rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.ops-action-row { padding: .58rem 0; display: grid; grid-template-columns: 31px minmax(0, 1fr) auto; align-items: center; gap: .55rem; border-bottom: 1px solid #f0f2f6; }
.ops-action-row:last-child { border-bottom: 0; }
.ops-action-kind { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: #f1f3ff; color: var(--ops-primary); font-size: .68rem; font-weight: 800; }
.ops-action-row strong, .ops-action-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ops-action-row strong { color: #344054; font-size: .73rem; }
.ops-action-row small { color: #98a2b3; font-size: .64rem; }
.ops-action-row time { color: #667085; font-size: .66rem; font-weight: 650; }
.ops-action-empty { min-height: 150px; display: flex; align-items: center; justify-content: center; gap: .7rem; color: var(--ops-green); text-align: start; }
.ops-action-empty > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--ops-green-soft); font-weight: 800; }
.ops-action-empty strong, .ops-action-empty small { display: block; }
.ops-action-empty strong { color: #344054; font-size: .76rem; }
.ops-action-empty small { color: #98a2b3; font-size: .65rem; }

.ops-legend { display: flex; gap: .75rem; color: #7d8797; font-size: .65rem; }
.ops-legend span { display: inline-flex; align-items: center; gap: .3rem; }
.ops-legend i { width: 8px; height: 8px; border-radius: 3px; }
.ops-legend .occupied { background: #6366f1; }
.ops-legend .available { background: #dff7ee; }

.ops-table-panel { margin-bottom: .5rem; }
.ops-table-head { padding-bottom: .85rem; }
.ops-table-search { width: 230px; height: 36px; padding: 0 .7rem; display: flex; align-items: center; gap: .45rem; border: 1px solid var(--ops-border); border-radius: 9px; background: #fbfcfe; }
.ops-table-search svg { width: 15px; height: 15px; flex: 0 0 auto; fill: none; stroke: #98a2b3; stroke-width: 1.8; stroke-linecap: round; }
.ops-table-search input { width: 100%; border: 0; outline: 0; background: transparent; color: #344054; font-size: .74rem; }
.ops-table { font-size: .74rem; }
.ops-detail-table { min-width: 680px; }
.ops-detail-table.company-view th:nth-child(1), .ops-detail-table.company-view td:nth-child(1) { width: 35%; }
.ops-detail-table.company-view th:nth-child(n+2), .ops-detail-table.company-view td:nth-child(n+2) { width: 13%; }
.ops-detail-table.pool-view th:nth-child(1), .ops-detail-table.pool-view td:nth-child(1) { width: 40%; }
.ops-detail-table.pool-view th:nth-child(n+2), .ops-detail-table.pool-view td:nth-child(n+2) { width: 15%; }
.ops-table thead th { padding: .65rem 1.1rem; border-block: 1px solid #eef1f5; background: #fafbfc; color: #8993a4; font-size: .62rem; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.ops-sort-button { width: 100%; padding: 0; display: inline-flex; align-items: center; gap: .35rem; border: 0; background: transparent; color: inherit; font: inherit; font-weight: inherit; letter-spacing: inherit; text-transform: inherit; text-align: start; }
.ops-sort-button:hover, .ops-sort-button.active { color: var(--ops-primary); }
.ops-sort-button:focus-visible { outline: 2px solid rgba(99,102,241,.35); outline-offset: 3px; border-radius: 3px; }
.ops-sort-indicator { font-size: .72rem; line-height: 1; }
.ops-table tbody td { padding: .72rem 1.1rem; border-color: #f1f3f6; color: #596579; }
.ops-table tbody strong { color: #344054; font-weight: 650; }
.ops-rate { width: fit-content; padding: .24rem .48rem; display: inline-flex; align-items: center; gap: .3rem; border-radius: 999px; font-size: .64rem; font-weight: 700; }
.ops-rate i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.ops-rate.healthy { background: var(--ops-green-soft); color: #087b66; }
.ops-rate.warning { background: var(--ops-amber-soft); color: #a76500; }
.ops-rate.danger { background: var(--ops-red-soft); color: #c4374b; }
.ops-table-foot { min-height: 48px; padding: .55rem 1.1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; color: #98a2b3; font-size: .67rem; }
.ops-table-pager { display: flex; align-items: center; gap: .4rem; }
.ops-table-pager button { min-height: 30px; padding: .3rem .6rem; border: 1px solid var(--ops-border); border-radius: 8px; background: #fff; color: #596579; font-size: .66rem; font-weight: 650; }
.ops-table-pager button:hover:not(:disabled), .ops-table-pager button:focus-visible { border-color: #b9c2ed; color: var(--ops-primary); }
.ops-table-pager button:disabled { opacity: .45; cursor: not-allowed; }
.ops-table-pager span { min-width: 42px; text-align: center; }

.ops-skeleton-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .85rem; margin-bottom: .9rem; }
.ops-skeleton-card, .ops-skeleton-panel { position: relative; overflow: hidden; border: 1px solid var(--ops-border); border-radius: 14px; background: #fff; }
.ops-skeleton-card { height: 94px; padding: 1rem; display: flex; align-items: center; gap: .75rem; }
.ops-skeleton-card > span { width: 40px; height: 40px; flex: 0 0 auto; border-radius: 11px; background: #edf0f5; }
.ops-skeleton-card div { width: 65%; }
.ops-skeleton-card i, .ops-skeleton-card b, .ops-skeleton-panel i, .ops-skeleton-panel b { display: block; border-radius: 6px; background: #edf0f5; }
.ops-skeleton-card i { width: 62%; height: 10px; margin-bottom: .55rem; }
.ops-skeleton-card b { width: 80%; height: 18px; }
.ops-skeleton-panels { display: grid; grid-template-columns: 1.9fr .8fr; gap: .9rem; }
.ops-skeleton-panel { height: 340px; padding: 1rem; }
.ops-skeleton-panel i { width: 32%; height: 16px; }
.ops-skeleton-panel b { width: 100%; height: 230px; margin-top: 2.4rem; }
.ops-skeleton-card::after, .ops-skeleton-panel::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.72), transparent); animation: ops-shimmer 1.35s infinite; }
#dashboardContent { transition: opacity .18s ease; }
#dashboardContent.is-refreshing { opacity: .58; pointer-events: none; }

@keyframes ops-shimmer { 100% { transform: translateX(100%); } }
@keyframes ops-spin { to { transform: rotate(360deg); } }

@media (max-width: 1399.98px) {
    .ops-kpi-grid, .ops-skeleton-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 991.98px) {
    .ops-heading { align-items: flex-start; }
    .ops-primary-grid, .ops-secondary-grid, .ops-skeleton-panels { grid-template-columns: 1fr; }
    .ops-chart-large { height: 350px; }
}

@media (max-width: 767.98px) {
    .ops-heading { display: block; }
    .ops-controls { margin-top: .8rem; justify-content: flex-start; }
    .ops-controls .form-select { width: 100%; }
    .ops-updated { margin-inline-start: auto; }
    .ops-kpi-grid, .ops-skeleton-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ops-panel-head { align-items: flex-start; }
    .ops-table-head { flex-direction: column; }
    .ops-table-search { width: 100%; }
    .ops-chart, .ops-chart-large { height: 320px; }
}

@media (max-width: 480px) {
    .ops-kpi-grid, .ops-skeleton-kpis { grid-template-columns: 1fr; }
    .ops-kpi { padding: .85rem 1rem; }
    .ops-action-summary { grid-template-columns: 1fr; }
    .ops-action-summary > div { display: grid; grid-template-columns: 28px 45px 1fr; align-items: center; gap: .5rem; text-align: start; }
    .ops-action-icon { margin: 0; }
    .ops-action-summary strong { margin: 0; }
    .ops-health-row { padding: .7rem; }
    .ops-health-top { grid-template-columns: 34px minmax(0, 1fr) auto; gap: .55rem; }
    .ops-health-icon { width: 34px; height: 34px; }
}

@media (prefers-reduced-motion: reduce) {
    .ops-skeleton-card::after, .ops-skeleton-panel::after, .ops-refresh.is-loading svg { animation: none; }
    .ops-health-track span { transition: none; }
}

/* ============ Fixed column widths (Parking Slot Info) ============ */
.table-fixed {
    table-layout: fixed;
    width: 100%;
}

.table-fixed th,
.table-fixed td {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.psi-table { min-width: 1320px; }
.psi-table th:nth-child(1), .psi-table td:nth-child(1) { width: 11%; }
.psi-table th:nth-child(2), .psi-table td:nth-child(2) { width: 15%; }
.psi-table th:nth-child(3), .psi-table td:nth-child(3) { width: 8%; }
.psi-table th:nth-child(4), .psi-table td:nth-child(4) { width: 13%; }
.psi-table th:nth-child(5), .psi-table td:nth-child(5) { width: 13%; }
.psi-table th:nth-child(6), .psi-table td:nth-child(6) { width: 9%; text-align: center; }
.psi-table th:nth-child(7), .psi-table td:nth-child(7) { width: 11%; text-align: center; }
.psi-table th:nth-child(8), .psi-table td:nth-child(8) { width: 20%; }

/* Company: Code | Name | Email | Spaces | Created | Actions */
.tbl-company th:nth-child(1), .tbl-company td:nth-child(1) { width: 11%; }
.tbl-company th:nth-child(2), .tbl-company td:nth-child(2) { width: 18%; }
.tbl-company th:nth-child(3), .tbl-company td:nth-child(3) { width: 23%; }
.tbl-company th:nth-child(4), .tbl-company td:nth-child(4) { width: 11%; }
.tbl-company th:nth-child(5), .tbl-company td:nth-child(5) { width: 14%; }
.tbl-company th:nth-child(6), .tbl-company td:nth-child(6) { width: 23%; }

/* Floor: Name | Slots | Description | Actions */
.tbl-floor th:nth-child(1), .tbl-floor td:nth-child(1) { width: 24%; }
.tbl-floor th:nth-child(2), .tbl-floor td:nth-child(2) { width: 16%; }
.tbl-floor th:nth-child(3), .tbl-floor td:nth-child(3) { width: 40%; }
.tbl-floor th:nth-child(4), .tbl-floor td:nth-child(4) { width: 20%; }

/* Pools: Pool | Company | Floors | Limit | Desc | Actions */
.tbl-pools th:nth-child(1), .tbl-pools td:nth-child(1) { width: 18%; }
.tbl-pools th:nth-child(2), .tbl-pools td:nth-child(2) { width: 22%; }
.tbl-pools th:nth-child(3), .tbl-pools td:nth-child(3) { width: 20%; }
.tbl-pools th:nth-child(4), .tbl-pools td:nth-child(4) { width: 10%; }
.tbl-pools th:nth-child(5), .tbl-pools td:nth-child(5) { width: 18%; }
.tbl-pools th:nth-child(6), .tbl-pools td:nth-child(6) { width: 12%; }

/* Employees: Name | Email | Phone | Company | Pool | AnySlot | Status | Actions */
.tbl-employee th:nth-child(1), .tbl-employee td:nth-child(1) { width: 16%; }
.tbl-employee th:nth-child(2), .tbl-employee td:nth-child(2) { width: 20%; }
.tbl-employee th:nth-child(3), .tbl-employee td:nth-child(3) { width: 12%; }
.tbl-employee th:nth-child(4), .tbl-employee td:nth-child(4) { width: 16%; }
.tbl-employee th:nth-child(5), .tbl-employee td:nth-child(5) { width: 12%; }
.tbl-employee th:nth-child(6), .tbl-employee td:nth-child(6) { width: 8%; text-align: center; }
.tbl-employee th:nth-child(7), .tbl-employee td:nth-child(7) { width: 8%; text-align: center; }
.tbl-employee th:nth-child(8), .tbl-employee td:nth-child(8) { width: 8%; }

/* Tenant employees omit the redundant company column. */
.tbl-employee.employee-without-company { min-width: 980px; }
.tbl-employee.employee-without-company th:nth-child(1), .tbl-employee.employee-without-company td:nth-child(1) { width: 18%; }
.tbl-employee.employee-without-company th:nth-child(2), .tbl-employee.employee-without-company td:nth-child(2) { width: 24%; }
.tbl-employee.employee-without-company th:nth-child(3), .tbl-employee.employee-without-company td:nth-child(3) { width: 14%; }
.tbl-employee.employee-without-company th:nth-child(4), .tbl-employee.employee-without-company td:nth-child(4) { width: 16%; }
.tbl-employee.employee-without-company th:nth-child(5), .tbl-employee.employee-without-company td:nth-child(5) { width: 10%; text-align: center; }
.tbl-employee.employee-without-company th:nth-child(6), .tbl-employee.employee-without-company td:nth-child(6) { width: 8%; text-align: center; }
.tbl-employee.employee-without-company th:nth-child(7), .tbl-employee.employee-without-company td:nth-child(7) { width: 10%; }

/* Users: Email | Name | Profile | Actions */
.tbl-user { min-width: 880px; }
.tbl-user th:nth-child(1), .tbl-user td:nth-child(1) { width: 33%; }
.tbl-user th:nth-child(2), .tbl-user td:nth-child(2) { width: 24%; }
.tbl-user th:nth-child(3), .tbl-user td:nth-child(3) { width: 17%; }
.tbl-user th:nth-child(4), .tbl-user td:nth-child(4) { width: 26%; }

.sticky-actions-table .actions-column {
    position: sticky;
    inset-inline-end: 0;
    overflow: visible;
    white-space: nowrap;
    background: #fff;
    box-shadow: -10px 0 14px -14px rgba(15, 23, 42, .45);
}

.sticky-actions-table th.actions-column { z-index: 7; }
.sticky-actions-table td.actions-column { z-index: 3; }
.sticky-actions-table tbody tr:hover td.actions-column { background: #f8fafc; }

.user-row-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: .3rem;
    min-width: max-content;
}

.user-row-actions .btn { flex: 0 0 auto; }

/* Preserve action buttons at increased browser zoom; narrow screens scroll the data columns. */
.tbl-company { min-width: 960px; }
.tbl-floor { min-width: 650px; }
.tbl-pools { min-width: 900px; }
.tbl-employee,
.tbl-vehicle,
.tbl-visitor { min-width: 1100px; }
.tbl-integrated-login { min-width: 760px; }

/* Vehicles: Plate | Card | Employee | Email | Pool | Emirate | Status | Actions */
.tbl-vehicle th:nth-child(1), .tbl-vehicle td:nth-child(1) { width: 12%; }
.tbl-vehicle th:nth-child(2), .tbl-vehicle td:nth-child(2) { width: 10%; }
.tbl-vehicle th:nth-child(3), .tbl-vehicle td:nth-child(3) { width: 17%; }
.tbl-vehicle th:nth-child(4), .tbl-vehicle td:nth-child(4) { width: 20%; }
.tbl-vehicle th:nth-child(5), .tbl-vehicle td:nth-child(5) { width: 12%; }
.tbl-vehicle th:nth-child(6), .tbl-vehicle td:nth-child(6) { width: 9%; }
.tbl-vehicle th:nth-child(7), .tbl-vehicle td:nth-child(7) { width: 8%; text-align: center; }
.tbl-vehicle th:nth-child(8), .tbl-vehicle td:nth-child(8) { width: 12%; }

/* Tenant vehicles omit the admin-only card number column. */
.tbl-vehicle.vehicle-without-card { min-width: 980px; }
.tbl-vehicle.vehicle-without-card th:nth-child(1), .tbl-vehicle.vehicle-without-card td:nth-child(1) { width: 13%; }
.tbl-vehicle.vehicle-without-card th:nth-child(2), .tbl-vehicle.vehicle-without-card td:nth-child(2) { width: 18%; }
.tbl-vehicle.vehicle-without-card th:nth-child(3), .tbl-vehicle.vehicle-without-card td:nth-child(3) { width: 25%; }
.tbl-vehicle.vehicle-without-card th:nth-child(4), .tbl-vehicle.vehicle-without-card td:nth-child(4) { width: 15%; }
.tbl-vehicle.vehicle-without-card th:nth-child(5), .tbl-vehicle.vehicle-without-card td:nth-child(5) { width: 10%; }
.tbl-vehicle.vehicle-without-card th:nth-child(6), .tbl-vehicle.vehicle-without-card td:nth-child(6) { width: 8%; text-align: center; }
.tbl-vehicle.vehicle-without-card th:nth-child(7), .tbl-vehicle.vehicle-without-card td:nth-child(7) { width: 11%; }

/* Violations (read-only): Time | Message | LPN | Device | Company */
.tbl-violation th:nth-child(1), .tbl-violation td:nth-child(1) { width: 16%; }
.tbl-violation th:nth-child(2), .tbl-violation td:nth-child(2) { width: 34%; white-space: normal !important; }
.tbl-violation th:nth-child(3), .tbl-violation td:nth-child(3) { width: 14%; }
.tbl-violation th:nth-child(4), .tbl-violation td:nth-child(4) { width: 12%; }
.tbl-violation th:nth-child(5), .tbl-violation td:nth-child(5) { width: 24%; }

/* Visitors: Visitor | Phone | Plate | Pool | Company | Window | Status | Actions */
.tbl-visitor th:nth-child(1), .tbl-visitor td:nth-child(1) { width: 17%; }
.tbl-visitor th:nth-child(2), .tbl-visitor td:nth-child(2) { width: 12%; }
.tbl-visitor th:nth-child(3), .tbl-visitor td:nth-child(3) { width: 12%; }
.tbl-visitor th:nth-child(4), .tbl-visitor td:nth-child(4) { width: 13%; }
.tbl-visitor th:nth-child(5), .tbl-visitor td:nth-child(5) { width: 14%; }
.tbl-visitor th:nth-child(6), .tbl-visitor td:nth-child(6) { width: 14%; }
.tbl-visitor th:nth-child(7), .tbl-visitor td:nth-child(7) { width: 8%; text-align: center; }
.tbl-visitor th:nth-child(8), .tbl-visitor td:nth-child(8) { width: 10%; }
