:root {
    --primary-color: #1e3a5f;
    --secondary-color: #2d5a87;
    --accent-color: #00d4ff;
    --accent-gradient: linear-gradient(135deg, #00d4ff, #0099ff);
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --success-color: #22c55e;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --sidebar-width: 260px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow-x: hidden;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 24px;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: transform 0.3s ease;
    z-index: 100;
}

.sidebar.hidden {
    transform: translateX(-100%);
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header .logo {
    width: 40px;
    height: 40px;
    background: var(--accent-gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
}

.sidebar-header h1 {
    font-size: 18px;
    font-weight: 600;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 8px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 14px;
}

.sidebar-menu a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.sidebar-menu a.active {
    background: var(--accent-gradient);
    color: white;
}

.sidebar-menu .icon {
    width: 20px;
    text-align: center;
}

.sidebar-menu .menu-group-horizontal {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.sidebar-menu .menu-group-horizontal a {
    flex: 1;
    padding: 12px 16px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-menu .menu-group-horizontal a .icon {
    margin-right: 0;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.main-content.full-width {
    margin-left: 0;
}

.content-wrapper {
    padding: 24px;
}

/* Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

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

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

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: #f1f5f9;
}

.btn-warning {
    background: var(--warning-color);
    color: white;
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

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

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

/* Metric Cards */
.metric-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.metric-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-gradient);
}

.metric-card .ai-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--accent-gradient);
    color: white;
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.metric-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 8px 0 4px;
}

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

.metric-change {
    font-size: 12px;
    margin-top: 8px;
}

.metric-change.positive {
    color: var(--success-color);
}

.metric-change.negative {
    color: var(--danger-color);
}

/* Charts */
.chart-container {
    position: relative;
    height: 280px;
}

.small-chart-container {
    height: 200px;
}

/* Grid Layout */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

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

/* China Map */
.china-map {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    border-radius: 12px;
    padding: 20px;
    height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.map-regions {
    position: relative;
    width: 100%;
    height: 180px;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 200' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='30' y='40' width='120' height='80' fill='rgba(0,212,255,0.3)' stroke='%2300d4ff' stroke-width='1' rx='4'/%3E%3Crect x='180' y='30' width='100' height='100' fill='rgba(245,158,11,0.4)' stroke='%23f59e0b' stroke-width='1' rx='4'/%3E%3Crect x='300' y='50' width='70' height='70' fill='rgba(34,197,94,0.3)' stroke='%2322c55e' stroke-width='1' rx='4'/%3E%3Ctext x='90' y='85' text-anchor='middle' fill='%231e3a5f' font-size='12' font-weight='500'%3E华东区%3C/text%3E%3Ctext x='230' y='85' text-anchor='middle' fill='%231e3a5f' font-size='12' font-weight='500'%3E华南区%3C/text%3E%3Ctext x='335' y='85' text-anchor='middle' fill='%231e3a5f' font-size='12' font-weight='500'%3E西南区%3C/text%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
}

.region-marker {
    position: absolute;
    width: 16px;
    height: 16px;
    background: var(--accent-color);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.region-marker[data-region="华东"] { top: 45%; left: 20%; }
.region-marker[data-region="华南"] { top: 40%; left: 50%; }
.region-marker[data-region="西南"] { top: 50%; left: 80%; }

.map-hint {
    margin-top: 16px;
    background: rgba(0, 212, 255, 0.1);
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--primary-color);
    border-left: 3px solid var(--accent-color);
}

/* Supplier Orders */
.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: background 0.2s ease;
}

.order-item:hover {
    background: rgba(0, 212, 255, 0.08);
}

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

.order-number {
    font-weight: 600;
    color: var(--text-primary);
}

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

.order-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-normal {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success-color);
}

.status-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

/* Task List */
.task-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.task-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.task-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: var(--accent-color);
}

.task-card.active {
    border-color: var(--accent-color);
    background: rgba(0, 212, 255, 0.05);
}

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

.task-address {
    font-weight: 600;
    color: var(--text-primary);
}

.task-time {
    font-size: 12px;
    color: var(--text-secondary);
    background: #f1f5f9;
    padding: 4px 8px;
    border-radius: 4px;
}

.task-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.skill-tag {
    font-size: 12px;
    padding: 3px 8px;
    background: rgba(0, 212, 255, 0.1);
    color: var(--primary-color);
    border-radius: 4px;
}

