/* RESET & BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Daldrop Brand Colors - White & Teal/Cyan */
    --brand-white: #FFFFFF;
    --brand-teal: #00D4C8;
    --brand-teal-dark: #00B8AD;
    --brand-teal-light: #E6F9F8;
    
    /* Backgrounds - Clean, bright but functional */
    --bg-primary: #F5F8FA;
    --bg-secondary: #FFFFFF;
    --bg-card: #FFFFFF;
    --bg-hover: #F0F7F6;
    --bg-input: #F5F8FA;
    
    /* Text Colors - Dark for contrast */
    --text-primary: #1A2B3E;
    --text-secondary: #4A6572;
    --text-muted: #8AA3B0;
    --text-light: #FFFFFF;
    
    /* Status Colors - Subtle but clear */
    --accent-teal: #00D4C8;
    --accent-green: #2ECC71;
    --accent-red: #E74C3C;
    --accent-blue: #3498DB;
    --accent-yellow: #F1C40F;
    --accent-orange: #E67E22;
    --accent-purple: #9B59B6;
    
    /* Borders & Shadows */
    --border-color: #E8EDF2;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
}

/* DASHBOARD LAYOUT */
.dashboard {
    display: flex;
    height: 100vh;
    background: var(--bg-primary);
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: 260px;
    background: var(--brand-white);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 12px 32px 12px;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 24px;
}

.logo-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--brand-teal-light);
}

.logo-text {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.logo-text::after {
    content: "™";
    font-size: 10px;
    color: var(--brand-teal);
    vertical-align: super;
}

/* Navigation */
.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    font-weight: 500;
    font-size: 14px;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--brand-teal-light);
    color: var(--brand-teal-dark);
    font-weight: 600;
    border-left: 3px solid var(--brand-teal);
}

/* DISABLED STATE */
.nav-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    color: var(--text-muted);
}

.nav-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.badge {
    margin-left: auto;
    background: var(--brand-teal);
    color: var(--text-light);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 20px;
    min-width: 24px;
    text-align: center;
}

.badge.warning {
    background: var(--accent-red);
}

