/*** General QOL ***/
*, *::after, *::before {
  box-sizing: border-box;
  box-sizing: border-box;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-kerning: auto; }

html {
  font-family: sans-serif;
  -ms-text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  font-size: 17px;
  line-height: 1.7; }

body {
  margin: 0; }

/* Reset focus outline */
:focus { outline: none; }
::-moz-focus-inner { border: 0; }
* { -webkit-tap-highlight-color: transparent; }

/* Selection helper classes */
.noselect {
  -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; }
.allselect { -webkit-touch-callout: all; -webkit-user-select: all; -khtml-user-select: all; -moz-user-select: all; -ms-user-select: all; user-select: all;
}

/* ==========================================================
   Ajustes del proyecto SCP TecniPetrol
   Base tomada de Bonkr CSS: https://nicfontaine.com/dev/bonkr/
   Todo el sistema usa esta unica hoja de estilo.
   ========================================================== */

:root {
  --color-bg: #eef2f7;
  --color-panel: #ffffff;
  --color-sidebar: #172033;
  --color-sidebar-soft: #222d43;
  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-border: #d9e1ec;
  --color-text: #1f2937;
  --color-muted: #64748b;
  --shadow-panel: 0 10px 30px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: Arial, Helvetica, sans-serif;
  margin: 0;
}

