:root {
    --sidebar-width: 260px;
    --header-height: 64px;
}

body {
    background-color: var(--color-gray-50);
    min-height: 100vh;
    display: flex;
    overflow: auto;
    padding-bottom: 40px;
}


/* Base Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-outline {
    background: transparent;
    color: #3b82f6;
    border: 1.5px solid #3b82f6;
}

.btn-outline:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: #2563eb;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
}

/* Demo Ribbon - Collapsible */
.demo-ribbon {
    position: fixed;
    bottom: 0;
    left: var(--sidebar-width);
    right: 0;
    background: #374151;
    color: white;
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
}

/* Collapsed ribbon state (shows when user collapses) */
.ribbon-collapsed {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    gap: 1rem;
}

.ribbon-collapsed-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.ribbon-collapsed-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.demo-ribbon-exit-mini {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    padding: 0.3rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    text-decoration: none;
}

.ribbon-mini-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
    white-space: nowrap;
}

.ribbon-mini-note {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 400px;
}

.ribbon-link-teal-mini {
    color: #14b8a6;
    text-decoration: underline;
}

.ribbon-link-teal-mini:hover {
    color: #06b6d4;
}

.ribbon-btn-mini-primary {
    background: linear-gradient(135deg, #14b8a6, #06b6d4) !important;
    border: none !important;
    color: white !important;
    font-size: 0.75rem !important;
    padding: 0.4rem 0.8rem !important;
    border-radius: 4px !important;
    white-space: nowrap;
}

.ribbon-btn-mini-outline {
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: white !important;
    font-size: 0.75rem !important;
    padding: 0.4rem 0.8rem !important;
    border-radius: 4px !important;
    white-space: nowrap;
}

.ribbon-toggle-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 0.4rem;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ribbon-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Expanded ribbon state */
.ribbon-expanded {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-6);
    padding: var(--space-4);
}

.ribbon-collapse-btn {
    display: flex;
    position: absolute;
    right: 1rem;
    top: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 0.3rem;
    border-radius: 4px;
    cursor: pointer;
}

.ribbon-collapse-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.demo-ribbon-exit {
    position: absolute;
    left: 1rem;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.demo-ribbon-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.demo-ribbon-note {
    font-size: 0.75rem;
    opacity: 0.8;
    max-width: 600px;
    text-align: center;
}

.demo-ribbon-actions {
    display: flex;
    gap: 1rem;
}

/* Collapsed state - when .collapsed class is added */
.demo-ribbon.collapsed .ribbon-collapsed {
    display: flex;
}

.demo-ribbon.collapsed .ribbon-expanded {
    display: none;
}

/* Live ribbon text styling */
.ribbon-live-text {
    font-weight: 600;
    font-size: 0.95rem;
}

.ribbon-link-teal {
    color: #14b8a6;
    text-decoration: underline;
}

.ribbon-link-teal:hover {
    color: #06b6d4;
}

/* Ribbon action buttons */
.ribbon-btn-primary {
    background: linear-gradient(135deg, #14b8a6, #06b6d4) !important;
    border: none !important;
    color: white !important;
    font-size: 0.85rem !important;
    padding: 0.6rem 1.25rem !important;
}

.ribbon-btn-outline {
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: white !important;
    font-size: 0.85rem !important;
    padding: 0.6rem 1.25rem !important;
}

/* Mobile collapsed ribbon behavior */
@media (max-width: 768px) {
    .demo-ribbon {
        left: 0;
    }

    .ribbon-collapsed {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 0.75rem 1rem;
    }

    .ribbon-collapsed-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .ribbon-collapsed-right {
        width: 100%;
        justify-content: space-between;
    }

    .ribbon-mini-note {
        display: none;
    }

    .ribbon-btn-mini-primary,
    .ribbon-btn-mini-outline {
        flex: 1;
        text-align: center;
        font-size: 0.7rem !important;
        padding: 0.35rem 0.5rem !important;
    }

    .ribbon-expanded {
        display: none;
    }

    .demo-ribbon.expanded .ribbon-collapsed {
        display: none;
    }

    .demo-ribbon.expanded .ribbon-expanded {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .demo-ribbon-exit {
        position: static;
        margin-bottom: 0.5rem;
    }

    .demo-ribbon-actions {
        flex-direction: column;
        width: 100%;
    }

    .demo-ribbon-actions .btn {
        width: 100%;
        text-align: center;
    }
}

/* Sidebar */
.app-sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #0d1529 0%, #16254a 50%, #1e3463 100%);
    border-right: none;
    display: flex;
    flex-direction: column;
    z-index: 10;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    overflow: hidden;
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 var(--space-6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 700;
    color: var(--color-white);
    gap: var(--space-3);
}

.sidebar-logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.sidebar-logo-link:hover .sidebar-logo-img {
    filter: brightness(1.05);
}

.sidebar-header svg {
    stroke: var(--color-accent);
}

.sidebar-nav {
    padding: var(--space-6);
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    flex-grow: 1;
}

.sidebar-spacer {
    flex-grow: 1;
}

.sidebar-exit-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    margin-top: 1rem;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    color: #fca5a5;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s;
}

.sidebar-exit-btn:hover {
    background: rgba(239, 68, 68, 0.25);
    color: #fecaca;
}

.sidebar-exit-btn svg {
    stroke: currentColor;
}

.nav-item {
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    text-decoration: none;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-item.active {
    background: var(--gradient-accent);
    color: white;
    box-shadow: 0 4px 15px rgba(17, 159, 220, 0.3);
}

.nav-item svg {
    width: 20px;
    height: 20px;
}

/* Nav Exit Demo Button */
.nav-exit-demo {
    margin-top: auto;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    text-decoration: none;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    transition: all 0.2s;
    margin-top: 1rem;
}

.nav-exit-demo:hover {
    background: rgba(239, 68, 68, 0.25);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.5);
}

/* Floating Exit Demo Button (above footer ribbon) */
/* Hidden on desktop where sidebar Exit button is visible, shown on mobile/tablet */
.exit-demo-floating {
    position: fixed;
    bottom: 80px;
    left: 20px;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-md);
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: none;
    /* Hidden by default on desktop */
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    background: rgba(239, 68, 68, 0.9);
    border: 1px solid rgba(239, 68, 68, 0.5);
    transition: all 0.2s;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.exit-demo-floating:hover {
    background: #ef4444;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
}

/* Show floating Exit Demo on tablet - sidebar is hidden */
@media (max-width: 1024px) {
    .exit-demo-floating {
        display: flex;
        bottom: 110px;
    }
}

/* Mobile positioning adjustment */
@media (max-width: 767px) {
    .exit-demo-floating {
        bottom: 150px;
        left: 12px;
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
}

/* Main Content */
.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin-left: var(--sidebar-width);
}

.app-header {
    height: var(--header-height);
    background: white;
    border-bottom: 1px solid var(--color-gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-8);
}

.app-content {
    flex: 1;
    padding: var(--space-4);
    padding-bottom: 80px;
    /* Space for fixed demo ribbon */
    overflow-y: auto;
}

/* Dashboard Widgets */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.stat-card {
    background: white;
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-gray-200);
    box-shadow: var(--shadow-sm);
}

/* 5-column KPI grid for desktop */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--space-3);
}

/* Better contrast for ghost/outline buttons on recall page */
.recall-detail-actions .btn-outline {
    background: rgba(20, 184, 166, 0.1);
    border: 2px solid #14b8a6;
    color: #14b8a6;
    font-weight: 600;
}

.recall-detail-actions .btn-outline:hover {
    background: rgba(20, 184, 166, 0.2);
    border-color: #0d9488;
    color: #0d9488;
}

.stat-title {
    color: var(--color-gray-500);
    font-size: var(--font-size-sm);
    font-weight: 500;
    margin-bottom: var(--space-2);
}

.stat-value {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--color-gray-900);
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: var(--font-size-xs);
    margin-top: var(--space-2);
}

.trend-up {
    color: var(--color-accent);
}

