:root {
  --black: #080808;
  --graphite: #171717;
  --ink: #222;
  --muted: #707070;
  --line: #e7e7e2;
  --surface: #f5f5f1;
  --white: #fff;
  --yellow: #ffd32a;
  --green: #15803d;
  --red: #b91c1c;
}

* {
  box-sizing: border-box;
}

*,
*::before,
*::after {
  min-width: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--black);
  background: var(--surface);
  font-family: Arial, Helvetica, sans-serif;
}

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

h1,
h2,
h3,
p,
span,
strong,
small,
label,
button,
td,
th {
  overflow-wrap: normal;
  word-break: normal;
}

h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(32px, 5vw, 62px);
  line-height: .96;
}

h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 44px);
  line-height: 1;
}

h3 {
  margin: 0 0 12px;
  font-size: 22px;
  line-height: 1.08;
}

p {
  line-height: 1.55;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 270px;
  padding: 26px 18px;
  color: var(--white);
  background: var(--black);
  overflow: auto;
}

.brand {
  display: grid;
  gap: 10px;
  padding: 0 8px 28px;
  color: var(--white);
  text-decoration: none;
}

.brand img {
  width: 154px;
  max-width: 100%;
  height: auto;
}

.brand span {
  color: #c9c9c9;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.nav {
  display: grid;
  gap: 4px;
}

.nav a {
  display: block;
  padding: 12px 14px;
  color: #dedede;
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}

.nav a:hover,
.nav a.active {
  color: var(--black);
  background: var(--yellow);
}

.app-shell {
  min-height: 100vh;
  margin-left: 270px;
  padding: 30px;
}

.topbar,
.section-head,
.summary-bar,
.builder-head,
.record-actions,
.modal-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.topbar {
  margin-bottom: 26px;
}

