:root {
  --bg: #eef2f7;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --text: #111827;
  --muted: #64748b;
  --line: #d7dee8;
  --accent: #10967d;
  --accent-dark: #087463;
  --price: #e11d48;
  --shadow: 0 12px 30px rgba(15, 23, 42, .12);
}

/* Firma kaydı ve başvuru yönetimi */
.auth-entry {
  width: 100%;
  min-width: 0;
}

.management-modal:has(.application-form:not([hidden])) {
  width: min(920px, calc(100% - 28px));
  max-height: min(92vh, 900px);
}

.auth-panel-brand {
  justify-content: center;
  text-align: left;
}

.auth-actions,
.application-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.auth-actions .detail-btn,
.application-actions .detail-btn {
  width: 100%;
  min-height: 46px;
  margin: 0;
  justify-content: center;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 900;
}

.auth-register-open,
.application-back {
  color: #182230;
  border: 1px solid #cfd7e3;
  background: #fff;
}

.auth-register-open:hover,
.application-back:hover {
  border-color: #98a2b3;
  background: #f2f4f7;
}

.application-form {
  width: min(840px, 100%);
  display: grid;
  gap: 16px;
  margin: 0 auto;
  padding: 22px;
  color: #182230;
  border: 1px solid #dfe5ec;
  border-top: 4px solid #0f766e;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 20px 46px rgba(15, 23, 42, .12);
}

.application-form-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px;
  gap: 18px;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid #e4e7ec;
}

.application-form-head > div {
  display: grid;
  gap: 4px;
}

.application-form-head span {
  color: #0f766e;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.application-form-head h3,
.application-form-head p {
  margin: 0;
}

.application-form-head h3 {
  color: #101828;
  font-size: 21px;
}

.application-form-head p {
  color: #667085;
  font-size: 13px;
  line-height: 1.45;
}

.application-form-head > b {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 8px;
  background: #0f766e;
  font-size: 15px;
}

.application-section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #344054;
  font-size: 12px;
  font-weight: 900;
}

.application-section-title::after {
  content: "";
  height: 1px;
  flex: 1;
  background: #e4e7ec;
}

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

.application-grid label {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.application-grid label.wide {
  grid-column: 1 / -1;
}

.application-grid label > span,
.application-logo-field small {
  color: #475467;
  font-size: 11px;
  font-weight: 800;
}

.application-grid input,
.application-grid textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #cfd7e3;
  border-radius: 7px;
  padding: 0 11px;
  color: #101828;
  background: #fff;
  outline: none;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
}

.application-grid input {
  height: 42px;
}

.application-grid input[type="file"] {
  padding: 7px 9px;
  font-size: 12px;
}

.application-grid textarea {
  min-height: 68px;
  padding-top: 10px;
  resize: vertical;
}

.application-grid input:focus,
.application-grid textarea:focus {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, .14);
}

.application-agreement {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  padding: 11px 12px;
  color: #475467;
  border: 1px solid #e4e7ec;
  border-radius: 7px;
  background: #f9fafb;
  font-size: 12px;
  line-height: 1.4;
}

.application-agreement input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: #0f766e;
}

.application-honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.application-submit {
  color: #fff;
  border-color: #0f766e;
  background: #0f766e;
}

.application-message {
  min-height: 18px;
  margin: 0;
  color: #475467;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
}

.application-message.success {
  color: #067647;
}

.application-message.error {
  color: #b42318;
}

.admin-open-btn {
  position: relative;
}

.admin-notification-badge,
.nav-notification-badge {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  color: #fff;
  border: 2px solid #fff;
  border-radius: 10px;
  background: #d92d20;
  font-size: 10px;
  font-style: normal;
  line-height: 1;
}

.admin-notification-badge {
  position: absolute;
  top: -8px;
  right: -8px;
}

.nav-notification-badge {
  float: right;
  height: 18px;
  min-width: 18px;
  margin-left: 8px;
  border: 0;
}

.application-summary {
  color: #475467;
  font-size: 12px;
  font-weight: 800;
}

.application-admin-list {
  display: grid;
  gap: 12px;
}

.application-admin-card {
  display: grid;
  gap: 13px;
  padding: 16px;
  border: 1px solid #dfe5ec;
  border-left: 4px solid #f79009;
  border-radius: 8px;
  background: #fff;
}

.application-admin-card.approved {
  border-left-color: #12b76a;
}

.application-admin-card.rejected {
  border-left-color: #f04438;
}

.application-admin-card > header {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
}

.application-admin-card header div {
  display: grid;
  gap: 3px;
}

.application-admin-card header span,
.application-admin-card header h4,
.application-admin-card header p {
  margin: 0;
}

.application-admin-card header div > span {
  color: #667085;
  font-size: 10px;
  font-weight: 900;
}

.application-admin-card header h4 {
  color: #101828;
  font-size: 17px;
}

.application-admin-card header p {
  color: #475467;
  font-size: 12px;
}

.application-status {
  flex: 0 0 auto;
  padding: 5px 8px;
  color: #93370d;
  border-radius: 6px;
  background: #fffaeb;
  font-size: 11px;
  font-weight: 900;
}

.application-status.approved {
  color: #05603a;
  background: #ecfdf3;
}

.application-status.rejected {
  color: #912018;
  background: #fef3f2;
}

.application-admin-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.application-admin-details dl {
  min-width: 0;
  margin: 0;
  padding: 9px 10px;
  border-left: 2px solid #d0d5dd;
}

.application-admin-details dt {
  margin-bottom: 4px;
  color: #667085;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.application-admin-details dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: #344054;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.application-website {
  color: #0f766e;
  font-size: 12px;
  font-weight: 800;
}

.application-decision {
  display: grid;
  grid-template-columns: 130px minmax(220px, 1fr) 96px 96px;
  gap: 9px;
  align-items: end;
  padding-top: 12px;
  border-top: 1px solid #e4e7ec;
}

.application-decision label {
  display: grid;
  gap: 5px;
}

.application-decision label span {
  color: #667085;
  font-size: 10px;
  font-weight: 900;
}

.application-decision input,
.application-decision button {
  width: 100%;
  height: 38px;
  border-radius: 6px;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
}

.application-decision input {
  min-width: 0;
  padding: 0 9px;
  border: 1px solid #cfd7e3;
  outline: none;
}

.application-decision button {
  cursor: pointer;
}

.application-approve {
  color: #fff;
  border: 1px solid #067647;
  background: #067647;
}

.application-reject {
  color: #b42318;
  border: 1px solid #fecdca;
  background: #fff;
}

.application-delete-row {
  display: flex;
  justify-content: flex-end;
  padding-top: 10px;
  border-top: 1px solid #e4e7ec;
}