/* Tables */
.data-table-container {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-gray-200);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.table-header {
    padding: var(--space-6);
    border-bottom: 1px solid var(--color-gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: var(--space-4) var(--space-6);
    text-align: left;
    border-bottom: 1px solid var(--color-gray-100);
}

.data-table th {
    background: var(--color-gray-50);
    color: var(--color-gray-500);
    font-weight: 500;
    font-size: var(--font-size-xs);
    text-transform: uppercase;
}

@media (min-width: 768px) {
    .orders-table {
        table-layout: fixed;
    }

    .orders-table th,
    .orders-table td {
        vertical-align: middle;
    }

    .orders-table th {
        white-space: nowrap;
    }

    .orders-table th:nth-child(1),
    .orders-table td:nth-child(1) {
        width: 120px;
        font-family: "Courier New", Courier, monospace;
        white-space: nowrap;
    }

    .orders-table th:nth-child(2),
    .orders-table td:nth-child(2) {
        width: 260px;
    }

    .orders-table th:nth-child(3),
    .orders-table td:nth-child(3) {
        width: 170px;
    }

    .orders-table td:nth-child(2),
    .orders-table td:nth-child(3) {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .orders-table th:nth-child(4),
    .orders-table td:nth-child(4) {
        width: 90px;
        white-space: nowrap;
    }

    .orders-table th:nth-child(5),
    .orders-table td:nth-child(5) {
        width: 120px;
    }

    .orders-table th:nth-child(6),
    .orders-table td:nth-child(6) {
        width: 120px;
        white-space: nowrap;
    }

    .orders-table th:nth-child(7),
    .orders-table td:nth-child(7) {
        width: 100px;
        text-align: right;
        white-space: nowrap;
    }
}

.status-badge {
    padding: 4px 12px;
    border-radius: 999px;
    font-size: var(--font-size-xs);
    font-weight: 600;
    white-space: nowrap;
}

.status-active {
    background: #DCFCE7;
    color: #166534;
}

.status-pending {
    background: #FEF3C7;
    color: #92400E;
}

/* Mobile hamburger toggle button */
.sidebar-toggle {
    display: none;
    background: var(--color-primary);
    color: white;
    border: none;
    padding: var(--space-3);
    border-radius: var(--radius-md);
    cursor: pointer;
    z-index: 100;
}

.sidebar-toggle svg {
    width: 24px;
    height: 24px;
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 5;
}

/* Toast Notification System */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-left: 4px solid var(--color-primary);
    min-width: 300px;
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    animation: slideIn 0.3s forwards;
}

.toast.success {
    border-left-color: #10b981;
}

.toast.error {
    border-left-color: #ef4444;
}

.toast-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.toast.success .toast-icon {
    background: #dcfce7;
    color: #166534;
}

.toast.error .toast-icon {
    background: #fee2e2;
    color: #991b1b;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-gray-900);
    margin-bottom: 2px;
}

.toast-message {
    font-size: 0.8rem;
    color: var(--color-gray-500);
}

@keyframes slideIn {
    from {
        transform: translateX(120%);
    }

    to {
        transform: translateX(0);
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(120%);
    }
}

/* =============================================
   TABLET RESPONSIVE (768px - 1024px)
   ============================================= */
@media (max-width: 1024px) {
    .app-sidebar {
        position: fixed;
        left: -260px;
        top: 0;
        bottom: 60px;
        transition: transform 0.3s ease;
        z-index: 20;
    }

    .app-sidebar.open {
        transform: translateX(260px);
    }

    .sidebar-overlay.visible {
        display: block;
    }

    .sidebar-toggle {
        display: flex;
        margin-right: var(--space-3);
    }

    /* Reset main content margin when sidebar is hidden */
    .app-main {
        margin-left: 0;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .app-header {
        padding: 0 var(--space-4);
    }

    .app-content {
        padding: var(--space-4);
        padding-bottom: 120px;
    }

    .search-bar {
        display: none;
    }
}

/* =============================================
   MOBILE RESPONSIVE (375px - 767px)
   ============================================= */
@media (max-width: 767px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-2);
    }

    .stat-card {
        padding: var(--space-3);
    }

    .stat-title {
        font-size: 0.7rem;
    }

    .stat-value {
        font-size: 1.25rem;
    }

    .stat-trend {
        font-size: 0.65rem;
    }

    .data-table-container {
        overflow-x: visible;
    }

    .data-table {
        min-width: unset;
        width: 100%;
        table-layout: fixed;
    }

    .data-table th,
    .data-table td {
        padding: var(--space-2) var(--space-2);
        font-size: 0.75rem;
        word-wrap: break-word;
        white-space: normal;
        vertical-align: top;
    }

    /* Mobile column widths for Recent Orders */
    .data-table th:nth-child(1),
    .data-table td:nth-child(1) {
        width: 22%;
    }

    .data-table th:nth-child(2),
    .data-table td:nth-child(2) {
        width: 30%;
        max-width: 90px;
    }

    .data-table th:nth-child(3),
    .data-table td:nth-child(3) {
        display: none;
    }

    .data-table th:nth-child(4),
    .data-table td:nth-child(4) {
        width: 18%;
    }

    .data-table th:nth-child(5),
    .data-table td:nth-child(5) {
        width: 18%;
    }

    .data-table th:nth-child(6),
    .data-table td:nth-child(6) {
        width: 18%;
    }

    .table-header {
        flex-direction: column;
        gap: var(--space-3);
        align-items: flex-start;
        padding: var(--space-4);
    }

    .table-header h3 {
        font-size: 1rem;
    }

    /* Hide search on mobile - takes too much space */
    .search-container {
        display: none;
    }

    /* Mobile header improvements */
    .app-header {
        padding: 0 var(--space-3);
        gap: var(--space-2);
        flex-wrap: wrap;
    }

    .header-left {
        flex: 1;
        min-width: 0;
    }

    .header-title {
        font-size: 1rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .header-right {
        flex-shrink: 0;
    }

    .demo-ribbon {
        left: 0;
        flex-direction: column;
        gap: var(--space-3);
        padding: var(--space-3);
        padding-bottom: var(--space-4);
    }

    .demo-ribbon-exit {
        position: static;
        margin-bottom: 0.5rem;
    }

    .demo-ribbon-content {
        text-align: center;
    }

    .ribbon-live-text {
        display: none;
    }

    .demo-ribbon-actions {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }

    .demo-ribbon-actions .btn {
        width: 100%;
    }

    .header-right .status-badge {
        display: none;
    }

    /* Mobile vendor grid */
    .vendor-grid {
        grid-template-columns: 1fr;
    }

    /* Mobile inventory grid */
    .inventory-grid {
        grid-template-columns: 1fr;
    }

    /* View header mobile adjustments */
    .view-header {
        flex-direction: column;
        gap: var(--space-3);
        align-items: flex-start;
    }

    .view-title {
        font-size: 1.1rem;
    }

    /* Inventory header mobile */
    .inventory-header {
        flex-direction: column;
        gap: var(--space-3);
        align-items: flex-start;
    }
}

/* ========================================
   Refactored Inline Styles
   ======================================== */

/* Sidebar Elements */
.sidebar-logo-img {
    max-width: 180px;
    height: auto;
}

.nav-invite-btn-wrapper {
    padding: 1rem 0;
}

.nav-invite-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* App Header Elements */
.header-left {
    display: flex;
    align-items: center;
}

.header-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.search-container {
    flex: 1;
    max-width: 480px;
    margin: 0 2rem;
    position: relative;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
}

.search-input {
    width: 100%;
    padding: 0.6rem 1rem 0.6rem 2.8rem;
    border: 1px solid var(--color-gray-300);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.08);
    color: var(--color-gray-900);
    outline: none;
    font-size: 0.95rem;
}

.search-input::placeholder {
    color: var(--color-gray-600);
    opacity: 1;
}

.header-right {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: var(--color-primary);
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    cursor: pointer;
}

/* View Management */
.demo-view {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.demo-view.active {
    display: block;
}

/* Data Table & Badges */
.table-title {
    font-weight: 600;
}

.btn-create-order {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.sortable-header {
    cursor: pointer;
}

.badge-muted {
    background: var(--color-gray-100);
    color: var(--color-gray-700);
}

/* Inventory View */
.inventory-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.inventory-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.inventory-item {
    cursor: pointer;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Inventory View Details */
.inventory-card-content {
    display: flex;
    justify-content: space-between;
}

.inventory-card-title {
    font-weight: 600;
}

.inventory-card-meta {
    color: var(--color-gray-500);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.inventory-card-location {
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: var(--color-gray-400);
}

.badge-rental-blue {
    background: #e0e7ff;
    color: #4338ca;
}

/* Orders View */
.view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.view-title {
    font-size: 1.25rem;
    font-weight: 600;
}

/* Vendor Grid */
.vendor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.vendor-card-padding {
    padding: 1.5rem;
}

.vendor-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.vendor-logo-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
}

/* Vendor Gradients */
.bg-gradient-teal {
    background: linear-gradient(135deg, #14b8a6, #0d9488);
}

.bg-gradient-indigo {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
}

.bg-gradient-amber {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.bg-gradient-emerald {
    background: linear-gradient(135deg, #10b981, #059669);
}

.bg-gradient-violet {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.vendor-name {
    font-weight: 600;
}

.vendor-type {
    font-size: 0.8rem;
    color: var(--color-gray-500);
}

.vendor-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.vendor-tag {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
}

/* Tag Colors */
.tag-green {
    background: #dcfce7;
    color: #166534;
}

.tag-blue {
    background: #dbeafe;
    color: #1e40af;
}

.tag-amber {
    background: #fef3c7;
    color: #92400e;
}

.tag-indigo {
    background: #e0e7ff;
    color: #4338ca;
}

.tag-gray {
    background: #f3f4f6;
    color: #374151;
}

.vendor-footer {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--color-gray-500);
}

/* Settings View */
.settings-container {
    display: grid;
    gap: 1.5rem;
    max-width: 600px;
}

.settings-group-title {
    font-weight: 600;
    margin-bottom: 1rem;
}

.settings-list {
    display: grid;
    gap: 0.75rem;
}

.settings-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
}

.settings-row-border {
    border-bottom: 1px solid var(--color-gray-100);
}

.settings-label {
    color: var(--color-gray-500);
}

.settings-value {
    font-weight: 500;
}

.settings-toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.settings-checkbox {
    width: 20px;
    height: 20px;
}

/* Ribbon Extras */
.ribbon-live-text {
    font-weight: 500;
}

.ribbon-link-teal {
    color: #2dd4bf;
    text-decoration: underline;
}

.ribbon-btn-primary {
    background: #14b8a6;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
}

.ribbon-btn-outline {
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
}

.ribbon-btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Modals */
.modal-overlay-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-card {
    background: white;
    max-width: 500px;
    width: 90%;
    padding: 2rem;
    border-radius: 16px;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

.modal-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #94a3b8;
}

.modal-title-main {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: #0f172a;
}

.modal-grid {
    display: grid;
    gap: 1rem;
}

.modal-row-border {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.modal-label {
    color: #64748b;
}

.modal-value {
    font-weight: 500;
}

.modal-value-teal {
    font-weight: 500;
    color: #14b8a6;
}

.modal-value-dark {
    font-weight: 600;
    color: #0f172a;
}

.modal-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 0.5rem;
}

.btn-modal-primary {
    flex: 1;
    background: #14b8a6;
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.btn-modal-secondary {
    background: #f1f5f9;
    color: #64748b;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
}

/* Forms in Modals */
.modal-field-label {
    font-size: 0.875rem;
    color: #64748b;
    display: block;
    margin-bottom: 0.25rem;
}

.modal-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

/* Dynamic Rows */
.row-slide-in {
    animation: slideIn 0.3s forwards;
    background: rgba(20, 184, 166, 0.05);
}

/* Inventory Card Dynamic */
.stat-card-dynamic {
    cursor: pointer;
    animation: slideIn 0.3s forwards;
}

.stat-card-header {
    display: flex;
    justify-content: space-between;
}

.stat-card-meta {
    color: var(--color-gray-500);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.stat-card-footer {
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: var(--color-gray-400);
}

/* ========================================
   EzBot Demo Styles
   ======================================== */
.ezbot-demo-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.ezbot-demo-intro {
    color: var(--color-gray-500);
    margin-bottom: 2rem;
    font-size: 1rem;
}

.prompt-section {
    margin-bottom: 2.5rem;
}

.prompt-section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.prompt-section-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-gray-700);
    margin: 0;
}

.prompt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
}

.prompt-card {
    background: white;
    border: 1px solid var(--color-gray-200);
    border-radius: 16px;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    position: relative;
    overflow: hidden;
}

.prompt-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05), rgba(59, 130, 246, 0.05));
    opacity: 0;
    transition: opacity 0.2s;
}

.prompt-card:hover {
    transform: translateY(-4px);
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 12px 24px -8px rgba(139, 92, 246, 0.15);
}

.prompt-card:hover::before {
    opacity: 1;
}

.prompt-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.prompt-content {
    flex: 1;
    position: relative;
    z-index: 1;
}

.prompt-text {
    font-weight: 600;
    color: var(--color-gray-900);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    line-height: 1.4;
}

.prompt-desc {
    font-size: 0.85rem;
    color: var(--color-gray-500);
    line-height: 1.4;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1rem;
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalIn 0.3s ease-out;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Mobile Responsive */
@media (max-width: 767px) {
    .prompt-grid {
        grid-template-columns: 1fr;
    }

    .prompt-card {
        padding: 1rem;
    }

    .prompt-icon {
        width: 40px;
        height: 40px;
    }

    .ezbot-demo-header {
        flex-wrap: wrap;
    }
}

/* ========== Network Visualization ========== */
.network-viz-container {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.network-viz-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.network-viz-header .table-title {
    color: white;
    margin: 0;
}

.network-viz {
    position: relative;
    min-height: 200px;
    overflow: visible;
}

.network-svg {
    width: 100%;
    height: auto;
    overflow: visible;
}

/* Connection lines */
.connection-line {
    stroke: rgba(99, 102, 241, 0.4);
    stroke-width: 2;
    stroke-dasharray: 5, 5;
    animation: dash-flow 1s linear infinite;
}

@keyframes dash-flow {
    to {
        stroke-dashoffset: -10;
    }
}

/* Data packets */
.data-packet {
    fill: #14b8a6;
    filter: drop-shadow(0 0 6px #14b8a6);
}

.data-packet.packet-alt {
    fill: #8b5cf6;
    filter: drop-shadow(0 0 6px #8b5cf6);
}

/* Node styles */
.node-fill {
    fill: #1e293b;
    stroke: #14b8a6;
    stroke-width: 2;
}

.node-bg {
    fill: rgba(20, 184, 166, 0.2);
}

.pulse-ring {
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(1.05);
    }
}

.node-icon {
    font-size: 24px;
    text-anchor: middle;
    dominant-baseline: middle;
}

.node-icon-sm {
    font-size: 16px;
    text-anchor: middle;
    dominant-baseline: middle;
}

.node-label {
    fill: rgba(255, 255, 255, 0.7);
    font-size: 10px;
    text-anchor: middle;
    font-family: 'Inter', sans-serif;
}

/* Color variations */
.node-teal {
    stroke: #14b8a6;
}

.node-indigo {
    stroke: #6366f1;
}

.node-amber {
    stroke: #f59e0b;
}

.node-violet {
    stroke: #8b5cf6;
}

/* Hover effects */
.network-node {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.network-node:hover .node-fill {
    filter: brightness(1.3);
}

/* Floating animation */
.node-hospital {
    animation: float-y 3s ease-in-out infinite;
}

.node-location:nth-child(1) {
    animation: float-y 2.5s ease-in-out infinite 0.3s;
}

.node-location:nth-child(2) {
    animation: float-y 2.8s ease-in-out infinite 0.6s;
}

.node-vendor:nth-child(1) {
    animation: float-y 2.2s ease-in-out infinite 0.1s;
}

.node-vendor:nth-child(2) {
    animation: float-y 2.7s ease-in-out infinite 0.4s;
}

.node-vendor:nth-child(3) {
    animation: float-y 2.4s ease-in-out infinite 0.7s;
}

@keyframes float-y {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

/* ========== Animated Service Pipeline (like real portal) ========== */
.pipeline-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
    border: 1px solid #e5e7eb;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.pl-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(180deg, #fafbfc 0%, #f3f4f6 100%);
}

.pl-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pl-title {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

.pl-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
    font-size: 12px;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s;
}

.pl-badge:hover {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #1d4ed8;
}

.pl-badge strong {
    font-size: 13px;
    font-weight: 600;
}

.pl-flow {
    display: flex;
    align-items: flex-start;
    padding: 24px 20px 20px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.pl-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    min-width: 80px;
    transition: transform 0.2s ease;
}

.pl-step:hover {
    transform: translateY(-3px);
}

.pl-step:hover .pl-icon {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
    transform: scale(1.05);
}

.pl-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #d1d5db;
    color: #374151;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.pl-step.action-required .pl-icon {
    background: #dbeafe;
    border-color: #3b82f6;
    color: #1e40af;
}

.pl-label {
    font-size: 13px;
    color: #374151;
    margin-top: 8px;
    font-weight: 500;
    text-align: center;
}

.pl-count {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin-top: 4px;
}

/* Connectors with line glow effects */
.pl-connector {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    min-width: 30px;
    padding-top: 22px;
}

.pl-line {
    width: 100%;
    height: 3px;
    background: #e5e7eb;
    position: relative;
    overflow: visible;
}

/* Animated icons traveling along connectors */
.pl-anim-icon {
    position: absolute;
    top: -12px;
    left: 0;
    font-size: 16px;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.2));
}

/* Stage 1: Plane animation (0-20% of 30s cycle) */
.pl-anim-plane {
    animation: planeTravel 30s ease-in-out infinite;
}

@keyframes planeTravel {
    0% {
        left: 0%;
        opacity: 0.5;
    }

    10% {
        left: 50%;
        opacity: 1;
    }

    20% {
        left: calc(100% - 20px);
        opacity: 0.5;
    }

    21%,
    100% {
        left: calc(100% - 20px);
        opacity: 0;
    }
}

/* Stage 2: Device animation (27-40%) */
.pl-anim-device {
    animation: deviceTravel 30s ease-in-out infinite;
}

@keyframes deviceTravel {

    0%,
    26% {
        left: 0%;
        opacity: 0;
    }

    27% {
        left: 0%;
        opacity: 0.5;
    }

    33% {
        left: 50%;
        opacity: 1;
    }

    40% {
        left: calc(100% - 20px);
        opacity: 0.5;
    }

    41%,
    100% {
        left: calc(100% - 20px);
        opacity: 0;
    }
}

/* Stage 3: Gear animation with spin (57-73%) */
.pl-anim-gear {
    animation: gearTravel 30s linear infinite;
}

@keyframes gearTravel {

    0%,
    56% {
        left: 0%;
        opacity: 0;
        transform: rotate(0deg);
    }

    57% {
        left: 0%;
        opacity: 0.5;
        transform: rotate(0deg);
    }

    65% {
        left: 50%;
        opacity: 1;
        transform: rotate(180deg);
    }

    73% {
        left: calc(100% - 20px);
        opacity: 0.5;
        transform: rotate(360deg);
    }

    74%,
    100% {
        left: calc(100% - 20px);
        opacity: 0;
        transform: rotate(360deg);
    }
}

/* Stage 4: Truck animation (80-100%) */
.pl-anim-truck {
    animation: truckTravel 30s ease-in-out infinite;
}

@keyframes truckTravel {

    0%,
    79% {
        left: 0%;
        opacity: 0;
    }

    80% {
        left: 0%;
        opacity: 0.5;
    }

    90% {
        left: 50%;
        opacity: 1;
    }

    100% {
        left: calc(100% - 20px);
        opacity: 0.5;
    }
}

/* Line glow effects following icons */
.pl-connector-1 .pl-line::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.3) 0%, rgba(59, 130, 246, 0.6) 100%);
    border-radius: 3px;
    animation: lineGlow1 30s ease-in-out infinite;
}