.topbar-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.eyebrow,
.section-kicker {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.button {
  min-height: 44px;
  border: 1px solid var(--black);
  border-radius: 999px;
  padding: 0 18px;
  background: var(--white);
  color: var(--black);
  cursor: pointer;
  font-weight: 900;
  white-space: nowrap;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  border-color: var(--yellow);
  background: var(--yellow);
}

.button.primary:hover {
  color: var(--white);
  border-color: var(--black);
  background: var(--black);
}

.button.dark {
  color: var(--white);
  background: var(--black);
}

.button.ghost {
  border-color: var(--line);
}

.button.danger {
  color: var(--red);
  border-color: #f0b4b4;
}

.stats-grid,
.grid {
  display: grid;
  gap: 16px;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.admin-card dl {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
}

.admin-card div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.admin-card dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.admin-card dd {
  margin: 0;
  font-weight: 900;
}

.dashboard-ops-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
  gap: 16px;
  margin-top: 16px;
}

.compact-head {
  margin-bottom: 18px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.calendar-event-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 150px auto;
  gap: 10px;
  margin-bottom: 14px;
}

.calendar-grid > strong {
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.calendar-cell {
  min-height: 58px;
  padding: 8px;
  border: 1px solid var(--line);
  background: #fbfbf9;
  font-weight: 900;
}

.calendar-cell b {
  display: block;
}

.calendar-cell.today {
  background: var(--yellow);
  border-color: var(--yellow);
}

.calendar-cell.holiday {
  border-color: #fecaca;
  background: #fff1f2;
}

.calendar-cell.has-sales {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.calendar-cell.has-event {
  box-shadow: inset 0 -4px 0 #111;
}

.calendar-cell small {
  display: block;
  margin-top: 8px;
  color: #555;
  font-size: 10px;
  font-weight: 800;
}

.calendar-cell em {
  display: block;
  margin-top: 6px;
  color: var(--red);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.calendar-cell .event-dot {
  color: var(--black);
}

.calendar-insights,
.monthly-report-head {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.calendar-insights span,
.monthly-report-head div {
  padding: 12px;
  border: 1px solid var(--line);
  background: #fbfbf9;
  font-size: 12px;
  font-weight: 900;
}

.monthly-report {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.monthly-report[hidden] {
  display: none;
}

.monthly-order-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.monthly-order-list article {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  background: #fbfbf9;
}

.monthly-order-list span {
  color: var(--muted);
  font-size: 13px;
}

.monthly-ranking {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  background: #fbfbf9;
}

.ranking-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.ranking-head small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.ranking-head strong {
  font-size: 18px;
}

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

.ranking-list article {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--white);
}

.ranking-list article > span {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--yellow);
  font-weight: 900;
}

.ranking-list small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.ranking-list b {
  white-space: nowrap;
}

.goal-box {
  display: grid;
  gap: 14px;
}

.goal-box small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.goal-box strong {
  display: block;
  margin-top: 6px;
  font-size: 28px;
}

.goal-progress {
  height: 14px;
  overflow: hidden;
  background: #e8e8e2;
}

.goal-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--yellow);
}

#monthGoalText {
  display: grid;
  grid-template-columns: repeat(2, minmax(130px, 1fr));
  gap: 10px;
  margin: 0;
}

.goal-insight {
  display: grid;
  gap: 4px;
  min-width: 0;
  min-height: 96px;
  padding: 14px;
  border: 1px solid var(--line);
  background: #fbfbf9;
  overflow: hidden;
}

.goal-insight.primary {
  color: var(--black);
  background: var(--yellow);
  border-color: var(--yellow);
}

.goal-insight.positive {
  color: var(--white);
  background: var(--green);
  border-color: var(--green);
}

.goal-insight.alert {
  color: var(--white);
  background: var(--black);
  border-color: var(--black);
}

.goal-insight small,
.goal-insight em {
  margin: 0;
  color: currentColor;
  opacity: .72;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.goal-insight strong {
  margin: 0;
  max-width: 100%;
  font-size: clamp(18px, 2.25vw, 26px);
  line-height: 1;
  overflow-wrap: anywhere;
  letter-spacing: 0;
}

.goal-empty {
  grid-column: 1 / -1;
  padding: 14px;
  border: 1px dashed #cfcfc9;
  color: var(--muted);
  font-weight: 800;
}

.notice-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px auto;
  gap: 10px;
  margin-bottom: 14px;
}

.notice-form textarea {
  grid-column: 1 / -1;
}

.notice-list,
.news-list {
  display: grid;
  gap: 10px;
}

.notice-item,
.news-list a,
.user-access-preview {
  display: grid;
  gap: 5px;
  padding: 12px;
  color: var(--black);
  text-decoration: none;
  border: 1px solid var(--line);
  background: #fbfbf9;
}

.notice-item span,
.news-list span,
.user-access-preview span {
  color: var(--muted);
  font-size: 13px;
}

.notice-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.notice-priority {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 9px;
  color: var(--black) !important;
  border-radius: 999px;
  background: var(--yellow);
  font-size: 11px !important;
  font-weight: 900;
  text-transform: uppercase;
}

.notice-late {
  border-color: #f1a7a7;
  background: #fff6f6;
}

.notice-late .notice-priority {
  color: var(--white) !important;
  background: var(--red);
}

.notice-done {
  opacity: .72;
}

.notice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.completed-notices {
  margin-top: 14px;
}

.completed-notices summary {
  cursor: pointer;
  font-weight: 900;
}

.notice-item p {
  margin: 0;
  color: #555;
  font-size: 13px;
}

.settings-users {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  background: #f9f9f6;
}

.stat-card,
.panel {
  border: 1px solid var(--line);
  background: var(--white);
}

.stat-card {
  min-height: 130px;
  padding: 22px;
}

.stat-card small {
  display: block;
  color: var(--muted);
  font-weight: 800;
}

.stat-card strong {
  display: block;
  margin-top: 28px;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1;
}

.stat-card.yellow {
  background: var(--yellow);
  border-color: var(--yellow);
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr);
  gap: 30px;
  margin-top: 16px;
  padding: 34px;
  color: var(--white);
  background:
    radial-gradient(circle at 85% 0%, rgba(255, 211, 42, .28), transparent 28%),
    linear-gradient(120deg, rgba(0, 0, 0, .98), rgba(20, 20, 20, .86));
}

