:root {
  color-scheme: light;
  --ink: #17201b;
  --muted: #66736d;
  --line: #d9e1dc;
  --paper: #ffffff;
  --wash: #f4f7f5;
  --accent: #0f766e;
  --accent-dark: #0b5f59;
  --warn: #b42318;
  --gold: #c58b1c;
  --shadow: 0 14px 38px rgba(20, 31, 26, 0.10);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--wash);
  color: var(--ink);
}

button,
input,
select,
textarea,
a.button {
  font: inherit;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 24px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.app-logo {
  width: clamp(150px, 18vw, 260px);
  max-height: 58px;
  object-fit: contain;
  object-position: left center;
  display: block;
}

.eyebrow {
  margin: 0 0 3px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.05;
}

h2 {
  font-size: 18px;
}

.header-actions,
.panel-title,
.toolbar,
.customer-form {
  display: flex;
  align-items: center;
  gap: 12px;
}

.button,
.icon-button {
  border: 1px solid transparent;
  cursor: pointer;
  min-height: 40px;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 8px;
  font-weight: 750;
  white-space: nowrap;
  text-decoration: none;
}

.button:active,
.icon-button:active {
  transform: translateY(1px);
}

.button.primary {
  background: var(--accent);
  color: #fff;
}

.button.primary:hover {
  background: var(--accent-dark);
}

.button.secondary {
  background: #eef4f1;
  color: var(--ink);
  border-color: #d1ddd7;
}

.button.secondary:hover {
  background: #e2ece8;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
  font-size: 14px;
  font-weight: 750;
  white-space: nowrap;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #eef4f1;
}

.login-shell {
  width: min(100%, 420px);
}

.login-panel {
  padding: 28px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.login-logo {
  display: block;
  margin: 0 auto 16px auto;
  max-width: 220px;
  height: auto;
}

.login-panel h1 {
  margin-bottom: 18px;
}

.login-form {
  display: grid;
  gap: 14px;
}

.login-error {
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid #ffd5cc;
  border-radius: 8px;
  color: var(--warn);
  background: #fff3f0;
  font-weight: 700;
}

.notice {
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  font-weight: 700;
}

.notice.success {
  border: 1px solid #badbcc;
  color: #0f5132;
  background: #d1e7dd;
}

.notice.error {
  border: 1px solid #ffd5cc;
  color: var(--warn);
  background: #fff3f0;
}

.two-factor-box {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
}

.two-factor-box p {
  color: var(--muted);
  line-height: 1.45;
}

.two-factor-box code {
  display: block;
  padding: 10px;
  border-radius: 8px;
  background: #101817;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  text-align: center;
}

.fine-print {
  font-size: 13px;
}

.file-button input {
  display: none;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 40px;
  border-radius: 8px;
  background: #eef4f1;
  border-color: #d1ddd7;
  color: var(--ink);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}

.icon-button:hover {
  background: #dfeae5;
}

.icon-button.danger {
  color: var(--warn);
  background: #fff3f0;
  border-color: #ffd5cc;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr) minmax(180px, 230px);
  gap: 18px;
  padding: 18px;
}

.admin-shell {
  display: grid;
  gap: 18px;
  padding: 18px;
  max-width: 1180px;
  margin: 0 auto;
}

.admin-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 16px;
}

.admin-panel h2 {
  margin-bottom: 14px;
}

.admin-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

.user-table {
  display: grid;
  gap: 10px;
}

.user-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) auto auto auto minmax(230px, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
}

.user-row strong,
.user-row span {
  display: block;
}

.user-row span {
  color: var(--muted);
  font-size: 13px;
}

.user-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.status-badge.ok {
  color: #0f5132;
  background: #d1e7dd;
}

.status-badge.off {
  color: #664d03;
  background: #fff3cd;
}