@keyframes lineGlow1 {
    0% {
        width: 0%;
        opacity: 0.5;
    }

    10% {
        width: 50%;
        opacity: 1;
    }

    20% {
        width: 100%;
        opacity: 0.5;
    }

    21%,
    100% {
        width: 100%;
        opacity: 0;
    }
}

.pl-connector-2 .pl-line::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, rgba(5, 150, 105, 0.3) 0%, rgba(5, 150, 105, 0.6) 100%);
    border-radius: 3px;
    animation: lineGlow2 30s ease-in-out infinite;
}

@keyframes lineGlow2 {

    0%,
    26% {
        width: 0%;
        opacity: 0;
    }

    27% {
        width: 0%;
        opacity: 0.5;
    }

    33% {
        width: 50%;
        opacity: 1;
    }

    40% {
        width: 100%;
        opacity: 0.5;
    }

    41%,
    100% {
        width: 100%;
        opacity: 0;
    }
}

.pl-connector-3 .pl-line::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.3) 0%, rgba(245, 158, 11, 0.6) 100%);
    border-radius: 3px;
    animation: lineGlow3 30s linear infinite;
}

@keyframes lineGlow3 {

    0%,
    56% {
        width: 0%;
        opacity: 0;
    }

    57% {
        width: 0%;
        opacity: 0.5;
    }

    65% {
        width: 50%;
        opacity: 1;
    }

    73% {
        width: 100%;
        opacity: 0.5;
    }

    74%,
    100% {
        width: 100%;
        opacity: 0;
    }
}

.pl-connector-4 .pl-line::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.3) 0%, rgba(59, 130, 246, 0.6) 100%);
    border-radius: 3px;
    animation: lineGlow4 30s ease-in-out infinite;
}

@keyframes lineGlow4 {

    0%,
    79% {
        width: 0%;
        opacity: 0;
    }

    80% {
        width: 0%;
        opacity: 0.5;
    }

    90% {
        width: 50%;
        opacity: 1;
    }

    100% {
        width: 100%;
        opacity: 0.5;
    }
}

/* Icon state animations */
.pl-icon-animated {
    animation: boxPulse 30s ease-in-out infinite;
    position: relative;
}

/* Truck icon flipped to face right direction */
.pl-anim-truck {
    transform: scaleX(-1);
    animation: truckTravel 30s ease-in-out infinite;
}

/* Emoji-based unboxing animation */
.pl-icon-unbox {
    position: relative;
    animation: unboxPulse 30s ease-in-out infinite;
}

.pl-box-closed-emoji {
    font-size: 20px;
    animation: boxCloseEmoji 30s ease-in-out infinite;
}

.pl-box-open-emoji {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    animation: boxOpenEmoji 30s ease-in-out infinite;
}

@keyframes unboxPulse {

    0%,
    15% {
        transform: scale(1);
    }

    18% {
        transform: scale(1.15) rotate(-5deg);
    }

    20% {
        transform: scale(1.2) rotate(0deg);
    }

    25%,
    100% {
        transform: scale(1);
    }
}

@keyframes boxCloseEmoji {

    0%,
    15% {
        opacity: 1;
    }

    18% {
        opacity: 0.5;
    }

    20%,
    100% {
        opacity: 0;
    }
}

@keyframes boxOpenEmoji {

    0%,
    15% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }

    18% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(0.8);
    }

    20%,
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes boxPulse {

    0%,
    15% {
        transform: scale(1);
    }

    20% {
        transform: scale(1.2);
    }

    25%,
    100% {
        transform: scale(1);
    }
}

.pl-box-closed {
    animation: boxCloseAnim 30s ease-in-out infinite;
}

@keyframes boxCloseAnim {

    0%,
    15% {
        opacity: 1;
    }

    20%,
    100% {
        opacity: 0;
    }
}

.pl-box-open {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    animation: boxOpenAnim 30s ease-in-out infinite;
}

@keyframes boxOpenAnim {

    0%,
    15% {
        opacity: 0;
    }

    20%,
    100% {
        opacity: 1;
    }
}

.pl-icon-quoted {
    animation: quotedPulse 30s ease-in-out infinite;
}

@keyframes quotedPulse {

    0%,
    38% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }

    40%,
    55% {
        transform: scale(1.05);
        box-shadow: 0 0 16px rgba(59, 130, 246, 0.6);
    }

    57%,
    100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }
}

.pl-icon-repair {
    position: relative;
}

.pl-wrench-default {
    animation: wrenchFadeOut 30s linear infinite;
}

.pl-wrench-active {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    animation: wrenchFadeIn 30s linear infinite;
}

@keyframes wrenchFadeOut {

    0%,
    70% {
        opacity: 1;
    }

    73%,
    100% {
        opacity: 0;
    }
}

@keyframes wrenchFadeIn {

    0%,
    70% {
        opacity: 0;
    }

    73%,
    100% {
        opacity: 1;
    }
}

/* Count pulse animations */
.pl-count-1 {
    animation: countPulse1 30s ease-out infinite;
}

@keyframes countPulse1 {

    0%,
    18% {
        transform: scale(1);
        color: #374151;
    }

    20% {
        transform: scale(1.3);
        color: #3b82f6;
    }

    25%,
    100% {
        transform: scale(1);
        color: #374151;
    }
}

