:root {
    /* Tailwind-like Color Palette */
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-800: #1e293b;
    --slate-900: #0f172a;

    --indigo-50: #eef2ff;
    --indigo-600: #4f46e5;

    --amber-50: #fffbeb;
    --amber-100: #fef3c7;
    --amber-200: #fde68a;
    --amber-500: #f59e0b;
    --amber-600: #d97706;
    --amber-700: #b45309;

    --blue-50: #eff6ff;
    --blue-100: #dbeafe;
    --blue-200: #bfdbfe;
    --blue-400: #60a5fa;
    --blue-500: #3b82f6;
    --blue-600: #2563eb;
    --blue-700: #1d4ed8;

    --purple-50: #faf5ff;
    --purple-600: #9333ea;

    --emerald-50: #ecfdf5;
    --emerald-100: #d1fae5;
    --emerald-500: #10b981;
    --emerald-600: #059669;

    --red-500: #ef4444;
    --red-100: #fee2e2;
    --red-600: #dc2626;

    --white: #ffffff;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--slate-50);
    color: var(--slate-900);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

.app-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 1rem;
}

@media (min-width: 768px) {
    .app-container {
        padding: 2rem;
    }
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: 1px solid var(--slate-200);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.header-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--slate-900);
    margin: 0;
}

.header-subtitle {
    color: var(--slate-500);
    font-size: 0.875rem;
    margin: 0.25rem 0 0 0;
}

.header-right {
    display: none;
    text-align: right;
}

@media (min-width: 768px) {
    .header-right {
        display: block;
    }
}

.status-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--slate-400);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 0.25rem 0;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--emerald-600);
    font-size: 0.875rem;
    font-weight: 700;
}

.status-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background-color: var(--emerald-500);
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: .5;
    }
}

/* KPI Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .kpi-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .kpi-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.metric-card {
    background: var(--white);
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid var(--slate-200);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s;
}

.metric-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.metric-card.clickable {
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.15s;
}

.metric-card.clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 12px -2px rgba(0, 0, 0, 0.12), 0 4px 6px -1px rgba(0, 0, 0, 0.08);
}

.metric-card.clickable:active {
    transform: translateY(0);
}

.metric-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.metric-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--slate-500);
    letter-spacing: 0.025em;
    margin: 0;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--slate-800);
    margin: 0.25rem 0 0 0;
}

.metric-subtext {
    font-size: 0.75rem;
    color: var(--slate-400);
    margin: 0.25rem 0 0 0;
}

.metric-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.metric-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* Shipment bar */
.shipment-bar {
    margin-bottom: 1.5rem;
}

.shipment-chip {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--white);
    border: 1px solid var(--slate-200);
    border-radius: 999px;
    padding: 0.75rem 1.25rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    flex-wrap: wrap;
}

.chip-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 120px;
}

.chip-label {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: var(--slate-500);
    font-weight: 700;
}

.chip-value {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--slate-800);
}

.chip-value.primary {
    color: var(--blue-600);
}

.chip-value.warn {
    color: var(--amber-600);
}

.chip-value.success {
    color: var(--emerald-600);
}

.chip-sub {
    font-size: 0.75rem;
    color: var(--slate-400);
}

.chip-divider {
    width: 1px;
    align-self: stretch;
    background: var(--slate-200);
}

/* Colors for cards */
.metric-card.indigo .metric-icon {
    background-color: var(--indigo-50);
    color: var(--indigo-600);
}

.metric-card.amber .metric-icon {
    background-color: var(--amber-50);
    color: var(--amber-600);
}

.metric-card.blue .metric-icon {
    background-color: var(--blue-50);
    color: var(--blue-600);
}

.metric-card.purple .metric-icon {
    background-color: var(--purple-50);
    color: var(--purple-600);
}

.metric-card.emerald .metric-icon {
    background-color: var(--emerald-50);
    color: var(--emerald-600);
}