.inline-reset {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.modal-dialog {
  width: min(820px, calc(100vw - 48px));
  max-width: none;
  min-height: min(680px, calc(100vh - 72px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: transparent;
}

.modal-dialog::backdrop {
  background: rgba(14, 24, 21, 0.46);
}

.modal-panel {
  display: grid;
  gap: 20px;
  width: 100%;
  min-height: min(680px, calc(100vh - 72px));
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.modal-header,
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-actions {
  justify-content: end;
}

.quick-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-content: start;
}

.wide-field {
  grid-column: 1 / -1;
}

.sidebar,
.workspace,
.summary {
  min-width: 0;
}

.sidebar,
.workspace,
.summary-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.sidebar,
.workspace {
  padding: 16px;
}

.panel-title {
  justify-content: space-between;
  margin-bottom: 14px;
}

.customer-list {
  display: grid;
  gap: 8px;
}

.customer-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  overflow-wrap: anywhere;
}

.customer-item-name {
  min-width: 0;
  overflow-wrap: anywhere;
}

.customer-alert-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  flex: 0 0 12px;
  background: #f0c419;
  box-shadow: 0 0 0 4px rgba(240, 196, 25, 0.18);
}

.customer-item:hover,
.customer-item.active {
  border-color: var(--accent);
  background: #eef9f7;
}

.toolbar,
.customer-form {
  align-items: end;
  flex-wrap: wrap;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}

.customer-form {
  align-items: stretch;
}

.form-page {
  max-width: 620px;
  margin: 20px auto;
  padding: 18px;
  background: var(--paper);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.stack-form {
  display: grid;
  gap: 12px;
}

.page-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

/* FORM layout */
#createForm {
  display: flex;
  flex-direction: column;
  gap: 12px;
}



#createForm input,
#createForm select,
#createForm textarea {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 16px;
  width: 100%;
  box-sizing: border-box;
}

/* Gumbi */
.button {
  display: inline-block;
  text-align: center;
  padding: 12px;
  border-radius: 10px;
  text-decoration: none;
}

.button.primary {
  background: #2c7a7b;
  color: white;
  border: none;
}

.button.secondary {
  background: #e2e8f0;
  color: #333;
}

/* 📱 MOBILE */
@media (max-width: 600px) {
  .form-page {
    margin: 10px;
    padding: 16px;
  }

  h1 {
    font-size: 20px;
    text-align: center;
  }

  .button {
    width: 100%;
  }

  .page-actions {
    display: grid;
  }
}

label {
  display: grid;
  gap: 6px;
  flex: 1 1 120px;
  min-width: 0;
}

label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid #ccd7d1;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 9px 10px;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(15, 118, 110, 0.18);
  border-color: var(--accent);
}

textarea {
  min-height: 180px;
  resize: vertical;
  line-height: 1.4;
}

.entry-panel {
  min-width: 0;
}

.entry-list {
  display: grid;
  gap: 8px;
}

.empty-state {
  margin: 0;
  padding: 18px;
  border: 1px dashed #bcc9c3;
  border-radius: 8px;
  color: var(--muted);
  background: #fbfdfc;
}

.entry-grid {
  display: grid;
  grid-template-columns: 72px minmax(260px, 1.7fr) minmax(128px, 0.8fr) minmax(82px, 0.5fr) minmax(145px, 0.9fr) minmax(132px, 0.8fr) 118px 44px;
  gap: 8px;
  align-items: center;
}

.invoice-check {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 42px;
}

.invoice-check input {
  width: 20px;
  min-height: 20px;
  margin: 0;
  flex: 0 0 20px;
  accent-color: var(--accent);
}

.invoice-check span {
  display: none;
}

.entry-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 5px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
  flex-direction: column;
  gap: 2px;
}

.entry-status small {
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  opacity: 0.9;
}

.entry-status.is-billed {
  color: #0f5132;
  background: #d1e7dd;
}

.entry-status.is-open {
  color: #664d03;
  background: #fff3cd;
}

.header-row {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  padding: 0 8px 8px;
}

.entry-row {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.summary {
  display: grid;
  gap: 12px;
  align-self: start;
}

.summary-card {
  padding: 16px;
}

.summary-card p {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.summary-card strong {
  font-size: 28px;
  line-height: 1;
}

.orders-page {
  display: grid;
  gap: 18px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px;
}

.orders-intro p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.5;
}

.purchase-order-list {
  display: grid;
  gap: 14px;
}

.purchase-order-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 16px;
}

.purchase-order-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.purchase-order-grid .full {
  grid-column: 1 / -1;
}

.workboard-page {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 360px);
  gap: 18px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 18px;
}

.workboard-main,
.workboard-sidebar {
  min-width: 0;
}

