/* Estilo tipo Odoo 18 con la paleta Montana (montana_setup/static/src/scss/primary_variables.scss). */
:root {
  --acero: #26343C;          /* barra superior */
  --primario: #0077B6;       /* botones, links */
  --primario-hover: #00649a;
  --celeste: #00AAF0;        /* acento */
  --fondo: #f9fafb;
  --hoja: #ffffff;
  --borde: #d8dadd;
  --texto: #374151;
  --texto-suave: #6b7280;
  --peligro-bg: #f8d7da; --peligro-tx: #842029;
  --aviso-bg: #fff3cd;   --aviso-tx: #664d03;
  --info-bg: #cff4fc;    --info-tx: #055160;
  --exito-bg: #d1e7dd;   --exito-tx: #0f5132;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--fondo); color: var(--texto);
  font: 14px/1.5 -apple-system, "Segoe UI", Roboto, Ubuntu, "Noto Sans", "Liberation Sans", Arial, sans-serif;
}
[hidden] { display: none !important; }

/* Barra superior */
.o_navbar { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 12px; background: var(--acero); color: #fff; }
.o_apps { display: inline-flex; padding: 6px; opacity: .9; }
.o_logo { height: 36px; width: auto; padding-right: 8px; border-right: 1px solid rgba(255,255,255,.15); }
.o_app_name { font-size: 16px; font-weight: 500; padding: 0 6px; }
.o_menu_sections span { display: inline-block; line-height: 46px; padding: 0 10px; }
.o_menu_sections .active { box-shadow: inset 0 -3px 0 var(--celeste); }

.o_banner { background: var(--aviso-bg); color: var(--aviso-tx); text-align: center; padding: 4px 16px; font-size: 13px; }

/* Panel de control (breadcrumb + botones) */
.o_control_panel { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 16px; background: var(--hoja); border-bottom: 1px solid var(--borde); }
.o_breadcrumb { font-size: 18px; }
.o_bc_parent { color: var(--primario); }
.o_bc_sep { margin: 0 6px; color: var(--texto-suave); }
.o_cp_buttons { display: flex; flex-wrap: wrap; gap: 6px; }

.btn { font: inherit; border: 1px solid transparent; border-radius: 4px; padding: 5px 12px; cursor: pointer; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--primario); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--primario-hover); }
.btn-secondary { background: #e7e9ed; color: #111827; }
.btn-secondary:hover:not(:disabled) { background: #d8dadd; }
.btn-link { background: none; color: var(--primario); padding: 4px 0; }
.btn:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--celeste); outline-offset: 1px; }

/* Hoja del formulario */
.o_form_sheet_bg { padding: 16px; }
.o_form_sheet { max-width: 1140px; margin: 0 auto; background: var(--hoja); border: 1px solid var(--borde); border-radius: 4px; padding: 16px 24px 24px; }
.o_statusbar { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.badge { display: inline-block; border-radius: 10px; padding: 2px 10px; font-size: 12px; font-weight: 500; }
.text-bg-warning { background: var(--aviso-bg); color: var(--aviso-tx); }
.text-bg-info { background: var(--info-bg); color: var(--info-tx); }

.alert { border-radius: 4px; padding: 10px 14px; margin-bottom: 12px; }
.alert-danger { background: var(--peligro-bg); color: var(--peligro-tx); }

.o_group { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.o_inner_group { display: grid; grid-template-columns: minmax(140px, 40%) 1fr; align-items: center; gap: 6px 12px; padding: 4px 0; }
.o_inner_group label, .o_inner_group .lbl { font-weight: 500; color: #111827; }
.o_inner_group input[type=number], .o_inner_group input[type=text], .o_inner_group select {
  width: 100%; font: inherit; color: inherit; background: transparent;
  border: 0; border-bottom: 1px solid var(--borde); padding: 3px 2px; border-radius: 0;
}
.o_inner_group input:hover:not([readonly]), .o_inner_group select:hover { border-bottom-color: var(--primario); }
input[readonly] { color: var(--texto-suave); border-bottom-color: transparent !important; }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--primario); }

.o_horizontal_separator { font-size: 15px; font-weight: 600; color: #111827; border-bottom: 1px solid var(--borde); padding: 18px 0 4px; margin-bottom: 6px; }
.o_hint { margin: 2px 0 6px; color: var(--texto-suave); font-size: 12px; }

/* Lista editable */
.o_list_wrap { overflow-x: auto; }
.o_list_table { width: 100%; border-collapse: collapse; }
.o_list_table th { text-align: left; font-weight: 600; border-bottom: 1px solid var(--borde); padding: 6px; white-space: nowrap; }
.o_list_table td { border-bottom: 1px solid #eef0f2; padding: 2px 6px; }
.o_list_table tfoot td { border-bottom: 0; }
.o_list_table .num { width: 110px; text-align: right; }
.o_list_table .del { width: 36px; }
.o_list_table input { width: 100%; font: inherit; color: inherit; border: 0; background: transparent; padding: 5px 2px; }
.o_list_table td.num input { text-align: right; }
.o_list_table tbody tr:hover { background: #f3f4f6; }
.o_list_table input:focus { background: #fff; outline: 1px solid var(--celeste); }
.o_list_table input.invalido { background: var(--peligro-bg); }
.btn-del { background: none; border: 0; color: var(--texto-suave); cursor: pointer; padding: 2px 8px; font-size: 22px; line-height: 1; }
.btn-del:hover { color: var(--peligro-tx); }

.o_diagram { margin-top: 12px; overflow-x: auto; border: 1px solid var(--borde); border-radius: 4px; padding: 8px; background: #fff; }
.btn-pdf { display: inline-flex; align-items: center; gap: 6px; }
.o_pdf_cta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 12px; }
.o_pdf_cta .o_hint { margin: 0; }
.o_diagram img { display: block; max-width: 100%; height: auto; }

@media (max-width: 760px) {
  .o_menu_sections, .o_app_name { display: none; }
  .o_form_sheet_bg { padding: 0; }
  .o_form_sheet { border: 0; border-radius: 0; padding: 12px 16px 20px; }
  .o_control_panel { padding: 10px 16px; }
  .o_group { grid-template-columns: 1fr; }
  .o_list_table .num { width: 72px; }
}