/* Radar Section */
.radar-section {
    background-color: var(--slate-900);
    border-radius: 0.75rem;
    padding: 1.5rem;
    color: var(--white);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
    min-height: 280px;
    margin-bottom: 1.5rem;
}

.radar-header {
    position: relative;
    z-index: 10;
    margin-bottom: 3rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.radar-title {
    font-weight: 700;
    font-size: 1.125rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.icon-ship {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--blue-400);
}

.radar-subtitle {
    font-size: 0.75rem;
    color: var(--slate-400);
    margin: 0.25rem 0 0 0;
}

.radar-legend {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    display: flex;
    gap: 0.75rem;
    font-size: 0.75rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.legend-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
}

.legend-dot.critical {
    background-color: var(--red-500);
    animation: pulse 1s infinite;
}

.legend-dot.on-time {
    background-color: var(--blue-500);
}

.radar-timeline {
    position: relative;
    height: 10rem;
    display: flex;
    align-items: center;
}

/* Grid lines and markers */
.radar-timeline::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    border-bottom: 1px dashed rgba(51, 65, 85, 0.5);
    /* slate-700 */
}

.time-marker {
    position: absolute;
    top: 0;
    bottom: 0;
    border-left: 1px dashed var(--slate-800);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: 0.5rem;
}

.time-marker:first-child {
    border-left-style: solid;
}

.time-marker span {
    font-size: 0.625rem;
    color: var(--slate-500);
    font-family: monospace;
    background-color: var(--slate-900);
    padding: 0 0.25rem;
    margin-left: -0.75rem;
    /* Center somewhat */
}

/* Ships */
.ship-marker {
    position: absolute;
    top: 50%;
    transform: translateY(-50%) translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    z-index: 5;
    transition: transform 0.5s, z-index 0s;
}

.ship-marker:hover {
    z-index: 20;
    transform: translateY(-66%) translateX(-50%);
}

.ship-icon {
    padding: 0.5rem;
    border-radius: 50%;
    border: 2px solid var(--slate-900);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
    display: flex;
}

.ship-marker:hover .ship-icon {
    transform: scale(1.1);
}

.ship-icon svg {
    width: 1.25rem;
    height: 1.25rem;
    color: white;
}

.ship-icon.critical {
    background-color: var(--red-500);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.3);
    animation: pulse 1.5s infinite;
}

.ship-icon.warning {
    background-color: var(--amber-500);
}

.ship-icon.ok {
    background-color: var(--blue-500);
}

.ship-icon {
    position: relative;
}

.ship-count {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--slate-800);
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--slate-900);
}

.ship-label {
    margin-top: 0.5rem;
    text-align: center;
    transition: all 0.2s;
    max-width: 160px;
}

.ship-name {
    font-size: 0.7rem;
    font-weight: 600;
    color: white;
    white-space: normal;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.ship-sub {
    font-size: 0.625rem;
    color: var(--slate-400);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}


/* Tooltip implementation */
.ship-tooltip {
    position: absolute;
    bottom: 4rem;
    background: white;
    color: var(--slate-900);
    padding: 0.75rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    width: 14rem;
    max-width: 16rem;
    text-align: left;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
}

.ship-marker:hover .ship-tooltip {
    opacity: 1;
}

.tooltip-header {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--slate-500);
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.tooltip-title {
    font-weight: 700;
    font-size: 0.875rem;
}

.tooltip-sub {
    font-size: 0.75rem;
    color: var(--slate-500);
    margin-bottom: 0.5rem;
}

.tooltip-list {
    max-height: 120px;
    overflow-y: auto;
}

.tooltip-item {
    font-size: 0.75rem;
    color: var(--slate-600);
    padding: 0.25rem 0;
    border-bottom: 1px solid var(--slate-100);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tooltip-item strong {
    color: var(--slate-800);
    font-weight: 600;
}

.tooltip-item:last-child {
    border-bottom: none;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 700;
}

.status-badge.critical {
    background-color: var(--red-100);
    color: var(--red-600);
}

.status-badge.ok {
    background-color: var(--emerald-100);
    color: var(--emerald-600);
}


/* Action Panels Grid */
.panels-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .panels-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 1200px) {
    .panels-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

.panel {
    background: white;
    border-radius: 0.75rem;
    border: 1px solid var(--slate-200);
    padding: 1.25rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    min-width: 0;
    /* Prevent overflow */
}

.panel-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--slate-800);
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.icon-alert {
    color: var(--red-500);
    width: 1.125rem;
    height: 1.125rem;
}

.icon-check {
    color: var(--blue-500);
    width: 1.125rem;
    height: 1.125rem;
}

.action-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.2s;
    border: 1px solid transparent;
}