.hero-panel p {
  max-width: 640px;
  color: #dfdfdf;
  font-size: 18px;
}

.mini-flow {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mini-flow li {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 16px;
  color: var(--black);
  background: var(--white);
  font-weight: 800;
}

.mini-flow span {
  color: var(--muted);
  font-size: 12px;
}

.work-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  align-items: start;
  gap: 20px;
}

.catalog-layout {
  display: grid;
  gap: 16px;
}

.catalog-form {
  gap: 14px;
}

.catalog-form-head {
  align-items: center;
}

.catalog-form-grid {
  display: grid;
  grid-template-columns: 150px minmax(220px, 1fr) minmax(170px, .8fr) 130px 130px 160px;
  gap: 12px;
  align-items: end;
}

.catalog-form-grid .button {
  width: auto;
  min-width: 150px;
}

.catalog-form-description textarea {
  min-height: 76px;
}

.panel {
  padding: 24px;
  min-width: 0;
  overflow: hidden;
}

.form-panel {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.form-section {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  background: #f9f9f6;
  min-width: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 16px;
}

.client-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}

.side-help {
  position: sticky;
  top: 24px;
  align-self: start;
}

.side-help p {
  overflow-wrap: normal;
  word-break: normal;
}

.cnpj-lookup {
  display: grid;
  align-content: end;
  gap: 6px;
}

.cnpj-lookup .button {
  width: 100%;
}

.cnpj-lookup span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.cnpj-lookup span[data-status="success"] {
  color: var(--green);
}

.cnpj-lookup span[data-status="warn"] {
  color: var(--red);
}

.cnpj-lookup span[data-status="loading"] {
  color: var(--black);
}

.field-hint {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.field-hint[data-status="success"] {
  color: var(--green);
}

.field-hint[data-status="warn"] {
  color: var(--red);
}

.quote-meta-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
}

.item-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
}

.quote-composer {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 14px;
}

.quote-composer input[type="search"] {
  min-height: 40px;
  border-color: #d7d7d0;
  background: #fffef8;
}

.custom-tech-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  background: var(--white);
}

.custom-tech-grid[hidden] {
  display: none;
}

label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  min-width: 0;
}

input,
select,
textarea {
  width: 100%;
  max-width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 10px 12px;
  color: var(--black);
  background: #fbfbf9;
  outline: none;
  min-width: 0;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--black);
  background: var(--white);
}

.item-builder {
  display: grid;
  gap: 16px;
  padding: 20px;
  background: #f9f9f6;
  border: 1px solid var(--line);
}

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

.pricing-preview article {
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--white);
}

.pricing-preview small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.pricing-preview strong {
  display: block;
  margin-top: 8px;
  font-size: 22px;
}

.builder-head p {
  max-width: 360px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

th,
td {
  padding: 13px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.summary-bar {
  align-items: center;
  padding-top: 4px;
}

.summary-bar strong {
  font-size: 24px;
}

.summary-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.side-help p {
  color: #555;
}

.record-list,
.catalog-list,
.client-list {
  display: grid;
  gap: 12px;
}

.record-card,
.order-card,
.client-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  background: #fbfbf9;
}

.client-card {
  grid-template-columns: minmax(220px, .7fr) minmax(0, 1.3fr);
}

.client-card strong,
.client-card span {
  display: block;
}

.client-card span {
  margin-top: 6px;
  color: var(--muted);
}

.client-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.client-card dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.client-card dd {
  margin: 4px 0 0;
}

.tracking-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 16px;
}

