:root {
  --blue: #df1829;
  --blue-dark: #b50e1b;
  --blue-soft: #fff0f1;
  --navy: #172033;
  --ink: #202b3a;
  --muted: #667487;
  --line: #e2e8f0;
  --bg: #eef2f6;
  --paper: #fff;
  --radius: 14px;
}

body { color: var(--ink); background: var(--bg); }
.sidebar { width: 232px; flex-basis: 232px; padding: 18px 14px 16px; background: linear-gradient(145deg,#8c0c17 0%,#b50e1b 54%,#6f0710 100%); box-shadow: 3px 0 16px rgba(65,8,14,.10); }
.brand { gap: 6px; padding: 0 9px 14px; font-size: 13px; }
.logo-wrap { width: 108px; height: 46px; padding: 6px; }
.brand > span:last-child { color: rgba(255,255,255,.9); font-weight: 600; }
.nav-caption { padding: 8px 10px 4px; color: rgba(255,255,255,.62); font-size: 10px; font-weight: 600; }
.nav-link { min-height: 38px; gap: 9px; margin-bottom: 2px; padding: 8px 10px; border: 1px solid transparent; font-size: 13px; line-height: 1.25; transition: background .15s ease,transform .15s ease,border-color .15s ease; }
.nav-link svg { width: 18px; height: 18px; }
.nav-link:hover { background: rgba(255,255,255,.10); transform: translateX(2px); }
.nav-link.active { background: #61060e; border-color: rgba(255,255,255,.11); box-shadow: inset 3px 0 #fff,0 4px 10px rgba(45,3,7,.12); }
.nav-link.active svg { stroke-width: 2.1; }
.sidebar-bottom { margin-top: auto; }
.sidebar-account { padding: 9px 8px; border: 1px solid rgba(255,255,255,.14); border-radius: 10px; background: rgba(255,255,255,.07); }
.sidebar-account-head { display: flex; align-items: center; gap: 8px; padding: 0 2px 8px; border-bottom: 1px solid rgba(255,255,255,.13); min-width: 0; }
.sidebar-account-head > span:last-child { min-width: 0; }
.sidebar-account-head strong,.sidebar-account-head small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-account-head strong { color: #fff; font-size: 13px; }
.sidebar-account-head small { color: rgba(255,255,255,.65); font-size: 10px; }
.sidebar-avatar { display: inline-flex; width: 31px; height: 31px; flex: 0 0 31px; align-items: center; justify-content: center; border-radius: 8px; background: #fff; color: #a00d1a; font-size: 13px; font-weight: 800; }
.sidebar-account-action { display: flex; width: 100%; min-height: 32px; align-items: center; gap: 8px; margin-top: 4px; padding: 5px 7px; border: 0; border-radius: 7px; background: transparent; color: rgba(255,255,255,.86); font-size: 11px; font-weight: 600; text-align: left; }
.sidebar-account-action svg { width: 16px; height: 16px; flex: 0 0 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-account-action:hover,.sidebar-account-action.active { background: rgba(255,255,255,.12); color: #fff; }
.sidebar-account form { margin: 0; }
.sidebar-logout { cursor: pointer; }
.sidebar-bottom .sidebar-foot { margin-top: 8px; padding: 9px 8px 0; font-size: 9px; line-height: 1.45; }
.sidebar-toggle,.sidebar-close,.sidebar-backdrop { display: none; }
.topbar-start { display: flex; align-items: center; gap: 12px; }
.topbar-start > span { color: #8290a2; font-size: 12px; font-weight: 600; letter-spacing: 1.6px; }
.workspace { max-width: 1360px; padding: 28px 32px 42px; }
.topbar { height: 68px; padding: 0 32px; border-color: var(--line); box-shadow: 0 1px 0 rgba(20,34,51,.02); }
.topbar > span { color: #8290a2; font-weight: 600; }
.account { gap: 18px; }
.account small { color: #788697; }
.text-button { color: #647184; border-radius: 7px; transition: color .15s ease,background .15s ease; }
.text-button:hover { color: var(--red); background: #fff0f1; }

.page-heading { margin-bottom: 20px; }
.page-heading h1 { color: #8c0c17; font-size: 28px; letter-spacing: -.2px; }
.page-heading p { margin-top: 3px; font-size: 14px; }
.eyebrow { margin-bottom: 5px; font-size: 11px; letter-spacing: 1.3px; }

.card { border-color: var(--line); border-radius: var(--radius); box-shadow: 0 5px 15px rgba(25,39,55,.045); }
.card > h2,
.section-heading h2 { color: #8c0c17; }
.section-heading { margin-bottom: 16px; }
.section-title { gap: 10px; }

.button { min-height: 42px; padding: 9px 16px; border-radius: 8px; transition: transform .15s ease,background .15s ease,border-color .15s ease,box-shadow .15s ease; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button.primary { background: var(--red); box-shadow: 0 4px 10px rgba(181,14,27,.16); }

.profile-card { max-width: 780px; padding: 0; overflow: hidden; }
.profile-section { padding: 25px 28px 7px; }
.profile-password-section { padding-top: 23px; border-top: 1px solid var(--line); background: #fbfcfd; }
.profile-section-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.profile-section-heading h2 { margin: 0; color: #8c0c17; }
.profile-section-icon { display: inline-flex; width: 42px; height: 42px; flex: 0 0 42px; align-items: center; justify-content: center; border-radius: 11px; background: #fff0f1; color: #b50e1b; font-size: 15px; font-weight: 800; }
.profile-section-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.profile-card input[readonly] { background: #f1f4f7; color: #6f7b8b; cursor: not-allowed; }
.profile-actions { display: flex; justify-content: flex-end; padding: 18px 28px 24px; border-top: 1px solid var(--line); background: #fff; }

.quotes-actions-heading { width: 148px; text-align: center; }
.quotes-actions { display: flex; align-items: center; justify-content: center; gap: 4px; white-space: nowrap; }
.quotes-actions form { display: inline-flex; margin: 0; }
.quotes-actions .icon-action-btn:focus-visible { outline-color: #df7e88; }

.icon-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--action-border, #dbe4ee);
  border-radius: 8px;
  background: var(--action-bg, #ffffff);
  color: var(--action-color, #475569);
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.icon-action-btn svg {
  width: 17px;
  height: 17px;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.85 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

.icon-action-btn:hover {
  background: var(--action-hover-bg, #f1f5f9);
  border-color: var(--action-hover-border, #cbd5e1);
  color: var(--action-hover-color, var(--action-color, #0f172a));
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.06);
}

.icon-action-btn:active {
  transform: translateY(0);
  box-shadow: none;
}

.quote-view {
  --action-bg: #f0fdf4;
  --action-border: #bbf7d0;
  --action-color: #16a34a;
  --action-hover-bg: #dcfce7;
  --action-hover-border: #86efac;
  --action-hover-color: #15803d;
}

.quote-edit {
  --action-bg: #fffbeb;
  --action-border: #fde68a;
  --action-color: #d97706;
  --action-hover-bg: #fef3c7;
  --action-hover-border: #fcd34d;
  --action-hover-color: #b45309;
}

.quote-pdf {
  --action-bg: #eff8ff;
  --action-border: #b9ddf7;
  --action-color: #0878bd;
  --action-hover-bg: #dff1ff;
  --action-hover-border: #7fc2ed;
  --action-hover-color: #0069ae;
}

.quote-delete {
  --action-bg: #fef2f2;
  --action-border: #fecaca;
  --action-color: #dc2626;
  --action-hover-bg: #fee2e2;
  --action-hover-border: #fca5a5;
  --action-hover-color: #b91c1c;
}

.quote-file-actions { flex-wrap: wrap; justify-content: flex-end; }
.quote-file-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.quote-preview-button { color: #a30e1a; border-color: #efcbd0; background: #fff; }
.quote-preview-button:hover { color: #8c0c17; border-color: #dfa1a9; background: #fff0f1; }
.quote-edit-heading-actions { flex-wrap: wrap; justify-content: flex-end; }
.quote-edit-heading-actions .button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.button.primary:hover { background: var(--red-dark); box-shadow: 0 5px 12px rgba(181,14,27,.22); }
.button.secondary { background: #fff; border-color: #d8e2ec; color: #415266; }
.button.secondary:hover { background: var(--blue-soft); border-color: #efbbc1; color: var(--blue-dark); }

label { color: #344358; font-size: 13px; }
input,
select { min-height: 43px; border-color: #d5dee8; border-radius: 8px; color: #1e2a39; transition: border-color .15s ease,box-shadow .15s ease,background .15s ease; }
input:hover,
select:hover { border-color: #aab9c8; }
input:focus,
select:focus { border-color: #df7e88; box-shadow: 0 0 0 3px rgba(223,24,41,.11); }
input:focus-visible,
select:focus-visible { outline-color: #df7e88; }
input[readonly] { background: #f5f7fa; color: #697789; }

.notice { padding: 12px 15px; border: 1px solid #cfe0ee; border-left: 4px solid #5e9fc8; border-radius: 9px; background: #f0f7fc; color: #31566f; }
.notice.success { border-color: #bce2d0; border-left-color: #22a06b; background: #edf8f3; color: #216348; }
.notice.warning { border-color: #f0d9a9; border-left-color: #e59a18; background: #fff8e9; color: #725019; }
.notice.error { border-color: #efc1c7; border-left-color: #cf3344; background: #fff0f1; color: #9f2532; }

.pill,
.count { border-radius: 999px; padding: 3px 9px; background: #edf2f7; color: #5b6b7e; font-weight: 600; }
.pill.warning { background: #fff1d6; color: #986000; }
.status { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.on { color: #1a7959; }
.status.off { color: #b33341; }

.table-scroll { border-radius: 9px; }
table { color: #2c394a; }
th { padding: 10px 13px; background: #f7f9fc; color: #657386; font-size: 12px; font-weight: 600; }
td { padding: 13px; border-color: #e7ecf2; }
tbody tr { transition: background .12s ease; }
tbody tr:hover { background: #fafcff; }
.record-link,
.small-link { color: #b50e1b; }
.small-link:hover,
.record-link:hover { color: var(--blue-dark); }
.cell-sub { margin-top: 1px; font-size: 12px; }

.table-toolbar { margin-bottom: 16px; }
.search { min-width: min(390px,100%); }
.search input { background: #f9fbfd; }
.report-card .report-table { table-layout: fixed; min-width: 950px; }
.result-card .report-table, .quote-sheet .report-table { table-layout: auto; min-width: 100%; width: 100%; }
.report-table .report-sequence-col { width: 58px; text-align: center; }
.report-table .report-document-col { width: 118px; }
.report-table .report-number-col { width: 145px; }
.report-table .report-owner-col { width: 125px; }
.report-table .report-date-col { width: 88px; }
.report-table .report-version-col { width: 58px; text-align: center; }
.report-table td:nth-last-child(2) { text-align: center; }
.report-sequence { text-align: center; color: #64748b; font-weight: 700; font-variant-numeric: tabular-nums; }
.sort-heading { display: inline-flex; align-items: center; gap: 5px; color: inherit; text-decoration: none; white-space: nowrap; transition: color .15s ease; }
.sort-heading span { color: #94a3b8; font-size: 12px; line-height: 1; }
.sort-heading:hover,.sort-heading.active { color: #1769aa; }
.sort-heading.active span { color: #1769aa; }
.report-customer,.report-owner { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-date { color: #334155; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.report-table .icon-action-btn { width: 32px; height: 32px; border-radius: 7px; }
.report-table .icon-action-btn svg { width: 16px; height: 16px; }
.report-table .quote-pdf .printer-svg-icon { width: 20px; height: 20px; }
.document-link { color: #164c8c; font-weight: 800; letter-spacing: .025em; white-space: nowrap; }
.generated-document-id, .detail-document-id { display:flex; align-items:center; gap:12px; margin:0 0 16px; padding:12px 14px; border:1px solid #cbdcf0; border-left:4px solid #1b5c9c; border-radius:10px; background:#f5f9fd; color:#586b82; }
.generated-document-id span { font-size:.86rem; font-weight:700; }
.generated-document-id strong, .detail-document-id strong { color:#123f72; font-size:1.08rem; letter-spacing:.045em; }
.generated-document-id small { margin-left:auto; color:#66788c; }
@media (max-width: 640px) { .generated-document-id { align-items:flex-start; flex-wrap:wrap; } .generated-document-id small { width:100%; margin-left:0; } }

.form-actions { padding: 16px 20px; border-color: var(--line); border-radius: 11px; box-shadow: 0 4px 12px rgba(25,39,55,.04); }
.steps { gap: 16px; padding-bottom: 17px; margin-bottom: 18px; border-color: var(--line); }
.steps span { gap: 7px; }
.steps b { background: #e8edf3; color: #5e6e81; }
.steps .current { color: var(--blue-dark); font-weight: 600; }
.steps .current b { background: var(--blue); color: #fff; }
.number-box { background: var(--blue-soft); color: var(--blue-dark); }
.number-box.dark { background: #26384d; color: #fff; }

.position-card { border-top: 3px solid #dbeaf5; }
.options-label { border-color: var(--line); color: #3d4c60; }
.options { gap: 9px 14px; }
.options label { padding: 6px 9px; border: 1px solid #e0e7ef; border-radius: 8px; background: #f9fbfd; }
.options input { accent-color: var(--blue); }
.add-position { min-height: 50px; border-color: #b8c7d6; background: #f7fafc; color: #4b6176; }
.add-position:hover { border-color: var(--blue); color: var(--blue-dark); background: var(--blue-soft); }

.result-card { border-color: var(--line); border-radius: 13px; box-shadow: 0 4px 12px rgba(25,39,55,.04); }
.price-grid { gap: 6px; }
.price-grid > span { border-radius: 8px; background: #f7f9fc; }
.price-grid .total { background: #fff0f1; }
.summary-grid { gap: 18px; }
.summary-grid span { color: #708094; }
.summary-grid strong { color: var(--navy); }
.admin-cost { border-color: #e3e9f0; }

.metric-grid article:not(.metric-card) { border-color: var(--line); border-top: 3px solid var(--blue); border-radius: 13px; box-shadow: 0 5px 15px rgba(25,39,55,.045); }
.metric-grid article:not(.metric-card) strong { color: var(--navy); }

.rate-section summary { color: #8c0c17; }
.rate-section summary:hover { background: #fff7f8; }
.rate-section[open] summary { background: #fffafb; }
.history-card { margin-top: 22px; }

.permission-switch { border-color: #dbe4ed; background: #f9fbfd; }
.permission-switch:hover { border-color: #e9aeb5; background: var(--blue-soft); }
.permission-switch input { accent-color: var(--blue); }

/* Settings Page Tabs */
.settings-tabs-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  padding: 6px;
  background: #e9edf3;
  border: 1px solid #dce2eb;
  border-radius: 12px;
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.04);
}

.settings-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 18px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  color: #556375;
  text-decoration: none;
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.settings-tab-btn svg {
  width: 18px !important;
  height: 18px !important;
  max-width: 18px !important;
  max-height: 18px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  flex: 0 0 18px !important;
}

.settings-tab-btn:hover {
  color: #1e293b;
  background: rgba(255, 255, 255, 0.7);
}

.settings-tab-btn.active {
  background: #ffffff;
  color: #8c0c17;
  border-color: #d1d9e4;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.settings-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  background: #dce3ed;
  color: #4b5869;
  line-height: 1;
}

.settings-tab-btn.active .settings-tab-badge {
  background: #fee2e2;
  color: #991b1b;
}

.settings-tab-content {
  animation: settingsFadeIn 0.2s ease-out;
}

@keyframes settingsFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Table Pagination */
.table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.pagination-info {
  font-size: 13px;
  color: var(--muted);
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  color: #4b5869;
  background: #ffffff;
  border: 1px solid #d8e0ea;
  text-decoration: none;
  transition: all 0.15s ease;
}

.pagination-btn:hover:not(.disabled):not(.active) {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #1e293b;
}

.pagination-btn.active {
  background: #8c0c17;
  border-color: #8c0c17;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(140, 12, 23, 0.25);
}

.pagination-btn.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: #f8fafc;
  color: #94a3b8;
}

.pagination-ellipsis {
  padding: 0 4px;
  color: #94a3b8;
  font-size: 13px;
}

/* Modern Centered Card Login Layout */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px 20px;
  background: radial-gradient(at 15% 15%, rgba(140, 12, 23, 0.08) 0px, transparent 40%),
              radial-gradient(at 85% 85%, rgba(140, 12, 23, 0.05) 0px, transparent 40%),
              #f0f3f7;
  position: relative;
  box-sizing: border-box;
}

.login-shell.login-card-mode {
  width: 100%;
  max-width: 960px;
  min-height: 560px;
  border-radius: 24px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1.06fr;
  background: #fff;
  border: 1px solid #e1e6ed;
  box-shadow: 0 24px 60px -12px rgba(22, 33, 50, 0.14),
              0 0 0 1px rgba(255, 255, 255, 0.9) inset;
  position: relative;
  z-index: 1;
}

.login-card-mode .login-brand {
  position: relative;
  overflow: hidden;
  min-height: 100%;
  padding: 44px 44px 36px;
  border: 0;
  background: linear-gradient(145deg, #8c0c17 0%, #a80e1c 52%, #68050e 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.login-card-mode .login-brand::before,
.login-card-mode .login-brand::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.login-card-mode .login-brand::before {
  right: -130px;
  top: -150px;
  width: 380px;
  height: 380px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 45px rgba(255, 255, 255, 0.035),
              0 0 0 90px rgba(255, 255, 255, 0.025);
}

.login-card-mode .login-brand::after {
  left: -80px;
  bottom: -150px;
  width: 320px;
  height: 320px;
  background: rgba(255, 255, 255, 0.045);
}

.login-card-mode .login-brand > * {
  position: relative;
  z-index: 1;
}

.login-brand-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.login-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 122px;
  height: 52px;
  padding: 8px 12px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 7px 18px rgba(66, 4, 10, 0.18);
}

.login-logo img {
  display: block;
  max-width: 100%;
  max-height: 100%;
}

.login-product {
  color: rgba(255, 255, 255, 0.75);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
}

.login-card-mode .login-brand-copy {
  margin: auto 0;
  padding: 32px 0 26px;
}

.login-brand-badge {
  display: inline-flex;
  padding: 5px 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.95);
  font-size: 11px;
  font-weight: 600;
}

.login-card-mode .login-brand h1 {
  margin: 14px 0 10px;
  color: #fff;
  font-size: 29px;
  line-height: 1.25;
  letter-spacing: -0.4px;
  font-weight: 700;
}

.login-card-mode .login-brand-copy > p {
  color: rgba(255, 255, 255, 0.82);
  font-size: 15px;
  line-height: 1.6;
}

.login-card-mode .login-features {
  display: grid;
  gap: 8px;
  margin-top: 20px;
}

.login-card-mode .login-features span {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9px;
  color: rgba(255, 255, 255, 0.95);
  font-size: 13px;
  font-weight: 500;
}

.login-card-mode .login-features svg {
  width: 17px;
  height: 17px;
  padding: 2px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  fill: none;
  stroke: #fff;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.login-brand-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 11px;
}

.login-brand-footer > span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.10);
}

.login-card-mode .login-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 44px 46px;
  background: #ffffff;
  min-height: 100%;
}

.login-card-mode .login-box {
  width: 100%;
  max-width: 370px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.login-heading {
  display: flex;
  align-items: center;
  gap: 13px;
}

.login-heading-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 12px;
  background: #fff0f1;
  color: #b50e1b;
}

.login-heading-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.login-heading .eyebrow {
  margin-bottom: 1px;
}

.login-box h2 {
  color: #8c0c17;
  font-size: 28px;
  line-height: 1.2;
}

.login-subtitle {
  margin-top: 8px;
  color: #728094;
  font-size: 13px;
}

.login-box .notice {
  margin: 18px 0 0;
}

.login-box form {
  margin-top: 22px;
}

.login-field {
  margin-bottom: 16px;
  color: #344358;
  font-size: 13px;
}

.login-field > span:first-child {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
}

.login-input-wrap {
  position: relative;
  display: block;
}

.login-input-wrap > svg {
  position: absolute;
  left: 14px;
  top: 50%;
  z-index: 1;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  fill: none;
  stroke: #8b96a5;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.login-input-wrap input {
  min-height: 46px;
  margin: 0;
  padding-left: 43px;
  background: #fbfcfd;
  border: 1px solid #d9dfe7;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.login-input-wrap input:focus-visible {
  outline: 0;
  border-color: #df7e88;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(223, 24, 41, 0.12);
}

.login-input-wrap:focus-within > svg {
  stroke: var(--red);
}

.login-submit {
  min-height: 48px;
  margin-top: 6px;
  font-size: 15px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(223, 24, 41, 0.22);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.login-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(223, 24, 41, 0.3);
}

.login-submit svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.login-help {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #e7ebf0;
  color: #748194;
  font-size: 12px;
  line-height: 1.55;
}

.login-help svg {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  margin-top: 1px;
  fill: none;
  stroke: #9a4650;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.login-help strong {
  color: #4b5869;
  font-weight: 600;
}

.login-wrapper-copyright {
  margin-top: 20px;
  color: #8a96a6;
  font-size: 12px;
  text-align: center;
  letter-spacing: 0.2px;
}

.empty { border-style: dashed; }
.empty h1 { color: #8c0c17; }
.dashboard-team-card .member-avatar { background: #fff0f1; color: #b50e1b; }
.dashboard-team-card .member-link { color: #b50e1b; border-color: #efcbd0; }
.dashboard-team-card .member-link:hover { background: #fff0f1; border-color: #df9da5; }
footer { border-color: var(--line); color: #8793a2; }

/* Combined pricing workflow */
.compact-errors{margin:8px 0 0;padding-left:20px}.work-type-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.work-type-option{display:flex;align-items:center;gap:12px;min-height:78px;padding:14px 16px;border:1px solid #dce3eb;border-radius:13px;background:#fff;cursor:pointer;transition:.16s ease}.work-type-option:hover{border-color:#9bcbed;background:#f7fbff}.work-type-option.selected{border-color:#0a84d8;background:#eaf6ff;box-shadow:0 0 0 2px rgba(10,132,216,.08)}.work-type-option input{width:19px;height:19px;margin:0;accent-color:#0a84d8}.work-type-option span{display:grid;gap:2px;flex:1}.work-type-option strong{color:#0b1f33}.work-type-option small{color:#677481}.work-type-option b{display:none;color:#0069ae}.work-type-option.selected b{display:block}.pricing-tabs{display:flex;gap:7px;margin:20px 0 16px;padding:6px;border:1px solid #dce3eb;border-radius:12px;background:#e9eef4;overflow-x:auto}.pricing-tabs button{min-height:40px;padding:8px 17px;border:1px solid transparent;border-radius:9px;background:transparent;color:#596779;font-weight:700;white-space:nowrap}.pricing-tabs button.active{border-color:#d5e4ef;background:#fff;color:#0069ae;box-shadow:0 2px 7px rgba(11,31,51,.08)}.pricing-tabs button span{display:inline-flex;align-items:center;justify-content:center;min-width:21px;height:21px;margin-left:6px;border-radius:999px;background:#dce7ef;font-size:11px}.pricing-tabs button.active span{background:#eaf6ff;color:#0069ae}.pricing-panel[hidden],.pricing-tabs button[hidden]{display:none!important}.pricing-panel{animation:settingsFadeIn .18s ease-out}.combined-preview{margin-top:25px;padding:22px;border:1px solid #dbe6ef;border-left:5px solid #0a84d8;border-radius:15px;background:#f7fbff}.preview-group+ .preview-group{margin-top:20px}.preview-group h3{margin:0 0 9px;color:#0b1f33}.combined-actions{position:sticky;bottom:12px;z-index:10;box-shadow:0 12px 35px rgba(11,31,51,.16)}.type-badges{display:flex;flex-wrap:wrap;gap:5px}.type-badge{display:inline-flex;padding:4px 9px;border-radius:999px;background:#eaf6ff;color:#0069ae;font-size:11px;font-weight:700}.type-dft_flex{background:#e9f8f8;color:#117c84}.type-silk_screen{background:#f1edff;color:#6544ca}.legacy-note{display:block;margin-top:3px;color:#8a95a3;font-size:10px}.report-work-section{margin:28px 0}.report-section-heading{display:flex;align-items:end;justify-content:space-between;margin-bottom:10px}.report-section-heading h2{margin:2px 0 0;color:#0b1f33;font-size:24px}.report-result{padding:0;overflow:hidden}.report-result .result-info{padding:14px 16px;background:#f3f5f8}.report-result .price-grid{padding:8px 10px}.history-list{display:grid}.history-row{display:grid;grid-template-columns:90px 1fr auto;gap:14px;padding:11px 4px;border-top:1px solid #e5eaf0;color:#536174;text-decoration:none}.history-row.current{color:#0069ae}.history-row time{color:#84909e;font-size:12px}
.work-type-picker .section-heading h2{color:#0b1f33}.pricing-panel .positions-heading .eyebrow{color:#0069ae}.pricing-panel .positions-heading h2{color:#0b1f33}

/* Combined pricing uses the existing PMK burgundy brand, not the blue utility palette. */
.combined-document-id{border-color:#efcbd0;border-left-color:#b50e1b;background:#fff8f8;color:#76565a}
.combined-document-id strong{color:#8c0c17}.combined-document-id small{color:#806b6e}
.work-type-picker .section-heading h2{color:#8c0c17}
.work-type-option:hover{border-color:#df9da5;background:#fff8f8}
.work-type-option.selected{border-color:#df1829;background:#fff0f1;box-shadow:0 0 0 2px rgba(223,24,41,.10)}
.work-type-option input{accent-color:#df1829}.work-type-option b{color:#b50e1b}
.pricing-tabs{gap:9px;border-color:#e7d5d8;background:#f3ebec}
.pricing-tabs button{border-color:#ead7da;background:#fff;color:#8c0c17;box-shadow:0 2px 5px rgba(92,14,24,.05)}
.pricing-tabs button:hover{border-color:#df9da5;background:#fff7f8}
.pricing-tabs button.active{border-color:#8c0c17;background:#8c0c17;color:#fff;box-shadow:0 5px 14px rgba(140,12,23,.24)}
.pricing-tabs button span{background:#f4e5e7;color:#8c0c17}
.pricing-tabs button.active span{background:rgba(255,255,255,.20);color:#fff}
.pricing-panel .positions-heading .eyebrow{color:#b50e1b}.pricing-panel .positions-heading h2{color:#8c0c17}
.pricing-panel .positions-heading{align-items:end;gap:16px;flex-wrap:wrap}.position-quantity .field-help{display:block;margin-top:5px;color:#677481;font-size:12px;font-weight:400}
.report-result .result-info{background:transparent}
.combined-preview{border-color:#efcbd0;border-left-color:#b50e1b;background:#fffafa}

/* Every signed-in page uses the full width available beside the sidebar. */
.workspace{width:100%;max-width:none}

@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { scroll-behavior: auto !important; transition: none !important; }
}

@media (max-width: 1100px) {
  .workspace { padding: 25px; }
}

@media (max-width: 760px) {
  body.sidebar-open { overflow: hidden; }
  .app-shell { display: block; }
  .sidebar { position: fixed; inset: 0 auto 0 0; z-index: 1000; width: min(84vw,300px); height: 100dvh; padding: 22px 17px 20px; overflow-y: auto; transform: translateX(-104%); transition: transform .22s ease; box-shadow: 12px 0 34px rgba(65,8,14,.25); }
  .sidebar-open .sidebar { transform: translateX(0); }
  .sidebar .brand { flex-direction: column; align-items: flex-start; padding: 0 10px 20px; }
  .sidebar .logo-wrap { width: 108px; height: 47px; }
  .sidebar nav { display: block; margin-top: 0; }
  .sidebar .nav-caption { display: block; padding-top: 11px; }
  .sidebar .nav-link { margin-bottom: 3px; padding: 10px 12px; }
  .sidebar .sidebar-bottom { margin-top: auto; }
  .sidebar .sidebar-foot { display: block; margin-top: 12px; }
  .sidebar-close { display: inline-flex; position: absolute; top: 18px; right: 15px; z-index: 2; width: 38px; height: 38px; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,.2); border-radius: 9px; background: rgba(255,255,255,.1); color: #fff; }
  .sidebar-close svg,.sidebar-toggle svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
  .sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 999; border: 0; background: rgba(30,12,15,.52); opacity: 0; visibility: hidden; transition: opacity .2s ease,visibility .2s ease; }
  .sidebar-open .sidebar-backdrop { opacity: 1; visibility: visible; }
  .sidebar-toggle { display: inline-flex; width: 40px; height: 40px; flex: 0 0 40px; align-items: center; justify-content: center; border: 1px solid #efcbd0; border-radius: 9px; background: #fff0f1; color: #b50e1b; }
  .sidebar-toggle:hover { background: #ffe5e8; }
  .workspace { padding: 21px 16px 34px; }
  .topbar { position: sticky; top: 0; z-index: 20; padding: 0 16px; }
  .nav-link:hover { transform: none; }
  .quote-file-actions { width: 100%; justify-content: flex-start; }
  .quote-file-actions .button { flex: 1 1 auto; }
  .quote-edit-heading-actions { width: 100%; }
  .quote-edit-heading-actions .button { flex: 1 1 auto; }
  .page-heading h1 { font-size: 25px; }
  .steps { overflow-x: auto; padding-bottom: 14px; }
  .steps span { white-space: nowrap; }
  .login-shell.login-card-mode { grid-template-columns: 1fr; max-width: 480px; min-height: auto; border-radius: 20px; }
  .login-card-mode .login-brand { min-height: auto; padding: 28px 24px 20px; border-radius: 20px 20px 0 0; }
  .login-brand-top { justify-content: space-between; }
  .login-card-mode .login-brand-copy { padding: 18px 0 6px; }
  .login-card-mode .login-brand h1 { margin: 10px 0 6px; font-size: 24px; }
  .login-card-mode .login-brand-copy > p { font-size: 13px; }
  .login-card-mode .login-features, .login-card-mode .login-brand-footer { display: none; }
  .login-card-mode .login-panel { min-height: auto; padding: 32px 24px 28px; }
  .work-type-options{grid-template-columns:1fr}.pricing-tabs{margin-top:16px}.combined-actions{position:static}.history-row{grid-template-columns:70px 1fr}.history-row time{grid-column:2}
}

@media (max-width: 560px) {
  .topbar-start > span { display: none; }
  .account { gap: 8px; }
  .account > div { max-width: 125px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .text-button { padding: 6px 4px; }
  .profile-section { padding: 21px 18px 4px; }
  .profile-actions { padding: 16px 18px 20px; }
  .profile-actions .button { width: 100%; }
  .page-heading { margin-bottom: 16px; }
  .card { margin-bottom: 16px; }
  .button { min-height: 40px; }
  .form-actions { padding: 14px; }
  .result-card { padding: 17px 15px; }
  .summary-grid { gap: 13px; }
  .login-logo { width: 105px; height: 44px; }
  .login-product { font-size: 9px; }
  .login-card-mode .login-brand { padding: 22px 20px 16px; }
  .login-card-mode .login-brand-copy { padding: 12px 0 4px; }
  .login-card-mode .login-brand h1 { font-size: 21px; }
  .login-card-mode .login-brand-copy > p { display: none; }
  .login-card-mode .login-panel { padding: 26px 18px 24px; }
}

/* Compact sidebar menu (many menu items): lighter text, tighter rows */
.sidebar .nav-caption { padding: 8px 10px 2px; }
.sidebar .nav-link { min-height: 0; margin-bottom: 1px; padding: 6px 10px; font-weight: 400; line-height: 1.3; }
.sidebar .nav-link.active { font-weight: 600; }
.sidebar .nav-link svg { width: 16px; height: 16px; }