/* ===========================
   Materials Page - TRON Theme
   =========================== */

/* Import Section */
.import-section {
    border-left: 2px solid var(--neon-orange);
}

.import-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.import-instructions h3 {
    color: var(--neon-cyan);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.import-instructions ul {
    list-style: none;
    padding: 0;
}

.import-instructions li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: rgba(255, 255, 255, 0.8);
}

.import-instructions li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--neon-cyan);
    font-size: 1.2rem;
}

.import-instructions strong {
    color: var(--electric-blue);
}

.note {
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(0, 217, 255, 0.05);
    border-left: 2px solid var(--neon-cyan);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.import-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
}

.btn-large {
    padding: 1.2rem 2rem;
    font-size: 1.1rem;
}

.file-info {
    padding: 1rem;
    background: rgba(0, 217, 255, 0.05);
    border: 1px solid rgba(0, 217, 255, 0.3);
    border-radius: var(--border-radius);
    color: var(--neon-cyan);
    text-align: center;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Batch Settings */
.batch-settings {
    border-left: 2px solid var(--electric-blue);
}

.hint {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.markup-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

/* Table Specific */
.material-table tbody tr:nth-child(even) {
    background: rgba(0, 0, 0, 0.3);
}

.cost-cell.editable,
.markup-cell.editable {
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

.cost-cell.editable:hover,
.markup-cell.editable:hover {
    background: rgba(0, 217, 255, 0.1);
    border-color: var(--neon-cyan);
    box-shadow: var(--glow-cyan);
}

.cost-value {
    color: var(--neon-orange);
    font-weight: 700;
}

.markup-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(0, 217, 255, 0.2);
    border: 1px solid var(--neon-cyan);
    border-radius: var(--border-radius);
    color: var(--neon-cyan);
    font-weight: 700;
    font-size: 0.85rem;
}

.price-cell {
    color: rgba(255, 255, 255, 0.9);
}

.highlight-price {
    color: var(--neon-orange);
    font-weight: 700;
    text-shadow: 0 0 10px rgba(255, 107, 0, 0.5);
}

.unit-price {
    font-size: 0.9rem;
    color: var(--electric-blue);
    font-weight: 700;
}

/* Add Single Material Form */
.add-material-section {
    background: var(--card-bg);
    border-left: 2px solid var(--neon-cyan);
}

.single-material-form {
    margin-top: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    align-items: end;
}

.form-group-inline {
    display: flex;
    flex-direction: column;
}

.form-group-inline label {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--neon-cyan);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group-inline input {
    padding: 0.6rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 217, 255, 0.3);
    border-radius: var(--border-radius);
    color: #fff;
    font-size: 0.9rem;
    transition: var(--transition);
}

.form-group-inline input:focus {
    outline: none;
    border-color: var(--neon-cyan);
    box-shadow: var(--glow-cyan);
}

/* Row Color Highlighting */
.row-highlight-blue {
    background: rgba(59, 130, 246, 0.1) !important;
    border-left: 2px solid #3b82f6;
}

.row-highlight-blue:hover {
    background: rgba(59, 130, 246, 0.15) !important;
}

.row-highlight-yellow {
    background: rgba(245, 158, 11, 0.1) !important;
    border-left: 2px solid #f59e0b;
}

.row-highlight-yellow:hover {
    background: rgba(245, 158, 11, 0.15) !important;
}

.row-highlight-gray {
    background: rgba(156, 163, 175, 0.1) !important;
    border-left: 2px solid #9ca3af;
}

.row-highlight-gray:hover {
    background: rgba(156, 163, 175, 0.15) !important;
}

.row-highlight-silver {
    background: rgba(226, 232, 240, 0.05) !important;
    border-left: 2px solid #cbd5e1;
}

.row-highlight-silver:hover {
    background: rgba(226, 232, 240, 0.1) !important;
}

.row-highlight-gold {
    background: rgba(245, 158, 11, 0.1) !important;
    border-left: 2px solid var(--neon-orange);
}

.row-highlight-gold:hover {
    background: rgba(245, 158, 11, 0.15) !important;
}

.row-highlight-green {
    background: rgba(16, 185, 129, 0.1) !important;
    border-left: 2px solid #10b981;
}

.row-highlight-green:hover {
    background: rgba(16, 185, 129, 0.15) !important;
}

.row-highlight-red {
    background: rgba(239, 68, 68, 0.1) !important;
    border-left: 2px solid #ef4444;
}

.row-highlight-red:hover {
    background: rgba(239, 68, 68, 0.15) !important;
}

.row-highlight-purple {
    background: rgba(139, 92, 246, 0.1) !important;
    border-left: 2px solid #8b5cf6;
}

.row-highlight-purple:hover {
    background: rgba(139, 92, 246, 0.15) !important;
}

/* Color Selector */
.color-selector-cell {
    padding: 0.5rem !important;
    width: 100px;
}

.color-selector {
    width: 100%;
    padding: 0.4rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 217, 255, 0.3);
    border-radius: var(--border-radius);
    color: #fff;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
}

.color-selector:hover {
    border-color: var(--neon-cyan);
}

.color-selector:focus {
    outline: none;
    border-color: var(--neon-cyan);
    box-shadow: var(--glow-cyan);
}

.color-selector option {
    background: var(--dark-bg);
    color: #fff;
}

.editable-hint {
    font-size: 0.65rem;
    color: rgba(0, 217, 255, 0.7);
    font-weight: normal;
}

/* Search Input */
.search-input {
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 217, 255, 0.3);
    border-radius: var(--border-radius);
    color: #fff;
    font-size: 0.9rem;
    transition: var(--transition);
    width: 300px;
}

.search-input:focus {
    outline: none;
    border-color: var(--neon-cyan);
    box-shadow: var(--glow-cyan);
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
    .import-container {
        grid-template-columns: 1fr;
    }

    .search-input {
        width: 100%;
    }
}