/* User Profile */
.user-profile {
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--brand-teal);
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.user-role {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ===== MAIN CONTENT ===== */
.main-content {
    flex: 1;
    padding: 24px 32px 32px 32px;
    overflow-y: auto;
    background: var(--bg-primary);
}

.main-content::-webkit-scrollbar {
    width: 6px;
}

.main-content::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

.main-content::-webkit-scrollbar-thumb {
    background: var(--brand-teal);
    border-radius: 10px;
}

/* HEADER */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 16px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-left h1 {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.project-selector {
    background: var(--brand-white);
    padding: 8px 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.project-selector:hover {
    border-color: var(--brand-teal);
    box-shadow: var(--shadow-md);
}

.arrow {
    font-size: 12px;
    color: var(--text-muted);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.search-box {
    position: relative;
    background: var(--brand-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 16px 8px 40px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.search-box:focus-within {
    border-color: var(--brand-teal);
    box-shadow: 0 0 0 3px rgba(0, 212, 200, 0.15);
}

.search-box input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 14px;
    width: 220px;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.icon-btn {
    background: var(--brand-white);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.icon-btn:hover {
    border-color: var(--brand-teal);
    color: var(--brand-teal-dark);
    box-shadow: var(--shadow-md);
}

.btn-primary {
    background: var(--brand-teal);
    color: var(--text-light);
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0, 212, 200, 0.3);
}

.btn-primary:hover {
    background: var(--brand-teal-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 212, 200, 0.35);
}

/* ===== KPI CARDS ===== */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.kpi-card {
    background: var(--brand-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px 24px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.kpi-card:hover {
    border-color: var(--brand-teal);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.kpi-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.kpi-value {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.kpi-value.critical {
    color: var(--accent-red);
}

.kpi-value.success {
    color: var(--brand-teal);
}

.kpi-value.warning {
    color: var(--accent-orange);
}

.kpi-footer {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.trend {
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
}

.trend.up {
    color: var(--brand-teal);
    background: var(--brand-teal-light);
}

.trend.down {
    color: var(--accent-red);
    background: rgba(231, 76, 60, 0.1);
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--bg-input);
    border-radius: 10px;
    margin: 10px 0 8px 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--brand-teal), var(--accent-blue));
    border-radius: 10px;
    transition: width 1s ease;
}

/* ===== CHARTS ===== */
.charts-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 28px;
}

.chart-card {
    background: var(--brand-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.chart-card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.card-actions {
    display: flex;
    gap: 4px;
}

.filter-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn.active {
    background: var(--brand-teal-light);
    color: var(--brand-teal-dark);
    font-weight: 600;
}

.filter-btn:hover:not(.active) {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* Timeline Chart */
.timeline-chart {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.timeline-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.timeline-label {
    width: 36px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.timeline-bar {
    flex: 1;
    height: 28px;
    background: var(--bg-input);
    border-radius: 6px;
    display: flex;
    overflow: hidden;
    position: relative;
}

.bar-segment {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-light);
    transition: var(--transition);
}

.bar-segment.delivered {
    background: var(--brand-teal);
}

.bar-segment.in-transit {
    background: var(--accent-blue);
}

.bar-segment.pending {
    background: var(--accent-yellow);
}

.timeline-legend {
    display: flex;
    gap: 20px;
    margin-top: 12px;
    justify-content: center;
    font-size: 12px;
    color: var(--text-secondary);
}

.legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
}

.legend-dot.delivered {
    background: var(--brand-teal);
}
.legend-dot.in-transit {
    background: var(--accent-blue);
}
.legend-dot.pending {
    background: var(--accent-yellow);
}

/* Cleanroom Classifications */
.risk-badge {
    background: var(--brand-teal-light);
    color: var(--brand-teal-dark);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.cleanroom-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 4px 0;
}

.cleanroom-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 12px;
    background: var(--bg-input);
    border-radius: 8px;
    transition: var(--transition);
}

.cleanroom-item:hover {
    background: var(--brand-teal-light);
}

.cleanroom-icon {
    font-size: 24px;
}

.cleanroom-info {
    flex: 1;
}

.cleanroom-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.cleanroom-progress {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cleanroom-bar {
    flex: 1;
    height: 6px;
    background: var(--border-color);
    border-radius: 10px;
    overflow: hidden;
}

.cleanroom-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--brand-teal), var(--accent-blue));
    border-radius: 10px;
    transition: width 1s ease;
}

.cleanroom-percent {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 40px;
    text-align: right;
}

/* ===== BOTTOM GRID ===== */
.bottom-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
}

.feed-card, .table-card {
    background: var(--brand-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.feed-card:hover, .table-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--brand-teal);
}

/* ===== LIVE FEED ===== */
.feed-status {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--brand-teal-light);
    padding: 4px 12px 4px 8px;
    border-radius: 20px;
}

.live-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--accent-green);
    border-radius: 50%;
    animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.2); }
}

.live-text {
    font-size: 11px;
    font-weight: 600;
    color: var(--brand-teal-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.feed-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 340px;
    overflow-y: auto;
    margin: 4px 0 12px 0;
    padding-right: 4px;
}

.feed-list::-webkit-scrollbar {
    width: 4px;
}

.feed-list::-webkit-scrollbar-track {
    background: var(--bg-input);
    border-radius: 10px;
}

.feed-list::-webkit-scrollbar-thumb {
    background: var(--brand-teal);
    border-radius: 10px;
}

.feed-item {
    display: flex;
    gap: 12px;
    padding: 10px 14px;
    background: var(--bg-input);
    border-radius: 8px;
    transition: var(--transition);
    border-left: 3px solid transparent;
    align-items: center;
}

.feed-item:hover {
    background: var(--brand-teal-light);
    transform: translateX(4px);
}

.feed-item.warning {
    border-left-color: var(--accent-red);
    background: rgba(231, 76, 60, 0.06);
}

.feed-item.warning:hover {
    background: rgba(231, 76, 60, 0.12);
}

.feed-time {
    display: flex;
    flex-direction: column;
    min-width: 54px;
    flex-shrink: 0;
}

.feed-time .time {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.feed-time .date {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 500;
}

.feed-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.feed-icon {
    font-size: 16px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.feed-text {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.feed-text strong {
    color: var(--text-primary);
    font-weight: 600;
}

.feed-action {
    color: var(--text-secondary);
}

.feed-location {
    color: var(--text-muted);
    font-size: 12px;
}

.feed-delay {
    color: var(--accent-red);
    font-weight: 600;
    font-size: 12px;
}

.feed-action-status {
    color: var(--brand-teal);
    font-weight: 500;
    font-size: 12px;
}

.feed-footer {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.btn-outline-full {
    width: 100%;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-outline-full:hover {
    border-color: var(--brand-teal);
    color: var(--brand-teal-dark);
    background: var(--brand-teal-light);
}

/* ===== COMPONENTS TABLE ===== */
.table-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.table-actions .filter-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.table-actions .filter-btn.active {
    background: var(--brand-teal-light);
    color: var(--brand-teal-dark);
    font-weight: 600;
}

.table-actions .filter-btn:hover:not(.active) {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.btn-outline-sm {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 4px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    margin-left: 4px;
}

.btn-outline-sm:hover {
    border-color: var(--brand-teal);
    color: var(--brand-teal-dark);
    background: var(--brand-teal-light);
}

.table-wrapper {
    overflow-x: auto;
    margin: 4px 0 12px 0;
}

.components-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.components-table thead th {
    text-align: left;
    padding: 10px 12px 10px 0;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-color);
}

.components-table tbody td {
    padding: 12px 12px 12px 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    vertical-align: middle;
}

.components-table tbody tr {
    transition: var(--transition);
}

.components-table tbody tr:hover {
    background: var(--bg-hover);
}

.components-table tbody tr.critical-row {
    background: rgba(231, 76, 60, 0.04);
}

.components-table tbody tr.critical-row:hover {
    background: rgba(231, 76, 60, 0.1);
}

.component-id {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 12px;
    background: var(--bg-input);
    padding: 3px 10px;
    border-radius: 4px;
    font-family: 'Inter', monospace;
}

.component-id.critical {
    background: rgba(231, 76, 60, 0.12);
    color: var(--accent-red);
}

.component-name {
    color: var(--text-primary);
    font-weight: 500;
    display: block;
}

.component-type {
    font-size: 11px;
    color: var(--text-muted);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.status-badge.in-transit {
    background: rgba(52, 152, 219, 0.12);
    color: var(--accent-blue);
}

.status-badge.delivered {
    background: var(--brand-teal-light);
    color: var(--brand-teal-dark);
}

.status-badge.delayed {
    background: rgba(231, 76, 60, 0.12);
    color: var(--accent-red);
    animation: blink-delay 1.5s ease-in-out infinite;
}

@keyframes blink-delay {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.status-badge.production {
    background: rgba(241, 196, 15, 0.15);
    color: var(--accent-yellow);
}

.delivery-date {
    display: block;
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 500;
}

.delivery-date.delayed {
    color: var(--accent-red);
}

.delivery-status {
    font-size: 11px;
    color: var(--text-muted);
}

.delivery-status.delayed {
    color: var(--accent-red);
    font-weight: 600;
}

.delivery-status.completed {
    color: var(--brand-teal);
    font-weight: 600;
}

.action-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 16px;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    transition: var(--transition);
}

.action-btn:hover {
    background: var(--brand-teal-light);
    color: var(--brand-teal-dark);
}

.action-btn.urgent {
    color: var(--accent-red);
}

.action-btn.urgent:hover {
    background: rgba(231, 76, 60, 0.1);
    color: var(--accent-red);
}

/* Table Footer */
.table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.table-count {
    font-size: 12px;
    color: var(--text-secondary);
}

.table-pagination {
    display: flex;
    gap: 4px;
}

.page-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.page-btn:hover {
    border-color: var(--brand-teal);
    color: var(--brand-teal-dark);
}

.page-btn.active {
    background: var(--brand-teal);
    border-color: var(--brand-teal);
    color: var(--text-light);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
    .bottom-grid {
        grid-template-columns: 1fr;
    }
    
    .feed-list {
        max-height: 250px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        display: none;
    }
    .main-content {
        padding: 16px;
    }
    
    .table-actions {
        flex-wrap: wrap;
        gap: 4px;
    }
    
    .table-actions .filter-btn {
        font-size: 11px;
        padding: 2px 10px;
    }
    
    .component-id {
        font-size: 10px;
        padding: 2px 6px;
    }
    
    .status-badge {
        font-size: 10px;
        padding: 2px 10px;
    }
    
    .feed-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 10px;
    }
    
    .feed-time {
        flex-direction: row;
        gap: 8px;
        min-width: auto;
    }
    
    .header-left h1 {
        font-size: 20px;
    }
    
    .search-box input {
        width: 140px;
    }
    
    .kpi-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}

@media (max-width: 480px) {
    .top-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .header-right {
        flex-wrap: wrap;
    }
    
    .search-box {
        flex: 1;
    }
    
    .search-box input {
        width: 100%;
    }
    
    .kpi-value {
        font-size: 24px;
    }
    
    .components-table {
        font-size: 11px;
    }
    
    .component-name {
        font-size: 12px;
    }
}

/* ===== DOCUMENTS PAGE ===== */

.documents-page {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* HEADER */
.documents-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 4px;
}

.documents-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.documents-header-left h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.documents-stats {
    display: flex;
    gap: 8px;
}

.stat-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    background: var(--brand-teal-light);
    color: var(--brand-teal-dark);
}

.stat-badge.warning {
    background: rgba(241, 196, 15, 0.2);
    color: var(--accent-yellow);
}

.stat-badge.muted {
    background: var(--bg-input);
    color: var(--text-muted);
}

.documents-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.documents-search {
    width: 320px;
}

.documents-search input {
    width: 100%;
}

/* TABS */
.documents-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--bg-input);
    border-radius: 10px;
    overflow-x: auto;
    flex-wrap: nowrap;
}

.tab-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.tab-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.tab-btn.active {
    background: var(--brand-white);
    color: var(--brand-teal-dark);
    box-shadow: var(--shadow-sm);
}

/* QUICK STATS */
.documents-quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    padding: 16px;
    background: var(--brand-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.quick-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* DOCUMENTS GRID */
.documents-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* DOC SECTION */
.doc-section {
    background: var(--brand-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 16px 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.doc-section:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--brand-teal);
}

.doc-section.critical {
    border-left: 3px solid var(--accent-orange);
}

.doc-section.restricted {
    border-left: 3px solid var(--accent-red);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

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

.section-icon {
    font-size: 18px;
}

.item-count {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-input);
    padding: 2px 10px;
    border-radius: 12px;
}

.item-count.warning {
    background: rgba(231, 76, 60, 0.1);
    color: var(--accent-red);
}

.item-count.urgent {
    background: rgba(231, 76, 60, 0.15);
    color: var(--accent-red);
    animation: blink-delay 1.5s ease-in-out infinite;
}

.item-count.restricted {
    background: rgba(231, 76, 60, 0.08);
    color: var(--accent-red);
}

.section-updated {
    font-size: 12px;
    color: var(--text-muted);
}

.section-access {
    font-size: 11px;
    font-weight: 600;
    color: var(--accent-red);
    background: rgba(231, 76, 60, 0.08);
    padding: 3px 10px;
    border-radius: 12px;
}

/* DOC LIST */
.doc-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.doc-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--bg-input);
    border-radius: 8px;
    transition: var(--transition);
}

.doc-item:hover {
    background: var(--brand-teal-light);
    transform: translateX(4px);
}

.doc-item.status-pending {
    background: rgba(241, 196, 15, 0.08);
}

.doc-item.urgent {
    background: rgba(231, 76, 60, 0.08);
}

.doc-icon {
    font-size: 18px;
    width: 32px;
    text-align: center;
    flex-shrink: 0;
}

.doc-info {
    flex: 1;
    min-width: 0;
}

.doc-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.doc-meta {
    font-size: 11px;
    color: var(--text-muted);
}

.doc-tag {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 12px;
    background: var(--brand-teal-light);
    color: var(--brand-teal-dark);
    white-space: nowrap;
}

.doc-tag.outdated {
    background: rgba(231, 76, 60, 0.1);
    color: var(--accent-red);
}

.doc-tag.certified {
    background: rgba(46, 204, 113, 0.15);
    color: var(--accent-green);
}

.doc-tag.pending {
    background: rgba(241, 196, 15, 0.15);
    color: var(--accent-yellow);
}

.doc-tag.urgent {
    background: rgba(231, 76, 60, 0.15);
    color: var(--accent-red);
    animation: blink-delay 1.5s ease-in-out infinite;
}

.doc-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.doc-actions .action-btn {
    font-size: 14px;
    padding: 4px;
}

/* RECENT ACTIVITY */
.doc-activity {
    background: var(--brand-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 16px 20px;
    box-shadow: var(--shadow-sm);
}

.activity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.activity-count {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-secondary);
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: var(--bg-input);
    border-radius: 6px;
    font-size: 13px;
}

.activity-time {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    min-width: 50px;
}

.activity-user {
    font-weight: 600;
    color: var(--text-primary);
}

.activity-action {
    color: var(--text-secondary);
}

.activity-doc {
    color: var(--brand-teal-dark);
    font-weight: 500;
}

/* RESPONSIVE */
@media (max-width: 1200px) {
    .documents-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .documents-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .documents-header-left {
        flex-wrap: wrap;
    }
    
    .documents-stats {
        flex-wrap: wrap;
    }
    
    .documents-search {
        width: 100%;
    }
    
    .documents-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
    }
    
    .documents-quick-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .doc-item {
        flex-wrap: wrap;
    }
    
    .doc-tag {
        font-size: 9px;
        padding: 1px 8px;
    }
    
    .activity-item {
        flex-wrap: wrap;
        gap: 4px;
    }
}

/* CLEANROOMS PAGE */

/* ===== CLEANROOMS PAGE ===== */
.cleanrooms-page {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* HEADER */
.cleanrooms-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 4px;
}

.cleanrooms-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.cleanrooms-header-left h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.cleanrooms-stats {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.stat-badge {
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    background: var(--bg-input);
    color: var(--text-secondary);
}

.stat-badge.iso5 {
    background: rgba(0, 212, 200, 0.15);
    color: var(--brand-teal-dark);
}

.stat-badge.iso6 {
    background: rgba(52, 152, 219, 0.15);
    color: var(--accent-blue);
}

.stat-badge.iso7 {
    background: rgba(241, 196, 15, 0.15);
    color: var(--accent-yellow);
}

.stat-badge.iso8 {
    background: rgba(230, 126, 34, 0.15);
    color: var(--accent-orange);
}

.cleanrooms-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cleanrooms-search {
    width: 300px;
}

.cleanrooms-search input {
    width: 100%;
}

/* TABS */
.cleanrooms-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--bg-input);
    border-radius: 10px;
    overflow-x: auto;
    flex-wrap: nowrap;
}

.tab-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.tab-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.tab-btn.active {
    background: var(--brand-white);
    color: var(--brand-teal-dark);
    box-shadow: var(--shadow-sm);
}

.tab-btn.iso5-tab.active {
    background: rgba(0, 212, 200, 0.15);
    color: var(--brand-teal-dark);
}

.tab-btn.iso6-tab.active {
    background: rgba(52, 152, 219, 0.15);
    color: var(--accent-blue);
}

/* QUICK STATS */
.cleanrooms-quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    padding: 16px;
    background: var(--brand-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

/* ROOM GRID */
.cleanrooms-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* CLEANROOM CARD */
.cleanroom-card {
    background: var(--brand-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.cleanroom-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.cleanroom-card.status-ok {
    border-left: 4px solid var(--accent-green);
}

.cleanroom-card.status-warning {
    border-left: 4px solid var(--accent-yellow);
}

.cleanroom-card.status-critical {
    border-left: 4px solid var(--accent-red);
    background: rgba(231, 76, 60, 0.02);
}

.cleanroom-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.cleanroom-title {
    display: flex;
    gap: 12px;
    align-items: center;
}

.cleanroom-icon {
    font-size: 28px;
}

.cleanroom-name {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
}

.cleanroom-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
}

.cleanroom-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.status-indicator.ok {
    background: var(--accent-green);
}

.status-indicator.warning {
    background: var(--accent-yellow);
}

.status-indicator.critical {
    background: var(--accent-red);
    animation: pulse-dot 1.5s ease-in-out infinite;
}

.status-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

/* DETAILS GRID */
.cleanroom-details-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px;
    background: var(--bg-input);
    border-radius: 8px;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

.detail-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.detail-value.iso5-badge {
    color: var(--brand-teal-dark);
}

.detail-value.iso6-badge {
    color: var(--accent-blue);
}

.detail-value.iso7-badge {
    color: var(--accent-yellow);
}

.detail-value.iso8-badge {
    color: var(--accent-orange);
}

.detail-value.pending {
    color: var(--accent-yellow);
}

.detail-value.inprogress {
    color: var(--accent-blue);
}

.detail-value.failed {
    color: var(--accent-red);
}

.detail-value.certified {
    color: var(--accent-green);
}

/* COMPLIANCE SECTION */
.compliance-section {
    margin-bottom: 16px;
}

.compliance-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.compliance-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.compliance-percent {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent-green);
}

.compliance-percent.critical {
    color: var(--accent-red);
}

.compliance-bar {
    height: 8px;
    background: var(--bg-input);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 12px;
}

.compliance-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 1s ease;
}

/* METRIC GRID */
.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.metric-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--bg-input);
    border-radius: 6px;
}