.pl-count-2 {
    animation: countPulse2 30s ease-out infinite;
}

@keyframes countPulse2 {

    0%,
    38% {
        transform: scale(1);
        color: #374151;
    }

    40% {
        transform: scale(1.3);
        color: #059669;
    }

    45%,
    100% {
        transform: scale(1);
        color: #374151;
    }
}

.pl-count-3 {
    animation: countPulse3 30s ease-out infinite;
}

@keyframes countPulse3 {

    0%,
    71% {
        transform: scale(1);
        color: #374151;
    }

    73% {
        transform: scale(1.3);
        color: #f59e0b;
    }

    78%,
    100% {
        transform: scale(1);
        color: #374151;
    }
}

.pl-count-4 {
    animation: countPulse4 30s ease-out infinite;
}

@keyframes countPulse4 {

    0%,
    98% {
        transform: scale(1);
        color: #374151;
    }

    100% {
        transform: scale(1.2);
        color: #3b82f6;
    }
}

/* ========== Quotes Awaiting Response ========== */
.qt-section {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--color-gray-200);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.qt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-bottom: 1px solid #bfdbfe;
}

.qt-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #1e40af;
    font-size: 0.95rem;
}

.qt-header a {
    color: #3b82f6;
    font-size: 0.85rem;
    text-decoration: none;
}

.qt-header a:hover {
    text-decoration: underline;
}

.qt-scroll {
    overflow-x: auto;
}

.qt-table {
    width: 100%;
    border-collapse: collapse;
}

.qt-table thead th {
    background: #f9fafb;
    padding: 0.5rem 0.75rem;
    text-align: left;
    font-size: 0.7rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    border-bottom: 1px solid var(--color-gray-200);
}

/* Column widths */
.qt-table thead th:first-child,
.qt-table tbody td:first-child {
    width: 100px;
}

.qt-table thead th:nth-child(2),
.qt-table tbody td:nth-child(2) {
    width: 120px;
}

.qt-table tbody td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--color-gray-100);
    font-size: 0.8rem;
}

.qt-table tbody tr:hover {
    background: #f9fafb;
}

.qt-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.qt-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.qt-id {
    font-family: monospace;
    font-size: 0.8rem;
    color: #6b7280;
}

.qt-partner {
    font-weight: 500;
    color: #111827;
}

.qt-model {
    color: #374151;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.qt-amount {
    font-weight: 600;
    color: #059669;
}

/* Quote Modal Styles */
.quote-modal-card {
    width: min(1200px, 94vw);
    max-width: 1200px;
    padding: 0;
    overflow: hidden;
    border-radius: 14px;
}

.quote-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--color-gray-200);
    background: #ffffff;
    gap: 1rem;
}

.quote-modal-title-row {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    flex-wrap: wrap;
    font-size: 1.35rem;
    font-weight: 700;
    color: #111827;
}

.quote-modal-id {
    font-weight: 700;
}

.quote-modal-vendor {
    color: #6b7280;
    font-weight: 500;
}

.quote-modal-actions-top {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: #111827;
}

.quote-total {
    color: #111827;
    font-weight: 700;
}

.quote-modal-close {
    background: none;
    border: none;
    font-size: 1.75rem;
    cursor: pointer;
    color: #6b7280;
    line-height: 1;
}

.quote-modal-body {
    background: #f8fafc;
    padding: 0 0 1.5rem;
}

.quote-action-table-container {
    padding: 0 2rem 1.5rem;
}

.quote-action-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--color-gray-200);
}

.quote-action-table thead th {
    background: #f1f5f9;
    text-align: left;
    padding: 1rem 1.25rem;
    font-size: 0.9rem;
    color: #475569;
    font-weight: 600;
}

.quote-action-table tbody td {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--color-gray-100);
    vertical-align: middle;
}

.quote-row-highlight {
    background: #fefce8;
}

.device-name {
    display: block;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.25rem;
}

.device-sn {
    color: #64748b;
    font-size: 0.85rem;
}

.price-box {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.9rem;
    border: 1.5px solid #60a5fa;
    color: #1d4ed8;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    background: #eff6ff;
    cursor: pointer;
    font-family: inherit;
    line-height: 1;
    appearance: none;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.price-box:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.18);
}

.price-box-icon {
    width: 14px;
    height: 14px;
    display: inline-block;
}

.attach-icon {
    width: 16px;
    height: 16px;
    display: block;
}

.demo-disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}

.demo-disabled:hover {
    transform: none;
    box-shadow: none;
}

.po-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.9rem;
}

.po-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.btn-attach {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #cbd5f5;
    background: #f8fafc;
    border-radius: 8px;
    padding: 0.5rem 0.65rem;
    font-size: 1rem;
    cursor: pointer;
    color: #475569;
}

.action-btn-group {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-approve-row,
.btn-decline-row,
.btn-approve-all,
.btn-decline-all {
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    border: 1px solid;
    font-weight: 600;
    cursor: pointer;
    background: white;
    min-width: 120px;
}

.btn-approve-row,
.btn-approve-all {
    border-color: #22c55e;
    color: #15803d;
    background: #f0fdf4;
}

.btn-decline-row,
.btn-decline-all {
    border-color: #ef4444;
    color: #b91c1c;
    background: #fef2f2;
}

.bulk-actions-row {
    background: #eff6ff;
    border-top: 2px solid #2563eb;
}

.bulk-title {
    font-weight: 600;
    color: #1d4ed8;
}

.quote-modal-footer {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1.5rem;
    align-items: center;
    padding: 0 2rem 1.5rem;
}

.quote-notes-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 0.95rem;
}

.btn-finish {
    background: #9ca3af;
    color: white;
    border: none;
    padding: 0.85rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
}

.btn-finish.active {
    background: #2563eb;
}

@media (max-width: 1024px) {
    .quote-modal-card {
        width: 95vw;
    }

    .quote-modal-footer {
        grid-template-columns: 1fr;
    }

    .quote-modal-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

.form-textarea {
    width: 100%;
    min-height: 60px;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--color-gray-300);
    border-radius: 6px;
    font-size: 0.875rem;
    resize: vertical;
}

.form-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid var(--color-gray-200);
}

/* ========== Recent Shipments Card ========== */
.shipments-card {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--color-gray-200);
    margin-top: 1.5rem;
    overflow: hidden;
}

.shipments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-bottom: 1px solid #bbf7d0;
}

.shipments-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #166534;
    font-size: 0.95rem;
}

.shipments-header a {
    color: #16a34a;
    font-size: 0.85rem;
    text-decoration: none;
}

.shipments-header a:hover {
    text-decoration: underline;
}

.shipments-list {
    padding: 0;
}

.shipment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--color-gray-100);
    gap: 1rem;
}

.shipment-item:last-child {
    border-bottom: none;
}

.shipment-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
    min-width: 0;
}

.shipment-device {
    font-weight: 600;
    color: #111827;
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shipment-route {
    font-size: 0.75rem;
    color: #6b7280;
}

.shipment-tracking {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.tracking-link {
    font-family: monospace;
    font-size: 0.75rem;
    color: #3b82f6;
    text-decoration: none;
    background: #eff6ff;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.tracking-link:hover {
    background: #dbeafe;
    text-decoration: underline;
}

/* ========== Warning Stat Card ========== */
.stat-card-warning {
    border: 2px solid #f59e0b;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.25);
}

.stat-card-warning .stat-value {
    color: #d97706;
}

.trend-warning {
    color: #d97706 !important;
    font-weight: 600;
}

/* ========== FDA Recalls Inbox View ========== */
.recall-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.recall-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.ezbot-badge {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
}

.recall-inbox {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 1.5rem;
    min-height: 500px;
}

/* Left panel - Recall list */
.recall-list {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--color-gray-200);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.recall-list-header {
    padding: 1rem;
    background: #fef3c7;
    border-bottom: 1px solid #fde68a;
}

.recall-list-count {
    font-size: 0.875rem;
    font-weight: 600;
    color: #92400e;
}

.recall-item {
    padding: 1rem;
    border-bottom: 1px solid var(--color-gray-100);
    cursor: pointer;
    transition: background 0.15s ease;
}

.recall-item:hover {
    background: #fefce8;
}

.recall-item.active {
    background: #fef9c3;
    border-left: 3px solid #f59e0b;
}

.recall-item-urgency {
    font-size: 0.75rem;
    font-weight: 600;
    color: #d97706;
    margin-bottom: 0.25rem;
}

.recall-item-title {
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.5rem;
}

.recall-item-meta {
    display: flex;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.recall-item-badge {
    background: #fee2e2;
    color: #dc2626;
    padding: 0.125rem 0.5rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 500;
}

.recall-item-summary {
    font-size: 0.8rem;
    color: #4b5563;
    line-height: 1.4;
}

.recall-list-footer {
    margin-top: auto;
    padding: 0.75rem 1rem;
    background: #f9fafb;
    border-top: 1px solid var(--color-gray-100);
}

.recall-powered {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.7rem;
    color: #6b7280;
}

/* Right panel - Detail view */
.recall-detail {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--color-gray-200);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.recall-detail-header {
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fef9c3 100%);
    border-bottom: 1px solid #fde68a;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

.recall-detail-title h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1.1rem;
    color: #92400e;
}

.recall-detail-id {
    font-size: 0.8rem;
    color: #6b7280;
}

.recall-detail-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.recall-affected-devices {
    padding: 1rem 1.25rem;
    background: #fffbeb;
    border-bottom: 1px solid #fde68a;
}

.recall-affected-devices h4 {
    margin: 0 0 0.75rem 0;
    font-size: 0.875rem;
    color: #92400e;
}

.affected-device-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid #fde68a;
}

.affected-device-name {
    font-weight: 600;
    color: #111827;
    display: block;
}

.affected-device-sn {
    font-size: 0.8rem;
    color: #6b7280;
}

/* FDA embed area */
.recall-fda-embed {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.fda-embed-header {
    padding: 0.75rem 1rem;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    border-bottom: 1px solid #e2e8f0;
}

.fda-preview {
    flex: 1;
    padding: 1.5rem;
    background: #fff;
}

.fda-preview-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #1e40af;
}

.fda-logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1e40af;
}

.fda-logo-sub {
    font-size: 0.75rem;
    color: #64748b;
}

.fda-preview-content h4 {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    color: #1e3a8a;
}

.fda-recall-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.fda-detail-row {
    display: flex;
    gap: 0.75rem;
}

.fda-label {
    font-weight: 600;
    color: #374151;
    min-width: 100px;
    font-size: 0.875rem;
}

.fda-value {
    color: #111827;
    font-size: 0.875rem;
}

.fda-class-2 {
    color: #d97706;
    font-weight: 600;
}

.fda-embed-footer {
    padding: 0.75rem 1rem;
    background: #f1f5f9;
    border-top: 1px solid #e2e8f0;
}

.fda-link {
    font-size: 0.8rem;
    color: #3b82f6;
    text-decoration: none;
}

.fda-link:hover {
    text-decoration: underline;
}

