.nav-link {
    display: block;
    padding: 0.625rem 0.875rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #94a3b8;
    transition: all 0.15s;
}
.nav-link:hover {
    background: rgba(255,255,255,0.06);
    color: #fff;
}
.nav-link-active {
    background: rgba(99,102,241,0.2);
    color: #fff;
}

.card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1.25rem;
    box-shadow: 0 1px 2px rgba(15,23,42,0.04);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.625rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 700;
    transition: all 0.15s;
    cursor: pointer;
}
.btn-primary { background: #4f46e5; color: #fff; }
.btn-primary:hover { background: #4338ca; }
.btn-secondary { background: #f1f5f9; color: #334155; }
.btn-secondary:hover { background: #e2e8f0; }
.btn-danger { background: #fef2f2; color: #dc2626; }
.btn-danger:hover { background: #fee2e2; }
.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.75rem; }

.input, .select, .textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    background: #fff;
}
.input:focus, .select:focus, .textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}
.label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    margin-bottom: 0.375rem;
}

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.table th {
    text-align: left;
    padding: 0.75rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
}
.table td {
    padding: 0.75rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.stat-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1.25rem;
}
.stat-value { font-size: 1.75rem; font-weight: 900; line-height: 1.1; }
.stat-label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; color: #64748b; margin-top: 0.25rem; }

.stock-warning { background: #fefce8 !important; border-left: 4px solid #eab308; }
.stock-critical { background: #fef2f2 !important; border-left: 4px solid #ef4444; }

.badge {
    display: inline-flex;
    padding: 0.2rem 0.55rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 700;
    border: 1px solid transparent;
}

.alert {
    padding: 0.875rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
}
.alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

.kanban-board {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
    align-items: start;
}
.kanban-column {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    min-height: 200px;
}
.kanban-column-header {
    padding: 0.875rem 1rem;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #e2e8f0;
}
.kanban-cards {
    padding: 0.75rem;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}
.kanban-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 0.875rem;
    cursor: grab;
    box-shadow: 0 1px 2px rgba(15,23,42,0.04);
}
.kanban-card:active { cursor: grabbing; }
.kanban-card.dragging { opacity: 0.5; }
.kanban-column.drag-over { background: #eef2ff; border-color: #a5b4fc; }

.kanban-column[data-status="new"] .kanban-column-header { border-top: 3px solid #94a3b8; }
.kanban-column[data-status="queued"] .kanban-column-header { border-top: 3px solid #3b82f6; }
.kanban-column[data-status="printing"] .kanban-column-header { border-top: 3px solid #f59e0b; }
.kanban-column[data-status="postprocess"] .kanban-column-header { border-top: 3px solid #a855f7; }
.kanban-column[data-status="ready"] .kanban-column-header { border-top: 3px solid #06b6d4; }
.kanban-column[data-status="completed"] .kanban-column-header { border-top: 3px solid #22c55e; }
.kanban-column[data-status="fulfilled"] .kanban-column-header { border-top: 3px solid #10b981; }
.kanban-column[data-status="defect"] .kanban-column-header { border-top: 3px solid #ef4444; }
.kanban-column[data-status="cancelled"] .kanban-column-header { border-top: 3px solid #f87171; }

.order-card {
    position: relative;
    overflow: hidden;
}
.order-card-accent {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    border-radius: 0.75rem 0 0 0.75rem;
}
.order-card-body { padding-left: 0.25rem; }
.order-card-thumb {
    width: 3rem;
    height: 3rem;
    border-radius: 0.5rem;
    object-fit: contain;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
}
.order-card-thumb-placeholder {
    width: 3rem;
    height: 3rem;
    border-radius: 0.5rem;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.order-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.1rem 0.45rem;
    border-radius: 0.375rem;
    font-size: 0.65rem;
    font-weight: 700;
    background: #f1f5f9;
    color: #475569;
}
.status-pill {
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s;
}
.status-pill:hover { border-color: #a5b4fc; color: #4f46e5; }
.status-pill.active { background: #4f46e5; color: #fff; border-color: #4f46e5; }

.orders-status-tabs {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}
.orders-status-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.8125rem;
    font-weight: 800;
    border: 2px solid #e2e8f0;
    background: #fff;
    color: #475569;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.15s;
}
.orders-status-tab:hover { border-color: #a5b4fc; color: #4f46e5; }
.orders-status-tab.active {
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(79,70,229,0.25);
}
.orders-status-tab .tab-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
    flex-shrink: 0;
}
.orders-status-tab .tab-count {
    min-width: 1.25rem;
    padding: 0.1rem 0.4rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 900;
    background: rgba(0,0,0,0.08);
    text-align: center;
}
.orders-status-tab.active .tab-count { background: rgba(255,255,255,0.25); }

.order-grid-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.15s, border-color 0.15s;
    cursor: pointer;
}
.order-grid-card:hover {
    box-shadow: 0 8px 24px rgba(15,23,42,0.08);
    border-color: #c7d2fe;
}
.order-grid-card-top {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1rem 0.75rem;
}
.order-grid-card-body { flex: 1; min-width: 0; }
.order-grid-card-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-top: 1px solid #f1f5f9;
    background: #fafafa;
}

.metric-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px dashed #e2e8f0;
    font-size: 0.875rem;
}
.metric-row:last-child { border-bottom: none; }
.metric-total {
    font-size: 1.125rem;
    font-weight: 900;
    color: #4f46e5;
}

.toast {
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
    background: #334155;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    animation: slideIn 0.2s ease;
}
.toast-success { background: #059669; }
.toast-error { background: #dc2626; }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }

@media (max-width: 640px) {
    .kanban-board { grid-template-columns: 1fr; }
}