.action-item:hover {
    background-color: var(--slate-50);
    border-color: var(--slate-100);
}

.action-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.action-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background-color: var(--red-500);
}

.action-icon-box {
    padding: 0.375rem;
    background-color: var(--emerald-100);
    color: var(--emerald-600);
    border-radius: 0.25rem;
    display: flex;
}

.action-icon-box svg {
    width: 0.875rem;
    height: 0.875rem;
}

.action-text {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--slate-800);
    margin: 0;
}

.action-sub {
    font-size: 0.75rem;
    color: var(--slate-400);
    margin: 0;
}

.arrow-icon {
    color: var(--slate-300);
    width: 1rem;
    height: 1rem;
}

.action-item:hover .arrow-icon {
    color: var(--blue-500);
}

/* Search Bar */
.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.search-wrapper {
    position: relative;
    width: clamp(200px, 30vw, 320px);
    max-width: 100%;
}

.search-input {
    width: 100%;
    padding: 0.625rem 1rem 0.625rem 2.5rem;
    border-radius: 2rem;
    border: 1px solid var(--slate-200);
    background-color: white;
    font-size: 0.875rem;
    color: var(--slate-800);
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.search-input:focus {
    outline: none;
    border-color: var(--blue-400);
    box-shadow: 0 0 0 3px var(--blue-50);
}

.search-icon {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--slate-400);
    pointer-events: none;
}

.search-icon svg {
    width: 1rem;
    height: 1rem;
}

.search-results {
    position: absolute;
    top: 120%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--slate-100);
    z-index: 50;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    /* Hidden by default */
}

.search-results.active {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

.search-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--slate-50);
    cursor: pointer;
    transition: background 0.1s;
}

.search-item:last-child {
    border-bottom: none;
}

.search-item:hover {
    background-color: var(--slate-50);
}

.search-item-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--slate-800);
}

.search-item-sub {
    font-size: 0.75rem;
    color: var(--slate-500);
}

/* Filter Toggle */
.filter-toggle {
    display: flex;
    background-color: var(--slate-200);
    padding: 0.25rem;
    border-radius: 2rem;
    position: relative;
}

.filter-btn {
    border: none;
    background: none;
    padding: 0.375rem 1rem;
    border-radius: 1.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--slate-500);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.filter-btn.active {
    background-color: white;
    color: var(--blue-600);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.filter-icon {
    font-size: 0.875rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   ENHANCED PANELS - Scrollable & Modern
   ======================================== */

.panel {
    display: flex;
    flex-direction: column;
    max-height: 420px;
}

.action-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0.5rem;
    margin-right: -0.5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--slate-300) transparent;
}

.action-list::-webkit-scrollbar {
    width: 6px;
}

.action-list::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 3px;
}

.action-list::-webkit-scrollbar-thumb {
    background-color: var(--slate-300);
    border-radius: 3px;
}

.action-list::-webkit-scrollbar-thumb:hover {
    background-color: var(--slate-400);
}

/* Empty state */
.empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: var(--slate-400);
    font-size: 0.875rem;
}

/* ========================================
   SHIPMENT GROUPS - Date/Line Grouping
   ======================================== */

.shipment-group {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    background: var(--slate-50);
    border: 1px solid var(--slate-100);
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
}

.shipment-group:hover {
    border-color: var(--blue-200);
    background: var(--blue-50);
}