.application-delete {
  min-width: 124px;
  height: 36px;
  padding: 0 12px;
  color: #b42318;
  border: 1px solid #fecdca;
  border-radius: 6px;
  background: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.application-delete:hover {
  border-color: #f97066;
  background: #fef3f2;
}

.application-rejection-copy {
  margin: 0;
  padding: 10px;
  color: #912018;
  background: #fef3f2;
  font-size: 12px;
}

.user-permissions {
  margin: 14px 0 0;
  padding: 14px;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
}

.user-permissions legend {
  padding: 0 6px;
  color: #101828;
  font-size: 13px;
  font-weight: 900;
}

.user-permissions > p {
  margin: 0 0 12px;
  color: #667085;
  font-size: 12px;
}

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

.user-permission-grid > label {
  display: flex;
  min-width: 0;
  gap: 9px;
  align-items: flex-start;
  padding: 10px;
  border: 1px solid #e4e7ec;
  border-radius: 6px;
  background: #f9fafb;
}

.user-permission-grid input {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: #067647;
}

.user-permission-grid span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.user-permission-grid strong {
  color: #101828;
  font-size: 12px;
}

.user-permission-grid small {
  color: #667085;
  font-size: 10px;
  line-height: 1.35;
}

@media (max-width: 760px) {
  .management-modal:has(.application-form:not([hidden])) {
    width: calc(100% - 16px);
    max-height: calc(100vh - 16px);
  }

  .application-form {
    gap: 14px;
    padding: 16px;
  }

  .application-grid,
  .application-admin-details {
    grid-template-columns: 1fr;
  }

  .application-grid label.wide {
    grid-column: 1;
  }

  .application-decision {
    grid-template-columns: 1fr 1fr;
  }

  .user-permission-grid {
    grid-template-columns: 1fr;
  }

  .application-reason {
    grid-column: 1 / -1;
  }
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  letter-spacing: 0;
  background: linear-gradient(135deg, #f8fafc 0%, #e5ebf3 100%);
}

button,
select,
input {
  font: inherit;
}

.page-shell {
  position: relative;
  width: min(1240px, calc(100% - 28px));
  margin: 0 auto;
  padding: 12px 0 42px;
}

.title-band {
  text-align: center;
  padding: 52px 0 20px;
}

.title-band h2 {
  margin: 0;
  font-size: 40px;
  line-height: 1.1;
  font-weight: 800;
}

.title-band p {
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.top-actions {
  position: absolute;
  top: 12px;
  right: 0;
  display: flex;
  gap: 8px;
  align-items: center;
}

.labor-open-btn,
.refresh-packages-btn {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 6px;
  padding: 0;
  color: #fff;
  background: var(--accent-dark);
  cursor: pointer;
  font-weight: 800;
  display: inline-grid;
  place-items: center;
  box-shadow: 0 8px 18px rgba(8, 116, 99, .22);
}

.refresh-packages-btn {
  width: auto;
  min-width: 92px;
  padding: 0 12px;
  background: #2563eb;
  box-shadow: 0 8px 18px rgba(37, 99, 235, .22);
  white-space: nowrap;
}

.labor-open-btn::before {
  content: "\270E";
  font-size: 18px;
  line-height: 1;
}

.labor-open-btn:hover,
.refresh-packages-btn:hover {
  filter: brightness(1.05);
}

.refresh-packages-btn:disabled {
  opacity: .68;
  cursor: wait;
}

.filter-strip {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(150px, .65fr) repeat(5, minmax(112px, 1fr)) 104px 42px;
  gap: 10px;
  align-items: center;
  padding: 12px;
  background: rgba(255, 255, 255, .94);
  border: 1px solid var(--line);
  box-shadow: 0 8px 22px rgba(15, 23, 42, .08);
  backdrop-filter: blur(10px);
}

.filter-strip label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.filter-strip span {
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}

.filter-strip select,
.filter-strip input {
  width: 100%;
  height: 38px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0 10px;
  color: var(--text);
  background: #fff;
  font-weight: 700;
  outline: none;
}

.filter-strip input::placeholder {
  color: #64748b;
}

.filter-strip select:focus,
.filter-strip input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(16, 150, 125, .16);
}

.reset-btn,
.detail-btn,
.close-btn {
  border: 0;
  cursor: pointer;
  font-weight: 800;
}

.reset-btn {
  height: 38px;
  border-radius: 6px;
  color: #fff;
  background: #334155;
}

.package-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  padding-top: 24px;
}

.package-card {
  min-height: 392px;
  display: grid;
  grid-template-rows: 76px auto auto auto 1fr auto auto;
  align-items: start;
  gap: 8px;
  padding: 16px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.package-card-special {
  background: linear-gradient(135deg, rgba(255, 247, 237, .96) 0%, rgba(239, 246, 255, .96) 100%);
  border-color: #f59e0b;
  box-shadow: 0 14px 32px rgba(245, 158, 11, .18), 0 8px 22px rgba(37, 99, 235, .10);
}

.package-card-special .package-family {
  color: #9a3412;
}

.package-card-special .package-title {
  color: #1d4ed8;
}

.package-card-special .detail-btn {
  background: linear-gradient(90deg, #f59e0b 0%, #2563eb 100%);
  box-shadow: 0 8px 18px rgba(37, 99, 235, .22);
}

.package-image {
  width: 100%;
  height: 70px;
  object-fit: contain;
}

.package-family {
  margin: 0;
  color: #111827;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 800;
}

.package-title {
  margin: 0;
  color: var(--accent);
  font-size: 24px;
  line-height: 1.15;
  font-weight: 800;
}

.package-specs {
  display: grid;
  gap: 5px;
  margin: 2px 0 0;
  color: #111827;
  font-size: 17px;
  line-height: 1.2;
  font-weight: 700;
}

.package-price {
  align-self: end;
  margin: 6px 0 0;
  color: #1d4ed8;
  text-align: center;
  font-size: 30px;
  line-height: 1;
  font-weight: 800;
}

.detail-btn {
  width: 210px;
  max-width: 100%;
  height: 48px;
  justify-self: center;
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(90deg, #00b5d8 0%, #276fc2 100%);
  box-shadow: 0 6px 14px rgba(39, 111, 194, .26);
  font-size: 15px;
  font-weight: 900;
}

.detail-btn:hover {
  filter: brightness(1.04);
}

.empty-state {
  margin-top: 24px;
  padding: 24px;
  text-align: center;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
}

.admin-package-panel {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.admin-package-toolbar {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.admin-package-toolbar div {
  display: grid;
  gap: 2px;
}

.admin-package-toolbar strong {
  color: #0f172a;
  font-size: 16px;
  line-height: 1.2;
}

.admin-package-toolbar span,
.package-editor-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.admin-package-toolbar select,
.package-editor-grid input,
.package-editor-grid textarea,
.package-editor-table input,
.package-editor-table select,
.package-editor-add-row input {
  width: 100%;
  min-width: 0;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  color: #111827;
  background: #fff;
  font-weight: 800;
  outline: none;
}

.admin-package-toolbar select,
.package-editor-grid input,
.package-editor-table input,
.package-editor-table select,
.package-editor-add-row input {
  height: 34px;
  padding: 0 9px;
}

.package-editor-grid textarea {
  min-height: 62px;
  padding: 8px 9px;
  resize: vertical;
}

.admin-package-toolbar select:focus,
.package-editor-grid input:focus,
.package-editor-grid textarea:focus,
.package-editor-table input:focus,
.package-editor-table select:focus,
.package-editor-add-row input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(16, 150, 125, .16);
}

.admin-package-empty {
  margin: 0;
  padding: 14px;
  color: var(--muted);
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  font-weight: 900;
}

.package-editor {
  display: grid;
  gap: 12px;
}

.package-editor-title-preview {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.package-editor-title-preview span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.package-editor-title-preview strong {
  color: #0f172a;
  font-size: 18px;
  line-height: 1.25;
}

.package-editor-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.package-editor-grid label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.package-editor-grid .wide {
  grid-column: span 2;
}

.package-image-field a {
  min-width: 0;
  overflow: hidden;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.package-editor-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.package-editor-table {
  width: 100%;
  min-width: 1220px;
  border-collapse: collapse;
  background: #fff;
  font-size: 13px;
}

.package-editor-table th {
  color: #fff;
  background: #111827;
  text-align: left;
}

.package-editor-table th,
.package-editor-table td {
  padding: 8px;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: middle;
}

.package-editor-table tbody tr:nth-child(even) {
  background: #f8fafc;
}

.package-editor-table .right {
  text-align: right;
  white-space: nowrap;
}

.package-editor-table input.right {
  text-align: right;
}

.package-editor-table input.compact {
  max-width: 76px;
}

.package-editor-no-row {
  color: var(--muted);
  text-align: center;
  font-weight: 900;
}

.package-editor-add-row {
  background: #f0fdfa !important;
}

.package-editor-add-row input {
  max-width: 220px;
  text-transform: uppercase;
}

.package-editor-add-row span {
  display: inline-block;
  margin-left: 10px;
  color: #0f766e;
  font-size: 12px;
  font-weight: 900;
}

.package-editor-table tfoot td {
  color: #0f172a;
  background: #ecfdf3;
  border-top: 2px solid #10b981;
  font-weight: 900;
}

.package-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.package-editor-message {
  flex: 1 1 220px;
  color: #0f766e;
  font-weight: 900;
}

.package-editor .labor-save-btn.secondary,
.admin-package-panel .labor-save-btn.secondary {
  color: #0f172a;
  background: #e2e8f0;
}

.package-editor .quote-row-btn.square,
.admin-package-panel .quote-row-btn.square {
  width: 34px;
  height: 34px;
  border-radius: 7px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2147483500;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, .58);
}

.detail-modal,
.labor-modal {
  width: min(1240px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .34);
}

.labor-modal {
  width: min(1120px, 100%);
}

.detail-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.detail-head p {
  margin: 0 0 4px;
  color: var(--muted);
  font-weight: 800;
}

.detail-head h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
}

.close-btn {
  flex: 0 0 auto;
  height: 38px;
  padding: 0 16px;
  border-radius: 6px;
  color: #fff;
  background: var(--accent-dark);
}

.detail-actions {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
  justify-content: flex-end;
}

.quote-copy-status {
  max-width: 360px;
  overflow: hidden;
  color: var(--accent-dark);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 900;
}

.quote-copy-status a {
  color: #1d4ed8;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.quote-link-btn {
  position: relative;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 6px;
  color: #fff;
  background: #2563eb;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(37, 99, 235, .24);
}

.quote-link-btn::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 9px;
  width: 13px;
  height: 17px;
  border: 2px solid currentColor;
  border-radius: 3px;
}

.quote-link-btn::after {
  content: "";
  position: absolute;
  left: 16px;
  top: 6px;
  width: 9px;
  height: 5px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 3px 3px 0 0;
}

.quote-link-btn:hover {
  filter: brightness(1.05);
}

.quote-link-btn:disabled {
  opacity: .65;
  cursor: wait;
}

.quote-copy-wrap {
  position: relative;
  flex: 0 0 auto;
}

.quote-plate-popover {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  z-index: 6;
  width: 238px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 6px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: 0 14px 34px rgba(16, 24, 40, .18);
}

.quote-plate-popover[hidden] {
  display: none !important;
}

.quote-plate-popover::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 12px;
  width: 10px;
  height: 10px;
  background: #fff;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  transform: rotate(45deg);
}

.quote-plate-popover input {
  min-width: 0;
  height: 30px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  padding: 0 8px;
  color: #111827;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 900;
  outline: none;
}

.quote-plate-popover input:focus {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, .14);
}

.quote-plate-popover button {
  height: 30px;
  border: 0;
  border-radius: 7px;
  padding: 0 8px;
  color: #fff;
  background: #111827;
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
}

.quote-plate-popover button:last-of-type {
  color: #111827;
  background: #e5e7eb;
}

.quote-plate-popover small {
  grid-column: 1 / -1;
  min-height: 12px;
  color: #667085;
  font-size: 10px;
  line-height: 1.2;
  font-weight: 900;
}

.quote-reset-btn {
  flex: 0 0 auto;
  height: 38px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  color: #111827;
  background: #e5e7eb;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}

.quote-reset-btn:hover {
  background: #d1d5db;
}

.detail-body {
  overflow: auto;
  padding: 18px;
}

.quote-discount-toolbar {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.quote-discount-groups,
.quote-age-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quote-age-presets {
  justify-content: flex-end;
  margin-left: auto;
}

.quote-discount-control {
  position: relative;
}

.quote-discount-main {
  min-width: 104px;
  height: 36px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: #0f172a;
  background: #fff;
  cursor: pointer;
  font-weight: 900;
}

.quote-discount-main em {
  color: #dc2626;
  font-style: normal;
}

.quote-discount-options {
  position: absolute;
  z-index: 4;
  top: calc(100% + 6px);
  left: 0;
  min-width: 104px;
  display: none;
  gap: 4px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(15, 23, 42, .16);
}

.quote-discount-control.is-open .quote-discount-options {
  display: grid;
}

.quote-discount-options button {
  height: 32px;
  border: 0;
  border-radius: 6px;
  color: #fff;
  background: var(--accent-dark);
  cursor: pointer;
  font-weight: 900;
}

.quote-discount-options button:hover {
  filter: brightness(1.05);
}

.quote-age-presets button {
  height: 36px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0 12px;
  color: #0f172a;
  background: #f8fafc;
  cursor: pointer;
  font-weight: 900;
  white-space: nowrap;
}

.quote-age-presets button:hover {
  border-color: #0f766e;
  background: #ecfdf5;
}

.quote-age-presets .quote-code-toggle {
  color: #fff;
  border-color: #0f766e;
  background: #0f766e;
}

.quote-age-presets .quote-code-toggle:hover,
.quote-age-presets .quote-code-toggle.is-active {
  color: #fff;
  border-color: #115e59;
  background: #115e59;
}

.quote-product-code {
  font-weight: 800;
  white-space: nowrap;
}

.quote-code-hidden {
  color: #98a2b3;
  font-weight: 700;
}

.quote-table-wrap {
  overflow: auto;
}

.detail-table {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
  font-size: 14px;
  box-shadow: 0 0 20px rgba(0, 0, 0, .12);
}

.detail-table th {
  background: #009879;
  color: #fff;
  text-align: left;
}

.detail-table th,
.detail-table td {
  padding: 11px 12px;
  border-bottom: 1px solid #e2e8f0;
}

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

.detail-table .right {
  text-align: right;
  white-space: nowrap;
}

.quote-cell-input {
  width: 104px;
  height: 30px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0 8px;
  color: #111827;
  background: #fff;
  text-align: right;
  font-size: 12px;
  font-weight: 900;
  outline: none;
}

.quote-rate-input {
  width: 74px;
}

.quote-cell-input:focus {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, .14);
}

.quote-add-product-row {
  background: #f0fdfa !important;
}

.quote-code-input {
  width: 118px;
  height: 30px;
  border: 1px dashed #94a3b8;
  border-radius: 6px;
  padding: 0 8px;
  color: #0f172a;
  background: #fff;
  font-size: 12px;
  font-weight: 900;
  outline: none;
}

.quote-code-input:focus {
  border-style: solid;
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, .14);
}

.quote-code-input::placeholder {
  color: #64748b;
}

.quote-add-product-status {
  display: block;
  max-width: 520px;
  color: #0f766e;
  font-size: 12px;
  font-weight: 900;
  white-space: normal;
}

.quote-action-cell {
  width: 42px;
  text-align: center;
}

.quote-row-btn,
.quote-add-btn {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: #e11d48;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  font-weight: 900;
}

.quote-add-btn {
  background: #0f766e;
}

.quote-row-btn.danger {
  background: #be123c;
}

.quote-row-btn:disabled,
.quote-add-btn:disabled {
  opacity: .55;
  cursor: wait;
}

.quote-added-row {
  background: #ecfdf5 !important;
}

.quote-removed-row {
  color: #64748b;
  background: #fff1f2 !important;
}

.quote-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
  margin-top: 16px;
}

.quote-section {
  min-width: 0;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.quote-section h3,
.extra-product-head h3 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.2;
}

.quote-section h3 {
  padding-bottom: 8px;
  border-bottom: 1px solid #e7edf5;
}

.quote-table-wrap.removed .detail-table {
  min-width: 900px;
  box-shadow: none;
}

.quote-extra-list,
.quote-compact-list,
.extra-product-list {
  display: grid;
  gap: 7px;
}

.quote-extra-item,
.quote-list-row,
.extra-product-admin-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 32px;
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.quote-list-row {
  grid-template-columns: 32px 120px minmax(0, 1fr) auto;
  background: #fff1f2;
}

.quote-extra-item div,
.extra-product-admin-item div {
  min-width: 0;
  display: flex;
  gap: 8px;
  align-items: baseline;
}

.quote-extra-item strong,
.quote-list-row strong,
.extra-product-admin-item strong {
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-extra-item span,
.quote-list-row span,
.extra-product-admin-item span {
  min-width: 0;
  color: #475569;
  font-weight: 800;
}

.quote-extra-item div span,
.quote-list-row span,
.extra-product-admin-item div span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
}

.quote-list-row em {
  color: #be123c;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.quote-extra-item > span {
  color: #0f766e;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.no-detail.compact {
  padding: 12px;
  font-size: 13px;
}

.extra-product-admin {
  margin-bottom: 16px;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.campaign-admin {
  margin-bottom: 16px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.campaign-admin-head,
.campaign-item-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.campaign-admin-head h3 {
  margin: 0;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.2;
}

.campaign-admin-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.campaign-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
}

.campaign-toolbar select {
  width: min(360px, 46vw);
}

.campaign-form-grid {
  display: grid;
  grid-template-columns: 160px 1fr 1fr 150px;
  gap: 10px;
  margin-bottom: 10px;
}

.campaign-form-grid label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: #344054;
  font-size: 12px;
  font-weight: 900;
}

.campaign-form-grid input,
.campaign-form-grid select,
.campaign-form-grid textarea,
.campaign-toolbar select,
.campaign-item-tools select {
  width: 100%;
  min-width: 0;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0 10px;
  color: #111827;
  background: #fff;
  font-weight: 800;
  outline: none;
}

.campaign-form-grid input,
.campaign-form-grid select,
.campaign-toolbar select,
.campaign-item-tools select {
  height: 34px;
}

.campaign-form-grid textarea {
  min-height: 58px;
  padding-top: 8px;
  resize: vertical;
}

.campaign-form-grid input:focus,
.campaign-form-grid select:focus,
.campaign-form-grid textarea:focus,
.campaign-toolbar select:focus,
.campaign-item-tools select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(16, 150, 125, .16);
}