/* ========== Mobile Responsive ========== */
@media (max-width: 768px) {

    /* General layout */
    .app-content {
        padding: 1rem;
        padding-bottom: 80px;
        /* Space for collapsed ribbon */
    }

    /* Stats grid - stack on mobile */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .stat-card {
        padding: 1rem;
    }

    /* Hide search on mobile - not functional in demo */
    .search-container {
        display: none;
    }

    /* Service Pipeline mobile layout - grid instead of scroll */
    .pipeline-card {
        margin-bottom: 1rem;
    }

    .pl-header {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }

    .pl-badge {
        font-size: 11px;
        padding: 5px 10px;
    }

    /* Convert to stacked grid layout on mobile */
    .pl-flow {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
        padding: 12px;
    }

    .pl-step {
        min-width: unset;
        padding: 0.5rem;
        background: #f9fafb;
        border-radius: 8px;
    }

    .pl-step.action-required {
        background: #eff6ff;
        border: 1px solid #bfdbfe;
    }

    /* Hide connectors on mobile - not needed in grid */
    .pl-connector {
        display: none;
    }

    .pl-icon {
        width: 36px;
        height: 36px;
    }

    .pl-icon svg {
        width: 16px;
        height: 16px;
    }

    .pl-label {
        font-size: 9px;
        white-space: nowrap;
    }

    .pl-count {
        font-size: 18px;
    }

    /* Hide animated traveling icons on mobile */
    .pl-anim-icon {
        display: none;
    }

    /* Data table mobile optimization */
    .data-table-container {
        margin-bottom: 1rem;
        overflow: hidden;
    }

    .table-header {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }

    .table-header .btn {
        width: 100%;
    }

    .data-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .data-table {
        font-size: 12px;
        min-width: 500px;
    }

    .data-table th,
    .data-table td {
        padding: 0.5rem 0.4rem;
    }

    /* Hide less critical columns on small screens */
    .data-table th:nth-child(6),
    .data-table td:nth-child(6) {
        display: none;
        /* Hide Amount column on mobile */
    }

    /* Sidebar adjustments */
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    /* Header mobile */
    .app-header {
        padding: 0.75rem 1rem;
    }

    .app-title {
        font-size: 1.1rem;
    }

    /* FDA Recalls mobile - stack layout */
    .recall-inbox {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .recall-list {
        max-height: 250px;
        overflow-y: auto;
    }

    .recall-detail-header {
        flex-direction: column;
    }

    /* Recall header mobile - better visibility */
    .recall-header {
        flex-direction: column;
        gap: 0.75rem;
        padding: 0.75rem;
    }

    .recall-header-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .recall-header .btn {
        background: #f59e0b;
        color: white;
        border: none;
        font-weight: 600;
        width: 100%;
        justify-content: center;
    }

    .fda-iframe {
        min-height: 300px;
    }

    /* Sidebar logo z-index fix when menu is open */
    .app-sidebar.open .sidebar-logo {
        z-index: 1001;
        position: relative;
    }

    /* Shipments card mobile */
    .shipment-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .shipment-tracking {
        width: 100%;
        justify-content: space-between;
    }

    .tracking-link {
        font-size: 0.65rem;
    }

    /* Recent Orders table mobile - card layout fallback */
    .data-table-container {
        margin-top: 1rem;
    }

    .data-table {
        font-size: 11px;
        min-width: 450px;
    }

    .data-table th,
    .data-table td {
        padding: 0.4rem 0.3rem;
    }

    /* Hide extra columns on small screens */
    .data-table th:nth-child(3),
    .data-table td:nth-child(3) {
        display: none;
        /* Hide Vendor column */
    }

    /* Quotes table mobile */
    .qt-table th:nth-child(3),
    .qt-table td:nth-child(3) {
        display: none;
        /* Hide Partner column */
    }

    .qt-model {
        max-width: 100px;
    }

    /* Demo ribbon mobile - already handled in ribbon styles */
}

/* ========== Map View ========== */
.map-view-header {
    align-items: flex-start;
    gap: 1rem;
}

.view-subtitle {
    margin: 0.25rem 0 0;
    color: var(--color-gray-500);
    font-size: 0.9rem;
}

.map-header-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.map-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    background: white;
    border: 1px solid var(--color-gray-200);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.map-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid var(--color-gray-200);
    background: #f8fafc;
    border-radius: 999px;
    padding: 0.4rem 0.75rem;
    flex: 1;
    min-width: 240px;
    color: #64748b;
}

.map-search input {
    border: none;
    outline: none;
    background: transparent;
    width: 100%;
    font-size: 0.9rem;
    color: #0f172a;
}

.map-filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.map-filter-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: 0.02em;
}

.map-filter-summary {
    font-size: 0.75rem;
    color: #475569;
    background: #f1f5f9;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
}

.map-chip {
    border: 1px solid var(--color-gray-200);
    background: white;
    border-radius: 999px;
    font-size: 0.75rem;
    padding: 0.35rem 0.75rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.map-chip.active {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #1d4ed8;
    font-weight: 600;
}

.map-layout {
    display: block;
    width: 100%;
}

.map-main {
    min-width: 0;
}

.map-view-pane {
    display: none;
}

.map-view-pane.active {
    display: block;
}

.map-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.map-location-card {
    background: white;
    border: 1px solid var(--color-gray-200);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.map-location-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

.location-card-header {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    justify-content: space-between;
}

.location-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #eff6ff;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.location-icon svg {
    width: 20px;
    height: 20px;
}

.location-title {
    flex: 1;
    min-width: 0;
}

.location-name {
    font-weight: 600;
    color: #0f172a;
}

.location-meta {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.2rem;
}

.location-tag {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    background: #fee2e2;
    color: #b91c1c;
    white-space: nowrap;
}

.location-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.location-stat {
    background: #f8fafc;
    border-radius: 8px;
    padding: 0.5rem;
    text-align: center;
}

.location-stat .stat-label {
    display: block;
    font-size: 0.7rem;
    color: #6b7280;
}

.location-stat .stat-value {
    font-weight: 700;
    color: #0f172a;
}

.location-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.75rem;
}

.location-badge {
    background: #f1f5f9;
    color: #334155;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    white-space: nowrap;
}

.badge-pm {
    background: #fff7ed;
    color: #c2410c;
}

.badge-rentals {
    background: #ecfeff;
    color: #0f766e;
}

.badge-repairs {
    background: #fef9c3;
    color: #92400e;
}

.badge-recert {
    background: #ede9fe;
    color: #5b21b6;
}

.location-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.btn-xs {
    font-size: 0.7rem;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
}

.btn-ghost {
    background: transparent;
    border: 1px dashed var(--color-gray-300);
    color: #475569;
}

.map-empty {
    display: none;
    text-align: center;
    color: #6b7280;
    font-size: 0.85rem;
    margin-top: 1rem;
}

.map-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.map-panel-card {
    background: white;
    border: 1px solid var(--color-gray-200);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: var(--shadow-sm);
}

.panel-title {
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 0.75rem;
}

.vendor-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.map-vendor-card {
    border: 1px solid var(--color-gray-200);
    border-radius: 10px;
    padding: 0.75rem;
    background: #f8fafc;
}