.metric-icon {
    font-size: 18px;
}

.metric-info {
    flex: 1;
    min-width: 0;
}

.metric-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

.metric-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.metric-sub {
    font-size: 10px;
    color: var(--text-muted);
}

/* ACTIONS */
.cleanroom-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.cleanroom-actions .btn-primary-sm {
    background: var(--brand-teal);
    color: var(--text-light);
    border: none;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.cleanroom-actions .btn-primary-sm:hover {
    background: var(--brand-teal-dark);
    transform: translateY(-1px);
}

.cleanroom-actions .btn-outline-sm {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.cleanroom-actions .btn-outline-sm:hover {
    border-color: var(--brand-teal);
    color: var(--brand-teal-dark);
    background: var(--brand-teal-light);
}

.cleanroom-actions .btn-outline-sm.urgent {
    color: var(--accent-red);
    border-color: var(--accent-red);
}

.cleanroom-actions .btn-outline-sm.urgent:hover {
    background: rgba(231, 76, 60, 0.1);
}

/* CONSTRUCTION PROGRESS */
.cleanrooms-progress {
    background: var(--brand-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.progress-sub {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-secondary);
}

.progress-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.progress-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.progress-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 50px;
}

.progress-item .progress-bar {
    flex: 1;
    height: 8px;
    background: var(--bg-input);
    border-radius: 10px;
    overflow: hidden;
}

.progress-item .progress-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 1s ease;
}

.progress-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 40px;
    text-align: right;
}

