/* Contabilidad: complementos de stylesOdoo.css */
.ct-in { border: 1px solid #ced4da; border-radius: 4px; padding: 4px 6px; font-size: .82rem; font-family: inherit; background: #fff; box-sizing: border-box; }
.ct-in:focus { outline: none; border-color: var(--o-purple, #714b67); box-shadow: 0 0 0 2px rgba(113, 75, 103, .15); }
.ct-in.num { text-align: right; }
.ct-del { border: 0; background: none; color: #b91c1c; font-size: 1.2rem; line-height: 1; cursor: pointer; padding: 0 6px; }
.ct-del:hover { color: #7f1111; }
.ct-totales { border-collapse: collapse; min-width: 300px; margin-top: 10px; font-size: .88rem; }
.ct-totales td { padding: 4px 10px; border-bottom: 1px solid #eee; }
.ct-totales td.num { text-align: right; font-variant-numeric: tabular-nums; }
.ct-totales tr.ct-total td { font-weight: 700; font-size: .95rem; border-top: 2px solid #714b67; border-bottom: 0; }
.o-lines-table td.num, .o-lines-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
/* Reportes */
.ct-rep { padding: 0 0 24px; background: var(--o-bg, #f9fafb); }
/* los filtros pasan a ser una franja de control como la de los informes de Odoo y el resto del contenido recibe margen lateral */
.ct-rep-filtros { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: end; margin: 0 0 12px; background: var(--o-bg-white, #fff); border-bottom: 1px solid var(--o-border-light, #e6e6e6); padding: 8px 16px 10px; }
.ct-rep-filtros label { display: block; font-size: .72rem; font-weight: 600; color: var(--o-text-muted, #6c757d); margin-bottom: 2px; }
.ct-rep > :not(.ct-rep-filtros) { margin-left: 16px; margin-right: 16px; }
.ct-rep-tabla { width: calc(100% - 32px); border-collapse: collapse; background: var(--o-bg-white, #fff); font-size: .8rem; border: 1px solid var(--o-border-light, #e6e6e6); }
.ct-rep-tabla th { background: var(--o-bg-white, #fff); font-weight: 600; text-align: left; padding: 7px 10px; border-bottom: 2px solid var(--o-border-table, #cfd4da); position: sticky; top: 0; white-space: nowrap; }
.ct-rep-tabla td { padding: 5px 10px; border-bottom: 1px solid var(--o-border-light, #eef0f2); }
.ct-rep-tabla tbody tr:nth-child(even) { background: var(--o-bg-row-even, #f8f9fa); }
.ct-rep-tabla tbody tr:hover { background: var(--o-row-hover, #eef5f7); }
.ct-rep-tabla .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ct-rep-tabla tr.ct-cuenta td { background: #f4f1f3 !important; font-weight: 700; }
.ct-rep-tabla tr.ct-total td { font-weight: 700; border-top: 2px solid var(--o-purple, #714b67); background: #f4f1f3 !important; }
.ct-rep-aviso { margin: 8px 16px; font-size: .8rem; color: var(--o-text-muted, #6c757d); }

/* ---- menú estilo Odoo: encabezados de grupo y entradas aún no construidas ---- */
.o-dropdown-header { padding: 8px 16px 3px; font-size: .72rem; font-weight: 600; color: var(--o-text-muted, #6b7280); text-transform: none; letter-spacing: .02em; }
.o-dropdown-menu .o-dropdown-header:not(:first-child) { margin-top: 4px; border-top: 1px solid var(--o-border, #e5e7eb); padding-top: 8px; }
.o-disabled { opacity: .45; cursor: not-allowed; pointer-events: auto; }
.o-nav-section.o-disabled { cursor: not-allowed; }
.o-mobile-drawer-header-sec { padding: 8px 16px 2px; font-size: .72rem; font-weight: 600; color: var(--o-text-muted, #6b7280); }

/* ---- Configuración ---- */
.ct-cfg { padding: 16px; max-width: 1100px; }
.ct-cfg h3 { font-size: .95rem; margin: 18px 0 8px; font-weight: 600; }
.ct-cfg-bar { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.ct-cfg-bar input[type=search] { flex: 1 1 220px; max-width: 320px; }
.ct-cfg table { width: 100%; border-collapse: collapse; background: var(--o-bg-white, #fff); font-size: .82rem; }
.ct-cfg th, .ct-cfg td { padding: 6px 10px; border-bottom: 1px solid var(--o-border, #e5e7eb); text-align: left; vertical-align: middle; }
.ct-cfg th { font-weight: 600; color: var(--o-text-muted, #6b7280); }
.ct-cfg tr.ct-fila { cursor: pointer; }
.ct-cfg tr.ct-fila:hover { background: rgba(113, 75, 103, .06); }
.ct-cfg .ct-num { text-align: right; font-variant-numeric: tabular-nums; }
.ct-set { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(160px, 1.2fr) auto; gap: 8px 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--o-border, #e5e7eb); }
.ct-set label { font-size: .82rem; }
.ct-set small { display: block; color: var(--o-text-muted, #6b7280); font-size: .72rem; }
.ct-set input, .ct-set textarea, .ct-modal input, .ct-modal select { width: 100%; padding: 4px 8px; border: 1px solid var(--o-border, #cbd5e1); border-radius: 4px; font-size: .82rem; box-sizing: border-box; }
.ct-set textarea { font-family: monospace; min-height: 90px; }
.ct-set .ct-acciones { display: flex; gap: 6px; }
.ct-mod { background: #fef3c7; color: #92400e; border-radius: 10px; padding: 0 7px; font-size: .68rem; margin-left: 6px; }
.ct-modal-fondo { position: fixed; inset: 0; background: rgba(0, 0, 0, .35); display: flex; align-items: center; justify-content: center; z-index: 2000; padding: 12px; }
.ct-modal { background: var(--o-bg-white, #fff); border-radius: 6px; width: 560px; max-width: 100%; max-height: 90vh; overflow: auto; padding: 16px 18px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.ct-modal h4 { margin: 0 0 10px; font-size: 1rem; }
.ct-modal .ct-campo { margin-bottom: 9px; }
.ct-modal .ct-campo label { display: block; font-size: .75rem; color: var(--o-text-muted, #6b7280); margin-bottom: 2px; }
.ct-modal .ct-pie { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
@media (max-width: 700px) { .ct-set { grid-template-columns: 1fr; } }

/* ---- panel de control de Odoo: las pantallas usan la clase o_control_panel (con guion bajo) y el CSS base solo definía o-control-panel ---- */
.o_control_panel {
  background: var(--o-bg-white);
  border-bottom: 1px solid var(--o-border-light);
  padding: 8px 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.o_content.ct-cfg { padding: 16px; max-width: none; }
.ct-cfg .btn { display: inline-flex; align-items: center; padding: 4px 12px; font-size: .8rem; border-radius: 4px; border: 1px solid var(--o-border, #cbd5e1); background: var(--o-bg-white, #fff); cursor: pointer; text-decoration: none; color: inherit; }
.ct-cfg .btn-primary, .ct-modal .btn-primary { background: var(--o-btn-primary-bg, #714b67); border-color: var(--o-btn-primary-bg, #714b67); color: #fff; }
.ct-cfg .btn-light, .ct-modal .btn-light { background: #f8f9fa; }
.ct-cfg .btn:disabled, .ct-modal .btn:disabled { opacity: .5; cursor: not-allowed; }
.ct-modal .btn { display: inline-flex; align-items: center; padding: 5px 14px; font-size: .82rem; border-radius: 4px; border: 1px solid var(--o-border, #cbd5e1); cursor: pointer; }

/* ---- botones, pestañas y barra de controles al estilo Odoo (las pantallas no cargan Bootstrap) ---- */
.btn { display: inline-flex; align-items: center; gap: 4px; padding: 5px 12px; font-family: var(--o-font, inherit); font-size: .8125rem; border-radius: 4px; border: 1px solid var(--o-border, #cbd5e1); background: #f8f9fa; color: var(--o-text, #212529); cursor: pointer; text-decoration: none; line-height: 1.4; white-space: nowrap; }
.btn:hover { background: #e9ecef; }
.btn-primary { background: var(--o-btn-primary-bg, #714b67); border-color: var(--o-btn-primary-bg, #714b67); color: #fff; }
.btn-primary:hover { filter: brightness(.92); background: var(--o-btn-primary-bg, #714b67); }
.btn-sm { padding: 3px 10px; font-size: .78rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.ct-barra { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ct-barra:empty { display: none; }
.ct-barra input, .ct-barra select { padding: 4px 8px; border: 1px solid var(--o-border, #cbd5e1); border-radius: 4px; font-size: .8rem; background: #fff; }
.ct-barra label { font-size: .8rem; display: inline-flex; align-items: center; gap: 6px; }
.ct-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--o-border, #dee2e6); width: 100%; margin-top: 2px; flex-wrap: wrap; }
.ct-tab { padding: 7px 16px; font-size: .82rem; color: var(--o-text-muted, #6c757d); text-decoration: none; border: 1px solid transparent; border-bottom: none; border-radius: 4px 4px 0 0; margin-bottom: -1px; white-space: nowrap; }
.ct-tab:hover { color: var(--o-text, #212529); }
.ct-tab.active { color: var(--o-text, #212529); background: var(--o-bg-white, #fff); border-color: var(--o-border, #dee2e6); font-weight: 500; }
.o_content.ct-cfg { background: var(--o-bg, #f9fafb); }
.o_content.ct-cfg h3 { font-size: .95rem; font-weight: 600; margin: 18px 0 8px; }

/* ---- Ajustes (como la página de ajustes de Odoo: barra lateral de secciones y bloques con una fila por ajuste) ---- */
.ct-ajustes { display: grid; grid-template-columns: 220px 1fr; min-height: 60vh; background: var(--o-bg-white, #fff); border: 1px solid var(--o-border-light, #e5e7eb); }
.ct-ajustes-nav { border-right: 1px solid var(--o-border-light, #e5e7eb); padding: 8px 0; background: #f8f9fa; }
.ct-ajustes-nav a { display: flex; justify-content: space-between; gap: 8px; padding: 9px 16px; font-size: .84rem; color: var(--o-text, #212529); text-decoration: none; border-left: 3px solid transparent; }
.ct-ajustes-nav a:hover { background: #eef0f2; }
.ct-ajustes-nav a.active { background: #fff; border-left-color: var(--o-purple, #714b67); font-weight: 600; }
.ct-ajustes-nav .n { color: var(--o-text-muted, #6c757d); font-weight: 400; }
.ct-ajustes-main { padding: 0 24px 24px; }
.ct-ajustes-main h2 { font-size: 1rem; font-weight: 600; margin: 0 -24px 0; padding: 10px 24px; background: #f1ecef; color: var(--o-purple, #714b67); }
.ct-set-fila { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(200px, 1fr); gap: 4px 24px; padding: 12px 0; border-bottom: 1px solid var(--o-border-light, #eef0f2); align-items: start; }
.ct-set-fila label { font-size: .85rem; font-weight: 600; }
.ct-set-fila .ayuda { font-size: .76rem; color: var(--o-text-muted, #6c757d); font-weight: 400; display: block; margin-top: 2px; }
.ct-set-fila input, .ct-set-fila textarea { width: 100%; padding: 3px 4px; border: none; border-bottom: 1px solid var(--o-border, #ced4da); background: transparent; font-size: .85rem; box-sizing: border-box; }
.ct-set-fila input:focus, .ct-set-fila textarea:focus { outline: none; border-bottom-color: var(--o-purple, #714b67); }
.ct-set-fila textarea { font-family: monospace; min-height: 90px; border: 1px solid var(--o-border, #ced4da); }
.ct-set-fila.cambiado input, .ct-set-fila.cambiado textarea { background: #fff8e1; }
.ct-set-fila .reset { font-size: .72rem; margin-top: 3px; }
@media (max-width: 800px) { .ct-ajustes { grid-template-columns: 1fr; } .ct-ajustes-nav { display: flex; overflow-x: auto; } }