.vendor-card-head {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.vendor-badge {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: #2563eb;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.vendor-badge-red {
    background: #dc2626;
}

.vendor-badge-teal {
    background: #0f766e;
}

.vendor-badge-indigo {
    background: #4f46e5;
}

.vendor-name {
    font-weight: 600;
    color: #111827;
}

.vendor-meta {
    font-size: 0.75rem;
    color: #64748b;
}

.vendor-metrics {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #475569;
}

.transit-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.transit-item {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.transit-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #e0f2fe;
    color: #0284c7;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.transit-icon svg {
    width: 18px;
    height: 18px;
}

.transit-info {
    flex: 1;
    min-width: 0;
}

.transit-title {
    font-weight: 600;
    font-size: 0.85rem;
    color: #0f172a;
}

.transit-route {
    font-size: 0.7rem;
    color: #64748b;
}

.link-btn {
    background: none;
    border: none;
    color: #2563eb;
    font-size: 0.75rem;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

.task-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.task-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.task-item {
    background: #f8fafc;
    border-radius: 8px;
    padding: 0.4rem 0.6rem;
    font-size: 0.75rem;
    color: #475569;
}

.recall-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.recall-item {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    padding: 0.5rem 0.6rem;
    border-radius: 8px;
}

.recall-title {
    font-weight: 600;
    font-size: 0.8rem;
    color: #9a3412;
}

.recall-meta {
    font-size: 0.7rem;
    color: #c2410c;
}

.geo-map {
    background: white;
    border: 1px solid var(--color-gray-200);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: var(--shadow-sm);
}

.geo-canvas {
    position: relative;
    height: 320px;
    background: radial-gradient(circle at top, #eef2ff, #e2e8f0);
    border-radius: 12px;
    overflow: hidden;
}

.geo-label {
    position: absolute;
    top: 10px;
    left: 12px;
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 600;
}

.geo-map-shape {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.geo-map-outline {
    fill: rgba(148, 163, 184, 0.22);
    stroke: rgba(100, 116, 139, 0.6);
    stroke-width: 1.2;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.geo-map-lines path {
    fill: none;
    stroke: rgba(100, 116, 139, 0.4);
    stroke-width: 0.6;
    stroke-linecap: round;
}

.geo-vendor {
    position: absolute;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 2px solid white;
    font-size: 0.7rem;
    font-weight: 700;
    color: white;
    background: #2563eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
    cursor: pointer;
    z-index: 2;
}

.geo-vendor.vendor-blue {
    background: #2563eb;
}

.geo-vendor.vendor-teal {
    background: #0f766e;
}

.geo-vendor.vendor-indigo {
    background: #4f46e5;
}

.geo-connector {
    position: absolute;
    border-top: 2px dashed #94a3b8;
    opacity: 0.7;
    z-index: 1;
}

.geo-pin {
    position: absolute;
    min-width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border: 3px solid white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
    cursor: pointer;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: white;
    padding: 0 4px;
    transform: translate(-50%, -50%);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.geo-pin:hover {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.5);
}

.geo-pin .pin-label {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.geo-pin .pin-count {
    font-size: 1rem;
    font-weight: 800;
}

.geo-route {
    position: absolute;
    top: 60%;
    left: 20%;
    width: 60%;
    z-index: 2;
}

.geo-line {
    display: block;
    border-top: 2px dashed #94a3b8;
}

.geo-truck {
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: white;
    border: 1px solid #cbd5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #0f766e;
}

.geo-tooltip {
    position: absolute;
    bottom: 38px;
    left: 50%;
    transform: translateX(-50%);
    background: #0f172a;
    color: white;
    font-size: 0.65rem;
    padding: 0.35rem 0.5rem;
    border-radius: 6px;
    white-space: normal;
    text-align: left;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.geo-truck:hover .geo-tooltip {
    opacity: 1;
}

.geo-truck svg {
    width: 18px;
    height: 18px;
}

.geo-legend {
    display: flex;
    gap: 1rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
    font-size: 0.75rem;
    color: #64748b;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.legend-hospital {
    background: #2563eb;
}

.legend-vendor {
    background: #0f766e;
    border-radius: 2px;
}

.legend-transit {
    background: #f59e0b;
}

.map-detail-card {
    width: min(900px, 94vw);
}

.detail-subtitle {
    color: #64748b;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.map-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.map-detail-section {
    background: #f8fafc;
    border-radius: 12px;
    padding: 0.75rem;
}

.detail-section-title {
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.detail-toggle {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.detail-toggle-btn {
    border: 1px solid var(--color-gray-200);
    background: white;
    border-radius: 999px;
    font-size: 0.7rem;
    padding: 0.25rem 0.6rem;
    cursor: pointer;
}

.detail-toggle-btn.active {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #1d4ed8;
    font-weight: 600;
}

.detail-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

.detail-stat {
    background: white;
    border-radius: 8px;
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--color-gray-200);
}

.detail-stat-label {
    font-size: 0.7rem;
    color: #64748b;
}

.detail-stat-value {
    font-weight: 600;
    color: #111827;
}

.detail-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.detail-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    background: white;
    border-radius: 8px;
    padding: 0.5rem 0.6rem;
    border: 1px solid var(--color-gray-200);
}

.detail-item-name {
    font-weight: 600;
    color: #111827;
    font-size: 0.85rem;
}

.detail-item-meta {
    font-size: 0.7rem;
    color: #64748b;
}

.floor-plan-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 0.75rem;
    align-items: start;
}

.floor-plan-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-template-rows: repeat(4, 56px);
    gap: 0.5rem;
    margin-top: 0.5rem;
    background: #f1f5f9;
    border: 1px solid var(--color-gray-200);
    border-radius: 12px;
    padding: 0.75rem;
}

.floor-plan-room {
    background: white;
    border: 1px solid #cbd5f5;
    border-radius: 10px;
    padding: 0.5rem;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
    width: 100%;
    appearance: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.floor-plan-room.active {
    border-color: #60a5fa;
    box-shadow: 0 6px 14px rgba(59, 130, 246, 0.15);
    transform: translateY(-1px);
}

.room-name {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.8rem;
}

.room-meta {
    font-size: 0.7rem;
    color: #64748b;
    margin-top: 0.2rem;
}

.floor-plan-devices {
    margin-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    background: white;
    border: 1px solid var(--color-gray-200);
    border-radius: 12px;
    padding: 0.75rem;
}

.floor-plan-device {
    background: white;
    border: 1px solid var(--color-gray-200);
    border-radius: 8px;
    padding: 0.5rem 0.6rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.floor-plan-empty {
    font-size: 0.75rem;
    color: #64748b;
    background: #f8fafc;
    border: 1px dashed var(--color-gray-200);
    border-radius: 8px;
    padding: 0.5rem 0.6rem;
}

.map-floorplan-card {
    width: min(720px, 92vw);
}

@media (max-width: 1200px) {
    .map-layout {
        grid-template-columns: 1fr;
    }

    .map-panel {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .map-panel-card {
        flex: 1 1 280px;
    }
}

@media (max-width: 768px) {
    .map-grid {
        grid-template-columns: 1fr;
    }

    .map-toolbar {
        padding: 0.75rem;
    }

    .map-search {
        width: 100%;
    }

    .map-detail-grid {
        grid-template-columns: 1fr;
    }

    .floor-plan-wrapper {
        grid-template-columns: 1fr;
    }
}

/* Location with label above pin */
.geo-location {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: translate(-50%, -50%);
    z-index: 5;
}

.geo-location-label {
    background: rgba(15, 23, 42, 0.9);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    margin-bottom: 6px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.geo-location .geo-pin {
    position: relative;
    transform: none;
}

.geo-location .geo-pin:hover {
    transform: scale(1.1);
}

/* Pin icon inside button */
.geo-pin .pin-icon {
    width: 16px;
    height: 16px;
    margin-right: 2px;
    stroke: white;
}

/* UPS Shipment Badge */
.geo-shipment {
    position: absolute;
    transform: translate(-50%, -50%);
    z-index: 6;
}

.geo-truck-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    color: white;
    border: 3px solid white;
    border-radius: 20px;
    padding: 8px 14px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(109, 40, 217, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.geo-truck-badge:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 18px rgba(109, 40, 217, 0.5);
}

.geo-truck-badge .truck-icon {
    width: 20px;
    height: 20px;
}

.geo-truck-badge .shipment-count {
    font-size: 1rem;
    font-weight: 800;
}

.geo-truck-badge .shipment-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #0f172a;
    color: white;
    font-size: 0.75rem;
    padding: 10px 14px;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    margin-bottom: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    text-align: left;
}

.geo-truck-badge .shipment-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #0f172a;
}

.geo-truck-badge:hover .shipment-tooltip {
    opacity: 1;
}

.shipment-tooltip .tracking-line {
    display: block;
    font-family: monospace;
    color: #94a3b8;
    margin-top: 4px;
}

/* Location with label above pin */
.geo-location {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: translate(-50%, -50%);
    z-index: 5;
}

.geo-location-label {
    background: rgba(15, 23, 42, 0.9);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    margin-bottom: 6px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.geo-location .geo-pin {
    position: relative;
    transform: none;
}

.geo-location .geo-pin:hover {
    transform: scale(1.1);
}

/* Pin icon inside button */
.geo-pin .pin-icon {
    width: 16px;
    height: 16px;
    margin-right: 2px;
    stroke: white;
}

/* UPS Shipment Badge */
.geo-shipment {
    position: absolute;
    transform: translate(-50%, -50%);
    z-index: 6;
}

.geo-truck-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    color: white;
    border: 3px solid white;
    border-radius: 20px;
    padding: 8px 14px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(109, 40, 217, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.geo-truck-badge:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 18px rgba(109, 40, 217, 0.5);
}

.geo-truck-badge .truck-icon {
    width: 20px;
    height: 20px;
}

.geo-truck-badge .shipment-count {
    font-size: 1rem;
    font-weight: 800;
}

.geo-truck-badge .shipment-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #0f172a;
    color: white;
    font-size: 0.75rem;
    padding: 10px 14px;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    margin-bottom: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    text-align: left;
}

.geo-truck-badge .shipment-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #0f172a;
}

.geo-truck-badge:hover .shipment-tooltip {
    opacity: 1;
}

.shipment-tooltip .tracking-line {
    display: block;
    font-family: monospace;
    color: #94a3b8;
    margin-top: 4px;
}

/* USA Map Image */
.geo-map-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0.85;
    pointer-events: none;
    z-index: 1;
}

/* USA Map Image */
.geo-map-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0.85;
    pointer-events: none;
    z-index: 1;
}

/* Location Card Highlight Animation */
.location-card-highlight {
    animation: card-pulse 0.5s ease-out 3;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.5), 0 4px 20px rgba(59, 130, 246, 0.3) !important;
}

@keyframes card-pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }
}

/* ===================== */
/* Split Panel View      */
/* ===================== */
.location-split-view {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
}

.split-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.split-container {
    position: relative;
    display: flex;
    width: 90%;
    max-width: 1200px;
    height: 85vh;
    margin: 5vh auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    z-index: 1;
}

.split-left {
    width: 280px;
    min-width: 280px;
    background: #1e293b;
    color: white;
    display: flex;
    flex-direction: column;
}

.split-left-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.split-left-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.split-close-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.split-close-btn:hover {
    color: white;
}

.split-location-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.location-list-item {
    padding: 14px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
    margin-bottom: 4px;
}

.location-list-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.location-list-item.active {
    background: #3b82f6;
}

.location-list-name {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.location-list-meta {
    font-size: 0.8rem;
    opacity: 0.7;
}

.split-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #f8fafc;
}

.split-right-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 24px 30px;
    background: white;
    border-bottom: 1px solid #e2e8f0;
}

.split-location-title {
    margin: 0 0 4px 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
}

.split-location-address {
    color: #64748b;
    font-size: 0.9rem;
}

.split-header-actions {
    display: flex;
    gap: 10px;
}

.split-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px 30px;
}

.split-section {
    margin-bottom: 28px;
}

.split-section-title {
    margin: 0 0 16px 0;
    font-size: 1rem;
    font-weight: 600;
    color: #334155;
}

.split-stats-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.split-stat {
    background: white;
    border-radius: 10px;
    padding: 16px 24px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    min-width: 100px;
}

.split-stat-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: #0f172a;
}

.split-stat-label {
    display: block;
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 4px;
}

.split-equipment-list {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.split-equipment-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid #f1f5f9;
}

.split-equipment-row:last-child {
    border-bottom: none;
}

.split-equipment-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #1e293b;
    margin-bottom: 2px;
}

.split-equipment-meta {
    font-size: 0.8rem;
    color: #64748b;
}

.split-rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.split-room-card {
    background: white;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: box-shadow 0.15s ease;
}

.split-room-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.split-room-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #1e293b;
    margin-bottom: 4px;
}

.split-room-count {
    font-size: 0.8rem;
    color: #64748b;
}

/* ===================== */
/* Split Panel View      */
/* ===================== */
.location-split-view {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
}

.split-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.split-container {
    position: relative;
    display: flex;
    width: 90%;
    max-width: 1200px;
    height: 85vh;
    margin: 5vh auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    z-index: 1;
}

.split-left {
    width: 280px;
    min-width: 280px;
    background: #1e293b;
    color: white;
    display: flex;
    flex-direction: column;
}

.split-left-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.split-left-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.split-close-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.split-close-btn:hover {
    color: white;
}

.split-location-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.location-list-item {
    padding: 14px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
    margin-bottom: 4px;
}

.location-list-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.location-list-item.active {
    background: #3b82f6;
}

.location-list-name {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.location-list-meta {
    font-size: 0.8rem;
    opacity: 0.7;
}

.split-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #f8fafc;
}

.split-right-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 24px 30px;
    background: white;
    border-bottom: 1px solid #e2e8f0;
}

.split-location-title {
    margin: 0 0 4px 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
}

.split-location-address {
    color: #64748b;
    font-size: 0.9rem;
}

.split-header-actions {
    display: flex;
    gap: 10px;
}

.split-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px 30px;
}

.split-section {
    margin-bottom: 28px;
}

.split-section-title {
    margin: 0 0 16px 0;
    font-size: 1rem;
    font-weight: 600;
    color: #334155;
}

.split-stats-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.split-stat {
    background: white;
    border-radius: 10px;
    padding: 16px 24px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    min-width: 100px;
}

.split-stat-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: #0f172a;
}

.split-stat-label {
    display: block;
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 4px;
}

.split-equipment-list {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.split-equipment-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid #f1f5f9;
}

.split-equipment-row:last-child {
    border-bottom: none;
}

.split-equipment-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #1e293b;
    margin-bottom: 2px;
}

.split-equipment-meta {
    font-size: 0.8rem;
    color: #64748b;
}

.split-rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.split-room-card {
    background: white;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: box-shadow 0.15s ease;
}

.split-room-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.split-room-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #1e293b;
    margin-bottom: 4px;
}

.split-room-count {
    font-size: 0.8rem;
    color: #64748b;
}