/* RECENT ACTIVITY */
.cleanrooms-activity {
    background: var(--brand-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.activity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: var(--bg-input);
    border-radius: 6px;
    font-size: 13px;
}

.activity-time {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    min-width: 50px;
}

.activity-room {
    font-weight: 600;
    color: var(--text-primary);
}

.activity-action {
    color: var(--text-secondary);
}

.activity-doc {
    color: var(--brand-teal-dark);
    font-weight: 500;
}

/* RESPONSIVE */
@media (max-width: 1200px) {
    .cleanrooms-grid {
        grid-template-columns: 1fr;
    }
    
    .metric-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .progress-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .cleanrooms-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .cleanrooms-header-left {
        flex-wrap: wrap;
    }
    
    .cleanrooms-stats {
        flex-wrap: wrap;
    }
    
    .cleanrooms-search {
        width: 100%;
    }
    
    .cleanrooms-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
    }
    
    .cleanrooms-quick-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cleanroom-details-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .metric-grid {
        grid-template-columns: 1fr;
    }
    
    .progress-grid {
        grid-template-columns: 1fr;
    }
    
    .cleanroom-actions {
        flex-wrap: wrap;
    }
    
    .cleanroom-actions .btn-primary-sm,
    .cleanroom-actions .btn-outline-sm {
        flex: 1;
        min-width: 80px;
        text-align: center;
    }
    
    .activity-item {
        flex-wrap: wrap;
        gap: 4px;
    }
}

@media (max-width: 480px) {
    .cleanroom-details-grid {
        grid-template-columns: 1fr;
    }
    
    .cleanrooms-quick-stats {
        grid-template-columns: 1fr;
    }
}

/* ===== COMPONENTS PAGE ===== */
.components-page {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* HEADER */
.components-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 4px;
}

.components-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.components-header-left h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.components-stats {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.stat-badge {
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    background: var(--bg-input);
    color: var(--text-secondary);
}

.stat-badge.in-transit {
    background: rgba(52, 152, 219, 0.15);
    color: var(--accent-blue);
}

.stat-badge.delayed {
    background: rgba(231, 76, 60, 0.15);
    color: var(--accent-red);
}

.stat-badge.quality {
    background: rgba(230, 126, 34, 0.15);
    color: var(--accent-orange);
}

.components-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.components-search {
    width: 300px;
}

.components-search input {
    width: 100%;
}

/* TABS */
.components-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--bg-input);
    border-radius: 10px;
    overflow-x: auto;
    flex-wrap: nowrap;
}

.tab-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.tab-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.tab-btn.active {
    background: var(--brand-white);
    color: var(--brand-teal-dark);
    box-shadow: var(--shadow-sm);
}

.tab-btn.delayed-tab.active {
    background: rgba(231, 76, 60, 0.1);
    color: var(--accent-red);
}

.tab-btn.quality-tab.active {
    background: rgba(230, 126, 34, 0.1);
    color: var(--accent-orange);
}

/* STATISTICS GRID */
.components-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--brand-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-card.warning {
    border-left: 3px solid var(--accent-red);
}

.stat-icon {
    font-size: 32px;
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.stat-trend {
    font-size: 11px;
    font-weight: 600;
    margin-top: 4px;
}

.stat-trend.up {
    color: var(--accent-green);
}

.stat-trend.down {
    color: var(--accent-red);
}

/* QUICK FILTERS */
.quick-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--brand-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    flex-wrap: wrap;
}

.filter-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-right: 4px;
}

