:root {
  --ink: #10284d;
  --ink-deep: #081a35;
  --blue: #155eef;
  --blue-soft: #eaf1ff;
  --paper: #f5f7fa;
  --white: #ffffff;
  --text: #182230;
  --muted: #667085;
  --line: #dfe5ec;
  --orange: #f79009;
  --green: #12b76a;
  --red: #f04438;
  --violet: #7a5af8;
  --shadow: 0 18px 45px rgba(16, 40, 77, 0.08);
  --display: "Avenir Next Condensed", "Arial Narrow", sans-serif;
  --body: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: var(--paper);
  font-family: var(--body);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 100; left: 20px; top: -60px; padding: 10px 16px; color: white; background: var(--blue); border-radius: 4px; transition: top .2s; }
.skip-link:focus { top: 14px; }
:focus-visible { outline: 3px solid rgba(21, 94, 239, .35); outline-offset: 3px; }

.login-screen { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, 1.05fr) minmax(480px, .95fr); background: white; }
.login-atmosphere { position: relative; min-height: 100vh; overflow: hidden; color: white; background: #071b35; }
.login-grid { position: absolute; inset: 0; opacity: .75; background-image: linear-gradient(rgba(74,154,255,.085) 1px, transparent 1px), linear-gradient(90deg, rgba(74,154,255,.085) 1px, transparent 1px); background-size: 36px 36px; }
.login-atmosphere::before { content: ""; position: absolute; width: 58vw; height: 58vw; right: -29vw; top: -20vw; border: 1px solid rgba(80,164,255,.15); border-radius: 50%; box-shadow: 0 0 0 90px rgba(80,164,255,.025), 0 0 0 180px rgba(80,164,255,.018); }
.login-atmosphere::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 32%; background: linear-gradient(transparent, rgba(2,12,27,.65)); pointer-events: none; }
.login-drawing { position: relative; z-index: 1; min-height: 100vh; padding: 48px 56px; }
.drawing-label { position: absolute; color: #6f91b8; font-family: var(--mono); font-size: 8px; letter-spacing: 1.5px; }
.drawing-label--top { top: 48px; left: 56px; }
.drawing-label--bottom { right: 46px; bottom: 40px; transform: rotate(-90deg); transform-origin: right bottom; }
.drawing-n { position: absolute; right: 8%; top: 4%; color: rgba(41,135,245,.12); font-family: var(--display); font-size: clamp(320px, 43vw, 650px); font-weight: 900; line-height: .85; letter-spacing: -40px; transform: skewX(-8deg); }
.drawing-line { position: absolute; background: #2386f2; transform-origin: left center; }
.drawing-line--one { width: 64%; height: 1px; left: 15%; top: 29%; transform: rotate(-16deg); }
.drawing-line--one::before, .drawing-line--one::after, .drawing-line--two::before { content: ""; position: absolute; width: 7px; height: 7px; top: -4px; background: #68b0ff; border: 2px solid #071b35; border-radius: 50%; box-shadow: 0 0 0 1px #68b0ff; }
.drawing-line--one::before { left: 0; }
.drawing-line--one::after { right: 0; }
.drawing-line--two { width: 42%; height: 1px; right: -2%; bottom: 24%; transform: rotate(30deg); background: rgba(104,176,255,.45); }
.drawing-line--two::before { left: 0; }
.drawing-copy { position: absolute; left: 9%; bottom: 15%; max-width: 500px; }
.drawing-copy > span { display: flex; align-items: center; gap: 10px; margin-bottom: 17px; color: #66aefe; font-family: var(--mono); font-size: 9px; letter-spacing: 1.8px; text-transform: uppercase; }
.drawing-copy > span::before { content: ""; width: 26px; height: 1px; background: #66aefe; }
.drawing-copy strong { display: block; font-family: var(--display); font-size: clamp(48px, 5vw, 76px); font-weight: 650; line-height: .88; letter-spacing: -2px; }
.drawing-copy p { margin: 22px 0 0; color: #7891ad; font-size: 11px; line-height: 1.6; }
.login-entry { display: grid; place-items: center; min-height: 100vh; padding: 42px clamp(32px, 5vw, 90px); background: #fbfcfe; }
.login-card { width: min(100%, 430px); }
.login-logo { display: block; width: 238px; height: auto; margin: 0 0 40px -22px; }
.login-heading .section-kicker { margin-bottom: 10px; }
.login-heading h1 { margin: 0; color: var(--ink); font-family: var(--display); font-size: clamp(37px, 4vw, 50px); line-height: .96; letter-spacing: -1.5px; }
.login-heading > p:last-child { margin: 13px 0 0; color: var(--muted); font-size: 11px; }
.login-fields { margin-top: 33px; }
.login-fields > label, .password-label label { color: #344054; font-size: 10px; font-weight: 700; }
.password-label { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; }
.password-label a { color: var(--blue); font-size: 9px; font-weight: 650; }
.login-input { height: 46px; display: grid; grid-template-columns: 20px 1fr auto; align-items: center; gap: 8px; margin-top: 8px; padding: 0 12px; background: white; border: 1px solid #d7dee8; border-radius: 7px; transition: border-color .2s, box-shadow .2s; }
.login-input:focus-within { border-color: #79a8ff; box-shadow: 0 0 0 4px rgba(21,94,239,.09); }
.login-input > svg { width: 17px; height: 17px; color: #98a2b3; }
.login-input input { min-width: 0; height: 100%; color: var(--text); background: transparent; border: 0; outline: 0; font-size: 11px; }
.login-input input::placeholder { color: #a5adba; }
.password-toggle { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; color: #98a2b3; background: transparent; border: 0; border-radius: 4px; cursor: pointer; }
.password-toggle svg { width: 17px; height: 17px; }
.login-error { min-height: 17px; margin: 8px 0 0; color: var(--red); font-size: 9px; }
.login-submit { width: 100%; min-height: 46px; justify-content: space-between; margin-top: 2px; padding: 0 17px; }
.login-submit span { font-size: 17px; font-weight: 400; }
.secure-access { display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 11px; margin-top: 24px; padding: 13px 14px; background: #f3f7ff; border: 1px solid #dce8ff; border-radius: 7px; }
.secure-access__icon { display: grid; place-items: center; width: 34px; height: 34px; color: var(--blue); background: white; border: 1px solid #dce8ff; border-radius: 50%; }
.secure-access__icon svg { width: 17px; height: 17px; }
.secure-access p, .secure-access strong, .secure-access p span { display: block; margin: 0; }
.secure-access strong { color: var(--ink); font-size: 9px; }
.secure-access p span { margin-top: 3px; color: #71809a; font-size: 8px; line-height: 1.4; }
.prototype-note { margin: 14px 0 0; color: #98a2b3; font-size: 8px; line-height: 1.45; }
.prototype-note a { color: #1da9ea; font-weight: 700; text-decoration: none; }
.prototype-note a:hover { text-decoration: underline; }

.app-shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: fixed;
  z-index: 20;
  inset: 0 auto 0 0;
  width: 248px;
  display: flex;
  flex-direction: column;
  color: #d8e2f2;
  background:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px),
    var(--ink-deep);
  background-size: 28px 28px;
  padding: 26px 18px 18px;
}
.brand { display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 8px; color: white; }
.brand-mark { position: relative; display: block; width: 31px; height: 31px; transform: skewY(-8deg); }
.brand-mark i { position: absolute; display: block; width: 9px; background: var(--blue); }
.brand-mark i:nth-child(1) { height: 18px; left: 0; bottom: 2px; }
.brand-mark i:nth-child(2) { height: 27px; left: 11px; bottom: 2px; background: #f2f6ff; }
.brand-mark i:nth-child(3) { height: 13px; left: 22px; bottom: 2px; background: #57a0ff; }
.brand-name { font-family: var(--display); font-size: 24px; font-weight: 800; letter-spacing: -.8px; }
.brand-name span { font-weight: 500; }
.brand--logo { position: relative; width: 100%; height: 54px; padding: 4px 7px; overflow: hidden; background: white; border: 1px solid rgba(255,255,255,.18); border-radius: 7px; }
.brand--logo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; border-radius: 4px; mix-blend-mode: multiply; }
body[data-role="owner"] .brand--logo { background: #dff5e7; border-color: #58b77c; }
body[data-role="employee"] .brand--logo { background: #fff4c8; border-color: #d9a91d; }
body[data-role="sales"] .brand--logo { background: #fff4c8; border-color: #d9a91d; }
.primary-nav { margin-top: 36px; }
.nav-label { margin: 0 12px 9px; color: #7688a4; font-family: var(--mono); font-size: 9px; letter-spacing: 1.5px; text-transform: uppercase; }
.nav-label--second { margin-top: 28px; }
.nav-item { position: relative; display: flex; align-items: center; gap: 13px; min-height: 44px; margin: 3px 0; padding: 0 12px; border-radius: 7px; color: #a9b9cf; font-size: 13px; font-weight: 600; transition: background .18s, color .18s, transform .18s; }
.nav-item svg { width: 19px; height: 19px; }
.nav-item:hover { color: white; background: rgba(255,255,255,.06); transform: translateX(2px); }
.nav-item.is-active { color: white; background: linear-gradient(90deg, rgba(21,94,239,.42), rgba(21,94,239,.12)); }
.nav-item.is-active::before { content: ""; position: absolute; left: -18px; width: 3px; height: 24px; background: #5da2ff; border-radius: 0 3px 3px 0; }
.nav-count { margin-left: auto; min-width: 22px; padding: 3px 6px; text-align: center; color: #b9d3ff; background: rgba(21,94,239,.25); border-radius: 12px; font-family: var(--mono); font-size: 10px; }
.sidebar-bottom { margin-top: auto; }
.capacity { margin: 0 5px 18px; padding: 14px; border: 1px solid rgba(255,255,255,.08); border-radius: 8px; background: rgba(255,255,255,.035); }
.capacity-label { display: flex; justify-content: space-between; gap: 10px; color: #c7d3e3; font-size: 10px; }
.capacity-label strong { color: white; }
.capacity-track { height: 4px; margin: 10px 0 8px; background: rgba(255,255,255,.1); border-radius: 5px; overflow: hidden; }
.capacity-track i { display: block; width: 78%; height: 100%; background: linear-gradient(90deg, #4285ff, #79b6ff); border-radius: inherit; }
.capacity small { color: #7588a5; font-size: 9px; }
.profile-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 34px; align-items: center; border-top: 1px solid rgba(255,255,255,.08); }
.profile { width: 100%; display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 10px; padding: 12px 7px; color: white; text-align: left; }
.profile .avatar { display: grid; place-items: center; width: 34px; height: 34px; background: #dbe7fa; color: var(--ink); border-radius: 50%; font-size: 10px; font-weight: 800; }
.profile strong, .profile small { display: block; }
.profile strong { font-size: 10px; }
.profile small { margin-top: 3px; color: #70839f; font-size: 9px; }
.logout-button { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; color: #7185a1; background: transparent; border: 0; border-radius: 5px; cursor: pointer; transition: color .15s, background .15s; }
.logout-button:hover { color: white; background: rgba(255,255,255,.07); }
.logout-button svg { width: 17px; height: 17px; }

.main { grid-column: 2; min-width: 0; }
.topbar { position: sticky; z-index: 15; top: 0; height: 72px; display: grid; grid-template-columns: minmax(145px, 1fr) minmax(260px, 440px) minmax(270px, 1fr); align-items: center; gap: 30px; padding: 0 42px; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.date-block span, .date-block strong { display: block; }
.date-block span { color: #667085; font-family: var(--mono); font-size: 9px; letter-spacing: 1.6px; }
.date-block strong { margin-top: 4px; color: var(--ink); font-family: var(--mono); font-size: 11px; letter-spacing: .7px; }
.global-search { height: 38px; display: grid; grid-template-columns: 20px 1fr auto; align-items: center; gap: 8px; padding: 0 11px; color: #98a2b3; background: var(--paper); border: 1px solid #e6eaf0; border-radius: 7px; transition: border-color .2s, box-shadow .2s; }
.global-search:focus-within { border-color: #9bbcff; box-shadow: 0 0 0 3px rgba(21,94,239,.1); }
.global-search svg { width: 17px; }
.global-search input { width: 100%; min-width: 0; color: var(--text); background: none; border: 0; outline: 0; font-size: 11px; }
.global-search input::placeholder { color: #98a2b3; }
.global-search kbd { padding: 3px 6px; color: #98a2b3; background: white; border: 1px solid #d8dee8; border-radius: 4px; font-family: var(--body); font-size: 9px; box-shadow: 0 1px 0 #d8dee8; }
.top-actions { justify-self: end; display: flex; align-items: center; gap: 12px; }
.role-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; color: #52647d; background: #f1f4f8; border-radius: 20px; font-family: var(--mono); font-size: 8px; font-weight: 700; text-transform: uppercase; }
.role-pill i { width: 6px; height: 6px; background: var(--blue); border-radius: 50%; box-shadow: 0 0 0 3px rgba(21,94,239,.1); }
.role-pill.is-owner { color: #067647; background: #ecfdf3; }
.role-pill.is-owner i { background: #12b76a; box-shadow: 0 0 0 3px rgba(18,183,106,.14); }
.role-pill.is-employee { color: #8a5b00; background: #fff7d6; }
.role-pill.is-employee i { background: #e3aa12; box-shadow: 0 0 0 3px rgba(227,170,18,.16); }
.role-pill.is-sales { color: #175ea8; background: #edf5ff; }
.icon-button { position: relative; display: grid; place-items: center; width: 38px; height: 38px; padding: 0; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 7px; cursor: pointer; }
.icon-button svg { width: 18px; height: 18px; }
.icon-button.has-notice::after { content: ""; position: absolute; top: 7px; right: 7px; width: 6px; height: 6px; background: var(--red); border: 2px solid white; border-radius: 50%; }
.button { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 16px; border: 1px solid transparent; border-radius: 6px; font-size: 11px; font-weight: 700; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s; }
.button:hover { transform: translateY(-1px); }
.button svg { width: 15px; height: 15px; stroke-width: 2.2; }
.button--primary { color: white; background: var(--blue); box-shadow: 0 5px 12px rgba(21,94,239,.22); }
.button--primary:hover { background: #074ed7; box-shadow: 0 7px 16px rgba(21,94,239,.3); }
.button--secondary { color: var(--ink); background: white; border-color: var(--line); }
.menu-button { display: none; width: 38px; height: 38px; padding: 9px; background: white; border: 1px solid var(--line); border-radius: 6px; }
.menu-button span { display: block; height: 2px; margin: 4px 0; background: var(--ink); }

.page { max-width: 1520px; margin: 0 auto; padding: 40px 42px 70px; }
.intro { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 30px; }
.eyebrow, .section-kicker { margin: 0 0 8px; color: var(--blue); font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: 1.3px; text-transform: uppercase; }
.eyebrow { display: flex; align-items: center; gap: 8px; }
.eyebrow span { width: 20px; height: 1px; background: var(--blue); }
.intro h1 { margin: 0; color: var(--ink); font-family: var(--display); font-size: clamp(34px, 3vw, 48px); line-height: .98; letter-spacing: -1.6px; }
.intro > div > p:last-child { margin: 10px 0 0; color: var(--muted); font-size: 12px; }
.weather { display: flex; align-items: center; gap: 10px; padding-bottom: 3px; color: var(--ink); }
.weather-icon { display: grid; place-items: center; width: 34px; height: 34px; color: var(--orange); background: #fff6e7; border-radius: 50%; font-size: 21px; }
.weather > strong { font-family: var(--display); font-size: 23px; }
.weather > span:last-child { padding-left: 9px; border-left: 1px solid var(--line); font-size: 9px; font-weight: 700; line-height: 1.25; }
.weather small { color: var(--muted); font-weight: 400; }

.pulse { position: relative; overflow: hidden; padding: 28px 32px 18px; color: white; background: var(--ink); border-radius: 10px; box-shadow: var(--shadow); }
.pulse::after { content: "N"; position: absolute; right: -10px; top: -78px; color: rgba(255,255,255,.025); font-family: var(--display); font-size: 280px; font-weight: 900; line-height: 1; transform: skewX(-9deg); pointer-events: none; }
.pulse-head { position: relative; z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; }
.pulse .section-kicker { color: #7fb0ff; }
.pulse h2 { max-width: 620px; margin: 0; font-family: var(--display); font-size: clamp(21px, 2vw, 29px); font-weight: 600; letter-spacing: -.6px; }
.pulse-score { display: flex; align-items: center; gap: 8px; padding-right: 4px; }
.pulse-score strong { font-family: var(--display); font-size: 42px; line-height: 1; }
.pulse-score span { color: #879ab6; font-size: 8px; line-height: 1.25; text-transform: uppercase; }
.project-rail { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin: 34px 0 26px; }
.rail-line { position: absolute; z-index: 0; top: 6px; left: 7px; right: 7px; height: 2px; background: #324765; }
.rail-line i { display: block; width: 68%; height: 100%; background: linear-gradient(90deg, #609dff, var(--blue)); }
.rail-stop { position: relative; z-index: 1; padding-top: 24px; }
.rail-dot { position: absolute; top: 0; left: 0; width: 14px; height: 14px; background: var(--ink); border: 2px solid #536985; border-radius: 50%; }
.rail-stop.is-done .rail-dot { background: #85b5ff; border-color: #85b5ff; box-shadow: 0 0 0 4px rgba(96,157,255,.11); }
.rail-stop.is-current .rail-dot { background: var(--blue); border: 3px solid #a4c7ff; box-shadow: 0 0 0 5px rgba(21,94,239,.25); }
.rail-stop small { display: block; margin-bottom: 5px; color: #7f93af; font-family: var(--mono); font-size: 8px; letter-spacing: 1.3px; }
.rail-stop strong { display: block; font-size: 12px; }
.rail-stop p { margin: 4px 0 0; color: #8295b0; font-size: 9px; }
.pulse-foot { position: relative; z-index: 1; display: flex; align-items: center; gap: 22px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.09); color: #8fa2bd; font-size: 9px; }
.pulse-foot span { display: flex; align-items: center; gap: 6px; }
.pulse-foot a { margin-left: auto; color: #bcd4ff; font-weight: 700; }
.pulse-foot a span { display: inline; margin-left: 5px; color: white; }
.status-dot { display: inline-block; flex: 0 0 auto; width: 6px; height: 6px; border-radius: 50%; }
.status-dot--green { background: var(--green); box-shadow: 0 0 0 3px rgba(18,183,106,.12); }
.status-dot--amber { background: var(--orange); box-shadow: 0 0 0 3px rgba(247,144,9,.12); }
.status-dot--red { background: var(--red); box-shadow: 0 0 0 3px rgba(240,68,56,.12); }

.metrics { display: grid; grid-template-columns: repeat(4, 1fr); margin: 18px 0; background: white; border: 1px solid var(--line); border-radius: 9px; box-shadow: 0 6px 20px rgba(16,40,77,.035); }
.metric { min-width: 0; display: flex; align-items: center; gap: 14px; padding: 20px 22px; border-right: 1px solid var(--line); }
.metric:last-child { border-right: 0; }
.metric-icon { display: grid; place-items: center; flex: 0 0 auto; width: 36px; height: 36px; border-radius: 7px; }
.metric-icon svg { width: 18px; height: 18px; }
.metric-icon--blue { color: var(--blue); background: var(--blue-soft); }
.metric-icon--orange { color: var(--orange); background: #fff5e6; }
.metric-icon--green { color: var(--green); background: #e8f8f0; }
.metric-icon--violet { color: var(--violet); background: #f0edff; }
.metric > div:last-child { display: grid; grid-template-columns: auto 1fr; align-items: baseline; column-gap: 8px; min-width: 0; }
.metric span { grid-column: 1 / -1; color: var(--muted); font-size: 9px; white-space: nowrap; }
.metric strong { color: var(--ink); font-family: var(--display); font-size: 26px; line-height: 1.2; letter-spacing: -.5px; }
.metric small { color: #98a2b3; font-size: 8px; white-space: nowrap; }
.metric small b { color: var(--green); }

.content-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(310px, .75fr); gap: 18px; }
.panel { background: white; border: 1px solid var(--line); border-radius: 9px; box-shadow: 0 6px 20px rgba(16,40,77,.035); }
.panel-head { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.panel-head .section-kicker { margin-bottom: 5px; color: #8692a3; font-size: 8px; }
.panel h2 { margin: 0; color: var(--ink); font-family: var(--display); font-size: 22px; letter-spacing: -.4px; }
.filters { display: flex; align-items: center; gap: 4px; }
.filter { padding: 5px 9px; color: var(--muted); background: none; border: 0; border-radius: 5px; font-size: 9px; cursor: pointer; }
.filter.is-active { color: var(--blue); background: var(--blue-soft); font-weight: 700; }
.filters a { margin-left: 9px; color: var(--blue); font-size: 9px; font-weight: 700; }
.filters a span { margin-left: 4px; }
.project-row { display: grid; grid-template-columns: 38px minmax(155px, 1.5fr) minmax(80px, .65fr) minmax(100px, .8fr) minmax(76px, .65fr) 26px; align-items: center; gap: 14px; min-height: 70px; padding: 10px 20px; border-bottom: 1px solid #edf0f4; transition: background .15s; }
.project-row:last-of-type { border-bottom: 0; }
.project-row:hover { background: #f9fbfd; }
.project-row[hidden] { display: none; }
.project-code { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 6px; font-family: var(--mono); font-size: 9px; font-weight: 700; }
.project-code--blue { color: var(--blue); background: var(--blue-soft); }
.project-code--orange { color: #cf6f00; background: #fff2df; }
.project-code--green { color: #07844b; background: #e5f7ef; }
.project-code--violet { color: var(--violet); background: #efecff; }
.project-name strong, .project-name span, .project-stage span, .project-stage small, .project-deadline strong, .project-deadline span { display: block; }
.project-name strong { color: var(--ink); font-size: 10px; }
.project-name span { overflow: hidden; margin-top: 4px; color: #98a2b3; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.project-stage span { color: #475467; font-size: 9px; }
.project-stage small { margin-top: 3px; color: #b0b8c4; font-size: 8px; }
.project-progress { display: grid; grid-template-columns: 1fr 26px; align-items: center; gap: 8px; }
.project-progress > div { height: 4px; background: #edf1f5; border-radius: 5px; overflow: hidden; }
.project-progress i { display: block; height: 100%; background: var(--blue); border-radius: inherit; }
.project-progress span { color: #667085; font-family: var(--mono); font-size: 8px; }
.project-deadline strong { color: var(--ink); font-family: var(--mono); font-size: 9px; letter-spacing: .4px; }
.project-deadline span { margin-top: 4px; color: #7c8798; font-size: 8px; white-space: nowrap; }
.project-deadline .status-dot { display: inline-block; margin-right: 4px; }
.row-menu { padding: 6px; color: #98a2b3; background: none; border: 0; cursor: pointer; letter-spacing: 2px; }
.empty-state { padding: 38px; text-align: center; }
.empty-state strong, .empty-state span { display: block; }
.empty-state strong { color: var(--ink); }
.empty-state span { margin-top: 5px; color: var(--muted); font-size: 10px; }

.agenda-panel .panel-head { padding-right: 15px; }
.icon-button--plain { background: transparent; border-color: transparent; }
.agenda-day { display: grid; grid-template-columns: 46px 1fr; gap: 11px; padding: 17px 16px 0; }
.agenda-date { padding-top: 5px; text-align: right; }
.agenda-date strong, .agenda-date span { display: block; }
.agenda-date strong { color: var(--blue); font-family: var(--mono); font-size: 8px; letter-spacing: 1px; }
.agenda-date span { margin-top: 3px; color: #98a2b3; font-family: var(--mono); font-size: 7px; }
.agenda-items { min-width: 0; }
.agenda-item { position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 61px; padding: 10px 8px 10px 12px; border-bottom: 1px solid #edf0f4; }
.agenda-item::before { content: ""; position: absolute; left: 0; width: 2px; height: 34px; border-radius: 2px; }
.agenda-item--blue::before { background: var(--blue); }
.agenda-item--orange::before { background: var(--orange); }
.agenda-item--violet::before { background: var(--violet); }
.agenda-item time { color: #475467; font-family: var(--mono); font-size: 8px; }
.agenda-item strong, .agenda-item span { display: block; }
.agenda-item div { min-width: 0; }
.agenda-item div strong { overflow: hidden; color: var(--ink); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.agenda-item div span { overflow: hidden; margin-top: 4px; color: #98a2b3; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.people { display: flex !important; padding-right: 2px; }
.people i { display: grid; place-items: center; width: 22px; height: 22px; margin-left: -6px; color: var(--ink); background: #e7edf6; border: 2px solid white; border-radius: 50%; font-style: normal; font-size: 6px; font-weight: 800; }
.agenda-link { display: flex; justify-content: space-between; margin: 16px; padding: 12px 14px; color: var(--blue); background: #f5f8ff; border-radius: 6px; font-size: 9px; font-weight: 700; }

.documents-page { max-width: 1520px; margin: 0 auto; padding: 40px 42px 70px; }
.documents-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.documents-hero h1 { margin: 0; color: var(--ink); font-family: var(--display); font-size: clamp(34px, 3vw, 48px); line-height: .98; letter-spacing: -1.6px; }
.documents-hero > div > p:last-child { margin: 10px 0 0; color: var(--muted); font-size: 12px; }
.documents-actions { display: flex; align-items: center; gap: 9px; }
.vault-banner { position: relative; overflow: hidden; display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 15px; min-height: 88px; padding: 18px 22px; color: white; background: var(--ink); border-radius: 9px; box-shadow: var(--shadow); }
.vault-banner::after { content: "PRIVATE // NPROYECTOS"; position: absolute; right: 24px; bottom: -4px; color: rgba(255,255,255,.025); font-family: var(--mono); font-size: 28px; font-weight: 900; letter-spacing: 2px; pointer-events: none; }
.vault-banner > span { display: grid; place-items: center; width: 44px; height: 44px; color: #8ab9ff; background: rgba(73,143,255,.12); border: 1px solid rgba(135,184,255,.2); border-radius: 8px; }
.vault-banner svg { width: 22px; height: 22px; }
.vault-banner strong, .vault-banner p { display: block; margin: 0; }
.vault-banner strong { font-size: 12px; }
.vault-banner p { margin-top: 5px; color: #91a5c1; font-size: 9px; }
.vault-banner small { position: relative; z-index: 1; color: #85b4fb; font-family: var(--mono); font-size: 8px; letter-spacing: 1px; }
.vault-metrics { display: grid; grid-template-columns: repeat(3, 1fr); margin: 18px 0; background: white; border: 1px solid var(--line); border-radius: 9px; box-shadow: 0 6px 20px rgba(16,40,77,.035); }
.vault-metrics article { display: grid; grid-template-columns: auto 1fr; align-items: baseline; column-gap: 9px; min-height: 92px; padding: 19px 22px; border-right: 1px solid var(--line); }
.vault-metrics article:last-child { border-right: 0; }
.vault-metrics span { grid-column: 1 / -1; color: var(--muted); font-size: 9px; }
.vault-metrics strong { color: var(--ink); font-family: var(--display); font-size: 27px; line-height: 1; }
.vault-metrics small { color: #98a2b3; font-size: 8px; }
.vault-layout { display: grid; grid-template-columns: minmax(260px, .62fr) minmax(620px, 1.75fr); gap: 18px; align-items: start; }
.vault-clients, .vault-files { overflow: hidden; background: white; border: 1px solid var(--line); border-radius: 9px; box-shadow: 0 6px 20px rgba(16,40,77,.035); }
.vault-clients { min-height: 510px; }
.vault-files { min-height: 510px; }
.vault-panel-head { min-height: 77px; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.vault-panel-head .section-kicker { margin-bottom: 4px; color: #8692a3; font-size: 8px; }
.vault-panel-head h2 { margin: 0; color: var(--ink); font-family: var(--display); font-size: 22px; }
.vault-panel-head--files { padding-left: 22px; }
.vault-search { height: 37px; display: grid; grid-template-columns: 17px 1fr; align-items: center; gap: 7px; margin: 13px 14px; padding: 0 10px; color: #98a2b3; background: var(--paper); border: 1px solid #e6eaf0; border-radius: 6px; }
.vault-search svg, .file-search svg { width: 15px; height: 15px; }
.vault-search input, .file-search input { width: 100%; min-width: 0; background: transparent; border: 0; outline: 0; color: var(--text); font-size: 9px; }
.client-list { border-top: 1px solid #eef1f5; }
.client-card { width: 100%; min-height: 68px; display: grid; grid-template-columns: 36px minmax(0, 1fr) 25px; align-items: center; gap: 10px; padding: 10px 14px; color: var(--text); background: white; border: 0; border-bottom: 1px solid #eef1f5; text-align: left; cursor: pointer; transition: background .15s, box-shadow .15s; }
.client-card:hover { background: #f9fbfe; }
.client-card.is-active { background: #f2f6ff; box-shadow: inset 3px 0 var(--blue); }
.client-avatar { display: grid; place-items: center; width: 34px; height: 34px; color: var(--blue); background: var(--blue-soft); border-radius: 7px; font-family: var(--mono); font-size: 8px; font-weight: 800; }
.client-copy { min-width: 0; }
.client-copy strong, .client-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-copy strong { color: var(--ink); font-size: 9px; }
.client-copy small { margin-top: 5px; color: #98a2b3; font-size: 8px; }
.client-total { display: grid; place-items: center; min-width: 23px; height: 23px; color: #60728a; background: #edf1f6; border-radius: 50%; font-family: var(--mono); font-size: 8px; }
.file-search { width: min(240px, 42%); height: 36px; display: grid; grid-template-columns: 17px 1fr; align-items: center; gap: 7px; padding: 0 10px; color: #98a2b3; background: var(--paper); border: 1px solid #e6eaf0; border-radius: 6px; }
.file-table-head, .file-row { display: grid; grid-template-columns: minmax(230px, 1.7fr) minmax(85px, .65fr) 70px 82px 75px; align-items: center; gap: 12px; }
.file-table-head { min-height: 37px; padding: 0 18px 0 22px; color: #98a2b3; background: #fbfcfd; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 7px; letter-spacing: .7px; text-transform: uppercase; }
.file-row { min-height: 72px; padding: 10px 18px 10px 22px; border-bottom: 1px solid #eef1f5; }
.file-row:last-child { border-bottom: 0; }
.file-row:hover { background: #fbfcfe; }
.file-identity { min-width: 0; display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: center; gap: 11px; }
.file-identity > span:last-child { min-width: 0; }
.file-identity strong, .file-identity small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-identity strong { color: var(--ink); font-size: 9px; }
.file-identity small { margin-top: 4px; color: #98a2b3; font-size: 8px; }
.file-type { display: grid; place-items: center; width: 36px; height: 40px; color: var(--blue); background: #eff4ff; border-radius: 5px 5px 8px 5px; font-family: var(--mono); font-size: 6px; font-weight: 800; }
.file-type--pdf { color: #d92d20; background: #fff0ef; }
.file-type--jpg, .file-type--jpeg, .file-type--png { color: #7a5af8; background: #f2efff; }
.file-type--xls, .file-type--xlsx { color: #07844b; background: #e9f8f1; }
.file-type--zip { color: #b45f06; background: #fff4e5; }
.file-category { width: fit-content; padding: 5px 7px; color: #52647d; background: #eff2f6; border-radius: 12px; font-size: 7px; font-weight: 700; text-transform: capitalize; }
.file-meta { color: #667085; font-family: var(--mono); font-size: 7px; }
.download-button { padding: 6px 7px; color: var(--blue); background: transparent; border: 0; border-radius: 5px; font-size: 8px; font-weight: 700; cursor: pointer; }
.download-button:hover { background: var(--blue-soft); }
.download-button:disabled { color: #98a2b3; cursor: wait; }
.vault-empty { min-height: 335px; display: grid; place-items: center; align-content: center; padding: 35px; text-align: center; }
.vault-empty__icon, .vault-empty > span:first-child { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 12px; color: #8191a7; background: #f0f3f7; border-radius: 50%; }
.vault-empty svg { width: 21px; height: 21px; }
.vault-empty strong { color: var(--ink); font-size: 11px; }
.vault-empty p { margin: 6px 0 0; color: #98a2b3; font-size: 9px; line-height: 1.5; }
.vault-empty--compact { min-height: 150px; }
.vault-loading { min-height: 170px; display: flex; align-items: center; justify-content: center; gap: 9px; color: #98a2b3; font-size: 9px; }
.vault-loading i { width: 14px; height: 14px; border: 2px solid #dce5f0; border-top-color: var(--blue); border-radius: 50%; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.project-dialog { width: min(520px, calc(100% - 30px)); padding: 0; color: var(--text); background: white; border: 0; border-radius: 10px; box-shadow: 0 25px 80px rgba(8,26,53,.3); }
.project-dialog::backdrop { background: rgba(8,26,53,.58); backdrop-filter: blur(3px); }
.project-dialog form { padding: 26px; }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 24px; }
.dialog-head h2 { margin: 0; color: var(--ink); font-family: var(--display); font-size: 28px; }
.dialog-head .icon-button { font-size: 23px; }
.project-dialog label { display: grid; gap: 7px; margin-bottom: 16px; color: #475467; font-size: 10px; font-weight: 700; }
.project-dialog input, .project-dialog select, .project-dialog textarea { width: 100%; padding: 0 12px; color: var(--text); background: white; border: 1px solid var(--line); border-radius: 6px; outline: 0; font-size: 11px; }
.project-dialog input, .project-dialog select { height: 42px; }
.project-dialog textarea { min-height: 76px; padding-top: 10px; resize: vertical; }
.project-dialog input:focus, .project-dialog select:focus, .project-dialog textarea:focus { border-color: #8fb2f9; box-shadow: 0 0 0 3px rgba(21,94,239,.1); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 26px; }
.form-error { min-height: 14px; margin: -5px 0 0; color: var(--red); font-size: 9px; }
.file-drop { position: relative; min-height: 122px; display: grid; place-items: center; align-content: center; padding: 17px !important; color: #60728a !important; background: #f8fafe; border: 1px dashed #b9c9dd; border-radius: 8px; text-align: center; cursor: pointer; }
.file-drop:hover { border-color: #79a8ff; background: #f3f7ff; }
.file-drop svg { width: 25px; height: 25px; margin-bottom: 4px; color: var(--blue); }
.file-drop strong, .file-drop span { display: block; }
.file-drop strong { color: var(--ink); font-size: 10px; }
.file-drop span { color: #98a2b3; font-size: 8px; font-weight: 400; }
.file-drop input { position: absolute; width: 1px; height: 1px; padding: 0; opacity: 0; pointer-events: none; }
.order-file-drop { margin-bottom: 18px; transition: border-color .15s, background .15s, box-shadow .15s; }
.order-file-drop.has-file { color: #087443 !important; background: #f1fcf6; border-color: #52bd84; box-shadow: 0 0 0 3px rgba(20,148,92,.08); }
.order-file-drop.has-file svg { color: #14945c; }
.order-file-drop.has-file span { color: #087443; }
.order-file-drop.has-error { color: #b42318 !important; background: #fff7f6; border-color: #fda29b; }
.order-file-drop.has-error svg, .order-file-drop.has-error span { color: #b42318; }
.upload-progress { display: grid; grid-template-columns: 1fr; gap: 7px; margin-top: 4px; color: #60728a; font-size: 8px; }
.upload-progress i { display: block; width: 46%; height: 4px; background: linear-gradient(90deg, var(--blue), #70aaff); border-radius: 4px; animation: upload 1.2s ease-in-out infinite alternate; }
@keyframes upload { to { width: 100%; } }
.button:disabled { opacity: .58; transform: none; cursor: wait; box-shadow: none; }
.toast { position: fixed; z-index: 100; right: 28px; bottom: 28px; padding: 13px 18px; color: white; background: var(--ink); border-left: 3px solid var(--green); border-radius: 5px; box-shadow: var(--shadow); font-size: 10px; opacity: 0; transform: translateY(18px); pointer-events: none; transition: opacity .25s, transform .25s; }
.toast.is-visible { opacity: 1; transform: translateY(0); }
.toast.is-error { border-left-color: var(--red); }

@media (max-width: 1150px) {
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .content-grid { grid-template-columns: 1fr; }
  .vault-layout { grid-template-columns: 1fr; }
  .vault-clients { min-height: 0; }
  .project-row { grid-template-columns: 38px minmax(170px, 1.5fr) 90px minmax(110px, .8fr) 80px 26px; }
  .agenda-panel { max-width: none; }
  .agenda-items { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .agenda-day:last-of-type .agenda-items { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .login-screen { grid-template-columns: 1fr; }
  .login-atmosphere { display: none; }
  .login-entry { min-height: 100vh; padding: 34px 24px; }
  .login-card { max-width: 440px; }
  .app-shell { display: block; }
  .sidebar { transform: translateX(-100%); box-shadow: 12px 0 40px rgba(8,26,53,.2); transition: transform .25s ease; }
  .sidebar.is-open { transform: translateX(0); }
  .main { width: 100%; }
  .topbar { grid-template-columns: auto 1fr auto; gap: 14px; padding: 0 22px; }
  .menu-button { display: block; }
  .date-block { display: none; }
  .global-search { grid-column: 2; }
  .top-actions .icon-button { display: none; }
  .page, .documents-page { padding: 32px 22px 60px; }
}

@media (max-width: 650px) {
  .topbar { height: 64px; padding: 0 16px; }
  .global-search { display: none; }
  .top-actions { grid-column: 3; }
  .top-actions .role-pill { display: none; }
  .button { padding: 0 12px; }
  .page, .documents-page { padding: 26px 16px 50px; }
  .documents-hero { align-items: flex-start; flex-direction: column; }
  .documents-actions { width: 100%; }
  .documents-actions .button { flex: 1; }
  .vault-banner { grid-template-columns: 40px 1fr; padding: 16px; }
  .vault-banner small { grid-column: 2; }
  .vault-metrics { grid-template-columns: 1fr; }
  .vault-metrics article { min-height: 78px; border-right: 0; border-bottom: 1px solid var(--line); }
  .vault-metrics article:last-child { border-bottom: 0; }
  .vault-panel-head--files { align-items: flex-start; flex-direction: column; }
  .file-search { width: 100%; }
  .file-table-head { display: none; }
  .file-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "identity download" "category meta"; gap: 8px 12px; padding: 13px 15px; }
  .file-identity { grid-area: identity; }
  .file-category { grid-area: category; }
  .file-meta { grid-area: meta; justify-self: end; }
  .file-row > .file-meta:nth-child(4) { display: none; }
  .download-button { grid-area: download; }
  .intro { align-items: flex-start; }
  .weather { display: none; }
  .intro h1 { font-size: 35px; }
  .pulse { padding: 23px 20px 16px; }
  .pulse-head { gap: 14px; }
  .pulse-score strong { font-size: 34px; }
  .project-rail { grid-template-columns: repeat(4, minmax(105px, 1fr)); overflow-x: auto; margin-right: -20px; padding-right: 20px; scrollbar-width: none; }
  .project-rail::-webkit-scrollbar { display: none; }
  .rail-line { width: 430px; right: auto; }
  .pulse-foot { flex-wrap: wrap; gap: 10px 18px; }
  .pulse-foot a { width: 100%; margin: 2px 0 0; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metric { display: block; padding: 16px; }
  .metric-icon { margin-bottom: 12px; }
  .metric > div:last-child { display: block; }
  .metric span, .metric strong, .metric small { display: block; }
  .metric strong { margin: 3px 0; }
  .metric small { overflow: hidden; text-overflow: ellipsis; }
  .panel-head { align-items: flex-start; padding: 15px 16px; }
  .filters .filter { display: none; }
  .projects-panel { overflow: hidden; }
  .project-row { position: relative; grid-template-columns: 38px minmax(0, 1fr) 25px; grid-template-areas: "code name menu" "code progress menu"; gap: 6px 11px; min-height: 78px; padding: 11px 14px; }
  .project-code { grid-area: code; }
  .project-name { grid-area: name; }
  .project-stage, .project-deadline { display: none; }
  .project-progress { grid-area: progress; max-width: 180px; }
  .row-menu { grid-area: menu; }
  .agenda-day { grid-template-columns: 40px 1fr; padding-left: 11px; padding-right: 11px; }
  .agenda-items { display: block; }
  .agenda-day:last-of-type .agenda-items { display: block; }
  .agenda-item { grid-template-columns: 34px minmax(0, 1fr); }
  .people { display: none !important; }
  .form-grid { grid-template-columns: 1fr; gap: 0; }
  .login-entry { padding: 28px 20px; align-items: start; }
  .login-logo { width: 210px; margin: 0 0 28px -18px; }
  .login-heading h1 { font-size: 38px; }
  .login-fields { margin-top: 25px; }
  .vault-dialog form { padding: 20px; }
}

@media (prefers-reduced-motion: no-preference) {
  .intro > div, .weather, .pulse, .metrics, .content-grid { opacity: 0; animation: reveal .55s ease forwards; }
  .weather { animation-delay: .05s; }
  .pulse { animation-delay: .1s; }
  .metrics { animation-delay: .18s; }
  .content-grid { animation-delay: .24s; }
  @keyframes reveal { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Registro comercial y libro de órdenes */
.access-summary { display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 10px; margin: 0 5px 18px; padding: 13px; background: rgba(21,94,239,.1); border: 1px solid rgba(116,169,255,.16); border-radius: 8px; }
.access-summary__mark { display: grid; place-items: center; width: 32px; height: 32px; color: #83b7ff; background: rgba(21,94,239,.18); border-radius: 6px; font-family: var(--mono); font-weight: 800; }
.access-summary p, .access-summary strong, .access-summary p span { display: block; margin: 0; }
.access-summary strong { color: #dce8f8; font-size: 9px; }
.access-summary p span { margin-top: 3px; color: #768aa6; font-size: 8px; line-height: 1.45; }

.workspace-view { width: min(100%, 1520px); margin: 0 auto; padding: 42px 42px 72px; }
.workspace-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 25px; }
.workspace-hero h1 { margin: 0; color: var(--ink); font-family: var(--display); font-size: clamp(38px, 4vw, 55px); font-weight: 700; line-height: .94; letter-spacing: -1.8px; }
.workspace-hero > div > p:last-child { max-width: 650px; margin: 13px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.workspace-hero .button { flex: 0 0 auto; }

.registry-strip { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 18px; overflow: hidden; background: white; border: 1px solid var(--line); border-radius: 9px; box-shadow: 0 6px 20px rgba(16,40,77,.035); }
.registry-strip article { min-width: 0; min-height: 104px; display: grid; grid-template-columns: auto 1fr; align-items: end; column-gap: 10px; padding: 20px 23px; border-right: 1px solid var(--line); }
.registry-strip article:last-child { border-right: 0; }
.registry-strip span { grid-column: 1 / -1; align-self: start; color: var(--muted); font-size: 9px; }
.registry-strip strong { overflow: hidden; color: var(--ink); font-family: var(--display); font-size: 29px; line-height: 1; text-overflow: ellipsis; white-space: nowrap; }
.registry-strip small { overflow: hidden; color: #98a2b3; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.registry-strip--history article { min-height: 96px; }
.restricted-total { letter-spacing: 5px; }

.registry-panel { overflow: hidden; background: white; border: 1px solid var(--line); border-radius: 9px; box-shadow: var(--shadow); }
.registry-panel__head { min-height: 79px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 17px 22px; border-bottom: 1px solid var(--line); }
.registry-panel__head .section-kicker { margin-bottom: 5px; color: #8692a3; font-size: 8px; }
.registry-panel__head h2 { margin: 0; color: var(--ink); font-family: var(--display); font-size: 23px; }
.registry-panel__head > span { padding: 6px 9px; color: #60728a; background: #f0f3f7; border-radius: 12px; font-family: var(--mono); font-size: 8px; }
.client-directory-head, .client-directory-row { display: grid; grid-template-columns: minmax(260px, 1.35fr) 130px 180px minmax(220px, 1.1fr) 150px 125px; align-items: center; gap: 18px; min-width: 1165px; }
.client-directory-head, .order-history-head { min-height: 39px; padding: 0 22px; color: #98a2b3; background: #fafbfd; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 7px; letter-spacing: .7px; text-transform: uppercase; }
.client-directory-head { min-height: 42px; padding: 0 24px; color: #7d8999; background: #f8fafc; font-size: 8px; font-weight: 700; letter-spacing: .75px; }
.client-directory { overflow-x: auto; }
.client-directory-row { min-height: 88px; padding: 14px 24px; border-bottom: 1px solid #e8edf3; transition: background .15s; }
.client-directory-row:last-child { border-bottom: 0; }
.client-directory-row:hover, .order-history-row:hover { background: #f9fbfe; }
.directory-company { min-width: 0; display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center; gap: 13px; }
.directory-company > span { display: grid; place-items: center; width: 42px; height: 42px; color: var(--blue); background: var(--blue-soft); border-radius: 8px; font-family: var(--mono); font-size: 10px; font-weight: 900; }
.directory-company div { min-width: 0; }
.directory-company strong { display: -webkit-box; overflow: hidden; color: var(--ink); font-size: 13px; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.directory-company small { display: block; overflow: hidden; margin-top: 5px; color: #7f8b9b; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.directory-data { overflow: hidden; color: #46566a; font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; text-overflow: ellipsis; }
.directory-data--mono { font-family: var(--mono); font-size: 10px; overflow-wrap: normal; white-space: nowrap; }

.registry-loading { min-height: 230px; display: flex; align-items: center; justify-content: center; gap: 10px; color: #98a2b3; font-size: 9px; }
.registry-loading i { width: 15px; height: 15px; border: 2px solid #dce5f0; border-top-color: var(--blue); border-radius: 50%; animation: spin .75s linear infinite; }
.registry-empty { min-height: 270px; display: grid; place-items: center; align-content: center; padding: 34px; text-align: center; }
.registry-empty > span { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 12px; color: var(--blue); background: var(--blue-soft); border-radius: 9px; font-family: var(--mono); font-size: 9px; font-weight: 900; }
.registry-empty strong { color: var(--ink); font-size: 11px; }
.registry-empty p { margin: 6px 0 0; color: #98a2b3; font-size: 9px; }

.entry-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(290px, .7fr); gap: 20px; align-items: start; }
.entry-card { padding: 26px 28px 28px; background: white; border: 1px solid var(--line); border-radius: 9px; box-shadow: var(--shadow); }
.entry-card__head { display: grid; grid-template-columns: 52px 1fr; align-items: center; gap: 14px; margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.entry-card__head > span { display: grid; place-items: center; width: 50px; height: 50px; color: white; background: var(--ink); border-radius: 7px; font-family: var(--mono); font-size: 11px; font-weight: 900; letter-spacing: 1px; }
.entry-card__head .section-kicker { margin-bottom: 5px; }
.entry-card__head h2 { margin: 0; color: var(--ink); font-family: var(--display); font-size: 25px; }
.entry-card > label, .entry-card .form-grid > label { display: grid; gap: 8px; margin-bottom: 18px; color: #475467; font-size: 10px; font-weight: 700; }
.entry-card label > span > small { color: #8793a4; font-size: 8px; font-weight: 500; }
.entry-card input, .entry-card select, .entry-card textarea { width: 100%; color: var(--text); background: white; border: 1px solid #d9e0e8; border-radius: 6px; outline: 0; font-size: 11px; transition: border-color .15s, box-shadow .15s; }
.entry-card input, .entry-card select { height: 44px; padding: 0 12px; }
.entry-card .form-grid--three { grid-template-columns: .65fr 1.35fr 1fr; }
.entry-card .form-grid--two { grid-template-columns: .7fr 1.3fr; }

.service-selector { margin: 0 0 18px; padding: 18px; border: 1px solid #d8e1ef; border-radius: 16px; background: linear-gradient(135deg, #f8fbff 0%, #fff 72%); }
.service-selector legend { padding: 0 8px; font-size: 10px; font-weight: 800; color: #475467; text-transform: uppercase; letter-spacing: .04em; }
.service-selector legend small { margin-left: 7px; font-weight: 500; color: #71809a; text-transform: none; letter-spacing: 0; }
.service-selector__grid { display: flex; flex-wrap: wrap; gap: 9px; }
.service-selector__grid label { position: relative; cursor: pointer; }
.service-selector__grid input { position: absolute; opacity: 0; pointer-events: none; }
.service-selector__grid span { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 14px; border: 1px solid #cad6e8; border-radius: 999px; background: #fff; color: #40516c; font-size: 13px; font-weight: 750; transition: 160ms ease; }
.service-selector__grid span::before { content: '+'; margin-right: 7px; color: #1f62ee; font-size: 18px; line-height: 1; }
.service-selector__grid input:checked + span { border-color: #1f62ee; background: #eaf1ff; color: #12366f; box-shadow: inset 0 0 0 1px #1f62ee; }
.service-selector__grid input:checked + span::before { content: '✓'; }
.service-selector__grid input:focus-visible + span { outline: 3px solid rgba(31, 98, 238, .25); outline-offset: 2px; }
.service-selector > p { margin: 10px 0 0; color: #73819a; font-size: 13px; }

.delivery-document { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; margin-top: 14px; padding: 15px 16px; border: 1px dashed #9fb3d1; border-radius: 14px; background: #f6f9ff; }
.delivery-document.is-complete { border-style: solid; border-color: #9bd2b3; background: #f2fbf6; }
.delivery-document__copy strong, .delivery-document__copy span { display: block; }
.delivery-document__copy strong { color: #19365f; }
.delivery-document__copy span { margin-top: 3px; color: #6f7e94; font-size: 13px; }
.delivery-document__upload { position: relative; overflow: hidden; }
.delivery-document__upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.delivery-document__status { color: #17804d; font-weight: 800; white-space: nowrap; }
.entry-card textarea { min-height: 132px; padding: 12px; line-height: 1.55; resize: vertical; }
.entry-card input[readonly] { color: #60728a; background: #f6f8fb; }
.entry-card input:focus, .entry-card select:focus, .entry-card textarea:focus { border-color: #8fb2f9; box-shadow: 0 0 0 3px rgba(21,94,239,.1); }
.money-input { height: 46px; display: grid; grid-template-columns: 42px 1fr; align-items: center; overflow: hidden; background: white; border: 1px solid #d9e0e8; border-radius: 6px; }
.money-input:focus-within { border-color: #8fb2f9; box-shadow: 0 0 0 3px rgba(21,94,239,.1); }
.money-input > span { display: grid; place-items: center; align-self: stretch; color: var(--blue); background: #f0f5ff; border-right: 1px solid #d9e0e8; font-family: var(--mono); font-weight: 800; }
.money-input input { height: 100%; border: 0; border-radius: 0; box-shadow: none !important; }
.entry-actions { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 7px; padding-top: 20px; border-top: 1px solid var(--line); }
.entry-actions > span { max-width: 390px; color: #8792a3; font-size: 8px; line-height: 1.5; }
.entry-actions__buttons { display: flex; justify-content: flex-end; gap: 9px; }
.client-sheets { margin: 0 0 20px; padding: 16px 17px 7px; background: #eef6ff; border: 1px solid #cfe1f7; border-left: 4px solid var(--blue); border-radius: 7px; }
.client-sheets__heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.client-sheets__heading span, .client-sheets__heading strong { display: block; }
.client-sheets__heading span { color: #6483a9; font-family: var(--mono); font-size: 7px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; }
.client-sheets__heading strong { margin-top: 4px; color: #173b66; font-size: 11px; }
.client-sheets__actions { display: flex; align-items: center; gap: 12px; }
.client-sheets__actions .text-button { margin: 0; white-space: nowrap; }
.client-sheets__add { min-height: 34px; padding: 0 11px; white-space: nowrap; }
.client-sheet-list { display: grid; gap: 8px; margin-bottom: 16px; }
.client-sheet-row { display: grid; grid-template-columns: 92px minmax(180px, 1.45fr) minmax(135px, .8fr) minmax(165px, 1fr) 34px; gap: 9px; align-items: end; padding: 11px; background: rgba(255,255,255,.7); border: 1px solid #d6e5f6; border-radius: 6px; }
.client-sheet-row.is-client-material { grid-template-columns: 92px minmax(220px, 1.5fr) minmax(165px, 1fr) 34px; }
.client-sheet-row label { display: grid; gap: 6px; color: #526b88; font-size: 8px; font-weight: 800; }
.client-sheet-row input, .client-sheet-row select { margin: 0; }
.client-sheet-row select { height: 44px; padding: 0 9px; }
.client-sheet-row [data-client-sheet-dimensions][readonly] { color: #58708b; background: #f4f7fa; }
.client-sheet-row button { width: 34px; height: 44px; color: #9b2c2c; background: #fff; border: 1px solid #e8caca; border-radius: 6px; font-size: 18px; cursor: pointer; }
.client-sheet-row button:disabled { color: #a6afbb; border-color: #dce3eb; cursor: not-allowed; }
.client-sheets > p { margin: -8px 0 10px; color: #70849d; font-size: 8px; }

/* Bodega: una lectura de estantería industrial, con el saldo como calibre visual. */
.nav-count--alert { color: #ffe7ad; background: rgba(247,144,9,.25); }
.inventory-hero { align-items: center; }
.inventory-hero__actions { display: flex; align-items: center; gap: 13px; }
.live-indicator { display: inline-flex; align-items: center; gap: 7px; color: #087443; font-family: var(--mono); font-size: 8px; font-weight: 800; letter-spacing: .45px; text-transform: uppercase; }
.live-indicator i { width: 7px; height: 7px; background: #12b76a; border-radius: 50%; box-shadow: 0 0 0 5px rgba(18,183,106,.12); animation: live-pulse 2.2s ease-out infinite; }
.live-indicator.is-offline { color: #7c8999; }
.live-indicator.is-offline i { background: #98a2b3; box-shadow: 0 0 0 5px rgba(152,162,179,.12); animation: none; }
@keyframes live-pulse { 70%, 100% { box-shadow: 0 0 0 9px rgba(18,183,106,0); } }
.inventory-summary { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 18px; overflow: hidden; background: #0a2547; border: 1px solid #173d69; border-radius: 10px; box-shadow: 0 12px 30px rgba(8,26,53,.11); }
.inventory-summary article { position: relative; min-width: 0; min-height: 102px; display: grid; grid-template-columns: auto 1fr; align-items: end; column-gap: 10px; padding: 20px 22px; border-right: 1px solid rgba(255,255,255,.11); }
.inventory-summary article:last-child { border-right: 0; }
.inventory-summary article::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: #4a93f5; opacity: .7; }
.inventory-summary__clients::after { background: #4fd1a1 !important; }
.inventory-summary__purchase::after { background: #8ab4ff !important; }
.inventory-summary span { grid-column: 1 / -1; align-self: start; color: #8fa9c6; font-size: 9px; }
.inventory-summary strong { color: #fff; font-family: var(--display); font-size: 31px; line-height: 1; }
.inventory-summary small { overflow: hidden; color: #6f8cab; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.inventory-toolbar { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 15px 19px; background: #fff; border: 1px solid var(--line); border-bottom: 0; border-radius: 9px 9px 0 0; }
.inventory-toolbar h2, .inventory-side h2 { margin: 3px 0 0; color: var(--ink); font-family: var(--display); font-size: 23px; letter-spacing: -.35px; }
.inventory-toolbar__controls { display: flex; align-items: center; gap: 9px; }
.inventory-search { width: min(330px, 32vw); height: 39px; display: grid; grid-template-columns: 18px 1fr; align-items: center; gap: 7px; padding: 0 11px; color: #8b98a9; background: #f7f9fb; border: 1px solid #dfe5ec; border-radius: 6px; }
.inventory-search svg { width: 16px; height: 16px; }
.inventory-search input { min-width: 0; background: transparent; border: 0; outline: 0; font-size: 10px; }
.inventory-toolbar select { height: 39px; padding: 0 34px 0 11px; color: #475467; background: #fff; border: 1px solid #dfe5ec; border-radius: 6px; font-size: 9px; }
.inventory-layout { display: grid; grid-template-columns: minmax(650px, 1.65fr) minmax(310px, .65fr); gap: 18px; align-items: start; }
.inventory-catalog { overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 0 0 9px 9px; box-shadow: 0 8px 24px rgba(16,40,77,.04); }
.inventory-owner-group + .inventory-owner-group { border-top: 8px solid #f3f6f9; }
.inventory-owner-group__head { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 18px; background: #eef5ff; border-bottom: 1px solid #d9e6f5; }
.inventory-owner-group__head strong, .inventory-owner-group__head span { display: block; }
.inventory-owner-group__head strong { color: #12345f; font-size: 11px; }
.inventory-owner-group__head span { margin-top: 4px; color: #6f86a2; font-size: 8px; }
.inventory-owner-group__head b { padding: 5px 8px; color: #285d9f; background: #fff; border: 1px solid #d4e2f2; border-radius: 16px; font-family: var(--mono); font-size: 7px; white-space: nowrap; }
.inventory-table-head, .inventory-row { display: grid; grid-template-columns: minmax(210px, 1.3fr) minmax(155px, .95fr) 110px 100px minmax(128px, .72fr); align-items: center; gap: 14px; }
.inventory-table-head { min-height: 36px; padding: 0 18px; color: #8995a6; background: #f8fafc; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 7px; font-weight: 800; letter-spacing: .55px; text-transform: uppercase; }
.inventory-row { position: relative; min-height: 82px; padding: 12px 18px 12px 24px; border-bottom: 1px solid #edf1f5; }
.inventory-row:last-child { border-bottom: 0; }
.inventory-row::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: #3d86ea; }
.inventory-row.is-empty::before { background: #f04438; }
.inventory-identity { min-width: 0; }
.inventory-identity strong, .inventory-identity span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inventory-identity strong { color: #102d52; font-size: 11px; }
.inventory-identity span { margin-top: 5px; color: #8090a4; font-family: var(--mono); font-size: 7px; letter-spacing: .25px; }
.inventory-spec { min-width: 0; color: #42556d; font-size: 9px; line-height: 1.45; }
.inventory-spec small { display: block; margin-top: 4px; color: #98a2b3; font-size: 7px; }
.stock-gauge { display: grid; grid-template-columns: 7px 1fr; align-items: center; gap: 10px; }
.stock-gauge i { position: relative; width: 7px; height: 42px; overflow: hidden; background: #e8edf3; border-radius: 5px; }
.stock-gauge i::after { content: ""; position: absolute; inset: auto 0 0; height: var(--stock-level, 0%); background: #3d86ea; border-radius: inherit; }
.inventory-row.is-empty .stock-gauge i::after { background: #f04438; }
.stock-gauge strong { display: block; color: #12345f; font-family: var(--mono); font-size: 15px; }
.stock-gauge small { display: block; margin-top: 3px; color: #8a98aa; font-size: 7px; }
.stock-state { width: fit-content; padding: 6px 8px; color: #067647; background: #eaf8f0; border-radius: 15px; font-size: 7px; font-weight: 900; text-transform: uppercase; }
.stock-state.is-empty { color: #b42318; background: #fff0ee; }
.inventory-actions { display: grid; gap: 6px; }
.inventory-attachment { color: #98a2b3; font-family: var(--mono); font-size: 9px; }
.inventory-attachment button { min-height: 32px; padding: 0 9px; color: #155eef; background: #eff4ff; border: 1px solid #d6e4ff; border-radius: 6px; font-size: 8px; font-weight: 800; cursor: pointer; }
.inventory-attachment button:disabled { opacity: .6; cursor: wait; }
.inventory-side { display: grid; gap: 18px; }
.purchase-board, .movement-board { overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 9px; box-shadow: 0 8px 24px rgba(16,40,77,.04); }
.inventory-side header { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 17px; border-bottom: 1px solid var(--line); }
.inventory-side header > span { min-width: 26px; padding: 5px 7px; color: #8b5d00; background: #fff0c2; border-radius: 14px; font-family: var(--mono); font-size: 8px; text-align: center; }
.purchase-item, .movement-item { padding: 14px 16px; border-bottom: 1px solid #edf1f5; }
.purchase-item:last-child, .movement-item:last-child { border-bottom: 0; }
.purchase-item__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.purchase-item strong, .movement-item strong { display: block; color: #16385f; font-size: 9px; line-height: 1.4; }
.purchase-item p { margin: 6px 0 0; color: #66778a; font-size: 8px; line-height: 1.45; }
.purchase-item__qty { flex: 0 0 auto; color: #9a5b00; font-family: var(--mono); font-size: 12px; font-weight: 900; }
.purchase-item footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 11px; }
.purchase-item footer span { color: #8896a7; font-family: var(--mono); font-size: 7px; }
.purchase-receive { padding: 6px 8px; color: #087443; background: #edfaf3; border: 1px solid #b7e4ca; border-radius: 5px; font-size: 7px; font-weight: 900; cursor: pointer; }
.movement-item { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.movement-mark { display: grid; place-items: center; width: 30px; height: 30px; color: #087443; background: #eaf8f0; border-radius: 50%; font-family: var(--mono); font-size: 13px; font-weight: 900; }
.movement-mark.is-out { color: #b42318; background: #fff0ee; }
.movement-item small { display: block; margin-top: 4px; color: #8b98aa; font-size: 7px; }
.movement-delta { color: #087443; font-family: var(--mono); font-size: 10px; font-weight: 900; }
.movement-delta.is-out { color: #b42318; }
.inventory-dialog-note { margin: -1px 0 14px; padding: 10px 12px; color: #5f7590; background: #f3f7fc; border-left: 3px solid #4a8fea; font-size: 8px; line-height: 1.5; }
.inventory-file-drop { min-height: 104px; margin: 2px 0 14px; transition: border-color .15s, background .15s, box-shadow .15s; }
.inventory-file-drop.has-file { color: #087443 !important; background: #f1fcf6; border-color: #52bd84; box-shadow: 0 0 0 3px rgba(20,148,92,.08); }
.inventory-file-drop.has-file svg { color: #14945c; }
.inventory-file-drop.has-file span { color: #087443; }
.inventory-file-drop.has-error { color: #b42318 !important; background: #fff7f6; border-color: #fda29b; }
.inventory-file-drop.has-error svg, .inventory-file-drop.has-error span { color: #b42318; }
.inventory-line { margin: 12px 0; padding: 13px; background: #f8fafc; border: 1px solid #dfe7f0; border-radius: 8px; }
.inventory-line__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; color: #173b66; font-size: 9px; }
.inventory-add-line { width: 100%; margin: 3px 0 14px; }
.inventory-client-results { max-height: 190px; margin: -7px 0 15px; overflow-y: auto; border: 1px solid #dfe7f0; border-radius: 8px; background: #fff; }
.inventory-client-choice { display: grid; width: 100%; gap: 3px; padding: 11px 14px; border: 0; border-bottom: 1px solid #edf1f5; background: #fff; color: #173b66; text-align: left; cursor: pointer; }
.inventory-client-choice:last-child { border-bottom: 0; }
.inventory-client-choice:hover, .inventory-client-choice:focus-visible { background: #edf5ff; outline: none; }
.inventory-client-choice strong { font-size: 12px; }
.inventory-client-choice small { color: #63748c; font-size: 10px; }
.inventory-dialog-context { margin-bottom: 18px; padding: 14px; background: #f4f7fb; border: 1px solid #dfe7f0; border-radius: 7px; }
.inventory-dialog-context span, .inventory-dialog-context strong, .inventory-dialog-context small { display: block; }
.inventory-dialog-context span { color: #7c8999; font-family: var(--mono); font-size: 7px; text-transform: uppercase; }
.inventory-dialog-context strong { margin-top: 5px; color: #173b66; font-size: 11px; }
.inventory-dialog-context small { margin-top: 4px; color: #66778a; font-size: 8px; }
.inventory-list .registry-empty, .purchase-list .registry-empty, .movement-list .registry-empty { min-height: 160px; }

/* Contabilidad: tarjeta de jornada inspirada en el reloj de taller. */
.accounting-page { max-width: 1540px; }
.accounting-hero { margin-bottom: 22px; }
.accounting-period { padding: 9px 12px; color: #8b5d00; background: #fff5d6; border: 1px solid #f1d687; border-radius: 5px; font-family: var(--mono); font-size: 8px; font-weight: 900; letter-spacing: .7px; }
.accounting-grid { display: grid; grid-template-columns: minmax(440px, 1.2fr) minmax(360px, .8fr); gap: 18px; align-items: stretch; }
.attendance-clock { min-height: 315px; display: grid; grid-template-columns: 48px minmax(0, 1fr); overflow: hidden; color: white; background: #0b294f; border: 1px solid #173f6f; border-radius: 9px; box-shadow: 0 12px 28px rgba(11,41,79,.16); }
.attendance-clock__rail { display: grid; grid-template-rows: auto 1fr auto; place-items: center; gap: 12px; padding: 17px 0; background: #081f3e; border-right: 1px solid rgba(255,255,255,.08); }
.attendance-clock__rail span { color: #6586ad; font-family: var(--mono); font-size: 6px; font-weight: 900; letter-spacing: 1.2px; writing-mode: vertical-rl; transform: rotate(180deg); }
.attendance-clock__rail i { width: 1px; height: 100%; background: repeating-linear-gradient(to bottom, #3b78bd 0 5px, transparent 5px 10px); }
.attendance-clock__body { position: relative; padding: 24px 26px 22px; }
.attendance-clock__body::after { content: "NPROYECTOS // ASISTENCIA"; position: absolute; right: 18px; bottom: 10px; color: rgba(255,255,255,.035); font-family: var(--mono); font-size: 18px; font-weight: 900; letter-spacing: 1px; pointer-events: none; }
.attendance-clock__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.attendance-clock .section-kicker { color: #6fa7f3; }
.attendance-clock h2 { margin: 5px 0 0; font-family: var(--display); font-size: 25px; letter-spacing: -.5px; }
.attendance-status { flex: 0 0 auto; padding: 6px 9px; color: #98b8dd; background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.1); border-radius: 15px; font-size: 7px; font-weight: 900; text-transform: uppercase; }
.attendance-status.is-open { color: #8ce3ba; background: rgba(55,203,139,.1); border-color: rgba(93,223,160,.18); }
.attendance-clock time { display: block; margin-top: 20px; color: #fff; font-family: var(--mono); font-size: clamp(36px, 4.2vw, 58px); font-weight: 900; line-height: 1; letter-spacing: -2px; }
.attendance-clock time + p { margin: 7px 0 0; color: #7896b8; font-family: var(--mono); font-size: 8px; letter-spacing: .5px; text-transform: uppercase; }
.attendance-clock__body > strong { display: block; margin-top: 13px; color: #dce9f8; font-size: 10px; }
.attendance-clock__actions { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 18px; }
.attendance-mark { min-height: 43px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; border-radius: 6px; font-size: 9px; font-weight: 900; cursor: pointer; }
.attendance-mark span { font-family: var(--mono); font-size: 15px; }
.attendance-mark--entry { color: #073f2c; background: #75d9aa; border: 1px solid #8ce8bc; }
.attendance-mark--exit { color: #d8e7fa; background: #153b68; border: 1px solid #315986; }
.attendance-mark:disabled { opacity: .38; cursor: not-allowed; }
.attendance-clock__hint { position: relative; z-index: 1; margin: 10px 0 0; color: #6f8eaf; font-size: 7px; }
.accounting-overview { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 9px; box-shadow: 0 8px 24px rgba(16,40,77,.04); }
.accounting-overview article { min-height: 157px; display: flex; flex-direction: column; justify-content: center; padding: 22px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.accounting-overview article:nth-child(even) { border-right: 0; }
.accounting-overview article:nth-last-child(-n+2) { border-bottom: 0; }
.accounting-overview span, .accounting-overview strong, .accounting-overview small { display: block; }
.accounting-overview span { color: #77869a; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.accounting-overview strong { margin-top: 9px; color: #10345e; font-family: var(--display); font-size: 29px; line-height: 1; }
.accounting-overview small { margin-top: 7px; color: #98a2b3; font-size: 7px; }
.accounting-panels { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); gap: 18px; margin-top: 18px; }
.attendance-board, .team-board, .payroll-board { overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 9px; box-shadow: 0 8px 24px rgba(16,40,77,.04); }
.attendance-board > header, .team-board > header { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.attendance-board h2, .team-board h2, .payroll-board h2 { margin: 4px 0 0; color: var(--ink); font-family: var(--display); font-size: 23px; letter-spacing: -.4px; }
.attendance-board > header > span { color: #7b899a; font-family: var(--mono); font-size: 7px; }
.team-live { display: inline-flex; align-items: center; gap: 6px; color: #087443; font-family: var(--mono); font-size: 7px; font-weight: 900; }
.team-live i { width: 6px; height: 6px; background: #31c48d; border-radius: 50%; box-shadow: 0 0 0 4px rgba(49,196,141,.12); }
.attendance-item { min-height: 64px; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 17px; border-bottom: 1px solid #edf1f5; }
.attendance-item:last-child, .team-item:last-child, .payroll-row:last-child { border-bottom: 0; }
.attendance-item__mark { display: grid; place-items: center; width: 36px; height: 36px; color: #087443; background: #eaf8f0; border-radius: 50%; font-family: var(--mono); font-size: 14px; font-weight: 900; }
.attendance-item__mark.is-exit { color: #8b5d00; background: #fff5d6; }
.attendance-item strong, .attendance-item small, .team-item strong, .team-item small { display: block; }
.attendance-item strong, .team-item strong { color: #173b66; font-size: 9px; }
.attendance-item small, .team-item small { margin-top: 4px; color: #8997a8; font-size: 7px; }
.attendance-item time { color: #173b66; font-family: var(--mono); font-size: 10px; font-weight: 900; }
.team-item { min-height: 64px; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 10px 16px; border-bottom: 1px solid #edf1f5; }
.team-item__avatar { display: grid; place-items: center; width: 32px; height: 32px; color: #155eef; background: #eff4ff; border-radius: 6px; font-family: var(--mono); font-size: 7px; font-weight: 900; }
.team-item__state { padding: 5px 7px; color: #667085; background: #f2f4f7; border-radius: 13px; font-size: 6px; font-weight: 900; text-transform: uppercase; }
.team-item__state.is-present { color: #067647; background: #eaf8f0; }
.payroll-board { margin-top: 18px; }
.payroll-board__head { min-height: 92px; display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 17px 20px; border-bottom: 1px solid var(--line); }
.payroll-board__head > div:first-child > p:last-child { margin: 6px 0 0; color: #7b899a; font-size: 8px; }
.payroll-board__actions { display: flex; align-items: end; gap: 8px; }
.payroll-board__actions label span { display: block; margin-bottom: 5px; color: #7b899a; font-size: 7px; font-weight: 800; }
.payroll-board__actions input { height: 38px; padding: 0 9px; color: #344054; background: #fff; border: 1px solid #d9e1ea; border-radius: 6px; font-size: 9px; }
.payroll-table-head, .payroll-row { display: grid; grid-template-columns: minmax(190px, 1.2fr) 110px 120px 95px 120px; align-items: center; gap: 14px; }
.payroll-table-head { min-height: 36px; padding: 0 19px; color: #8b98a9; background: #f8fafc; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 7px; font-weight: 900; text-transform: uppercase; }
.payroll-row { min-height: 70px; padding: 11px 19px; border-bottom: 1px solid #edf1f5; }
.payroll-row strong, .payroll-row small { display: block; }
.payroll-row strong { color: #173b66; font-size: 9px; }
.payroll-row small { margin-top: 4px; color: #98a2b3; font-size: 7px; }
.payroll-row > span { color: #475467; font-size: 8px; }
.payroll-state { width: fit-content; padding: 5px 7px; color: #8b5d00 !important; background: #fff5d6; border-radius: 13px; font-size: 6px !important; font-weight: 900; text-transform: uppercase; }
.payroll-state.is-sent { color: #067647 !important; background: #eaf8f0; }
.payroll-state.is-failed { color: #b42318 !important; background: #fff0ee; }
.payroll-download { min-height: 32px; color: #155eef; background: #eff4ff; border: 1px solid #d6e4ff; border-radius: 6px; font-size: 7px; font-weight: 900; cursor: pointer; }
.payroll-file-drop { padding: 15px !important; background: #f7f9fc; border: 1px dashed #b8c6d8 !important; border-radius: 7px; }
.payroll-file-drop input { margin-top: 9px; padding: 9px !important; background: #fff; }
.payroll-file-drop > span { display: block; margin-top: 6px; color: #8997a8; font-size: 7px; }
.attendance-list .registry-empty, .team-list .registry-empty, .payroll-list .registry-empty { min-height: 150px; }
.next-order-number { flex: 0 0 auto; min-width: 205px; padding: 15px 18px; color: white; background: linear-gradient(135deg, #103e78, #0a2a52); border: 1px solid #184d8d; border-radius: 9px; box-shadow: 0 8px 22px rgba(16,62,120,.16); }
.next-order-number span, .next-order-number strong, .next-order-number small { display: block; }
.next-order-number > span { color: #8ebbf2; font-family: var(--mono); font-size: 7px; font-weight: 800; letter-spacing: .65px; text-transform: uppercase; }
.next-order-number strong { margin-top: 5px; font-family: var(--mono); font-size: 17px; letter-spacing: .3px; }
.next-order-number strong b { color: #69b7ff; font-size: inherit; }
.next-order-number small { margin-top: 5px; color: #8fa6c1; font-size: 7px; }
.entry-aside { position: relative; overflow: hidden; min-height: 400px; padding: 28px; color: white; background: var(--ink-deep); border-radius: 9px; box-shadow: var(--shadow); }
.entry-aside::before { content: ""; position: absolute; width: 260px; height: 260px; right: -145px; top: -125px; border: 1px solid rgba(88,164,255,.2); border-radius: 50%; box-shadow: 0 0 0 45px rgba(88,164,255,.025), 0 0 0 90px rgba(88,164,255,.018); }
.entry-aside__index { position: relative; z-index: 1; margin-bottom: 86px; color: #4f89dd; font-family: var(--mono); font-size: 11px; letter-spacing: 1px; }
.entry-aside .section-kicker { color: #6fa7f3; }
.entry-aside h2 { position: relative; margin: 8px 0 0; font-family: var(--display); font-size: 30px; line-height: .98; letter-spacing: -.7px; }
.entry-aside > p:not(.section-kicker) { margin: 17px 0 0; color: #8da1bd; font-size: 9px; line-height: 1.65; }
.privacy-diagram { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; margin-top: 28px; color: #bdd0e9; font-family: var(--mono); font-size: 7px; text-transform: uppercase; }
.privacy-diagram i { height: 1px; background: linear-gradient(90deg, #4a91f2, rgba(74,145,242,.1)); }
.privacy-diagram__locked { padding: 7px 8px; color: #8ab9ff; background: rgba(21,94,239,.14); border: 1px solid rgba(102,167,255,.16); border-radius: 5px; }
.text-button { margin-top: 30px; padding: 0; color: #75acfb; background: transparent; border: 0; font-size: 9px; font-weight: 700; cursor: pointer; }

/* Cotizador: réplica funcional de las hojas del libro COT-NPROYECTOS. */
.quote-page { width: 100%; max-width: none; }
.quote-hero { align-items: center; }
.excel-workbook { overflow: hidden; background: #d9e0e8; border: 1px solid #9ba6b3; box-shadow: var(--shadow); }
.excel-tabs { display: flex; align-items: flex-end; gap: 2px; min-height: 43px; padding: 7px 10px 0; background: #edf0f3; border-bottom: 1px solid #a7b0ba; }
.excel-tabs button { min-width: 120px; height: 35px; padding: 0 20px; color: #333; background: #d9dfe5; border: 1px solid #adb7c1; border-bottom: 0; font-family: Arial, Helvetica, sans-serif; font-size: 11px; cursor: pointer; }
.excel-tabs button.is-active { color: #1e5c35; background: white; border-top: 3px solid #217346; font-weight: 700; }
.excel-keyboard-hint { margin: 0 4px 10px auto; color: #48647f; font-family: var(--mono); font-size: 8px; font-weight: 800; letter-spacing: .2px; white-space: nowrap; }
.excel-panel { background: #fff; }
.calculo-toolbar { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 9px 12px 9px 16px; background: #f7f8fa; border-bottom: 1px solid #aeb7c2; }
.calculo-toolbar strong, .calculo-toolbar span { display: block; }
.calculo-toolbar strong { color: #253b53; font-family: Arial, Helvetica, sans-serif; font-size: 10px; }
.calculo-toolbar span { margin-top: 3px; color: #718096; font-family: var(--mono); font-size: 7px; }
.calculo-clear { min-height: 35px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 13px; color: #a72b21; background: #fff; border: 1px solid #e1a8a3; border-radius: 5px; font-family: Arial, Helvetica, sans-serif; font-size: 9px; font-weight: 700; cursor: pointer; transition: color .15s, background .15s, border-color .15s; }
.calculo-clear:hover { color: #8f1d15; background: #fff1ef; border-color: #d77b73; }
.calculo-clear svg { width: 15px; height: 15px; }
.excel-scroll { width: 100%; max-height: 74vh; overflow: auto; }
.calculo-canvas { position: relative; width: 1322px; min-height: 1200px; padding: 8px 0 30px; background-color: #fff; background-image: linear-gradient(#edf0f2 1px, transparent 1px), linear-gradient(90deg, #edf0f2 1px, transparent 1px); background-size: 22px 22px; font-family: Arial, Helvetica, sans-serif; }
.calculo-items { width: 1322px; }
.calculo-item { margin-bottom: 2px; }
.calculo-description { width: 1322px; height: 29px; display: grid; grid-template-columns: 95px 1fr; align-items: center; background: #bfbfbf; border: 1px solid #111; font-size: 11px; font-style: italic; font-weight: 700; text-align: center; }
.calculo-description input { height: 100%; padding: 0 8px; background: transparent; border: 0; font-style: italic; font-weight: 700; text-align: center; outline: 0; }
.calculo-grids { display: flex; align-items: flex-start; }
.calculo-table { border-collapse: collapse; table-layout: fixed; color: #000; background: white; font-family: Arial, Helvetica, sans-serif; font-size: 9px; }
.calculo-table th, .calculo-table td { height: 25px; padding: 0; border: 1px solid #111; text-align: center; }
.calculo-table th { height: 31px; padding: 2px 4px; background: #d9d9d9; font-style: italic; font-weight: 700; }
.calculo-table input { width: 100%; height: 100%; min-width: 0; padding: 0 4px; color: #000; background: transparent; border: 0; outline: 0; font-size: 9px; text-align: center; }
.calculo-table input:focus, .calculo-description input:focus { background: #fff9c4; box-shadow: inset 0 0 0 2px #217346; }
.calculo-table input.has-formula-error { color: #a61b1b; background: #fff0f0; box-shadow: inset 0 0 0 2px #d43c3c; }
.calculo-table--dimensions { width: 772px; }
.calculo-table--dimensions th:nth-child(1) { width: 46px; }
.calculo-table--dimensions th:nth-child(2) { width: 105px; }
.calculo-table--dimensions th:nth-child(3), .calculo-table--dimensions th:nth-child(4) { width: 96px; }
.calculo-table--dimensions th:nth-child(5) { width: 95px; }
.calculo-table--dimensions th:nth-child(6) { width: 105px; }
.calculo-table--dimensions th:nth-child(7) { width: 95px; }
.calculo-table--dimensions th:nth-child(8) { width: 80px; }
.calculo-table--services { width: 550px; }
.calculo-table--services th:nth-child(1) { width: 60px; }
.calculo-table--services th:nth-child(2) { width: 90px; }
.calculo-table--services th:nth-child(3) { width: 170px; }
.calculo-table--services th:nth-child(4) { width: 120px; }
.calculo-table--services th:nth-child(5) { width: 110px; }
.services-title th { height: 29px; color: #fff; background: #002b69; font-size: 10px; font-style: italic; }
.services-title th:first-child { background: #fff; border-top: 0; border-left: 0; }
.cell-item { background: #fff; font-size: 12px; font-weight: 700; vertical-align: top; padding-top: 8px !important; }
.cell-thickness { background: #e7e6e6; }
.cell-material-price { background: #d9ead3; }
.cell-quantity { background: #d9e2f3; }
.cell-other { background: #fff2cc; }
.cell-gain { color: #fff; background: #2f75b5; font-size: 9px; font-weight: 700; }
.cell-service-value { background: #f4cccc; }
.cell-service-label { background: #f4c7dc; font-weight: 700; }
.cell-profile { background: #c9c7f4; }
.cell-element { background: #fff; }
.rest-row td:first-child { background: #f2f2f2; font-weight: 700; }
.result-row td { height: 31px; font-size: 10px; font-weight: 700; }
.calculo-table--dimensions .result-row td:nth-child(3) { background: #c6e0b4; }
.calculo-table--dimensions .result-row td:nth-child(4) { background: #9dc3e6; }
.calculo-table--dimensions .result-row td:nth-child(5) { background: #ffe699; }
.calculo-table--dimensions .result-row td:nth-child(6) { background: #c6e0b4; }
.calculo-table--dimensions .result-row td:nth-child(7) { color: #ffff00; background: #ff0000; }
.calculo-table--services .result-row td:nth-child(1) { color: #fff; background: #2f75b5; font-size: 9px; }
.calculo-table--services .result-row td:nth-child(2), .calculo-table--services .result-row td:nth-child(4) { background: #c9c7f4; }
.cell-factor { position: relative; color: #ff0000; background: #fce4d6; }
.cell-factor input { color: #ff0000; font-size: 15px; font-weight: 700; }
.cell-factor span { position: absolute; right: 7px; top: 7px; pointer-events: none; }
.result-labels td { height: 25px; background: #f2f2f2; font-size: 8px; font-weight: 700; }
.material-code-row td { height: 25px; }
.material-code-row td:nth-child(2) { background: #fff2cc; font-style: italic; font-weight: 700; }
.calculo-reference { position: absolute; left: 1510px; top: 84px; width: 680px; }
.reference-kilo { width: 146px; margin-left: 264px; padding: 7px; background: #00b9ee; border: 1px solid #111; font-weight: 700; text-align: center; }
.reference-catalog, .reference-tool { width: 100%; border-collapse: collapse; table-layout: fixed; color: #000; background: #fff; font-family: Arial, Helvetica, sans-serif; font-size: 10px; }
.reference-catalog th, .reference-catalog td, .reference-tool th, .reference-tool td { height: 27px; padding: 3px 5px; border: 1px solid #111; text-align: center; }
.reference-catalog th { background: #f4b183; font-style: italic; }
.reference-catalog th:nth-child(3), .reference-catalog td:nth-child(3) { background: #a9d18e; }
.reference-catalog th:nth-child(4), .reference-catalog td:nth-child(4) { background: #ffd966; }
.reference-catalog td:nth-child(1), .reference-catalog td:nth-child(2) { background: #f8cbad; }
.reference-tool { margin-top: 22px; }
.reference-tool caption { padding: 8px; color: #fff; background: #002b69; border: 1px solid #111; border-bottom: 0; font-size: 11px; font-style: italic; font-weight: 700; }
.reference-tool th { background: #d9e2f3; font-size: 9px; }
.reference-tool input { width: 100%; height: 100%; padding: 0 3px; border: 0; outline: 0; text-align: center; }
.reference-tool output { font-weight: 700; }
.reference-tool--error { width: 190px; }
.reference-tool--error td { color: #c00000; font-weight: 700; }
.excel-toolbar { display: flex; justify-content: flex-end; gap: 9px; padding: 12px; background: #f0f2f4; border-bottom: 1px solid #bcc4cd; }
.excel-toolbar--quotation { align-items: end; justify-content: space-between; }
.excel-toolbar__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.quote-client-picker { width: min(390px, 42vw); display: grid; gap: 5px; color: #385577; font-family: var(--mono); font-size: 8px; font-weight: 900; letter-spacing: .55px; text-transform: uppercase; }
.quote-client-picker select { width: 100%; height: 38px; padding: 0 36px 0 12px; color: #132b42; background: #fff; border: 1px solid #aeb9c5; border-radius: 5px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; font-weight: 700; text-transform: none; }
.excel-toolbar--plan { align-items: center; justify-content: space-between; }
.excel-toolbar--plan > span { color: #385577; font-family: var(--mono); font-size: 8px; font-weight: 900; letter-spacing: .55px; }
.excel-scroll--quotation { padding: 24px; background: #b7bdc4; }
.quotation-sheet { width: 790px; min-height: 1117px; margin: 0 auto; padding: 34px 42px 28px; color: #000; background: white; box-shadow: 0 5px 22px rgba(0,0,0,.24); font-family: Arial, Helvetica, sans-serif; }
.quotation-heading { position: relative; min-height: 147px; display: grid; grid-template-columns: 190px 1fr 270px; align-items: start; }
.quotation-heading img { width: 190px; margin-top: 24px; }
.quotation-heading h2 { margin: 32px 0 0; color: #00aeef; font-size: 26px; font-style: italic; text-align: center; }
.quotation-company { border: 1px solid #5b9bd5; }
.quotation-company label { min-height: 20px; display: grid; grid-template-columns: 83px 1fr; border-bottom: 1px solid #9dc3e6; }
.quotation-company label:last-child { border-bottom: 0; }
.quotation-company b { display: flex; align-items: center; padding: 2px 5px; background: #d9eaf7; border-right: 1px solid #9dc3e6; font-size: 8px; }
.quotation-company input, .quotation-client input, .quotation-terms input { width: 100%; min-width: 0; padding: 2px 5px; background: transparent; border: 0; outline: 0; font-size: 8px; }
.quotation-client label { min-height: 26px; display: grid; grid-template-columns: 88px 1fr; border-bottom: 1px solid #111; }
.quotation-client b, .quotation-terms b { display: flex; align-items: center; padding: 3px 6px; background: #e7e6e6; border-right: 1px solid #111; font-size: 9px; }
.quotation-terms { display: grid; grid-template-columns: 1fr 1fr; margin-top: 7px; border-top: 1px solid #111; border-left: 1px solid #111; }
.quotation-terms label { min-height: 24px; display: grid; grid-template-columns: 140px 1fr; border-right: 1px solid #111; border-bottom: 1px solid #111; }
.quotation-terms label:last-child { grid-template-columns: 70px 15px 1fr; }
.quotation-terms label > span { display: grid; place-items: center; }
.quotation-lines { width: 100%; margin-top: 9px; border-collapse: collapse; table-layout: fixed; font-size: 9px; }
.quotation-lines th, .quotation-lines td { height: 22px; padding: 2px 5px; border: 1px solid #111; }
.quotation-lines th { background: #d9eaf7; }
.quotation-lines th:nth-child(1) { width: 47px; }
.quotation-lines th:nth-child(3) { width: 75px; }
.quotation-lines th:nth-child(4), .quotation-lines th:nth-child(5) { width: 105px; }
.quotation-lines td:nth-child(1), .quotation-lines td:nth-child(n+3) { text-align: center; }
.quotation-lines tfoot td[colspan] { border: 0; }
.quotation-lines tfoot th { text-align: right; }
.quotation-lines tfoot td:last-child { font-weight: 700; text-align: right; }
.quotation-conditions { margin-top: 11px; font-size: 7.5px; line-height: 1.32; }
.quotation-conditions h3 { margin: 0 0 4px; font-size: 8px; }
.quotation-conditions ol { margin: 0; padding-left: 18px; }
.quotation-conditions ul { padding-left: 16px; }
.quotation-payment { width: 300px; display: grid; grid-template-columns: 1fr 95px; margin: 8px 0 0 auto; border-top: 1px solid #111; border-left: 1px solid #111; }
.quotation-payment > * { padding: 3px 5px; border-right: 1px solid #111; border-bottom: 1px solid #111; }
.quotation-payment strong { text-align: right; }
.quotation-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding-top: 9px; border-top: 2px solid #00aeef; color: #333; font-size: 7px; }
.quotation-footer strong { color: #002f4d; font-size: 10px; }
.plan-materials { min-width: 3300px; border-collapse: collapse; table-layout: fixed; color: #000; background: white; font-family: Arial, Helvetica, sans-serif; font-size: 9px; }
.plan-materials th, .plan-materials td { width: 94px; height: 27px; padding: 3px 5px; border: 1px solid #b7b7b7; text-align: center; }
.plan-materials th { color: white; background: #4472c4; font-weight: 700; }
.plan-materials th:nth-child(2), .plan-materials td:nth-child(2), .plan-materials th:nth-child(6), .plan-materials td:nth-child(6) { width: 180px; }
.quote-history-toolbar { min-height: 84px; display: grid; grid-template-columns: minmax(230px, .55fr) minmax(280px, .45fr); align-items: end; gap: 24px; padding: 17px 20px; background: linear-gradient(100deg, #eef5ff 0%, #fff 58%); border-bottom: 1px solid #cbd6e3; }
.quote-history-toolbar > div span, .quote-history-toolbar > div strong { display: block; }
.quote-history-toolbar > div span { color: #4472c4; font-family: var(--mono); font-size: 7px; font-weight: 900; letter-spacing: .8px; }
.quote-history-toolbar > div strong { margin-top: 5px; color: #173b66; font-family: var(--display); font-size: 21px; }
.quote-history-search { display: grid; gap: 5px; color: #536174; font-size: 8px; font-weight: 800; }
.quote-history-search input { width: 100%; height: 40px; padding: 0 12px; color: #23364e; background: #fff; border: 1px solid #bdc9d6; border-radius: 5px; outline: 0; font-size: 10px; }
.quote-history-search input:focus { border-color: #4472c4; box-shadow: 0 0 0 3px rgba(68,114,196,.14); }
.quote-history-list { min-height: 280px; overflow-x: auto; background: #fff; }
.quote-history-head, .quote-history-row { min-width: 880px; display: grid; grid-template-columns: 90px 115px minmax(180px, 1fr) minmax(180px, 1fr) 145px 110px; align-items: center; gap: 14px; }
.quote-history-head { min-height: 38px; padding: 0 20px; color: #fff; background: #4472c4; font-family: Arial, Helvetica, sans-serif; font-size: 8px; font-weight: 700; letter-spacing: .25px; }
.quote-history-row { width: 100%; min-height: 66px; padding: 10px 20px; color: #26384f; background: #fff; border: 0; border-bottom: 1px solid #d9e0e8; font-family: Arial, Helvetica, sans-serif; font-size: 10px; text-align: left; cursor: pointer; }
.quote-history-row:nth-child(odd) { background: #f8fbff; }
.quote-history-row:hover { background: #edf4ff; }
.quote-history-row:focus-visible { position: relative; z-index: 1; outline: 3px solid rgba(68,114,196,.28); outline-offset: -3px; }
.quote-history-number { color: #173b66; font-family: var(--mono); font-size: 11px; font-weight: 900; }
.quote-history-row time, .quote-history-tax-id { color: #68798d; font-family: var(--mono); font-size: 9px; }
.quote-history-row strong { overflow: hidden; color: #213650; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.quote-history-total { justify-self: end; color: #173b66; font-family: var(--mono); font-size: 11px; font-weight: 900; }
.quote-history-open { justify-self: end; padding: 7px 10px; color: #1e5c35; background: #eef8f1; border: 1px solid #b8d9c2; border-radius: 4px; font-size: 8px; font-weight: 800; }
.quote-history-empty { min-height: 250px; display: grid; place-items: center; align-content: center; gap: 7px; padding: 30px; color: #758296; text-align: center; }
.quote-history-empty strong { color: #28425f; font-size: 14px; }
.quote-history-empty span { max-width: 390px; font-size: 9px; line-height: 1.5; }
.quotation-sheet input:focus { background: #fff9c4; box-shadow: inset 0 0 0 2px #217346; }

.history-access { display: inline-flex; align-items: center; gap: 7px; padding: 9px 12px; color: #067647; background: #ecfdf3; border: 1px solid #c8f0da; border-radius: 18px; font-size: 9px; font-weight: 700; }
.history-access i { width: 7px; height: 7px; background: var(--green); border-radius: 50%; }
.history-access.is-restricted { color: #b54708; background: #fff7ed; border-color: #fed7aa; }
.history-access.is-restricted i { background: var(--orange); }
.history-filters { display: grid; grid-template-columns: minmax(190px, .6fr) minmax(520px, 1.4fr); gap: 28px; align-items: end; margin-bottom: 18px; padding: 20px 22px 20px 25px; background: linear-gradient(100deg, #f8fbff 0%, #fff 62%); border: 1px solid #dfe7f1; border-left: 4px solid var(--blue); border-radius: 8px; box-shadow: 0 8px 24px rgba(24,55,91,.05); }
.history-filters__intro h2 { margin: 4px 0 5px; color: var(--ink); font-family: var(--display); font-size: 22px; letter-spacing: -.25px; }
.history-filters__intro > p:last-child { max-width: 360px; margin: 0; color: #7b8798; font-size: 8px; line-height: 1.5; }
.history-filters__controls { display: grid; grid-template-columns: minmax(190px, 1.35fr) repeat(2, minmax(130px, .7fr)) auto; gap: 10px; align-items: end; }
.history-filters__controls label { display: grid; gap: 7px; color: #536174; font-size: 8px; font-weight: 800; letter-spacing: .2px; }
.history-filters__controls select, .history-filters__controls input { width: 100%; height: 40px; padding: 0 10px; color: var(--text); background: white; border: 1px solid #d8e0ea; border-radius: 6px; outline: 0; font-size: 9px; }
.history-filters__controls select:focus, .history-filters__controls input:focus { border-color: #8fb2f9; box-shadow: 0 0 0 3px rgba(21,94,239,.1); }
.history-filters__search { grid-column: 1 / -1; }
.history-search-field { height: 42px; display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: center; gap: 8px; padding: 0 12px; color: #7590b4; background: white; border: 1px solid #cfdbea; border-radius: 7px; box-shadow: 0 3px 10px rgba(24,55,91,.04); transition: border-color .15s, box-shadow .15s; }
.history-search-field:focus-within { border-color: #79a5fb; box-shadow: 0 0 0 3px rgba(21,94,239,.1), 0 5px 14px rgba(24,55,91,.06); }
.history-search-field svg { width: 17px; height: 17px; }
.history-filters__controls .history-search-field input { height: auto; padding: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; font-size: 10px; }
.history-filters__controls .history-search-field input:focus { box-shadow: none; }
.history-filters__clear { height: 40px; white-space: nowrap; }
.history-filters__clear:disabled { opacity: .45; cursor: not-allowed; }
.order-history { overflow-x: auto; }
.order-history-head { min-height: 42px; padding: 0 24px; color: #7d8999; background: #f8fafc; font-size: 8px; font-weight: 700; letter-spacing: .75px; }
.order-history-head, .order-history-row { display: grid; grid-template-columns: 120px minmax(250px, 1fr) 140px minmax(320px, 1.35fr) 175px; align-items: center; gap: 20px; min-width: 1085px; }
.order-history-row { min-height: 90px; padding: 15px 24px; border-bottom: 1px solid #e8edf3; transition: background .15s; }
.order-history-row:last-child { border-bottom: 0; }
.order-history-row time, .history-tax-id { color: #536174; font-family: var(--mono); font-size: 10px; line-height: 1.4; }
.order-history-row > strong { display: -webkit-box; overflow: hidden; color: var(--ink); font-size: 13px; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.order-history-row p { display: -webkit-box; overflow: hidden; margin: 0; color: #46566a; font-size: 11px; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.history-value { justify-self: end; min-width: 150px; padding: 10px 12px; color: #103e78; background: #edf5ff; border-left: 3px solid var(--blue); border-radius: 5px; font-family: var(--mono); font-size: 12px; font-weight: 900; text-align: right; white-space: nowrap; }
.history-value--restricted { color: #7d8999; background: #f1f3f6; border-left-color: #cfd6df; font-size: 9px; letter-spacing: .3px; }
.history-view-actions { display: flex; align-items: center; gap: 12px; }
.history-view-toggle { min-height: 32px; padding: 0 11px; font-size: 9px; }
.order-history.is-compact { display: block; overflow-x: auto; padding: 0; background: #fff; border-top: 1px solid #e2e8f0; }
.order-history-compact { display: grid; grid-template-columns: 94px 92px minmax(180px, .8fr) minmax(260px, 1.55fr) minmax(135px, .65fr) 150px; align-items: center; gap: 14px; min-width: 980px; min-height: 38px; padding: 0 18px; border-bottom: 1px solid #e7edf4; background: #fff; font-size: 10px; }
.order-history-compact:nth-child(even) { background: #fafcff; }
.order-history-compact:hover { background: #f2f7ff; }
.order-history-compact > strong:first-child { color: #173b66; font-family: var(--mono); font-size: 10px; }
.order-history-compact time, .order-history-compact > span { overflow: hidden; color: #536174; text-overflow: ellipsis; white-space: nowrap; }
.order-history-compact > span:nth-of-type(1) { color: #223d5f; font-weight: 800; }
.order-history-compact > span:nth-of-type(2) { color: #52647d; }
.order-history-compact > span:nth-of-type(3) { color: #6b7d93; font-size: 9px; }
.order-history-compact .history-value { min-width: 0; padding: 0; background: transparent; border: 0; font-size: 10px; }
body[data-role="sales"] .order-history-compact,
body[data-role="employee"] .order-history-compact { grid-template-columns: 94px 92px minmax(180px, .8fr) minmax(310px, 1.55fr) minmax(150px, .65fr); min-width: 830px; }
.order-print { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 3px; padding: 11px 13px 11px 16px; color: #173b66; background: linear-gradient(90deg, #edf5ff 0%, #f9fbff 100%); border: 1px solid #d6e5f8; border-left: 4px solid var(--blue); border-radius: 7px; }
.order-print__identity strong, .order-print__identity span { display: block; }
.order-print__identity strong { font-family: var(--mono); font-size: 10px; letter-spacing: .25px; }
.order-print__identity span { margin-top: 4px; color: #6c7f97; font-size: 8px; }
.order-print__button { min-height: 34px; padding: 0 13px; color: white; background: #123d72; border: 1px solid #123d72; border-radius: 5px; font-size: 8px; font-weight: 900; cursor: pointer; white-space: nowrap; }
.order-print__button:hover { background: #0b2f5c; }
.order-print__button:focus-visible { outline: 3px solid rgba(21,94,239,.2); outline-offset: 2px; }
.order-attachments { grid-column: 1 / -1; display: grid; grid-template-columns: 115px minmax(0, 1fr); align-items: center; gap: 12px; margin-top: 3px; padding: 11px 13px; background: #f4f8ff; border: 1px solid #d9e6f8; border-radius: 7px; }
.order-attachments__label { color: #536b8d; font-family: var(--mono); font-size: 7px; font-weight: 800; letter-spacing: .55px; text-transform: uppercase; }
.order-attachment-list { display: flex; flex-wrap: wrap; gap: 8px; }
.order-attachment-button { min-width: 0; max-width: 430px; display: grid; grid-template-columns: 35px minmax(0, 1fr); align-items: center; gap: 9px; padding: 7px 10px 7px 7px; color: #294766; background: white; border: 1px solid #cadbf0; border-radius: 6px; text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.order-attachment-button:hover:not(:disabled) { border-color: #79a5fb; box-shadow: 0 4px 12px rgba(21,94,239,.08); transform: translateY(-1px); }
.order-attachment-button:focus-visible { outline: 3px solid rgba(21,94,239,.18); outline-offset: 2px; }
.order-attachment-button:disabled { opacity: .6; cursor: wait; }
.order-attachment-type { display: grid; place-items: center; min-width: 35px; height: 33px; padding: 0 4px; color: #155eef; background: #eaf2ff; border-radius: 5px; font-family: var(--mono); font-size: 7px; font-weight: 900; }
.order-attachment-copy { min-width: 0; }
.order-attachment-copy strong, .order-attachment-copy small { display: block; }
.order-attachment-copy strong { overflow: hidden; color: var(--ink); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.order-attachment-copy small { margin-top: 3px; color: #748196; font-size: 7px; }
.order-payment { grid-column: 1 / -1; display: grid; grid-template-columns: 135px minmax(0, 1fr) auto; align-items: center; gap: 18px; margin-top: 3px; padding: 12px 13px 12px 16px; background: white; border: 1px solid #dfe6ef; border-left: 4px solid #cbd5e1; border-radius: 7px; }
.order-payment.is-partial { background: #fffbeb; border-color: #f6d776; border-left-color: #e7a900; }
.order-payment.is-paid { background: #f0fdf4; border-color: #a8e0bd; border-left-color: #14945c; }
.order-payment__heading span, .order-payment__heading strong { display: block; }
.order-payment__heading > span { color: #7a8798; font-family: var(--mono); font-size: 7px; font-weight: 800; letter-spacing: .45px; text-transform: uppercase; }
.order-payment__status { margin-top: 5px; color: #475467; font-size: 10px; }
.order-payment.is-partial .order-payment__status { color: #9a6700; }
.order-payment.is-paid .order-payment__status { color: #067647; }
.order-payment__details { min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.order-payment__details > span, .order-payment__installments > span { min-width: 110px; padding: 7px 10px; background: #f7f9fc; border: 1px solid #e5eaf1; border-radius: 5px; }
.order-payment__details small, .order-payment__details strong { display: block; }
.order-payment__details small { color: #8a96a6; font-family: var(--mono); font-size: 6px; letter-spacing: .35px; text-transform: uppercase; }
.order-payment__details strong { margin-top: 3px; color: #344054; font-size: 8px; }
.order-payment__installments { display: flex; flex: 1 1 310px; flex-wrap: wrap; gap: 6px; }
.order-payment__installments > span { min-width: 112px; }
.order-payment__installments > span.is-pending { background: #fff7d6; border-color: #efd46c; }
.order-payment__installments > span.is-pending strong { color: #8a6100; }
.order-payment__installments > span.is-paid { background: #eaf9ef; border-color: #a8ddb9; }
.order-payment__installments > span.is-paid strong { color: #067647; }
.order-payment__installments strong { font-family: var(--mono); }
.order-payment__edit { min-height: 34px; padding: 0 12px; color: #155eef; background: #f0f5ff; border: 1px solid #cfe0fb; border-radius: 5px; font-size: 8px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.order-payment__edit:hover { background: #e5efff; border-color: #99bdf8; }
.order-payment__edit:focus-visible { outline: 3px solid rgba(21,94,239,.18); outline-offset: 2px; }
.order-workflow { grid-column: 1 / -1; overflow: hidden; margin-top: 3px; background: #f8fafc; border: 1px solid #dfe6ef; border-radius: 7px; }
.workflow-track { display: grid; grid-template-columns: repeat(5, 1fr); margin: 0; padding: 17px 18px 14px; list-style: none; border-bottom: 1px solid #e2e8f0; }
.workflow-step { position: relative; display: grid; justify-items: center; gap: 7px; color: #98a2b3; font-family: var(--mono); font-size: 7px; text-align: center; text-transform: uppercase; }
.workflow-step::before { content: ""; position: absolute; z-index: 0; top: 11px; right: 50%; width: 100%; height: 2px; background: #dce3ec; }
.workflow-step:first-child::before { display: none; }
.workflow-step__marker { position: relative; z-index: 1; display: grid; place-items: center; width: 24px; height: 24px; color: #8491a2; background: #fff; border: 2px solid #d5dde8; border-radius: 50%; font-size: 7px; font-weight: 900; }
.workflow-step strong { color: inherit; font-size: inherit; letter-spacing: .25px; }
.workflow-step.is-complete { color: #087443; }
.workflow-step.is-complete::before { background: #52bd84; }
.workflow-step.is-complete .workflow-step__marker { color: white; background: #14945c; border-color: #14945c; }
.workflow-step.is-current { color: #155eef; }
.workflow-step.is-current::before { background: var(--blue); }
.workflow-step.is-current .workflow-step__marker { color: white; background: var(--blue); border-color: var(--blue); box-shadow: 0 0 0 4px rgba(21,94,239,.1); }
.workflow-step.is-blocked { color: #b54708; }
.workflow-step.is-blocked::before { background: #f4b15b; }
.workflow-step.is-blocked .workflow-step__marker { color: #b54708; background: #fff5e8; border-color: #f4a94c; }
.workflow-step.is-locked { color: #a3acb9; }
.workflow-controls { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 10px 13px 10px 16px; background: white; }
.workflow-status-copy { margin: 0; }
.workflow-status-copy strong, .workflow-status-copy span { display: block; }
.workflow-status-copy strong { color: var(--ink); font-size: 9px; }
.workflow-status-copy span { margin-top: 4px; color: #7a8798; font-size: 8px; }
.workflow-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.workflow-action, .workflow-payment { min-height: 34px; display: inline-flex; align-items: center; justify-content: center; padding: 0 11px; border-radius: 5px; font-size: 8px; font-weight: 800; white-space: nowrap; }
.workflow-action { border: 1px solid #d5dde8; cursor: pointer; transition: border-color .15s, background .15s, transform .15s; }
.workflow-action:hover:not(:disabled) { transform: translateY(-1px); }
.workflow-action:focus-visible { outline: 3px solid rgba(21,94,239,.18); outline-offset: 2px; }
.workflow-action:disabled { opacity: .55; cursor: not-allowed; }
.workflow-action--payment { color: #b54708; background: #fff7ed; border-color: #fed7aa; }
.workflow-action--paid { color: #067647; background: #ecfdf3; border-color: #a9e8c7; }
.workflow-action--advance { color: white; background: var(--blue); border-color: var(--blue); }
.workflow-action--advance:disabled { color: #748196; background: #edf1f5; border-color: #dce2ea; }
.workflow-payment { color: #b54708; background: #fff7ed; border: 1px solid #fed7aa; }
.workflow-payment.is-paid { color: #067647; background: #ecfdf3; border-color: #a9e8c7; }

.payment-dialog { width: min(690px, calc(100vw - 28px)); }
.payment-order-context { margin: -5px 0 21px; padding: 13px 15px; background: #f3f7fd; border-left: 3px solid var(--blue); border-radius: 5px; }
.payment-order-context span, .payment-order-context strong { display: block; }
.payment-order-context span { color: #7b8798; font-family: var(--mono); font-size: 7px; letter-spacing: .5px; text-transform: uppercase; }
.payment-order-context strong { margin-top: 5px; color: var(--ink); font-size: 10px; }
.payment-dialog select { width: 100%; height: 44px; padding: 0 12px; color: var(--text); background: white; border: 1px solid #d9e0e8; border-radius: 6px; outline: 0; font-size: 10px; }
.payment-dialog select:focus { border-color: #8fb2f9; box-shadow: 0 0 0 3px rgba(21,94,239,.1); }
.payment-dialog select:disabled { color: #98a2b3; background: #f4f6f8; }
.payment-installment-toggle { display: grid !important; grid-template-columns: 18px 1fr; align-items: start; gap: 11px !important; margin: 4px 0 18px !important; padding: 13px 14px; background: #fafbfd; border: 1px solid #e1e7ef; border-radius: 6px; cursor: pointer; }
.payment-installment-toggle input { width: 17px !important; height: 17px !important; margin: 1px 0 0; accent-color: var(--blue); }
.payment-installment-toggle strong, .payment-installment-toggle small { display: block; }
.payment-installment-toggle strong { color: #344054; font-size: 9px; }
.payment-installment-toggle small { margin-top: 4px; color: #8491a2; font-size: 8px; font-weight: 400; }
.payment-installment-toggle:has(input:disabled) { opacity: .55; cursor: not-allowed; }
.payment-installments { margin: 0 0 18px; overflow: hidden; background: #f8fbff; border: 1px solid #dbe7f7; border-radius: 7px; }
.payment-installments__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 14px; background: #eef5ff; border-bottom: 1px solid #dbe7f7; }
.payment-installments__head span, .payment-installments__head strong { display: block; }
.payment-installments__head span { color: #6681a7; font-family: var(--mono); font-size: 6px; letter-spacing: .45px; text-transform: uppercase; }
.payment-installments__head strong { margin-top: 4px; color: #183b66; font-size: 9px; }
.payment-add-installment { min-height: 32px; padding: 0 10px; font-size: 8px; }
.payment-installment-list { display: grid; gap: 9px; padding: 13px 14px; }
.payment-installment-row { display: grid; grid-template-columns: 70px minmax(0, 1fr) 96px; align-items: center; gap: 12px; }
.payment-installment-row > label { color: #536174; font-family: var(--mono); font-size: 8px; font-weight: 800; }
.payment-installment-field { height: 39px; display: grid; grid-template-columns: 35px minmax(0, 1fr) 37px; align-items: center; overflow: hidden; background: white; border: 1px solid #d7e1ee; border-radius: 5px; }
.payment-installment-field > span { display: grid; place-items: center; align-self: stretch; color: #155eef; background: #edf4ff; border-right: 1px solid #d7e1ee; font-family: var(--mono); font-size: 9px; font-weight: 900; }
.payment-installment-field input { width: 100%; height: 100%; padding: 0 10px; border: 0; outline: 0; font-size: 10px; }
.payment-installment-field button { align-self: stretch; color: #98a2b3; background: white; border: 0; border-left: 1px solid #e1e7ef; font-size: 17px; cursor: pointer; }
.payment-installment-field button:hover:not(:disabled) { color: #b42318; background: #fff5f4; }
.payment-installment-field button:disabled { opacity: .35; cursor: not-allowed; }
.payment-installment-paid { min-height: 39px; display: flex !important; align-items: center; justify-content: center; gap: 7px !important; padding: 0 9px; color: #9a6700 !important; background: #fff7d6; border: 1px solid #efd46c; border-radius: 5px; cursor: pointer; }
.payment-installment-paid:has(input:checked) { color: #067647 !important; background: #eaf9ef; border-color: #a8ddb9; }
.payment-installment-paid input { width: 15px !important; height: 15px !important; margin: 0; accent-color: #14945c; }
.payment-installment-paid span { font-size: 7px; font-weight: 900; text-transform: uppercase; }
.payment-installment-total { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; background: white; border-top: 1px solid #dbe7f7; }
.payment-installment-total span { color: #667085; font-size: 8px; }
.payment-installment-total strong { color: #103e78; font-family: var(--mono); font-size: 12px; }

/* Historial por tarjetas: el color completo comunica el estado del pago. */
.order-history { display: grid; gap: 15px; overflow: visible; padding: 18px; background: #eef2f6; }
.order-history-card { position: relative; overflow: hidden; min-width: 0; color: var(--text); background: #fff; border: 1px solid #dce3eb; border-radius: 12px; box-shadow: 0 5px 16px rgba(15,35,59,.055); transition: border-color .15s, box-shadow .15s, transform .15s; }
.order-history-card:hover { transform: translateY(-1px); box-shadow: 0 9px 24px rgba(15,35,59,.09); }
.order-history-card.payment-unpaid { background: #fff; border-color: #d8e0e9; }
.order-history-card.payment-partial { background: #fff2b8; border-color: #e4bd32; }
.order-history-card.payment-paid { background: #dff3e5; border-color: #69b885; }
.order-card__header { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 13px 18px 8px; }
.order-card__reference { display: flex; align-items: baseline; gap: 14px; }
.order-card__reference strong { color: #112f53; font-family: var(--mono); font-size: 12px; letter-spacing: .25px; }
.order-card__reference time { color: #66778b; font-family: var(--mono); font-size: 9px; }
.order-card__payment-state { padding: 7px 10px; color: #475467; background: rgba(255,255,255,.62); border: 1px solid rgba(84,101,121,.18); border-radius: 18px; font-size: 8px; font-weight: 900; }
.order-card__payment-state.is-partial { color: #7d5900; background: rgba(255,248,211,.78); border-color: rgba(174,127,0,.32); }
.order-card__payment-state.is-paid { color: #086a3f; background: rgba(240,253,244,.78); border-color: rgba(20,148,92,.3); }
.order-card__summary { display: grid; grid-template-columns: minmax(190px,.8fr) minmax(300px,1.65fr) 175px; gap: 24px; align-items: start; padding: 8px 18px 18px; }
.order-card__summary section > span { display: block; margin-bottom: 6px; color: #66778b; font-family: var(--mono); font-size: 7px; font-weight: 800; letter-spacing: .55px; text-transform: uppercase; }
.order-card__customer strong, .order-card__customer small { display: block; }
.order-card__customer strong { color: #122f51; font-size: 13px; line-height: 1.35; }
.order-card__customer small { margin-top: 5px; color: #596c82; font-family: var(--mono); font-size: 8px; }
.order-card__work p { display: -webkit-box; overflow: hidden; margin: 0; color: #34475d; font-size: 10px; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.order-card__sheets { display: block; margin-top: 8px; color: #285887; font-size: 8px; font-weight: 800; }
.order-card__commercial { text-align: right; }
.order-card__commercial .history-value { display: inline-block; min-width: 0; padding: 0; color: #103e78; background: transparent; border: 0; border-radius: 0; font-size: 13px; }
.order-card__commercial .history-value--restricted { color: #647386; font-size: 8px; }
.order-history-card .order-print,
.order-history-card .order-attachments,
.order-history-card .order-payment,
.order-history-card .order-workflow { grid-column: auto; margin: 0; background: transparent; border: 0; border-top: 1px solid rgba(44,65,88,.13); border-radius: 0; }
.order-history-card .order-print { padding: 11px 18px; }
.order-history-card .order-print__identity span { color: #50677f; }
.order-history-card .order-attachments { padding: 11px 18px; }
.order-history-card .order-payment { grid-template-columns: minmax(0,1fr) auto; padding: 11px 18px; }
.order-history-card .order-payment__heading { display: none; }
.order-history-card .order-payment__details > span { background: rgba(255,255,255,.46); border-color: rgba(44,65,88,.13); }
.order-history-card .order-workflow { overflow: hidden; }
.order-history-card .workflow-track { padding: 15px 18px 11px; border-bottom: 0; }
.order-history-card .workflow-controls { min-height: 55px; padding: 8px 18px 12px; background: transparent; }

@media (max-width: 900px) {
  .order-card__summary { grid-template-columns: 1fr 1.5fr; }
  .order-card__commercial { grid-column: 1 / -1; text-align: left; }
}

/* Formato oficial de impresión de OT */
.ot-print-sheet { display: none; }

@media print {
  @page { size: A4 portrait; margin: 8mm; }
  html, body { width: auto; min-width: 0; height: auto; margin: 0; padding: 0; background: white !important; }
  body:not(.is-printing-quote) > :not(#ot-print-sheet) { display: none !important; }
  body:not(.is-printing-quote) #ot-print-sheet { display: block !important; width: 180mm; margin: 0 2mm 0 12mm !important; color: #000; background: #fff; font-family: Arial, Helvetica, sans-serif; font-size: 9.5pt; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  body.is-printing-quote > :not(#app-shell) { display: none !important; }
  body.is-printing-quote #app-shell { display: block !important; }
  body.is-printing-quote #app-shell * { visibility: hidden; }
  body.is-printing-quote #quote-print-sheet, body.is-printing-quote #quote-print-sheet * { visibility: visible; }
  body.is-printing-quote #quote-print-sheet { position: absolute; inset: 0 auto auto 0; width: 194mm; min-height: 0; margin: 0; padding: 5mm 8mm; box-shadow: none; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  body.is-printing-quote #quote-print-sheet input { color: #000; appearance: none; -webkit-appearance: none; }
  body.is-printing-quote .quotation-heading { min-height: 34mm; grid-template-columns: 43mm 1fr 65mm; }
  body.is-printing-quote .quotation-heading img { width: 42mm; margin-top: 6mm; }
  body.is-printing-quote .quotation-heading h2 { margin-top: 8mm; font-size: 17pt; }
  body.is-printing-quote .quotation-company label { min-height: 4.4mm; }
  body.is-printing-quote .quotation-lines th, body.is-printing-quote .quotation-lines td { height: 4.9mm; font-size: 6.5pt; }
  body.is-printing-quote .quotation-conditions { font-size: 5.5pt; line-height: 1.18; }
  body.is-printing-quote .quotation-conditions ul { margin: 1mm 0; }
  .ot-print-header { height: 27mm; display: grid; grid-template-columns: 42mm 1fr 42mm; align-items: stretch; border: 1.2pt solid #000; }
  .ot-print-brand { display: grid; place-items: center; padding: .5mm; }
  .ot-print-brand img { width: 78mm; height: auto; object-fit: contain; }
  .ot-print-number { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.5mm; border-left: 1pt solid #000; text-align: center; }
  .ot-print-number small { font-size: 7.5pt; font-weight: 900; letter-spacing: .55pt; line-height: 1.1; }
  .ot-print-number strong { color: #000; font-size: 18pt; letter-spacing: .7pt; white-space: nowrap; }
  .ot-print-number span { font-size: inherit; }
  .ot-print-upper { height: 49mm; display: grid; grid-template-columns: 1fr 46mm; border-right: 1.2pt solid #000; border-left: 1.2pt solid #000; }
  .ot-print-upper-main { min-width: 0; display: grid; grid-template-rows: 21mm 28mm; border-right: 1pt solid #000; }
  .ot-print-info { display: grid; grid-template-columns: 1fr 49mm; }
  .ot-print-info > div { min-height: 7mm; display: grid; grid-template-columns: 20mm 1fr; align-items: center; border-right: 1pt solid #000; border-bottom: 1pt solid #000; }
  .ot-print-info > div:nth-child(even) { border-right: 0; }
  .ot-print-info b { align-self: stretch; display: flex; align-items: center; padding: 0 2mm; border-right: 1pt solid #000; font-size: 7pt; }
  .ot-print-info span { min-width: 0; overflow: hidden; padding: 0 2mm; font-size: 8.5pt; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; }
  .ot-print-material-panel { min-width: 0; display: grid; grid-template-rows: 14mm 35mm; }
  .ot-print-source { display: grid; grid-template-rows: 5mm 1fr; border-bottom: 1pt solid #000; }
  .ot-print-source b { display: grid; place-items: center; background: #ececec; border-bottom: 1pt solid #000; font-size: 7.5pt; letter-spacing: .25pt; }
  .ot-print-source > div { display: grid; grid-template-columns: 1fr 1fr; }
  .ot-print-source span { display: inline-flex; align-items: center; gap: 1mm; padding: .7mm 1mm; font-size: 6.3pt; font-weight: 700; line-height: 1.05; }
  .ot-print-source span:first-child { border-right: 1pt solid #000; }
  .ot-print-sheets { min-width: 0; display: grid; grid-template-rows: 1fr; border-bottom: 1pt solid #000; }
  .ot-print-sheets > span { display: block; padding: 2.5mm 3mm; font-size: 8.5pt; font-weight: 700; line-height: 1.55; white-space: pre-line; }
  .ot-print-options { display: grid; grid-template-columns: 1.05fr 1fr 1.25fr; border-bottom: 1pt solid #000; }
  .ot-print-options > div { min-height: 28mm; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; border-right: 1pt solid #000; }
  .ot-print-options > div:last-child { border-right: 0; }
  .ot-print-options b { grid-column: 1 / -1; height: 5mm; display: grid; place-items: center; padding: 0 2mm; background: #ececec; border-bottom: 1pt solid #000; font-size: 7.5pt; letter-spacing: .25pt; text-align: center; }
  .ot-print-options span { min-height: 5.4mm; display: flex; align-items: center; gap: 1mm; padding: .5mm 1mm; font-size: 6.5pt; font-weight: 700; line-height: 1.05; }
  .ot-print-source span::before, .ot-print-options span::before { content: ""; flex: 0 0 auto; width: 4.2mm; height: 4.2mm; background: #fff; border: 1.3pt solid #000; }
  .ot-print-source span.is-selected::before, .ot-print-options span.is-selected::before { background: #000; box-shadow: inset 0 0 0 1.1mm #fff; }
  .ot-print-table { width: 100%; border-collapse: collapse; table-layout: fixed; border-right: 1.2pt solid #000; border-left: 1.2pt solid #000; }
  .ot-print-table th, .ot-print-table td { border-right: 1pt solid #000; border-bottom: 1pt solid #000; }
  .ot-print-table th:last-child, .ot-print-table td:last-child { border-right: 0; }
  .ot-print-table th { height: 8mm; padding: 1mm 2mm; background: #ececec; font-size: 8.5pt; letter-spacing: .35pt; }
  .ot-print-table th:nth-child(1) { width: 22mm; padding-right: .5mm; padding-left: .5mm; font-size: 8.2pt; letter-spacing: .1pt; text-align: center; white-space: nowrap; }
  .ot-print-table th:nth-child(3) { width: 40mm; }
  .ot-print-price { display: none; }
  .ot-print-sheet.includes-price .ot-print-price { display: table-cell; }
  .ot-print-sheet.includes-price .ot-print-table th:nth-child(3) { width: 30mm; }
  .ot-print-sheet.includes-price .ot-print-table th:nth-child(4) { width: 30mm; text-align: right; }
  .ot-print-sheet.includes-price .ot-print-table td:nth-child(4) { text-align: right; font-weight: 700; white-space: nowrap; }
  .ot-print-table td { height: 8mm; padding: 2.2mm 2.5mm; vertical-align: top; font-size: 9.5pt; line-height: 1.35; white-space: pre-wrap; }
  .ot-print-table .ot-print-main-row td { height: 142mm; }
  .ot-print-table td:first-child { text-align: center; }
  .ot-print-table, .ot-print-footer { break-inside: avoid; page-break-inside: avoid; }
  .ot-print-footer { min-height: 25mm; display: grid; grid-template-columns: 1fr 43mm; border-right: 1.2pt solid #000; border-bottom: 1.2pt solid #000; border-left: 1.2pt solid #000; }
  .ot-print-notes { padding: 2.2mm 3mm; border-right: 1pt solid #000; }
  .ot-print-notes p { margin: 0 0 1.3mm; font-size: 7pt; line-height: 1.25; }
  .ot-print-signature { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 1.5mm; padding: 3mm 5mm; }
  .ot-print-signature span { width: 100%; border-top: 1pt solid #000; }
  .ot-print-signature b { font-size: 8pt; }
}

@media (max-width: 1100px) {
  .workspace-view { padding: 34px 28px 64px; }
  .entry-layout { grid-template-columns: 1fr; }
  .quote-layout { grid-template-columns: 1fr; }
  .quote-summary { position: static; }
  .quote-item__fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .entry-aside { min-height: 310px; }
  .entry-aside__index { margin-bottom: 45px; }
  .history-filters { grid-template-columns: 1fr; gap: 16px; }
  .inventory-layout { grid-template-columns: 1fr; }
  .inventory-side { grid-template-columns: 1fr 1fr; }
  .accounting-grid { grid-template-columns: 1fr; }
  .accounting-overview article { min-height: 118px; }
}

@media (max-width: 860px) {
  .workspace-view { padding: 32px 22px 60px; }
  .excel-tabs { overflow-x: auto; }
  .excel-keyboard-hint { display: none; }
  .quote-history-toolbar { grid-template-columns: 1fr; gap: 14px; }
  .registry-panel { overflow-x: auto; }
  .registry-panel__head { position: sticky; left: 0; min-width: min(calc(100vw - 44px), 980px); }
  .history-filters__controls { grid-template-columns: 1fr 1fr; }
  .history-filters__controls label:first-child { grid-column: 1 / -1; }
  .quote-meta__grid { grid-template-columns: 1fr 1fr; }
  .quote-item__fields { grid-template-columns: 1fr 1fr; }
  .quote-item__result { grid-template-columns: repeat(3, 1fr); }
  .quote-item__unit, .quote-item__total { grid-column: span 1; }
  .inventory-summary { grid-template-columns: 1fr 1fr; }
  .inventory-summary article:nth-child(2) { border-right: 0; }
  .inventory-summary article:nth-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,.11); }
  .inventory-toolbar { align-items: stretch; flex-direction: column; }
  .inventory-toolbar__controls, .inventory-search { width: 100%; }
  .inventory-search { flex: 1; }
  .inventory-catalog { overflow-x: auto; }
  .inventory-table-head, .inventory-row { min-width: 760px; }
  .accounting-panels { grid-template-columns: 1fr; }
  .payroll-board__head { align-items: stretch; flex-direction: column; }
  .payroll-board__actions { flex-wrap: wrap; }
  .payroll-list { overflow-x: auto; }
  .payroll-table-head, .payroll-row { min-width: 720px; }
}

@media (max-width: 650px) {
  .workspace-view { padding: 27px 16px 52px; }
  .workspace-hero { align-items: flex-start; flex-direction: column; }
  .workspace-hero h1 { font-size: 39px; }
  .workspace-hero .button { width: 100%; }
  .registry-strip { grid-template-columns: 1fr; }
  .registry-strip article { min-height: 82px; border-right: 0; border-bottom: 1px solid var(--line); }
  .registry-strip article:last-child { border-bottom: 0; }
  .entry-card { padding: 21px 18px; }
  .entry-card .form-grid { grid-template-columns: 1fr; gap: 0; }
  .delivery-document { grid-template-columns: 1fr; }
  .delivery-document__upload { width: 100%; }
  .next-order-number { width: 100%; }
  .client-sheets__heading, .client-sheets__actions { align-items: stretch; flex-direction: column; }
  .client-sheet-row, .client-sheet-row.is-client-material { grid-template-columns: 1fr 36px; }
  .client-sheet-row label { grid-column: 1 / -1; }
  .quote-meta, .quote-products { padding: 18px; }
  .quote-meta__grid, .quote-item__fields, .quote-services > div { grid-template-columns: 1fr; }
  .quote-meta__wide, .quote-item__description, .quote-item__product { grid-column: auto; }
  .quote-services label { grid-template-columns: minmax(0, 1fr) 125px; }
  .quote-item__result { grid-template-columns: 1fr 1fr; }
  .quote-item__result > span { border-bottom: 1px solid #d7e0eb; }
  .quote-item__total { grid-column: 1 / -1; }
  .entry-actions { align-items: stretch; flex-direction: column; }
  .entry-actions .button { width: 100%; }
  .entry-actions__buttons { display: grid; grid-template-columns: 1fr; }
  .excel-toolbar { align-items: stretch; flex-direction: column; }
  .excel-toolbar__actions { width: 100%; flex-direction: column; }
  .excel-toolbar .button { width: 100%; }
  .calculo-toolbar { align-items: stretch; flex-direction: column; padding: 13px; }
  .calculo-clear { width: 100%; }
  .quote-client-picker { width: 100%; }
  .excel-toolbar--plan > span { margin-bottom: 2px; }
  .quote-history-toolbar { padding: 16px; }
  .entry-aside { min-height: 330px; padding: 23px; }
  .registry-panel__head { min-width: calc(100vw - 32px); }
  .history-access { align-self: flex-start; }
  .history-filters { padding: 18px; }
  .history-filters__controls { grid-template-columns: 1fr; }
  .history-filters__controls label:first-child { grid-column: auto; }
  .history-filters__clear { width: 100%; }
  .order-history { gap: 11px; padding: 10px; }
  .order-card__header { align-items: flex-start; flex-direction: column; gap: 8px; padding: 15px 15px 8px; }
  .order-card__summary { grid-template-columns: 1fr; gap: 16px; padding: 8px 15px 16px; }
  .order-card__commercial { grid-column: auto; }
  .order-payment { grid-template-columns: 1fr; align-items: start; }
  .order-print { align-items: stretch; flex-direction: column; }
  .order-print__button { width: 100%; }
  .order-payment__edit { width: 100%; }
  .payment-dialog .form-grid { grid-template-columns: 1fr; gap: 0; }
  .payment-installment-row { grid-template-columns: 58px minmax(0, 1fr); }
  .payment-installment-paid { grid-column: 2; justify-self: stretch; }
  .inventory-hero__actions { width: 100%; align-items: stretch; flex-direction: column; }
  .live-indicator { align-self: flex-start; }
  .inventory-summary { grid-template-columns: 1fr; }
  .inventory-summary article { min-height: 82px; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.11); }
  .inventory-summary article:last-child { border-bottom: 0; }
  .inventory-toolbar__controls, .inventory-side { grid-template-columns: 1fr; flex-direction: column; }
  .inventory-toolbar select { width: 100%; }
  .inventory-catalog { overflow: hidden; }
  .inventory-table-head { display: none; }
  .inventory-row { min-width: 0; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "identity state" "spec spec" "gauge action"; gap: 12px 14px; padding: 16px 15px 16px 20px; }
  .inventory-identity { grid-area: identity; }
  .inventory-spec { grid-area: spec; padding-top: 9px; border-top: 1px solid #edf1f5; }
  .stock-gauge { grid-area: gauge; }
  .stock-state { grid-area: state; justify-self: end; }
  .inventory-actions { grid-area: action; align-self: center; }
  .accounting-period { width: 100%; text-align: center; }
  .attendance-clock { grid-template-columns: 34px minmax(0, 1fr); }
  .attendance-clock__body { padding: 21px 17px 19px; }
  .attendance-clock__head { align-items: flex-start; flex-direction: column; gap: 10px; }
  .attendance-clock time { font-size: 37px; letter-spacing: -1.5px; }
  .attendance-clock__actions { grid-template-columns: 1fr; }
  .accounting-overview { grid-template-columns: 1fr; }
  .accounting-overview article, .accounting-overview article:nth-child(even), .accounting-overview article:nth-last-child(-n+2) { min-height: 96px; border-right: 0; border-bottom: 1px solid var(--line); }
  .accounting-overview article:last-child { border-bottom: 0; }
  .payroll-board__actions { display: grid; grid-template-columns: 1fr; }
  .payroll-board__actions label, .payroll-board__actions input, .payroll-board__actions .button { width: 100%; }
  .payroll-dialog .form-grid { grid-template-columns: 1fr; gap: 0; }
}
