/*
  vinOS — CSS principal v3
  Bootstrap 5.3 + layout idéntico al original + responsive
  Paleta: vino #836167, fondos #f4f0ef/#f9f9f9, grises originales
*/

/* ── Variables ──────────────────────────────────────────────────── */
:root {
  --vino:          #836167;
  --vino-dark:     #5a4040;
  --vino-light:    #c4a4a4;
  --vino-pale:     #f5eeed;
  --text:          #2c2c2c;
  --text-muted:    #9a9a9a;
  --border:        #dadada;
  --bg:            #f4f0ef;
  --bg-content:    #f9f9f9;
  --white:         #fff;
  --ok:            #3a7d44;
  --ok-bg:         #e8f5eb;
  --error:         #c0392b;
  --error-bg:      #fdecea;
  --warning-c:     #856404;
  --warning-bg:    #fff3cd;
  --radius:        3px;
  --shadow:        0 2px 4px rgba(0,0,0,.12);
  --sidebar-w:     175px;
  --sidebar-w-sm:  52px;
}

/* ── Reset ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0; padding: 0;
  font-family: 'Open Sans', sans-serif;
  font-size: 14px; line-height: 1.5;
  color: var(--text); background: var(--bg);
}
a { color: var(--vino); text-decoration: none; }
a:hover { color: var(--vino-dark); text-decoration: underline; }
h1,h2,h3,h4 { margin: 0; }
ul { list-style: none; margin: 0; padding: 0; }

/* ── Bootstrap 5 overrides — mantiene paleta vino ──────────────── */
.btn-primary  { background-color: var(--vino) !important; border-color: var(--vino) !important; }
.btn-primary:hover { background-color: var(--vino-dark) !important; border-color: var(--vino-dark) !important; }
.text-primary { color: var(--vino) !important; }
.bg-primary   { background-color: var(--vino) !important; }
.border-primary { border-color: var(--vino) !important; }
.nav-pills .nav-link.active  { background-color: var(--vino); }
.nav-link { color: var(--vino); }
.nav-link:hover { color: var(--vino-dark); }
.form-control:focus, .form-select:focus {
  border-color: var(--vino);
  box-shadow: 0 0 0 .2rem rgba(131,97,103,.2);
}

/* ── Top panel ──────────────────────────────────────────────────── */
.top_panel {
  background: var(--vino); color: #fff;
  font-size: 12px; height: 38px; position: fixed; top: 0; width: 100%; z-index: 100;
}
.top_panel .container-fluid {
  display: flex; align-items: center;
  justify-content: space-between; height: 100%; padding: 0 16px;
}
.top_panel .user { display: flex; align-items: center; gap: 7px; }
.top_panel .user img { opacity: .9; }
.top_panel .user .label { font-size: 12px; color: #fff; }
.top_links { display: flex; margin: 0; padding: 0; }
.top_panel .user a,
.top_links li a {
  display: flex; align-items: center; gap: 5px;
  padding: 0 10px; height: 38px; color: #fff;
  font-size: 12px; white-space: nowrap; transition: background .12s;
}
.top_panel .user a,
.top_links li a:hover { background: var(--vino-dark); text-decoration: none; color: #fff; }
.small_count {
  background: #fff; color: var(--vino);
  border-radius: 10px; padding: 1px 5px;
  font-size: 10px; font-weight: 700;
}
.ano_selector {
  padding: 0 8px; border: none;
  background: var(--vino-dark); color: #fff;
  font-size: 13px; cursor: pointer; height: 38px;
}
.ano_selector:focus { outline: none; }

/* ── Main header ────────────────────────────────────────────────── */
.main_header {
  background: var(--white);
  border-bottom: 3px solid var(--vino);
  margin-top: 38px;
  box-shadow: var(--shadow); position: relative; z-index: 99;
}
.main_header .container-fluid {
  display: flex; align-items: center;
  justify-content: space-between; padding: 10px 16px;
}
.logo a { text-decoration: none; }
.logo h1 {
  font-family: 'Oswald', sans-serif;
  font-size: 26px; color: var(--text); font-weight: 600; line-height: 1;
}
.logo h1 span { color: var(--vino); }
.logo h2 { font-size: 10px; color: var(--text-muted); font-weight: 400; }

/* Module nav buttons */
.top_buttons { display: flex; flex-direction: row-reverse; gap: 4px; margin: 0; padding: 0; }
.big_button .out_border {
  border: 2px solid var(--border); border-radius: var(--radius);
  transition: border-color .15s;
}
.big_button:hover .out_border,
.big_button.active .out_border { border-color: var(--vino); }
.big_button .button_wrapper { padding: 2px; }
.big_button .in_border { border: 1px solid transparent; border-radius: 2px; padding: 3px 10px; }
.big_button.active .in_border { border-color: var(--vino-light); background: var(--vino-pale); }
.the_button { display: flex; align-items: center; justify-content: center; }
.big_button .i_32_escritorio,
.big_button .i_32_seguimiento { opacity: .55; }
.big_button:hover .i_32_escritorio, .big_button:hover .i_32_seguimiento,
.big_button.active .i_32_escritorio,.big_button.active .i_32_seguimiento { opacity: 1; }

/* Hamburger */
#sidebar-toggler {
  display: none; background: none; border: none; cursor: pointer; padding: 6px; color: var(--text);
}
#sidebar-toggler .navbar-toggler-icon {
  display: block; width: 22px; height: 2px; background: var(--text);
  box-shadow: 0 6px 0 var(--text), 0 12px 0 var(--text);
}