.filter-chip {
    padding: 4px 14px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.filter-chip:hover {
    border-color: var(--brand-teal);
    color: var(--brand-teal-dark);
}

.filter-chip.active {
    background: var(--brand-teal-light);
    border-color: var(--brand-teal);
    color: var(--brand-teal-dark);
}

/* COMPONENT LIST CARD */
.component-list-card {
    background: var(--brand-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.list-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.list-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.list-count {
    font-size: 13px;
    color: var(--text-secondary);
}

/* TABLE */
.table-wrapper {
    overflow-x: auto;
}

.components-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.components-table thead th {
    text-align: left;
    padding: 10px 12px 10px 0;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-color);
}

.components-table tbody td {
    padding: 12px 12px 12px 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    vertical-align: middle;
}

.components-table tbody tr {
    transition: var(--transition);
}

.components-table tbody tr:hover {
    background: var(--bg-hover);
}

.components-table tbody tr.critical-row {
    background: rgba(231, 76, 60, 0.04);
}

.components-table tbody tr.critical-row:hover {
    background: rgba(231, 76, 60, 0.1);
}

/* COMPONENT ID */
.component-id {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 12px;
    background: var(--bg-input);
    padding: 3px 10px;
    border-radius: 4px;
    font-family: 'Inter', monospace;
}

.component-id.critical {
    background: rgba(231, 76, 60, 0.12);
    color: var(--accent-red);
}

/* COMPONENT NAME */
.component-name {
    display: flex;
    flex-direction: column;
}

.component-name .name {
    color: var(--text-primary);
    font-weight: 500;
}

.component-name .batch {
    font-size: 11px;
    color: var(--text-muted);
}

/* CATEGORY TAGS */
.category-tag {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 12px;
}

.category-tag.filtration {
    background: rgba(52, 152, 219, 0.12);
    color: var(--accent-blue);
}

.category-tag.structure {
    background: rgba(46, 204, 113, 0.12);
    color: var(--accent-green);
}

.category-tag.equipment {
    background: rgba(241, 196, 15, 0.12);
    color: var(--accent-yellow);
}

.category-tag.access {
    background: rgba(155, 89, 182, 0.12);
    color: var(--accent-purple);
}

.category-tag.testing {
    background: rgba(230, 126, 34, 0.12);
    color: var(--accent-orange);
}

/* STATUS BADGES */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.status-badge.in-transit {
    background: rgba(52, 152, 219, 0.12);
    color: var(--accent-blue);
}

.status-badge.delivered {
    background: rgba(46, 204, 113, 0.12);
    color: var(--accent-green);
}

.status-badge.delayed {
    background: rgba(231, 76, 60, 0.12);
    color: var(--accent-red);
    animation: blink-delay 1.5s ease-in-out infinite;
}

.status-badge.production {
    background: rgba(241, 196, 15, 0.15);
    color: var(--accent-yellow);
}

/* LOCATION */
.location {
    display: block;
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 500;
}

.location-sub {
    font-size: 11px;
    color: var(--text-muted);
}

.location-sub.warning {
    color: var(--accent-red);
}

/* DELIVERY */
.delivery-date {
    display: block;
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 500;
}

.delivery-date.delayed {
    color: var(--accent-red);
}

.delivery-status {
    font-size: 11px;
    color: var(--text-muted);
}

.delivery-status.delayed {
    color: var(--accent-red);
    font-weight: 600;
}

.delivery-status.on-track {
    color: var(--accent-green);
    font-weight: 600;
}

.delivery-status.completed {
    color: var(--brand-teal);
    font-weight: 600;
}

.delivery-status.in-progress {
    color: var(--accent-blue);
    font-weight: 600;
}

/* ROW ACTIONS */
.row-actions {
    display: flex;
    gap: 4px;
}

.row-actions .action-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 16px;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    transition: var(--transition);
}

.row-actions .action-btn:hover {
    background: var(--brand-teal-light);
    color: var(--brand-teal-dark);
}

.row-actions .action-btn.urgent {
    color: var(--accent-red);
}

.row-actions .action-btn.urgent:hover {
    background: rgba(231, 76, 60, 0.1);
    color: var(--accent-red);
}

/* TABLE FOOTER */
.table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    margin-top: 8px;
}

.table-count {
    font-size: 13px;
    color: var(--text-secondary);
}

.table-pagination {
    display: flex;
    gap: 4px;
}

.page-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.page-btn:hover {
    border-color: var(--brand-teal);
    color: var(--brand-teal-dark);
}

.page-btn.active {
    background: var(--brand-teal);
    border-color: var(--brand-teal);
    color: var(--text-light);
}

/* BOTTOM GRID */
.components-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.distribution-card,
.activity-card {
    background: var(--brand-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.card-header h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.card-sub {
    font-size: 12px;
    color: var(--text-secondary);
}

/* DISTRIBUTION CHART */
.distribution-chart {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.distribution-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dist-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    min-width: 100px;
}

.dist-bar {
    flex: 1;
    height: 8px;
    background: var(--bg-input);
    border-radius: 10px;
    overflow: hidden;
}

.dist-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 1s ease;
}

.dist-value {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 80px;
    text-align: right;
}

/* ACTIVITY LIST */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 280px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: var(--bg-input);
    border-radius: 6px;
    font-size: 13px;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.activity-item:hover {
    background: var(--brand-teal-light);
}

.activity-item.warning {
    border-left-color: var(--accent-red);
    background: rgba(231, 76, 60, 0.06);
}

.activity-item.warning:hover {
    background: rgba(231, 76, 60, 0.12);
}

.activity-time {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    min-width: 50px;
}

.activity-icon {
    font-size: 16px;
}

.activity-text {
    color: var(--text-secondary);
}

.activity-text strong {
    color: var(--text-primary);
}

.live-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: var(--accent-green);
    border-radius: 50%;
    animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.2); }
}

/* RESPONSIVE */
@media (max-width: 1200px) {
    .components-bottom {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1024px) {
    .components-table {
        font-size: 12px;
    }
    
    .components-table thead th,
    .components-table tbody td {
        padding: 8px 8px 8px 0;
    }
    
    .dist-label {
        min-width: 70px;
        font-size: 12px;
    }
    
    .dist-value {
        min-width: 60px;
        font-size: 11px;
    }
}

@media (max-width: 768px) {
    .components-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .components-header-left {
        flex-wrap: wrap;
    }
    
    .components-stats {
        flex-wrap: wrap;
    }
    
    .components-search {
        width: 100%;
    }
    
    .components-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
    }
    
    .components-stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .quick-filters {
        gap: 6px;
    }
    
    .filter-chip {
        font-size: 11px;
        padding: 3px 10px;
    }
    
    .component-list-card {
        padding: 12px;
    }
    
    .list-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .component-id {
        font-size: 10px;
        padding: 2px 6px;
    }
    
    .status-badge {
        font-size: 10px;
        padding: 2px 10px;
    }
    
    .table-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .activity-item {
        flex-wrap: wrap;
        gap: 4px;
    }
    
    .stat-card {
        padding: 12px 16px;
    }
    
    .stat-number {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .components-stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .stat-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 4px;
    }
    
    .stat-icon {
        font-size: 24px;
    }
    
    .components-table thead th {
        font-size: 10px;
    }
    
    .components-table tbody td {
        font-size: 11px;
        padding: 6px 6px 6px 0;
    }
    
    .distribution-item {
        flex-wrap: wrap;
        gap: 4px;
    }
}

/* ===== SHIPMENTS PAGE ===== */
.shipments-page {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* HEADER */
.shipments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 4px;
}

.shipments-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.shipments-header-left h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.shipments-stats {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.shipments-stats .stat-badge {
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    background: var(--bg-input);
    color: var(--text-secondary);
}

.shipments-stats .stat-badge.delivered {
    background: rgba(46, 204, 113, 0.15);
    color: var(--accent-green);
}

.shipments-stats .stat-badge.delayed {
    background: rgba(231, 76, 60, 0.15);
    color: var(--accent-red);
}

.shipments-stats .stat-badge.transit {
    background: rgba(52, 152, 219, 0.15);
    color: var(--accent-blue);
}

.shipments-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.shipments-search {
    width: 300px;
}

.shipments-search input {
    width: 100%;
}

/* TABS */
.shipments-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--bg-input);
    border-radius: 10px;
    overflow-x: auto;
    flex-wrap: nowrap;
}

.shipments-tabs .tab-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.shipments-tabs .tab-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.shipments-tabs .tab-btn.active {
    background: var(--brand-white);
    color: var(--brand-teal-dark);
    box-shadow: var(--shadow-sm);
}