a {
  color: inherit;
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

.app-sidebar {
  background: var(--color-sidebar);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  gap: 1rem;
  padding: 1.25rem;
  width: 260px;
}

.brand {
  align-items: center;
  display: flex;
  font-size: 1.25rem;
  font-weight: 700;
  gap: 0.75rem;
  text-decoration: none;
}

.brand img {
  background: #ffffff;
  border-radius: 50%;
  height: 48px;
  object-fit: cover;
  padding: 0.25rem;
  width: 48px;
}

.session-user {
  background: var(--color-sidebar-soft);
  border-radius: 0.45rem;
  font-size: 0.9rem;
  padding: 0.75rem;
}

.menu {
  display: grid;
  gap: 0.35rem;
}

.menu a,
.logout {
  border-radius: 0.45rem;
  color: #e5e7eb;
  padding: 0.7rem 0.8rem;
  text-decoration: none;
}

.menu a:hover,
.menu a.active {
  background: var(--color-primary);
  color: #ffffff;
}

.logout {
  background: #7f1d1d;
  margin-top: auto;
  text-align: center;
}

.app-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.app-header {
  align-items: center;
  background: var(--color-panel);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  padding: 1rem 1.5rem;
}

.app-header p {
  color: var(--color-muted);
  margin: 0 0 0.25rem;
}

.app-header h1 {
  font-size: 1.7rem;
  margin: 0;
}

.app-content {
  padding: 1.5rem;
}

.title {
  color: var(--color-text);
  font-size: 1.6rem;
  margin-top: 0;
}

.dashboard {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.card,
.panel,
.login-box {
  background: var(--color-panel);
  border: 1px solid var(--color-border);
  border-radius: 0.55rem;
  box-shadow: var(--shadow-panel);
}

.card {
  min-width: 210px;
  padding: 1.25rem;
}

.card h3,
.panel h3 {
  font-size: 1.1rem;
  margin-top: 0;
}

.card p {
  color: var(--color-primary);
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
}

.panel {
  margin-bottom: 1rem;
  overflow-x: auto;
  padding: 1.25rem;
}

.form,
.login-form {
  display: grid;
  gap: 0.85rem;
}

.form {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

label {
  color: var(--color-text);
  display: grid;
  font-weight: 700;
  gap: 0.35rem;
}

input,
select {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 0.4rem;
  color: var(--color-text);
  padding: 0.65rem 0.75rem;
  width: 100%;
}

input:focus,
select:focus {
  border-color: var(--color-primary);
  outline: 3px solid rgba(37, 99, 235, 0.16);
}

button,
.btn,
input[type="submit"] {
  background: var(--color-primary);
  border: 0;
  border-radius: 0.45rem;
  color: #ffffff;
  cursor: pointer;
  font-weight: 700;
  padding: 0.7rem 1rem;
}

button:hover,
.btn:hover,
input[type="submit"]:hover {
  background: var(--color-primary-dark);
}

table {
  background: #ffffff;
  border-collapse: collapse;
  min-width: 720px;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--color-border);
  padding: 0.75rem;
  text-align: left;
}

th {
  background: #f8fafc;
  color: var(--color-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
}

.fila {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.check-row {
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: 0.45rem;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: minmax(180px, 1.2fr) minmax(150px, 0.8fr) minmax(220px, 1fr);
  margin-bottom: 0.75rem;
  padding: 0.75rem;
}

.check-label {
  align-items: center;
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
  margin: 0;
}

.check-label input {
  width: auto;
}

.notice {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 0.45rem;
  color: #1e3a8a;
  margin-bottom: 1rem;
  padding: 0.8rem 1rem;
}

.notice.error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.login-screen {
  align-items: center;
  background:
    linear-gradient(rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.7)),
    url("../img/login.jpg");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  padding: 1rem;
}

.login-box {
  max-width: 380px;
  padding: 2rem;
  text-align: center;
  width: 100%;
}

.login-logo {
  background: #ffffff;
  border-radius: 50%;
  height: 84px;
  object-fit: cover;
  padding: 0.35rem;
  width: 84px;
}

.login-box h1 {
  font-size: 1.7rem;
  margin-bottom: 0.25rem;
}

.login-box p {
  color: var(--color-muted);
  margin-top: 0;
}

.login-form {
  text-align: left;
}

.login-form button {
  width: 100%;
}

@media (max-width: 820px) {
  .app-shell {
    display: block;
  }

  .app-sidebar {
    width: 100%;
  }

  .menu {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

  .logout {
    margin-top: 0;
  }
}

@media (max-width: 576px) {
  .app-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.5rem;
  }

  .app-content {
    padding: 1rem;
  }

  .fila {
    flex-direction: column;
  }

  .check-row {
    grid-template-columns: 1fr;
  }
}

/*** Reset from necolas, normalize.css ***/
article, aside, details, figcaption, figure, footer, header, main, menu, nav, section, summary { display: block; }
audio, canvas, progress, video { display: inline-block; }
audio:not([controls]) { display: none; height: 0; }
progress { vertical-align: baseline; }
template, [hidden] { display: none; }
button, input { overflow: visible; }
button, select { text-transform: none; }
button, html [type="button"], [type="reset"], [type="submit"] { -webkit-appearance: button; }
/* a:active, a:hover { outline-width: 0; } */
a { background-color: transparent; -webkit-text-decoration-skip: objects; }
abbr[title] { border-bottom: none; text-decoration: underline; text-decoration: underline dotted; }
b, strong { font-weight: inherit; }
b, strong { font-weight: bolder; }
dfn { font-style: italic; }
mark { background-color: #ff0; color: #000; }
small { font-size: 80%; }
sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; }
sub { bottom: -0.25em; }
sup { top: -0.5em; }
img { border-style: none; }
code, kbd, pre, samp { font-family: mo
  pace, monospace; font-size: 1em; }
figure { margin: 0 0 1em; }
optgroup { font-weight: bold; }
fieldset { margin: 0 2px; padding: 0.35em 0.625em 0.75em; }
legend { box-sizing: border-box; color: inherit; display: table; max-width: 100%; padding: 0; white-space: normal; }
textarea { overflow: auto; }
[type="checkbox"], [type="radio"] { box-sizing: border-box; padding: 0; }
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button { height: auto; }
[type="search"] { -webkit-appearance: textfield; outline-offset: -2px; }
[type="search"]::-webkit-search-cancel-button,
[type="search"]::-webkit-search-decoration { -webkit-appearance: none; }
::-webkit-input-placeholder { color: inherit; opacity: 0.54; }
::-webkit-file-upload-button { -webkit-appearance: button; font: inherit; }

/*** Generic Elements ***/
main { overflow-x: hidden; }

h1, h2, h3, h4, h5, h6 {
  /*line-height: 1.3rem;*/
  line-height: 1;
  margin-top: 0;
  position: relative; }

h1.underline, h2.underline, h3.underline, h4.underline, h5.underline, h6.underline {
  padding-bottom: 0.4rem; }

.loader {
  z-index: 500;
  background: #fff;
  pointer-events: none;
  opacity: 1;
  position: fixed;
  overflow: hidden;
  top: 0; right: 0; bottom: 0; left: 0;
  transition: none;
}

.loader.hide {
  transition: all 0.3s;
  opacity: 0;
  /* pointer-events: auto; */ }

.linker {
  position: absolute;
  transform: translateX(-100%);
  text-decoration: none;
  cursor: pointer;
  left: -0.6rem; }

h1 { font-size: 3.4rem; margin-bottom: 1.74rem; }
h2 { font-size: 2.8rem; margin-bottom: 1.74rem; }
h3 { font-size: 2.3rem; margin-bottom: 1.6rem; }
h4 { font-size: 1.7rem; margin-bottom: 1.4rem;}
h5 { font-size: 1.3rem; margin-bottom: 1.25rem; }
h6 { font-size: 1.1rem; margin-bottom: 1.1rem; }

hr {
  border: none;
  /*height: 2px;*/ height: 0.12rem;
  margin-top: 1.76rem;
  margin-bottom: 1.76rem; }

a { text-decoration: underline; font-weight: bold; position: relative; }
a, a:active, a:visited, a:hover { color: inherit;  }

a:hover { background: rgba(0,0,0,0.04); }
a:focus { outline: 2px solid rgba(0,0,0,0.6); text-decoration: none;}

/* Default Layout Styling for Semantic Elements */
article {
  margin: 2.5rem 0;
  background: rgba(0,0,0,0.063);
}

section {
  position: relative;
  margin: 0 auto;
  max-width: 1100px;
  padding: 1.76rem 2.35rem; }

p {
  margin-top: 0;
  margin-bottom: 1.3rem; }

p:last-child {
  margin-bottom: 0; }

blockquote {
  padding: 0.95rem;
  margin: 0 0 2rem;
  position: relative;
  padding-right: 2.94rem; }

blockquote.quote:before {
  content: '"';
  font-family: Verdana;
  font-weight: bold;
  position: absolute;
  right: 18px;
  top: 33px;
  font-size: 3em;
  line-height: 0;
  opacity: 0.3; }

blockquote p {
  font-style: italic; }

ul, ol { padding: 0; margin-left: 0.88rem;; margin-bottom: 1.76rem; }
ul { padding-left: 1rem; }
li { padding-bottom: 0.5rem; }
li:last-child { padding-bottom: 0; }
ol { padding-left: 1.25rem; }

img {
  display: block;
  width: 100%; }

svg {
  display: block;
  width: 100%;
  height: auto; }

iframe { border: none; }

figure.frame {
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/*** Tooltip ***/

.ttip {
  position: relative;
  display: inline-block;
}

.ttip-text {
  position: absolute;
  display: inline;
  pointer-events: none;
  background: rgba(0,0,0,0.8);
  color: #ddd;
  font-style: italic;
  white-space: nowrap;
  line-height: inherit;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  border-radius: 6px;
  padding: 0 6px;
  z-index: 200;
  opacity: 0; }

.ttip:hover .ttip-text {
  z-index: 100;
  opacity: 1; }

.ttip.t .ttip-text { top: 0; transform: translate(0,-100%); right: 0; left: 0; margin: 0 auto; }
.ttip.r .ttip-text { right: -0.3rem; transform: translate(100%,-100%); }
.ttip.b .ttip-text { bottom: 0; transform: translate(0,100%); right: 0; left: 0; margin: 0 auto; }
.ttip.l .ttip-text { left: -0.3rem; transform: translate(-100%,-100%); }

.ttip.tr .ttip-text { top: 0; right: 0; transform: translate(0%,-100%); }
.ttip.br .ttip-text { bottom: 0; right: 0; transform: translate(0%,100%); }
.ttip.bl .ttip-text { bottom: 0; left: 0; transform: translate(0%,100%); }
.ttip.tl .ttip-text { top: 0; left: 0; transform: translate(0%,-100%); }

/*** Tables ***/

table {
  /*border-collapse: collapse;*/
  width: 100%;
  text-align: left;
  border-spacing: 0; }

th, td {
  border-bottom: 1px solid #f2f2f2; }

tr:last-child td {
  border-bottom: none; }

th {
  font-size: 1.15rem; }

td, th {
  padding: 0.3rem .5rem;
  line-height: 1.45; }

td:first-child, th:first-child {
  padding-left: 0;  }

td:last-child, th:last-child {
  padding-right: 0;  }  

/* Alternating Background Colour */
/*tr:nth-child(odd) td {
  background: #f4f4f4; }*/

/*** Nav ***/
/*(NOTE) Add some default styling */
/*body > header { border-bottom: 1px solid #ccc; }*/
nav ul { list-style: none; margin: 0; padding: 0; }
nav ul li a { display: block; }

/*** Forms ***/
input[type='email'], input[type='number'], input[type='password'], input[type='search'], input[type='tel'], input[type='text'], input[type='url'], textarea, select, option {
  width: 100%;
  box-shadow: none;
  font-size: 1em;
  border: none;
  font-family: inherit;
  border-bottom: 3px solid;
  /* border-radius: 4px; */
  margin-bottom: 0.6rem;
  padding: .58rem; }

input[type='range'] {
  width: 100%;
  /*margin: 0;*/
}

/* select { padding: 0 .58rem; } */
select { padding: .58rem; }

textarea {
  min-height: 12rem;
  font-size: 1em;
  resize: vertical; }

input[type='checkbox'],
input[type='radio'] {
  margin-right: .95rem; }

label {
  font-weight: 600;
  letter-spacing: -1px;
  cursor: default;
  margin: 0; }

pre {
  tab-size: 2;
  white-space: pre-wrap; }

code {
  display: inline-block;
  padding: 0 4px;
  /* margin: 0 0.3rem; */
  font-weight: normal; /* in-case it's nested */
  line-height: 1.3rem;
  font-size: 0.9rem;
  border-radius: 3px; }

pre > code {
  display: block;
  padding: 1rem;
  margin: 0;
  white-space: pre-wrap; }

.tag {
  font-weight: bold; }

button, .btn, input[type='submit'] {
  display: inline-block;
  border: none;
  cursor: pointer;
  line-height: 1rem;
  font-size: 1rem;
  padding: .5rem 1rem;
  color: inherit;
  -webkit-appearance: none;
  -moz-appearance: none;
  font-family: inherit;
  font-weight: bold; }

/* Begin Basic Button Styling */
button, .btn, input[type='submit'] {
  outline: 1px solid rgba(0,0,0,0.1);
  outline-offset: -1px;
  background: rgba(0,0,0,0.04); }
button:focus, .btn:focus, input[type='submit']:focus, button:hover, .btn:hover, input[type='submit']:hover {
  background:  rgba(0,0,0,0.06); }
button:focus, .btn:focus, input[type='submit']:focus {
  outline: 2px solid rgba(0,0,0,0.6);
  outline-offset: -2px; }
button:disabled, a.disabled, input[type='submit']:disabled, button:hover:disabled, a.disabled:hover, input[type='submit']:hover:disabled, button:active:disabled, a.disabled:active, input[type='submit']:active:disabled {
  border: none;
  cursor: not-allowed; }
/* a.btn {
  outline: none;
} */
/* End Basic Button Styling */

.btn, .btn:hover, .btn:focus { text-decoration: none; display: inline-block; }

::-webkit-input-placeholder {
  font-style: italic;
  opacity: 0.5; }
:-moz-placeholder {
  font-style: italic;  
  opacity: 0.5; }
::-moz-placeholder {
  font-style: italic;  
  opacity: 0.5; }
:-ms-input-placeholder {  
  font-style: italic; 
  opacity: 0.5; }

/*(NOTE) Can we just do this instead? */
::-webkit-input-placeholder, :-moz-placeholder, ::-moz-placeholder, :-ms-input-placeholder {
  font-style: italic;
  opacity: 0.5; }

/*** BW Styling ***/
h1.underline, h2.underline, h3.underline, h4.underline, h5.underline, h6.underline {
  border-bottom: 2px solid rgba(0,0,0,0.05); }

hr {
  background: rgba(0,0,0,0.06); }

::selection { background: rgba(0,0,0,0.15); }
::-moz-selection { background: rgba(0,0,0,0.15); }

/* Redefine base focus style */
/*a:focus {
  background: #eee; }*/

a.linker { color: rgba(0,0,0,0.06); }
a.linker:hover { color: rgba(0,0,0,0.1); }
a.linker:before { display: none; } /* turn off :before underline;
/*(NOTE) Add :before to linker w/ paragraph symbol */

/*** Form Inputs ***/
input[type='checkbox']:focus, input[type='radio']:focus {
  box-shadow: 0 0 3px rgba(0,0,0,0.6); } 

input[type='email'], input[type='number'], input[type='password'], input[type='search'], input[type='tel'], input[type='text'], input[type='url'], textarea, select, option {
  background-color: #f6f6f6;
  border-color: #ddd; }

input[type='email']:hover, input[type='number']:hover, input[type='password']:hover, input[type='search']:hover, input[type='tel']:hover, input[type='text']:hover, input[type='url']:hover, textarea:hover, select:hover, option:hover {  
  background-color: #f3f3f3;
  border-color: #c8c8c8; }

input[type='email']:focus, input[type='number']:focus, input[type='password']:focus, input[type='search']:focus, input[type='tel']:focus, input[type='text']:focus, input[type='url']:focus, textarea:focus, select:focus, option:focus {
  background-color: #f0f0f0;
  border-color: #aaa;
}

/*** Opinionated Text Colours (Comment out if interfering) ***/
body, h1, h2, h3, h4, h5, h6 {
  color: #222; }

blockquote {
  background: rgba(0,0,0,0.06);
  border-left: 6px solid #d2d2d2;
  color: #444; }

code {
  background: rgba(0,0,0,0.07); }

pre > code {
  background: #444;
  color: #f0f0f0;
  /* background-size: 15px 15px; */
  /* background-image: linear-gradient(to right, #4c4c4c 1px, transparent 1px), linear-gradient(to bottom, #4c4c4c 1px, transparent 1px); */
  border-left: 6px solid #666; }

pre > code .tag {
  color: #9f9f9f }

/* pre {
  background: #eee;
  box-shadow: inset 0 1px 8px rgba(0,0,0,0.08); } */

section, article, aside, sidebar {
  color: #3a3a3a; }

/*** Text Styles ***/
.text-normal { font-weight: initial; font-style: initial; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-code { font-family: 'Courier New'; }
.text-bold { font-weight: bold; }
.text-italic { font-style: italic; }
.text-up { text-transform: uppercase; }
.text-small { font-size: 0.93rem; }
.text-smaller { font-size: 0.85rem; }
.text-smallest { font-size: 0.7rem; }
.text-ul { text-decoration: underline; }

/* (NOTE) Need to Re-style */
.text-key {
  padding: 7px 9px;
  border-radius: 3px;
  background: #ccc;
  /*box-shadow: inset 0 0 6px #eee;*/
  border-bottom: 2px solid #888;
  border-top: 2px solid #999;
  border-right: 4px solid #999;
  border-left: 5px solid #a9a9a9;
  border-bottom: 7px solid #777;
  border-radius: 5px;
  background: #d4d4d4;
  font-size: 15px;
  /*box-shadow: 0 1px 5px rgba(0,0,0,0.5);*/
  color: #fff;
  font-weight: bold;
  text-shadow: 0 0 2px rgba(0,0,0,0.2); }

/*** Border Radius ***/
.rnd-2 { border-radius: 2px; }
.rnd-3 { border-radius: 3px; }
.rnd-4 { border-radius: 4px; }
.rnd-5 { border-radius: 5px; }
.rnd-6 { border-radius: 6px; }
.rnd-7 { border-radius: 7px; }
.rnd-8 { border-radius: 8px; }
.rnd-9 { border-radius: 9px; }
.rnd-10 { border-radius: 10px; }
.rnd-pct-50 { border-radius: 50%; } /* Circle */

/*** Templating --- Position ***/
.pos-abs-center {
  position: absolute;
  right: 0; left: 0;
  margin: 0 auto;
  top: 50%;
  transform: translateY(-50%); }
.pos-abs { position: absolute; }
.pos-rel { position: relative; }
.pos-fixed { position: fixed; }
.pos-all-0 { top: 0; right: 0; bottom: 0; left: 0; }

/*** Templating --- Display ***/
.d-block, button.d-block, .btn.d-block, .input[type='submit'].d-block { display: block; }
code.d-block { margin-right: 0; margin-left: 0; }
.d-table { display: table; }

/*** Templating --- Float ***/
.flt-l { float: left; }
.flt-r { float: right; }
.flt-clr { display: table; clear: both; content: ''; }

/*** Templating --- Padding ***/
.pd-a-0 { padding: 0; }
.pd-a-1, .pd-ch-1 > * { padding: 0.3rem; }
.pd-a-2, .pd-ch-2 > * { padding: 0.59rem; }
.pd-a-3, .pd-ch-3 > * { padding: 0.88rem; }
.pd-a-4, .pd-ch-4 > * { padding: 1.18rem; }
.pd-a-5, .pd-ch-5 > * { padding: 1.47rem;}
.pd-a-6, .pd-ch-6 > * { padding: 1.76rem; }
.pd-a-7, .pd-ch-7 > * { padding: 2.06rem; }
.pd-a-8, .pd-ch-8 > * { padding: 2.35rem; }

.pd-t-0 { padding-top: 0; }
.pd-t-1 { padding-top: 0.3rem; }
.pd-t-2 { padding-top: 0.59rem; }
.pd-t-3 { padding-top: 0.88rem; }
.pd-t-4 { padding-top: 1.18rem; }
.pd-t-5 { padding-top: 1.47rem;}
.pd-t-6 { padding-top: 1.76rem; }
.pd-t-7 { padding-top: 2.06rem; }
.pd-t-8 { padding-top: 2.35rem; }

.pd-r-0 { padding-right: 0; }
.pd-r-1 { padding-right: 0.3rem; }
.pd-r-2 { padding-right: 0.59rem; }
.pd-r-3 { padding-right: 0.88rem; }
.pd-r-4 { padding-right: 1.18rem; }
.pd-r-5 { padding-right: 1.47rem;}
.pd-r-6 { padding-right: 1.76rem; }
.pd-r-7 { padding-right: 2.06rem; }
.pd-r-8 { padding-right: 2.35rem; }

.pd-b-0 { padding-bottom: 0; }
.pd-b-1 { padding-bottom: 0.3rem; }
.pd-b-2 { padding-bottom: 0.59rem; }
.pd-b-3 { padding-bottom: 0.88rem; }
.pd-b-4 { padding-bottom: 1.18rem; }
.pd-b-5 { padding-bottom: 1.47rem;}
.pd-b-6 { padding-bottom: 1.76rem; }
.pd-b-7 { padding-bottom: 2.06rem; }
.pd-b-8 { padding-bottom: 2.35rem; }

.pd-l-0 { padding-left: 0; }
.pd-l-1 { padding-left: 0.3rem; }
.pd-l-2 { padding-left: 0.59rem; }
.pd-l-3 { padding-left: 0.88rem; }
.pd-l-4 { padding-left: 1.18rem; }
.pd-l-5 { padding-left: 1.47rem;}
.pd-l-6 { padding-left: 1.76rem; }
.pd-l-7 { padding-left: 2.06rem; }
.pd-l-8 { padding-left: 2.35rem; }

/*** Templating --- Margin ***/
.mg-0-auto { margin: 0 auto; }
.mg-a-0, .mg-ch-a-0 > * { margin: 0; }
.mg-l-auto { margin-left: auto; }
.mg-r-auto { margin-right: auto; }
.mg-t-auto { margin-top: auto; }
.mg-b-auto { margin-bottom: auto; }

.mg-a-1 { margin: 0.3rem; }
.mg-a-2 { margin: 0.59rem; }
.mg-a-3 { margin: 0.88rem; }
.mg-a-4 { margin: 1.18rem; }
.mg-a-5 { margin: 1.47rem;}
.mg-a-6 { margin: 1.76rem; }
.mg-a-7 { margin: 2.06rem; }
.mg-a-8 { margin: 2.35rem; }

.mg-t-0 { margin-top: 0; }
.mg-t-1 { margin-top: 0.3rem; }
.mg-t-2 { margin-top: 0.59rem; }
.mg-t-3 { margin-top: 0.88rem; }
.mg-t-4 { margin-top: 1.18rem; }
.mg-t-5 { margin-top: 1.47rem;}
.mg-t-6 { margin-top: 1.76rem; }
.mg-t-7 { margin-top: 2.06rem; }
.mg-t-8 { margin-top: 2.35rem; }

.mg-r-0 { margin-right: 0; }
.mg-r-1 { margin-right: 0.3rem; }
.mg-r-2 { margin-right: 0.59rem; }
.mg-r-3 { margin-right: 0.88rem; }
.mg-r-4 { margin-right: 1.18rem; }
.mg-r-5 { margin-right: 1.47rem;}
.mg-r-6 { margin-right: 1.76rem; }
.mg-r-7 { margin-right: 2.06rem; }
.mg-r-8 { margin-right: 2.35rem; }

.mg-b-0 { margin-bottom: 0; }
.mg-b-1 { margin-bottom: 0.3rem; }
.mg-b-2 { margin-bottom: 0.59rem; }
.mg-b-3 { margin-bottom: 0.88rem; }
.mg-b-4 { margin-bottom: 1.18rem; }
.mg-b-5 { margin-bottom: 1.47rem;}
.mg-b-6 { margin-bottom: 1.76rem; }
.mg-b-7 { margin-bottom: 2.06rem; }
.mg-b-8 { margin-bottom: 2.35rem; }

.mg-l-0 { margin-left: 0; }
.mg-l-1 { margin-left: 0.3rem; }
.mg-l-2 { margin-left: 0.59rem; }
.mg-l-3 { margin-left: 0.88rem; }
.mg-l-4 { margin-left: 1.18rem; }
.mg-l-5 { margin-left: 1.47rem;}
.mg-l-6 { margin-left: 1.76rem; }
.mg-l-7 { margin-left: 2.06rem; }
.mg-l-8 { margin-left: 2.35rem; }

/*** Width Helper ***/
.w-full { width: 100%; max-width: none; }
/*button.w-full, input[type='submit'].w-full { display: block; }*/

/*** Templating --- Max Width ***/
.w-mx-100 { max-width: 100px; }
.w-mx-150 { max-width: 150px; }
.w-mx-200 { max-width: 200px; }
.w-mx-250 { max-width: 250px; }
.w-mx-300 { max-width: 300px; }
.w-mx-350 { max-width: 350px; }
.w-mx-400 { max-width: 400px; }
.w-mx-450 { max-width: 450px; }
.w-mx-500 { max-width: 500px; }
.w-mx-550 { max-width: 550px; }
.w-mx-600 { max-width: 600px; }
.w-mx-650 { max-width: 650px; }
.w-mx-700 { max-width: 700px; }
.w-mx-750 { max-width: 750px; }
.w-mx-800 { max-width: 800px; }
.w-mx-850 { max-width: 850px; }
.w-mx-900 { max-width: 900px; }
.w-mx-950 { max-width: 950px; }
.w-mx-1000 { max-width: 1000px; }
.w-mx-1050 { max-width: 1050px; }
.w-mx-1100 { max-width: 1100px; }
.w-mx-1150 { max-width: 1150px; }
.w-mx-1200 { max-width: 1200px; }

/*** Justify ***/
.just-bt { justify-content: space-between; }
.just-ar { justify-content: space-around; }
.just-flx-st { justify-content: flex-start; }
.just-flx-en { justify-content: flex-end; }
.just-ctr { justify-content: center; }
.just-init { justify-content: initial; }
.just-inht { justify-content: inherit; }

/*** Flex ***/
.d-flx { display: flex; }
.d-flx > * { width: initial; min-width: 0; min-height: 0; }

/* For Parent Container */
.flx-row { flex-direction: row; }
.flx-col { flex-direction: column; }

.flx-wr-n { flex-wrap: nowrap; }
.flx-wr-w { flex-wrap: wrap; }
.flx-w-r { flex-wrap: wrap-reverse; }

.flx-spc-1 { margin-left: -0.3rem; margin-right: -0.3rem; }
.flx-spc-2 { margin-left: -0.59rem; margin-right: -0.59rem; }
.flx-spc-3 { margin-left: -0.88rem; margin-right: -0.88rem; }
.flx-spc-4 { margin-left: -1.18rem; margin-right: -1.18rem; }

/* Use on parent, for proportional children */
.flx-children-0 > * { flex: 0; }
.flx-children-1 > * { flex: 1; }

.flx-children-g-0 > * { flex-grow: 0; }
.flx-children-g-1 > * { flex-grow: 1; }
.flx-children-s-0 > * { flex-shrink: 0; }
.flx-children-s-1 > * { flex-shrink: 1; }

.flx-spc-1 > * { margin-left: 0.3rem; margin-right: 0.3rem; margin-bottom: 0.6rem; }
.flx-spc-2 > * { margin-left: 0.59rem; margin-right: 0.59rem; margin-bottom: 1.18rem; }
.flx-spc-3 > * { margin-left: 0.88rem; margin-right: 0.88rem; margin-bottom: 1.76rem; }
.flx-spc-4 > * { margin-left: 1.18rem; margin-right: 1.18rem; margin-bottom: 2.36rem; }

/* For Individual Children */
.flx-child-0 { flex: 0; }
.flx-child-0-5 { flex: 0.5; }
.flx-child-1 { flex: 1; }
.flx-child-1-5 { flex: 1.5; }
.flx-child-2 { flex: 2; }
.flx-child-2-5 { flex: 2.5; }
.flx-child-3 { flex: 3; }
.flx-child-3-5 { flex: 3.5; }
.flx-child-4 { flex: 4; }

/*** Dialog ***/
body.dialog-active {
  overflow-y: hidden;
  padding-right: 8px;
  pointer-events: none; }

.dialog {
  pointer-events: none;
  opacity: 0;
  z-index: 0;
  position: fixed;
  top: 0; right: -8px; bottom: 0; left: 0;
  transition: all .15s;
  overflow-y: auto;
  padding: 1.17rem; }

.dialog.active {
  pointer-events: auto;
  opacity: 1;
  z-index: 100; }

.dialog-outer {
  width: 100%;
  padding: 1.17rem;
  background: rgba(0,0,0,0.5);
  height: 100%; 
  top: 0; bottom: 0; right: 0; left: 0;
  position: fixed;
  overflow-y: auto;
  z-index: 90; }

.dialog-inner {
  background: #fff;
  margin: 0 auto;
  z-index: 105;
  position: relative;
  top: 0; bottom: 0; right: 0; left: 0;
  margin-bottom: 1.17rem; }

.dialog.center .dialog-inner {
  position: absolute;
  margin: 0 auto;
  top: 50%;
  transform: translateY(-50%);
  bottom: initial; }

.dialog.center .dialog-outer {
  position: fixed;
  top: 0; bottom: 0; }

.dialog-mask {
  background: rgba(0,0,0,0.5);
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: 100;
  cursor: pointer;
  pointer-events: none;
  display: none; }

.dialog-btn-close {
  position: absolute;
	z-index: 110;
  top: 0; right: 0; }

/*** < 768px ***/
@media (max-width: 768px) {
  h1 { font-size: 2.9rem; }
  h2 { font-size: 2.4rem; }
  h3 { font-size: 1.7rem; }
  h4 { font-size: 1.4rem; }
  h5 { font-size: 1rem; }
  h6 { font-size: 0.9rem; }

  h1 { font-size: 3.2rem; }
  h2 { font-size: 2.7rem; }
  h3 { font-size: 2rem;  }
  h4 { font-size: 1.7rem; }
  h5 { font-size: 1.2rem; }
  h6 { font-size: 1rem; }

  section {
  padding: 1rem; }

  article {
    margin: 1.5rem 0; }

  .linker {
    transform: none;
    left: initial;
    right: 0; }
}

/*** < 480px ***/
@media (max-width: 480px) {
  h1 { font-size: 2.7rem; }
  h2 { font-size: 2.2rem; }
  h3 { font-size: 1.5rem; }
  h4 { font-size: 1.2rem; }
  h5 { font-size: 0.9rem; }
  h6 { font-size: 0.8rem; }

  section {
  padding: 0.5rem; }

}

/* ==========================================================
   Layout compacto del sistema
   Mantiene el menu visible y evita scroll innecesario.
   ========================================================== */

html,
body {
  height: 100%;
  overflow: hidden;
}

body,
body h1,
body h2,
body h3,
body h4,
body h5,
body h6 {
  color: var(--color-text);
}

.app-shell {
  height: 100vh;
  min-height: 0;
  overflow: hidden;
}

.app-sidebar {
  gap: 0.65rem;
  height: 100vh;
  overflow: hidden;
  padding: 0.85rem;
  position: sticky;
  top: 0;
  width: 300px;
}

.brand {
  font-size: 1rem;
  gap: 0.55rem;
  min-height: 38px;
}

.brand img {
  height: 38px;
  width: 38px;
}

.session-user {
  border-radius: 0.4rem;
  font-size: 0.78rem;
  line-height: 1.25;
  padding: 0.5rem 0.6rem;
}

.menu {
  display: grid;
  flex: 1;
  gap: 0.28rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow-y: auto;
  padding-right: 0.15rem;
}

.menu a,
.logout {
  align-items: center;
  border-radius: 0.35rem;
  display: flex;
  font-size: 0.78rem;
  line-height: 1.15;
  min-height: 34px;
  padding: 0.42rem 0.5rem;
  text-decoration: none;
}

.logout {
  justify-content: center;
  margin-top: 0;
  min-height: 34px;
}

.app-main {
  height: 100vh;
  overflow: hidden;
}

.app-header {
  flex-shrink: 0;
  min-height: 64px;
  padding: 0.75rem 1rem;
}

.app-header p {
  font-size: 0.78rem;
  margin: 0 0 0.2rem;
}

.app-header h1 {
  font-size: 1.35rem;
  line-height: 1.1;
  margin: 0;
}

.app-content {
  flex: 1;
  margin: 0;
  max-width: none;
  overflow: auto;
  padding: 1rem;
}

.title {
  font-size: 1.35rem;
  line-height: 1.1;
  margin: 0 0 0.85rem;
}

.panel {
  margin-bottom: 0.85rem;
  padding: 0.9rem;
}

.panel h3,
.card h3 {
  font-size: 1rem;
  line-height: 1.15;
  margin-bottom: 0.7rem;
}

.fila {
  align-items: flex-start;
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  margin-bottom: 0.6rem;
}

input[type='email'],
input[type='number'],
input[type='password'],
input[type='search'],
input[type='tel'],
input[type='text'],
input[type='url'],
input[type='date'],
textarea,
select,
option,
input,
select {
  border: 1px solid var(--color-border);
  border-radius: 0.35rem;
  font-size: 0.92rem;
  line-height: 1.2;
  margin-bottom: 0;
  padding: 0.5rem 0.6rem;
}

button,
.btn,
input[type='submit'] {
  border-radius: 0.35rem;
  color: #ffffff;
  line-height: 1.15;
  padding: 0.52rem 0.8rem;
}

table {
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.84rem;
  min-width: 640px;
}

td,
th {
  line-height: 1.25;
  padding: 0.28rem 0.45rem;
  vertical-align: middle;
}

table td:first-child,
table th:first-child {
  padding-left: 0.45rem;
}

table td:last-child,
table th:last-child {
  padding-right: 0.45rem;
}

th {
  background: #f1f5f9;
  border-bottom: 1px solid var(--color-border);
  color: #475569;
  font-size: 0.78rem;
  font-weight: 700;
  position: sticky;
  text-transform: uppercase;
  top: 0;
  z-index: 1;
}

td {
  border-bottom: 1px solid #edf2f7;
  white-space: nowrap;
}

tr:hover td {
  background: #f8fafc;
}

td a,
td button,
td .btn {
  font-size: 0.78rem;
  line-height: 1;
  padding: 0.35rem 0.5rem;
}

.panel:has(table) {
  max-height: calc(100vh - 180px);
  overflow: auto;
}

.panel h3 + table,
.panel table:first-child {
  margin-top: 0.2rem;
}

.panel table input,
.panel table select,
.panel table button {
  font-size: 0.8rem;
  min-height: 30px;
  padding: 0.28rem 0.45rem;
}

@media (max-width: 980px) {
  html,
  body {
    height: auto;
    overflow: auto;
  }

  .app-shell,
  .app-main {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .app-sidebar {
    height: auto;
    position: static;
    width: 100%;
  }

  .menu {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    overflow: visible;
  }
}

@media (max-width: 576px) {
  .app-header {
    min-height: auto;
  }

  .app-content {
    padding: 0.75rem;
  }

  .fila {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================
   Capa visual amigable e intuitiva
   ========================================================== */

:root {
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-strong: #eef4ff;
  --ink: #172033;
  --ink-soft: #526175;
  --line: #d8e2ef;
  --accent: #2563eb;
  --accent-soft: #dbeafe;
  --success: #15803d;
  --warning: #b45309;
  --danger: #b91c1c;
}

body {
  background:
    linear-gradient(180deg, #f6f9fd 0%, #edf3f9 100%);
  color: var(--ink);
}

.app-sidebar {
  background: #101827;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 8px 0 24px rgba(15, 23, 42, 0.14);
}

.brand {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.55rem;
  padding: 0.45rem;
}

.brand span {
  color: #ffffff;
}

.session-user {
  background: rgba(37, 99, 235, 0.16);
  border: 1px solid rgba(147, 197, 253, 0.22);
  color: #dbeafe;
}

.menu {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.menu-group {
  display: grid;
  gap: 0.32rem;
}

.menu-heading {
  color: #93a4bd;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1;
  padding: 0 0.15rem;
  text-transform: uppercase;
}

.menu-links {
  display: grid;
  gap: 0.24rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.menu-links a {
  background: transparent;
  border: 1px solid transparent;
  color: #e5ecf7;
  min-height: 32px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.menu-links a:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
}

.menu-links a.active {
  background: var(--accent);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.26);
  color: #ffffff;
}

.logout,
.app-header a {
  background: #fee2e2;
  color: #7f1d1d;
}

.logout:hover,
.app-header a:hover {
  background: #fecaca;
}

.app-header {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 0 var(--line);
}

.app-header p {
  color: var(--ink-soft);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.app-header h1,
.title {
  color: var(--ink);
  font-weight: 800;
}

.app-content {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(248, 250, 252, 0.8));
}

.dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.card,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
}

.card {
  min-width: 0;
  padding: 1rem;
}

.card h3,
.panel h3,
.panel h4 {
  color: var(--ink);
  font-weight: 800;
}

.card p {
  color: var(--accent);
  font-size: 1.6rem;
}

.panel {
  padding: 1rem;
}

.panel > h3:first-child,
.panel > h4:first-child {
  border-bottom: 1px solid var(--line);
  margin-bottom: 0.8rem;
  padding-bottom: 0.65rem;
}

input[type='email'],
input[type='number'],
input[type='password'],
input[type='search'],
input[type='tel'],
input[type='text'],
input[type='url'],
input[type='date'],
textarea,
select,
input,
select {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  color: var(--ink);
}

input:focus,
select:focus,
textarea:focus {
  background: #ffffff;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
  outline: none;
}

label {
  color: var(--ink);
  letter-spacing: 0;
}

button,
.btn,
input[type='submit'] {
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 0.45rem;
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.18);
  color: #ffffff;
  font-weight: 800;
}

button:hover,
.btn:hover,
input[type='submit']:hover {
  background: #1d4ed8;
}

button[style*="red"],
.btn-danger {
  background: var(--danger) !important;
  border-color: var(--danger) !important;
  color: #ffffff !important;
}

table {
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  overflow: hidden;
}

th {
  background: #eaf1fb;
  color: #334155;
}

td {
  color: #263244;
}

tr:nth-child(even) td {
  background: #fbfdff;
}

tr:hover td {
  background: #eef6ff;
}

td a {
  background: var(--accent-soft);
  border-radius: 0.35rem;
  color: #1d4ed8;
  display: inline-block;
  font-weight: 800;
  padding: 0.24rem 0.45rem;
  text-decoration: none;
}

td a:hover {
  background: #bfdbfe;
}

.notice {
  background: #eff6ff;
  border-left: 4px solid var(--accent);
  color: #1e3a8a;
}

.notice.error {
  background: #fef2f2;
  border-left-color: var(--danger);
  color: #7f1d1d;
}

.check-row {
  background: var(--surface-soft);
  border-color: var(--line);
}

hr {
  background: var(--line);
  margin-bottom: 1rem;
  margin-top: 1rem;
}

@media (max-width: 980px) {
  .menu-links {
    grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  }
}
