/* ============================================================
   DESIGN TOKENS — paleta retro-industrial
   ============================================================ */
:root {
  --orange:   #F5821F;
  --yellow:   #F5C842;
  --teal:     #6EC6C0;
  --red:      #E8432D;
  --navy:     #1A1A2E;
  --ink:      #111111;
  --white:    #FFFDF5;
  --cream:    #FFF8E7;
  --stroke:   3px;

  --bg:       var(--cream);
  --card-bg:  #FFFFFF;
  --text:     var(--ink);
  --text2:    #555555;

  --r:        12px;
  --r-lg:     18px;
  --shadow:   4px 4px 0px var(--ink);
  --shadow-sm:2px 2px 0px var(--ink);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Nunito Sans', sans-serif;
  background: var(--cream);
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ============================================================
   LOGIN OVERLAY — mismo estilo que conciliador / teamflow / financiero
   ============================================================ */
#loginOverlay {
  position: fixed; inset: 0; z-index: 10000;
  background: #14110f;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
#loginOverlay.hidden { display: none; }
.login-box {
  background: #1d1915;
  border: 1px solid #3a332c;
  border-radius: 12px;
  padding: 36px 32px;
  width: 100%; max-width: 380px;
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
  color: #e8ddd0;
  font-family: system-ui, -apple-system, sans-serif;
}
.login-box h1 {
  font-weight: 500;
  font-size: 24px; margin: 0 0 6px; color: #d4a373;
}
.login-box p.sub {
  font-size: 13px; color: #9a8f82; margin: 0 0 26px;
}
.login-box label {
  display: block; font-size: 11px; text-transform: uppercase;
  letter-spacing: .8px; color: #9a8f82; margin: 14px 0 6px;
}
.login-box input {
  width: 100%; box-sizing: border-box;
  background: #14110f; border: 1px solid #3a332c;
  border-radius: 6px; padding: 10px 12px; color: #e8ddd0;
  font-size: 14px; outline: none;
  transition: border-color .15s;
}
.login-box input:focus { border-color: #d4a373; }
.login-box button.login-btn {
  width: 100%; margin-top: 20px;
  background: #d4a373; color: #14110f;
  border: none; border-radius: 6px;
  padding: 11px; font-weight: 600;
  font-size: 14px; cursor: pointer; transition: filter .15s;
}
.login-box button.login-btn:hover { filter: brightness(1.08); }
.login-box button.login-btn:disabled { opacity: .6; cursor: wait; }
.login-remember {
  display: flex; align-items: center; gap: 8px;
  margin-top: 16px; font-size: 13px; color: #9a8f82;
  cursor: pointer; user-select: none;
}
.login-remember input[type="checkbox"] {
  width: 15px; height: 15px; accent-color: #d4a373;
  cursor: pointer; margin: 0;
}
.login-error {
  background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.3);
  color: #f87171; font-size: 12px; padding: 9px 12px; border-radius: 6px;
  margin-top: 14px; display: none;
}
.login-error.show { display: block; }

/* ============================================================
   USER CHIP — esquina derecha del header
   ============================================================ */
.user-chip {
  display: flex; align-items: center; gap: 8px;
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 20px;
  padding: 4px 10px 4px 12px;
  font-size: 12px; font-weight: 800;
  box-shadow: 2px 2px 0 var(--ink);
  color: var(--ink);
}
.user-chip.hidden { display: none; }
.user-chip .name { font-family: 'Nunito', sans-serif; }
.user-chip .role { font-size: 10px; color: var(--text2); font-weight: 700; }
.user-chip button {
  background: var(--red); color: #fff;
  border: 1.5px solid var(--ink);
  border-radius: 14px;
  padding: 2px 8px;
  font-weight: 900; font-size: 11px;
  cursor: pointer;
}
.user-chip button:hover { filter: brightness(1.08); }

/* ============================================================
   HEADER — animación autoelevador
   ============================================================ */
.header {
  background: var(--orange);
  border-bottom: var(--stroke) solid var(--ink);
  padding: 0;
  position: sticky; top: 0; z-index: 200;
  overflow: visible;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 1.5rem;
  position: relative;
  z-index: 2;
  overflow: visible;
}

.logo-block {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-badge {
  background: var(--yellow);
  border: var(--stroke) solid var(--ink);
  border-radius: 10px;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.logo-text {
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: clamp(11px, 2vw, 15px);
  color: var(--ink);
  line-height: 1.15;
}
.logo-text span {
  display: block;
  font-size: clamp(9px, 1.4vw, 11px);
  font-weight: 700;
  color: #5a2800;
  letter-spacing: .3px;
}

/* ANIMACIÓN ESCENA */
.anim-scene {
  height: 76px;
  background: var(--yellow);
  border-top: var(--stroke) solid var(--ink);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

/* Suelo */
.ground {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 14px;
  background: #c8860a;
  border-top: 2px solid var(--ink);
}
.ground::after {
  content: '';
  position: absolute;
  top: 4px; left: 0; right: 0;
  height: 2px;
  background: repeating-linear-gradient(90deg, #a06000 0, #a06000 18px, transparent 18px, transparent 28px);
}

.forklift {
  position: absolute;
  bottom: 14px;
  left: -120px;
  animation: drive-in 7s linear infinite;
  width: 96px;
  height: 50px;
}

.worker {
  position: absolute;
  bottom: 14px;
  left: -40px;
  animation: worker-walk 11s linear infinite 1s;
}
@keyframes worker-walk {
  0%   { left: -40px; }
  100% { left: 110%; }
}
@keyframes leg-l { 0%,100%{transform:rotate(20deg)} 50%{transform:rotate(-20deg)} }
@keyframes leg-r { 0%,100%{transform:rotate(-20deg)} 50%{transform:rotate(20deg)} }
.leg-l { transform-origin: 50% 0; animation: leg-l 0.5s ease-in-out infinite; }
.leg-r { transform-origin: 50% 0; animation: leg-r 0.5s ease-in-out infinite; }
@keyframes arm-l { 0%,100%{transform:rotate(-25deg)} 50%{transform:rotate(15deg)} }
@keyframes arm-r { 0%,100%{transform:rotate(15deg)} 50%{transform:rotate(-25deg)} }
.arm-l { transform-origin: 50% 0; animation: arm-l 0.5s ease-in-out infinite; }
.arm-r { transform-origin: 50% 0; animation: arm-r 0.5s ease-in-out infinite; }

.angry-woman {
  position: absolute;
  bottom: 14px;
  left: -50px;
  animation: angry-walk 44s linear infinite 6s;
}
@keyframes angry-walk {
  0%   { left: -50px; }
  100% { left: 110%; }
}
@keyframes angry-arm-l { 0%,100%{transform:rotate(5deg)} 50%{transform:rotate(-5deg)} }
@keyframes angry-arm-r { 0%,100%{transform:rotate(-5deg)} 50%{transform:rotate(5deg)} }
.angry-arm-l { transform-origin:50% 0; animation: angry-arm-l 0.45s ease-in-out infinite; }
.angry-arm-r { transform-origin:50% 0; animation: angry-arm-r 0.45s ease-in-out infinite; }
@keyframes angry-leg-l { 0%,100%{transform:rotate(25deg)} 50%{transform:rotate(-25deg)} }
@keyframes angry-leg-r { 0%,100%{transform:rotate(-25deg)} 50%{transform:rotate(25deg)} }
.angry-leg-l { transform-origin:50% 0; animation: angry-leg-l 0.35s ease-in-out infinite; }
.angry-leg-r { transform-origin:50% 0; animation: angry-leg-r 0.35s ease-in-out infinite; }

@keyframes drive-in {
  0%   { left: -120px; }
  40%  { left: calc(50% - 200px); }
  55%  { left: calc(50% - 200px); }
  100% { left: 110%; }
}

.forklift svg, .pump svg, .cistern-truck svg { display: block; }

.pump {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-220px);
}

.cistern-truck {
  position: absolute;
  bottom: 14px;
  right: -200px;
  animation: truck-drive 9s linear infinite 3.5s;
}
@keyframes truck-drive {
  0%   { right: -200px; transform: scaleX(1); }
  45%  { right: calc(50% - 60px); transform: scaleX(1); }
  55%  { right: calc(50% - 60px); transform: scaleX(1); }
  100% { right: 110%; transform: scaleX(1); }
}

.smoke {
  position: absolute;
  top: -6px; right: -4px;
  animation: puff 1.2s ease-out infinite;
}
@keyframes puff {
  0%   { opacity:.7; transform: scale(.5) translateY(0); }
  100% { opacity:0;  transform: scale(1.5) translateY(-12px); }
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
}
.nav-btn {
  background: var(--yellow);
  border: var(--stroke) solid var(--ink);
  border-radius: 8px;
  padding: 7px 14px;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: transform .1s, box-shadow .1s;
  white-space: nowrap;
}
.nav-btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--ink);
}
.nav-btn.active {
  background: var(--teal);
  transform: translate(2px, 2px);
  box-shadow: none;
}

.nav-dropdown { position: relative; }
.nav-dropdown-btn {
  background: var(--navy);
  color: var(--yellow);
  border: var(--stroke) solid var(--ink);
  border-radius: 8px;
  padding: 7px 14px;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform .1s, box-shadow .1s;
  white-space: nowrap;
  display: flex; align-items: center; gap: 5px;
}
.nav-dropdown-btn:hover {
  transform: translate(-1px,-1px);
  box-shadow: 3px 3px 0 var(--ink);
}
.nav-dropdown-btn.open {
  transform: translate(2px,2px);
  box-shadow: none;
  background: var(--teal);
  color: var(--ink);
}
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 10px;
  box-shadow: 5px 5px 0 var(--ink);
  min-width: 180px;
  z-index: 300;
  overflow: hidden;
  display: none;
  flex-direction: column;
}
.nav-dropdown-menu.open { display: flex; }
.nav-dropdown-item {
  padding: 10px 16px;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  color: var(--ink);
  border: none;
  background: none;
  text-align: left;
  border-bottom: 1px solid rgba(0,0,0,.08);
  transition: background .1s;
  white-space: nowrap;
}
.nav-dropdown-item:last-child { border-bottom: none; }
.nav-dropdown-item:hover { background: var(--yellow); }
.nav-dropdown-item.active { background: var(--teal); font-weight: 900; }
.nav-dropdown-item.tablet-item { color: var(--orange); }
.nav-dropdown-item.tablet-item.on { background: var(--red); color: #fff; }

/* ============================================================
   MAIN
   ============================================================ */
.main {
  max-width: 1024px;
  margin: 0 auto;
  padding: 1.25rem 1rem;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--card-bg);
  border: var(--stroke) solid var(--ink);
  border-radius: var(--r-lg);
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
  position: relative;
}

.card-title {
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--text2);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 7px;
}
.card-title .icon-badge {
  width: 28px; height: 28px;
  border-radius: 7px;
  border: 2px solid var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.card-orange { border-top: 5px solid var(--orange); }
.card-teal   { border-top: 5px solid var(--teal); }
.card-yellow { border-top: 5px solid var(--yellow); }
.card-red    { border-top: 5px solid var(--red); }

/* ============================================================
   FORMS
   ============================================================ */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 12px;
}
.field { display: flex; flex-direction: column; gap: 5px; }
.field label {
  font-family: 'Nunito', sans-serif;
  font-size: 12px; font-weight: 800;
  color: var(--ink); letter-spacing: .3px;
}
.field input, .field select, .field textarea {
  padding: 9px 12px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--cream);
  color: var(--ink);
  font-size: 14px;
  font-family: 'Nunito Sans', sans-serif;
  font-weight: 600;
  width: 100%;
  transition: box-shadow .12s, background .12s;
  box-shadow: 2px 2px 0 var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  background: #fff;
  box-shadow: 3px 3px 0 var(--orange);
  border-color: var(--orange);
}
.field select option { background: #fff; }
.field-full { grid-column: 1 / -1; }
.err { color: var(--red); font-size: 11px; font-weight: 700; margin-top: 2px; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  padding: 9px 18px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  background: var(--cream);
  color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform .1s, box-shadow .1s;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn:hover   { transform: translate(-1px,-1px); box-shadow: 4px 4px 0 var(--ink); }
.btn:active  { transform: translate(2px,2px); box-shadow: 1px 1px 0 var(--ink); }
.btn-primary  { background: var(--orange); color: #fff; }
.btn-success  { background: var(--teal); color: var(--ink); }
.btn-danger   { background: var(--red); color: #fff; font-size: 12px; padding: 6px 11px; }
.btn-yellow   { background: var(--yellow); color: var(--ink); }
.btn-sm  { padding: 5px 12px; font-size: 12px; box-shadow: 2px 2px 0 var(--ink); }
.btn-row { display: flex; justify-content: flex-end; gap: 8px; margin-top: 1rem; }

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
  padding: 10px 14px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  font-size: 13px; font-weight: 700;
  margin-bottom: 1rem;
  display: flex; align-items: center; gap: 8px;
  box-shadow: 2px 2px 0 var(--ink);
}
.alert-ok  { background: #d4f5e8; color: #0a4d2f; }
.alert-err { background: #ffe0de; color: #7a1010; }

/* ============================================================
   METRICS
   ============================================================ */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 1rem;
}
.metric {
  background: var(--card-bg);
  border: 2px solid var(--ink);
  border-radius: var(--r);
  padding: 1rem;
  box-shadow: 3px 3px 0 var(--ink);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.metric::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 5px;
}
.metric:nth-child(1)::before { background: var(--orange); }
.metric:nth-child(2)::before { background: var(--teal); }
.metric:nth-child(3)::before { background: var(--yellow); }
.metric:nth-child(4)::before { background: var(--red); }
.metric:nth-child(5)::before { background: var(--orange); }
.metric:nth-child(6)::before { background: var(--teal); }

.metric-icon { font-size: 22px; margin-bottom: 4px; }
.metric-val {
  font-family: 'Nunito', sans-serif;
  font-size: 22px; font-weight: 900;
  line-height: 1; letter-spacing: -0.5px;
}
.metric-lbl { font-size: 11px; font-weight: 700; color: var(--text2); margin-top: 4px; text-transform: uppercase; letter-spacing: .4px; }
.metric-sub { font-size: 11px; color: var(--text2); margin-top: 3px; font-weight: 600; }

.stock-wrap { background: #eee; border-radius: 20px; height: 7px; margin-top: 7px; overflow: hidden; border: 1px solid var(--ink); }
.stock-bar  { height: 7px; border-radius: 20px; background: var(--teal); transition: width .5s; }
.stock-bar.low { background: var(--red); }
.stock-bar.med { background: var(--yellow); }

/* ============================================================
   TABS
   ============================================================ */
.tabs {
  display: flex; gap: 4px;
  border-bottom: 2px solid var(--ink);
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.tab {
  padding: 8px 16px; font-size: 13px; cursor: pointer;
  border: 2px solid transparent; border-bottom: none;
  background: none; color: var(--text2);
  font-family: 'Nunito', sans-serif; font-weight: 800;
  border-radius: 8px 8px 0 0;
  transition: all .12s;
  margin-bottom: -2px;
}
.tab:hover { color: var(--ink); background: #f0ece0; }
.tab.active {
  background: var(--orange); color: #fff;
  border-color: var(--ink); border-bottom-color: var(--orange);
}

/* ============================================================
   TABLE
   ============================================================ */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  font-family: 'Nunito', sans-serif; font-size: 11px; font-weight: 900;
  text-transform: uppercase; letter-spacing: .5px;
  color: var(--ink); text-align: left;
  padding: 8px 10px; border-bottom: 2px solid var(--ink);
  background: var(--yellow);
  white-space: nowrap;
}
td { padding: 8px 10px; border-bottom: 1px solid #ddd; color: var(--ink); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fff8e0; }

/* ============================================================
   BADGE
   ============================================================ */
.badge {
  display: inline-block; font-size: 11px; padding: 2px 9px;
  border-radius: 20px; font-weight: 800; border: 1.5px solid var(--ink);
  font-family: 'Nunito', sans-serif;
}
.badge-orange { background: var(--orange); color: #fff; }
.badge-teal   { background: var(--teal);   color: var(--ink); }
.badge-yellow { background: var(--yellow); color: var(--ink); }
.badge-red    { background: var(--red);    color: #fff; }

/* ============================================================
   MODAL
   ============================================================ */
.modal-bg {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 500; padding: 1rem;
}
.modal {
  background: var(--card-bg);
  border: 3px solid var(--ink);
  border-radius: var(--r-lg);
  padding: 1.5rem; width: 100%; max-width: 400px;
  box-shadow: 6px 6px 0 var(--ink);
}
.modal h3 {
  font-family: 'Nunito', sans-serif; font-weight: 900;
  font-size: 17px; margin-bottom: 6px;
}
.modal p { font-size: 13px; color: var(--text2); margin-bottom: 1rem; font-weight: 600; }

/* ============================================================
   FILTER ROW
   ============================================================ */
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 1rem; }
.filter-row select, .filter-row input[type=date] {
  padding: 7px 11px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--cream);
  color: var(--ink);
  font-size: 12px; font-weight: 600;
  font-family: 'Nunito Sans', sans-serif;
  box-shadow: 2px 2px 0 var(--ink);
}

/* ============================================================
   SECTION HEAD
   ============================================================ */
.sec-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; flex-wrap: wrap; gap: 8px; }
.sec-head h2 { font-family: 'Nunito', sans-serif; font-size: 16px; font-weight: 900; }

/* ============================================================
   EMPTY
   ============================================================ */
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--text2); font-size: 14px; font-weight: 700; }
.empty-icon { font-size: 36px; margin-bottom: 8px; opacity: .5; }

/* ============================================================
   CONFIG
   ============================================================ */
.resp-chip {
  display: flex; align-items: center; gap: 8px;
  background: var(--cream); border: 2px solid var(--ink);
  border-radius: 20px; padding: 5px 13px;
  font-size: 13px; font-weight: 700;
  box-shadow: 2px 2px 0 var(--ink);
}
.resp-chip button { background: none; border: none; cursor: pointer; color: var(--red); font-size: 16px; line-height: 1; font-weight: 900; transition: transform .1s; }
.resp-chip button:hover { transform: scale(1.3); }
.resp-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 1rem; }

.info-box {
  background: var(--cream); border: 2px solid var(--ink);
  border-radius: 10px; padding: 1rem;
  font-size: 13px; color: var(--text2); line-height: 1.9; font-weight: 600;
}
.info-box code {
  background: var(--yellow); padding: 1px 6px;
  border-radius: 4px; font-family: monospace; font-size: 12px;
  color: var(--ink); border: 1px solid var(--ink); font-weight: 700;
}

/* ============================================================
   HOSE ROW — entrega → recibe
   ============================================================ */
.hose-row {
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin-top: 12px;
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 2px 2px 0 var(--ink);
}
.hose-field { flex: 1; min-width: 0; }
.hose-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  padding-top: 20px;
  flex-shrink: 0;
}
.hose-label {
  font-family: 'Nunito', sans-serif;
  font-size: 10px;
  font-weight: 800;
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-top: 2px;
}

/* ============================================================
   TABLET MODE TOGGLE
   ============================================================ */
.tablet-mode .main { max-width: 768px; }
.tablet-mode .form-grid { grid-template-columns: 1fr 1fr !important; }
.tablet-mode .field input,
.tablet-mode .field select,
.tablet-mode .field textarea { font-size: 15px; padding: 11px 13px; }
.tablet-mode .btn { font-size: 14px; padding: 11px 20px; }
.tablet-mode .nav-btn { font-size: 13px; padding: 8px 14px; }
.tablet-mode .card { padding: 1.4rem; }
.tablet-mode .metric-val { font-size: 26px; }
.tablet-mode .metric { padding: 1.2rem; }
.tablet-mode table { font-size: 14px; }
.tablet-mode th, .tablet-mode td { padding: 10px 12px; }
.nav-btn.tablet-active { background: var(--red) !important; color: #fff !important; }

.horometro-tip {
  font-size: 10px; font-weight: 700; color: var(--teal);
  cursor: help; border-bottom: 1px dashed var(--teal);
  margin-left: 4px;
}

/* ============================================================
   CHART
   ============================================================ */
.chart-container { position: relative; height: 200px; margin-top: 0.5rem; }
.chart-sm { height: 170px; }

/* ============================================================
   ROW ACTIONS
   ============================================================ */
.row-actions { display: flex; gap: 6px; align-items: center; }

/* ============================================================
   PAGE SHOW/HIDE
   ============================================================ */
.page { display: none; }
.page.active { display: block; }

/* ============================================================
   SECTION HERO BANNER
   ============================================================ */
.hero-banner {
  background: var(--navy);
  border: 3px solid var(--ink);
  border-radius: var(--r-lg);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow);
}
.hero-banner::before {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    rgba(255,255,255,.03) 0, rgba(255,255,255,.03) 10px,
    transparent 10px, transparent 20px
  );
}
.hero-title {
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: clamp(14px, 2.5vw, 20px);
  color: var(--yellow);
  line-height: 1.2;
  position: relative;
}
.hero-sub {
  font-size: 12px; font-weight: 700; color: var(--teal);
  margin-top: 4px;
}
.hero-icons { display: flex; gap: 10px; align-items: flex-end; position: relative; }

/* ============================================================
   RESPONSIVE TABLET
   ============================================================ */
@media (max-width: 768px) {
  .header-top { padding: 8px 1rem; justify-content: center; flex-wrap: wrap; gap: 8px; }
  .logo-text { font-size: 11px; text-align: center; }
  .nav { justify-content: center; }
  .nav-btn { padding: 6px 10px; font-size: 12px; }
  .anim-scene { height: 76px; }
  .main { padding: 1rem .75rem; }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .metric-val { font-size: 19px; }
  .hero-banner { padding: .85rem 1rem; }
  .card { padding: 1rem; }
}
@media (max-width: 480px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
  .logo-text span { display: none; }
  .hero-icons { display: none; }
}

.tablet-mode .main { max-width: 768px; margin: 0 auto; }
.tablet-mode .header-top { justify-content: center; flex-wrap: wrap; gap: 8px; }
.tablet-mode .logo-text { text-align: center; }
.tablet-mode .nav { justify-content: center; }
.tablet-mode .form-grid { grid-template-columns: 1fr 1fr !important; }
.tablet-mode .field input,
.tablet-mode .field select,
.tablet-mode .field textarea { font-size: 15px; padding: 11px 13px; }
.tablet-mode .btn { font-size: 14px; padding: 11px 20px; }
.tablet-mode .nav-btn { font-size: 13px; padding: 8px 14px; }
.tablet-mode .card { padding: 1.4rem; }
.tablet-mode .metric-val { font-size: 26px; }
.tablet-mode .metric { padding: 1.2rem; }
.tablet-mode table { font-size: 14px; }
.tablet-mode th, .tablet-mode td { padding: 10px 12px; }
.tablet-mode .anim-scene { height: 76px; }
.nav-dropdown-item.tablet-item.on { background: var(--red); color: #fff; }

/* ============================================================
   ANIMATION — page entry
   ============================================================ */
@keyframes slideUp { from { opacity:0; transform: translateY(10px); } to { opacity:1; transform: translateY(0); } }
.card, .metric { animation: slideUp .25s ease both; }
.card:nth-child(2) { animation-delay: .05s; }
.card:nth-child(3) { animation-delay: .1s; }
.metric:nth-child(2) { animation-delay: .04s; }
.metric:nth-child(3) { animation-delay: .08s; }
.metric:nth-child(4) { animation-delay: .12s; }
.metric:nth-child(5) { animation-delay: .16s; }
.metric:nth-child(6) { animation-delay: .20s; }

@keyframes dustPuff {
  0%   { transform: scale(0); opacity:.8; }
  100% { transform: scale(2.5); opacity:0; }
}
.dust {
  position: absolute;
  bottom: 16px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(200,140,50,.6);
  animation: dustPuff 0.7s ease-out infinite;
}