.tracking-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #4a4a4a;
  background: var(--white);
  font-size: 13px;
  font-weight: 900;
}

.tracking-chip.active {
  color: var(--black);
  background: var(--yellow);
  border-color: var(--yellow);
}

.tracking-chip strong {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .08);
}

.tracking-card {
  grid-template-columns: 120px minmax(0, 1fr);
  align-items: stretch;
}

.tracking-number {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  min-height: 132px;
  border-right: 1px solid var(--line);
}

.tracking-number small,
.tracking-value small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.tracking-number strong {
  font-size: 34px;
  line-height: 1;
}

.tracking-value {
  display: grid;
  gap: 8px;
  justify-items: end;
  align-content: start;
}

.tracking-value strong {
  font-size: 22px;
}

.record-main {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.record-title {
  display: grid;
  gap: 6px;
}

.record-title strong {
  font-size: 18px;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--ink);
  background: #ededeb;
  font-size: 12px;
  font-weight: 900;
}

.pill.yellow {
  background: var(--yellow);
}

.status-pill {
  color: #111;
  border: 1px solid transparent;
}

.status-art {
  background: #e0f2fe;
  border-color: #7dd3fc;
}

.status-approved {
  background: #dcfce7;
  border-color: #86efac;
}

.status-queue {
  background: #fef3c7;
  border-color: #facc15;
}

.status-production {
  color: var(--white);
  background: #2563eb;
  border-color: #2563eb;
}

.status-finish {
  background: #ede9fe;
  border-color: #c4b5fd;
}

.status-delivered,
.status-ok {
  color: var(--white);
  background: var(--green);
  border-color: var(--green);
}

.status-late {
  color: var(--white);
  background: var(--red);
  border-color: var(--red);
}

.status-neutral {
  background: #e5e7eb;
  border-color: #d1d5db;
}

.danger-chip {
  color: var(--red);
  border-color: #fecaca;
  background: #fff1f2;
}

.record-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.inline-date-field {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.inline-date-field input {
  min-height: 44px;
  min-width: 160px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: var(--white);
  font-size: 14px;
  font-weight: 800;
}

.tab-row {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.tab {
  min-height: 38px;
  border: 1px solid var(--line);
  background: var(--white);
  padding: 0 14px;
  cursor: pointer;
  font-weight: 900;
}

.tab.active {
  border-color: var(--black);
  color: var(--white);
  background: var(--black);
}

.tab strong {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-left: 8px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .08);
  font-size: 12px;
}

.tab.active strong {
  color: var(--black);
  background: var(--yellow);
}

.client-search-box {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  background: var(--white);
}

.client-search-results {
  display: grid;
  gap: 6px;
}

.client-search-item {
  display: grid;
  gap: 4px;
  width: 100%;
  border: 1px solid var(--line);
  background: #fbfbf9;
  padding: 12px;
  text-align: left;
  cursor: pointer;
}

.client-search-item:hover {
  border-color: var(--black);
}

.client-search-item strong,
.client-search-item span {
  display: block;
}

.client-search-item span,
.client-search-empty {
  color: var(--muted);
  font-size: 13px;
}

.client-search-empty {
  padding: 10px 0 0;
}

.catalog-table {
  display: grid;
  gap: 10px;
  min-width: 1180px;
}

.catalog-list {
  overflow-x: auto;
}

.catalog-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(170px, .7fr) 120px 120px 250px;
  gap: 10px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  background: #fbfbf9;
}

.catalog-row-head {
  grid-template-columns: minmax(260px, 1fr) minmax(170px, .7fr) 120px 120px 250px;
  padding: 0 14px 8px;
  color: var(--muted);
  border: 0;
  background: transparent;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.catalog-row label {
  font-size: 11px;
}

.catalog-row input,
.catalog-row textarea {
  min-height: 38px;
  font-weight: 800;
}

.catalog-name-field input {
  font-weight: 900;
}

.catalog-description-field {
  grid-column: 1 / -1;
}

.catalog-description-field textarea {
  min-height: 84px;
  line-height: 1.4;
  white-space: normal;
}

.catalog-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-start;
  align-items: end;
  padding-top: 18px;
}