.shipments-tabs .tab-btn.delayed-tab.active {
    background: rgba(231, 76, 60, 0.1);
    color: var(--accent-red);
}

.shipments-tabs .tab-btn.quality-tab.active {
    background: rgba(230, 126, 34, 0.1);
    color: var(--accent-orange);
}

/* STATISTICS GRID */
.shipments-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.shipments-stats-grid .stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--brand-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.shipments-stats-grid .stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.shipments-stats-grid .stat-card.warning {
    border-left: 3px solid var(--accent-red);
}

.shipments-stats-grid .stat-icon {
    font-size: 28px;
}

.shipments-stats-grid .stat-content {
    flex: 1;
}

.shipments-stats-grid .stat-number {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
}

.shipments-stats-grid .stat-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.shipments-stats-grid .stat-trend {
    font-size: 11px;
    font-weight: 600;
    margin-top: 4px;
}

.shipments-stats-grid .stat-trend.up {
    color: var(--accent-green);
}

.shipments-stats-grid .stat-trend.down {
    color: var(--accent-red);
}

/* MAP VIEW */
.shipments-map-card {
    background: var(--brand-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.map-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.map-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.map-subtitle {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-secondary);
}

.map-controls {
    display: flex;
    gap: 4px;
}

.map-toggle {
    padding: 6px 14px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.map-toggle:hover {
    border-color: var(--brand-teal);
    color: var(--brand-teal-dark);
}

.map-toggle.active {
    background: var(--brand-teal-light);
    border-color: var(--brand-teal);
    color: var(--brand-teal-dark);
}

.map-container {
    height: 300px;
    background: var(--bg-input);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.map-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, var(--bg-input) 0%, var(--bg-hover) 100%);
    position: relative;
}

.map-legend {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--brand-white);
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--text-secondary);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.legend-dot.in-transit {
    background: var(--accent-blue);
}

.legend-dot.customs {
    background: var(--accent-yellow);
}

.legend-dot.delayed {
    background: var(--accent-red);
}

.legend-dot.delivered {
    background: var(--accent-green);
}

.map-shipment-marker {
    display: flex;
    gap: 40px;
    margin-top: 20px;
}

.shipment-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 20px;
    background: var(--brand-white);
    border-radius: 12px;
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.shipment-marker:hover {
    transform: scale(1.05);
    border-color: var(--brand-teal);
}

.shipment-marker.transit {
    border-color: var(--accent-blue);
}

.shipment-marker.customs {
    border-color: var(--accent-yellow);
}

.shipment-marker.delayed {
    border-color: var(--accent-red);
}

.marker-icon {
    font-size: 24px;
}

.marker-label {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
    margin: 4px 0 2px 0;
}

.marker-status {
    font-size: 11px;
    color: var(--text-secondary);
}

.map-interactive-hint {
    position: absolute;
    bottom: 16px;
    font-size: 13px;
    color: var(--text-muted);
    background: var(--brand-white);
    padding: 8px 16px;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
}

/* SHIPMENT LIST */
.shipment-list-card {
    background: var(--brand-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.shipment-list-card .list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.shipment-list-card .list-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.shipment-list-card .list-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.shipment-list-card .list-count {
    font-size: 13px;
    color: var(--text-secondary);
}

/* SHIPMENTS TABLE */
.shipments-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.shipments-table thead th {
    text-align: left;
    padding: 10px 12px 10px 0;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-color);
}

.shipments-table tbody td {
    padding: 12px 12px 12px 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    vertical-align: middle;
}

.shipments-table tbody tr {
    transition: var(--transition);
}

.shipments-table tbody tr:hover {
    background: var(--bg-hover);
}

.shipments-table tbody tr.critical-row {
    background: rgba(231, 76, 60, 0.04);
}

.shipments-table tbody tr.critical-row:hover {
    background: rgba(231, 76, 60, 0.1);
}

.shipment-id {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 12px;
    background: var(--bg-input);
    padding: 3px 10px;
    border-radius: 4px;
    font-family: 'Inter', monospace;
}

.shipment-id.critical {
    background: rgba(231, 76, 60, 0.12);
    color: var(--accent-red);
}

.component-info {
    display: flex;
    flex-direction: column;
}

.component-info .comp-name {
    color: var(--text-primary);
    font-weight: 500;
}

.component-info .comp-batch {
    font-size: 11px;
    color: var(--text-muted);
}

.carrier {
    display: block;
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 500;
}

.tracking {
    font-size: 11px;
    color: var(--text-muted);
}

/* STATUS BADGES FOR SHIPMENTS */
.status-badge.in-transit {
    background: rgba(52, 152, 219, 0.12);
    color: var(--accent-blue);
}

.status-badge.delivered {
    background: rgba(46, 204, 113, 0.12);
    color: var(--accent-green);
}

.status-badge.delayed {
    background: rgba(231, 76, 60, 0.12);
    color: var(--accent-red);
    animation: blink-delay 1.5s ease-in-out infinite;
}

.status-badge.customs {
    background: rgba(241, 196, 15, 0.15);
    color: var(--accent-yellow);
}

.route {
    display: block;
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 500;
}

.route-sub {
    font-size: 11px;
    color: var(--text-muted);
}

.eta {
    display: block;
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 500;
}

.eta.delayed {
    color: var(--accent-red);
}

.eta.delivered {
    color: var(--accent-green);
}

.eta-status {
    font-size: 11px;
    color: var(--text-muted);
}

.eta-status.on-track {
    color: var(--accent-green);
    font-weight: 600;
}

.eta-status.delayed {
    color: var(--accent-red);
    font-weight: 600;
}

.eta-status.customs {
    color: var(--accent-yellow);
    font-weight: 600;
}

.eta-status.delivered {
    color: var(--brand-teal);
    font-weight: 600;
}

/* PERFORMANCE CARD */
.performance-card {
    background: var(--brand-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.performance-chart {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.performance-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.perf-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    min-width: 120px;
}

.perf-bar {
    flex: 1;
    height: 8px;
    background: var(--bg-input);
    border-radius: 10px;
    overflow: hidden;
}

.perf-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 1s ease;
}

.perf-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 45px;
    text-align: right;
}

.performance-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.perf-stat {
    text-align: center;
}

.perf-stat-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.perf-stat-label {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ACTIVITY */
.shipments-activity .activity-list {
    max-height: 280px;
    overflow-y: auto;
}

.shipments-activity .activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: var(--bg-input);
    border-radius: 6px;
    font-size: 13px;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.shipments-activity .activity-item:hover {
    background: var(--brand-teal-light);
}

.shipments-activity .activity-item.warning {
    border-left-color: var(--accent-red);
    background: rgba(231, 76, 60, 0.06);
}

.shipments-activity .activity-item.warning:hover {
    background: rgba(231, 76, 60, 0.12);
}

.shipments-activity .activity-time {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    min-width: 50px;
}

.shipments-activity .activity-icon {
    font-size: 16px;
}

.shipments-activity .activity-text {
    color: var(--text-secondary);
}

.shipments-activity .activity-text strong {
    color: var(--text-primary);
}

.shipments-activity .activity-highlight {
    color: var(--brand-teal-dark);
    font-weight: 500;
}

.shipments-activity .activity-highlight.warning {
    color: var(--accent-red);
}

/* BOTTOM GRID */
.shipments-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* RESPONSIVE */
@media (max-width: 1200px) {
    .shipments-bottom {
        grid-template-columns: 1fr;
    }
    
    .map-controls {
        flex-wrap: wrap;
    }
}

@media (max-width: 1024px) {
    .shipments-table {
        font-size: 12px;
    }
    
    .shipments-table thead th,
    .shipments-table tbody td {
        padding: 8px 8px 8px 0;
    }
    
    .perf-label {
        min-width: 90px;
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .shipments-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .shipments-header-left {
        flex-wrap: wrap;
    }
    
    .shipments-stats {
        flex-wrap: wrap;
    }
    
    .shipments-search {
        width: 100%;
    }
    
    .shipments-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
    }
    
    .shipments-stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    }
    
    .shipments-stats-grid .stat-card {
        padding: 12px 14px;
    }
    
    .shipments-stats-grid .stat-number {
        font-size: 18px;
    }
    
    .map-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .map-controls {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .map-toggle {
        flex: 1;
        text-align: center;
        font-size: 11px;
        padding: 4px 10px;
    }
    
    .map-shipment-marker {
        flex-wrap: wrap;
        gap: 16px;
        justify-content: center;
    }
    
    .shipment-list-card .list-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .shipment-id {
        font-size: 10px;
        padding: 2px 6px;
    }
    
    .status-badge {
        font-size: 10px;
        padding: 2px 10px;
    }
    
    .table-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .shipments-activity .activity-item {
        flex-wrap: wrap;
        gap: 4px;
    }
}

@media (max-width: 480px) {
    .shipments-stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .shipments-stats-grid .stat-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 4px;
    }
    
    .performance-stats {
        grid-template-columns: 1fr;
    }
    
    .map-container {
        height: 200px;
    }
    
    .map-legend {
        top: 8px;
        right: 8px;
        padding: 8px 12px;
    }
    
    .map-legend .legend-item {
        font-size: 10px;
    }
    
    .shipments-table thead th {
        font-size: 10px;
    }
    
    .shipments-table tbody td {
        font-size: 11px;
        padding: 6px 6px 6px 0;
    }
}

/* ===== CERTIFICATIONS PAGE ===== */
.certifications-page {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* HEADER */
.certifications-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 4px;
}

.certifications-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.certifications-header-left h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.certifications-stats {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.certifications-stats .stat-badge {
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    background: var(--bg-input);
    color: var(--text-secondary);
}

.certifications-stats .stat-badge.valid {
    background: rgba(46, 204, 113, 0.15);
    color: var(--accent-green);
}

.certifications-stats .stat-badge.expiring {
    background: rgba(241, 196, 15, 0.15);
    color: var(--accent-yellow);
}

.certifications-stats .stat-badge.expired {
    background: rgba(231, 76, 60, 0.15);
    color: var(--accent-red);
}

.certifications-stats .stat-badge.pending {
    background: rgba(52, 152, 219, 0.15);
    color: var(--accent-blue);
}

.certifications-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.certifications-search {
    width: 300px;
}

.certifications-search input {
    width: 100%;
}

/* TABS */
.certifications-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--bg-input);
    border-radius: 10px;
    overflow-x: auto;
    flex-wrap: nowrap;
}

