/* Portal Taller — paleta naranja/industrial */
:root {
    --tlr-primary: #E65100;
    --tlr-primary-dark: #BF360C;
    --tlr-accent: #FFA726;
    --tlr-bg: #FFF3E0;
    --tlr-surface: #FFFFFF;
    --tlr-border: #FFCC80;
    --tlr-text: #263238;
    --tlr-muted: #78909C;
}
body.tlr-body {
    background: var(--tlr-bg);
    color: var(--tlr-text);
}
.navbar-taller {
    background: linear-gradient(135deg, var(--tlr-primary-dark), var(--tlr-primary));
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.navbar-taller .navbar-brand, .navbar-taller .nav-link, .navbar-taller .navbar-text {
    color: #fff !important;
}
.card-taller {
    background: var(--tlr-surface);
    border: 1px solid var(--tlr-border);
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.card-taller .card-header {
    background: linear-gradient(135deg, var(--tlr-primary), var(--tlr-accent));
    color: #fff;
    font-weight: 600;
    border-radius: 10px 10px 0 0;
}
.stat-tlr {
    border-radius: 10px;
    padding: 1rem 1.25rem;
    background: #fff;
    border: 1px solid var(--tlr-border);
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}
.stat-tlr .stat-label { color: var(--tlr-muted); font-size: 0.8rem; text-transform: uppercase; }
.stat-tlr .stat-value { font-size: 2rem; font-weight: 700; color: var(--tlr-primary-dark); }

/* Dark mode */
[data-theme="dark"] body.tlr-body { background: #1A0E00; color: #FFE0B2; }
[data-theme="dark"] .card-taller { background: #2A1A0A; border-color: #4E342E; color: #FFE0B2; }
[data-theme="dark"] .stat-tlr { background: #2A1A0A; border-color: #4E342E; }
[data-theme="dark"] .stat-tlr .stat-label { color: #BCAAA4; }
[data-theme="dark"] .stat-tlr .stat-value { color: var(--tlr-accent); }

/* Texto muted en dark: mas claro para contraste aceptable (WCAG AA) */
[data-theme="dark"] .text-muted, [data-theme="dark"] small.text-muted { color: #BCAAA4 !important; }
[data-theme="dark"] .form-text, [data-theme="dark"] .form-label { color: #E6C9A8; }
[data-theme="dark"] .form-label.small { color: #E6C9A8; }
[data-theme="dark"] p, [data-theme="dark"] h4, [data-theme="dark"] h5 { color: #FFE0B2; }

/* Tablas Bootstrap en dark */
[data-theme="dark"] .table { --bs-table-bg: transparent; color: #FFE0B2; }
[data-theme="dark"] .table > :not(caption) > * > * { background-color: transparent; color: inherit; }
[data-theme="dark"] .table-light, [data-theme="dark"] .table-light > :not(caption) > * > * {
    background-color: #3E2A1A !important; color: #FFE0B2 !important;
    --bs-table-bg: #3E2A1A;
}
[data-theme="dark"] .table-hover > tbody > tr:hover > * {
    background-color: rgba(230, 81, 0, 0.14);
    color: #FFE0B2;
}
[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(255, 224, 178, 0.03);
    color: #FFE0B2;
}

/* Inputs / forms en dark */
[data-theme="dark"] .form-control, [data-theme="dark"] .form-select {
    background: #1A0E00; color: #FFE0B2; border-color: #4E342E;
}
[data-theme="dark"] .form-control:focus, [data-theme="dark"] .form-select:focus {
    background: #1A0E00; color: #FFE0B2;
    border-color: var(--tlr-accent); box-shadow: 0 0 0 0.15rem rgba(255, 152, 0, 0.25);
}
[data-theme="dark"] .form-control::placeholder { color: #8D6E63; }

/* Alerts en dark */
[data-theme="dark"] .alert-secondary { background: #3E2A1A; color: #FFE0B2; border-color: #4E342E; }
[data-theme="dark"] .alert-warning { background: #4E3516; color: #FFCC80; border-color: #6B4A22; }
[data-theme="dark"] .alert-info { background: #1E3A5F; color: #BBDEFB; border-color: #2B5280; }
[data-theme="dark"] .alert-success { background: #1B3D2A; color: #C8E6C9; border-color: #2D5A3F; }
[data-theme="dark"] .alert-danger { background: #4A1C1C; color: #FFCDD2; border-color: #6B2828; }

/* Modal en dark */
[data-theme="dark"] .modal-content { background: #2A1A0A; color: #FFE0B2; }
[data-theme="dark"] .modal-header { border-bottom-color: #4E342E; }
[data-theme="dark"] .modal-footer { border-top-color: #4E342E; }

/* Breadcrumb en dark */
[data-theme="dark"] .breadcrumb-item a { color: var(--tlr-accent); }
[data-theme="dark"] .breadcrumb-item.active { color: #E6C9A8; }

/* Menu custom (dropdown Turnos) en dark */
[data-theme="dark"] .tlr-menu-items { background: #2A1A0A; border-color: #4E342E; }
[data-theme="dark"] .tlr-menu-items a { color: #FFE0B2; }
[data-theme="dark"] .tlr-menu-items a:hover { background: #3E2A1A; }
[data-theme="dark"] .tlr-menu-sep { border-top-color: #4E342E; }

/* Grillas de asignacion */
.tlr-grid-rubros, .tlr-grid-detalles {
    max-height: 50vh;
    overflow-y: auto;
    border: 1px solid var(--tlr-border);
    border-radius: 8px;
    background: #fff;
}
[data-theme="dark"] .tlr-grid-rubros, [data-theme="dark"] .tlr-grid-detalles {
    background: #2A1A0A; border-color: #4E342E;
}
.tlr-grid-rubros table, .tlr-grid-detalles table { margin-bottom: 0; }
.tlr-row-active { background: rgba(230, 81, 0, 0.18) !important; }
.tlr-row-link { cursor: pointer; transition: background 0.12s; }
.tlr-row-link:hover { background: rgba(230, 81, 0, 0.08); }