.catalog-actions .button {
  min-width: 118px;
}

.catalog-note {
  margin: -4px 0 16px;
  padding: 12px 14px;
  color: #555;
  background: #f8f8f4;
  border: 1px solid var(--line);
  font-size: 13px;
}

.kanban {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(300px, 1fr);
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.kanban-column {
  min-height: 520px;
  padding: 14px;
  border: 1px solid var(--line);
  background: #f8f8f4;
}

.kanban-column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.kanban-column h3 {
  margin: 0;
  font-size: 16px;
}

.kanban-column-head span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 28px;
  border-radius: 999px;
  color: var(--black);
  background: var(--yellow);
  font-weight: 900;
}

.kanban-card {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--line);
}

.kanban-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.kanban-card-head strong {
  font-size: 18px;
}

.kanban-card-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.kanban-card h4 {
  margin: 0;
  font-size: 16px;
  line-height: 1.15;
}

.kanban-card p {
  margin: 0;
  color: #555;
  font-size: 13px;
}

.kanban-card ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 16px;
  color: #333;
  font-size: 13px;
}

.kanban-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.kanban-card-actions .button:last-child {
  grid-column: 1 / -1;
}

.empty-state {
  padding: 26px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed #cfcfc9;
}

.empty-state strong {
  display: block;
  color: var(--black);
  margin-bottom: 6px;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  padding: 24px;
  background: rgba(0, 0, 0, .72);
  overflow: auto;
  z-index: 20;
}

.modal.open {
  display: block;
}

.modal-panel {
  width: min(980px, 100%);
  margin: 0 auto;
}

.modal-actions {
  position: sticky;
  top: 0;
  z-index: 1;
  justify-content: flex-end;
  padding: 0 0 14px;
}

.print-hint {
  margin: 0 auto 14px;
  width: min(980px, 100%);
  padding: 12px 14px;
  color: var(--white);
  background: rgba(0, 0, 0, .72);
  font-size: 13px;
}

.a4-document {
  width: 210mm;
  min-height: 297mm;
  margin: 0 auto;
  padding: 18mm;
  color: #111;
  background: var(--white);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
}

.doc-hero,
.doc-info-grid,
.doc-total-card,
.doc-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.doc-hero {
  align-items: stretch;
  min-height: 128px;
  padding: 18px;
  color: var(--white);
  background: linear-gradient(120deg, #050505 0%, #171717 72%, #2b2508 100%);
}

.doc-brand-block {
  display: grid;
  align-content: space-between;
  gap: 18px;
}

.doc-brand-block p {
  max-width: 320px;
  margin: 0;
  color: #e7e7e7;
  font-size: 13px;
}

.doc-logo {
  max-width: 160px;
  height: auto;
}

.doc-title {
  display: grid;
  align-content: end;
  text-align: right;
}

.doc-title span {
  color: var(--yellow);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.doc-title h2 {
  margin: 8px 0;
  color: var(--white);
  font-size: 28px;
}

.doc-title p {
  margin: 0;
  color: #d8d8d8;
  font-size: 13px;
}

.doc-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 26px 0 12px;
}

.doc-info-grid-wide {
  margin-top: 12px;
}

.doc-info-grid article {
  min-height: 92px;
  padding: 14px;
  background: #f7f7f3;
  border: 1px solid #e2e2dc;
}

.doc-info-grid small,
.doc-total-card small {
  display: block;
  color: #666;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.doc-info-grid strong {
  display: block;
  margin: 8px 0;
}

.doc-info-grid span {
  display: block;
  margin-top: 4px;
  color: #555;
  font-size: 12px;
}

.doc-job {
  margin: 14px 0 20px;
  padding: 14px;
  border-left: 4px solid var(--yellow);
  background: #f7f7f3;
}

.doc-job small {
  display: block;
  color: #666;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.doc-job strong {
  display: block;
  margin-top: 6px;
}

.doc-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 2px solid #111;
}

