/* VRA Order Management System - Custom Styles */

/* Layout */
body {
    font-size: 0.9rem;
    padding-top: 56px;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding-top: 56px;
    overflow-x: hidden;
    overflow-y: auto;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
}

.sidebar .nav-link {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: 0;
    transition: background-color 0.15s ease;
}

.sidebar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link.active {
    background-color: rgba(255, 255, 255, 0.15);
    font-weight: 600;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

/* Tables */
.table th {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 600;
    color: #6c757d;
    border-top: none;
}

/* Status badges */
.badge {
    font-weight: 500;
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
}

/* BOM Tree */
.bom-children {
    list-style: none;
    padding-left: 24px;
    border-left: 1px dashed #dee2e6;
    margin-left: 10px;
}

.bom-children.collapsed {
    display: none;
}

.bom-node-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    margin: 2px 0;
    border-radius: 4px;
    cursor: default;
    font-size: 0.875rem;
}

.bom-node-header:hover {
    background: #f0f4f8;
}

.bom-toggle {
    cursor: pointer;
    user-select: none;
    width: 16px;
    text-align: center;
    font-size: 10px;
    color: #6c757d;
}

/* Type badges for BOM */
.bom-type-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    min-width: 28px;
    text-align: center;
}

.badge-finished_good { background: #0d6efd; color: white; }
.badge-sub_assembly  { background: #198754; color: white; }
.badge-part          { background: #ffc107; color: #333;  }
.badge-material      { background: #dc3545; color: white; }
.badge-toy           { background: #6f42c1; color: white; }

.bom-sku      { color: #888; font-size: 0.8rem; }
.bom-quantity { color: #0d6efd; font-weight: bold; }
.bom-optional { color: #6f42c1; font-style: italic; font-size: 0.8rem; }
.bom-cost     { color: #198754; font-weight: bold; margin-left: auto; }

/* Stock availability indicators */
.stock-ok      { color: #198754; }
.stock-low     { color: #ffc107; }
.stock-out     { color: #dc3545; }

/* Production board */
.production-column {
    min-height: 400px;
    background: #f8f9fa;
    border-radius: 0.5rem;
    padding: 0.75rem;
}

.production-column .card {
    cursor: pointer;
    transition: box-shadow 0.15s ease;
}

.production-column .card:hover {
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
}

.unit-serial {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: 700;
    color: #0d6efd;
}

/* Toy selector grid */
.toy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.5rem;
}

.toy-card {
    border: 2px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 0.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.toy-card:hover {
    border-color: #0d6efd;
    background: #e7f1ff;
}

.toy-card.selected {
    border-color: #0d6efd;
    background: #cfe2ff;
}

.toy-card.out-of-stock {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Print label preview */
.label-preview {
    border: 2px dashed #dee2e6;
    padding: 1rem;
    background: white;
    font-family: 'Courier New', monospace;
    max-width: 400px;
}

/* Quick actions */
.quick-action-btn {
    border: 1px dashed #dee2e6;
    color: #6c757d;
    transition: all 0.15s ease;
}

.quick-action-btn:hover {
    border-color: #0d6efd;
    color: #0d6efd;
    background: #e7f1ff;
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
    .sidebar {
        position: fixed;
        top: 56px;
        bottom: 0;
        left: 0;
        width: 260px;
        padding-top: 0;
        z-index: 1050;
    }
    .sidebar:not(.show) {
        display: none;
    }
    body {
        padding-top: 56px;
    }
}