/* ======================== */
/* Embedded Split Panel     */
/* ======================== */
/* ======================== */
/* Embedded Split Panel     */
/* ======================== */
.embed-split-panel {
    display: flex;
    height: 75vh;
    min-height: 500px;
    max-height: 1200px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.embed-sidebar {
    width: 300px;
    min-width: 300px;
    background: white;
    color: #0f172a;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e2e8f0;
}

.embed-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 16px;
}

.embed-sidebar-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.embed-count {
    background: #f1f5f9;
    color: #64748b;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.embed-sidebar-search {
    padding: 0 16px 16px;
}

.embed-sidebar-search input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    color: #334155;
    font-size: 0.9rem;
}

.embed-sidebar-search input::placeholder {
    color: #94a3b8;
}

.embed-sidebar-search input:focus {
    outline: none;
    background: white;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.embed-location-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 0 12px 12px;
}

.embed-location-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-bottom: 4px;
    border: 1px solid transparent;
}

.embed-location-item:hover {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.embed-location-item.active {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    border-color: transparent;
}

.embed-location-icon {
    width: 40px;
    height: 40px;
    background: #f1f5f9;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.embed-location-item.active .embed-location-icon {
    background: rgba(255, 255, 255, 0.2);
}

.embed-location-icon svg {
    width: 20px;
    height: 20px;
    stroke: #64748b;
}

.embed-location-item.active .embed-location-icon svg {
    stroke: white;
}

.embed-location-info {
    flex: 1;
    min-width: 0;
}

.embed-location-name {
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    /* Default dark text is inherited */
}

.embed-location-item.active .embed-location-name {
    color: white;
}

.embed-location-meta {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 2px;
}

.embed-location-item.active .embed-location-meta {
    color: rgba(255, 255, 255, 0.8);
}

.embed-location-badge {
    font-size: 0.7rem;
    color: #f59e0b;
    white-space: nowrap;
    font-weight: 600;
}

.embed-location-item.active .embed-location-badge {
    color: #fbbf24;
}

/* Main Content Area */
.embed-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #f8fafc;
    overflow: hidden;
}

.embed-main-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 24px 28px;
    background: white;
    border-bottom: 1px solid #e2e8f0;
}

.embed-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
}

.embed-address {
    color: #64748b;
    font-size: 0.9rem;
    margin-top: 4px;
}

.embed-header-actions {
    display: flex;
    gap: 10px;
}

.embed-header-actions .btn svg {
    margin-right: 6px;
}

/* Stats Row */
.embed-stats-row {
    display: flex;
    gap: 16px;
    padding: 20px 28px;
    background: white;
    border-bottom: 1px solid #e2e8f0;
    overflow-x: auto;
}

.embed-stat-card {
    background: #f1f5f9;
    border-radius: 12px;
    padding: 16px 24px;
    text-align: center;
    min-width: 100px;
    transition: transform 0.15s ease;
}

.embed-stat-card:hover {
    transform: translateY(-2px);
}

.embed-stat-card.owned {
    border-left: 4px solid #22c55e;
}

.embed-stat-card.rentals {
    border-left: 4px solid #f59e0b;
}

.embed-stat-card.repairs {
    border-left: 4px solid #ef4444;
}

.embed-stat-card.recert {
    border-left: 4px solid #8b5cf6;
}

.embed-stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1;
}

.embed-stat-label {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 6px;
}

/* Content Grid */
.embed-content-grid {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 20px 28px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.embed-section {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.embed-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
}

.embed-section-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
}

.embed-section-count {
    font-size: 0.8rem;
    color: #64748b;
}

/* Equipment Table */
.embed-table-wrapper {
    overflow-x: auto;
}

.embed-equipment-table {
    width: 100%;
    border-collapse: collapse;
}

.embed-equipment-table th {
    text-align: left;
    padding: 12px 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: #f8fafc;
}

.embed-equipment-row td {
    padding: 14px 20px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.embed-equipment-row:last-child td {
    border-bottom: none;
}

.embed-equipment-row:hover {
    background: #f8fafc;
}

.embed-eq-title {
    font-weight: 600;
    color: #0f172a;
    font-size: 0.95rem;
}

.embed-eq-sn {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 2px;
}

.embed-eq-room {
    color: #475569;
    font-size: 0.9rem;
}

.embed-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.embed-status-badge.owned {
    background: #dcfce7;
    color: #15803d;
}

.embed-status-badge.rental {
    background: #fef3c7;
    color: #b45309;
}

/* Floor Plan Grid */
.embed-rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    padding: 16px 20px;
}

.embed-room-card {
    background: #f8fafc;
    border-radius: 10px;
    padding: 18px 14px;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 2px solid transparent;
}

.embed-room-card:hover {
    background: #f1f5f9;
    border-color: #3b82f6;
    transform: translateY(-2px);
}

.embed-room-name {
    font-weight: 600;
    color: #0f172a;
    font-size: 0.9rem;
}

.embed-room-devices {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 4px;
}





/* Main Content Area */
.embed-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #f8fafc;
    overflow: hidden;
}

.embed-main-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 24px 28px;
    background: white;
    border-bottom: 1px solid #e2e8f0;
}

.embed-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
}

.embed-address {
    color: #64748b;
    font-size: 0.9rem;
    margin-top: 4px;
}

.embed-header-actions {
    display: flex;
    gap: 10px;
}

.embed-header-actions .btn svg {
    margin-right: 6px;
}

/* Stats Row */
.embed-stats-row {
    display: flex;
    gap: 16px;
    padding: 20px 28px;
    background: white;
    border-bottom: 1px solid #e2e8f0;
    overflow-x: auto;
}

.embed-stat-card {
    background: #f1f5f9;
    border-radius: 12px;
    padding: 16px 24px;
    text-align: center;
    min-width: 100px;
    transition: transform 0.15s ease;
}

.embed-stat-card:hover {
    transform: translateY(-2px);
}

.embed-stat-card.owned {
    border-left: 4px solid #22c55e;
}

.embed-stat-card.rentals {
    border-left: 4px solid #f59e0b;
}

.embed-stat-card.repairs {
    border-left: 4px solid #ef4444;
}

.embed-stat-card.recert {
    border-left: 4px solid #8b5cf6;
}

.embed-stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1;
}

.embed-stat-label {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 6px;
}

/* Content Grid */
.embed-content-grid {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 20px 28px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.embed-section {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.embed-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
}

.embed-section-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
}

.embed-section-count {
    font-size: 0.8rem;
    color: #64748b;
}

/* Equipment Table */
.embed-table-wrapper {
    overflow-x: auto;
}

.embed-equipment-table {
    width: 100%;
    border-collapse: collapse;
}

.embed-equipment-table th {
    text-align: left;
    padding: 12px 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: #f8fafc;
}

.embed-equipment-row td {
    padding: 14px 20px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.embed-equipment-row:last-child td {
    border-bottom: none;
}

.embed-equipment-row:hover {
    background: #f8fafc;
}

.embed-eq-title {
    font-weight: 600;
    color: #0f172a;
    font-size: 0.95rem;
}

.embed-eq-sn {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 2px;
}

.embed-eq-room {
    color: #475569;
    font-size: 0.9rem;
}

.embed-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.embed-status-badge.owned {
    background: #dcfce7;
    color: #15803d;
}

.embed-status-badge.rental {
    background: #fef3c7;
    color: #b45309;
}

/* Floor Plan Grid */
.embed-rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    padding: 16px 20px;
}

.embed-room-card {
    background: #f8fafc;
    border-radius: 10px;
    padding: 18px 14px;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 2px solid transparent;
}

.embed-room-card:hover {
    background: #f1f5f9;
    border-color: #3b82f6;
    transform: translateY(-2px);
}

.embed-room-name {
    font-weight: 600;
    color: #0f172a;
    font-size: 0.9rem;
}

.embed-room-devices {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 4px;
}

/* PM Due Badges */
.embed-pm-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.embed-pm-badge.pm-overdue {
    background: #fee2e2;
    color: #dc2626;
}

.embed-pm-badge.pm-soon {
    background: #fef3c7;
    color: #d97706;
}

.embed-pm-badge.pm-ok {
    background: #dcfce7;
    color: #16a34a;
}

/* Visual Floor Plan */
.floor-visual {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.floor-visual-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
}

.floor-visual-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
}

.floor-total {
    font-size: 0.8rem;
    color: #64748b;
}

.floor-visual-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 20px;
    background: #f8fafc;
}

.floor-room {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 100px;
}

.floor-room:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
}

.floor-room-large {
    grid-column: span 2;
}

.floor-room-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.floor-room-name {
    font-weight: 600;
    color: #0f172a;
    font-size: 0.95rem;
}

.floor-room-badge {
    background: #3b82f6;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

.floor-room-devices {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.floor-device-chip {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #f1f5f9;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    color: #475569;
}

.floor-device-chip svg {
    stroke: #64748b;
}

.floor-device-more {
    padding: 4px 8px;
    font-size: 0.75rem;
    color: #3b82f6;
    font-weight: 500;
}

/* Room Detail Modal */
.room-modal-card {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    position: relative;
}

.room-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: #1e293b;
    color: white;
}

.room-modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.room-modal-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
}

.room-modal-content {
    padding: 16px;
    max-height: 400px;
    overflow-y: auto;
}

.room-device-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border-radius: 10px;
    margin-bottom: 8px;
    background: #f8fafc;
}

.room-device-item:hover {
    background: #f1f5f9;
}

.room-device-icon {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.room-device-icon svg {
    stroke: #3b82f6;
}

.room-device-info {
    flex: 1;
}

.room-device-name {
    font-weight: 600;
    color: #0f172a;
    font-size: 0.95rem;
}

.room-device-sn {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 2px;
}

.room-empty {
    text-align: center;
    color: #64748b;
    padding: 40px 20px;
}

/* PM Due Badges */
.embed-pm-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.embed-pm-badge.pm-overdue {
    background: #fee2e2;
    color: #dc2626;
}

.embed-pm-badge.pm-soon {
    background: #fef3c7;
    color: #d97706;
}

.embed-pm-badge.pm-ok {
    background: #dcfce7;
    color: #16a34a;
}

/* Visual Floor Plan */
.floor-visual {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.floor-visual-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
}

.floor-visual-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
}

.floor-total {
    font-size: 0.8rem;
    color: #64748b;
}

.floor-visual-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 20px;
    background: #f8fafc;
}

.floor-room {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 100px;
}

.floor-room:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
}

.floor-room-large {
    grid-column: span 2;
}

.floor-room-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.floor-room-name {
    font-weight: 600;
    color: #0f172a;
    font-size: 0.95rem;
}

.floor-room-badge {
    background: #3b82f6;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

.floor-room-devices {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.floor-device-chip {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #f1f5f9;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    color: #475569;
}

.floor-device-chip svg {
    stroke: #64748b;
}

.floor-device-more {
    padding: 4px 8px;
    font-size: 0.75rem;
    color: #3b82f6;
    font-weight: 500;
}

/* Room Detail Modal */
.room-modal-card {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    position: relative;
}

.room-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: #1e293b;
    color: white;
}

.room-modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.room-modal-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
}