.campaign-wide {
  grid-column: span 2;
}

.campaign-item-list {
  display: grid;
  gap: 7px;
}

.campaign-item-row {
  display: grid;
  grid-template-columns: 28px 118px minmax(0, 1fr) 80px 120px;
  gap: 8px;
  align-items: center;
  padding: 8px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.campaign-item-row strong {
  color: #111827;
  font-size: 13px;
}

.campaign-item-row span {
  min-width: 0;
  overflow: hidden;
  color: #475569;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 800;
}

.campaign-item-row input {
  width: 100%;
  height: 30px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  padding: 0 8px;
  text-align: right;
  font-weight: 900;
}

.campaign-item-row input:disabled {
  color: #64748b;
  background: #e2e8f0;
}

.campaign-detail-note {
  margin: 10px 0 0;
  padding: 10px 12px;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 800;
}

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

.extra-product-form {
  display: flex;
  gap: 8px;
}

.extra-product-form input {
  width: 180px;
  height: 34px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0 10px;
  font-weight: 800;
  outline: none;
  text-transform: uppercase;
}

#labor-add-name {
  width: 260px;
}

.extra-product-form select {
  width: 112px;
  height: 34px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0 8px;
  color: #111827;
  background: #fff;
  font-weight: 800;
  outline: none;
}

.extra-product-form input:focus,
.extra-product-form select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(16, 150, 125, .16);
}

.extra-product-form .labor-save-btn {
  height: 34px;
}

.detail-total td {
  font-size: 18px;
  font-weight: 900;
  border-top: 2px solid #009879;
  background: #f0fdfa;
}

.no-detail {
  margin: 0;
  padding: 20px;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
}

.labor-body {
  overflow: auto;
  padding: 18px;
}

.password-panel {
  width: min(380px, 100%);
  display: grid;
  gap: 12px;
  margin: 20px auto;
  padding: 18px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.password-panel label {
  display: grid;
  gap: 6px;
  color: #334155;
  font-weight: 800;
}

.password-panel input,
.labor-price-input {
  width: 100%;
  height: 38px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0 10px;
  outline: none;
  font-weight: 800;
}

.password-panel input:focus,
.labor-price-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(16, 150, 125, .16);
}

.labor-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--muted);
  font-weight: 800;
}

.labor-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.labor-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
  background: #fff;
  font-size: 14px;
}

.labor-table th {
  background: #0f766e;
  color: #fff;
  text-align: left;
}

.labor-table th,
.labor-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: top;
}

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

.labor-table .right {
  text-align: right;
  white-space: nowrap;
}

.labor-name {
  font-weight: 800;
}

.labor-table small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-weight: 700;
}

.labor-price-input {
  max-width: 130px;
}

.labor-save-btn {
  height: 34px;
  border: 0;
  border-radius: 6px;
  padding: 0 12px;
  color: #fff;
  background: #2563eb;
  cursor: pointer;
  font-weight: 800;
}

.labor-save-btn:disabled {
  opacity: .55;
  cursor: wait;
}

.labor-message {
  min-height: 20px;
  margin: 8px 0 0;
  color: var(--price);
  font-weight: 800;
}

.extra-candidate-list {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.extra-candidate-list button {
  width: 100%;
  min-height: 34px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 7px 10px;
  color: #0f172a;
  background: #fff;
  cursor: pointer;
  text-align: left;
  font-weight: 800;
}

.extra-candidate-list button:hover {
  border-color: var(--accent);
  background: #f0fdfa;
}

.offer-shell {
  width: min(980px, calc(100% - 28px));
  margin: 0 auto;
  padding: 22px 0 44px;
}

.offer-head,
.offer-summary,
.offer-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.offer-head {
  display: grid;
  justify-items: center;
  padding: 18px;
  text-align: center;
}

.offer-head p,
.offer-head h1 {
  margin: 0;
}

.offer-head p {
  color: var(--muted);
  font-weight: 900;
}

.offer-head h1 {
  margin-top: 5px;
  font-size: 28px;
  line-height: 1.2;
}

.offer-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
  margin-top: 10px;
  color: #334155;
  font-weight: 800;
}

.offer-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin-top: 14px;
  padding: 16px 18px;
}

.offer-package-info {
  min-width: 0;
  align-self: stretch;
  display: grid;
  justify-items: center;
  place-content: center;
  text-align: center;
}

.offer-summary span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.offer-summary strong {
  display: block;
  margin-top: 4px;
  color: var(--price);
  font-size: 30px;
  line-height: 1;
}

.offer-package-name {
  display: block;
  margin-top: 4px;
  color: #0f172a;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 900;
}

.offer-discounts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
}

.offer-discounts span {
  padding: 5px 8px;
  color: #0f172a;
  background: #e0f2fe;
  border-radius: 6px;
}

.offer-section {
  margin-top: 14px;
  overflow: hidden;
}

.offer-section h2 {
  margin: 0;
  padding: 14px 16px;
  font-size: 18px;
  line-height: 1.2;
  border-bottom: 1px solid var(--line);
}

.offer-table-wrap {
  overflow: auto;
}

.offer-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: #fff;
  font-size: 14px;
}

.offer-table th {
  color: #fff;
  background: #0f766e;
  text-align: center;
}

.offer-table th,
.offer-table td {
  padding: 11px 12px;
  border-bottom: 1px solid #e2e8f0;
  text-align: center;
  vertical-align: middle;
}

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

.offer-table .right {
  text-align: center;
  white-space: nowrap;
}

.offer-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 6px;
  color: #047857;
  background: #d1fae5;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.offer-removed-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 14px 16px 16px;
  list-style: none;
}

.offer-removed-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  color: #64748b;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-radius: 8px;
  font-weight: 800;
}

.offer-error {
  width: min(560px, calc(100% - 28px));
  margin: 48px auto;
  padding: 22px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  font-weight: 900;
}

/* Modern compact layout */
:root {
  --bg: #f3f6fa;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --text: #111827;
  --muted: #667085;
  --line: #dce3ec;
  --accent: #0f9f86;
  --accent-dark: #087363;
  --price: #d7194a;
  --shadow: 0 10px 28px rgba(16, 24, 40, .10);
  --shadow-soft: 0 6px 18px rgba(16, 24, 40, .07);
}