/* AI Recommendation */
.recommend-panel {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.recommend-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.recommend-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recommend-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.recommend-item:hover {
    background: rgba(0, 212, 255, 0.08);
}

.recommend-item.selected {
    background: rgba(0, 212, 255, 0.15);
    border: 1px solid var(--accent-color);
}

.worker-avatar {
    width: 48px;
    height: 48px;
    background: var(--accent-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.worker-info {
    flex: 1;
}

.worker-name {
    font-weight: 600;
    color: var(--text-primary);
}

.worker-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.match-score {
    background: var(--accent-gradient);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
}

/* Mini Map */
.mini-map {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-radius: 8px;
    height: 150px;
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.map-pulse {
    position: absolute;
    width: 20px;
    height: 20px;
    background: rgba(0, 212, 255, 0.6);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.map-pulse::after {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 2px solid rgba(0, 212, 255, 0.3);
    animation: pulse-ring 2s infinite;
}

.map-coords {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 8px;
    text-align: center;
}

/* Mobile Assistant */
.mobile-container {
    display: flex;
    justify-content: center;
    padding: 40px 0;
}

.mobile-phone {
    width: 380px;
    background: #1a1a1a;
    border-radius: 40px;
    padding: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.mobile-screen {
    background: white;
    border-radius: 30px;
    padding: 20px;
    min-height: 650px;
    position: relative;
}

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

.mobile-task {
    background: var(--accent-gradient);
    color: white;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 16px;
}

.mobile-task-id {
    font-size: 12px;
    opacity: 0.9;
}

.mobile-task-name {
    font-size: 16px;
    font-weight: 600;
    margin-top: 4px;
}

.camera-view {
    background: linear-gradient(180deg, #1e293b 0%, #334155 100%);
    border-radius: 16px;
    height: 320px;
    position: relative;
    overflow: hidden;
    margin-bottom: 16px;
}

.camera-grid {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(0, 212, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.1) 1px, transparent 1px);
    background-size: 30px 30px;
}

.camera-frame {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 280px;
    height: 200px;
    border: 3px solid var(--accent-color);
    border-radius: 8px;
    opacity: 0.8;
}

.ai-assistant-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    background: var(--accent-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.4);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.ai-assistant-btn:hover {
    transform: scale(1.1);
}

.ai-result {
    background: rgba(34, 197, 94, 0.1);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    animation: fadeIn 0.5s ease;
}

.ai-result-title {
    font-weight: 600;
    color: var(--success-color);
    margin-bottom: 8px;
}

.ai-result-details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.ai-check {
    color: var(--success-color);
    margin-right: 4px;
}

/* AI Report */
.report-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.report-preview {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.report-images {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.report-image {
    aspect-ratio: 4/3;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.3s ease;
}

.report-image::after {
    content: 'AI验证通过';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(34, 197, 94, 0.9);
    color: white;
    text-align: center;
    padding: 4px;
    font-size: 11px;
}

.report-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ai-summary-box {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.ai-summary-content {
    background: #f8fafc;
    border-radius: 8px;
    padding: 16px;
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    min-height: 100px;
}

.cursor {
    animation: blink 1s infinite;
}

/* Worker Table */
.worker-table {
    width: 100%;
    border-collapse: collapse;
}

.worker-table th,
.worker-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.worker-table th {
    background: #f8fafc;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 13px;
}

.worker-table tbody tr {
    cursor: pointer;
    transition: background 0.2s ease;
}

.worker-table tbody tr:hover {
    background: rgba(0, 212, 255, 0.05);
}

.worker-table .score-cell {
    font-weight: 600;
    color: var(--primary-color);
}

.search-box {
    position: relative;
    margin-bottom: 24px;
}

.search-box input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 14px;
    background: var(--card-bg);
    transition: border-color 0.2s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent-color);
}

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

/* Radar Modal */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 24px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

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

.modal-title {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: #f1f5f9;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.modal-close:hover {
    background: #e2e8f0;
}

.modal-radar-container {
    height: 300px;
}

/* Root Cause Analysis */
.ai-analysis-box {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(0, 153, 255, 0.1) 100%);
    border-radius: 12px;
    padding: 20px;
    border-left: 4px solid var(--accent-color);
    margin-top: 20px;
}

.ai-analysis-title {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-analysis-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
}

/* Work Order Monitoring */
.order-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.order-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    transition: all 0.2s ease;
}

.order-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.order-card.expanded {
    border-color: var(--accent-color);
}

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

.order-id {
    font-weight: 600;
    color: var(--text-primary);
}

.order-status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-in-progress {
    background: rgba(0, 212, 255, 0.1);
    color: var(--accent-color);
}

.status-pending {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.status-completed {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success-color);
}

.order-info {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.gantt-mini {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gantt-bar {
    flex: 1;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.gantt-progress {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.ai-alert {
    background: rgba(245, 158, 11, 0.1);
    border-left: 4px solid var(--warning-color);
    padding: 12px 16px;
    border-radius: 0 8px 8px 0;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: pulse-soft 3s infinite;
}

.ai-alert-icon {
    font-size: 20px;
}

.ai-alert-text {
    font-size: 14px;
    color: var(--text-primary);
}

/* Material Traceability */
.trace-tree {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.trace-path {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.trace-step {
    display: flex;
    gap: 16px;
    position: relative;
    animation: slideIn 0.3s ease;
}

.trace-step::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 48px;
    width: 2px;
    height: calc(100% - 32px);
    background: var(--border-color);
}

.trace-step:last-child::before {
    display: none;
}

.trace-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    flex-shrink: 0;
    z-index: 1;
    animation: scaleIn 0.3s ease;
}

.trace-content {
    flex: 1;
    background: #f8fafc;
    border-radius: 12px;
    padding: 16px;
    transition: background 0.2s ease;
}

.trace-content:hover {
    background: rgba(0, 212, 255, 0.08);
}

.trace-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.trace-meta {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: var(--text-secondary);
}

.batch-input {
    margin-bottom: 20px;
}

.batch-input input {
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    width: 300px;
    transition: border-color 0.2s ease;
}

.batch-input input:focus {
    outline: none;
    border-color: var(--accent-color);
}

/* Equipment Monitoring */
.equipment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.equipment-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.equipment-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

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

.equipment-name {
    font-weight: 600;
    color: var(--text-primary);
}

.equipment-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.equipment-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.metric-item {
    background: #f8fafc;
    border-radius: 8px;
    padding: 12px;
}

.metric-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

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

.oee-value {
    font-size: 28px;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.alarm-list {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin-top: 20px;
}

.alarm-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease;
}

.alarm-item:hover {
    background: rgba(239, 68, 68, 0.05);
}

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

.alarm-icon {
    color: var(--danger-color);
    font-size: 18px;
}

/* Work Reporting */
.sop-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sop-step {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--card-bg);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
}

.sop-step.completed {
    border-left: 4px solid var(--success-color);
}

.sop-step.current {
    border-left: 4px solid var(--accent-color);
    background: rgba(0, 212, 255, 0.05);
    animation: pulse-soft 2s infinite;
}

.sop-step.pending {
    border-left: 4px solid var(--border-color);
    opacity: 0.7;
}

.sop-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.sop-step.completed .sop-number {
    background: var(--success-color);
    color: white;
}

.sop-step.current .sop-number {
    background: var(--accent-gradient);
    color: white;
}

.sop-info {
    flex: 1;
}

.sop-title {
    font-weight: 600;
    color: var(--text-primary);
}

.sop-time {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.spc-control-chart {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.cpk-info {
    display: flex;
    gap: 24px;
    margin-bottom: 20px;
}

.cpk-item {
    background: #f8fafc;
    border-radius: 8px;
    padding: 12px 20px;
    text-align: center;
    min-width: 120px;
}

.cpk-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.cpk-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--success-color);
}

/* Responsive */
.menu-toggle {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    width: 48px;
    height: 48px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    z-index: 101;
    font-size: 20px;
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .grid-2,
    .grid-3,
    .report-grid {
        grid-template-columns: 1fr;
    }

    .metric-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .report-images {
        grid-template-columns: repeat(3, 1fr);
    }

    .order-info {
        grid-template-columns: repeat(2, 1fr);
    }

    .mobile-container {
        padding: 20px 16px;
    }

    .mobile-phone {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .metric-cards {
        grid-template-columns: 1fr;
    }

    .report-images {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Page Content */
.page-content {
    display: none;
}

.page-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Animations */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.6;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes pulse-ring {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

@keyframes pulse-soft {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}