.certifications-tabs .tab-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.certifications-tabs .tab-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.certifications-tabs .tab-btn.active {
    background: var(--brand-white);
    color: var(--brand-teal-dark);
    box-shadow: var(--shadow-sm);
}

.certifications-tabs .tab-btn.valid-tab.active {
    background: rgba(46, 204, 113, 0.1);
    color: var(--accent-green);
}

.certifications-tabs .tab-btn.expiring-tab.active {
    background: rgba(241, 196, 15, 0.1);
    color: var(--accent-yellow);
}

.certifications-tabs .tab-btn.expired-tab.active {
    background: rgba(231, 76, 60, 0.1);
    color: var(--accent-red);
}

.certifications-tabs .tab-btn.pending-tab.active {
    background: rgba(52, 152, 219, 0.1);
    color: var(--accent-blue);
}

.certifications-tabs .tab-btn.iso5-tab.active {
    background: rgba(0, 212, 200, 0.15);
    color: var(--brand-teal-dark);
}

.certifications-tabs .tab-btn.iso6-tab.active {
    background: rgba(52, 152, 219, 0.15);
    color: var(--accent-blue);
}

/* STATISTICS */
.certifications-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.certifications-stats-grid .stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--brand-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.certifications-stats-grid .stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.certifications-stats-grid .stat-card.valid {
    border-left: 3px solid var(--accent-green);
}

.certifications-stats-grid .stat-card.warning {
    border-left: 3px solid var(--accent-yellow);
}

.certifications-stats-grid .stat-card.critical {
    border-left: 3px solid var(--accent-red);
}

.certifications-stats-grid .stat-icon {
    font-size: 28px;
}

.certifications-stats-grid .stat-content {
    flex: 1;
}

.certifications-stats-grid .stat-number {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
}

.certifications-stats-grid .stat-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.certifications-stats-grid .stat-trend {
    font-size: 11px;
    font-weight: 600;
    margin-top: 4px;
}

.certifications-stats-grid .stat-trend.up {
    color: var(--accent-green);
}

.certifications-stats-grid .stat-trend.down {
    color: var(--accent-red);
}