body {
  background: linear-gradient(180deg, #f7fafc 0%, #eef3f8 100%);
}

.page-shell {
  width: min(1320px, calc(100% - 28px));
  padding: 10px 0 34px;
}

.title-band {
  padding: 28px 140px 14px 0;
  text-align: left;
}

.title-band h2 {
  font-size: 30px;
  letter-spacing: 0;
}

.title-band p {
  margin-top: 5px;
  font-size: 13px;
}

.top-actions {
  top: 18px;
  right: 0;
}

.admin-open-btn {
  width: 38px;
  min-width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  padding: 0;
  color: #fff;
  background: #111827;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  font-weight: 900;
  justify-self: end;
}

.admin-open-btn::before {
  content: "\270E";
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  color: #111827;
  background: #fff;
  border-radius: 50%;
  font-size: 12px;
  line-height: 1;
}

.admin-open-btn.is-loading::before {
  content: "\21bb";
}

.admin-open-btn:hover {
  background: #0f766e;
}

.admin-open-btn:disabled {
  opacity: .68;
  cursor: wait;
}

.filter-strip {
  grid-template-columns: minmax(132px, .6fr) repeat(5, minmax(96px, 1fr)) 76px 38px;
  gap: 8px;
  padding: 8px;
  border-radius: 10px;
  box-shadow: var(--shadow-soft);
}

.filter-strip select,
.filter-strip input,
.reset-btn {
  height: 34px;
  border-radius: 7px;
  font-size: 13px;
}

.package-grid {
  grid-template-columns: repeat(auto-fill, minmax(246px, 1fr));
  gap: 14px;
  padding-top: 16px;
}

.package-card {
  min-height: 318px;
  grid-template-rows: 58px auto auto 1fr auto auto;
  gap: 6px;
  padding: 13px;
  border-radius: 10px;
  box-shadow: var(--shadow-soft);
}

.package-image {
  height: 56px;
}

.package-family {
  font-size: 16px;
}

.package-title {
  font-size: 18px;
  line-height: 1.2;
}

.package-specs {
  gap: 3px;
  font-size: 13px;
  color: #344054;
}

.package-price {
  font-size: 24px;
}

.detail-btn {
  width: 100%;
  height: 38px;
  border-radius: 8px;
  background: #0f766e;
  box-shadow: none;
  font-size: 15px;
}

.modal-backdrop {
  padding: 18px;
  background: rgba(17, 24, 39, .56);
}

.detail-modal,
.labor-modal {
  width: min(1324px, 100%);
  max-height: min(88vh, 820px);
  border-radius: 12px;
  box-shadow: 0 28px 80px rgba(16, 24, 40, .34);
}

.labor-modal {
  width: min(1180px, 100%);
}

.detail-head {
  min-height: 0;
  padding: 9px 12px;
  background: #fff;
}

.detail-head p {
  margin-bottom: 3px;
  font-size: 12px;
}

.detail-head h2 {
  font-size: 20px;
}

.close-btn,
.quote-link-btn,
.quote-reset-btn {
  height: 34px;
  border-radius: 8px;
}

.close-btn {
  padding: 0 14px;
  background: #0f766e;
  font-size: 13px;
}

.quote-link-btn {
  width: 34px;
  box-shadow: none;
}

.quote-reset-btn {
  padding: 0 12px;
  font-size: 12px;
}

.quote-copy-status {
  font-size: 12px;
}

.detail-body,
.labor-body {
  padding: 12px;
  background: #f7f9fc;
}

.quote-discount-toolbar {
  gap: 7px;
  margin-bottom: 10px;
}

.quote-discount-groups,
.quote-age-presets {
  gap: 7px;
}

.quote-discount-main,
.quote-age-presets button {
  min-width: 94px;
  height: 32px;
  border-radius: 8px;
  font-size: 12px;
}

.quote-discount-options {
  min-width: 94px;
  border-radius: 8px;
}

.quote-discount-options button,
.quote-discount-options span {
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 900;
}

.quote-discount-options span {
  color: var(--muted);
  background: #f2f4f7;
}

.detail-table,
.labor-table,
.offer-table {
  font-size: 13px;
  box-shadow: none;
}

.detail-table {
  min-width: 1010px;
}

.detail-table th,
.labor-table th,
.offer-table th {
  background: #111827;
}

.detail-table th,
.detail-table td,
.labor-table th,
.labor-table td,
.offer-table th,
.offer-table td {
  padding: 9px 10px;
}

.detail-total td {
  font-size: 15px;
  background: #ecfdf3;
  border-top-color: #10b981;
}

.quote-row-btn,
.quote-add-btn {
  width: 26px;
  height: 26px;
  font-size: 18px;
}

.quote-panels {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.quote-section h3,
.extra-product-head h3,
.discount-admin-head h3 {
  margin: 0;
  font-size: 15px;
}

.quote-extra-item,
.quote-list-row,
.extra-product-admin-item {
  min-height: 42px;
  padding: 8px;
  border-radius: 8px;
  background: #fff;
}

.quote-extra-item {
  grid-template-columns: minmax(0, 1fr) auto 28px;
}

.quote-list-row {
  grid-template-columns: 28px 96px minmax(0, 1fr) auto;
}

.extra-product-admin,
.discount-admin,
.campaign-admin {
  margin-bottom: 12px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-soft);
}

.settings-admin {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-soft);
}

.settings-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #0f172a;
  font-size: 14px;
  font-weight: 900;
}

.settings-toggle input {
  width: 18px;
  height: 18px;
  accent-color: #2563eb;
}

.discount-admin-head,
.extra-product-head,
.campaign-admin-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.discount-admin-head span,
.campaign-admin-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.discount-admin-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.discount-admin-card {
  min-width: 0;
  display: grid;
  gap: 9px;
  padding: 10px;
  background: #f7f9fc;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.discount-admin-title {
  display: grid;
  gap: 2px;
}

.discount-admin-title strong {
  color: #111827;
  font-size: 14px;
}

.discount-admin-title span {
  min-height: 16px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 800;
}

.discount-chip-list {
  min-height: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.discount-chip {
  height: 28px;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  border: 1px solid #badbcc;
  border-radius: 999px;
  padding: 0 8px;
  color: #065f46;
  background: #ecfdf3;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.discount-chip span {
  color: #be123c;
}

.discount-chip.fixed {
  cursor: default;
  color: #344054;
  background: #eef2f6;
  border-color: #d0d5dd;
}

.quantity-control {
  display: inline-grid;
  grid-template-columns: 24px minmax(28px, auto) 24px;
  gap: 4px;
  align-items: center;
  justify-content: end;
}

.quantity-control button {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 6px;
  color: #fff;
  background: #111827;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  font-weight: 900;
}

.quantity-control span {
  min-width: 24px;
  color: #111827;
  text-align: center;
  font-weight: 900;
}

.quantity-control button:hover {
  background: #0f766e;
}

.package-total-edit {
  width: 148px;
  display: inline-grid;
  gap: 5px;
  justify-items: end;
}

.package-list-total,
.package-discount-total {
  min-width: 132px;
  display: inline-grid;
  gap: 3px;
  justify-items: end;
  padding-right: 4px;
}

.package-list-total small,
.package-discount-total small {
  font-size: 10px;
  line-height: 1.2;
  font-weight: 900;
  white-space: nowrap;
}

.package-list-total small {
  color: #475467;
}

.package-discount-total small {
  color: #0f766e;
}

.package-list-total b,
.package-discount-total b {
  font-size: 13px;
  line-height: 1.1;
  font-weight: 900;
  white-space: nowrap;
}

.package-list-total b {
  color: #111827;
}

.package-discount-total b {
  color: #be123c;
}

.package-total-edit input {
  width: 148px;
  height: 30px;
  border: 1px solid #bfdbfe;
  border-radius: 7px;
  padding: 0 8px;
  color: #1e3a8a;
  background: #eff6ff;
  text-align: right;
  font-size: 12px;
  font-weight: 900;
  outline: none;
}

.package-total-edit input:focus {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, .14);
}

.package-total-edit small {
  color: #1d4ed8;
  font-size: 10px;
  line-height: 1.2;
  font-weight: 900;
  white-space: nowrap;
}

.price-main {
  display: block;
  width: fit-content;
  margin: 0 auto;
  padding: 6px 10px;
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
}

.price-rounding,
.rounding-inline,
.offer-rounding {
  display: block;
  margin-top: 4px;
  color: #667085;
  font-size: 11px;
  line-height: 1.25;
  font-weight: 800;
}

.rounding-inline {
  margin-top: 0;
  color: #0f172a;
  white-space: normal;
}

.offer-rounding {
  color: #475467;
}

.offer-total-area {
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  gap: 14px;
  text-align: right;
}

.offer-list-price,
.offer-saving,
.offer-total-main {
  width: 158px;
  min-height: 86px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 8px;
  text-align: center;
}

.offer-list-price {
  background: #fff7ed;
  border: 1px solid #fed7aa;
}

.offer-saving {
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
}

.offer-total-main {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.offer-list-price span,
.offer-saving span,
.offer-total-main span {
  font-size: 12px;
}

.offer-list-price span {
  color: #9a3412;
}

.offer-saving span {
  color: #047857;
}

.offer-total-main span {
  color: #1d4ed8;
}

.offer-list-price b,
.offer-saving b,
.offer-total-main strong {
  display: block;
  color: #111827;
  font-size: 17px;
  line-height: 1.1;
  font-weight: 900;
  white-space: nowrap;
}

.offer-total-main .offer-rounding {
  margin-top: 0;
  color: #1e40af;
  font-size: 11px;
  line-height: 1.15;
}

.discount-add-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
}

.discount-add-form input,
.extra-product-form input,
.extra-product-form select,
.password-panel input,
.labor-price-input {
  height: 34px;
  border-radius: 8px;
  font-size: 13px;
}

.labor-save-btn {
  height: 34px;
  border-radius: 8px;
  background: #111827;
  font-size: 12px;
}

.labor-tools {
  margin-bottom: 10px;
  padding: 0 2px;
  font-size: 12px;
}