/* ── Flash messages ─────────────────────────────────────────────── */
.flash_messages { padding: 6px 16px; }
.msg { padding: 10px; border-radius: var(--radius); margin-bottom: 15px; font-size: 13px; font-weight: 500; display: flex; align-items: anchor-center }
.msg_ok      { background: var(--ok-bg);     color: var(--ok);       border-left: 4px solid var(--ok); }
.msg_error   { background: var(--error-bg);  color: var(--error);    border-left: 4px solid var(--error); }
.msg_warning { background: var(--warning-bg);color: var(--warning-c);border-left: 4px solid #ffc107; }
.msg_info    { background: #e8f0fe; color: #1a56a0; border-left: 4px solid #1a56a0; }
.msg i {margin-right: 10px;}

/* ── App body ───────────────────────────────────────────────────── */
.app_body {
  display: flex; align-items: flex-start;
  max-width: 1800px; margin: 0 auto 50px;
  padding: 16px; gap: 0; position: relative;
}

/* ── Sidebar ────────────────────────────────────────────────────── */
aside.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  position: sticky; top: 10px; align-self: flex-start;
}
.small_menu { display: none; padding: 10px 8px; }
.menu_small_buttons {
  display: flex; flex-wrap: wrap; gap: 6px; justify-content: center;
}
.menu_small_buttons li { border: 1px solid var(--border); border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow); }
.menu_small_buttons li a { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: var(--radius); }
.menu_small_buttons li a:hover { background: var(--vino-pale); }
.menu_small_buttons li a.smActive { background: var(--border); }