.workboard-head,
.sidebar-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.workboard-head p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.45;
}

.workboard-head-actions {
  display: grid;
  gap: 12px;
  justify-items: end;
}

.workboard-search {
  display: grid;
  gap: 6px;
  min-width: min(100%, 320px);
}

.workboard-search span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.workboard-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.stat-pill,
.sidebar-count,
.date-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.stat-pill {
  min-width: 92px;
  padding: 10px 14px;
  background: #eef4f1;
  border: 1px solid #d1ddd7;
  flex-direction: column;
}

.stat-pill strong {
  font-size: 22px;
  line-height: 1;
}

.stat-pill span {
  color: var(--muted);
}

.sidebar-count,
.date-chip {
  padding: 7px 11px;
  background: #f4f7f5;
  color: var(--muted);
}

.workboard-card-list {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.workboard-accordion {
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    radial-gradient(circle at top right, rgba(15, 118, 110, 0.07), transparent 30%),
    linear-gradient(180deg, #ffffff 0%, #f8fbf9 100%);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.workboard-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
}

.workboard-summary::-webkit-details-marker {
  display: none;
}

.workboard-summary-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.workboard-summary-main strong {
  font-size: 17px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.workboard-summary-main span {
  color: var(--muted);
  font-size: 14px;
}

.workboard-summary-side {
  display: flex;
  align-items: center;
  gap: 10px;
}

.workboard-accordion-body {
  display: grid;
  gap: 16px;
  padding: 0 18px 18px;
  border-top: 1px solid #e8efeb;
}

.history-accordion .workboard-summary {
  padding: 14px 16px;
}

.workboard-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    radial-gradient(circle at top right, rgba(15, 118, 110, 0.07), transparent 30%),
    linear-gradient(180deg, #ffffff 0%, #f8fbf9 100%);
}

.workboard-card-top,
.workboard-card-badges,
.workboard-meta-row {
  display: flex;
  gap: 12px;
}

.workboard-card-top,
.workboard-meta-row {
  justify-content: space-between;
  align-items: start;
}

.workboard-card-badges,
.workboard-meta-row {
  flex-wrap: wrap;
}

.workboard-meta-row-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.workboard-card-actions {
  display: flex;
  justify-content: end;
}

.workboard-card-title {
  min-width: 0;
}

.workboard-card-title h3 {
  font-size: 22px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.workboard-kicker {
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.workboard-meta-chip {
  min-width: 140px;
  padding: 12px 14px;
  border: 1px solid #dfe8e3;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
}

.workboard-meta-chip span,
.workboard-field-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.workboard-meta-chip strong {
  display: block;
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.workboard-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.workboard-form-grid-service {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
}

.workboard-field {
  display: grid;
  gap: 0;
  min-width: 0;
}

.workboard-field.span-2 {
  grid-column: span 2;
}

.workboard-field input,
.workboard-field select,
.workboard-field textarea {
  min-height: 44px;
  border-color: #d7e1dc;
  background: rgba(255, 255, 255, 0.95);
}

.workboard-field textarea {
  min-height: 110px;
}

.workboard-form-grid-service .workboard-field:nth-child(1) {
  grid-column: span 2;
}

.workboard-form-grid-service .workboard-field:nth-child(5) {
  grid-column: span 1;
}

.workboard-form-grid-service .workboard-field:nth-child(6) {
  grid-column: span 3;
}

.print-table tbody td {
  font-size: 12px;
  line-height: 1.35;
}

.print-total-row td {
  white-space: nowrap;
}

.print-total-row td:last-child {
  text-align: right;
}

.status-chip,
.status-select {
  border-radius: 999px;
  font-weight: 800;
}

.status-select {
  min-width: 170px;
  border-width: 0;
  text-align: center;
  padding-inline: 14px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 12px;
  white-space: nowrap;
}

.status-odprto {
  background: #cfe8ff !important;
  color: #0b5cab !important;
}

.status-naroceno-pri-dobavitelju {
  background: #ffe5b8 !important;
  color: #9a5b00 !important;
}

.status-caka-na-dobavo,
.status-caka-na-podporo {
  background: #dcd6ff !important;
  color: #4d2fa3 !important;
}

.status-zakljuceno {
  background: #c8f2ea !important;
  color: #0b6b61 !important;
}

.status-v-delu {
  background: #d6f0c2 !important;
  color: #2f6f12 !important;
}

.status-caka-na-informacije-stranke {
  background: #ffe2ef !important;
  color: #a42860 !important;
}

.history-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.history-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f7faf8 100%);
}

.history-delete {
  margin-top: 12px;
}

.history-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.history-card p,
.history-card small {
  color: var(--muted);
}

.empty-state.compact {
  padding: 12px 14px;
}

.breakdown {
  display: grid;
  gap: 6px;
  color: var(--ink);
}

.breakdown-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 6px;
}

.print-sheet {
  display: none;
}

.print-doc {
  background: #fff;
  color: #111;
  font-family: "Segoe UI", Arial, sans-serif;
  padding: 16mm 18mm 22mm;
}

.print-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18mm;
  align-items: center;
  border-bottom: 2px solid #111;
  padding-bottom: 8mm;
  margin-bottom: 9mm;
}

.print-brand {
  display: flex;
  align-items: center;
  min-height: 24mm;
}

.print-logo {
  width: 64mm;
  max-height: 24mm;
  object-fit: contain;
  object-position: left top;
  display: block;
}

.print-section-title {
  margin: 0;
  color: #4b5a63;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.print-contact {
  min-width: 58mm;
  min-height: 24mm;
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-size: 12px;
  line-height: 1.55;
  text-align: right;
  white-space: nowrap;
}

.print-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.print-meta-card {
  padding: 10px 12px;
  border: 1px solid #c9d3cf;
  border-radius: 10px;
  background: #f8fbfa;
}

.print-meta-card span {
  display: block;
  margin-bottom: 5px;
  color: #5c6b64;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.print-meta-card strong {
  display: block;
  font-size: 13px;
  line-height: 1.4;
}

.print-section-title {
  margin-bottom: 10px;
}

.print-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 12px;
  border: 1px solid #c9d3cf;
  border-radius: 12px;
  overflow: hidden;
}

.print-table th,
.print-table td {
  border-bottom: 1px solid #d6dfdb;
  padding: 9px 10px;
  text-align: left;
  vertical-align: top;
}

.print-table th {
  background: #e8f1ee;
  color: #22312b;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.print-table tbody tr:nth-child(even) {
  background: #f9fbfa;
}

.print-table tbody tr:last-child td {
  border-bottom: 0;
}

.print-total-row td {
  background: #eef6f3;
  font-weight: 800;
}

.print-company-footer {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 2px solid #111;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  color: #405049;
  font-size: 11px;
  line-height: 1.55;
}

.print-company-column strong {
  display: block;
  margin-bottom: 6px;
  color: #22312b;
  font-size: 12px;
}

.form-subtitle {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dashboard-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 18px 32px;
  display: grid;
  gap: 22px;
}

.dashboard-hero {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.11), transparent 28%),
    linear-gradient(135deg, #ffffff 0%, #eef7f4 100%);
  box-shadow: var(--shadow);
}