.labor-table-wrap,
.quote-table-wrap {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.password-panel {
  border-radius: 10px;
  box-shadow: var(--shadow-soft);
}

.labor-modal {
  width: min(960px, 100%);
  border: 1px solid rgba(220, 227, 236, .95);
}

.labor-modal .detail-head {
  align-items: center;
  padding: 18px 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.labor-modal .detail-head > div {
  display: grid;
  gap: 3px;
}

.labor-modal .detail-head p {
  color: #0f766e;
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.labor-modal .detail-head h2 {
  color: #0f172a;
  font-size: 22px;
}

.labor-body {
  padding: 22px;
  background: #f7f9fc;
}

.password-panel {
  width: min(520px, 100%);
  gap: 14px;
  margin: 28px auto;
  padding: 22px;
  background: #fff;
  border-color: #dce3ec;
}

.password-panel label {
  gap: 7px;
}

.password-panel label span {
  color: #334155;
  font-size: 13px;
}

.password-panel input {
  height: 42px;
  text-align: center;
  font-size: 18px;
  letter-spacing: 2px;
}

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

.password-actions .detail-btn,
.refresh-prices-btn {
  width: 100%;
  height: 42px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}

.password-actions .detail-btn {
  justify-self: stretch;
  background: #0f766e;
  box-shadow: none;
}

.price-refresh-meta {
  min-height: 18px;
  margin: 0;
  padding: 8px 10px;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  text-align: center;
  font-size: 12px;
  line-height: 1.25;
  font-weight: 900;
}

.refresh-prices-btn {
  color: #fff;
  background: #1d4ed8;
}

.refresh-prices-btn:hover,
.password-actions .detail-btn:hover {
  filter: brightness(1.04);
}

.refresh-prices-btn:disabled {
  opacity: .62;
  cursor: wait;
}

.labor-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.labor-tools span {
  min-width: 0;
  overflow: hidden;
  color: #475569;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 900;
}

.labor-tools .refresh-prices-btn {
  width: auto;
  min-width: 142px;
  height: 34px;
}

.modal-backdrop {
  backdrop-filter: blur(8px);
}

.labor-modal {
  width: min(640px, calc(100% - 28px));
  max-height: min(720px, calc(100vh - 36px));
  border: 1px solid rgba(226, 232, 240, .92);
  border-radius: 14px;
  box-shadow: 0 30px 90px rgba(15, 23, 42, .32);
}

.labor-modal:has(.labor-editor:not([hidden])) {
  width: min(1180px, calc(100% - 28px));
  max-height: min(86vh, 840px);
}

.labor-modal .detail-head {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 18px 20px;
  background: #fff;
  border-bottom: 1px solid #e7edf5;
}

.labor-modal .detail-head > div {
  justify-items: start;
}

.labor-modal .detail-head p {
  color: #64748b;
  font-size: 11px;
  letter-spacing: .06em;
}

.labor-modal .detail-head h2 {
  font-size: 23px;
  letter-spacing: 0;
}

.labor-modal .close-btn {
  position: relative;
  width: 38px;
  height: 38px;
  padding: 0;
  overflow: hidden;
  color: transparent;
  background: #f1f5f9;
}

.labor-modal .close-btn::before,
.labor-modal .close-btn::after {
  content: "";
  position: absolute;
  width: 15px;
  height: 2px;
  background: #0f172a;
  border-radius: 999px;
}

.labor-modal .close-btn::before {
  transform: rotate(45deg);
}

.labor-modal .close-btn::after {
  transform: rotate(-45deg);
}

.labor-modal .close-btn:hover {
  background: #e2e8f0;
}

.labor-body {
  padding: 24px;
  background: #f6f8fb;
}

.password-panel {
  width: min(460px, 100%);
  gap: 12px;
  margin: 12px auto 4px;
  padding: 22px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .08);
}

.password-panel input {
  height: 44px;
  border-color: #d7dee8;
  border-radius: 9px;
  background: #fbfdff;
}

.password-actions {
  gap: 9px;
}

.password-actions .detail-btn,
.refresh-prices-btn {
  height: 40px;
  border-radius: 9px;
}

.price-refresh-meta {
  padding: 9px 10px;
  background: #f8fafc;
  border-color: #e7edf5;
}

.labor-tools {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) auto;
  padding: 12px;
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .05);
}

.offer-shell {
  width: min(1040px, calc(100% - 28px));
}

.offer-head,
.offer-summary,
.offer-section {
  border-radius: 10px;
  box-shadow: var(--shadow-soft);
}

.quote-panels {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.quote-extra-list,
.quote-compact-list {
  gap: 6px;
}

.quote-extra-item,
.quote-list-row {
  min-height: 36px;
  padding: 7px 8px;
}

.quote-extra-item div span,
.quote-list-row span {
  font-size: 12px;
}

.quote-section h3 {
  margin-bottom: 7px;
  font-size: 14px;
}

@media (max-width: 1040px) {
  .filter-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr)) 38px;
  }

  .reset-btn {
    grid-column: 1 / 3;
  }

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

}

@media (max-width: 768px) {
  .kws-root,
  .kws-image-modal {
    display: none !important;
  }
}

@media (max-width: 700px) {
  .page-shell {
    width: min(100% - 18px, 1240px);
  }

  .title-band h2 {
    font-size: 32px;
  }

  .filter-strip {
    position: static;
    grid-template-columns: 1fr;
  }

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

  .package-card {
    min-height: 360px;
  }

  .modal-backdrop {
    padding: 10px;
  }

  .detail-modal {
    max-height: calc(100vh - 20px);
  }

  .detail-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .detail-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .quote-copy-status {
    max-width: min(100%, 210px);
  }

  .quote-panels {
    grid-template-columns: 1fr;
  }

  .offer-summary {
    grid-template-columns: 1fr;
  }

  .offer-total-area {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .offer-total-main {
    min-width: 0;
  }

  .extra-product-form {
    width: 100%;
  }

  .extra-product-form input,
  .extra-product-form select {
    width: 100%;
  }

  .kws-root,
  .kws-image-modal {
    display: none !important;
  }
}

@media (max-width: 980px) {
  .filter-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr)) 38px;
  }

  .reset-btn {
    grid-column: 1 / 3;
  }

  .discount-admin-list {
    grid-template-columns: 1fr;
  }

  .campaign-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-package-toolbar {
    grid-template-columns: 1fr;
  }

  .package-editor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .campaign-item-row {
    grid-template-columns: 28px 104px minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 16px, 1320px);
    padding-top: 8px;
  }

  .filter-strip {
    position: static;
    grid-template-columns: 1fr 38px;
    border-radius: 10px;
  }

  .filter-strip label {
    grid-column: 1 / -1;
  }

  .reset-btn {
    grid-column: 1;
  }

  .admin-open-btn {
    grid-column: 2;
  }

  .package-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .package-card {
    min-height: 286px;
  }

  .modal-backdrop {
    padding: 8px;
  }

  .detail-modal,
  .labor-modal {
    max-height: calc(100vh - 16px);
    border-radius: 10px;
  }

  .labor-body {
    padding: 14px;
  }

  .password-panel {
    margin: 10px auto;
    padding: 16px;
  }

  .password-actions,
  .labor-tools {
    grid-template-columns: 1fr;
  }

  .labor-tools .refresh-prices-btn {
    width: 100%;
  }

  .detail-head {
    gap: 10px;
    align-items: stretch;
    flex-direction: column;
  }

  .detail-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .quote-copy-status {
    max-width: 100%;
    flex: 1 1 auto;
  }

  .quote-discount-toolbar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .quote-discount-groups,
  .quote-age-presets {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-left: 0;
  }

  .quote-discount-main,
  .quote-age-presets button {
    width: 100%;
    min-width: 0;
  }

  .extra-product-form,
  .discount-add-form {
    width: 100%;
  }

  .campaign-admin-head,
  .campaign-item-tools,
  .campaign-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .campaign-toolbar select,
  .campaign-form-grid,
  .campaign-item-tools select {
    width: 100%;
  }

  .package-editor-grid {
    grid-template-columns: 1fr;
  }

  .package-editor-grid .wide {
    grid-column: 1;
  }

  .package-editor-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .package-editor-actions .labor-save-btn,
  .package-editor-actions .quote-row-btn {
    width: 100%;
  }

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

  .campaign-item-row {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .campaign-item-row strong,
  .campaign-item-row span,
  .campaign-item-row input {
    grid-column: 2;
  }

  .quote-list-row {
    grid-template-columns: 28px minmax(0, 1fr) auto;
  }

  .quote-list-row strong {
    display: none;
  }
}

/* Role based management */
body {
  background: #eef1f4;
}

.page-shell {
  width: min(1380px, calc(100% - 28px));
}

.app-topbar {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 8px 2px;
}

.app-brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: #101828;
  text-decoration: none;
}

.app-brand-logo {
  flex: 0 0 auto;
  width: 74px;
  max-width: 116px;
  height: 44px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #d8dee8;
  border-radius: 8px;
  background: #fff;
}

.app-brand-logo img {
  display: block;
  width: 100%;
  height: 100%;
  padding: 4px;
  object-fit: contain;
  object-position: center;
}

.app-brand-copy,
.session-actions {
  min-width: 0;
  display: flex;
  align-items: center;
}

.app-brand-copy {
  align-items: flex-start;
  flex-direction: column;
  gap: 2px;
}

.app-brand strong {
  font-size: 18px;
  line-height: 1.15;
}

.app-brand small,
.session-user {
  color: #667085;
  font-size: 12px;
}

.session-actions {
  justify-content: flex-end;
  gap: 12px;
}

.guest-access-copy {
  max-width: 320px;
  color: #667085;
  font-size: 12px;
  line-height: 1.35;
  text-align: right;
}

.session-user {
  max-width: 340px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.admin-open-btn {
  width: auto;
  min-width: 104px;
  height: 38px;
  gap: 8px;
  padding: 0 14px;
  border-radius: 8px;
}

.admin-open-btn::before {
  content: "\2630";
  color: #fff;
  background: transparent;
  border-radius: 0;
  font-size: 16px;
}

.admin-open-btn span {
  color: #fff;
  font-size: 13px;
}

.access-notice {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 2px 0 10px;
  padding: 10px 12px 10px 16px;
  border: 1px solid #cdd7e4;
  border-left: 4px solid #d97706;
  border-radius: 8px;
  background: #fff;
}

.access-notice div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.access-notice strong {
  color: #1d2939;
}

.access-notice span {
  color: #667085;
  font-size: 13px;
}

.access-notice button {
  flex: 0 0 auto;
  height: 34px;
  padding: 0 15px;
  color: #fff;
  border: 0;
  border-radius: 7px;
  background: #0f766e;
  cursor: pointer;
  font-weight: 800;
}

.filter-strip {
  grid-template-columns: minmax(150px, .7fr) repeat(5, minmax(98px, 1fr)) 76px;
}

.is-guest .filter-strip {
  grid-template-columns: minmax(220px, 1fr);
}

.is-guest .filter-strip label:not(.filter-search-field),
.is-guest .filter-strip .reset-btn {
  display: none;
}

.package-card,
.package-card-special {
  border-radius: 8px;
  background: #fff;
}

.package-card-guest {
  min-height: 210px;
  grid-template-rows: 78px auto 1fr;
  align-content: start;
}

.package-card-guest .package-image {
  height: 76px;
}

.package-card-guest .package-title {
  align-self: start;
}

.detail-modal {
  width: min(1390px, 100%);
}

.management-modal:has(.management-layout:not([hidden])) {
  width: min(1480px, calc(100% - 18px));
  height: min(94vh, 940px);
  max-height: min(94vh, 940px);
}

.management-modal .management-head {
  flex: 0 0 auto;
  min-height: 68px;
}

.management-body {
  min-height: 0;
}

.management-modal:has(.management-layout:not([hidden])) .management-body {
  height: 100%;
  padding: 0;
  overflow: hidden;
}

.auth-panel {
  width: min(440px, 100%);
  gap: 14px;
  border-radius: 8px;
}

.auth-panel-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 6px;
}

.auth-panel-mark {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  color: #fff;
  border: 1px solid #0f766e;
  border-radius: 8px;
  background: #0f766e;
  font-size: 16px;
  font-weight: 900;
}

.auth-panel-brand div {
  display: grid;
  gap: 3px;
}

.auth-panel-brand strong {
  color: #101828;
  font-size: 20px;
}

.auth-panel-brand span {
  color: #667085;
  font-size: 13px;
}