/* Tab nav — idéntico al original */
/* Bootstrap reset override: asegurar que li del sidebar es list-item normal */
.tab_nav { padding: 5px 0 5px 5px; margin: 0; list-style: none; }
.tab_nav > li {
  display: list-item;           /* Bootstrap no lo toque */
  list-style: none;
  width: calc(var(--sidebar-w) - 4px);
  /* background-image la pone icons.css via li.i_32_* */
  background-repeat: no-repeat;
  background-position: 10px 26px;
  cursor: pointer;
}
.tab_nav > li > a {
  /* Flexbox column: icono a la izquierda (via background), textos centrados verticalmente */
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 82px; width: 100%;
  text-decoration: none; color: inherit;
  padding: 0;
}
.tab_nav > li > a:hover { text-decoration: none; }
.tab_nav > li .tab_label {
  display: block;
  height: 20px; line-height: 20px;   /* fixed — Bootstrap cannot expand */
  padding-left: 50px;
  font-size: 13px; font-weight: 600; color: var(--text);
  overflow: hidden; white-space: nowrap;
}
.tab_nav > li .tab_info {
  display: block;
  height: 18px; line-height: 18px;
  padding-left: 50px; padding-top: 3px;
  font-size: 11px; color: var(--vino-light);
  overflow: hidden; white-space: nowrap;
}
.tab_nav > li.active_tab {
  background-color: var(--bg-content);
  border-radius: 3px 0 0 3px;
  border: 1px solid var(--border); border-right-color: var(--bg-content);
  box-shadow: 0 2px 4px rgba(0,0,0,.10);
  margin-right: -1px; z-index: 1; position: relative;
}
.tab_nav > li.active_tab .tab_label { color: var(--vino); }
.tab_nav > li:not(.active_tab):hover {
  background-color: rgba(131,97,103,.06);
  border-radius: 3px 0 0 3px;
}

/* ── Contents area ──────────────────────────────────────────────── */
.contents_area {
  flex: 1; min-width: 0;
  background: var(--bg-content);
  border: 1px solid var(--border);
  border-radius: 0 3px 3px 3px;
  box-shadow: var(--shadow); padding: 20px 24px 28px;
}
.no_sidebar .contents_area { border-radius: 3px; max-width: 1040px; margin: 0 auto; }

