:root {
  --ink: #25272a;
  --dark: #202225;
  --muted: #74787e;
  --line: #e6e7e9;
  --bg: #f5f6f7;
  --orange: #f39a18;
  --orange2: #ffb52f;
  --white: #fff;
  --green: #16875f;
  --blue: #3d6fda;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  font-size: 16px;
}
.auth-shell{min-height:100vh;background:linear-gradient(135deg,#181a1d 0 44%,#f4f5f6 44%);display:grid;grid-template-columns:minmax(300px,560px) minmax(320px,520px);gap:7vw;align-items:center;justify-content:center;padding:38px}.auth-shell[hidden],#productShell[hidden]{display:none}.auth-brand-panel{color:#fff;max-width:520px}.auth-brand-panel img{width:150px;height:150px;object-fit:contain;background:#fff;border-radius:28px;padding:8px;margin-bottom:22px}.auth-brand-panel h1{font-size:3rem;line-height:1;margin:0}.auth-brand-panel strong{display:block;color:var(--orange);font-size:1.2rem;margin-top:10px}.auth-brand-panel p{font-size:1.08rem;line-height:1.7;color:#d5d7da;max-width:500px}.auth-card{background:#fff;border:1px solid var(--line);border-radius:24px;box-shadow:0 25px 70px #1012142b;padding:32px;display:grid;gap:16px}.auth-card[hidden]{display:none}.auth-card>small{color:var(--orange);font-weight:900;letter-spacing:.12em}.auth-card h2{font-size:2rem;margin:0}.auth-card p{margin:0;color:var(--muted);line-height:1.5}.auth-card label{font-weight:800;font-size:.86rem}.auth-card input{display:block;width:100%;margin-top:7px;border:1px solid var(--line);border-radius:11px;padding:13px;font:inherit}.auth-card label span{display:block;color:var(--muted);font-size:.72rem;margin-top:5px;font-weight:500}.auth-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.auth-primary,.auth-secondary{display:block;width:100%;border:0;border-radius:11px;padding:14px;font:inherit;font-weight:900;text-align:center;text-decoration:none;cursor:pointer}.auth-primary{background:var(--dark);color:#fff}.auth-secondary{background:#fff2de;color:#a95f00;border:1px solid #ffd28f}.auth-link{border:0;background:transparent;color:#b56800;font:inherit;font-weight:800;cursor:pointer}.auth-link.inline{display:inline;padding:0}.trial-note{text-align:center;font-size:.82rem}.auth-message{position:fixed;left:50%;bottom:20px;transform:translateX(-50%);background:#e9f8ef;color:#13713e;border-radius:10px;padding:10px 15px;font-weight:750}.auth-message:empty{display:none}.auth-message.error{background:#fff0f0;color:#b52626}.expired-card dl{margin:0;border:1px solid var(--line);border-radius:13px;overflow:hidden}.expired-card dl div{display:grid;grid-template-columns:130px 1fr;padding:10px 13px;border-bottom:1px solid var(--line)}.expired-card dl div:last-child{border:0}.expired-card dt{color:var(--muted)}.expired-card dd{margin:0;font-weight:800}.membership-price{font-size:1.2rem;color:#16875f}.data-safe{font-size:.8rem}.trial-banner{width:max-content;max-width:100%;margin:-7px 0 12px auto;background:#fff8eb;color:#8b5000;border:1px solid #ffe0aa;border-radius:9px;padding:6px 10px;font-size:.72rem;font-weight:800;text-align:center}.trial-banner[hidden]{display:none}
@media(max-width:760px){.auth-shell{grid-template-columns:1fr;background:linear-gradient(180deg,#1b1d20 0 235px,#f4f5f6 235px);padding:24px 15px;align-content:start;gap:20px}.auth-brand-panel{text-align:center}.auth-brand-panel img{width:92px;height:92px;border-radius:20px;margin-bottom:10px}.auth-brand-panel h1{font-size:2rem}.auth-brand-panel strong{font-size:.95rem}.auth-brand-panel p{font-size:.83rem;line-height:1.45}.auth-card{padding:23px;border-radius:19px}.auth-card h2{font-size:1.6rem}.auth-grid{grid-template-columns:1fr}.expired-card dl div{grid-template-columns:105px 1fr;font-size:.8rem}}
.admin-mobile{border:1px solid #ffd08a;background:#fff3dd;color:#915500;border-radius:10px;padding:10px;font-weight:850;cursor:pointer}.admin-summary{display:grid;grid-template-columns:repeat(5,1fr);gap:12px;margin:18px 0}.admin-summary article{background:#fff;border:1px solid var(--line);border-radius:16px;padding:17px}.admin-summary small,.admin-summary strong{display:block}.admin-summary small{color:var(--muted);font-size:.75rem}.admin-summary strong{font-size:1.45rem;margin-top:8px}.admin-search{display:flex;align-items:center;gap:9px;background:#fff;border:1px solid var(--line);border-radius:12px;padding:0 13px;max-width:520px}.admin-search input{border:0;outline:0;padding:13px 0;width:100%;font:inherit}.admin-clients{display:grid;gap:10px;margin-top:16px}.admin-clients article{display:grid;grid-template-columns:minmax(230px,1fr) 100px 190px 220px;gap:16px;align-items:center;background:#fff;border:1px solid var(--line);border-radius:15px;padding:14px}.admin-person{display:flex;align-items:center;gap:11px}.admin-person>b{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;background:#fff0d6;color:#a65e00}.admin-person span strong,.admin-person span small,.admin-dates small,.admin-dates strong{display:block}.admin-person small,.admin-dates small{color:var(--muted);font-size:.72rem;margin-top:2px}.admin-status{border-radius:99px;padding:7px 10px;text-align:center;font-size:.75rem;font-weight:850}.admin-status.active{background:#e4f7eb;color:#13713e}.admin-status.trial{background:#fff1d9;color:#9a5800}.admin-status.expired,.admin-status.blocked{background:#ffe7e7;color:#b52626}.admin-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px}.admin-actions button{border:0;border-radius:9px;padding:9px 7px;background:var(--dark);color:#fff;font:inherit;font-size:.72rem;font-weight:800;cursor:pointer}.admin-actions .block{background:#fff0f0;color:#b52626}.admin-actions .unblock{background:#e4f7eb;color:#13713e}.admin-back{width:auto}.admin-only[hidden]{display:none!important}
@media(max-width:1050px){.admin-summary{grid-template-columns:repeat(3,1fr)}.admin-clients article{grid-template-columns:1fr 100px 180px}.admin-actions{grid-column:1/-1}}
@media(max-width:760px){.admin-mobile{font-size:.7rem;padding:8px}.admin-header{align-items:start}.admin-header .subcopy{display:none}.admin-summary{grid-template-columns:1fr 1fr;gap:8px}.admin-summary article{padding:13px}.admin-summary article:last-child{grid-column:1/-1}.admin-clients article{grid-template-columns:1fr auto;gap:10px}.admin-dates{grid-column:1/-1}.admin-actions{grid-column:1/-1}.admin-search{max-width:none}}
.membership-whatsapp{text-align:center;font-size:.82rem!important;color:var(--muted)!important}.membership-whatsapp strong{color:#16875f}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 244px;
  background: var(--dark);
  padding: 26px 18px;
  color: #fff;
  display: flex;
  flex-direction: column;
  z-index: 10;
}
.logo {
  width: 100%;
  height: 88px;
  object-fit: contain;
  background: #fff;
  border-radius: 17px;
  padding: 9px;
  margin-bottom: 30px;
}
.sidebar nav {
  display: grid;
  gap: 7px;
}
.nav {
  border: 0;
  background: transparent;
  color: #b9bdc2;
  padding: 14px 15px;
  border-radius: 12px;
  text-align: left;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.nav span {
  margin-left: 12px;
}
.nav.active,
.nav:hover {
  background: var(--orange);
  color: var(--dark);
}
.user {
  margin-top: auto;
  border-top: 1px solid #ffffff19;
  padding-top: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.user > b {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--orange);
  display: grid;
  place-items: center;
  color: #222;
}
.user strong,
.user small {
  display: block;
}
.user strong {
  font-size: 0.84rem;
}
.user small {
  font-size: 0.74rem;
  color: #969a9f;
  margin-top: 3px;
}
main {
  margin-left: 244px;
  padding: 34px clamp(24px, 4vw, 62px) 80px;
  min-height: 100vh;
}
.view {
  display: none;
}
.view.active {
  display: block;
}
.topbar,
.project-header,
.section-title,
.work-head,
.progress-copy,
.table-tools,
.tool-actions,
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar,
.project-header {
  margin-bottom: 28px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  letter-spacing: -0.045em;
  line-height: 1.05;
}
h2 {
  font-size: 1.35rem;
}
.kicker {
  display: block;
  color: var(--orange);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  font-weight: 900;
  margin-bottom: 7px;
}
.actions {
  display: flex;
  gap: 9px;
}
.primary,
.icon-btn,
.text-btn,
.back,
.more,
.filter {
  font: inherit;
  border: 0;
  cursor: pointer;
}
.danger {
  height: 45px;
  border: 0;
  border-radius: 11px;
  padding: 0 15px;
  background: #c93636;
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.danger:disabled {
  opacity: 0.65;
  cursor: wait;
}
.select-number {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.select-number input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--orange);
}
.primary {
  background: var(--ink);
  color: #fff;
  border-radius: 12px;
  padding: 13px 17px;
  font-weight: 800;
}
.icon-btn,
.back,
.more {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 1.25rem;
}
.totals {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 13px;
  margin-bottom: 30px;
}
.totals article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 19px;
}
.totals small,
.totals span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
}
.totals strong {
  display: block;
  font-size: 1.65rem;
  margin: 12px 0 6px;
}
.totals .orange {
  color: #d97900;
  font-weight: 700;
}
.text-btn {
  background: transparent;
  color: var(--muted);
  font-weight: 750;
}
.favorites {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 15px;
}
.work-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 19px;
  padding: 20px;
  text-align: left;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  transition: 0.2s;
}
.work-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px #2221;
}
.work-card.dark {
  background: linear-gradient(145deg, #303337, #202225);
  color: #fff;
  border-color: #202225;
}
.work-head b {
  width: 43px;
  height: 43px;
  border-radius: 12px;
  background: var(--orange);
  display: grid;
  place-items: center;
  color: #242629;
}
.work-head span {
  color: var(--orange);
  font-size: 1.25rem;
}
.work-card > small {
  display: block;
  color: var(--orange);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  margin-top: 24px;
}
.work-card h3 {
  margin: 5px 0 22px;
  font-size: 1.15rem;
}
.progress-copy {
  font-size: 0.8rem;
}
.progress {
  height: 7px;
  background: #e5e7e9;
  border-radius: 99px;
  overflow: hidden;
  margin-top: 9px;
}
.progress i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--orange), var(--orange2));
  border-radius: 99px;
}
.work-card footer {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid #ffffff20;
  margin-top: 19px;
  padding-top: 16px;
}
.work-card:not(.dark) footer {
  border-color: var(--line);
}
.work-card footer span {
  font-size: 0.77rem;
  color: #8b8f94;
}
.work-card footer strong {
  display: block;
  color: inherit;
  margin-top: 3px;
}
.work-card footer em {
  font-style: normal;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--orange);
}
.recent-title {
  margin-top: 29px;
}
.recent {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  margin-top: 14px;
  overflow: hidden;
}
.recent button {
  width: 100%;
  display: grid;
  grid-template-columns: 42px 1fr auto 18px;
  gap: 12px;
  align-items: center;
  padding: 15px 18px;
  background: #fff;
  border: 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.recent button:last-child {
  border: 0;
}
.recent button > b {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #fff2de;
  display: grid;
  place-items: center;
  color: #c46e00;
}
.recent strong,
.recent small {
  display: block;
}
.recent small {
  color: var(--muted);
  font-size: 0.76rem;
  margin-top: 3px;
}
.recent em {
  color: var(--orange);
  font-style: normal;
}
.recent i {
  font-size: 1.4rem;
  color: #9da0a4;
}
.project-header {
  justify-content: flex-start;
  gap: 14px;
}
.project-header p {
  color: var(--muted);
  font-size: 0.86rem;
  margin-top: 5px;
}
.project-header .more {
  margin-left: auto;
}
.project-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 11px;
  margin-bottom: 25px;
}
.project-stats article,
.project-stats .stat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 16px;
  text-align: left;
  color: var(--ink);
  font: inherit;
}
.project-stats .budget-card {
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.project-stats .budget-card:hover {
  border-color: var(--orange);
  box-shadow: 0 6px 18px #f39a1820;
}
.project-stats small {
  color: var(--muted);
}
.project-stats strong {
  display: block;
  margin-top: 9px;
  font-size: 1.35rem;
}
.project-stats strong.negative {
  color: #c93636;
}
.table-tools {
  align-items: flex-end;
  gap: 18px;
  margin-bottom: 14px;
}
.tabs {
  display: flex;
  gap: 4px;
}
.tabs button {
  font: inherit;
  border: 0;
  background: transparent;
  padding: 11px 13px;
  color: var(--muted);
  font-weight: 750;
  cursor: pointer;
  border-bottom: 3px solid transparent;
}
.tabs button.active {
  color: var(--ink);
  border-color: var(--orange);
}
.tool-actions {
  gap: 8px;
}
.search {
  display: flex;
  align-items: center;
  gap: 7px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 0 12px;
  height: 45px;
}
.search input {
  border: 0;
  outline: 0;
  font: inherit;
  width: 240px;
}
.filter {
  height: 45px;
  border-radius: 11px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 0 14px;
}
.table-wrap {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 17px;
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  min-width: 1040px;
}
th,
td {
  padding: 14px 15px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  font-size: 0.84rem;
}
th {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: #777b80;
  background: #fafafa;
  text-transform: uppercase;
  position: sticky;
  top: 0;
}
td {
  color: #61656a;
}
.amount {
  font-weight: 850;
  color: var(--ink);
}
.quantity-line,
.unit-price {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 6px;
}
.quantity-line {
  font-weight: 850;
  color: var(--ink);
}
.calculated-total {
  background: #f6f7f8;
  font-weight: 850 !important;
  color: var(--ink);
}
.pill {
  padding: 5px 8px;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 800;
}
.pill.legal {
  background: #fff0da;
  color: #af6200;
}
.pill.service {
  background: #e9effd;
  color: #315bad;
}
.pill.material {
  background: #e6f5ed;
  color: #16704f;
}
.pill.labor {
  background: #f2eaf9;
  color: #77409a;
}
.file {
  border: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 750;
  cursor: pointer;
}
.edit-expense {
  display: block;
  margin-top: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #c66f00;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}
.inventory-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 22px;
}
.inventory-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}
.inventory-heading > div:last-child {
  text-align: right;
}
.inventory-heading small,
.inventory-heading strong {
  display: block;
}
.inventory-heading > div:last-child small {
  color: var(--muted);
  margin-bottom: 5px;
}
.inventory-heading > div:last-child strong {
  font-size: 1.35rem;
}
.inventory-grid {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.inventory-columns,
.inventory-grid article {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) minmax(110px, 1fr) 80px 120px 135px;
  align-items: center;
  gap: 14px;
}
.inventory-columns {
  padding: 10px 14px;
  background: #f7f7f8;
  color: var(--muted);
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.inventory-columns + .inventory-grid {
  border-radius: 0 0 12px 12px;
}
.inventory-grid article {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 0.82rem;
}
.inventory-grid article:last-child {
  border-bottom: 0;
}
.inventory-grid article > strong,
.inventory-grid article > b {
  color: var(--ink);
}
.inventory-grid article > span,
.inventory-grid article > time {
  color: var(--muted);
}
.empty-inventory {
  grid-column: 1/-1;
  padding: 34px;
  text-align: center;
  color: var(--muted);
}
.expense-extra-fields[hidden] { display: none; }
.expense-unit-field[hidden] { display: none; }
.expense-quantity-fields.single-field { grid-template-columns: 1fr; }
.masters-panel {
  display: grid;
  gap: 18px;
}
.procedures-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 22px;
}
.procedures-heading,
.procedures-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.procedures-actions > span {
  text-align: right;
}
.procedures-actions small,
.procedures-actions strong {
  display: block;
}
.procedures-actions small {
  color: var(--muted);
  margin-bottom: 4px;
}
.procedures-actions strong {
  font-size: 1.3rem;
}
.procedures-list {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.procedures-list article {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 125px 110px 145px;
  gap: 14px;
  align-items: center;
  padding: 15px 17px;
  border-bottom: 1px solid var(--line);
}
.procedures-list article:last-child {
  border-bottom: 0;
}
.procedures-list article > div:first-child strong,
.procedures-list article > div:first-child small {
  display: block;
}
.procedures-list article > div:first-child strong {
  margin-top: 8px;
}
.procedures-list article > div:first-child small,
.procedures-list time,
.procedure-links span {
  color: var(--muted);
  font-size: 0.76rem;
}
.procedures-list article > div:first-child small {
  margin-top: 4px;
}
.procedure-links {
  display: grid;
  gap: 6px;
}
.procedure-links a,
.procedure-links button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  font: inherit;
  font-size: 0.76rem;
  font-weight: 800;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.masters-panel[hidden] {
  display: none;
}
.master-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 11px;
}
.master-summary article,
.master-payments {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 15px;
}
.master-summary article {
  padding: 17px;
}
.master-summary article[hidden] {
  display: none;
}
.master-summary.technical-summary {
  grid-template-columns: minmax(220px, 1fr);
}
.master-summary .master-paid-card.technical-total {
  background: #fff3dd;
  border-color: #ffd08a;
  color: #8b5000;
}
.master-summary .master-paid-card.technical-total small {
  color: #8b5000;
}
.master-summary small,
.master-summary strong {
  display: block;
}
.master-summary small {
  color: var(--muted);
}
.master-summary strong {
  margin-top: 9px;
  font-size: 1.35rem;
}
.master-summary .master-paid-card {
  background: #c93636;
  border-color: #c93636;
  color: #fff;
}
.master-summary .master-balance-card {
  background: #16875f;
  border-color: #16875f;
  color: #fff;
}
.master-summary .master-paid-card small,
.master-summary .master-balance-card small {
  color: #fff;
  opacity: 0.88;
}
.master-summary .master-balance-card .negative {
  color: #fff !important;
}
.master-summary button {
  margin-top: 11px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #c66f00;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}
.master-payments-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.master-payments {
  overflow: hidden;
}
.master-payments article {
  display: grid;
  grid-template-columns: 90px minmax(180px, 1fr) 125px 110px 155px;
  align-items: center;
  gap: 13px;
  padding: 15px 17px;
  border-bottom: 1px solid var(--line);
}
.master-payments article:last-child {
  border-bottom: 0;
}
.master-payments article div strong,
.master-payments article div small {
  display: block;
}
.master-payments article div small,
.master-payments time,
.no-file {
  color: var(--muted);
  font-size: 0.76rem;
}
.master-payments article div small {
  margin-top: 4px;
}
.master-payments article > b {
  color: var(--ink);
}
.master-payments a {
  color: var(--blue);
  font-size: 0.76rem;
  font-weight: 800;
  text-decoration: none;
}
.master-payment-actions {
  display: grid;
  gap: 7px;
}
.master-payment-actions button {
  width: fit-content;
  padding: 7px 10px;
  border: 0;
  border-radius: 8px;
  background: #16875f;
  color: #fff;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 850;
  cursor: pointer;
}
.payment-type {
  width: fit-content;
  padding: 5px 8px;
  border-radius: 8px;
  background: #fff0da;
  color: #a95e00;
  font-size: 0.72rem;
  font-weight: 850;
}
.negative {
  color: #c93636 !important;
}
.tool-actions.inventory-active .view-switch,
.tool-actions.inventory-active .search,
.tool-actions.inventory-active .filter,
.tool-actions.inventory-active .delete-selected {
  display: none !important;
}
.tool-actions.section-no-add .add-expense {
  display: none !important;
}
tfoot td {
  font-weight: 850;
  background: #fff9ef;
  color: var(--ink);
}
.empty {
  display: none;
  text-align: center;
  color: var(--muted);
  padding: 40px;
}
.mobile-brand,
.bottom-nav {
  display: none;
}
.mobile-program-name,
.mobile-tagline {
  display: none;
}
.modal {
  position: fixed;
  inset: 0;
  background: #15171a99;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 30;
}
.modal.open {
  display: flex;
}
.modal-card {
  width: min(560px, 100%);
  background: #fff;
  border-radius: 20px;
  padding: 23px;
  box-shadow: 0 25px 70px #0004;
}
.close {
  border: 0;
  background: #f0f1f2;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  font-size: 1.4rem;
  cursor: pointer;
}
.modal-card > label,
.form-grid label {
  display: grid;
  gap: 7px;
  font-size: 0.8rem;
  font-weight: 800;
  margin-top: 14px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.modal input,
.modal select,
.modal textarea {
  font: inherit;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  outline: 0;
}
.form-help {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.78rem;
}
.modal textarea {
  min-height: 70px;
  resize: vertical;
}
.upload {
  border: 1px dashed #d6a85d !important;
  border-radius: 11px;
  padding: 14px;
  text-align: center;
  color: #a66000;
  cursor: pointer;
}
.save {
  width: 100%;
  margin-top: 17px;
}
.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  background: #202225;
  color: #fff;
  border-left: 4px solid var(--orange);
  padding: 14px 18px;
  border-radius: 11px;
  z-index: 50;
  transform: translateY(90px);
  opacity: 0;
  transition: 0.25s;
}
.toast.show {
  transform: none;
  opacity: 1;
}
@media (max-width: 1100px) {
  .table-tools {
    align-items: stretch;
    flex-direction: column;
  }
  .tool-actions {
    width: 100%;
  }
  .search {
    flex: 1;
  }
  .search input {
    width: 100%;
  }
}
@media (max-width: 760px) {
  .sidebar {
    display: none;
  }
  main {
    margin: 0;
    padding: 20px 14px 34px;
  }
  .mobile-brand {
    display: block;
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    overflow: hidden;
    border: 1px solid #dedfe1;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 5px 14px #20232614;
  }
  .mobile-brand img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
  }
  .home-title {
    min-width: 0;
    flex: 1;
  }
  .desktop-home-kicker {
    display: none;
  }
  .mobile-program-name {
    display: block;
    color: var(--orange);
    font-size: .7rem;
    font-weight: 900;
    letter-spacing: .12em;
  }
  .mobile-tagline {
    display: block;
    color: var(--muted);
    font-size: .68rem;
    line-height: 1.2;
    margin-top: 2px;
  }
  .topbar {
    gap: 10px;
    align-items: center;
  }
  .topbar h1 {
    font-size: 1.35rem;
    line-height: 1.08;
  }
  .actions .icon-btn {
    display: none;
  }
  .primary span {
    display: none;
  }
  .totals {
    grid-template-columns: 1fr 1fr;
  }
  .totals article {
    padding: 15px;
  }
  .totals article:first-child {
    grid-column: 1/-1;
  }
  .totals strong {
    font-size: 1.38rem;
  }
  .favorites {
    grid-template-columns: 1fr;
  }
  .recent-title {
    margin-top: 25px;
  }
  .project-header h1 {
    font-size: 1.8rem;
  }
  .project-header p {
    max-width: 210px;
  }
  .project-stats {
    grid-template-columns: 1fr 1fr;
  }
  .project-stats article {
    padding: 13px;
  }
  .project-stats strong {
    font-size: 1.18rem;
  }
  .tabs {
    overflow: auto;
    width: 100%;
  }
  .tabs button {
    white-space: nowrap;
  }
  .tool-actions {
    display: grid;
    grid-template-columns: 1fr auto auto;
  }
  .filter span {
    display: none;
  }
  .search input {
    min-width: 0;
  }
  .table-wrap {
    margin: 0 -14px;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }
  table {
    min-width: 0;
    display: block;
  }
  thead {
    display: none;
  }
  tbody {
    display: grid;
  }
  tbody tr {
    display: grid;
    grid-template-columns: 42px 1fr auto;
    gap: 6px 10px;
    padding: 15px;
    border-bottom: 1px solid var(--line);
  }
  tbody td {
    display: block;
    border: 0;
    padding: 0;
    white-space: normal;
    font-size: 0.8rem;
  }
  tbody td:nth-child(1) {
    grid-row: 1/4;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: #fff2de;
    color: #a85e00;
    display: grid;
    place-items: center;
    font-weight: 800;
  }
  tbody td:nth-child(2) {
    grid-column: 2;
    font-size: 0.92rem;
  }
  tbody td:nth-child(3) {
    grid-column: 2;
    grid-row: 2;
  }
  tbody td:nth-child(4) {
    grid-column: 2;
    grid-row: 3;
    color: #85898e;
  }
  tbody td:nth-child(5) {
    grid-column: 3;
    grid-row: 2;
    color: #85898e;
  }
  tbody td:nth-child(6) {
    grid-column: 3;
    grid-row: 1;
    font-size: 0.92rem;
  }
  tbody td:nth-child(7) {
    grid-column: 2/4;
    grid-row: 4;
    color: #85898e;
  }
  tbody td:nth-child(8) {
    grid-column: 3;
    grid-row: 3;
  }
  tfoot {
    display: none;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .modal-card {
    max-height: 92vh;
    overflow: auto;
  }
  .inventory-panel {
    margin: 0 -14px;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    padding: 17px 14px;
  }
  .inventory-grid {
    grid-template-columns: 1fr;
  }
  .inventory-columns {
    display: none;
  }
  .inventory-columns + .inventory-grid {
    border-radius: 12px;
  }
  .inventory-grid article {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 12px;
    padding: 11px 13px;
  }
  .inventory-grid article > strong {
    grid-column: 1;
    font-size: 0.9rem;
  }
  .inventory-grid article > span:first-of-type {
    grid-column: 2;
    font-weight: 800;
    color: var(--ink);
  }
  .inventory-grid article > span:nth-of-type(2),
  .inventory-grid article > time {
    font-size: 0.72rem;
  }
  .inventory-grid article > span:nth-of-type(2)::before {
    content: "Compras: ";
  }
  .master-summary {
    grid-template-columns: 1fr;
  }
  .procedures-panel {
    margin: 0 -14px;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    padding: 17px 14px;
  }
  .procedures-heading,
  .procedures-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .procedures-actions > span {
    text-align: left;
  }
  .procedures-list article {
    grid-template-columns: 1fr auto;
  }
  .procedures-list article > div:first-child,
  .procedure-links {
    grid-column: 1/-1;
  }
  .master-payments-head {
    align-items: stretch;
    flex-direction: column;
  }
  .master-payments article {
    grid-template-columns: 1fr auto;
  }
  .master-payments article > div,
  .master-payments article a,
  .master-payments article .no-file {
    grid-column: 1/-1;
  }
  .master-payment-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .toast {
    left: 14px;
    right: 14px;
    bottom: 90px;
    text-align: center;
  }
}
@media (max-width: 420px) {
  .totals {
    grid-template-columns: 1fr;
  }
  .totals article:first-child {
    grid-column: auto;
  }
  .search input {
    width: 150px;
  }
  .filter {
    display: none;
  }
}