.dashboard-hero h1 {
  margin-bottom: 10px;
}

.dashboard-hero p:last-child {
  color: var(--muted);
  line-height: 1.6;
  max-width: 760px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.dashboard-card {
  display: grid;
  gap: 8px;
  padding: 22px;
  border-radius: 18px;
  color: #fff;
  text-decoration: none;
  box-shadow: var(--shadow);
  min-height: 130px;
}

.dashboard-card span {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.9;
}

.dashboard-card strong {
  font-size: 22px;
  line-height: 1.2;
}

.dashboard-work {
  background: linear-gradient(135deg, #0f766e 0%, #169a87 100%);
}

.dashboard-orders {
  background: linear-gradient(135deg, #2563eb 0%, #4f8cff 100%);
}

.dashboard-service {
  background: linear-gradient(135deg, #9a6b16 0%, #d29b29 100%);
}

.dashboard-users {
  background: linear-gradient(135deg, #b42318 0%, #de5a4f 100%);
}

.dashboard-exit {
  background: linear-gradient(135deg, #43515a 0%, #6a7881 100%);
}

@media (max-width: 1050px) {
  .app-shell {
    grid-template-columns: minmax(210px, 260px) minmax(0, 1fr);
  }

  .summary {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .entry-grid {
    grid-template-columns: 64px minmax(220px, 1.4fr) minmax(120px, 0.8fr) minmax(80px, 0.5fr) minmax(130px, 0.9fr) minmax(125px, 0.8fr) 108px 44px;
  }

}

@media (max-width: 760px) {
  .app-header {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    padding: 12px;
    position: static;
  }

  .brand-lockup {
    align-items: center;
    justify-content: space-between;
  }

  .app-logo {
    width: min(54vw, 210px);
    max-height: 48px;
  }

  .app-header h1 {
    font-size: 22px;
    text-align: right;
  }

  .header-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 8px;
  }

  .header-actions .button,
  .header-actions .user-chip {
    width: 100%;
    min-height: 44px;
    padding-inline: 10px;
  }

  .user-chip {
    grid-column: 1 / -1;
    justify-content: center;
  }

  .app-shell,
  .summary,
  .admin-shell {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 12px;
  }

  .sidebar,
  .workspace {
    padding: 12px;
  }

  .summary {
    order: -1;
  }

  .summary-card {
    padding: 12px;
  }

  .summary-card strong {
    font-size: 23px;
  }

  .toolbar,
  .customer-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  label {
    flex-basis: auto;
  }

  input,
  select,
  textarea {
    min-height: 46px;
    font-size: 16px;
  }

  .entry-grid,
  .header-row {
    grid-template-columns: 1fr;
  }

  .header-row {
    display: none;
  }

  .entry-row {
    gap: 10px;
  }

  .invoice-check {
    display: flex;
    justify-content: flex-start;
    gap: 8px;
    min-height: 34px;
  }

  .invoice-check span {
    display: inline;
    color: var(--ink);
    font-size: 13px;
    font-weight: 750;
  }

  .entry-row .icon-button {
    width: 100%;
  }

  .login-page {
    align-items: start;
    padding: 14px;
  }

  .login-panel {
    padding: 18px;
  }

  .login-logo {
    width: min(100%, 260px);
    margin-inline: auto;
  }

  .admin-panel {
    padding: 12px;
  }

  .admin-form,
  .user-row,
  .inline-reset,
  .quick-form {
    grid-template-columns: 1fr;
  }

  .purchase-order-grid {
    grid-template-columns: 1fr;
  }

  .workboard-page {
    grid-template-columns: 1fr;
  }

  .workboard-head,
  .sidebar-head {
    display: grid;
  }

  .workboard-head-actions {
    justify-items: stretch;
  }

  .workboard-search {
    min-width: 0;
  }

  .workboard-card {
    padding: 14px;
  }

  .workboard-summary,
  .workboard-accordion-body {
    padding-inline: 14px;
  }

  .workboard-card-top,
  .workboard-meta-row,
  .workboard-card-badges {
    display: grid;
  }

  .workboard-form-grid {
    grid-template-columns: 1fr;
  }

  .workboard-meta-row-3 {
    grid-template-columns: 1fr;
  }

  .workboard-form-grid-service .workboard-field:nth-child(1),
  .workboard-form-grid-service .workboard-field:nth-child(5),
  .workboard-form-grid-service .workboard-field:nth-child(6) {
    grid-column: auto;
  }

  .workboard-field.span-2 {
    grid-column: auto;
  }

  .dashboard-page {
    padding: 14px;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .modal-dialog {
    width: calc(100vw - 20px);
    min-height: auto;
  }

  .modal-panel {
    padding: 16px;
    min-height: auto;
  }

  .modal-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .modal-actions .button {
    width: 100%;
  }

  .wide-field {
    grid-column: auto;
  }

  .user-row .button,
  .inline-reset .button {
    width: 100%;
  }
}

@media print {
  @page {
    margin: 0;
    size: A4 portrait;
  }

  body {
    background: #fff;
  }

  .app-header,
  .app-shell {
    display: none;
  }

  .print-sheet {
    display: block;
  }
}

.user-row form {
  display: inline-block;
  margin: 0;
  vertical-align: middle;
}

.user-row {
  align-items: center;
}

.button.danger {
  color: #b42318;
  background: #fff3f0;
  border-color: #ffd5cc;
}