/* ── Page header ────────────────────────────────────────────────── */
.page_header {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--border);
}
.page_header h2 {
  font-family: 'Oswald', sans-serif;
  /*font-size: 20px; */
  font-weight: 400; color: var(--text); flex: 1;
}
.page_header.has_icon h2 {
  padding-left: 40px; background-repeat: no-repeat; background-position: 0 center;
}
.page_header h3 {
  font-family: 'Oswald', sans-serif;
  font-size: 18px; font-weight: 400; flex: 1;
}
.header_actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Buttons ────────────────────────────────────────────────────── */
.btn_primary,.btn_secondary,.btn_danger,.btn_warning,.btn_ok,.btn_sm,.btn_lg,.btn_action {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 14px; border-radius: var(--radius);
  font-size: 13px; font-weight: 600; cursor: pointer;
  border: 1px solid transparent; white-space: nowrap;
  transition: opacity .12s; text-decoration: none;
}
.btn_primary   { background: var(--vino);      color: #fff; border-color: var(--vino); }
.btn_secondary { background: var(--white);     color: var(--text); border-color: var(--border); }
.btn_danger    { background: var(--error);     color: #fff; border-color: var(--error); }
.btn_warning   { background: #e09c00;          color: #fff; border-color: #e09c00; }
.btn_ok        { background: var(--ok);        color: #fff; border-color: var(--ok); }
.btn_action    { background: var(--vino-pale); color: var(--vino-dark); border-color: var(--vino-light); }
.btn_sm        { padding: 3px 9px; font-size: 12px; }
.btn_lg        { padding: 10px 22px; font-size: 15px; }
.btn_primary:hover,.btn_danger:hover,.btn_ok:hover,.btn_warning:hover { opacity: .85; text-decoration: none; color: #fff; }
.btn_secondary:hover { background: var(--bg); text-decoration: none; }
.btn_action:hover    { background: var(--vino); color: #fff; text-decoration: none; }
.simple_buttons { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ── Tables ─────────────────────────────────────────────────────── */
.data_table { width: 100%; border-collapse: collapse; background: var(--white); margin-bottom: 20px; }
.data_table th { background: var(--vino); color: #fff; padding: 9px 11px; text-align: left; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.data_table td { padding: 8px 11px; border-bottom: 1px solid var(--border); font-size: 13px; }
.data_table tr:last-child td { border-bottom: none; }
.data_table tr:hover td { background: var(--vino-pale); }
.data_table_sm th,.data_table_sm td { padding: 5px 9px; font-size: 12px; }
.data_table_wrapper { overflow-x: auto; margin-bottom: 20px; }
.empty { color: var(--text-muted); font-style: italic; text-align: center; padding: 20px !important; }
.row_descalificada td { opacity: .5; text-decoration: line-through; }

/* ── Badges ──────────────────────────────────────────────────────── */
.badge { display: inline-block; padding: 2px 7px; border-radius: 10px; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.badge_ok     { background: var(--ok-bg);    color: var(--ok); }
.badge_danger { background: var(--error-bg); color: var(--error); }

/* ── Stats cards ─────────────────────────────────────────────────── */
.stats_grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat_card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; display: flex; flex-direction: column; align-items: center; gap: 4px;
  text-align: center; color: var(--text); transition: border-color .15s;
}
.stat_card:hover { border-color: var(--vino-light); text-decoration: none; }
.stat_num   { font-family: 'Oswald', sans-serif; font-size: 30px; color: var(--vino); line-height: 1; }
.stat_label { font-size: 12px; color: var(--text-muted); }
.stat_icon  { width: 32px; height: 32px; background-size: contain; background-repeat: no-repeat; background-position: center; }

/* ── Ficha grid ──────────────────────────────────────────────────── */
.ficha_grid { display: grid; grid-template-columns: 1fr 1fr 220px; gap: 18px; margin-bottom: 20px; }
.ficha_col  { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.stat_col   { text-align: center; }
.big_stat   { font-family: 'Oswald', sans-serif; font-size: 48px; color: var(--vino); line-height: 1; }
.big_stat span { font-size: 18px; color: var(--text-muted); }
.stat_sub   { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.data_list  { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; font-size: 13px; }
.data_list dt { font-weight: 600; color: var(--text-muted); white-space: nowrap; }
.data_list dd { color: var(--text); margin: 0; }

/* ── Forms ───────────────────────────────────────────────────────── */
.form_standard { background: var(--white); padding: 22px; border-radius: var(--radius); border: 1px solid var(--border); }
fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; margin-bottom: 18px; }
legend { font-weight: 700; font-size: 12px; color: var(--vino); padding: 0 6px; }
.field_row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.field_row label { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 150px; font-size: 13px; font-weight: 600; color: var(--text-muted); }
.field_row input,.field_row select,.field_row textarea,label>input,label>select,label>textarea {
  padding: 7px 9px; border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 13px; font-family: inherit; color: var(--text); background: var(--white); transition: border-color .12s;
}
label>input:focus,label>select:focus,label>textarea:focus,.field_row input:focus,.field_row select:focus {
  outline: none; border-color: var(--vino);
}label>input:disabled,label>select:disabled,label>textarea:disabled,.field_row input:disabled,.field_row select:disabled {
  background: var(--border)
}
.checkboxes { align-items: center; flex-direction: row; flex-wrap: wrap; gap: 14px; }
.checkboxes label { flex-direction: row; align-items: center; gap: 5px; min-width: auto; font-weight: 400; color: var(--text); }
.form_actions { display: flex; gap: 8px; align-items: center; padding-top: 14px; border-top: 1px solid var(--border); margin-top: 6px; }
.errorlist { color: var(--error); font-size: 12px; margin-top: 4px; }

/* ── Confirm box ──────────────────────────────────────────────────── */
.confirm_box { max-width: 520px; margin: 0 auto; background: var(--white); padding: 28px; border: 1px solid var(--border); border-radius: var(--radius); text-align: center; }
.confirm_box h2 { font-size: 18px; margin-bottom: 10px; }
.confirm_box p  { color: var(--text-muted); margin-bottom: 18px; }
.confirm_box form { display: flex; gap: 10px; justify-content: center; }

/* ── Charts ───────────────────────────────────────────────────────── */
.chart_section { background: var(--white); padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); }
.chart_section h3 { font-size: 12px; font-weight: 700; color: var(--text-muted); margin-bottom: 10px; text-transform: uppercase; }
.chart_section_sm { max-width: 380px; }

/* ── Quick nav ────────────────────────────────────────────────────── */
.quick_nav { background: var(--white); padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); }
.quick_nav h3 { font-size: 12px; font-weight: 700; color: var(--text-muted); margin-bottom: 10px; text-transform: uppercase; }
.quick_links { display: flex; flex-wrap: wrap; gap: 8px; }

/* ── Login ────────────────────────────────────────────────────────── */
.login_body { background: var(--vino-dark); min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login_box { background: var(--white); border-radius: 4px; padding: 36px; box-shadow: 0 6px 28px rgba(0,0,0,.28); }
.login_logo { text-align: center; margin-bottom: 24px; }
.login_logo h1 { font-family: 'Oswald', sans-serif; font-size: 68px; }
.login_logo h1 span { color: var(--vino); }
.login_logo h2 { font-size: 11px; color: var(--text-muted); }
.login_form .field_group { margin-bottom: 14px; }
.login_form label { display: block; font-weight: 600; margin-bottom: 3px; font-size: 13px; }
.login_form input { width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 14px; }
.login_form input:focus { outline: none; border-color: var(--vino); }
.login_actions { display: flex; gap: 8px; margin-top: 18px; }
.login_actions .btn_primary  { flex: 2; text-align: center; padding: 10px; font-size: 14px; display: block; }
.login_actions .btn_secondary{ flex: 1; text-align: center; padding: 10px; display: block; }

/* ── Misc ─────────────────────────────────────────────────────────── */
.alta_paso { background: var(--white); padding: 20px; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 16px; }
.alta_paso h3 { font-size: 15px; margin-bottom: 14px; color: var(--vino); }
.viticultor_header { background: var(--vino-pale); border: 1px solid var(--vino-light); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 18px; font-size: 14px; }
.cv_badge { background: var(--vino); color: #fff; border-radius: 3px; padding: 2px 9px; font-family: 'Oswald', sans-serif; font-size: 15px; margin-right: 8px; }
.cv_input_big { display: flex; gap: 10px; align-items: flex-end; margin-bottom: 18px; }
.input_cv_big { font-size: 1.8rem; padding: 10px 14px; width: 160px; border: 2px solid var(--border); border-radius: var(--radius); font-family: 'Oswald', sans-serif; }
.notif_list { }
.notif_item { background: var(--white); padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 6px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.notif_item.leido { opacity: .6; }
.notif_meta { font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.notif_msg  { flex: 1; font-size: 13px; }
.consulta_form_section { background: var(--white); padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 20px; }
.consulta_form_section textarea { width: 100%; padding: 9px; border: 1px solid var(--border); border-radius: var(--radius); font-family: monospace; font-size: 13px; }
.consulta_display { background: #f8f8f8; padding: 10px 14px; border-radius: var(--radius); border-left: 4px solid var(--vino); margin-bottom: 14px; }
.consulta_display code { font-size: 12px; white-space: pre-wrap; }
.consulta_list li { background: var(--white); padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 5px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.consulta_fecha { font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.consulta_sql { flex: 1; font-size: 12px; font-family: monospace; background: #f4f4f4; padding: 2px 7px; border-radius: 3px; }
.historico_ano { background: var(--white); padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 14px; }
.historico_ano h3 { font-size: 17px; margin-bottom: 10px; }
#mapa_sigpac { height: 340px; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 18px; }

.chart_section h3,
.ficha_col h3,
.quick_nav h3 { font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 10px; border-bottom: 1px solid var(--border); padding-bottom: 6px; }

/* ── Footer ───────────────────────────────────────────────────────── */
footer { background: var(--white); border-top: 1px solid var(--border); padding: 14px 0; text-align: center; position: fixed; bottom: 0; width: 100%; z-index: 1000; }
.copyright { font-size: 12px; color: var(--text-muted); }

/* ══════════════════════════════════════════════
   RESPONSIVE — fiel al comportamiento original
   ══════════════════════════════════════════════ */

/* ≥1025px — sidebar completo con texto */
/*@media (min-width: 1025px) {*/
/*  .app_body { max-width: 1280px; }*/
/*}*/

/* 768–1024px — sidebar solo iconos */
@media (max-width: 1024px) {
  aside.sidebar { width: var(--sidebar-w-sm); }
  .tab_nav > li {
    width: calc(var(--sidebar-w-sm) - 2px);
    background-position: center center !important;
    background-size: 26px !important;
  }
  .tab_nav > li > a { height: 52px; }
  .tab_nav > li .tab_label,
  .tab_nav > li .tab_info { display: none !important; }
  .ficha_grid { grid-template-columns: 1fr 1fr; }
  .ficha_col.stat_col { grid-column: span 2; }
}

/* ≤767px — hamburger, sidebar offcanvas, small_menu visible */
@media (max-width: 767px) {
  .top_panel .user .label { display: none; }
  .top_links li a .label  { display: none; }
  #sidebar-toggler { display: block; }
  aside.sidebar {
    position: fixed; top: 0; left: -220px; bottom: 0;
    width: 200px; z-index: 1050;
    background: var(--white); border-right: 1px solid var(--border);
    box-shadow: 2px 0 8px rgba(0,0,0,.18);
    transition: left .22s ease; overflow-y: auto;
  }
  aside.sidebar.open { left: 0; }
  .small_menu { display: block; }
  .tab_nav > li { width: 196px; background-position: 10px 26px!important; }
  .tab_nav > li > a { height: 82px; }
  .tab_nav > li .tab_label,
  .tab_nav > li .tab_info { display: block!important; }
  .app_body { padding: 8px 10px 40px; flex-direction: column; }
  .contents_area { border-radius: var(--radius); width: 100%; }
  .ficha_grid { grid-template-columns: 1fr; }
  .stats_grid { grid-template-columns: repeat(2, 1fr); }
  .field_row  { flex-direction: column; }
  .sidebar-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.45); z-index: 1040;
  }
  .sidebar-overlay.open { display: block; }
}

/* ≤479px */
@media (max-width: 479px) {
  .stats_grid { grid-template-columns: 1fr 1fr; }
  .big_stat   { font-size: 36px; }
  .data_table th,.data_table td { padding: 6px 7px; font-size: 12px; }
  .main_header .container-fluid { flex-wrap: wrap; gap: 6px; }
  .top_buttons { flex-wrap: wrap; justify-content: center; }
  .quick_stats_row { gap: 8px; }
}

.bi {
  font-size: 15px;
  line-height: 0;
}

/* ── Escritorio tabs ── */
.esk_tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
  gap: 0;
  overflow-x: auto;
}

.esk_tab_btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px 8px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  font-family: 'Open Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: color .13s, border-color .13s;
}

.esk_tab_btn:hover {
  color: var(--vino);
  border-bottom-color: var(--vino-light);
}

.esk_tab_btn.active {
  color: var(--vino);
  border-bottom-color: var(--vino);
}

.esk_pane {
  display: none;
}

.esk_pane.active {
  display: block;
}

/* Stats grandes — fieles al original (.big_stats) */
.quick_stats_row {
  display: flex;
  flex-wrap: wrap;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  margin-bottom: 16px;
  overflow: hidden;
}

.quick_stats {
  flex: 1;
  min-width: 120px;
  text-align: center;
  padding: 18px 10px;
  border-right: 1px solid var(--border);
}

.quick_stats:last-child {
  border-right: none;
}

.quick_stats a {
  text-decoration: none;
  color: inherit;
}

.quick_stats a:hover .big_stats {
  color: var(--vino-dark);
}

.big_stats {
  font-family: 'Oswald', sans-serif;
  font-size: 52px;
  font-weight: 400;
  color: var(--vino);
  line-height: 1;
  margin-bottom: 4px;
}

.stats_info {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.separator {
  border: none;
  border-top: 1px solid var(--border);
  margin: 16px 0 8px;
}

#mapa_sigpac {
  height: 400px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 24px;
  border: 1px solid var(--border);
}