.room-modal-content {
    padding: 16px;
    max-height: 400px;
    overflow-y: auto;
}

.room-device-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border-radius: 10px;
    margin-bottom: 8px;
    background: #f8fafc;
}

.room-device-item:hover {
    background: #f1f5f9;
}

.room-device-icon {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.room-device-icon svg {
    stroke: #3b82f6;
}

.room-device-info {
    flex: 1;
}

.room-device-name {
    font-weight: 600;
    color: #0f172a;
    font-size: 0.95rem;
}

.room-device-sn {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 2px;
}

.room-empty {
    text-align: center;
    color: #64748b;
    padding: 40px 20px;
}

/* Geo Map Container for toggle */
.geo-map-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    min-height: 500px;
    position: relative;
}

.geo-map-container .geo-canvas {
    position: relative;
    width: 100%;
    height: 450px;
    background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
    overflow: hidden;
}

.geo-map-container .geo-label {
    position: absolute;
    top: 16px;
    left: 20px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #475569;
    z-index: 10;
}

.geo-map-container .geo-legend {
    display: flex;
    gap: 24px;
    padding: 16px 24px;
    background: white;
    border-top: 1px solid #e2e8f0;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #64748b;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.legend-dot.location {
    background: #3b82f6;
}

.legend-dot.transit {
    background: #8b5cf6;
}

/* Geo Map Container for toggle */
.geo-map-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    min-height: 500px;
    position: relative;
}

.geo-map-container .geo-canvas {
    position: relative;
    width: 100%;
    height: 450px;
    background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
    overflow: hidden;
}

.geo-map-container .geo-label {
    position: absolute;
    top: 16px;
    left: 20px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #475569;
    z-index: 10;
}

.geo-map-container .geo-legend {
    display: flex;
    gap: 24px;
    padding: 16px 24px;
    background: white;
    border-top: 1px solid #e2e8f0;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #64748b;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.legend-dot.location {
    background: #3b82f6;
}

.legend-dot.transit {
    background: #8b5cf6;
}

/* Full Width Layout Fix */
.embed-split-panel {
    height: calc(100vh - 240px);
}

.geo-map-container.full-width {
    width: 100%;
}

/* Vendor Pins */
.geo-pin.vendor-pin {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.geo-location.vendor .geo-location-label {
    background: rgba(22, 163, 74, 0.9);
}

.legend-dot.vendor {
    background: #22c55e;
}

/* Click-based Truck Tooltip */
.shipment-tooltip-click {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: white;
    padding: 16px;
    border-radius: 10px;
    width: 260px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    z-index: 100;
    margin-bottom: 10px;
}

.shipment-tooltip-click.visible {
    display: block;
}

.shipment-tooltip-click::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: #1e293b;
}

.tooltip-header {
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 0.9rem;
    color: #94a3b8;
}

.tracking-line {
    padding: 8px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    font-family: monospace;
}

.tracking-carrier {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-right: 8px;
}

.tracking-carrier.ups {
    background: #4b2c02;
    color: #f59e0b;
}

.tracking-carrier.fedex {
    background: #4c1d95;
    color: #c4b5fd;
}

/* Make geo truck clickable */
.geo-truck-badge {
    cursor: pointer;
    position: relative;
}

/* Full Width Layout Fix */
.embed-split-panel {
    height: calc(100vh - 240px);
}

.geo-map-container.full-width {
    width: 100%;
}

/* Vendor Pins */
.geo-pin.vendor-pin {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.geo-location.vendor .geo-location-label {
    background: rgba(22, 163, 74, 0.9);
}

.legend-dot.vendor {
    background: #22c55e;
}

/* Click-based Truck Tooltip */
.shipment-tooltip-click {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: white;
    padding: 16px;
    border-radius: 10px;
    width: 260px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    z-index: 100;
    margin-bottom: 10px;
}

.shipment-tooltip-click.visible {
    display: block;
}

.shipment-tooltip-click::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: #1e293b;
}

.tooltip-header {
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 0.9rem;
    color: #94a3b8;
}

.tracking-line {
    padding: 8px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    font-family: monospace;
}

.tracking-carrier {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-right: 8px;
}

.tracking-carrier.ups {
    background: #4b2c02;
    color: #f59e0b;
}

/* Make equipment section fill width */
.embed-equipment-section {
    flex: 1;
}

.embed-table-wrapper {
    width: 100%;
}

.embed-equipment-table {
    width: 100%;
}


/* ==========================================================================
   CONSOLIDATED MAP PAGE LAYOUT (CLEAN)
   ========================================================================== */

/* 1. Base Layout Structure */
.map-layout {
    display: block;
    width: 100%;
    height: 100%;
}

.embed-split-panel {
    display: flex;
    height: calc(100vh - 140px);
    min-height: 500px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    margin-bottom: 2rem;
}

/* 2. Sidebar (Locations List) */
.embed-sidebar {
    width: 280px;
    min-width: 280px;
    background: white;
    color: #0f172a;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e2e8f0;
    z-index: 2;
}

.embed-sidebar-header {
    padding: 1.25rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
}

.embed-sidebar-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #0f172a;
}

.embed-sidebar-search {
    padding: 1rem;
    background: white;
}

.embed-sidebar-search input {
    width: 100%;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #334155;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
}

.embed-location-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 0.5rem;
}

/* Sidebar Items */
.embed-location-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    margin-bottom: 0.25rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.embed-location-item:hover {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.embed-location-item.active {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-color: transparent;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.2);
}

.embed-location-icon {
    width: 36px;
    height: 36px;
    background: #f1f5f9;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.embed-location-icon svg {
    width: 20px;
    height: 20px;
    stroke: #64748b;
}

.embed-location-item.active .embed-location-icon {
    background: rgba(255, 255, 255, 0.2);
}

.embed-location-item.active .embed-location-icon svg {
    stroke: white;
}

.embed-location-info {
    flex: 1;
    min-width: 0;
}

.embed-location-name {
    font-weight: 500;
    font-size: 0.9rem;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.embed-location-meta {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 2px;
}

.embed-location-item.active .embed-location-name {
    color: white;
}

.embed-location-item.active .embed-location-meta {
    color: rgba(255, 255, 255, 0.8);
}

/* 3. Main Content Area */
.embed-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #f8fafc;
    overflow: hidden;
    overflow-y: auto;
    position: relative;
    padding-bottom: 80px;
}

.embed-main-header {
    background: white;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.embed-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    line-height: 1.2;
}

.embed-address {
    color: #64748b;
    margin-top: 0.25rem;
    font-size: 0.9rem;
}

.embed-header-actions {
    display: flex;
    gap: 0.75rem;
}

/* 4. Stats Row - Compact */
.embed-stats-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
    padding: 1.5rem 2rem;
    margin-bottom: 0.5rem;
}

.embed-stat-card {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    border: 1px solid #e2e8f0;
    border-top: 4px solid #cbd5e1;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.embed-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.embed-stat-card:nth-child(1) {
    border-top-color: #64748b;
}

.embed-stat-card:nth-child(2) {
    border-top-color: #3b82f6;
}

.embed-stat-card:nth-child(3) {
    border-top-color: #22c55e;
}

.embed-stat-card:nth-child(4) {
    border-top-color: #f59e0b;
}

.embed-stat-card:nth-child(5) {
    border-top-color: #ef4444;
}

.embed-stat-card:nth-child(6) {
    border-top-color: #8b5cf6;
}

.stat-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
}

/* 5. Equipment Table Section */
.embed-content-grid {
    padding: 0 2rem 3rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.embed-section {
    background: white;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.embed-section-header {
    background: #f8fafc;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.embed-section-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
}

.embed-section-count {
    background: #e2e8f0;
    color: #475569;
    padding: 0.2rem 0.6rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
}

.embed-table-wrapper {
    overflow-x: auto;
    width: 100%;
}

.embed-equipment-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.embed-equipment-table th {
    background: #1e293b;
    color: white;
    text-align: left;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.embed-equipment-table td {
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    vertical-align: middle;
}

.embed-equipment-table tr:hover td {
    background: #f8fafc;
}

/* Table Cells */
.embed-eq-name {
    min-width: 200px;
}

.embed-eq-title {
    font-weight: 600;
    color: #0f172a;
}

.embed-eq-sn {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 2px;
}

.embed-eq-room {
    font-weight: 500;
}

/* Badges */
.embed-status-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: capitalize;
}

.embed-status-badge.owned {
    background: #dcfce7;
    color: #166534;
}

.embed-status-badge.rental {
    background: #dbeafe;
    color: #1d4ed8;
}

.embed-status-badge.repair {
    background: #fef3c7;
    color: #b45309;
}

.embed-pm-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.75rem;
}

.embed-pm-badge.pm-overdue {
    background: #fee2e2;
    color: #b91c1c;
}

.embed-pm-badge.pm-soon {
    background: #ffedd5;
    color: #c2410c;
}

.embed-pm-badge.pm-ok {
    background: #f1f5f9;
    color: #64748b;
}

/* Action Buttons */
.embed-eq-actions {
    white-space: nowrap;
    display: flex;
    gap: 8px;
}

.embed-eq-actions .btn-xs {
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.embed-eq-actions .btn-outline {
    background: transparent;
    border: 1px solid #3b82f6;
    color: #3b82f6;
}

.embed-eq-actions .btn-outline:hover {
    background: #3b82f6;
    color: white;
}

.embed-eq-actions .btn-ghost {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #475569;
}

.embed-eq-actions .btn-ghost:hover {
    background: #e2e8f0;
    color: #1e293b;
}

/* 6. Floor Plan Section - Compact Grid */
.floor-visual {
    margin-top: 0;
}

.floor-visual-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.floor-visual-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
}

.floor-total {
    font-size: 0.85rem;
    color: #64748b;
}

.floor-visual-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
}

.floor-room {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.floor-room:hover {
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.floor-room::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #cbd5e1;
    opacity: 0.5;
}

.floor-room:hover::before {
    background: #3b82f6;
    opacity: 1;
}

.floor-room-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.floor-room-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #0f172a;
}

.floor-room-badge {
    background: #3b82f6;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floor-room-devices {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.floor-device-item {
    font-size: 0.75rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.floor-device-item::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #cbd5e1;
}

/* Modal Overlay Fix */
.location-detail-modal {
    z-index: 1000;
}

/* Fix for Map Split Panel Cutoff */
.embed-split-panel {
    height: 75vh !important;
    min-height: 500px !important;
    max-height: 1200px !important;
}

.embed-location-list,
.embed-content-grid {
    min-height: 0 !important;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .embed-split-panel {
        flex-direction: column;
        height: auto !important;
        min-height: 0;
    }

    .embed-sidebar {
        width: 100%;
        min-width: 0;
        height: auto;
        max-height: 250px;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
    }

    .embed-main {
        height: 600px;
        /* Ensure map has height */
    }

    .embed-header-actions {
        display: none;
    }

    /* Hide Map menu item on mobile */
    .sidebar-nav .nav-item[data-view="map"] {
        display: none !important;
    }
}