.shipment-group:last-child {
    margin-bottom: 0;
}

.shipment-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.shipment-line-badge {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--blue-600);
    min-width: 0;
    flex-shrink: 1;
}

.shipment-line-badge svg {
    width: 0.875rem;
    height: 0.875rem;
    flex-shrink: 0;
}

.line-name {
    font-weight: 600;
    font-size: 0.8125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shipment-date-info {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    flex-shrink: 0;
}

.date-badge {
    background: var(--blue-600);
    color: white;
    padding: 0.1875rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.6875rem;
    font-weight: 600;
    white-space: nowrap;
}

.count-badge {
    background: var(--slate-200);
    color: var(--slate-600);
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.625rem;
    font-weight: 600;
}

.shipment-items-preview {
    font-size: 0.6875rem;
    color: var(--slate-500);
    line-height: 1.3;
    margin-top: 0.375rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Shipment lines list under each date */
.shipment-lines-list {
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.shipment-line-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0;
    font-size: 0.8125rem;
}

.shipment-line-item svg {
    width: 0.875rem;
    height: 0.875rem;
    color: var(--blue-500);
    flex-shrink: 0;
}

.shipment-line-item .line-name {
    font-weight: 600;
    color: var(--slate-700);
    white-space: nowrap;
}

.shipment-line-item .line-items {
    font-size: 0.75rem;
    color: var(--slate-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.shipment-more {
    font-size: 0.75rem;
    color: var(--blue-600);
    font-weight: 500;
    padding-left: 1.375rem;
}

/* ========================================
   PENDING ORDERS - Enhanced Display
   ======================================== */

.action-icon-box.pending {
    background-color: var(--amber-50);
    color: var(--amber-600);
}

.action-content {
    flex: 1;
    min-width: 0;
}

.items-line {
    color: var(--slate-600);
    font-weight: 500;
    margin-top: 0.125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.action-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
    flex-wrap: wrap;
}

.supplier-name {
    font-size: 0.6875rem;
    color: var(--slate-500);
}

.tc-badge {
    background: var(--emerald-100);
    color: var(--emerald-700);
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.625rem;
    font-weight: 600;
}

.value-badge {
    font-size: 0.6875rem;
    color: var(--slate-500);
    font-weight: 500;
}

/* ========================================
   SEARCH RESULTS - Enhanced Dropdown
   ======================================== */

.search-results {
    max-height: 400px;
    width: 320px;
    min-width: 280px;
    max-width: 360px;
    left: 0;
    right: auto;
}

.search-result-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--slate-100);
    cursor: pointer;
    transition: all 0.15s ease;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover,
.search-result-item.active {
    background: linear-gradient(90deg, var(--blue-50) 0%, transparent 100%);
}

.search-result-item.active {
    border-left: 3px solid var(--blue-500);
    padding-left: calc(1rem - 3px);
}

.search-result-icon {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-result-icon svg {
    width: 1rem;
    height: 1rem;
}

.search-result-icon.order-icon {
    background: var(--amber-100);
    color: var(--amber-600);
}

.search-result-icon.shipment-icon {
    background: var(--blue-100);
    color: var(--blue-600);
}

.search-result-item.minimal {
    align-items: center;
    padding: 0.5rem 0.75rem;
}

.search-result-item.minimal .search-result-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    text-align: left;
}

.search-result-item.minimal .search-result-title {
    font-size: 0.8125rem;
}

.search-result-item.minimal .search-result-subtitle {
    color: var(--slate-400);
    font-size: 0.6875rem;
}

.search-result-content {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--slate-800);
    margin-bottom: 0.125rem;
}

.search-result-title mark {
    background: var(--amber-200);
    color: inherit;
    padding: 0 0.125rem;
    border-radius: 2px;
}

.search-result-subtitle {
    font-size: 0.75rem;
    color: var(--slate-600);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-subtitle mark {
    background: var(--amber-100);
    color: inherit;
}

.search-result-meta {
    font-size: 0.6875rem;
    color: var(--slate-400);
    margin-top: 0.25rem;
}

.search-result-badges {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
    flex-shrink: 0;
}

.type-badge {
    padding: 0.125rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
}

.type-badge.dry {
    background: var(--amber-100);
    color: var(--amber-700);
}

.type-badge.frozen {
    background: var(--blue-100);
    color: var(--blue-700);
}

.category-badge {
    font-size: 0.625rem;
    color: var(--slate-400);
    font-weight: 500;
}

.search-view-all {
    padding: 0.75rem 1rem;
    text-align: center;
    font-size: 0.75rem;
    color: var(--blue-600);
    font-weight: 600;
    cursor: pointer;
    border-top: 1px solid var(--slate-100);
    background: var(--slate-50);
    border-radius: 0 0 0.75rem 0.75rem;
}

.search-view-all:hover {
    background: var(--blue-50);
}

.search-no-results {
    padding: 1.5rem 1rem;
    text-align: center;
}

.search-no-results p {
    font-size: 0.875rem;
    color: var(--slate-600);
    margin: 0 0 0.25rem 0;
}

.search-no-results span {
    font-size: 0.75rem;
    color: var(--slate-400);
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */

@media (max-width: 768px) {
    .search-results {
        width: 100%;
        left: 0;
        right: 0;
    }

    .panel {
        max-height: 350px;
    }

    .shipment-group-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* ========================================
   FILTER ICON SVG STYLES
   ======================================== */

.filter-icon svg {
    width: 1rem;
    height: 1rem;
    vertical-align: middle;
}

.filter-btn.active .filter-icon svg {
    stroke: var(--blue-600);
}

.filter-btn:not(.active) .filter-icon svg {
    stroke: var(--slate-400);
}

/* ========================================
   PENDING PFIs REPORT PANEL
   ======================================== */

.pending-pfis-report {
    margin-bottom: 1.5rem;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pending-report-panel {
    background: white;
    border-radius: 0.75rem;
    border: 1px solid var(--slate-200);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.pending-report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--slate-100);
    background: var(--slate-50);
}

.pending-report-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--slate-800);
    margin: 0;
}

.pending-report-title svg {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--amber-600);
}

.pending-count-badge {
    background: var(--amber-100);
    color: var(--amber-700);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    margin-left: 0.5rem;
}

.pending-report-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 0.5rem;
    color: var(--slate-400);
    transition: all 0.2s;
}

.pending-report-close:hover {
    background: var(--slate-200);
    color: var(--slate-600);
}

.pending-report-close svg {
    width: 1.25rem;
    height: 1.25rem;
}

.pending-report-body {
    padding: 1rem;
    overflow-x: auto;
}

.pending-report-empty {
    padding: 2rem;
    text-align: center;
    color: var(--slate-500);
    font-size: 0.875rem;
}

/* Table Styles */
.pending-report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.pending-report-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    color: var(--slate-500);
    background: var(--slate-50);
    border-bottom: 1px solid var(--slate-200);
}

.pending-report-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--slate-100);
    color: var(--slate-700);
}

.pending-report-table tbody tr:hover {
    background-color: var(--slate-50);
}

.pfi-ref {
    font-weight: 600;
    color: var(--slate-800);
    white-space: nowrap;
}

.pfi-items {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--slate-600);
}

.pfi-num {
    text-align: right;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 0.8125rem;
}

.pfi-num.received {
    color: var(--emerald-600);
}

.pfi-num.transit {
    color: var(--blue-600);
}

.pfi-num.pending {
    color: var(--amber-600);
    font-weight: 700;
}

.totals-row {
    background: var(--slate-50);
    font-weight: 600;
}

.totals-row td {
    border-bottom: none;
    border-top: 2px solid var(--slate-200);
}

/* Responsive Table */
@media (max-width: 768px) {
    .pending-report-table {
        font-size: 0.75rem;
    }

    .pending-report-table th,
    .pending-report-table td {
        padding: 0.5rem;
    }

    .pfi-items {
        max-width: 120px;
    }
}