/* ============================================================================
 * inka-base.css — Base propia token-based (Fase 2 del desacople de Limitless).
 *
 * REEMPLAZA a bootstrap.min.css + core.min.css + components.min.css cuando se
 * active (Fase 3, bajo flag). Reimplementa la estructura/clases que el markup
 * existente usa (grid, forms, buttons, panels, tables, dropdowns, tabs, labels,
 * alerts, modal, helpers) con la MISMA nomenclatura Bootstrap 3 / Limitless, para
 * ser drop-in. Colores desde los tokens de global_style.css → dark-aware.
 *
 * Specs base fieles al vendor: form-control/btn 36px alto, padding 7px 12px,
 * font 13px, radius 3px; panel radius 3px; breakpoints BS3 (sm768/md992/lg1200).
 * SIN !important (nada que sobrescribir una vez retirado el vendor).
 * ==========================================================================*/

/* ------------------------------------------------------------------ Reset */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--app-font-family, "Plus Jakarta Sans", sans-serif);
  font-size: 13px;
  line-height: 1.5384616;
  color: var(--ui-text, #333);
  background: var(--bg-page, #f4f6f8);
  overflow-x: hidden; /* contiene los márgenes negativos de .row sin scroll horizontal */
}
a { color: var(--ui-accent, #ff6b00); text-decoration: none; }
a:hover, a:focus { color: var(--ui-accent-hover, #ff7a1a); text-decoration: none; }
img { max-width: 100%; height: auto; border: 0; }
button, input, select, textarea { font-family: inherit; font-size: inherit; line-height: inherit; }
h1,h2,h3,h4,h5,h6 { margin: 0 0 10px; font-weight: 600; line-height: 1.2; }

/* ------------------------------------------------------------------ Grid */
.container { margin: 0 auto; padding: 0 15px; }
.container-fluid { margin: 0 auto; padding: 0 15px; }
@media (min-width: 768px)  { .container { width: 750px; } }
@media (min-width: 992px)  { .container { width: 970px; } }
@media (min-width: 1200px) { .container { width: 1170px; } }

.row { margin-left: -15px; margin-right: -15px; }
.row::before, .row::after,
.clearfix::before, .clearfix::after { content: " "; display: table; }
.row::after, .clearfix::after { clear: both; }

[class*="col-"] { position: relative; min-height: 1px; padding-left: 15px; padding-right: 15px; }

/* xs (siempre) */
.col-xs-1{width:8.33333333%}.col-xs-2{width:16.66666667%}.col-xs-3{width:25%}
.col-xs-4{width:33.33333333%}.col-xs-5{width:41.66666667%}.col-xs-6{width:50%}
.col-xs-7{width:58.33333333%}.col-xs-8{width:66.66666667%}.col-xs-9{width:75%}
.col-xs-10{width:83.33333333%}.col-xs-11{width:91.66666667%}.col-xs-12{width:100%}
[class*="col-xs-"]{float:left}
.col-xs-offset-0{margin-left:0}.col-xs-offset-1{margin-left:8.33333333%}
.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-3{margin-left:25%}
.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-6{margin-left:50%}

@media (min-width: 768px) {
  [class*="col-sm-"]{float:left}
  .col-sm-1{width:8.33333333%}.col-sm-2{width:16.66666667%}.col-sm-3{width:25%}
  .col-sm-4{width:33.33333333%}.col-sm-5{width:41.66666667%}.col-sm-6{width:50%}
  .col-sm-7{width:58.33333333%}.col-sm-8{width:66.66666667%}.col-sm-9{width:75%}
  .col-sm-10{width:83.33333333%}.col-sm-11{width:91.66666667%}.col-sm-12{width:100%}
  .col-sm-offset-0{margin-left:0}.col-sm-offset-1{margin-left:8.33333333%}
  .col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-3{margin-left:25%}
  .col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-6{margin-left:50%}
}
@media (min-width: 992px) {
  [class*="col-md-"]{float:left}
  .col-md-1{width:8.33333333%}.col-md-2{width:16.66666667%}.col-md-3{width:25%}
  .col-md-4{width:33.33333333%}.col-md-5{width:41.66666667%}.col-md-6{width:50%}
  .col-md-7{width:58.33333333%}.col-md-8{width:66.66666667%}.col-md-9{width:75%}
  .col-md-10{width:83.33333333%}.col-md-11{width:91.66666667%}.col-md-12{width:100%}
  .col-md-offset-0{margin-left:0}.col-md-offset-1{margin-left:8.33333333%}
  .col-md-offset-2{margin-left:16.66666667%}.col-md-offset-3{margin-left:25%}
  .col-md-offset-4{margin-left:33.33333333%}.col-md-offset-6{margin-left:50%}
}
@media (min-width: 1200px) {
  [class*="col-lg-"]{float:left}
  .col-lg-1{width:8.33333333%}.col-lg-2{width:16.66666667%}.col-lg-3{width:25%}
  .col-lg-4{width:33.33333333%}.col-lg-5{width:41.66666667%}.col-lg-6{width:50%}
  .col-lg-7{width:58.33333333%}.col-lg-8{width:66.66666667%}.col-lg-9{width:75%}
  .col-lg-10{width:83.33333333%}.col-lg-11{width:91.66666667%}.col-lg-12{width:100%}
  .col-lg-offset-0{margin-left:0}.col-lg-offset-1{margin-left:8.33333333%}
  .col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-3{margin-left:25%}
  .col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-6{margin-left:50%}
}

/* ---- Shell: padding del área de contenido (spec Limitless .content) ---- */
.content { padding: 0 20px 60px; }
.content::after { content: ''; display: table; clear: both; }
.img-circle { border-radius: 50%; }
.img-rounded { border-radius: 4px; }

/* ------------------------------------------------------------------ Forms */
.form-group { margin-bottom: 20px; }
label { display: inline-block; margin-bottom: 5px; font-weight: 500; }
.control-label, .label-form { font-weight: 600; color: var(--ui-text-secondary, #555); }

.form-control {
  display: block; width: 100%; height: 36px; padding: 7px 12px;
  font-size: 13px; line-height: 1.5384616;
  color: var(--ui-text, #333);
  background-color: var(--ui-input-bg, var(--input-bg, #fff));
  border: 1px solid var(--ui-border, #ddd);
  border-radius: 3px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
textarea.form-control { height: auto; }
.form-control::placeholder { color: var(--ui-text-muted, #999); }
.form-control:focus {
  outline: 0;
  border-color: var(--ui-accent, #ff6b00);
  box-shadow: 0 0 0 3px var(--ui-accent-soft, rgba(255,107,0,.14));
}
.form-control[disabled], .form-control[readonly], fieldset[disabled] .form-control {
  background-color: var(--ui-surface-soft, #f5f5f5); cursor: not-allowed; opacity: 1;
}

.has-feedback { position: relative; }
.has-feedback .form-control { padding-right: 40px; }
.has-feedback-left .form-control { padding-right: 12px; padding-left: 40px; }
.form-control-feedback {
  position: absolute; top: 0; right: 0; width: 36px; height: 36px;
  line-height: 36px; text-align: center; pointer-events: none; color: var(--ui-text-muted, #999);
}
.has-feedback-left .form-control-feedback { right: auto; left: 0; }

/* input-group */
.input-group { position: relative; display: table; border-collapse: separate; width: 100%; }
.input-group .form-control { position: relative; z-index: 2; display: table-cell; width: 100%; margin-bottom: 0; }
.input-group-addon, .input-group-btn { display: table-cell; width: 1%; white-space: nowrap; vertical-align: middle; }
.input-group-addon {
  padding: 7px 12px; font-size: 13px; text-align: center;
  color: var(--ui-text-secondary, #555);
  background-color: var(--ui-surface-soft, #f5f5f5);
  border: 1px solid var(--ui-border, #ddd);
}
.input-group .form-control:first-child, .input-group-addon:first-child { border-top-left-radius: 3px; border-bottom-left-radius: 3px; }
.input-group .form-control:last-child, .input-group-addon:last-child { border-top-right-radius: 3px; border-bottom-right-radius: 3px; }
.input-group-addon:not(:first-child):not(:last-child), .input-group .form-control:not(:first-child):not(:last-child) { border-radius: 0; }

/* checkbox / radio */
.checkbox, .radio { position: relative; display: block; margin-top: 10px; margin-bottom: 10px; }
.checkbox label, .radio label { min-height: 20px; padding-left: 20px; margin-bottom: 0; font-weight: 400; cursor: pointer; }
.checkbox input[type="checkbox"], .radio input[type="radio"] { position: absolute; margin-top: 4px; margin-left: -20px; }

/* ------------------------------------------------------------------ Buttons */
.btn {
  display: inline-block; margin-bottom: 0; font-weight: 500; text-align: center;
  white-space: nowrap; vertical-align: middle; touch-action: manipulation; cursor: pointer;
  padding: 7px 12px; font-size: 13px; line-height: 1.5384616; border-radius: 3px;
  border: 1px solid transparent; user-select: none;
  transition: color .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.btn:hover, .btn:focus { text-decoration: none; }
.btn:focus, .btn:active:focus { outline: 0; box-shadow: 0 0 0 3px var(--ui-accent-soft, rgba(255,107,0,.14)); }
.btn[disabled], fieldset[disabled] .btn { cursor: not-allowed; opacity: .65; box-shadow: none; }
.btn-lg { padding: 10px 18px; font-size: 15px; border-radius: 4px; }
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 3px; }
.btn-xs { padding: 3px 7px; font-size: 11px; border-radius: 3px; }
.btn-block { display: block; width: 100%; }
.btn-rounded { border-radius: 100px; }
.btn-icon { padding-left: 10px; padding-right: 10px; }

.btn-default {
  color: var(--ui-text, #333);
  background-color: var(--ui-surface, #fff);
  border-color: var(--ui-border, #ddd);
}
.btn-default:hover, .btn-default:focus, .btn-default:active {
  background-color: var(--ui-surface-muted, var(--bg-hover, #f5f5f5));
  border-color: var(--ui-border-strong, #ccc);
  color: var(--ui-text, #333);
}
.btn-primary  { color: #fff; background-color: var(--ui-accent, #ff6b00); border-color: var(--ui-accent, #ff6b00); }
.btn-primary:hover, .btn-primary:focus, .btn-primary:active { background-color: var(--ui-accent-hover, #ff7a1a); border-color: var(--ui-accent-hover, #ff7a1a); color: #fff; }
.btn-success  { color: #fff; background-color: var(--ui-success, #22c55e); border-color: var(--ui-success, #22c55e); }
.btn-success:hover, .btn-success:focus, .btn-success:active { filter: brightness(1.05); color: #fff; }
.btn-danger   { color: #fff; background-color: var(--ui-danger, #ef4444); border-color: var(--ui-danger, #ef4444); }
.btn-danger:hover, .btn-danger:focus, .btn-danger:active { filter: brightness(1.05); color: #fff; }
.btn-warning  { color: #fff; background-color: var(--ui-warning, #f59e0b); border-color: var(--ui-warning, #f59e0b); }
.btn-warning:hover, .btn-warning:focus, .btn-warning:active { filter: brightness(1.05); color: #fff; }
.btn-info     { color: #fff; background-color: var(--ui-info, #38bdf8); border-color: var(--ui-info, #38bdf8); }
.btn-info:hover, .btn-info:focus, .btn-info:active { filter: brightness(1.05); color: #fff; }
.btn-link { color: var(--ui-accent, #ff6b00); background: transparent; border-color: transparent; }
.btn-link:hover, .btn-link:focus { text-decoration: underline; background: transparent; }
.btn-flat { background: transparent; border-color: transparent; box-shadow: none; }
.border-primary.text-primary { color: var(--ui-accent, #ff6b00); border-color: var(--ui-accent, #ff6b00); }

/* ------------------------------------------------------------------ Panels / cards */
.panel {
  margin-bottom: 20px;
  background-color: var(--ui-surface, #fff);
  border: 1px solid var(--ui-border, #e5e7eb);
  border-radius: 3px;
  box-shadow: var(--ui-shadow-card, 0 1px 2px rgba(0,0,0,.05));
}
.panel-flat, .panel-white { box-shadow: none; }
.panel-body { padding: 20px; }
.panel-heading { padding: 15px 20px; border-bottom: 1px solid var(--ui-border, #e5e7eb); border-top-left-radius: 2px; border-top-right-radius: 2px; }
.panel-footer { padding: 15px 20px; border-top: 1px solid var(--ui-border, #e5e7eb); background-color: var(--ui-surface-soft, #f9fafb); }
.panel-title { margin: 0; font-size: 14px; font-weight: 600; color: var(--ui-text, #333); }

/* ------------------------------------------------------------------ Tables */
.table { width: 100%; max-width: 100%; margin-bottom: 20px; background-color: transparent; border-collapse: collapse; }
.table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th,
.table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td {
  padding: 12px 15px; vertical-align: middle; border-top: 1px solid var(--ui-border, #eee);
  color: var(--ui-text, #333);
}
.table > thead > tr > th { vertical-align: bottom; border-bottom: 2px solid var(--ui-border, #eee); font-weight: 600; color: var(--ui-text-secondary, #555); }
.table-condensed > thead > tr > th, .table-condensed > tbody > tr > td { padding: 6px 10px; }
.table-bordered, .table-bordered > thead > tr > th, .table-bordered > tbody > tr > td { border: 1px solid var(--ui-border, #eee); }
.table-striped > tbody > tr:nth-of-type(odd) { background-color: var(--ui-surface-soft, #f9fafb); }
.table-hover > tbody > tr:hover { background-color: var(--bg-hover, rgba(0,0,0,.03)); }
.table-responsive { min-height: .01%; overflow-x: auto; }

/* ------------------------------------------------------------------ Dropdowns */
.dropdown, .dropup { position: relative; }
.dropdown-toggle .caret { display: inline-block; width: 0; height: 0; margin-left: 4px; vertical-align: middle; border-top: 4px dashed; border-right: 4px solid transparent; border-left: 4px solid transparent; }
.dropdown-menu {
  position: absolute; top: 100%; left: 0; z-index: 1000; display: none; float: left;
  min-width: 180px; padding: 6px 0; margin: 4px 0 0; list-style: none; font-size: 13px; text-align: left;
  background-color: var(--dropdown-bg, var(--ui-surface, #fff));
  border: 1px solid var(--ui-border, #e5e7eb); border-radius: 6px;
  box-shadow: var(--ui-shadow-soft, 0 6px 18px rgba(0,0,0,.12)); background-clip: padding-box;
}
.dropdown-menu.dropdown-menu-right { left: auto; right: 0; }
.dropdown-menu > li > a { display: block; padding: 8px 16px; clear: both; font-weight: 400; line-height: 1.5; color: var(--ui-text, #333); white-space: nowrap; }
.dropdown-menu > li > a:hover, .dropdown-menu > li > a:focus { background-color: var(--ui-menu-item-hover-bg, rgba(255,107,0,.1)); color: var(--ui-text, #333); text-decoration: none; }
.dropdown-menu .divider { height: 1px; margin: 6px 0; overflow: hidden; background-color: var(--ui-border, #e5e7eb); }
.open > .dropdown-menu { display: block; }

/* ------------------------------------------------------------------ Nav tabs */
.nav { padding-left: 0; margin-bottom: 0; list-style: none; }
/* .icons-list: lista de acciones/íconos inline (base heredada de Limitless). */
.icons-list { margin: 0; padding: 0; list-style: none; display: inline-block; }
.icons-list > li { display: inline-block; vertical-align: middle; }
.nav-tabs { border-bottom: 1px solid var(--ui-border, #e5e7eb); }
.nav-tabs > li { display: inline-block; margin-bottom: -1px; }
.nav-tabs > li > a { display: block; padding: 10px 16px; margin-right: 2px; line-height: 1.5; color: var(--ui-text-secondary, #555); border: 1px solid transparent; border-radius: 4px 4px 0 0; }
.nav-tabs > li > a:hover { border-color: transparent; color: var(--ui-accent, #ff6b00); }
.nav-tabs > li.active > a, .nav-tabs > li.active > a:hover, .nav-tabs > li.active > a:focus {
  color: var(--ui-accent, #ff6b00);
  background-color: var(--ui-surface, #fff);
  border-color: var(--ui-border, #e5e7eb) var(--ui-border, #e5e7eb) transparent;
  cursor: default;
}
.tab-content > .tab-pane { display: none; }
.tab-content > .active { display: block; }

/* ---- Navigation accordion: chevron de submenús (.has-ul) ---- */
/* Base heredada de Limitless: glifo icomoon \e9c7, rota 90° cuando el li está activo. */
.navigation li > a { position: relative; }
.navigation li > .has-ul:after {
  content: "\e9c7"; font-family: "icomoon"; font-size: 16px;
  display: block; position: absolute; top: 50%; margin-top: -8px; right: 20px;
  line-height: 1; transform: rotate(0deg); transition: transform .2s ease-in-out;
  -webkit-font-smoothing: antialiased;
}
.navigation li.active > .has-ul:after { transform: rotate(90deg); }

/* ------------------------------------------------------------------ Labels / badges */
.label { display: inline; padding: .2em .6em .3em; font-size: 75%; font-weight: 600; line-height: 1; color: #fff; text-align: center; white-space: nowrap; vertical-align: baseline; border-radius: .25em; }
.badge { display: inline-block; min-width: 10px; padding: 3px 7px; font-size: 12px; font-weight: 600; line-height: 1; color: #fff; text-align: center; white-space: nowrap; vertical-align: middle; background-color: var(--ui-text-muted, #999); border-radius: 10px; }
.label-default, .badge-default { background-color: var(--ui-text-muted, #999); }
.label-primary { background-color: var(--ui-accent, #ff6b00); }
.label-success { background-color: var(--ui-success, #22c55e); }
.label-danger  { background-color: var(--ui-danger, #ef4444); }
.label-warning { background-color: var(--ui-warning, #f59e0b); }
.label-info    { background-color: var(--ui-info, #38bdf8); }

/* ------------------------------------------------------------------ Alerts */
.alert { padding: 12px 16px; margin-bottom: 20px; border: 1px solid transparent; border-radius: 4px; }
.alert-success { color: var(--ui-success, #16a34a); background-color: var(--ui-success-soft, rgba(34,197,94,.12)); border-color: var(--ui-success, #22c55e); }
.alert-danger  { color: var(--ui-danger, #dc2626); background-color: var(--ui-danger-soft, rgba(239,68,68,.12)); border-color: var(--ui-danger, #ef4444); }
.alert-warning { color: var(--ui-warning, #d97706); background-color: var(--ui-warning-soft, rgba(245,158,11,.12)); border-color: var(--ui-warning, #f59e0b); }
.alert-info    { color: var(--ui-info, #0ea5e9); background-color: var(--ui-info-soft, rgba(56,189,248,.12)); border-color: var(--ui-info, #38bdf8); }

/* ------------------------------------------------------------------ Modal */
.modal-open { overflow: hidden; }
.modal { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 1050; display: none; overflow: hidden auto; outline: 0; }
.modal.in { display: block; }
.modal.fade .modal-dialog { transform: translateY(-25%); transition: transform .3s ease-out; }
.modal.in .modal-dialog { transform: translateY(0); }
.modal-dialog { position: relative; width: auto; margin: 30px auto; max-width: 600px; }
.modal-lg { max-width: 900px; }
.modal-sm { max-width: 400px; }
.modal-content {
  position: relative; background-color: var(--modal-bg, var(--ui-surface, #fff));
  border: 1px solid var(--modal-border, var(--ui-border, #e5e7eb)); border-radius: 8px;
  box-shadow: var(--ui-shadow-soft, 0 12px 40px rgba(0,0,0,.25)); outline: 0;
}
.modal-header { padding: 16px 20px; border-bottom: 1px solid var(--ui-border, #e5e7eb); }
.modal-header .close { float: right; font-size: 22px; line-height: 1; color: var(--ui-text-muted, #999); background: transparent; border: 0; cursor: pointer; opacity: .7; }
.modal-header .close:hover { opacity: 1; }
.modal-title { margin: 0; font-size: 16px; font-weight: 600; color: var(--ui-text, #333); }
.modal-body { position: relative; padding: 20px; }
.modal-footer { padding: 16px 20px; text-align: right; border-top: 1px solid var(--ui-border, #e5e7eb); }
.modal-backdrop { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 1040; background-color: #000; }
.modal-backdrop.fade { opacity: 0; }
.modal-backdrop.in { opacity: .5; }

/* ------------------------------------------------------------------ Helpers */
.clearfix::before, .clearfix::after { content: " "; display: table; }
.clearfix::after { clear: both; }
.pull-left { float: left; }
.pull-right { float: right; }
.center-block { display: block; margin-left: auto; margin-right: auto; }
.hide, .hidden { display: none; }
.show { display: block; }
.invisible { visibility: hidden; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-justify { text-align: justify; }
.text-nowrap { white-space: nowrap; }
.text-uppercase { text-transform: uppercase; }
.text-lowercase { text-transform: lowercase; }
.text-bold { font-weight: 700; }
.text-semibold { font-weight: 600; }
.text-regular { font-weight: 400; }
.position-left { margin-right: 6px; }
.position-right { margin-left: 6px; }
.no-margin { margin: 0; }
.no-padding { padding: 0; }

/* Responsive visibility (BS3) */
@media (max-width: 767px) { .hidden-xs { display: none; } }
@media (min-width: 768px) and (max-width: 991px) { .hidden-sm { display: none; } }
@media (min-width: 992px) and (max-width: 1199px) { .hidden-md { display: none; } }
@media (min-width: 1200px) { .hidden-lg { display: none; } }
