:root {
    --sidebar-width: 260px;
    --header-height: 64px;
}

body {
    background-color: var(--color-gray-50);
    min-height: 100vh;
    display: flex;
    overflow: auto;
    padding-bottom: 40px;
}

/* Demo Ribbon - Collapsible */
.demo-ribbon {
    position: fixed;
    bottom: 0;
    left: 0;
    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) {
    .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);
    min-height: calc(100vh + 100px);
}

.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-header svg {
    stroke: var(--color-accent);
}

.sidebar-nav {
    padding: var(--space-6);
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.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) */
.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: flex;
    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);
}

/* Responsive Exit Demo Button */
@media (min-width: 1025px) {
    .exit-demo-floating {
        bottom: 110px;
    }
}

@media (max-width: 1024px) {
    .exit-demo-floating {
        bottom: 110px;
    }
}

@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;
}

.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;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 999px;
    font-size: var(--font-size-xs);
    font-weight: 600;
}

.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);
    }

    .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;
    }

    .demo-ribbon {
        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;
    }
}

/* ========================================
   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 {
    max-width: 500px;
}

.quote-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-gray-200);
}

.quote-modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #111827;
}

.quote-modal-body {
    margin-bottom: 1.5rem;
}

.quote-detail-grid {
    display: grid;
    gap: 0.75rem;
}

.quote-detail-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--color-gray-100);
}

.quote-detail-label {
    font-size: 0.875rem;
    color: #6b7280;
}

.quote-detail-value {
    font-size: 0.875rem;
    font-weight: 500;
    color: #111827;
}

.quote-detail-value.quote-amount {
    font-size: 1.1rem;
    font-weight: 700;
    color: #059669;
}

.quote-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.quote-action-row {
    display: flex;
    gap: 0.75rem;
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 0.6rem 1.25rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

.btn-success:hover {
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    padding: 0.6rem 1.25rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

.btn-danger:hover {
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.po-input-group {
    display: flex;
    gap: 0.5rem;
    flex: 1;
}

.form-input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--color-gray-300);
    border-radius: 6px;
    font-size: 0.875rem;
}

.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.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 */
}