/* EXPIRATION ALERTS */
.expiration-alerts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.alert-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 20px;
    background: var(--brand-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.alert-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.alert-card.critical {
    border-left: 4px solid var(--accent-red);
}

.alert-card.warning {
    border-left: 4px solid var(--accent-yellow);
}

.alert-card.info {
    border-left: 4px solid var(--accent-blue);
}

.alert-icon {
    font-size: 24px;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.alert-description {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.alert-action {
    background: transparent;
    border: none;
    color: var(--brand-teal-dark);
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    padding: 0;
    transition: var(--transition);
}

.alert-action:hover {
    color: var(--brand-teal);
    text-decoration: underline;
}

/* CERTIFICATION LIST */
.certification-list-card {
    background: var(--brand-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.certification-list-card .list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.certification-list-card .list-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.certification-list-card .list-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.certification-list-card .list-count {
    font-size: 13px;
    color: var(--text-secondary);
}

/* CERTIFICATIONS TABLE */
.certifications-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.certifications-table thead th {
    text-align: left;
    padding: 10px 12px 10px 0;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-color);
}

.certifications-table tbody td {
    padding: 12px 12px 12px 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    vertical-align: middle;
}

.certifications-table tbody tr {
    transition: var(--transition);
}

.certifications-table tbody tr:hover {
    background: var(--bg-hover);
}

.certifications-table tbody tr.warning-row {
    background: rgba(241, 196, 15, 0.04);
}

.certifications-table tbody tr.warning-row:hover {
    background: rgba(241, 196, 15, 0.1);
}

.certifications-table tbody tr.critical-row {
    background: rgba(231, 76, 60, 0.04);
}

.certifications-table tbody tr.critical-row:hover {
    background: rgba(231, 76, 60, 0.1);
}

.cert-id {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 12px;
    background: var(--bg-input);
    padding: 3px 10px;
    border-radius: 4px;
    font-family: 'Inter', monospace;
}

.cert-id.warning {
    background: rgba(241, 196, 15, 0.12);
    color: var(--accent-yellow);
}

.cert-id.critical {
    background: rgba(231, 76, 60, 0.12);
    color: var(--accent-red);
}

.cert-id.pending {
    background: rgba(52, 152, 219, 0.12);
    color: var(--accent-blue);
}

.cert-component {
    display: flex;
    flex-direction: column;
}

.cert-component .comp-name {
    color: var(--text-primary);
    font-weight: 500;
}

.cert-component .comp-batch {
    font-size: 11px;
    color: var(--text-muted);
}

/* ISO BADGES */
.iso-badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.iso-badge.iso5 {
    background: rgba(0, 212, 200, 0.15);
    color: var(--brand-teal-dark);
}

.iso-badge.iso6 {
    background: rgba(52, 152, 219, 0.15);
    color: var(--accent-blue);
}

.iso-badge.iso7 {
    background: rgba(241, 196, 15, 0.15);
    color: var(--accent-yellow);
}

.iso-badge.iso8 {
    background: rgba(230, 126, 34, 0.15);
    color: var(--accent-orange);
}

/* STATUS BADGES FOR CERTIFICATIONS */
.status-badge.valid {
    background: rgba(46, 204, 113, 0.12);
    color: var(--accent-green);
}

.status-badge.expiring {
    background: rgba(241, 196, 15, 0.12);
    color: var(--accent-yellow);
}

.status-badge.expired {
    background: rgba(231, 76, 60, 0.12);
    color: var(--accent-red);
}

.status-badge.pending {
    background: rgba(52, 152, 219, 0.12);
    color: var(--accent-blue);
}

/* EXPIRATION DATE */
.issue-date {
    font-size: 13px;
    color: var(--text-primary);
}

.expiration-date {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.expiration-date.valid {
    color: var(--accent-green);
}

.expiration-date.expiring {
    color: var(--accent-yellow);
}

.expiration-date.expired {
    color: var(--accent-red);
}

.expiration-date.pending {
    color: var(--text-muted);
}

.days-remaining {
    font-size: 11px;
    color: var(--text-muted);
}

.days-remaining.warning {
    color: var(--accent-yellow);
    font-weight: 600;
}

.days-remaining.expired {
    color: var(--accent-red);
    font-weight: 600;
}

.days-remaining.pending {
    color: var(--accent-blue);
    font-weight: 500;
}

/* TIMELINE CARD */
.timeline-card {
    background: var(--brand-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.timeline-chart {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.timeline-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.timeline-month {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 50px;
}

.timeline-bar {
    flex: 1;
    height: 8px;
    background: var(--bg-input);
    border-radius: 10px;
    overflow: hidden;
}

.timeline-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 1s ease;
}

.timeline-count {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 70px;
    text-align: right;
}

.timeline-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.timeline-legend span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}

.timeline-legend .legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.timeline-legend .legend-dot.green {
    background: var(--accent-green);
}

.timeline-legend .legend-dot.yellow {
    background: var(--accent-yellow);
}

.timeline-legend .legend-dot.orange {
    background: var(--accent-orange);
}

/* DISTRIBUTION CARD */
.distribution-card {
    background: var(--brand-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.distribution-chart {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.distribution-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dist-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    min-width: 70px;
}

.dist-bar {
    flex: 1;
    height: 8px;
    background: var(--bg-input);
    border-radius: 10px;
    overflow: hidden;
}

.dist-fill.valid {
    background: var(--accent-green);
}

.dist-fill.warning {
    background: var(--accent-yellow);
}

.dist-fill.critical {
    background: var(--accent-red);
}

.dist-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 1s ease;
}

.dist-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 80px;
    text-align: right;
}

.distribution-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.summary-item {
    text-align: center;
}

.summary-label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
}

.summary-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

/* BOTTOM GRID */
.certifications-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* RECENT ACTIVITY */
.certifications-activity {
    background: var(--brand-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.certifications-activity .activity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.certifications-activity .activity-count {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-secondary);
}

.certifications-activity .activity-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.certifications-activity .activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: var(--bg-input);
    border-radius: 6px;
    font-size: 13px;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.certifications-activity .activity-item:hover {
    background: var(--brand-teal-light);
}

.certifications-activity .activity-item.warning {
    border-left-color: var(--accent-red);
    background: rgba(231, 76, 60, 0.06);
}

.certifications-activity .activity-item.warning:hover {
    background: rgba(231, 76, 60, 0.12);
}

.certifications-activity .activity-time {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    min-width: 50px;
}

.certifications-activity .activity-icon {
    font-size: 16px;
}

.certifications-activity .activity-text {
    color: var(--text-secondary);
}

.certifications-activity .activity-text strong {
    color: var(--text-primary);
}

.certifications-activity .activity-highlight {
    color: var(--brand-teal-dark);
    font-weight: 500;
}

.certifications-activity .activity-highlight.warning {
    color: var(--accent-red);
}

.certifications-activity .btn-outline-full {
    width: 100%;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.certifications-activity .btn-outline-full:hover {
    border-color: var(--brand-teal);
    color: var(--brand-teal-dark);
    background: var(--brand-teal-light);
}

/* RESPONSIVE */
@media (max-width: 1200px) {
    .certifications-bottom {
        grid-template-columns: 1fr;
    }
    
    .expiration-alerts {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1024px) {
    .certifications-table {
        font-size: 12px;
    }
    
    .certifications-table thead th,
    .certifications-table tbody td {
        padding: 8px 8px 8px 0;
    }
}

@media (max-width: 768px) {
    .certifications-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .certifications-header-left {
        flex-wrap: wrap;
    }
    
    .certifications-stats {
        flex-wrap: wrap;
    }
    
    .certifications-search {
        width: 100%;
    }
    
    .certifications-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
    }
    
    .certifications-stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    }
    
    .certifications-stats-grid .stat-card {
        padding: 12px 14px;
    }
    
    .certifications-stats-grid .stat-number {
        font-size: 18px;
    }
    
    .certification-list-card .list-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .cert-id {
        font-size: 10px;
        padding: 2px 6px;
    }
    
    .status-badge {
        font-size: 10px;
        padding: 2px 10px;
    }
    
    .iso-badge {
        font-size: 10px;
        padding: 2px 8px;
    }
    
    .table-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .certifications-activity .activity-item {
        flex-wrap: wrap;
        gap: 4px;
    }
}

@media (max-width: 480px) {
    .certifications-stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .certifications-stats-grid .stat-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 4px;
    }
    
    .distribution-summary {
        grid-template-columns: 1fr;
    }
    
    .certifications-table thead th {
        font-size: 10px;
    }
    
    .certifications-table tbody td {
        font-size: 11px;
        padding: 6px 6px 6px 0;
    }
}