/* Vyrtex Configurator — base styles (mirrors public/static/css/main.css idioms) */

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0f172a; }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #475569; }

body { font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }

/* Tabs */
.tab-btn {
    padding: 0.6rem 1rem;
    font-size: 0.875rem;
    color: #94a3b8;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
    background: transparent;
}
.tab-btn:hover { color: #e2e8f0; }
.tab-btn.active {
    color: #fff;
    border-bottom-color: #6366f1;
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* Toast */
.toast {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: #fff;
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
    animation: toast-in 0.18s ease-out;
    max-width: 24rem;
}
.toast-info { background: #4f46e5; }
.toast-success { background: #059669; }
.toast-error { background: #dc2626; }
.toast-warn { background: #d97706; }

@keyframes toast-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Spinner */
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin 0.8s linear infinite; }

/* ── Inline editable grid (Excel-like) ─────────────────────────────────── */
.grid-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}
.grid-table th {
    text-align: left;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    font-weight: 600;
    padding: 0.4rem 0.5rem;
    border-bottom: 1px solid #1e293b;
    position: sticky;
    top: 0;
    background: #0b1220;
    white-space: nowrap;
}
.grid-table td {
    padding: 0;
    border-bottom: 1px solid #14203a;
    border-right: 1px solid #0f172a;
    vertical-align: middle;
}
.grid-table tr:hover td { background: #0e1626; }

/* Flat cell editors — look like plain text until focused */
.cell-input,
.cell-select {
    width: 100%;
    background: transparent;
    border: 1px solid transparent;
    color: #e2e8f0;
    padding: 0.4rem 0.5rem;
    font-size: 0.8125rem;
    outline: none;
    border-radius: 0;
}
.cell-input::placeholder { color: #475569; }
.cell-input:hover,
.cell-select:hover { background: #131d33; }
.cell-input:focus,
.cell-select:focus {
    background: #0f172a;
    border-color: #6366f1;
    box-shadow: inset 0 0 0 1px #6366f1;
}
.cell-select { appearance: none; cursor: pointer; }
.cell-num { text-align: right; font-variant-numeric: tabular-nums; }

.row-del {
    color: #64748b;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    font-size: 1rem;
    line-height: 1;
    background: transparent;
    border: none;
}
.row-del:hover { color: #f87171; }

.add-row-btn {
    font-size: 0.8125rem;
    color: #818cf8;
    padding: 0.45rem 0.6rem;
    cursor: pointer;
    background: transparent;
    border: none;
}
.add-row-btn:hover { color: #a5b4fc; }

.row-toggle {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 0.75rem;
    padding: 0.25rem 0.45rem;
    line-height: 1;
}
.row-toggle:hover { color: #e2e8f0; }

/* Expandable "additional info" detail row */
.detail-row > td { background: #0a101e; padding: 0 !important; }
.detail-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
}
.detail-field { display: flex; flex-direction: column; width: 8.5rem; }
.detail-field > span {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    margin-bottom: 0.15rem;
}
.detail-field .cell-input {
    border: 1px solid #334155;
    border-radius: 0.375rem;
    background: #0f172a;
}
.detail-empty { padding: 0.75rem 1rem; color: #64748b; font-size: 0.8125rem; }

.grid-wrap {
    border: 1px solid #1e293b;
    border-radius: 0.5rem;
    overflow: auto;
    background: #0b1220;
}

/* ── Pivot-style rollup table (LOM / Site totals) ──────────────────────── */
.pivot-wrap {
    border: 1px solid #1e293b;
    border-radius: 0.5rem;
    overflow: auto;
    background: #0b1220;
}
.pivot-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}
.pivot-table th {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    font-weight: 600;
    padding: 0.4rem 0.6rem;
    border-bottom: 1px solid #1e293b;
    white-space: nowrap;
    text-align: right;
}
.pivot-table td {
    padding: 0.35rem 0.6rem;
    border-bottom: 1px solid #14203a;
    color: #cbd5e1;
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.pivot-table th.pivot-dim,
.pivot-table td.pivot-dim { text-align: left; }
.pivot-table td.pivot-dim { color: #e2e8f0; }
.pivot-table td.pivot-sku {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.75rem;
    color: #94a3b8;
}
.pivot-table tbody tr:hover td { background: #0e1626; }
.pivot-table .pivot-total td {
    border-top: 2px solid #334155;
    border-bottom: none;
    background: #0f172a;
    color: #fff;
    font-weight: 600;
}
.pivot-table .pivot-unit { color: #475569; font-weight: 400; }
