/* OsteoFlow — tema oscuro unificado (SPA React + módulos legacy) */

:root {
    --bg-deep: #030712;
    --bg: rgba(15, 23, 42, 0.45);
    --surface: rgba(8, 22, 42, 0.78);
    --surface-raised: rgba(12, 55, 58, 0.38);
    --surface-2: rgba(15, 35, 52, 0.72);
    --border: rgba(94, 234, 212, 0.14);
    --border-strong: rgba(94, 234, 212, 0.22);
    --text: #ecfdf5;
    --text-muted: #94a3b8;
    --primary: #14b8a6;
    --primary-hover: #2dd4bf;
    --primary-soft: rgba(20, 184, 166, 0.14);
    --accent: #22d3ee;
    --success: #34d399;
    --warning: #fbbf24;
    --danger: #f87171;
    --radius: 12px;
    --shadow: 0 14px 44px rgba(1, 12, 35, 0.55);
    --shadow-lg: 0 24px 60px rgba(0, 6, 20, 0.65);
    --sidebar-w: 252px;
    --header-h: 56px;
    --font: "Inter", system-ui, -apple-system, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 15px;
    color-scheme: dark;
}

body {
    font-family: var(--font);
    background-color: var(--bg-deep);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.5;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background:
        radial-gradient(ellipse 90% 70% at 95% 8%, rgba(56, 189, 248, 0.09), transparent 52%),
        radial-gradient(ellipse 75% 55% at 8% 92%, rgba(240, 253, 250, 0.14), transparent 48%),
        radial-gradient(ellipse 65% 60% at 72% 78%, rgba(167, 243, 208, 0.1), transparent 45%),
        radial-gradient(ellipse 85% 70% at 42% 38%, rgba(45, 212, 191, 0.12), transparent 58%),
        linear-gradient(162deg, #030712 0%, #0a1628 18%, #0c2744 32%, #0f3d3d 52%, #134e4a 68%, #166534 82%, #ecfdf5 100%);
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(
        ellipse 95% 90% at 50% 45%,
        transparent 0%,
        rgba(3, 7, 18, 0.72) 62%,
        rgba(3, 7, 18, 0.88) 100%
    );
}

.app-shell {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 0;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-w);
    flex-shrink: 0;
    background: linear-gradient(185deg, rgba(5, 14, 30, 0.94) 0%, rgba(8, 55, 62, 0.52) 55%, rgba(6, 78, 71, 0.38) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #ecfdf5;
    padding: 1.25rem 0;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 40;
    box-shadow: 8px 0 32px rgba(0, 8, 24, 0.45);
    border-right: 1px solid rgba(94, 234, 212, 0.14);
}

.sidebar-brand {
    padding: 0 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar-brand h1 {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.sidebar-brand p {
    font-size: 0.75rem;
    opacity: 0.75;
    margin-top: 0.25rem;
    font-weight: 400;
}

.nav-section {
    padding: 1rem 0.75rem;
    flex: 1;
}

.nav-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.55;
    padding: 0 0.5rem 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.75rem;
    border-radius: 8px;
    color: inherit;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    margin-bottom: 4px;
    border: none;
    background: transparent;
    width: 100%;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: background 0.15s ease;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.14);
    box-shadow: inset 3px 0 0 #5eead4;
}

.nav-icon {
    width: 1.25rem;
    height: 1.25rem;
    opacity: 0.9;
    flex-shrink: 0;
}

/* MAOS: submenú al hover (escritorio); siempre desplegado en táctil */
.nav-flyout {
    margin-bottom: 4px;
    position: relative;
}

.nav-flyout-inner {
    display: flex;
    flex-direction: column;
}

.nav-flyout-trigger {
    width: 100%;
}

.nav-flyout-trigger .nav-flyout-chevron {
    width: 1rem;
    height: 1rem;
    margin-left: auto;
    opacity: 0.72;
    flex-shrink: 0;
    transition: transform 0.22s ease;
}

@media (hover: hover) and (pointer: fine) {
    .nav-flyout:hover .nav-flyout-chevron,
    .nav-flyout:focus-within .nav-flyout-chevron {
        transform: rotate(180deg);
    }
}

.nav-flyout-panel {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
    padding-left: 0.35rem;
    margin: 0 0 2px 0.45rem;
    border-left: 2px solid rgba(94, 234, 212, 0.35);
    transition:
        max-height 0.3s ease,
        opacity 0.22s ease,
        margin-top 0.22s ease,
        padding-top 0.22s ease;
}

@media (hover: hover) and (pointer: fine) {
    .nav-flyout-panel {
        max-height: 0;
        opacity: 0;
        margin-top: 0;
        padding-top: 0;
        pointer-events: none;
    }

    .nav-flyout:hover .nav-flyout-panel,
    .nav-flyout:focus-within .nav-flyout-panel {
        max-height: 6.5rem;
        opacity: 1;
        margin-top: 4px;
        padding-top: 2px;
        pointer-events: auto;
    }

    .nav-flyout--admin:hover .nav-flyout-panel,
    .nav-flyout--admin:focus-within .nav-flyout-panel {
        max-height: 12.5rem;
    }
}

@media (hover: none), (pointer: coarse) {
    .nav-flyout-panel {
        max-height: none;
        opacity: 1;
        margin-top: 4px;
        padding-top: 2px;
        pointer-events: auto;
    }
}

.nav-flyout.nav-flyout--child-active .nav-flyout-trigger {
    background: rgba(255, 255, 255, 0.14);
    box-shadow: inset 3px 0 0 #5eead4;
}

.nav-item.nav-sub {
    padding-left: 1.35rem;
    font-size: 0.86rem;
    font-weight: 450;
}

/* Main */
.main-wrap {
    flex: 1;
    margin-left: var(--sidebar-w);
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.topbar {
    height: var(--header-h);
    background: linear-gradient(90deg, rgba(7, 22, 42, 0.82), rgba(10, 52, 54, 0.55));
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.25rem;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 30;
}

.menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(3, 15, 35, 0.55);
    color: var(--text);
    cursor: pointer;
}

.topbar-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    flex: 1;
    min-width: 0;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.field-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.field-inline label {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
}

select.select-role {
    font-family: inherit;
    font-size: 0.85rem;
    padding: 0.45rem 0.75rem;
    border-radius: 8px;
    border: 1px solid rgba(94, 234, 212, 0.2);
    background: rgba(3, 15, 35, 0.65);
    color: var(--text);
    min-width: 160px;
    cursor: pointer;
}

.session-user {
    font-size: 0.82rem;
    color: var(--text-muted);
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-actions .link-login {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.85rem;
}

.topbar-actions .link-login:hover {
    text-decoration: underline;
}

.main-content {
    padding: 1.25rem;
    flex: 1;
}

.view {
    display: none;
}

.view.active {
    display: block;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* KPI grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.kpi-card {
    background: linear-gradient(155deg, rgba(8, 20, 42, 0.78) 0%, rgba(12, 55, 58, 0.42) 48%, rgba(14, 83, 71, 0.28) 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: var(--radius);
    border: 1px solid var(--border-strong);
    box-shadow: var(--shadow);
    padding: 1rem 1.1rem;
}

.kpi-card .label {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.kpi-card .value {
    font-size: 1.65rem;
    font-weight: 700;
    background: linear-gradient(135deg, #99f6e4 0%, #5eead4 45%, #ccfbf1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin: 0.25rem 0;
    letter-spacing: -0.02em;
}

.kpi-card canvas {
    margin-top: 0.5rem;
    max-height: 72px;
}

/* Panel */
.panel {
    background: linear-gradient(155deg, rgba(8, 22, 42, 0.82) 0%, rgba(12, 55, 58, 0.35) 100%);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: var(--radius);
    border: 1px solid var(--border-strong);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.panel-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.panel-header h2 {
    font-size: 1.05rem;
    font-weight: 600;
}

.panel-header p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
    max-width: 52ch;
}

.panel-body {
    padding: 0;
}

/* Tables */
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.data-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    background: rgba(3, 15, 30, 0.65);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.data-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr:hover {
    background: rgba(45, 212, 191, 0.08);
}

.cell-muted {
    color: var(--text-muted);
    font-size: 0.82rem;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.badge-abierta {
    background: rgba(20, 184, 166, 0.18);
    color: #99f6e4;
    border: 1px solid rgba(45, 212, 191, 0.35);
}

.badge-convertida {
    background: rgba(129, 140, 248, 0.2);
    color: #c7d2fe;
    border: 1px solid rgba(129, 140, 248, 0.35);
}

.badge-warning {
    background: rgba(251, 191, 36, 0.15);
    color: #fde68a;
    border: 1px solid rgba(251, 191, 36, 0.35);
}

.badge-flujo-abierta {
    background: rgba(20, 184, 166, 0.18);
    color: #99f6e4;
    border: 1px solid rgba(45, 212, 191, 0.35);
}

.badge-flujo-mixto {
    background: rgba(251, 146, 60, 0.18);
    color: #fed7aa;
    border: 1px solid rgba(251, 146, 60, 0.35);
}

.badge-flujo-cerrada {
    background: rgba(96, 165, 250, 0.18);
    color: #bfdbfe;
    border: 1px solid rgba(96, 165, 250, 0.35);
}

.badge-flujo-dateless {
    background: rgba(167, 139, 250, 0.18);
    color: #ddd6fe;
    border: 1px solid rgba(167, 139, 250, 0.35);
}

.badge-flujo-facturada {
    background: rgba(52, 211, 153, 0.16);
    color: #a7f3d0;
    border: 1px solid rgba(52, 211, 153, 0.35);
}

.badge-flujo-anulada {
    background: rgba(248, 113, 113, 0.16);
    color: #fecaca;
    border: 1px solid rgba(248, 113, 113, 0.35);
}

.badge-flujo-otro {
    background: rgba(148, 163, 184, 0.2);
    color: #e2e8f0;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.badge-auditoria {
    background: rgba(251, 191, 36, 0.18);
    color: #fde68a;
    border: 1px solid rgba(251, 191, 36, 0.35);
}

.badge-autorizada {
    background: rgba(52, 211, 153, 0.18);
    color: #a7f3d0;
    border: 1px solid rgba(52, 211, 153, 0.38);
}

.badge-factura {
    background: rgba(20, 184, 166, 0.14);
    color: #99f6e4;
    border: 1px solid rgba(45, 212, 191, 0.32);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.5rem 0.9rem;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.btn-primary {
    background: linear-gradient(135deg, #0d9488 0%, #059669 48%, #10b981 100%);
    color: #fff;
    box-shadow: 0 4px 18px rgba(13, 148, 136, 0.35);
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #14b8a6 0%, #10b981 50%, #34d399 100%);
}

.btn-secondary {
    background: rgba(15, 35, 52, 0.72);
    color: var(--text);
    border-color: var(--border-strong);
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(6, 78, 71, 0.35);
}

.btn-ghost {
    background: transparent;
    color: var(--primary);
}

.btn-sm {
    padding: 0.35rem 0.65rem;
    font-size: 0.8rem;
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.btn-icon-action {
    min-width: 2.05rem;
    justify-content: center;
    padding-inline: 0.45rem;
}

.btn-icon-action span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon-action span svg {
    width: 1rem;
    height: 1rem;
    line-height: 1;
}

.btn-danger-outline {
    border-color: rgba(248, 113, 113, 0.45);
    background: rgba(127, 29, 29, 0.35);
    color: #fecaca;
}

.btn-danger-outline:hover:not(:disabled) {
    background: rgba(185, 28, 28, 0.45);
    border-color: rgba(252, 165, 165, 0.55);
    color: #fff;
}

.trace-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.trace-item {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.55rem 0.65rem;
    background: rgba(8, 25, 45, 0.65);
}

.req-resumen-row td {
    background: rgba(6, 55, 58, 0.22);
    border-top: 1px dashed var(--border);
}

.req-resumen-drop {
    display: grid;
    gap: 0.75rem;
}

.req-resumen-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem 1rem;
    font-size: 0.85rem;
}

.req-resumen-span-2 {
    grid-column: 1 / -1;
}

.req-det-grid th,
.req-det-grid td {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

/* Flow diagram (dashboard) */
.flow-strip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 1rem 1.25rem;
    background: rgba(20, 184, 166, 0.08);
    border-bottom: 1px solid var(--border);
    font-size: 0.82rem;
    color: var(--text-muted);
}

.flow-step {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    background: rgba(8, 22, 42, 0.72);
    border-radius: 8px;
    border: 1px solid var(--border);
    font-weight: 500;
    color: var(--text);
}

.flow-arrow {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Modal */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(3, 7, 18, 0.72);
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    backdrop-filter: blur(8px);
}

.modal-backdrop.open {
    display: flex;
}

.modal {
    background: linear-gradient(165deg, rgba(6, 24, 48, 0.94), rgba(8, 62, 58, 0.72));
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 1.05rem;
    font-weight: 600;
}

.modal-body {
    padding: 1.25rem;
    overflow-y: auto;
}

.modal-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* Plantilla de modales — minimalista (reutilizar en nuevos flujos) */
.modal-backdrop .of-modal {
    width: 100%;
    max-width: 26.5rem;
    max-height: min(92vh, 42rem);
    margin: auto;
    outline: none;
}

.modal-backdrop .of-modal.of-modal--wide {
    max-width: 42rem;
}

.of-modal__surface {
    background: linear-gradient(165deg, rgba(6, 22, 48, 0.94), rgba(10, 60, 56, 0.72));
    border-radius: 14px;
    border: 1px solid var(--border-strong);
    box-shadow:
        0 22px 48px rgba(0, 6, 20, 0.65),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    max-height: inherit;
    overflow: hidden;
}

.of-modal__head {
    padding: 1.15rem 1.35rem 1rem;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(15, 40, 55, 0.55) 0%, rgba(8, 28, 48, 0.35) 100%);
}

.of-modal__title {
    font-size: 1.06rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin: 0;
    color: var(--text);
    line-height: 1.25;
}

.of-modal__subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0.4rem 0 0;
    line-height: 1.45;
    font-weight: 400;
}

.of-modal__body {
    padding: 1.2rem 1.35rem 1.35rem;
    overflow-y: auto;
}

.of-modal__body .form-group:last-child {
    margin-bottom: 0;
}

.of-modal__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.of-modal__grid .form-group--full {
    grid-column: 1 / -1;
}

.of-modal__foot {
    padding: 0.95rem 1.35rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.55rem;
    background: linear-gradient(180deg, rgba(8, 28, 42, 0.65) 0%, rgba(6, 45, 48, 0.42) 100%);
}

.of-modal__foot .btn {
    min-width: 6.75rem;
}

@media (max-width: 520px) {
    .of-modal__grid {
        grid-template-columns: 1fr;
    }
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    font-family: inherit;
    font-size: 0.9rem;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    border: 1px solid rgba(94, 234, 212, 0.2);
    background: rgba(3, 15, 35, 0.55);
    color: var(--text);
}

.form-group textarea {
    min-height: 88px;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: rgba(45, 212, 191, 0.55);
    box-shadow: 0 0 0 2px rgba(45, 212, 191, 0.22);
}

.hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

.empty-state {
    padding: 2.5rem 1.5rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Sidebar overlay mobile */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    z-index: 35;
}

.sidebar-backdrop.open {
    display: block;
}

@media (max-width: 900px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.22s ease;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-wrap {
        margin-left: 0;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .topbar-title {
        font-size: 0.92rem;
    }

    .field-inline label {
        display: none;
    }

    select.select-role {
        min-width: 140px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .kpi-grid {
        grid-template-columns: 1fr;
    }

    .data-table th,
    .data-table td {
        padding: 0.65rem 0.75rem;
    }
}

/* modules/requests/new.html */
.req-new-body {
    min-height: 100vh;
    background: transparent;
}

.req-new-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(90deg, rgba(7, 22, 42, 0.88), rgba(10, 52, 54, 0.55));
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.req-new-brand h1 {
    font-size: 1.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #99f6e4 0%, #5eead4 50%, #ccfbf1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.req-new-brand p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.req-new-main {
    max-width: 960px;
    margin: 0 auto;
    padding: 1.5rem;
}

.req-new-panel {
    box-shadow: var(--shadow);
}

.req-card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.req-info-card {
    background: linear-gradient(155deg, rgba(8, 22, 42, 0.82) 0%, rgba(12, 55, 58, 0.32) 100%);
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}

.req-card-title {
    margin: 0 0 0.8rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
}

.req-new-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.req-new-span-2 {
    grid-column: 1 / -1;
}

.req-cxs-hint {
    margin-bottom: 0.75rem;
}

.req-cxs-dr-group {
    margin-bottom: 0;
}

.req-cxs-block {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.req-cxs-agenda-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.65rem;
    width: 100%;
}

.req-cxs-agenda-title {
    margin: 0;
    flex: 0 0 auto;
}

.req-cxs-agenda-btn {
    margin-left: auto;
}

.req-cxs-table {
    font-size: 0.9rem;
    table-layout: fixed;
    width: 100%;
}

.req-cxs-table .req-cxs-col-num {
    width: 2.25rem;
}

.req-cxs-tr-main td {
    vertical-align: middle;
}

.req-cxs-detail-cell {
    padding: 0.5rem 0.5rem 0.65rem !important;
    background: rgba(20, 100, 95, 0.18);
    border-bottom: 1px solid var(--border);
}

.req-cxs-row-detail {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.req-cxs-detail-stack {
    flex: 1 1 0;
    min-width: 0;
}

.req-cxs-detail-line {
    font-size: 0.85rem;
    line-height: 1.45;
}

.req-cxs-detail-line + .req-cxs-detail-line {
    margin-top: 0.35rem;
}

.req-cxs-detail-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.1rem;
}

.req-cxs-detail-value {
    display: block;
    color: var(--text);
    word-break: break-word;
}

.req-cxs-detail-value a {
    color: var(--accent);
}

.req-cxs-upload-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.req-cxs-upload-row input[type="file"] {
    flex: 1 1 12rem;
    min-width: 0;
    font-size: 0.85rem;
}

.req-cxs-evidence-status {
    margin-top: 0.35rem;
    font-size: 0.85rem;
    color: var(--success);
}

.req-cxs-evidence-status.is-error {
    color: var(--danger);
}

.req-cxs-evidence-link {
    display: inline-block;
    margin-top: 0.35rem;
    font-size: 0.85rem;
    color: var(--accent);
}

.panel-footer.req-new-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border);
    background: rgba(8, 25, 42, 0.65);
    border-radius: 0 0 var(--radius) var(--radius);
}

.alert-banner {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    border: 1px solid var(--border);
    background: rgba(8, 25, 45, 0.55);
    color: var(--text);
}

.alert-banner.alert-error {
    background: rgba(127, 29, 29, 0.45);
    color: #fecaca;
    border-color: rgba(248, 113, 113, 0.45);
}

.alert-banner.alert-success {
    background: rgba(6, 78, 59, 0.42);
    color: #a7f3d0;
    border-color: rgba(52, 211, 153, 0.38);
}

.req-recepcion-readonly {
    padding: 0.55rem 0.65rem;
    background: rgba(15, 35, 52, 0.72);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-weight: 500;
    color: var(--text);
}

.req-datalist-row {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
}

.req-datalist-row input[list],
.req-datalist-row select {
    flex: 1;
    min-width: 0;
}

.req-datalist-row .btn {
    flex-shrink: 0;
    white-space: nowrap;
}

.req-ips-modal-contacts-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.req-ips-modal-contacts-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text);
}

.req-ips-contact-table {
    font-size: 0.85rem;
}

.req-ips-contact-table th,
.req-ips-contact-table td {
    padding: 0.45rem 0.5rem;
    vertical-align: middle;
}

.req-ips-contact-table--modal th.req-ips-contact-actions,
.req-ips-contact-table--modal td:last-child {
    width: 4.75rem;
    text-align: right;
    white-space: nowrap;
}

.req-ips-contact-table .ips-cnt-cargo,
.req-ips-contact-table .ips-cnt-nombre,
.req-ips-contact-table .ips-cnt-tel,
.req-ips-contact-table .ips-cnt-mail {
    width: 100%;
    max-width: 100%;
    font: inherit;
    padding: 0.4rem 0.45rem;
    border: 1px solid var(--border);
    border-radius: 6px;
}

.req-ips-contact-empty {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.88rem;
    padding: 0.75rem 0.5rem !important;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0.35rem 0 0;
}

#tblDetalle .det-cantidad,
#tblDetalle .det-ref,
#tblDetalle .det-serial,
#tblDetalle .det-lote,
#tblDetalle .det-solicitud,
#tblDetalle .det-desc,
#tblDetalle .det-obvs {
    width: 100%;
    max-width: 100%;
    font: inherit;
    padding: 0.45rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: 6px;
}

.bo-det-table {
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    overflow: hidden;
    background: rgba(8, 22, 42, 0.65);
}

.bo-det-table thead th {
    background: rgba(3, 15, 30, 0.75);
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.bo-det-table tbody tr:hover {
    background: rgba(45, 212, 191, 0.06);
}

.bo-cant-input {
    width: 110% !important;
    min-width: 4.6rem;
}

.bo-datetime-wrap {
    margin-left: auto;
    display: grid;
    gap: 0.35rem;
    max-width: 13rem;
}

.bo-datetime-row {
    display: grid;
    grid-template-columns: 2.8rem 1fr;
    align-items: center;
    gap: 0.45rem;
}

.bo-datetime-row label {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.bo-datetime-row input[type="date"],
.bo-datetime-row input[type="time"] {
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--text);
    border: 1px solid rgba(94, 234, 212, 0.22);
    border-radius: 6px;
    background: rgba(3, 15, 35, 0.55);
    padding: 0.35rem 0.45rem;
    min-width: 0;
    box-shadow: none;
    outline: none;
}

@media (max-width: 720px) {
    .req-card-grid {
        grid-template-columns: 1fr;
    }

    .req-new-grid {
        grid-template-columns: 1fr;
    }

}
