:root {
  color-scheme: light;
  --ink: #13283d;
  --muted: #526579;
  --muted-light: #66798c;
  --line: #d8e0e8;
  --blue: #1972bb;
  --blue-deep: #0d4e89;
  --navy: #0b2137;
  --navy-2: #102d48;
  --cyan: #4cc8ef;
  --surface: #ffffff;
  --canvas: #e8edf2;
  --green: #188c70;
  --amber: #bd7b14;
  --red: #b8444a;
  font-family: "Segoe UI", "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-size: 14px; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(45, 146, 219, .38);
  outline-offset: 2px;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 34px;
  overflow: auto;
  color: #f1f7fd;
  background:
    radial-gradient(ellipse at 9% 8%, rgba(25, 114, 187, .34), transparent 34%),
    radial-gradient(ellipse at 95% 95%, rgba(50, 154, 197, .28), transparent 40%),
    linear-gradient(135deg, #0a1d31 0%, #0e2b43 54%, #123952 100%);
}
.login-layout {
  width: min(1050px, 100%);
  min-height: 610px;
  display: grid;
  grid-template-columns: .92fr 1.08fr;
  overflow: hidden;
  border: 1px solid rgba(157, 206, 238, .22);
  border-radius: 27px;
  background: #f6f9fc;
  box-shadow: 0 32px 90px rgba(0, 9, 22, .38), 0 5px 16px rgba(3, 13, 25, .16);
}
.login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px clamp(34px, 6vw, 78px);
  color: var(--ink);
  background: linear-gradient(145deg, #fff 0%, #f5f8fb 100%);
}
.brand { display: inline-flex; align-items: center; gap: 13px; min-width: 0; }
.brand-logo { display: block; width: 160px; height: 64px; flex: 0 0 auto; object-fit: contain; }
.topbar .brand-logo { border-radius: 7px; background: #fff; }
.brand-mark {
  width: 43px;
  height: 43px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 13px;
  background: linear-gradient(145deg, #248cce, #0e4f86);
  box-shadow: 0 9px 19px rgba(17, 93, 150, .24);
}
.brand-mark svg { display: block; width: 77%; height: 77%; }
.brand-mark svg > path:first-child { fill: none; stroke: #eff9ff; stroke-width: 2.8; stroke-linejoin: round; }
.brand-mark svg > path:nth-child(2) { fill: none; stroke: #eff9ff; stroke-width: 1.5; stroke-linejoin: round; opacity: .9; }
.brand-mark .brand-bolt { fill: #ffbf48; stroke: #fff4cf; stroke-width: .8; stroke-linejoin: round; }
.brand-copy { display: grid; gap: 3px; }
.brand-copy strong { color: #eaf5ff; font-size: 16px; letter-spacing: .09em; font-weight: 750; white-space: nowrap; }
.brand-copy strong b { color: #61c4ed; font-weight: 750; }
.brand-copy small { color: #9eb5c9; font-size: 8px; letter-spacing: .19em; }
.brand-login .brand-logo { width: min(290px, 100%); height: auto; max-height: 116px; }
.login-heading { margin: 47px 0 30px; }
.login-heading h1 { margin: 12px 0 8px; color: #172f49; font-size: 31px; letter-spacing: -.04em; line-height: 1.15; }
.login-heading p { margin: 0; color: var(--muted); font-size: 14px; }
.eyebrow { color: #8293a7; font-size: 10px; font-weight: 750; letter-spacing: .15em; }
.stack-form { display: grid; gap: 20px; }
.field { display: grid; gap: 8px; min-width: 0; color: #435a72; }
.field > span { color: #344b64; font-size: 12px; font-weight: 650; }
.field input, .field select, .field textarea, .quote-item-row select, .quote-item-row input {
  width: 100%;
  min-height: 45px;
  padding: 11px 13px;
  border: 1px solid #dce5ee;
  border-radius: 10px;
  color: #233b54;
  background: #f8fafc;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.field input::placeholder, .field textarea::placeholder { color: #9caebe; }
.field input:focus, .field select:focus, .field textarea:focus, .quote-item-row select:focus, .quote-item-row input:focus {
  border-color: #3998d0;
  outline: none;
  background: white;
  box-shadow: 0 0 0 3px rgba(43, 143, 204, .12);
}
.field textarea { min-height: 85px; resize: vertical; }
.button {
  min-height: 41px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 9px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  transition: transform .15s, box-shadow .15s, background .15s, border-color .15s;
}
.button:hover { transform: translateY(-1px); }
.button-primary { color: #fff; background: linear-gradient(100deg, #197abd, #12548e); box-shadow: 0 8px 17px rgba(20, 94, 151, .2); }
.button-primary:hover { background: linear-gradient(100deg, #2088cc, #155d9b); box-shadow: 0 10px 19px rgba(20, 94, 151, .27); }
.button-secondary { color: #31516c; border-color: #dce6ee; background: white; }
.button-secondary:hover { border-color: #acc6d9; background: #f6fafd; }
.button-quiet { color: #63788d; background: transparent; }
.button-danger { color: #fff; background: #a85459; border-color: #a85459; }
.button-danger:hover { background: #92484d; border-color: #92484d; }
.button-full { width: 100%; min-height: 50px; margin-top: 2px; border-radius: 10px; font-size: 13px; letter-spacing: .05em; }
.button-full span { margin-left: auto; font-size: 18px; }
.login-web { margin-top: 14px; }
.login-foot { margin: auto 0 0; padding-top: 36px; color: #94a4b5; font-size: 11px; text-align: center; }
.login-aside {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding: 70px clamp(38px, 6vw, 76px);
  background:
    radial-gradient(ellipse at 110% 16%, rgba(32, 118, 172, .35), transparent 44%),
    linear-gradient(145deg, #0d2b43, #091c2e 82%);
}
.aside-grid {
  position: absolute;
  inset: 0;
  opacity: .25;
  background-image: linear-gradient(rgba(124, 181, 214, .08) 1px, transparent 1px), linear-gradient(90deg, rgba(124, 181, 214, .08) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(135deg, #000, transparent 80%);
}
.aside-content { position: relative; z-index: 1; max-width: 380px; }
.aside-network { width: min(320px, 100%); height: 224px; display: flex; align-items: center; justify-content: flex-start; margin-bottom: 24px; }
.aside-network img { display: block; width: 100%; height: 100%; object-fit: contain; transform-origin: center; animation: network-breathe 16s ease-in-out infinite; }
@keyframes network-breathe {
  0%, 100% { transform: scale(.72); }
  50% { transform: scale(1.2); }
}
.login-aside .eyebrow { color: #67c6e8; }
.login-aside h2 { margin: 18px 0 15px; color: #edf7ff; font-size: clamp(31px, 4vw, 42px); font-weight: 650; letter-spacing: -.045em; line-height: 1.14; }
.login-aside h2 em { color: #63c6ed; font-style: normal; }
.login-aside p { max-width: 365px; margin: 0; color: #a8bdcf; font-size: 14px; line-height: 1.8; }
.aside-line { display: flex; gap: 6px; margin-top: 38px; }
.aside-line span { width: 28px; height: 3px; border-radius: 2px; background: #3bb3db; }
.aside-line span:nth-child(2) { width: 15px; opacity: .55; }
.aside-line span:nth-child(3) { width: 7px; opacity: .3; }
.aside-version { position: absolute; z-index: 1; right: 30px; bottom: 27px; color: #71899c; font-size: 9px; letter-spacing: .12em; }
.aside-version i { padding: 0 5px; color: #3cb6dc; font-style: normal; }
.alert { margin: 0 0 18px; padding: 12px 14px; border: 1px solid transparent; border-radius: 9px; font-size: 12px; line-height: 1.55; }
.alert-error { color: #96383d; border-color: #f0d1d2; background: #fff3f2; }
.alert-success { color: #167259; border-color: #c5e9dc; background: #edfaf5; }
.alert-info { color: #315f7e; border-color: #d0e6f2; background: #eef8fd; }
.alert code { padding: 2px 4px; border-radius: 4px; color: #143e5c; background: #dcecf5; }

.app-page { min-height: 100vh; background: var(--canvas); }
.app-shell { min-height: 100vh; display: block; }
.topbar { position: sticky; z-index: 10; top: 0; color: #29445d;
  background: linear-gradient(100deg, #fff 0%, #f7fafc 100%);
  border-bottom: 1px solid #dce6ed;
  box-shadow: 0 4px 15px rgba(25, 52, 75, .08); }
.topbar-inner { max-width: 1700px; min-height: 72px; display: flex; align-items: center; gap: clamp(14px, 2vw, 30px); margin: 0 auto; padding: 0 clamp(18px, 3vw, 42px); }
.topbar .brand { flex: 0 0 auto; gap: 10px; }
.topbar .brand-mark { width: 38px; height: 38px; border-radius: 11px; }
.topbar .brand-copy { display: grid; gap: 3px; }
.topbar .brand-copy strong { font-size: 13px; }
.topbar .brand-copy small { font-size: 7px; }
.main-nav { min-width: 0; display: flex; align-items: center; justify-content: center; gap: 3px; flex: 1; flex-wrap: wrap; }
.nav-link { position: relative; min-height: 72px; display: flex; align-items: center; gap: 8px; flex: 0 0 auto; padding: 0 12px; color: #61778a; font-size: 11px; font-weight: 550; text-decoration: none; transition: background .16s, color .16s; }
.nav-link:hover { color: #183b5b; background: #f0f6fa; }
.nav-link.active { color: #183b5b; background: linear-gradient(180deg, rgba(39, 126, 181, .015), rgba(39, 126, 181, .09)); }
.nav-link.active > svg { color: #267eb5; }
.nav-link > svg { width: 17px; height: 17px; flex: 0 0 auto; color: #8297a8; }
.nav-link > i { position: absolute; right: 12px; bottom: 0; left: 12px; height: 3px; border-radius: 3px 3px 0 0; background: #287eb5; }

.nav-group { position: relative; flex: 0 0 auto; }
.nav-group-trigger { border: 0; background: none; cursor: pointer; font: inherit; }
.nav-group-trigger > span { white-space: nowrap; }
.nav-caret { width: 0; height: 0; margin-left: 1px; border-top: 4px solid currentColor; border-right: 4px solid transparent; border-left: 4px solid transparent; opacity: .65; transition: transform .18s; }
.nav-group.open .nav-caret { transform: rotate(180deg); }
.nav-dropdown {
  position: absolute; top: calc(100% - 6px); left: 0; z-index: 60;
  min-width: min(232px, calc(100vw - 24px)); padding: 7px; display: none;
  border: 1px solid rgba(140, 190, 225, .2); border-radius: 13px;
  background: linear-gradient(180deg, #12212f, #0d1a25);
  box-shadow: 0 22px 48px rgba(3, 10, 17, .58);
}
.nav-group:last-child .nav-dropdown { left: auto; right: 0; }
.nav-group.open .nav-dropdown { display: block; }
.nav-group.open .nav-group-trigger { color: #183b5b; background: #edf5fa; }
.nav-group.open .nav-group-trigger > svg { color: #267eb5; }
.nav-sublink {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px;
  border-radius: 9px; color: #b7cbdb; font-size: 11px; font-weight: 550; text-decoration: none;
  transition: background .14s, color .14s;
}
.nav-sublink > svg { width: 16px; height: 16px; flex: 0 0 auto; color: #7c98b0; }
.nav-sublink:hover { color: #eff8ff; background: rgba(255, 255, 255, .07); }
.nav-sublink.active { color: #eaf7ff; background: rgba(67, 185, 227, .17); }
.nav-sublink.active > svg { color: #63c9ee; }

.topbar-right { display: flex; align-items: center; gap: 15px; flex: 0 0 auto; }
.secure-note { display: flex; align-items: center; gap: 7px; color: #71879a; font-size: 9px; white-space: nowrap; }
.secure-dot { width: 7px; height: 7px; border-radius: 50%; background: #40c29a; box-shadow: 0 0 9px rgba(64, 194, 154, .6); }
.sidebar-user { display: flex; align-items: center; gap: 9px; min-height: 40px; padding: 0 0 0 13px; border-left: 1px solid #dce6ed; }
.avatar { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid #c7dce9; border-radius: 50%; color: #287eb5; background: #eef6fb; font-size: 12px; font-weight: 700; flex: 0 0 auto; }
.sidebar-user-info { min-width: 0; display: grid; gap: 3px; }
.sidebar-user-info strong { overflow: hidden; color: #29445d; font-size: 11px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user-info small { color: #71879a; font-size: 10px; }
.logout-form { margin-left: 2px; }
.icon-button { width: 30px; height: 30px; border: 0; border-radius: 7px; color: #71879a; background: transparent; cursor: pointer; font-size: 17px; transform: rotate(45deg); flex: 0 0 auto; }
.icon-button:hover { color: #183b5b; background: #edf3f7; }
.main-content { min-width: 0; max-width: 1600px; width: 100%; margin: 0 auto; padding: 36px clamp(22px, 4vw, 55px) 50px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.page-heading h1 { margin: 6px 0 5px; color: #1a344f; font-size: clamp(25px, 3vw, 31px); font-weight: 700; letter-spacing: -.04em; }
.page-heading p { margin: 0; color: #77899c; font-size: 12px; }
.date-pill, .count-pill { display: inline-flex; align-items: center; min-height: 34px; padding: 0 13px; border: 1px solid #e1e9f0; border-radius: 20px; color: #597188; background: #fff; font-size: 11px; font-weight: 650; white-space: nowrap; }
.welcome-banner { position: relative; display: flex; align-items: center; justify-content: space-between; min-height: 154px; overflow: hidden; margin-bottom: 19px; padding: 28px 35px; border-radius: 14px; color: white; background: linear-gradient(105deg, #125284, #1c79ad 62%, #1e8eb6); box-shadow: 0 11px 25px rgba(24, 91, 136, .13); }
.welcome-banner::after { position: absolute; right: 13%; top: -65px; width: 320px; height: 280px; border: 1px solid rgba(198, 235, 250, .13); border-radius: 48%; content: ""; transform: rotate(-25deg); }
.welcome-kicker { color: #aedcf0; font-size: 9px; font-weight: 750; letter-spacing: .16em; }
.welcome-banner h2 { margin: 10px 0 6px; color: #f7fbfe; font-size: 25px; font-weight: 650; letter-spacing: -.03em; }
.welcome-banner h2 span { color: #ffcf69; font-size: 19px; }
.welcome-banner p { margin: 0; color: #c8e1ee; font-size: 12px; }
.welcome-art { position: relative; z-index: 1; width: 136px; height: 102px; margin-right: 5%; display: grid; place-items: center; }
.art-ring { position: absolute; border: 1px solid rgba(212, 241, 252, .23); border-radius: 50%; }
.ring-one { width: 106px; height: 106px; }
.ring-two { width: 73px; height: 73px; border-color: rgba(212, 241, 252, .38); }
.art-bolt { color: #ffd16e; font-size: 59px; font-weight: 300; text-shadow: 0 0 25px rgba(255, 208, 104, .5); transform: skew(-8deg); }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin-bottom: 19px; }
.stat-card { min-width: 0; display: grid; grid-template-columns: 41px minmax(0, 1fr); grid-template-rows: auto auto auto; align-items: center; column-gap: 12px; row-gap: 3px; padding: 18px 17px; border: 1px solid #e8edf2; border-radius: 12px; background: #fff; box-shadow: 0 3px 11px rgba(29, 57, 81, .025); }
.stat-icon { grid-column: 1; grid-row: 1 / span 3; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; font-size: 19px; }
.tone-blue { color: #287eb5; background: #e9f4fc; }
.tone-violet { color: #7365c5; background: #f0edff; }
.tone-amber { color: #bd801e; background: #fff5df; }
.tone-green { color: #218d71; background: #e7f7f0; }
.stat-label { overflow: hidden; color: #78899b; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.stat-value { overflow: hidden; color: #1d3852; font-size: clamp(16px, 1.8vw, 22px); font-weight: 720; letter-spacing: -.03em; text-overflow: ellipsis; white-space: nowrap; }
.stat-note { overflow: hidden; color: #97a5b2; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .85fr); gap: 16px; }
.dashboard-grid-wide { grid-template-columns: minmax(0, 1.65fr) minmax(280px, .85fr); }
.chart-card { display: flex; flex-direction: column; }
.chart-legend { display: inline-flex; align-items: center; gap: 6px; color: #8497a8; font-size: 9px; white-space: nowrap; }
.chart-legend i { width: 9px; height: 9px; border-radius: 3px; }
.chart-legend .legend-sales { background: #287eb5; }
.chart-legend .legend-purchases { margin-left: 8px; background: #d8a13a; }
.bar-chart { display: flex; align-items: flex-end; gap: 6px; height: 208px; padding: 20px 20px 14px; }
.bar-column { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 7px; }
.bar-pair { display: flex; align-items: flex-end; gap: 3px; width: 100%; height: 100%; }
.bar { display: block; flex: 1; min-height: 2px; border-radius: 4px 4px 2px 2px; transition: height .25s ease; }
.bar-sales { background: linear-gradient(180deg, #3d95cb, #287eb5); }
.bar-purchases { background: linear-gradient(180deg, #e8b959, #d8a13a); }
.bar-label { color: #9aa8b5; font-size: 8px; white-space: nowrap; }
.top-list-card { display: flex; flex-direction: column; }
.ranking-list { display: grid; gap: 12px; margin: 0; padding: 17px 20px 20px; list-style: none; }
.ranking-list li { display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: center; gap: 10px; }
.ranking-position { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: #f2f6fa; color: #7f93a5; font-size: 9px; font-weight: 700; }
.ranking-body { display: grid; gap: 5px; min-width: 0; }
.ranking-name { display: grid; gap: 2px; min-width: 0; }
.ranking-name strong { overflow: hidden; color: #29435c; font-size: 10px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.ranking-name small { overflow: hidden; color: #97a5b2; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.ranking-track { display: block; height: 4px; border-radius: 4px; background: #f0f4f7; overflow: hidden; }
.ranking-track i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #4c9ed2, #287eb5); }
.card { min-width: 0; border: 1px solid #e7edf2; border-radius: 12px; background: #fff; box-shadow: 0 3px 12px rgba(31, 57, 80, .025); }
.card-heading { min-height: 69px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 17px 20px; border-bottom: 1px solid #edf1f4; }
.card-heading h2 { margin: 0 0 5px; color: #29435c; font-size: 13px; font-weight: 700; }
.card-heading p { margin: 0; color: #91a0ae; font-size: 10px; }
.text-link { color: #237bb3; font-size: 10px; font-weight: 700; white-space: nowrap; }
.live-refresh { display: inline-flex; align-items: center; gap: 6px; color: #8497a8; font-size: 9px; white-space: nowrap; }
.live-refresh i { width: 6px; height: 6px; border-radius: 50%; background: #31ad82; box-shadow: 0 0 8px rgba(49,173,130,.45); }
.dashboard-refresh-status { margin: 11px 2px 0; color: #91a0ad; font-size: 9px; text-align: right; }
.no-activity { padding: 22px; color: #91a0ad; font-size: 10px; text-align: center; }
.text-link span { padding-left: 4px; font-size: 14px; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
thead { background: #fbfcfd; }
th { height: 37px; padding: 0 15px; color: #8e9dab; font-size: 9px; font-weight: 750; letter-spacing: .09em; white-space: nowrap; }
td { height: 51px; padding: 9px 15px; border-top: 1px solid #f0f3f6; color: #667a8d; font-size: 10px; white-space: nowrap; }
tbody tr:hover { background: #fafcfe; }
.table-link { color: #267eb5; font-weight: 700; }
.table-link:hover { text-decoration: underline; }
.money-cell { color: #30485f; font-weight: 650; }
.status-badge { display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; border-radius: 12px; font-size: 9px; font-weight: 700; }
.status-green { color: #198368; background: #e8f7f0; }
.status-blue { color: #2876aa; background: #eaf4fb; }
.status-red { color: #a84a50; background: #fff0f0; }
.status-gray { color: #718294; background: #eef2f5; }
.status-amber { color: #a96d0d; background: #fff5df; }
.empty-state { min-height: 250px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 25px; text-align: center; }
.empty-state.compact { min-height: 180px; }
.empty-icon { width: 42px; height: 42px; display: grid; place-items: center; margin-bottom: 11px; border-radius: 12px; color: #448bb6; background: #edf6fb; font-size: 21px; }
.empty-state strong { color: #41596f; font-size: 12px; }
.empty-state p { margin: 6px 0 14px; color: #93a2b0; font-size: 10px; }
.button-small { min-height: 33px; font-size: 10px; }
.low-stock-card { padding-bottom: 8px; }
.round-arrow { width: 29px; height: 29px; display: grid; place-items: center; border: 1px solid #e3ebf1; border-radius: 50%; color: #56809d; background: white; font-size: 15px; }
.stock-list { padding: 2px 18px; }
.stock-row { display: flex; align-items: center; gap: 10px; min-height: 60px; border-bottom: 1px solid #f0f3f6; }
.stock-row:last-child { border-bottom: 0; }
.stock-glyph { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; color: #bb851e; background: #fff6e5; font-size: 15px; }
.stock-name { min-width: 0; display: grid; gap: 4px; }
.stock-name strong { overflow: hidden; color: #405a70; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.stock-name small, .stock-level small { color: #98a6b2; font-size: 9px; }
.stock-level { display: grid; gap: 3px; margin-left: auto; text-align: right; }
.stock-level b { color: #b47418; font-size: 11px; }
.stock-ok { min-height: 190px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.stock-ok > span { width: 35px; height: 35px; display: grid; place-items: center; margin-bottom: 10px; border-radius: 50%; color: #21886d; background: #e9f8f1; font-weight: 800; }
.stock-ok strong { color: #456176; font-size: 11px; }
.stock-ok p { color: #94a3af; font-size: 10px; }

.content-grid { display: grid; grid-template-columns: minmax(270px, .73fr) minmax(0, 1.45fr); align-items: start; gap: 16px; }
.product-image-card { grid-column: 2; justify-self: end; }
.product-image-reference { display: flex; justify-content: flex-end; padding: 14px 20px 18px; }
.product-image-reference img { display: block; width: auto; height: auto; max-width: calc(100vw - 50px); zoom: .25; }
.warehouse-select-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 14px; }
.warehouse-select-card { display: grid; grid-template-columns: 42px minmax(0, 1fr); align-items: center; gap: 13px; padding: 18px; }
.warehouse-select-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 11px; color: #287eb5; background: #eaf4fb; font-size: 19px; }
.warehouse-select-info { min-width: 0; }
.warehouse-select-code { color: #8497a8; font-size: 9px; font-weight: 750; letter-spacing: .08em; }
.warehouse-select-info h2 { overflow-wrap: anywhere; margin: 4px 0; color: #29435c; font-size: 14px; }
.warehouse-select-info p { margin: 0; color: #91a0ae; font-size: 10px; line-height: 1.5; }
.warehouse-select-action { grid-column: 1 / -1; }
.warehouse-select-action .button { width: 100%; }
.warehouse-select-inactive { opacity: .68; }
.form-card { padding-bottom: 19px; }
.form-card > .form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 13px; padding: 18px 19px 0; }
.form-card .field { gap: 6px; }
.form-card .field > span { font-size: 10px; }
.catalog-print-all { margin-top: 12px; padding-top: 12px; border-top: 1px solid #f0f3f6; }
.catalog-print-all span { font-size: 10px; letter-spacing: .04em; text-transform: uppercase; color: #6b7d8f; }
.pager { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center;
  justify-content: space-between; padding: 12px 2px 2px; }
.pager-info { font-size: 10px; letter-spacing: .04em; text-transform: uppercase; color: #6b7d8f; }
.pager-links { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pager-current { min-width: 28px; padding: 5px 9px; border-radius: 7px; background: #14395c;
  color: #fff; font-size: 11px; font-weight: 700; text-align: center; }
.search-box button[hidden] { display: none; }
.line-editor { grid-column: 1 / -1; }
.line-totals { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: baseline;
  margin: 12px 0 6px; padding: 11px 14px; border: 1px solid #e4eaf0; border-radius: 10px;
  background: #f7fafc; }
.line-totals span { font-size: 10px; letter-spacing: .04em; color: #6b7d8f; text-transform: uppercase; }
.line-totals strong { margin-left: 7px; font-size: 13px; color: #22313f; letter-spacing: 0;
  text-transform: none; font-variant-numeric: tabular-nums; }
.line-totals span:last-child strong { font-size: 16px; color: #14395c; }
.line-editor > span { font-size: 10px; }
.line-table { margin: 0 0 11px; }
.line-table th { height: 30px; padding: 0 8px; font-size: 8px; }
.line-table td { height: auto; padding: 5px 4px; border-top: 1px solid #f0f3f6; }
.line-table input { width: 100%; height: 33px; padding: 0 9px; border: 1px solid #dde5ec; border-radius: 8px; background: #fff; color: #34495e; font-size: 11px; }
.line-table input:focus { border-color: #3d95cb; outline: none; box-shadow: 0 0 0 3px rgba(61, 149, 203, .13); }
.line-table td:first-child { width: 34%; }
.line-table td:nth-child(2) { width: 16%; }
.line-table td:nth-child(3), .line-table td:nth-child(4) { width: 11%; }
.line-table td:nth-child(5), .line-table td:nth-child(6) { width: 9%; }
.line-table td:last-child { width: 30px; }
.line-table .remove-item { width: 24px; height: 24px; border-radius: 7px; font-size: 14px; }
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.filter-bar select, .filter-bar input[type="date"] { height: 32px; padding: 0 9px; border: 1px solid #dde5ec; border-radius: 8px; background: #fff; color: #4a6076; font-size: 10px; }
.filter-bar .search-box { width: 190px; }
.label-sheet-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.label-sheet-grid > .label-history-card { grid-column: 1 / -1; }
.label-print-card { margin-bottom: 16px; }
.label-print-card .labels-grid { padding: 18px 20px 20px; }
.label-print-card .heading-actions { display: flex; gap: 7px; }
.stock-summary { display: grid; gap: 3px; padding: 18px 19px 4px; }
.stock-summary-value { color: #1d3852; font-size: 30px; font-weight: 730; letter-spacing: -.03em; }
.stock-summary-unit { color: #78899b; font-size: 10px; }
.stock-summary-note { color: #97a5b2; font-size: 9px; }
.row-inline-actions { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.row-transfer { color: #17689e; border-color: #b8d8ed; background: #eff8fd; }
.row-transfer:hover { color: #0d4e89; border-color: #8fc1df; background: #e2f2fb; }
.transfer-dialog {
  width: min(440px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100vh - 32px);
  padding: 0;
  overflow: auto;
  border: 1px solid #dce6ee;
  border-radius: 16px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 24px 70px rgba(12, 33, 52, .28);
}
.transfer-dialog::backdrop { background: rgba(11, 33, 55, .55); backdrop-filter: blur(2px); }
.transfer-dialog-form { display: grid; gap: 16px; padding: 22px; }
.transfer-dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.transfer-dialog-heading h2 { margin: 5px 0 0; color: #1d3852; font-size: 18px; }
.transfer-dialog-close { width: 30px; height: 30px; border: 0; border-radius: 8px; color: #71839a; background: #f1f5f8; font-size: 22px; cursor: pointer; }
.transfer-dialog-product { margin: -7px 0 0; color: #2677a8; font-size: 13px; font-weight: 700; }
.transfer-dialog-form .field { gap: 6px; }
.transfer-dialog-form .field > span { color: #405970; font-size: 11px; font-weight: 650; }
.transfer-dialog-form .field select,
.transfer-dialog-form .field input { width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid #dce5ed; border-radius: 8px; color: #29435c; background: #fbfcfd; }
.transfer-dialog-notice { margin: -5px 0 0; color: #7b8d9d; font-size: 11px; line-height: 1.5; }
.transfer-dialog-notice a { color: #17689e; font-weight: 650; text-decoration: underline; }
.transfer-dialog-form .form-actions { justify-content: flex-end; margin: 0; padding: 0; }
.update-alert-dialog { width: min(440px, calc(100vw - 32px)); border: 0; border-radius: 14px; padding: 0; box-shadow: 0 30px 60px rgba(11, 33, 55, .35); }
.update-alert-dialog::backdrop { background: rgba(11, 33, 55, .55); backdrop-filter: blur(2px); }
.update-alert-form { display: grid; justify-items: center; gap: 14px; margin: 0; padding: 28px 24px 22px; text-align: center; }
.update-alert-icon { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; color: #fff; background: linear-gradient(135deg, #2b7fb8, #1d5e8c); font-size: 28px; }
.update-alert-form h2 { margin: 0; color: #1d3852; font-size: 20px; }
.update-alert-form p { margin: -6px 0 0; color: #4a647d; font-size: 13px; line-height: 1.6; }
.update-alert-contact { font-weight: 600; color: #2677a8; }
.update-alert-actions { display: flex; justify-content: center; margin-top: 2px; }
.update-alert-actions .button { min-width: 150px; }
.update-alert-note { color: #8798aa; font-size: 11px; }
.row-primary { color: #1d6f5f; border-color: #b7e0d3; background: #eefaf6; }
.row-editing { background: #f4f9fd; box-shadow: inset 3px 0 0 #2f6f9f; }
.row-editing td { padding-top: 6px; padding-bottom: 6px; }
.row-editing .cell-primary { display: none; }
.row-editing .cell-sub { display: none; }
.inline-input {
  width: 100%;
  min-width: 68px;
  border: 1px solid #c3d4e2;
  border-radius: 6px;
  padding: 5px 7px;
  font: inherit;
  font-size: 12px;
  color: #16202b;
  background: #fff;
}
.inline-input:focus { outline: 2px solid #2f6f9f33; border-color: #2f6f9f; }
.catalog-edit-form { display: none; }
tr[data-product-row] { cursor: pointer; }
tr[data-product-row]:hover { background: #f4f9fd; }
.danger-zone { border-color: #f0d9d6; }
.danger-zone .card-heading h2 { color: #b4544a; }
.table-card > .card-heading { flex-wrap: wrap; }
.heading-actions { display: flex; gap: 7px; }
.cell-primary { display: block; color: #29435c; font-size: 10.5px; }

/* Modulo de recursos humanos */
.hr-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 19px; padding: 4px; border: 1px solid #e8edf2; border-radius: 11px; background: #fff; box-shadow: 0 3px 11px rgba(29, 57, 81, .025); }
.hr-tab { min-height: 33px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 8px; color: #6d7f90; font-size: 10.5px; font-weight: 550; text-decoration: none; transition: background .15s, color .15s; }
.hr-tab:hover { color: #1d3852; background: #f2f6f9; }
.hr-tab.active { color: #fff; background: linear-gradient(135deg, #2f8fc4, #43b9e3); box-shadow: 0 4px 10px rgba(54, 156, 216, .26); }
.hr-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.hidden-value { color: #9aa8b5; letter-spacing: .12em; }
.detail-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 11px 15px; margin: 0; }
.detail-list > div { min-width: 0; }
.detail-list dt { color: #8b9aa8; font-size: 9px; text-transform: uppercase; letter-spacing: .05em; }
.detail-list dd { margin: 2px 0 0; color: #29435c; font-size: 11px; font-weight: 550; }
.subheading { margin: 0 0 10px; color: #1d3852; font-size: 12px; font-weight: 650; }
.payslip { border: 1px solid #e8edf2; border-radius: 11px; padding: 15px; background: #fbfcfd; }
.payslip dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 9px 14px; margin: 0 0 12px; }
.payslip dt { color: #8b9aa8; font-size: 9px; text-transform: uppercase; letter-spacing: .05em; }
.payslip dd { margin: 2px 0 0; color: #29435c; font-size: 11.5px; font-weight: 600; }
.payslip-total { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding-top: 11px; border-top: 1px dashed #dbe3ea; color: #1d3852; font-size: 11px; font-weight: 650; }
.payslip-total strong { font-size: 16px; }
.card > .form-actions { margin-top: 12px; }
.module-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); gap: 6px; margin-top: 8px; }
.module-check { display: flex; align-items: center; gap: 7px; padding: 7px 9px; border: 1px solid #e3eaf0; border-radius: 8px; color: #5f7183; font-size: 10.5px; cursor: pointer; transition: border-color .15s, background .15s; }
.module-check:hover { border-color: #bcd6e6; background: #f7fafc; }
.module-check input { accent-color: #2f8fc4; }
.module-check svg { width: 15px; height: 15px; flex: 0 0 auto; color: #7c98b0; }
.module-note { margin: 7px 0 0; color: #8b9aa8; font-size: 9px; }
.check-field { display: flex; align-items: center; gap: 8px; color: #435a72; font-size: 12px; cursor: pointer; }
.check-field input { accent-color: #2f8fc4; }

/* Modulo de facturas */
.aging-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 8px; }
.aging-cell { display: grid; gap: 3px; padding: 11px; border: 1px solid #e8edf2; border-radius: 10px; color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.aging-cell:hover, .aging-cell.active { border-color: #9cc9e4; box-shadow: 0 4px 12px rgba(47, 143, 196, .14); }
.aging-label { color: #7f8fa0; font-size: 9px; text-transform: uppercase; letter-spacing: .04em; }
.aging-amount { color: #1d3852; font-size: 14px; font-weight: 700; letter-spacing: -.02em; }
.aging-count { color: #9aa8b5; font-size: 9px; }
.aging-cell.aging-d30 { border-left: 3px solid #e8b64c; }
.aging-cell.aging-d60 { border-left: 3px solid #e08a3c; }
.aging-cell.aging-d90 { border-left: 3px solid #d95c4a; }
.aging-cell.aging-d90plus { border-left: 3px solid #a63b2c; }
.aging-note { margin: 10px 0 0; font-size: 10px; }
.aging-note a { color: #257bb1; }
.debtor-list { display: grid; gap: 9px; }
.debtor-row { display: grid; grid-template-columns: minmax(0, 1fr) 90px auto; grid-template-rows: auto auto; align-items: center; gap: 2px 10px; }
.debtor-name { overflow: hidden; color: #29435c; font-size: 11px; font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }
.debtor-bar { grid-column: 1 / 3; height: 5px; border-radius: 3px; background: #eef2f6; overflow: hidden; }
.debtor-bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #43b9e3, #2f8fc4); }
.debtor-amount { color: #1d3852; font-size: 11.5px; font-weight: 700; text-align: right; }
.debtor-note { grid-column: 1 / -1; color: #9aa8b5; font-size: 9px; }
.cell-sub { display: block; color: #9aa8b5; font-size: 9px; }
.no-results { padding: 20px; color: #91a0ad; font-size: 10px; text-align: center; }
.form-card .field input, .form-card .field select { min-height: 39px; padding: 9px 10px; border-radius: 8px; font-size: 11px; }
.form-card .field textarea { min-height: 72px; padding: 10px; border-radius: 8px; font-size: 11px; }
.field-wide { grid-column: 1 / -1; }
.field-with-action { display: flex; align-items: stretch; gap: 6px; }
.field-with-action input { flex: 1 1 auto; min-width: 0; }
.field-with-action .button { flex: 0 0 auto; white-space: nowrap; }
.form-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; padding-top: 2px; }
.form-actions .button { min-height: 38px; font-size: 10px; }
.directory-card .card-heading, .product-table-card .card-heading, .quote-table-card .card-heading { flex-wrap: wrap; }
.search-box { width: min(180px, 100%); height: 32px; display: flex; align-items: center; gap: 6px; padding: 0 9px; border: 1px solid #e3eaf0; border-radius: 7px; color: #9aabba; background: #fbfcfd; }
.search-box span { font-size: 16px; }
.catalog-search { width: min(290px, 100%); }
.catalog-search input { flex: 1; min-width: 0; width: 100%; height: 28px; padding: 0; border: 0; outline: 0; color: #29435c; background: transparent; font-size: 10px; }
.catalog-search input::placeholder { color: #9aabba; }
.catalog-search button { flex: 0 0 auto; min-height: 24px; padding: 0 9px; border: 0; border-radius: 5px; color: #fff; background: #1972bb; font-size: 9px; font-weight: 650; cursor: pointer; }
.catalog-search button:hover { background: #0d4e89; }
.catalog-search-clear { display: grid; flex: 0 0 auto; width: 22px; height: 22px; place-items: center; border-radius: 50%; color: #71839a; font-size: 17px; line-height: 1; text-decoration: none; }
.catalog-search-clear:hover { color: #29435c; background: #e9eff4; }
.import-categories, .import-records, .import-batches { margin-bottom: 16px; }
.import-module-list { display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 18px 4px; }
.import-module-link { min-height: 30px; display: inline-flex; align-items: center; padding: 0 10px; border-radius: 16px; color: #718397; background: #f4f7f9; font-size: 10px; font-weight: 650; }
.import-module-link:hover, .import-module-link.active { color: #17689e; background: #e9f5fc; }
.import-type-list { display: flex; flex-wrap: wrap; gap: 9px; padding: 14px 18px; }
.import-type-link { min-height: 34px; display: inline-flex; align-items: center; gap: 9px; padding: 0 11px; border: 1px solid #e5ebf0; border-radius: 18px; color: #60768b; background: #fff; font-size: 10px; }
.import-type-link strong { color: #2a78ae; font-size: 10px; }
.import-type-link:hover, .import-type-link.active { border-color: #b8d8ed; color: #17689e; background: #eff8fd; }
.import-payload summary { color: #287eb5; cursor: pointer; font-size: 10px; font-weight: 700; white-space: nowrap; }
.import-edit-form { width: min(620px, 78vw); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 10px; padding: 12px; border: 1px solid #e5ebf0; border-radius: 8px; background: #fbfcfd; white-space: normal; }
.import-edit-form .field { gap: 5px; }
.import-edit-form .field > span { font-size: 9px; }
.import-edit-form .field input, .import-edit-form .field textarea { min-height: 34px; padding: 7px 8px; font-size: 10px; }
.import-edit-form .field-wide, .import-source-note, .import-edit-form .form-actions { grid-column: 1 / -1; }
.import-edit-form .field textarea { min-height: 140px; resize: vertical; font-family: "Cascadia Code", Consolas, monospace; font-size: 9px; line-height: 1.45; }
.import-source-note { margin: 0; color: #8797a6; font-size: 9px; }
.pagination-links { display: flex; justify-content: flex-end; gap: 8px; padding: 13px 18px; border-top: 1px solid #edf1f4; }
.manual-index { margin-bottom: 16px; padding: 18px 20px; }
.manual-index-heading { display: grid; gap: 4px; margin-bottom: 13px; }
.manual-index-heading strong { color: #29435c; font-size: 12px; }
.manual-index-heading span { color: #91a0ae; font-size: 10px; }
.manual-index-links { display: flex; flex-wrap: wrap; gap: 7px; }
.manual-index-links a { min-height: 30px; display: inline-flex; align-items: center; padding: 0 11px; border: 1px solid #e5ebf0; border-radius: 16px; color: #587087; background: #fbfcfd; font-size: 10px; font-weight: 650; }
.manual-index-links a:hover { border-color: #b8d8ed; color: #17689e; background: #eff8fd; }
.manual-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 13px; }
.manual-section { scroll-margin-top: 88px; padding: 19px 20px; }
.manual-section-heading { display: flex; align-items: flex-start; gap: 12px; }
.manual-icon { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 10px; color: #287eb5; background: #e9f4fc; font-size: 17px; }
.manual-section-heading h2 { margin: 1px 0 5px; color: #29435c; font-size: 13px; }
.manual-section-heading p { margin: 0; color: #8192a2; font-size: 10px; line-height: 1.55; }
.manual-section ol { display: grid; gap: 9px; margin: 17px 0 0; padding-left: 20px; color: #5d7388; font-size: 10px; line-height: 1.65; }
.manual-section li { padding-left: 3px; }
.manual-note { margin: 14px 0 0; padding: 10px 11px; border: 1px solid #dcebf4; border-radius: 8px; color: #466983; background: #f2f9fd; font-size: 10px; line-height: 1.6; }
.manual-action { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; color: #237bb3; font-size: 10px; font-weight: 700; }
.manual-action:hover { text-decoration: underline; }
.manual-action span { font-size: 14px; }
.manual-footer { margin: 14px 2px 0; color: #8797a6; font-size: 10px; }
.import-file-name { display: block; margin: 2px 0; color: #647b91; font-size: 9px; }
.search-box input { width: 100%; min-width: 0; border: 0; outline: 0; color: #3b5269; background: transparent; font-size: 10px; }
.search-box input::placeholder { color: #9aa9b7; }
.cell-primary { display: block; color: #39536b; font-size: 10px; font-weight: 700; }
.cell-sub { display: block; margin-top: 4px; color: #98a6b2; font-size: 9px; }
.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.row-action { padding: 3px 0; border: 0; color: #257bb1; background: transparent; cursor: pointer; font-size: 9px; font-weight: 700; }
.row-action:hover { text-decoration: underline; }
.row-danger { color: #a85459; }
.inline-form { display: inline-flex; margin: 0; }
.warehouse-context {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin: 0 0 16px;
  padding: 11px 14px;
  border: 1px solid #dcebf4;
  border-radius: 10px;
  background: #f4fafe;
}
.warehouse-context label,
.warehouse-context > span { color: #31516c; font-size: 11px; font-weight: 700; }
.warehouse-context select {
  min-width: min(280px, 100%);
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid #d5e2ec;
  border-radius: 8px;
  color: #29435c;
  background: #fff;
}
.warehouse-context .button { min-height: 36px; padding: 0 12px; font-size: 10px; }
.active-warehouse-column { color: #17689e !important; background: #eff8fd; font-weight: 750; }
.no-results { padding: 20px; color: #8b9ba9; font-size: 11px; text-align: center; }
.small-icon { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; color: #3e84ac; background: #edf6fb; font-size: 16px; }
.product-grid { grid-template-columns: minmax(270px, .78fr) minmax(0, 1.35fr); }
.product-grid .movement-card { grid-column: 2; grid-row: 1; }
.product-grid .product-table-card { grid-column: 1 / -1; grid-row: 2; }
.product-name-cell { display: flex; align-items: center; gap: 9px; }
.product-image-thumb { width: 38px; height: 38px; flex: 0 0 auto; border: 1px solid #e3eaf0; border-radius: 7px; object-fit: cover; background: #f7f9fb; }
.product-image-detail { display: block; width: min(180px, calc(100% - 36px)); max-height: 180px; margin: 16px 18px 0; border: 1px solid #e3eaf0; border-radius: 10px; object-fit: contain; background: #f8fafc; }
.product-image-dialog-preview { width: min(100%, 220px); max-height: 220px; justify-self: center; border: 1px solid #e3eaf0; border-radius: 10px; object-fit: contain; background: #f8fafc; }
.product-image-dialog input[type="file"] { width: 100%; min-height: 42px; padding: 8px; border: 1px solid #dce5ed; border-radius: 8px; color: #526a80; background: #fbfcfd; font-size: 11px; }
.product-barcode { min-width: 112px; display: grid; justify-items: center; gap: 2px; }
.product-barcode .ean13-svg { width: 112px; height: 31px; max-width: 100%; }
.product-actions-cell .row-action { display: block; }
.stock-critical { color: #b46d13; }
.empty-inline { padding: 20px; color: #92a1af; font-size: 10px; }
.movement-list { padding: 5px 18px; }
.movement-row { min-height: 55px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid #f0f3f6; }
.movement-row:last-child { border: 0; }
.movement-sign { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; font-weight: 800; }
.movement-in { color: #198368; background: #e8f7f0; }
.movement-out { color: #ad5559; background: #fff0f0; }
.movement-adjust { color: #377da6; background: #eaf4fb; }
.movement-name { min-width: 0; display: grid; gap: 3px; }
.movement-name strong { overflow: hidden; color: #425a70; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.movement-name small { overflow: hidden; color: #9aa7b3; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.movement-qty { display: grid; gap: 3px; margin-left: auto; color: #445b70; font-size: 10px; font-weight: 700; text-align: right; }
.movement-qty small { color: #98a6b2; font-size: 9px; font-weight: 450; }
.quote-grid { grid-template-columns: minmax(290px, .83fr) minmax(0, 1.4fr); }
.quote-form-card { grid-column: 1; }
.quote-table-card { grid-column: 2; grid-row: 1 / span 2; }
.quote-item-row { display: grid; grid-template-columns: minmax(0, 1fr) 65px 28px; gap: 6px; margin-bottom: 7px; }
.quote-item-row select, .quote-item-row input { min-height: 36px; padding: 7px; border-radius: 7px; font-size: 9px; }
.remove-item { width: 28px; height: 35px; border: 1px solid #e8edf2; border-radius: 7px; color: #9a6468; background: #fff; cursor: pointer; font-size: 17px; }
.remove-item:hover { border-color: #efc9ca; color: #a94449; background: #fff7f6; }
.add-item { padding: 2px 0; border: 0; color: #277daf; background: transparent; cursor: pointer; font-size: 10px; font-weight: 650; }
.add-item:hover { text-decoration: underline; }
.quote-total { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; padding: 13px 12px; border-radius: 8px; color: #567087; background: #f4f8fb; font-size: 10px; }
.quote-total strong { color: #1d5c88; font-size: 15px; }
.quick-links { display: flex; gap: 16px; padding: 0 20px; }
.heading-actions { display: flex; gap: 8px; }
.quote-document { max-width: 950px; margin: 0 auto; padding: 38px clamp(24px, 5vw, 56px); }
.document-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 27px; border-bottom: 1px solid #e9eef2; }
.document-brand .brand-mark { width: 48px; height: 48px; }
.document-brand .brand-copy strong { color: #17324b; }
.document-brand .brand-copy small { color: #889bac; }
.document-number { display: grid; justify-items: end; gap: 5px; }
.document-number > span:first-child, .document-valid span { color: #92a1ad; font-size: 9px; font-weight: 750; letter-spacing: .11em; }
.document-number > strong { color: #1d4362; font-size: 15px; }
.document-client { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 25px 0; }
.document-client h2 { margin: 7px 0 5px; color: #2d4860; font-size: 17px; }
.document-client p { margin: 3px 0; color: #7d8f9f; font-size: 10px; }
.document-valid { display: grid; gap: 6px; padding: 12px 14px; border: 1px solid #e6edf2; border-radius: 8px; white-space: nowrap; }
.document-valid strong { color: #48637b; font-size: 11px; }
.quote-document th { padding: 0 12px; }
.quote-document td { height: 43px; padding: 8px 12px; }
.document-summary { display: flex; justify-content: space-between; gap: 25px; padding: 24px 0; }
.document-notes { max-width: 440px; }
.document-notes p { color: #718598; font-size: 10px; line-height: 1.7; }
.total-panel { min-width: 190px; display: flex; align-items: center; justify-content: space-between; align-self: flex-start; gap: 20px; padding: 15px; border-radius: 9px; color: #476078; background: #f2f7fa; font-size: 11px; }
.total-panel strong { color: #145a87; font-size: 17px; }
.document-footer { padding-top: 14px; border-top: 1px solid #e9eef2; color: #91a0ad; font-size: 9px; text-align: center; }
.quote-actions { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; max-width: 950px; margin: 16px auto 0; }
.quote-actions > span { margin-right: 7px; color: #7d8e9d; font-size: 10px; }
.user-grid { grid-template-columns: minmax(260px, .75fr) minmax(0, 1.45fr); }
.role-guide { grid-column: 1 / -1; display: flex; align-items: flex-start; gap: 13px; padding: 18px 21px; }
.role-guide h2 { margin: 1px 0 8px; color: #38546b; font-size: 12px; }
.role-guide p { margin: 6px 0; color: #7d8e9d; font-size: 10px; line-height: 1.55; }
.role-guide p strong { color: #496279; }
.current-user-label { color: #98a5b1; font-size: 9px; }
.inline-edit { position: relative; }
.inline-edit > summary { list-style: none; cursor: pointer; color: #257bb1; font-size: 9px; font-weight: 700; }
.inline-edit > summary::-webkit-details-marker { display: none; }
.inline-edit > summary::after { content: ' ▾'; font-size: 8px; }
.inline-edit[open] > summary::after { content: ' ▴'; }
.inline-edit[open] > form { position: absolute; top: calc(100% + 6px); right: 0; z-index: 70; width: 300px; padding: 12px; border: 1px solid #e3eaf0; border-radius: 10px; background: #fff; box-shadow: 0 16px 38px rgba(29, 57, 81, .18); text-align: left; }
.inline-edit[open] > form.stack-form { gap: 8px; }
.account-card { max-width: 710px; }
.readonly-barcode { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 11px; border: 1px solid #e1e9f0; border-radius: 8px; background: #f8fafc; }
.readonly-barcode code, .barcode-value { color: #315773; font-family: "Cascadia Mono", Consolas, monospace; font-size: 10px; letter-spacing: .08em; }
.barcode-print-link { width: fit-content; color: #267bb1; }
.pos-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(350px, .85fr); align-items: start; gap: 16px; }
.pos-terminal, .pos-cart { overflow: hidden; }
.pos-live { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border-radius: 12px; color: #238268; background: #eaf8f1; font-size: 8px; font-weight: 750; letter-spacing: .08em; white-space: nowrap; }
.pos-live i { width: 6px; height: 6px; border-radius: 50%; background: #36b58a; box-shadow: 0 0 7px rgba(54,181,138,.45); }
.scan-form { padding: 22px 20px 0; }
.scan-input { min-height: 56px; display: flex; align-items: center; gap: 9px; padding: 6px; border: 1px solid #d8e5ed; border-radius: 11px; background: #fbfdfe; transition: border .16s, box-shadow .16s; }
.scan-input:focus-within { border-color: #4398c8; box-shadow: 0 0 0 3px rgba(43,143,204,.11); }
.scan-symbol { width: 34px; display: grid; place-items: center; color: #3783ad; font-size: 24px; }
.scan-input input { min-width: 0; flex: 1; padding: 9px 0; border: 0; outline: 0; color: #29455e; background: transparent; font-size: 13px; letter-spacing: .06em; }
.scan-input input::placeholder { color: #9baab7; font-size: 11px; letter-spacing: 0; }
.scan-input .button { min-height: 41px; }
.scan-help { display: flex; align-items: center; gap: 7px; padding: 10px 22px 18px; color: #8d9caa; font-size: 9px; }
.scan-pulse { color: #35ad82; font-size: 9px; text-shadow: 0 0 7px rgba(53,173,130,.4); }
.pos-info { display: flex; align-items: center; gap: 10px; margin: 0 20px 21px; padding: 12px; border: 1px solid #e5edf2; border-radius: 9px; color: #7890a2; background: #f8fbfd; font-size: 9px; line-height: 1.55; }
.pos-info .small-icon { flex: 0 0 auto; }
.recent-sales { border-top: 1px solid #edf1f4; }
.subsection-heading { display: flex; align-items: center; justify-content: space-between; padding: 17px 20px 11px; }
.subsection-heading h3 { margin: 0 0 4px; color: #39536a; font-size: 11px; }
.subsection-heading p { margin: 0; color: #95a3af; font-size: 9px; }
.pos-empty { min-height: 265px; }
.pos-items-table td { height: 58px; padding: 8px 10px; }
.pos-quantity-form { display: flex; align-items: center; gap: 4px; }
.pos-quantity-form input { width: 52px; height: 29px; padding: 4px; border: 1px solid #e2e9ef; border-radius: 6px; color: #3a536a; background: #fff; font-size: 10px; }
.pos-quantity-form .row-action { padding: 5px 3px; }
.pos-checkout { display: grid; gap: 10px; padding: 16px 19px 19px; border-top: 1px solid #edf1f4; background: #fcfdfe; }
.pos-total-row { display: flex; align-items: center; justify-content: space-between; color: #778b9d; font-size: 10px; }
.pos-total-row strong { color: #405a72; font-size: 10px; font-weight: 650; }
.pos-grand-total { margin: 1px 0 3px; padding: 10px 0; border-top: 1px dashed #e0e8ef; color: #314c63; font-size: 12px; font-weight: 700; }
.pos-grand-total strong { color: #135c8a; font-size: 19px; }
.checkout-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; }
.checkout-form .field { gap: 6px; }
.checkout-form .field > span { color: #718496; font-size: 9px; }
.checkout-form .field select, .checkout-form .field input { min-height: 37px; padding: 8px; font-size: 10px; }
.checkout-button { grid-column: 1 / -1; width: 100%; min-height: 45px; justify-content: space-between; }
.checkout-button span { margin-left: auto; padding-left: 10px; }
.payment-note { color: #9aa7b2; font-size: 9px; text-align: center; }
.pos-receipt { max-width: 640px; margin: 0 auto; padding: 27px; }
.receipt-brand { display: flex; align-items: center; gap: 10px; padding-bottom: 16px; border-bottom: 1px solid #e7edf2; }
.receipt-brand .brand-mark { width: 40px; height: 40px; }
.receipt-brand > span:last-child { display: grid; gap: 3px; }
.receipt-brand strong { color: #25435d; font-size: 13px; letter-spacing: .08em; }
.receipt-brand small { color: #91a1af; font-size: 8px; letter-spacing: .1em; }
.receipt-code { display: flex; justify-content: space-between; padding: 13px 0; color: #34536d; font-size: 11px; font-weight: 700; }
.receipt-code small { color: #8597a7; font-size: 9px; font-weight: 450; }
.receipt-totals { display: grid; gap: 8px; width: min(300px, 100%); margin: 14px 0 0 auto; }
.receipt-totals > div { display: flex; justify-content: space-between; gap: 15px; color: #718497; font-size: 10px; }
.receipt-totals strong { color: #38536b; }
.receipt-total { padding-top: 9px; border-top: 1px solid #e7edf2; color: #315069 !important; font-size: 12px !important; font-weight: 700; }
.receipt-total strong { color: #145a87; font-size: 15px; }
.receipt-thanks { margin: 22px 0 4px; color: #7a8d9e; font-size: 10px; text-align: center; }
.label-print-card { padding: 18px; }
.label-controls { display: flex; align-items: end; gap: 12px; margin-bottom: 18px; padding-bottom: 15px; border-bottom: 1px solid #edf1f4; }
.label-controls .field { width: 170px; }
.label-controls .field > span { font-size: 10px; }
.label-controls .field input { min-height: 38px; padding: 8px 10px; border: 1px solid #e1e9f0; border-radius: 8px; color: #39536b; background: #fbfcfd; }
.label-paper-note { padding-bottom: 11px; color: #95a3ae; font-size: 9px; }
.labels-grid { display: grid; grid-template-columns: repeat(auto-fill, 50mm); gap: 3mm; align-content: start; }
.product-label { width: 50mm; height: 30mm; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; padding: 1.3mm 2mm 1mm; border: 1px dashed #ccd7e0; border-radius: 1mm; color: #18364e; text-align: center; }
.label-brand { align-self: flex-start; color: #5a758c; font-size: 5.7pt; font-weight: 750; letter-spacing: .08em; }
.label-product-name { width: 100%; overflow: hidden; margin: 1mm 0 .2mm; color: #1e3549; font-size: 7.2pt; text-overflow: ellipsis; white-space: nowrap; }
.ean13-svg { display: block; width: 46mm; height: 13mm; max-width: 100%; }
.label-code { margin-top: -.2mm; color: #1b3144; font-family: Consolas, monospace; font-size: 7pt; letter-spacing: .2em; }
.label-meta { width: 100%; overflow: hidden; margin-top: .5mm; color: #586e81; font-size: 5.8pt; text-overflow: ellipsis; white-space: nowrap; }
.quote-total-breakdown { display: grid; min-width: 230px; gap: 9px; }
.quote-total-breakdown > div { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.quote-total-breakdown span { color: #687f93; font-size: 10px; }
.quote-total-breakdown strong { color: #36546e; font-size: 11px; }
.quote-total-breakdown .receipt-total { padding-top: 9px; }
.quote-total-breakdown .receipt-total strong { color: #145a87; font-size: 16px; }
.toast { position: fixed; z-index: 20; right: 24px; bottom: 24px; max-width: min(430px, calc(100vw - 40px)); padding: 14px 18px; border: 1px solid #d8e6e1; border-radius: 10px; color: #206d59; background: #effaf5; box-shadow: 0 12px 35px rgba(33, 63, 81, .15); font-size: 12px; animation: toast-in .22s ease-out; }
.toast-error { border-color: #f0d0d1; color: #903c41; background: #fff4f3; }
.toast-success { border-color: #cbe9dd; color: #206d59; background: #effaf5; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-grid, .product-grid, .quote-grid, .user-grid { grid-template-columns: minmax(0, 1fr); }
  .product-image-card { grid-column: 1; }
  .manual-sections { grid-template-columns: minmax(0, 1fr); }
  .product-table-card, .quote-table-card { grid-column: 1; grid-row: auto; }
  .product-grid .product-table-card, .product-grid .movement-card { grid-column: 1; grid-row: auto; }
  .movement-card, .quote-form-card { grid-column: 1; }
  .role-guide { grid-column: 1; }
  .pos-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .login-page { padding: 16px; }
  .login-layout { max-width: 510px; min-height: unset; grid-template-columns: 1fr; border-radius: 20px; }
  .login-panel { min-height: 510px; padding: 38px clamp(25px, 8vw, 50px); }
  .login-heading { margin: 38px 0 25px; }
  .login-aside { min-height: 290px; padding: 35px 30px 49px; }
  .aside-network { width: min(250px, 100%); height: 175px; margin-bottom: 15px; }
  .login-aside h2 { margin: 9px 0 8px; font-size: 27px; }
  .login-aside p { max-width: 480px; font-size: 12px; }
  .aside-line { margin-top: 19px; }
  .topbar-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 10px; padding: 8px 16px 0; }
  .topbar .brand { grid-column: 1; grid-row: 1; }
  .topbar-right { grid-column: 2; grid-row: 1; }
  .secure-note { display: none; }
  .sidebar-user { min-height: 31px; padding: 0; border: 0; }
  .sidebar-user .avatar { width: 25px; height: 25px; font-size: 9px; }
  .sidebar-user-info small { display: none; }
  .logout-form { margin-left: 0; }
  .main-nav { grid-column: 1 / -1; grid-row: 2; width: 100%; justify-content: flex-start; gap: 2px; padding-top: 4px; border-top: 1px solid rgba(189, 219, 240, .11); }
  .nav-link { min-height: 40px; gap: 6px; padding: 0 9px; font-size: 10px; }
  .nav-link > svg { width: 15px; height: 15px; }
  .nav-link > i { right: 8px; left: 8px; height: 2px; }
  .main-content { padding: 24px 17px 35px; }
  .page-heading { align-items: flex-start; margin-bottom: 19px; }
  .page-heading h1 { font-size: 25px; }
  .page-heading p { max-width: 440px; line-height: 1.5; }
  .welcome-banner { min-height: 136px; padding: 23px 20px; }
  .welcome-art { width: 76px; margin-right: 0; }
  .art-bolt { font-size: 48px; }
  .ring-one { width: 76px; height: 76px; }
  .ring-two { width: 54px; height: 54px; }
  .dashboard-grid { grid-template-columns: 1fr; }
}
@media (max-width: 500px) {
  .login-page { padding: 0; align-items: stretch; }
  .login-layout { width: 100%; max-width: none; border: 0; border-radius: 0; }
  .login-panel { min-height: 500px; }
  .login-aside { min-height: 280px; }
  .stats-grid { gap: 9px; }
  .stat-card { grid-template-columns: 33px minmax(0, 1fr); gap: 2px 8px; padding: 13px 11px; }
  .stat-icon { width: 32px; height: 32px; border-radius: 9px; font-size: 15px; }
  .stat-label { font-size: 9px; }
  .stat-value { font-size: 16px; }
  .stat-note { font-size: 8px; }
  .welcome-banner { padding: 20px 16px; }
  .welcome-banner h2 { font-size: 19px; }
  .welcome-banner p { max-width: 225px; font-size: 10px; line-height: 1.5; }
  .welcome-art { width: 56px; }
  .art-bolt { font-size: 37px; }
  .ring-one { width: 58px; height: 58px; }
  .ring-two { width: 41px; height: 41px; }
  .date-pill, .count-pill { min-height: 29px; padding: 0 9px; font-size: 9px; }
  .card-heading { padding: 14px; }
  .form-card > .form-grid { grid-template-columns: 1fr; padding: 15px 14px 0; }
  .form-card .field-wide, .form-actions, .quote-total { grid-column: 1; }
  .search-box { width: 100%; }
  .import-edit-form { width: min(600px, 78vw); }
  .directory-card .card-heading, .product-table-card .card-heading, .quote-table-card .card-heading { align-items: flex-start; }
  .heading-actions { flex-wrap: wrap; justify-content: flex-end; }
  .heading-actions .button { min-height: 34px; padding: 0 10px; font-size: 9px; }
  .quote-document { padding: 23px 15px; }
  .document-top { gap: 8px; }
  .document-brand { gap: 7px; }
  .document-brand .brand-mark { width: 36px; height: 36px; }
  .document-brand .brand-copy strong { font-size: 11px; }
  .document-brand .brand-copy small { font-size: 6px; }
  .document-number > strong { font-size: 11px; }
  .document-client { flex-direction: column; gap: 12px; }
  .document-summary { flex-direction: column; }
  .total-panel { align-self: stretch; }
  .checkout-form { grid-template-columns: 1fr; }
  .checkout-form .field, .checkout-button { grid-column: 1; }
  .label-controls { align-items: stretch; flex-direction: column; }
  .label-controls .field { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .aside-network img { animation: none; }
}
@media print {
  @page { size: A4 portrait; margin: 6mm; }
  @page catalog { size: A4 landscape; margin: 6mm; }
  body, .app-page { background: white !important; }
  .topbar, .page-heading, .quote-actions, .toast { display: none !important; }
  .print-mode .topbar,
  .print-mode .toast,
  .print-mode .hr-tabs,
  .print-mode .hr-actions,
  .print-mode .filter-bar,
  .print-mode .form-card,
  .print-mode .catalog-print-controls { display: none !important; }
  .print-mode .page-heading { display: flex !important; }
  .print-mode .page-heading .button,
  .print-mode .page-heading .heading-actions,
  .print-mode .page-heading form { display: none !important; }
  .print-mode .card { break-inside: avoid; box-shadow: none; }
  .app-shell { display: block; }
  .main-content { max-width: none; padding: 0; }
  .quote-document { max-width: none; border: 0; box-shadow: none; }
  .label-print-card { border: 0; box-shadow: none; padding: 0; }
  .label-controls { display: none; }
  .label-sheet-grid { display: none !important; }
  .label-print-card .card-heading { display: none !important; }
  .labels-grid { grid-template-columns: repeat(3, 50mm); gap: 2mm; }
  .product-label { border: .15mm solid #bac5ce; page-break-inside: avoid; }
  .pos-receipt { max-width: 100%; border: 0; box-shadow: none; }
  .catalog-print { page: catalog; }
  .catalog-print .topbar,
  .catalog-print .main-content > :not(.page-heading):not(.product-grid),
  .catalog-print .product-grid > :not(.product-table-card) { display: none !important; }
  .catalog-print .page-heading { display: flex !important; margin: 0 0 3mm; }
  .catalog-print .page-heading h1 { margin: 1mm 0; font-size: 15pt; }
  .catalog-print .page-heading p { color: #536273; font-size: 7pt; }
  .catalog-print .product-table-card { border: 0; box-shadow: none; }
  .catalog-print .product-table-card .card-heading { min-height: 0; padding: 0 0 2mm; border: 0; }
  .catalog-print .product-table-card .card-heading .heading-actions { display: none; }
  .catalog-print .table-wrap { overflow: visible; }
  .catalog-print table { table-layout: fixed; }
  .catalog-print th, .catalog-print td { height: auto; padding: 1.2mm 1mm; color: #263746; font-size: 6.5pt; white-space: normal; }
  .catalog-print th { color: #394e60; font-size: 6pt; }
  .catalog-print td { vertical-align: middle; }
  .catalog-print tbody tr { break-inside: avoid; }
  .catalog-print thead { display: table-header-group; }
  .catalog-print th:nth-child(1) { width: 17%; }
  .catalog-print th:nth-child(2) { width: 15%; }
  .catalog-print th:nth-child(3) { width: 10%; }
  .catalog-print th:nth-child(4) { width: 6%; }
  .catalog-print th:nth-child(5), .catalog-print th:nth-child(6) { width: 8%; }
  .catalog-print th:nth-child(7) { width: 9%; }
  .catalog-print th:nth-child(8) { width: 8%; }
  .catalog-print th:nth-child(9) { width: 9%; }
  .catalog-print th.product-actions-heading,
  .catalog-print td.product-actions-cell { display: none; }
  .catalog-print .product-barcode { min-width: 0; }
  .catalog-print .product-barcode .ean13-svg { width: 28mm; height: 8mm; }
  .catalog-print .barcode-value { font-size: 5.5pt; letter-spacing: .04em; }
  .catalog-print .cell-primary { font-size: 6.5pt; }
  .catalog-print .cell-sub { margin-top: .5mm; color: #526375; font-size: 5.5pt; }
  .catalog-print .status-badge { min-height: 0; padding: .5mm 1mm; border: 0; color: #263746; background: transparent; font-size: 5.5pt; }
}

/* Ponche de asistencia por reconocimiento facial. */

.face-enroll-card .face-camera {
  position: relative; display: flex; justify-content: center; align-items: center;
  min-height: 260px; margin: 16px 0; padding: 12px; border: 1px dashed #cfdae4;
  border-radius: 14px; background: #101c28; overflow: hidden;
}
.face-camera video { max-width: 100%; max-height: 420px; border-radius: 10px; background: #0a141d; }
.face-camera-canvas { position: absolute; inset: 0; margin: auto; pointer-events: none; }
.face-camera-status {
  position: absolute; left: 12px; bottom: 12px; padding: 6px 11px; border-radius: 999px;
  background: rgba(9, 20, 31, .78); color: #dbe7f1; font-size: 11px;
}

/* Terminal: pantalla completa, un solo mando y letra grande. */
.face-terminal-body { margin: 0; background: #0c1822; color: #e7f0f7; font-family: inherit; }
.face-terminal { max-width: 760px; margin: 0 auto; padding: 22px 18px 34px; text-align: center; }
.face-terminal-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.face-terminal-logo { height: 42px; background: #fff; border-radius: 9px; padding: 4px 8px; }
.face-terminal-head h1 { margin: 0; font-size: 19px; letter-spacing: .01em; }
.face-terminal-head p { margin: 2px 0 0; font-size: 12px; color: #92a8ba; text-transform: capitalize; }
.face-kind-toggle {
  padding: 8px 17px; border: 1px solid #2b4256; border-radius: 999px; background: transparent;
  color: #a9c0d2; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; cursor: pointer;
}
.face-kind-toggle.active { background: #2f7fc1; border-color: #2f7fc1; color: #fff; }
.face-kind-group { display: inline-flex; gap: 6px; margin-left: auto; }
.face-kind-toggle[data-face-kind="auto"] { border-style: dashed; }
.face-kind-toggle[data-face-kind="auto"].active { border-style: solid; background: #1d7a4c; border-color: #1d7a4c; }
.face-terminal-stage { position: relative; background: #060e15; border-radius: 16px; overflow: hidden; min-height: 330px; }
.face-terminal-stage video { width: 100%; display: block; }
.face-terminal-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.face-terminal-overlay {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%);
  padding: 9px 19px; border-radius: 999px; background: rgba(8, 18, 28, .82);
  color: #e7f0f7; font-size: 14px; font-weight: 600; white-space: nowrap;
}
.face-terminal-overlay[data-tone="ok"] { background: #1d7a4c; }
.face-terminal-overlay[data-tone="error"] { background: #a53030; }
.face-terminal-actions { display: flex; align-items: center; justify-content: center; gap: 15px; margin: 18px 0 10px; flex-wrap: wrap; }
.button-xl { padding: 15px 32px; font-size: 15px; }
.face-terminal-state { font-size: 12px; color: #92a8ba; }
.face-terminal-result { margin: 14px 0 0; padding: 15px; border-radius: 12px; font-size: 19px; font-weight: 700; }
.face-terminal-result[data-tone="ok"] { background: #12402c; color: #7ee2ad; }
.face-terminal-result[data-tone="error"] { background: #3d1b1b; color: #f2a3a3; }
.face-terminal-warning { margin: 16px 0 0; padding: 13px 15px; border-radius: 11px; background: #3a2f14; color: #f3dda1; font-size: 13px; line-height: 1.5; }
.face-terminal-warning code { background: rgba(0, 0, 0, .3); padding: 1px 5px; border-radius: 4px; }
.face-terminal-warning a { color: #9fd0f2; }
.face-terminal-foot { margin: 22px 0 0; font-size: 12px; }
.face-terminal-foot a { color: #7f9bb0; }

/* ------------------------------------------------------------------ */
/* CRM: pipeline de oportunidades, filtros de pestanas y alertas.      */
/* ------------------------------------------------------------------ */
.tone-red { color: #a84a50; background: #fff0f0; }
.filter-form { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.filter-form select { height: 32px; padding: 0 9px; border: 1px solid #dde5ec; border-radius: 8px; background: #fff; color: #4a6076; font-size: 10px; }
.filter-form .search-box { width: 190px; }
.alert-notice { margin: 0 0 18px; padding: 12px 14px; border: 1px solid #f0dfc0; border-radius: 9px; color: #8a5a12; background: #fff8ea; font-size: 12px; line-height: 1.55; }
.pipeline-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; padding: 18px 19px; }
.pipeline-column { display: flex; flex-direction: column; gap: 9px; min-width: 0; padding: 10px; border: 1px solid #e8edf2; border-radius: 11px; background: #f9fbfd; }
.pipeline-head { display: flex; flex-direction: column; gap: 3px; padding: 8px 9px; border: 1px solid transparent; border-radius: 8px; }
.pipeline-head strong { font-size: 11px; color: inherit; }
.pipeline-head span { font-size: 10px; color: inherit; opacity: .8; }
.pipeline-head.tone-blue { color: #287eb5; background: #e9f4fc; }
.pipeline-head.tone-amber { color: #bd801e; background: #fff5df; }
.pipeline-head.tone-red { color: #a84a50; background: #fff0f0; }
.pipeline-head.tone-green { color: #218d71; background: #e7f7f0; }
.pipeline-head.tone-grey { color: #718294; background: #eef2f5; }
.pipeline-card { display: grid; gap: 3px; padding: 9px; border: 1px solid #e8edf2; border-radius: 9px; background: #fff; text-decoration: none; box-shadow: 0 2px 6px rgba(29, 57, 81, .04); }
.pipeline-card:hover { border-color: #cfe1ee; }
.pipeline-card strong { color: #29435c; font-size: 11px; overflow-wrap: anywhere; }
.pipeline-card small { color: #91a0ae; font-size: 9px; }
.pipeline-card span { color: #41596f; font-size: 10px; font-weight: 700; }
.pipeline-empty { margin: 0; padding: 10px 4px; color: #93a2b0; font-size: 10px; text-align: center; }

@media (max-width: 1100px) {
  .pipeline-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .pipeline-grid { grid-template-columns: minmax(0, 1fr); }
  .filter-form .search-box { width: 100%; }
}

/* ------------------------------------------------------------------ */
/* Proyectos: tarjetas, pestanas de obra y estado financiero.          */
/* ------------------------------------------------------------------ */
.projects-tabs { display: flex; flex-wrap: wrap; gap: 9px; margin: 0 0 18px; padding: 10px 13px; border: 1px solid #e8edf2; border-radius: 12px; background: #fff; }
.projects-tabs a { color: #5c7080; font-size: 11px; text-decoration: none; }
.projects-tabs a.active { color: #0d6efd; font-weight: 700; }
.projects-tabs a i { margin-left: 5px; font-style: normal; color: #93a2b0; font-weight: 500; }
.projects-tabs a.active i { color: #0d6efd; }
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 15px; }
.project-card { display: flex; flex-direction: column; gap: 12px; }
.project-card-head { display: grid; gap: 5px; }
.project-card-head .project-code { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.project-card-head .project-code strong { color: #29435c; font-size: 13px; }
.project-card-head small { color: #91a0ae; font-size: 9px; overflow-wrap: anywhere; }
.project-card-body { display: grid; gap: 6px; color: #41596f; font-size: 10px; }
.project-card-body span { display: flex; align-items: center; gap: 7px; }
.project-card-body span b { min-width: 82px; color: #93a2b0; font-weight: 500; }
.project-meta { display: flex; flex-wrap: wrap; gap: 7px 14px; padding: 11px 13px; margin: 0 0 16px; border: 1px solid #e8edf2; border-radius: 12px; background: #fff; font-size: 10px; color: #41596f; }
.project-meta b { display: block; color: #0d2238; font-size: 12px; }
.project-meta span { display: grid; gap: 2px; }
.project-meta .project-meta-label { color: #93a2b0; font-size: 9px; }
.progress-track { height: 8px; border-radius: 999px; background: #e9eef3; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 999px; background: #28a087; }
.progress-fill.tone-red { background: #c1504a; }
.progress-fill.tone-amber { background: #d99a2b; }
.progress-caption { display: flex; justify-content: space-between; color: #91a0ae; font-size: 9px; }
.project-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.project-note { margin: 14px 0 0; padding: 11px 13px; border-radius: 9px; background: #f4f8fb; color: #56708a; font-size: 10px; line-height: 1.55; }

/* ------------------------------------------------------------------ */
/* Despachos y almacen: pestanas, avisos y listas.                     */
/* ------------------------------------------------------------------ */
.module-tabs { display: flex; flex-wrap: wrap; gap: 9px; margin: 0 0 18px; padding: 10px 13px; border: 1px solid #e8edf2; border-radius: 12px; background: #fff; }
.module-tabs a { color: #5c7080; font-size: 11px; text-decoration: none; }
.module-tabs a.active { color: #0d6efd; font-weight: 700; }
.notice { margin: 0 0 18px; padding: 12px 14px; border: 1px solid; border-radius: 9px; font-size: 12px; font-weight: 500; line-height: 1.55; }
.notice-info { border-color: #c8e2f4; color: #2876aa; background: #eef7fd; }
.notice-success { border-color: #c5e9dc; color: #198368; background: #eefaf5; }
.notice-error { border-color: #f2d1d3; color: #a84a50; background: #fdf2f2; }
.module-doc { margin: 8px 0 0; color: #41596f; font-size: 11px; }
.list-group { display: grid; gap: 9px; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 13px; border: 1px solid #eef2f6; border-radius: 11px; background: #fbfdff; }
.list-main { display: grid; gap: 3px; }
.list-main strong { color: #29435c; font-size: 12px; }
.text-muted { color: #91a0ae; }
.form-row { display: flex; flex-wrap: wrap; gap: 9px; }
.checkbox-field { display: flex; align-items: center; gap: 8px; font-size: 11px; color: #41596f; }

/* Ajustes globales de contraste para mantener legible el contenido del CRM. */
.app-page .main-content { color: #203247; }
.app-page .page-heading h1 { color: #13283d; }
.app-page .page-heading p,
.app-page .card-heading p,
.app-page .stat-label,
.app-page .chart-legend,
.app-page .live-refresh,
.app-page .dashboard-refresh-status,
.app-page .no-activity,
.app-page .empty-state p,
.app-page .stock-name small,
.app-page .stock-level small,
.app-page .warehouse-select-code,
.app-page .warehouse-select-info p,
.app-page .aging-label,
.app-page .aging-count,
.app-page .debtor-note,
.app-page .cell-sub,
.app-page .field-hint,
.app-page .form-hint,
.app-page .module-note,
.app-page .text-muted,
.app-page .manual-index-heading span,
.app-page .manual-section-heading p,
.app-page .manual-footer,
.app-page .import-source-note,
.app-page .label-paper-note,
.app-page .progress-caption,
.app-page .project-card-head small,
.app-page .project-meta .project-meta-label {
  color: #5a6d80;
}
.app-page .main-content small { color: #5a6d80; }
.app-page .stat-note { color: #5a6d80; font-size: 10px; }
.app-page .card { border-color: #d4dde6; box-shadow: 0 3px 12px rgba(31, 57, 80, .045); }
.app-page .card-heading { border-bottom-color: #e1e7ed; }
.app-page thead { background: #f1f4f7; }
.app-page th { color: #4f6275; font-size: 10px; }
.app-page td { color: #43596e; font-size: 11px; }
.app-page .money-cell,
.app-page .cell-primary,
.app-page .stat-value,
.app-page .aging-amount,
.app-page .debtor-name,
.app-page .debtor-amount,
.app-page .warehouse-select-info h2,
.app-page .manual-section-heading h2,
.app-page .manual-index-heading strong,
.app-page .list-main strong {
  color: #20384f;
}
.app-page .field,
.app-page .field > span,
.app-page .checkbox-field { color: #334a60; }
.app-page input::placeholder,
.app-page textarea::placeholder { color: #687b8e; opacity: 1; }
.app-page .search-box { color: #596d81; border-color: #d1dbe4; background: #fff; }
.app-page .search-box input::placeholder { color: #687b8e; }
.app-page .list-row,
.app-page .import-edit-form { border-color: #d7e0e8; }

/* Calendario de asistencia */
.attendance-calendar { padding: 0 19px 12px; }
.cal-weekdays, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-weekdays { margin-bottom: 6px; }
.cal-weekdays span { text-align: center; font-size: 11px; font-weight: 700; letter-spacing: .04em; color: #7c8fa1; text-transform: uppercase; }
.cal-cell { min-height: 62px; padding: 7px 8px; display: flex; flex-direction: column; gap: 4px; border: 1px solid #e2ecf3; border-radius: 9px; background: #fff; }
.cal-cell > strong { font-size: 12px; color: #3b5166; }
.cal-empty { border-color: transparent; background: transparent; }
.cal-weekend { background: #f6fafd; }
.cal-today { border-color: #197abd; box-shadow: inset 0 0 0 1px #197abd; }
.cal-pill { align-self: flex-start; min-width: 18px; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 700; font-style: normal; text-align: center; }
.cal-present { color: #206d59; background: #e2f4ec; }
.cal-absent { color: #903c41; background: #fbe7e8; }
.cal-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.cal-late { background: #d49323; }
.cal-weekend-dot { background: #cdd8e2; }
.cal-here { background: #197abd; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 16px; padding: 0 19px 19px; font-size: 11px; color: #63788d; }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }

/* Combos con búsqueda automática: productos, clientes y proveedores. */
.combo { position: relative; min-width: 0; }
.combo::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 12px;
  width: 6px;
  height: 6px;
  margin-top: -5px;
  border-right: 1.5px solid #8ba0b5;
  border-bottom: 1.5px solid #8ba0b5;
  transform: rotate(45deg);
  pointer-events: none;
}
.combo .combo-input { box-sizing: border-box; padding-right: 27px; }
.form-card .field .combo .combo-input { padding-right: 27px; }
.line-table .combo .combo-input { padding-right: 27px; }
.combo-list {
  position: absolute;
  z-index: 45;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 244px;
  overflow-y: auto;
  padding: 5px;
  border: 1px solid #dce5ed;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(12, 33, 52, .16);
}
.combo-list[hidden] { display: none; }
.combo-option {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  padding: 7px 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.combo-option:hover, .combo-option.is-active { background: #edf6fc; }
.combo-option strong { font-size: 11px; font-weight: 650; color: #24455f; }
.combo-option span { font-size: 9.5px; color: #7d91a5; letter-spacing: .02em; }
