@font-face {
  font-family: "Noto Sans";
  src: url("/font/NotoSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: "Noto Sans";
  src: url("/font/NotoSans-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; max-width: 100%; overflow-x: hidden; }
body {
  background: #ebe4d8;
  color: #1c1915;
  font: 16px/1.45 "Noto Sans", "Segoe UI", sans-serif;
}
a { color: #1a3352; }
h1, h2, p { margin-top: 0; }
h1 { font-size: 28px; letter-spacing: -0.03em; margin-bottom: 4px; }
h2 { font-size: 20px; margin-bottom: 4px; }
.sub { color: #6a6156; margin-bottom: 14px; }
.t { color: #b42318; }
main { padding: 22px 22px 56px; max-width: 100%; min-width: 0; }
body.doc main { padding: 12px; }

.top {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 58px;
  padding: 8px 18px;
  background: #1a3352;
  color: #fff;
  border-bottom: 4px solid #b42318;
}
.brand, .doc-title { color: #fff; text-decoration: none; font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }
.back-open {
  color: #fff;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  line-height: 1.15;
  min-width: 0;
  max-width: 340px;
  padding: 2px 0;
}
.back-open strong {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.back-open small {
  font-size: 11px;
  font-weight: 600;
  color: #c5d4e8;
  letter-spacing: 0;
}
body.doc .top { flex-wrap: wrap; row-gap: 8px; }
.top nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.top nav a {
  color: #e7eef8;
  text-decoration: none;
  padding: 6px 8px;
  font-weight: 700;
}
.top nav a.on { box-shadow: inset 0 -2px 0 #ff6b61; color: #fff; }
.who { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.who .link, .link {
  background: none;
  border: 0;
  color: #d5e2f4;
  font: inherit;
  cursor: pointer;
  padding: 6px;
}
.badge {
  display: inline-block;
  min-width: 1.2em;
  text-align: center;
  background: #e7eef8;
  color: #1a3352;
  border-radius: 99px;
  padding: 0 6px;
  font-size: 12px;
  margin-left: 4px;
}
.badge.red { background: #b42318; color: #fff; }

.btn, .btn-plus, .btn-notes, .btn-sarcini {
  font: inherit;
  cursor: pointer;
  border-radius: 3px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn {
  padding: 8px 12px;
  border: 1px solid #1a3352;
  background: #1a3352;
  color: #fff;
  font-weight: 700;
}
.btn.ghost { background: #fff; color: #1a3352; border-color: #cfc6b8; }
.btn.danger { background: #b42318; border-color: #8e1b12; color: #fff; }
.btn:hover { filter: brightness(1.08); }
.btn.ghost:hover { background: #f6f1e8; filter: none; }
.btn-plus, .btn-notes, .btn-sarcini {
  padding: 12px 16px;
  color: #fff;
  border: 0;
  font-weight: 800;
  white-space: nowrap;
}
.btn-plus { background: #1a3352; }
.btn-notes { background: #1d6b45; }
.btn-notes:hover { filter: brightness(1.08); }
.btn-sarcini { background: #6b4c2a; }
.btn-sarcini:hover { filter: brightness(1.08); }
.head-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: stretch;
  min-width: 0;
  margin-bottom: 14px;
}
.head-actions.three { grid-template-columns: 1fr 1fr 1fr; }
.head-actions form { display: flex; min-width: 0; }
.head-actions .btn-plus, .head-actions .btn-notes, .head-actions .btn-sarcini {
  width: 100%;
  min-width: 0;
  white-space: normal;
}
.top .btn.ghost { background: #fff; }

.doc-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 8px 18px;
  background: #13263e;
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 40;
}
.doc-bar .salvat { color: #c5d4e8; min-width: 0; }
.doc-bar-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
  min-width: 0;
}
.doc-bar-btns form { display: flex; min-width: 0; }
.doc-bar-btns .btn { min-width: 0; }

.timer-bar {
  margin: 0 12px 10px;
  padding: 10px 14px;
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  border-radius: 4px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 15px;
}
.timer-bar.paused { background: #fff8e1; border-color: #ffe082; }
.timer-bar.done { background: #eceff1; border-color: #cfd8dc; }
.timer-clock { font-variant-numeric: tabular-nums; font-size: 18px; letter-spacing: 0.04em; }
.timer-sep { opacity: 0.45; }
.timer-state { font-weight: 700; color: #8a6d00; }
.stack fieldset {
  border: 1px solid #d5cdc0;
  border-radius: 4px;
  padding: 12px;
  margin: 0 0 12px;
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
}
.stack legend { padding: 0 6px; font-weight: 700; }
.stack .check { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; }
.stack label { display: grid; gap: 4px; font-size: 14px; }
.stack input[type=time] { padding: 8px; font: inherit; }
.personal-stats { margin: 0 0 18px; }
.personal-stats .stats { margin-top: 8px; }

.flash {
  margin: 12px 22px 0;
  padding: 10px 12px;
  background: #e7f5ee;
  border: 1px solid #b7e0cb;
}
.flash.err { background: #fdeceb; border-color: #f3c2bd; }
body.doc .flash { margin: 12px; }

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 14px;
}
.page-head.tight { margin-top: 8px; }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 8px;
  margin: 0 0 16px;
}
.stats div { background: #fff; border: 1px solid #e0d8cc; padding: 10px 12px; }
.stats dt { margin: 0; font-size: 12px; color: #6a6156; font-weight: 700; }
.stats dd { margin: 4px 0 0; font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.week {
  background: #fff;
  border: 1px solid #e0d8cc;
  padding: 12px;
  margin-top: 18px;
}

.cal-wrap {
  max-width: 520px;
  width: 100%;
  margin: 0 auto 28px;
}
.cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 520px;
  margin: 0 auto;
}
.cal-nav a {
  text-decoration: none;
  font-size: 24px;
  line-height: 1;
  padding: 0 8px;
  color: #1a3352;
}
.cal-nav h2 { font-size: 18px; margin: 0; }
.cal {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  max-width: 520px;
  margin: 0 auto;
}
.cal .hd { text-align: center; font-size: 11px; font-weight: 700; color: #6a6156; }
.day {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 52px;
  padding: 4px;
  background: #fff;
  border: 1px solid #e0d8cc;
  text-decoration: none;
  color: inherit;
}
.day.empty { background: transparent; border-color: transparent; }
.day:hover { border-color: #1a3352; }
.day b { font-size: 14px; }
.day.sel { background: #1a3352; color: #fff; }
.day.today:not(.sel) { box-shadow: inset 0 0 0 2px #b42318; }
.day.sel.today { box-shadow: inset 0 0 0 2px #ffb4ae; }
.marks { display: flex; gap: 3px; min-height: 8px; }
.marks i, .legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.marks i.work, .legend .work { background: #1a3352; }
.marks i.done, .legend .done { background: #1d6b45; }
.day.sel .marks i.work { background: #fff; }
.day.sel .marks i.done { background: #8ddeaf; }
.legend { display: flex; gap: 16px; color: #6a6156; font-size: 13px; justify-content: center; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

.filters, .day-pick { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
.filters { margin-bottom: 14px; }
.filters label, .card label, .login-card label, .field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  font-weight: 700;
  color: #6a6156;
}
.filters select, .filters input, .card input, .card select, .day-pick input, .login-card input, .inline input {
  font: inherit;
  color: #1c1915;
  background: #fff;
  border: 1px solid #d2c8b8;
  padding: 8px 10px;
}
.day-pick {
  margin-top: 18px;
  padding: 14px;
  background: #fff;
  border: 1px solid #e0d8cc;
  align-items: center;
}
.day-pick label { font-size: 16px; color: #1c1915; }

.table-wrap { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid #e0d8cc; }
table.data th {
  text-align: left;
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #5e564c;
  padding: 10px 12px;
  border-bottom: 1px solid #e0d8cc;
  background: #f6f1e8;
}
table.data td { padding: 10px 12px; border-bottom: 1px solid #eee6da; vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tr.late { box-shadow: inset 3px 0 0 #b42318; }
td.num, td.money, .grand-val { font-variant-numeric: tabular-nums; }
td small { display: block; color: #6a6156; font-size: 12px; }
td.empty { color: #6a6156; padding: 18px 12px; }
.actions { white-space: nowrap; }
.actions form { display: inline; }
.actions .btn { margin-left: 6px; padding: 6px 10px; }
.page-head .actions, .pwa-box .actions {
  white-space: normal;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.page-head .actions .btn, .pwa-box .actions .btn { margin-left: 0; }
.actions.stack {
  white-space: normal;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}
.actions.stack form { display: inline-flex; }
.actions.stack .btn { margin-left: 0; }
.tag {
  display: inline-block;
  margin-left: 6px;
  background: #fdeceb;
  color: #8e1b12;
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
  padding: 1px 6px;
}
.block { margin-top: 22px; }
.two { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 22px; align-items: start; }
.two > * { min-width: 0; }
.card, .logo-preview { background: #fff; border: 1px solid #e0d8cc; padding: 16px; }
.card.narrow { max-width: 420px; margin: 12px 0; }
.card label, .login-card label { margin-bottom: 12px; }
.card button, .logo-preview { margin-top: 4px; }
.inline { display: flex; gap: 6px; align-items: center; }
.logo-preview img, .logo-slot img { max-width: 220px; max-height: 130px; object-fit: contain; }

.login-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.login-body main { width: min(420px, calc(100% - 32px)); padding: 12px 0 40px; }
.login-card {
  background: #fff;
  border: 1px solid #e0d8cc;
  border-top: 4px solid #b42318;
  padding: 28px 26px 26px;
}
.eyebrow { margin: 0; letter-spacing: 0.14em; text-transform: uppercase; font-size: 12px; color: #6a6156; font-weight: 700; }
.login-card h1 { font-size: 34px; }
.login-card .lead { color: #6a6156; }
.login-card input { width: 100%; margin-top: 6px; font-size: 16px; }
.login-card .btn { width: 100%; margin-top: 8px; }

.salvat { color: #d5e2f4; font-size: 13px; min-width: 8em; }
.timp-cell { white-space: nowrap; }
.timp-cell small { display: block; color: #b42318; font-weight: 700; font-size: 11px; }
.timp-cell small.pauza { color: #8a6d00; }
.live-clock {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.03em;
  color: #1b7a3d;
}
.live-clock.ok { color: #1b7a3d; }
.live-clock.alert { color: #b42318; }
.live-clock.paused { color: #8a6d00; }
.timer-clock.ok { color: #1b7a3d; }
.timer-clock.alert { color: #b42318; }
.timer-bar.alert { background: #fdeceb; border-color: #f3c2bd; }
tr.open-row { background: #f7fbf7; }
.pwa-box {
  background: #fff;
  border: 1px solid #d5cdc0;
  border-radius: 4px;
  padding: 12px 14px;
  margin: 0 0 16px;
}
.pwa-box .actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.pwa-box .actions .btn { width: 100%; }
.pwa-status { margin: 0; font-weight: 600; }
.pwa-status.ok { color: #1b7a3d; }
.pwa-status.warn { color: #8a6d00; }
.ua { font-size: 12px; color: #6a6156; max-width: 280px; }
.ok-dot { color: #1b7a3d; font-weight: 700; margin-left: 8px; }
.warn-dot { color: #8a6d00; font-weight: 600; margin-left: 8px; font-size: 13px; }
.dash-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin: 0 0 16px;
}
.mini-card {
  background: #fff;
  border: 1px solid #d5cdc0;
  border-radius: 4px;
  padding: 12px;
  display: grid;
  gap: 4px;
}
.mini-card b { font-size: 22px; letter-spacing: -0.03em; }
.mini-card span { color: #6a6156; font-size: 13px; }
.mini-card.action { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.note-panel {
  background: #fff;
  border: 1px solid #d5cdc0;
  border-radius: 4px;
  padding: 14px;
  margin-bottom: 16px;
}
.note-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}
.note-form label { display: grid; gap: 4px; font-size: 13px; }
.note-form input, .note-form select { padding: 8px; font: inherit; min-width: 160px; }
.adjust-box {
  margin: 0 12px 12px;
  padding: 10px 12px;
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}
.adjust-box label { display: grid; gap: 4px; font-size: 13px; }
.adjust-box input { padding: 6px 8px; font: inherit; }
.nota-scroll { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
.mobile-hint { display: none; }
.sheet.nota {
  background: #fff;
  color: #000;
  border: 1px solid #000;
  padding: 10px 12px 14px;
  min-width: 0;
  width: 100%;
  font-family: Arial, "Noto Sans", sans-serif;
}
.nota-titlu {
  text-align: center;
  font-size: 22px;
  letter-spacing: 0.04em;
  margin: 0 0 10px;
}
.nota-antet {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 28px;
  margin-bottom: 10px;
}
.nota-antet label {
  display: grid;
  grid-template-columns: 210px 1fr;
  align-items: end;
  gap: 8px;
  font-size: 14px;
}
.nota-antet input {
  border: 0;
  border-bottom: 1px solid #111;
  background: transparent;
  font: inherit;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 4px;
  width: 100%;
}
.nota-grid {
  width: 100%;
  min-width: 1100px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  background: #fff;
  border-top: 1px solid #000;
  border-left: 1px solid #000;
}
.nota-grid th, .nota-grid td {
  border: 0;
  border-right: 1px solid #000;
  border-bottom: 1px solid #000;
  padding: 0;
  text-align: center;
  background: #fff;
  color: #000;
}
.nota-grid th { background: #fff; font-size: 11px; font-weight: 700; padding: 3px 2px; }
.nota-grid thead tr:nth-child(2) th { background: #fff; font-size: 10px; }
.nota-grid td input {
  width: 100%;
  border: 0;
  background: #fff;
  color: #000;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 6px 3px;
  text-align: center;
}
.nota-grid td:first-child { width: 18%; }
.nota-grid td:nth-child(2) { width: 4%; }
.nota-sub { margin: 8px 0 0; font-size: 13px; }
.history-block { margin: 22px 0 8px; }
.history-block h2 { margin-bottom: 8px; }
.open-other {
  background: #fdeceb;
  border: 1px solid #f3c2bd;
  border-radius: 4px;
  padding: 12px 14px;
}
.day-pick-top { margin: 0 0 14px; }
.order-cards.always .order-card-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
}
.order-cards.always .order-card-actions .btn,
.order-cards.always .order-card-actions form { width: auto; min-width: 120px; }
.obs-list {
  margin: 6px 0 8px;
  padding-left: 18px;
  color: #4a453e;
  font-size: 14px;
}
.obs-form {
  margin-top: 8px;
  padding: 10px;
  background: #f7f3ec;
  border: 1px solid #e0d8cc;
}
.day-report { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.order-cards { display: none; }
.order-cards.always { display: grid; gap: 10px; }
.order-card {
  background: #fff;
  border: 1px solid #d5cdc0;
  border-radius: 4px;
  padding: 12px;
}
.order-card.late { box-shadow: inset 3px 0 0 #b42318; }
.order-card.open { background: #f7fbf7; }
.order-card-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}
.order-card-top strong, .order-open { font-size: 20px; letter-spacing: -0.03em; font-weight: 800; color: inherit; text-decoration: none; }
.order-open:hover { text-decoration: underline; }
.obs-preview { color: #6a6156; }
.fisa-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin: 0 0 18px;
  background: #fff;
  border: 1px solid #e0d8cc;
  padding: 12px 14px;
}
.fisa-meta dt { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: #6a6156; }
.fisa-meta dd { margin: 0; font-weight: 700; }
.obs-write {
  background: #fff;
  border: 1px solid #d5cdc0;
  padding: 14px;
  margin: 0 0 18px;
}
.obs-form-grid { display: grid; gap: 12px; }
.obs-form-grid label { display: grid; gap: 4px; font-size: 13px; font-weight: 700; color: #6a6156; }
.obs-form-grid .full { grid-column: 1 / -1; }
.obs-form-grid textarea {
  width: 100%;
  min-height: 180px;
  font: inherit;
  font-weight: 400;
  color: #1c1915;
  padding: 10px;
  border: 1px solid #d2c8b8;
  resize: vertical;
}
.obs-form-grid select, .obs-form-grid input {
  font: inherit;
  font-weight: 400;
  color: #1c1915;
  padding: 8px 10px;
  border: 1px solid #d2c8b8;
  background: #fff;
}
.obs-entry {
  background: #fff;
  border: 1px solid #e0d8cc;
  padding: 12px 14px;
  margin: 0 0 10px;
}
.obs-entry-head { margin: 0 0 6px; color: #6a6156; }
.obs-entry-text { margin: 0; white-space: pre-wrap; }
.order-card-time { flex: 1 1 100%; margin-left: 0; font-weight: 700; font-size: 15px; }
.order-card-meta { margin: 0 0 4px; }
.order-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}
.order-card-actions .btn,
.order-card-actions form { width: 100%; margin: 0; }
.order-card-actions form { display: flex; }
.order-card-actions .btn { margin-left: 0; }
.empty-card {
  background: #fff;
  border: 1px solid #e0d8cc;
  padding: 18px 12px;
  color: #6a6156;
  margin: 0;
}
.sheet {
  background: #fff;
  border: 1px solid #ddd4c6;
  padding: 22px;
  min-width: 0;
}
.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: baseline;
  border-bottom: 1px solid #e4dccf;
  padding-bottom: 10px;
  margin-bottom: 16px;
}
.doc-meta .push { margin-left: auto; color: #6a6156; }
.sheet-top { display: flex; justify-content: space-between; gap: 32px; align-items: flex-start; margin-bottom: 18px; }
.identity { width: min(680px, 100%); display: flex; flex-direction: column; gap: 12px; }
.field input, .labor .price input {
  font: inherit;
  font-size: 18px;
  border: 1px solid #d2c8b8;
  background: #fff;
  padding: 10px 12px;
  color: #1c1915;
}
.logo-slot { width: 220px; min-height: 120px; display: flex; justify-content: flex-end; }
.logo-missing {
  width: 200px;
  min-height: 110px;
  border: 1px dashed #c9bfb0;
  color: #8a8175;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 800;
}
.logo-missing span { font-weight: 500; font-size: 13px; }
table.parts { width: 100%; border-collapse: collapse; }
table.parts th {
  background: #1a3352;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  text-align: left;
  padding: 8px;
}
table.parts td { border: 1px solid #d9d0c3; padding: 0; vertical-align: middle; }
table.parts input, table.parts select {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 10px 8px;
  font: inherit;
}
table.parts td.nr {
  position: relative;
  text-align: center;
  width: 52px;
  background: #f7f3ec;
  color: #5c554b;
}
.del {
  position: absolute;
  top: 2px;
  right: 2px;
  border: 0;
  background: transparent;
  color: #8a8175;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}
.del:hover { color: #b42318; }
.add-row { margin-top: 10px; }
.reper-sum { color: #6a6156; margin: 12px 0; }
.sheet-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.labor { display: flex; align-items: center; gap: 16px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 800; color: #1c1915; font-size: 16px; }
.check input { width: 18px; height: 18px; }
.labor .price { color: #1c1915; font-size: 16px; }
.labor .price input { width: 140px; }
input.off { opacity: 0.45; }
.grand { text-align: right; }
.grand-label { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: #6a6156; font-weight: 700; }
.grand-val { font-size: 32px; font-weight: 800; line-height: 1.1; }
.grand-sub { margin-top: 4px; }
.under { margin: 14px 2px 0; }
.text-danger { background: none; border: 0; color: #8e1b12; font: inherit; cursor: pointer; padding: 0; }

@media (max-width: 900px) {
  .two { grid-template-columns: 1fr; }
  .page-head, .sheet-foot, .sheet-top { flex-direction: column; align-items: stretch; }
  .head-actions { width: 100%; }
  .head-actions.three { grid-template-columns: 1fr; }
  .pwa-box .actions { grid-template-columns: 1fr; }
  .logo-slot { justify-content: flex-start; }
  .doc-meta .push { margin-left: 0; }
}

@media (max-width: 720px) {
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  body { font-size: 17px; }
  main { padding: 12px 10px max(48px, env(safe-area-inset-bottom)); }
  h1 { font-size: 22px; }
  h2 { font-size: 18px; }
  .top {
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px max(10px, env(safe-area-inset-right)) 8px max(10px, env(safe-area-inset-left));
    min-height: 0;
  }
  .top nav {
    flex: 1 1 100%;
    gap: 2px;
  }
  .top nav a {
    padding: 8px 10px;
    font-size: 15px;
  }
  .who { margin-left: 0; flex-wrap: wrap; gap: 8px; }
  .who .link, .link { padding: 8px 10px; font-size: 16px; }
  .btn, .btn-plus, .btn-notes, .btn-sarcini {
    min-height: 44px;
    font-size: 16px;
    padding: 10px 14px;
  }
  .back-open { max-width: none; flex: 1 1 100%; }
  .back-open strong { font-size: 15px; }
  .back-open small { font-size: 12px; }
  .doc-title { font-size: 16px; }
  .salvat { min-width: 0; }
  body.doc .top {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
  }
  body.doc .back-open { grid-column: 1 / -1; }
  .doc-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 8px 10px;
  }
  .doc-bar .salvat { grid-column: 1 / -1; }
  .doc-bar-btns {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-left: 0;
  }
  .doc-bar-btns .btn { width: 100%; }
  .timer-bar { margin: 0 0 10px; font-size: 16px; }
  .timer-clock { font-size: 20px; }
  .dash-cards { grid-template-columns: 1fr 1fr; }
  .order-table { display: none; }
  .order-cards { display: grid; gap: 10px; margin-bottom: 16px; }
  .mobile-hint {
    display: block;
    margin: 0 0 8px;
    color: #6a6156;
    font-size: 14px;
  }
  .nota-antet { grid-template-columns: 1fr; gap: 10px; }
  .nota-antet label { grid-template-columns: 1fr; font-size: 15px; }
  .nota-antet input { font-size: 16px; min-height: 40px; }
  .sheet.nota { min-width: 0; padding: 8px; }
  .nota-grid { min-width: 900px; }
  .nota-grid th { font-size: 12px; padding: 6px 2px; }
  .nota-grid thead tr:nth-child(2) th { font-size: 11px; }
  .nota-grid td input { font-size: 16px; min-height: 40px; }
  table.data th, table.data td { font-size: 15px; padding: 12px 8px; }
  .filters, .day-pick, .note-form { flex-direction: column; align-items: stretch; }
  .filters select, .filters input, .card input, .day-pick input, .day-pick .btn, .note-form input, .note-form select, .note-form .btn {
    font-size: 16px;
    min-height: 44px;
    width: 100%;
    min-width: 0;
  }
  .note-form { display: grid; grid-template-columns: 1fr; }
  .inline { flex-wrap: wrap; }
  .inline input, .inline .btn { flex: 1 1 100%; min-width: 0; }
  .stack fieldset { grid-template-columns: 1fr; }
  .adjust-box { margin: 0 0 12px; }
  .login-card input { font-size: 16px; min-height: 44px; }
}

@media print {
  .top, .doc-bar, .flash, .noprint, .under, .add-row, .del { display: none !important; }
  body, body.doc main { background: #fff; padding: 0; }
  .sheet { border: 0; min-width: 0; }
}