.auth-submit {
  margin-top: 2px;
}

.auth-panel {
  padding: 26px;
  border-top: 4px solid #0f766e;
  box-shadow: 0 20px 46px rgba(15, 23, 42, .12);
}

.auth-panel label {
  gap: 7px;
}

.auth-panel label > span {
  color: #344054;
  font-size: 12px;
  font-weight: 800;
}

.auth-panel input {
  height: 46px;
  padding: 0 13px;
  text-align: left;
  letter-spacing: 0;
  font-size: 15px;
}

.auth-panel input:focus {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, .14);
}

.auth-panel .auth-submit {
  width: 100%;
  min-height: 44px;
  justify-content: center;
  border-radius: 7px;
}

.management-layout {
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  background: #fff;
}

.management-nav {
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 18px 12px 14px;
  color: #f8fafc;
  background: #182230;
  border-right: 1px solid #344054;
}

.management-user-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 3px 5px 18px;
  border-bottom: 1px solid #344054;
}

.management-user-card > span {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: #102a26;
  border-radius: 50%;
  background: #99f6e4;
  font-size: 13px;
  font-weight: 900;
}

.management-user-card div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.management-user-card strong,
.management-user-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.management-user-card small {
  color: #98a2b3;
  font-size: 11px;
}

.management-nav nav {
  display: grid;
  gap: 4px;
  padding-top: 14px;
}

.management-nav nav button,
.management-logout {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  color: #d0d5dd;
  border: 0;
  border-radius: 7px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-size: 13px;
  font-weight: 800;
}

.management-nav nav button:hover,
.management-nav nav button.active {
  color: #fff;
  background: #344054;
}

.management-nav nav button.active {
  box-shadow: inset 3px 0 0 #2dd4bf;
}

.management-logout {
  margin-top: auto;
  color: #fecaca;
  border: 1px solid #475467;
  text-align: center;
}

.management-logout:hover {
  color: #fff;
  border-color: #f87171;
  background: #7f1d1d;
}

.management-content {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  background: #f7f8fa;
}

.management-panel {
  width: 100%;
  min-height: 100%;
  padding: 22px;
}

.management-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #dfe4eb;
}

.management-section-head div {
  min-width: 0;
}

.management-section-head h3,
.management-section-head p {
  margin: 0;
}

.management-section-head h3 {
  color: #101828;
  font-size: 20px;
}

.management-section-head p {
  margin-top: 4px;
  color: #667085;
  font-size: 13px;
}

.management-section-head .refresh-prices-btn {
  width: auto;
  min-width: 170px;
  padding: 0 16px;
}

.management-modal .close-btn::before,
.management-modal .close-btn::after {
  top: 50%;
  left: 50%;
  margin: -1px 0 0 -8px;
}

.management-panel .labor-tools {
  margin: 14px 0 0;
}

.management-panel .settings-admin,
.management-panel .discount-admin,
.management-panel .extra-product-admin,
.management-panel .campaign-admin,
.management-panel .labor-table-wrap {
  margin-top: 14px;
  border-radius: 8px;
  box-shadow: none;
}

.price-refresh-progress {
  position: relative;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-top: 14px;
  padding: 14px;
  overflow: hidden;
  border: 1px solid #9ad9cf;
  border-radius: 8px;
  background: #effcf8;
}

.price-refresh-visual {
  width: 48px;
  height: 38px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
}

.price-refresh-visual span {
  width: 7px;
  height: 14px;
  border-radius: 3px 3px 0 0;
  background: #0f9f86;
  animation: price-bars 1s ease-in-out infinite;
}

.price-refresh-visual span:nth-child(2) {
  height: 26px;
  animation-delay: .14s;
}

.price-refresh-visual span:nth-child(3) {
  height: 20px;
  animation-delay: .28s;
}

@keyframes price-bars {
  0%, 100% { transform: scaleY(.55); opacity: .55; }
  50% { transform: scaleY(1); opacity: 1; }
}

.price-refresh-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.price-refresh-copy strong {
  color: #115e59;
}

.price-refresh-copy span {
  color: #37645e;
  font-size: 12px;
}

.price-refresh-meter {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 4px;
  background: #ccebe5;
}

.price-refresh-meter i {
  display: block;
  width: 0;
  height: 100%;
  background: #0f9f86;
  transition: width .35s ease;
}

.price-refresh-progress > b {
  color: #0f766e;
  font-size: 16px;
}

.price-refresh-progress.completed {
  border-color: #86c8a2;
  background: #f0fdf4;
}

.price-refresh-progress.completed .price-refresh-visual span {
  animation: none;
  background: #15803d;
}

.price-refresh-progress.failed {
  border-color: #f1a7a7;
  background: #fff5f5;
}

.price-refresh-progress.failed .price-refresh-visual span {
  animation: none;
  background: #dc2626;
}

.company-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.company-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 72px minmax(0, 1.6fr) minmax(150px, .7fr) auto;
  gap: 12px;
  align-items: center;
  padding: 11px;
  border: 1px solid #dce3ec;
  border-radius: 8px;
  background: #fff;
}

.company-row.inactive,
.management-table tr.inactive {
  opacity: .6;
}

.company-logo-frame {
  width: 72px;
  height: 48px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #e4e7ec;
  border-radius: 6px;
  background: #fff;
}

.company-logo-frame img {
  display: block;
  width: 100%;
  height: 100%;
  padding: 4px;
  object-fit: contain;
  object-position: center;
}

.company-logo-frame b {
  color: #0f766e;
  font-size: 14px;
}

.company-row-main,
.company-row-stats {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.company-row-main strong,
.company-row-main span,
.company-row-main small,
.company-row-stats span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.company-row-main span {
  color: #475467;
  font-size: 12px;
}

.company-row-main small,
.company-row-stats small {
  color: #667085;
  font-size: 11px;
}

.management-row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  white-space: nowrap;
}

.table-action.danger {
  color: #b42318;
  border-color: #f1b8b2;
  background: #fff7f6;
}

.table-action.danger:hover {
  color: #fff;
  border-color: #b42318;
  background: #b42318;
}

.package-management-search {
  display: block;
  margin: 14px 0 10px;
}

.package-management-list {
  display: grid;
  gap: 7px;
}

.package-management-row {
  min-width: 0;
  min-height: 58px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 152px 100px 72px;
  gap: 12px;
  align-items: center;
  padding: 9px 11px;
  color: #101828;
  border: 1px solid #dce3ec;
  border-radius: 7px;
  background: #fff;
  cursor: pointer;
  text-align: left;
}

.package-management-row:hover {
  border-color: #86bfb6;
  background: #f5fbfa;
}