.doc-section-title span {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.doc-table {
  min-width: 0;
}

.doc-table th,
.doc-table td {
  padding: 9px 7px;
}

.doc-total-card {
  margin-top: 20px;
  padding: 18px;
  color: var(--black);
  background: var(--yellow);
}

.doc-total-card strong {
  display: block;
  margin-top: 6px;
  font-size: 24px;
}

.today-condition {
  display: block;
  max-width: 620px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(0, 0, 0, .18);
  color: #3a3000;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.doc-notes {
  margin-top: 18px;
  padding: 16px;
  background: #f7f7f3;
  border: 1px solid #e2e2dc;
}

.doc-notes h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.doc-notes p {
  margin: 0;
  color: #555;
  font-size: 13px;
}

.doc-footer {
  margin-top: 30px;
  padding-top: 14px;
  color: #555;
  border-top: 1px solid #ddd;
  font-size: 12px;
}

@media (max-width: 1440px) {
  .work-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .side-help {
    position: static;
  }

  .client-grid,
  .quote-meta-grid,
  .item-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  }
}

@media (max-width: 1060px) {
  .sidebar {
    position: static;
    width: auto;
  }

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

  .app-shell {
    margin-left: 0;
  }

  .stats-grid,
  .admin-grid,
  .dashboard-ops-grid,
  .hero-panel {
    grid-template-columns: 1fr 1fr;
  }

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

  .item-grid,
  .quote-composer,
  .custom-tech-grid,
  .client-grid,
  .quote-meta-grid,
  .catalog-form-grid,
  .kanban {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .sidebar,
  .app-shell {
    padding: 16px;
  }

  .nav,
  .stats-grid,
  .admin-grid,
  .dashboard-ops-grid,
  .hero-panel,
  .work-grid,
  .form-grid,
  .item-grid,
  .quote-composer,
  .custom-tech-grid,
  .client-grid,
  .quote-meta-grid,
  .calendar-event-form,
  .calendar-insights,
  .monthly-report-head,
  #monthGoalText,
  .catalog-form-grid,
  .kanban {
    grid-template-columns: 1fr;
  }

  .topbar,
  .section-head,
  .summary-bar,
  .record-main,
  .client-card {
    flex-direction: column;
    align-items: stretch;
  }

  .client-card,
  .client-card dl {
    grid-template-columns: 1fr;
  }

  .summary-actions {
    justify-content: stretch;
  }

  .tracking-card {
    grid-template-columns: 1fr;
  }

  .tracking-number {
    min-height: auto;
    place-items: start;
    padding-bottom: 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .tracking-value {
    justify-items: start;
  }

  .catalog-actions {
    justify-content: stretch;
  }

  .button {
    width: 100%;
  }

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

  .panel,
  .hero-panel {
    padding: 20px;
  }

  .a4-document {
    width: 100%;
    min-height: auto;
    padding: 18px;
  }

  .pricing-preview,
  .doc-hero,
  .doc-info-grid,
  .doc-total-card,
  .doc-footer {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .doc-title {
    text-align: left;
  }
}

@media print {
  body {
    background: var(--white);
  }

  .sidebar,
  .app-shell,
  .modal-actions {
    display: none !important;
  }

  .modal {
    position: static;
    display: block;
    padding: 0;
    background: var(--white);
  }

  .modal-panel {
    width: 100%;
    margin: 0;
  }

  .a4-document {
    width: 210mm;
    min-height: 297mm;
    margin: 0;
    padding: 14mm;
    box-shadow: none;
  }
}