.package-management-copy,
.package-management-price {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.package-management-copy strong,
.package-management-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.package-management-copy small {
  color: #667085;
  font-size: 11px;
}

.package-management-id {
  display: grid;
  place-items: center;
  width: 48px;
  height: 34px;
  color: #344054;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  background: #f9fafb;
  font-size: 12px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.package-management-price {
  justify-items: end;
  text-align: right;
}

.package-management-price small {
  color: #667085;
  font-size: 10px;
}

.package-management-price strong {
  color: #101828;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.package-management-row > b {
  color: #475467;
  font-size: 11px;
  text-align: center;
}

.package-management-row > em {
  color: #0f766e;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  text-align: right;
}

.product-catalog-search {
  width: min(360px, 42vw);
}

.product-scope-toolbar {
  display: grid;
  grid-template-columns: minmax(130px, 1.15fr) repeat(4, minmax(105px, 1fr)) auto;
  gap: 10px;
  align-items: end;
  margin-top: 14px;
}

.product-scope-toolbar label,
.product-bulk-fields label {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.product-scope-toolbar label > span,
.product-bulk-fields label > span,
.product-selected > span {
  color: #475467;
  font-size: 11px;
  font-weight: 800;
}

.product-scope-toolbar select,
.product-bulk-fields input {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  color: #101828;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  outline: none;
  font-weight: 800;
}

.product-scope-toolbar select:focus,
.product-bulk-fields input:focus {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, .12);
}

.product-scope-result {
  grid-column: 1 / -1;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  color: #475467;
  font-size: 12px;
  font-weight: 800;
}

.product-scope-reset {
  height: 38px;
  margin: 0;
}

.product-bulk-tool {
  display: grid;
  grid-template-columns: minmax(180px, .7fr) minmax(440px, 1.3fr);
  gap: 12px 16px;
  align-items: end;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #fff;
}

.product-selected {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.product-selected strong,
.product-selected small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-selected strong {
  color: #0f766e;
  font-size: 16px;
}

.product-selected small {
  color: #667085;
}

.product-bulk-fields {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(220px, 1.4fr) 92px;
  gap: 10px;
}

.product-bulk-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.product-bulk-actions button,
.product-danger-btn {
  min-height: 36px;
}

.product-danger-btn {
  padding: 0 13px;
  color: #b42318;
  border: 1px solid #f1b8b2;
  border-radius: 6px;
  background: #fff7f6;
  cursor: pointer;
  font-weight: 900;
}

.product-danger-btn:hover {
  color: #fff;
  border-color: #b42318;
  background: #b42318;
}

.product-bulk-actions button:disabled {
  cursor: not-allowed;
  opacity: .48;
}

.product-bulk-message {
  grid-column: 1 / -1;
  min-height: 18px;
  margin: 0;
}

.product-catalog-table-wrap {
  margin-top: 12px;
}

.product-catalog-table {
  min-width: 1200px;
}

.product-catalog-table tr.selected td {
  background: #eaf8f5;
}

.product-catalog-table td strong,
.product-catalog-table td span,
.product-catalog-table td small {
  white-space: nowrap;
}

.product-catalog-table td:nth-child(2) {
  max-width: 360px;
}

.product-catalog-table td:nth-child(2) span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.management-form {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid #cfd7e3;
  border-radius: 8px;
  background: #fff;
}

.management-form.compact {
  margin-bottom: 16px;
}

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

.management-form-grid label {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 6px;
}

.management-form-grid label.wide {
  grid-column: 1 / -1;
}

.management-form-grid label > span,
.management-form legend {
  color: #344054;
  font-size: 12px;
  font-weight: 800;
}

.management-form input,
.management-form select,
.management-form textarea,
.management-search input {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 8px 10px;
  color: #101828;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  outline: none;
  background: #fff;
  font: inherit;
}

.management-form textarea {
  min-height: 78px;
  resize: vertical;
}

.management-form input:focus,
.management-form select:focus,
.management-form textarea:focus,
.management-search input:focus {
  border-color: #0f9f86;
  box-shadow: 0 0 0 3px rgba(15, 159, 134, .14);
}

.management-form small {
  color: #667085;
  font-size: 11px;
}

.management-form fieldset {
  margin: 16px 0;
  padding: 14px;
  border: 1px solid #dce3ec;
  border-radius: 8px;
}

.management-form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

.management-form-actions > span {
  min-width: 0;
  margin-right: auto;
  color: #b42318;
  font-size: 12px;
}

.user-limit-summary {
  margin: 12px 0 8px;
  color: #475467;
  font-size: 12px;
  font-weight: 800;
}

.management-table-wrap {
  width: 100%;
  margin-top: 12px;
  overflow: auto;
  border: 1px solid #dce3ec;
  border-radius: 8px;
  background: #fff;
}

.management-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 12px;
}

.management-table th,
.management-table td {
  padding: 10px;
  border-bottom: 1px solid #edf0f4;
  text-align: left;
  vertical-align: middle;
}

.management-table th {
  color: #475467;
  background: #f8fafc;
  font-size: 11px;
  text-transform: uppercase;
}

.management-table .right {
  text-align: right;
}

.management-table td small {
  display: block;
  margin-top: 3px;
  color: #667085;
}

.status-pill {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.status-pill.active {
  color: #166534;
  background: #dcfce7;
}

.status-pill.inactive {
  color: #991b1b;
  background: #fee2e2;
}

.table-action {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  color: #0f766e;
  border: 1px solid #b7d9d3;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  text-decoration: none;
  font-size: 11px;
  font-weight: 800;
}

.management-search {
  width: min(320px, 42vw);
}

.management-search input {
  min-height: 38px;
}

.management-empty {
  padding: 18px;
  color: #667085;
  text-align: center;
}

.audit-layout {
  min-height: 520px;
  display: grid;
  grid-template-columns: minmax(310px, .8fr) minmax(0, 1.2fr);
  gap: 12px;
  margin-top: 14px;
}

.audit-list,
.audit-detail {
  min-height: 0;
  overflow: auto;
  border: 1px solid #dce3ec;
  border-radius: 8px;
  background: #fff;
}

.audit-list {
  padding: 6px;
}

.audit-entry {
  width: 100%;
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 10px 8px;
  color: #101828;
  border: 0;
  border-bottom: 1px solid #edf0f4;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.audit-entry:hover,
.audit-entry.active {
  background: #edf8f6;
}

.audit-entry-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #667085;
}

.audit-entry-dot.create { background: #16a34a; }
.audit-entry-dot.update { background: #2563eb; }
.audit-entry-dot.delete { background: #dc2626; }
.audit-entry-dot.revert { background: #d97706; }
.audit-entry-dot.refresh { background: #0f766e; }

.audit-entry > span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.audit-entry strong,
.audit-entry small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audit-entry strong {
  font-size: 12px;
}

.audit-entry small,
.audit-entry em {
  color: #667085;
  font-size: 10px;
  font-style: normal;
}

.audit-detail {
  padding: 16px;
}

.audit-detail header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #edf0f4;
}

.audit-detail h4,
.audit-detail header span,
.audit-detail header small {
  margin: 0;
}

.audit-detail header span,
.audit-detail header small {
  color: #667085;
  font-size: 11px;
}

.audit-detail h4 {
  margin-top: 4px;
  font-size: 16px;
}

.audit-detail dl {
  display: grid;
  gap: 7px;
}

.audit-detail dl div {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 8px;
}

.audit-detail dt {
  color: #667085;
  font-size: 11px;
}

.audit-detail dd {
  margin: 0;
  font-size: 12px;
}

.audit-detail details {
  margin-top: 8px;
  border: 1px solid #e4e7ec;
  border-radius: 7px;
}

.audit-detail summary {
  padding: 9px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.audit-detail pre {
  max-height: 240px;
  margin: 0;
  padding: 10px;
  overflow: auto;
  color: #d1fae5;
  background: #182230;
  font: 11px/1.45 ui-monospace, SFMono-Regular, Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

.audit-revert {
  min-height: 38px;
  margin-top: 12px;
  padding: 0 14px;
  color: #fff;
  border: 0;
  border-radius: 7px;
  background: #b42318;
  cursor: pointer;
  font-weight: 800;
}

.audit-reverted,
.audit-success {
  padding: 10px;
  color: #166534;
  border: 1px solid #bbf7d0;
  border-radius: 7px;
  background: #f0fdf4;
}

.announcement-backdrop {
  position: fixed;
  z-index: 2147483600;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(16, 24, 40, .62);
  backdrop-filter: blur(5px);
}

.announcement-dialog {
  width: min(440px, 100%);
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 24px;
  border: 1px solid #cfd7e3;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(16, 24, 40, .34);
  text-align: center;
}

.announcement-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 50%;
  background: #0f766e;
  font-size: 24px;
  font-weight: 900;
}

.announcement-dialog h2,
.announcement-dialog p {
  margin: 0;
}

.announcement-dialog p {
  color: #475467;
  line-height: 1.55;
}

.announcement-dialog .detail-btn {
  width: auto;
  min-width: 130px;
}

@media (max-width: 980px) {
  .filter-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .management-modal:has(.management-layout:not([hidden])) {
    width: calc(100% - 12px);
    height: calc(100vh - 12px);
    max-height: calc(100vh - 12px);
  }

  .management-layout {
    grid-template-columns: 190px minmax(0, 1fr);
  }

  .company-row {
    grid-template-columns: 62px minmax(0, 1fr) auto;
  }

  .company-logo-frame {
    width: 62px;
  }

  .company-row-stats {
    display: none;
  }

  .audit-layout {
    grid-template-columns: 1fr;
  }

  .audit-list {
    max-height: 300px;
  }

  .product-scope-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .product-scope-result {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .product-scope-reset {
    width: 100%;
  }

  .product-bulk-tool {
    grid-template-columns: 1fr;
  }

  .product-bulk-fields {
    grid-template-columns: 1fr 1fr 90px;
  }
}

@media (max-width: 700px) {
  .app-topbar {
    align-items: flex-start;
  }

  .session-user {
    display: none;
  }

  .guest-access-copy {
    display: none;
  }

  .app-brand-logo {
    width: 58px;
    max-width: 72px;
    height: 40px;
  }

  .management-head {
    min-height: 58px;
  }

  .management-modal:has(.management-layout:not([hidden])) .management-body {
    height: 100%;
  }

  .management-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .management-nav {
    display: block;
    padding: 8px;
    overflow-x: auto;
    white-space: nowrap;
  }

  .management-user-card {
    display: none;
  }

  .management-nav nav {
    display: flex;
    gap: 5px;
    padding: 0;
  }

  .management-nav nav button {
    width: auto;
    flex: 0 0 auto;
    min-height: 36px;
    padding: 0 11px;
  }

  .management-nav nav button.active {
    box-shadow: inset 0 -3px 0 #2dd4bf;
  }

  .management-logout {
    display: none;
  }

  .management-panel {
    padding: 14px;
  }

  .management-section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .management-section-head > button,
  .management-search {
    width: 100%;
  }

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

  .management-form-grid label.wide {
    grid-column: 1;
  }

  .company-row {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .company-logo-frame {
    width: 58px;
    height: 44px;
  }

  .company-row .management-row-actions {
    grid-column: 1 / -1;
    width: 100%;
  }

  .company-row .management-row-actions .table-action {
    flex: 1 1 0;
  }

  .package-management-row {
    grid-template-columns: 44px minmax(0, 1fr) 116px 58px;
    gap: 8px;
  }

  .package-management-row > b {
    display: none;
  }

  .package-management-id {
    width: 44px;
  }

  .package-management-price strong {
    font-size: 12px;
  }

  .package-management-price small {
    font-size: 9px;
  }

  .product-catalog-search {
    width: 100%;
  }

  .product-scope-toolbar,
  .product-bulk-fields {
    grid-template-columns: 1fr;
  }

  .product-bulk-actions {
    justify-content: stretch;
  }

  .product-bulk-actions button {
    flex: 1 1 160px;
  }

  .price-refresh-progress {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .price-refresh-progress > b {
    display: none;
  }

  .management-form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .management-form-actions > span {
    margin-right: 0;
  }

  .management-form-actions button {
    width: 100%;
  }
}

/* Quote document and single-page A4 printing */
.offer-page {
  background: #eef1f4;
}

.offer-screen-tools {
  width: min(1040px, calc(100% - 28px));
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin: 18px auto 0;
}

.offer-screen-tools button {
  min-height: 40px;
  padding: 0 16px;
  color: #fff;
  border: 0;
  border-radius: 7px;
  background: #0f766e;
  cursor: pointer;
  font-weight: 800;
}

.offer-screen-tools .offer-code-toggle {
  color: #0f766e;
  border: 1px solid #0f766e;
  background: #fff;
}

.offer-screen-tools .offer-code-toggle[aria-pressed="true"] {
  color: #fff;
  background: #115e59;
}

.offer-product-code-column,
.offer-removed-code {
  display: none;
  color: #475467;
  font-weight: 800;
}

.offer-shell.show-product-codes .offer-product-code-column {
  display: table-cell;
}

.offer-shell.show-product-codes .offer-removed-code {
  display: block;
  font-size: .9em;
}

.offer-shell.show-product-codes .offer-removed-list li {
  grid-template-columns: 112px minmax(0, 1fr) auto;
}

.offer-company-head {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) 112px;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid #dce3ec;
  border-radius: 8px;
  background: #fff;
}

.offer-company-logo,
.offer-company-mark,
.offer-brand-logo {
  height: 68px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #e4e7ec;
  border-radius: 7px;
  background: #fff;
}

.offer-company-logo {
  position: relative;
  width: 112px;
}

.offer-brand-logo {
  position: relative;
  width: 112px;
}

.offer-company-mark {
  width: 68px;
  justify-self: center;
}

.offer-company-logo img,
.offer-brand-logo img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  padding: 5px;
  object-fit: contain;
  object-position: center;
}

.offer-brand-logo img {
  padding: 7px;
}

.offer-company-mark {
  color: #0f766e;
  background: #f0fdfa;
  font-size: 20px;
  font-weight: 900;
}

.offer-company-head div {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 4px;
  text-align: center;
}

.offer-company-head strong {
  width: 100%;
  color: #101828;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 900;
  text-align: center;
}

.offer-company-head div span,
.offer-company-head div small {
  width: 100%;
  color: #667085;
  line-height: 1.35;
  text-align: center;
}

.offer-company-head div span {
  font-size: 12px;
}

.offer-company-head div small {
  font-size: 11px;
}

.offer-summary {
  grid-template-columns: 1fr;
  gap: 0;
  padding: 8px;
}

.offer-total-area {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid #d2dae5;
  border-radius: 6px;
}

.offer-list-price,
.offer-saving,
.offer-tax-total,
.offer-vat-total,
.offer-total-main {
  width: 100%;
  min-width: 0;
  min-height: 60px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 3px;
  padding: 7px 10px;
  border: 0;
  border-left: 1px solid #dce3ec;
  border-radius: 0;
  background: #fff;
  text-align: center;
}

.offer-list-price {
  border-left: 0;
}

.offer-saving {
  color: #166534;
  background: #f0fdf4;
}

.offer-tax-total {
  color: #1d4ed8;
  background: #eff6ff;
}

.offer-vat-total {
  color: #9a3412;
  background: #fff7ed;
}

.offer-total-main {
  color: #fff;
  border-color: #0f766e;
  background: #0f766e;
}

.offer-list-price span,
.offer-saving span,
.offer-tax-total span,
.offer-vat-total span,
.offer-total-main span {
  color: currentColor;
  font-size: 10.5px;
  line-height: 1.15;
}

.offer-total-area .offer-list-price b,
.offer-total-area .offer-saving b,
.offer-tax-total b,
.offer-vat-total b,
.offer-total-area .offer-total-main strong {
  display: block;
  margin: 0;
  color: currentColor;
  font-size: 15px;
  line-height: 1.15;
  font-weight: 900;
  white-space: nowrap;
}

.offer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 4px;
  color: #667085;
  border-top: 1px solid #dce3ec;
  font-size: 10px;
}

.offer-footer strong {
  color: #344054;
}

@media (max-width: 780px) {
  .offer-total-area {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .offer-total-main {
    grid-column: 1 / -1;
  }

  .offer-company-head {
    grid-template-columns: 78px minmax(0, 1fr) 78px;
    gap: 8px;
  }

  .offer-company-logo,
  .offer-brand-logo {
    width: 78px;
    height: 56px;
  }

  .offer-company-mark {
    width: 56px;
    height: 56px;
  }
}

@page {
  size: A4 portrait;
  margin: 7mm;
}

html.is-print-preparing,
html.is-print-preparing body.offer-page {
  width: 196mm;
  height: 283mm;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #fff !important;
}

html.is-print-preparing .offer-screen-tools {
  display: none !important;
}

html.is-print-preparing .offer-shell {
  --offer-print-scale: 1;
  position: absolute;
  top: 0;
  left: 0;
  width: 196mm;
  height: 283mm;
  max-width: none;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  transform: scale(var(--offer-print-scale));
  transform-origin: top left;
}

html.is-print-preparing .offer-company-head,
html.is-print-preparing .offer-head,
html.is-print-preparing .offer-summary,
html.is-print-preparing .offer-section {
  margin: 0 0 2.2mm;
  border-radius: 0;
  box-shadow: none;
  break-inside: avoid;
}

html.is-print-preparing .offer-company-head {
  grid-template-columns: 25mm minmax(0, 1fr) 25mm;
  gap: 3mm;
  padding: 2.4mm 3mm;
}

html.is-print-preparing .offer-company-logo,
html.is-print-preparing .offer-brand-logo {
  width: 25mm;
  height: 15mm;
}

html.is-print-preparing .offer-company-mark {
  width: 15mm;
  height: 15mm;
}

html.is-print-preparing .offer-company-logo img,
html.is-print-preparing .offer-brand-logo img {
  padding: 1mm;
}

html.is-print-preparing .offer-head {
  padding: 2.4mm 3mm;
}

html.is-print-preparing .offer-head h1 {
  font-size: 14pt;
}

html.is-print-preparing .offer-meta {
  font-size: 8pt;
}

html.is-print-preparing .offer-lines-section,
html.is-print-preparing .offer-table-wrap {
  overflow: visible;
}

html.is-print-preparing .offer-table {
  min-width: 0;
  table-layout: fixed;
  font-size: 7.5pt;
}

html.is-print-preparing .offer-table th,
html.is-print-preparing .offer-table td {
  padding: 1.2mm 1.4mm;
  overflow-wrap: anywhere;
}

html.is-print-preparing .offer-col-group {
  width: 9%;
}

html.is-print-preparing .offer-col-name {
  width: 34%;
}

html.is-print-preparing .offer-col-quantity {
  width: 7%;
}

html.is-print-preparing .offer-col-unit {
  width: 11%;
}

html.is-print-preparing .offer-col-rate,
html.is-print-preparing .offer-col-discount {
  width: 10%;
}

html.is-print-preparing .offer-col-vat {
  width: 9%;
}

html.is-print-preparing .offer-col-total {
  width: 10%;
}

html.is-print-preparing .offer-shell.show-product-codes .offer-col-group { width: 8%; }
html.is-print-preparing .offer-shell.show-product-codes .offer-col-code { width: 13%; }
html.is-print-preparing .offer-shell.show-product-codes .offer-col-name { width: 24%; }
html.is-print-preparing .offer-shell.show-product-codes .offer-col-quantity { width: 6%; }
html.is-print-preparing .offer-shell.show-product-codes .offer-col-unit { width: 10%; }
html.is-print-preparing .offer-shell.show-product-codes .offer-col-rate,
html.is-print-preparing .offer-shell.show-product-codes .offer-col-discount,
html.is-print-preparing .offer-shell.show-product-codes .offer-col-vat { width: 9%; }
html.is-print-preparing .offer-shell.show-product-codes .offer-col-total { width: 12%; }

html.is-print-preparing .offer-section h2 {
  padding: 2mm 3mm;
  font-size: 10pt;
}

html.is-print-preparing .offer-removed-list {
  gap: 1mm;
  padding: 1.5mm 2.5mm 2mm;
}

html.is-print-preparing .offer-removed-list li {
  padding: 1.2mm 1.8mm;
  border-radius: 0;
  font-size: 7.5pt;
}

html.is-print-preparing .offer-summary {
  margin-top: auto;
  padding: 2.2mm;
}

html.is-print-preparing .offer-total-area {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
}

html.is-print-preparing .offer-total-main {
  grid-column: auto;
}

html.is-print-preparing .offer-list-price,
html.is-print-preparing .offer-saving,
html.is-print-preparing .offer-tax-total,
html.is-print-preparing .offer-vat-total,
html.is-print-preparing .offer-total-main {
  min-height: 12mm;
  padding: 1mm 1.5mm;
  border-radius: 0;
}

html.is-print-preparing .offer-footer {
  margin-top: 0;
  padding: 1.8mm 0;
}

@media print {
  html,
  body.offer-page {
    width: 196mm;
    height: 283mm;
    min-height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #fff !important;
  }

  .offer-screen-tools {
    display: none !important;
  }

  .offer-shell {
    --offer-print-scale: 1;
    position: absolute;
    top: 0;
    left: 0;
    width: 196mm;
    height: 283mm;
    max-width: none;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    transform: scale(var(--offer-print-scale));
    transform-origin: top left;
  }

  .offer-company-head,
  .offer-head,
  .offer-summary,
  .offer-section {
    margin: 0 0 2.2mm;
    border-radius: 0;
    box-shadow: none;
    break-inside: avoid;
  }

  .offer-company-head {
    grid-template-columns: 25mm minmax(0, 1fr) 25mm;
    gap: 3mm;
    padding: 2.4mm 3mm;
  }

  .offer-company-logo,
  .offer-brand-logo {
    width: 25mm;
    height: 15mm;
  }

  .offer-company-mark {
    width: 15mm;
    height: 15mm;
  }

  .offer-company-logo img,
  .offer-brand-logo img {
    padding: 1mm;
  }

  .offer-head {
    padding: 2.4mm 3mm;
  }

  .offer-head h1 {
    font-size: 14pt;
  }

  .offer-meta {
    font-size: 8pt;
  }

  .offer-lines-section,
  .offer-table-wrap {
    overflow: visible;
  }

  .offer-table {
    min-width: 0;
    table-layout: fixed;
    font-size: 7.5pt;
  }

  .offer-table th,
  .offer-table td {
    padding: 1.2mm 1.4mm;
    overflow-wrap: anywhere;
  }

  .offer-col-group {
    width: 9%;
  }

  .offer-col-name {
    width: 34%;
  }

  .offer-col-quantity {
    width: 7%;
  }

  .offer-col-unit {
    width: 11%;
  }

  .offer-col-rate,
  .offer-col-discount {
    width: 10%;
  }

  .offer-col-vat {
    width: 9%;
  }

  .offer-col-total {
    width: 10%;
  }

  .offer-shell.show-product-codes .offer-col-group { width: 8%; }
  .offer-shell.show-product-codes .offer-col-code { width: 13%; }
  .offer-shell.show-product-codes .offer-col-name { width: 24%; }
  .offer-shell.show-product-codes .offer-col-quantity { width: 6%; }
  .offer-shell.show-product-codes .offer-col-unit { width: 10%; }
  .offer-shell.show-product-codes .offer-col-rate,
  .offer-shell.show-product-codes .offer-col-discount,
  .offer-shell.show-product-codes .offer-col-vat { width: 9%; }
  .offer-shell.show-product-codes .offer-col-total { width: 12%; }

  .offer-section h2 {
    padding: 2mm 3mm;
    font-size: 10pt;
  }

  .offer-removed-list {
    gap: 1mm;
    padding: 1.5mm 2.5mm 2mm;
  }

  .offer-removed-list li {
    padding: 1.2mm 1.8mm;
    border-radius: 0;
    font-size: 7.5pt;
  }

  .offer-summary {
    margin-top: auto;
    padding: 2.2mm;
  }

  .offer-total-area {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
  }

  .offer-total-main {
    grid-column: auto;
  }

  .offer-list-price,
  .offer-saving,
  .offer-tax-total,
  .offer-vat-total,
  .offer-total-main {
    min-height: 12mm;
    padding: 1mm 1.5mm;
    border-radius: 0;
  }

  .offer-footer {
    margin-top: 0;
    padding: 1.8mm 0;
  }
}

.auth-panel .auth-actions .auth-submit,
.auth-panel .auth-actions .auth-register-open,
.application-form .application-actions .detail-btn {
  height: 46px;
  min-height: 46px;
  margin: 0;
}

.auth-panel .auth-actions .auth-register-open,
.application-form .application-actions .application-back {
  color: #182230;
  border: 1px solid #cfd7e3;
  background: #fff;
}

.auth-panel .auth-actions .auth-register-open:hover,
.application-form .application-actions .application-back:hover {
  color: #101828;
  border-color: #98a2b3;
  background: #f2f4f7;
}

.application-admin-card.revoked {
  border-left-color: #667085;
}

.application-status.revoked {
  color: #344054;
  background: #f2f4f7;
}

.application-revoke-row {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid #e4e7ec;
}

.application-revoke-row p {
  margin: 0;
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}

.application-revoke,
.application-reapprove {
  flex: 0 0 auto;
  min-width: 132px;
  height: 38px;
  padding: 0 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.application-revoke {
  color: #b42318;
  border: 1px solid #fecdca;
  background: #fff;
}

.application-reapprove {
  color: #fff;
  border: 1px solid #067647;
  background: #067647;
}

@media (max-width: 760px) {
  .application-revoke-row {
    align-items: stretch;
    flex-direction: column;
  }

  .application-revoke,
  .application-reapprove {
    width: 100%;
  }
}
