/* Basic styling for Quote App */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  background-color: #f5f5f5;
  color: #333;
  line-height: 1.6;
  overflow-x: hidden;
}

:root {
  --brand-primary: #1f4e79;
  --brand-on-primary: #ffffff;
  --ui-nav-bg: #1f2937;
  --ui-nav-fg: #ffffff;
  --ui-table-head-bg: #334155;
  --ui-table-head-fg: #ffffff;
}

/* Navigation */
.navbar {
  background-color: var(--ui-nav-bg);
  color: var(--ui-nav-fg);
  padding: 1rem 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar-brand-wrap {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.navbar h1 {
  font-size: 1.5rem;
}

.navbar h1 a {
  color: var(--ui-nav-fg);
  text-decoration: none;
}

.navbar-company-context {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: var(--ui-nav-fg);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.78rem;
  font-weight: 600;
}

.navbar-menu {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.navbar-menu a {
  color: var(--ui-nav-fg);
  text-decoration: none;
  display: inline-block;
  padding: 0.25rem 0.45rem;
  border-radius: 6px;
  transition: opacity 0.3s, background-color 0.2s;
  border-bottom: none;
}

.navbar-menu a:hover {
  opacity: 1;
  background-color: rgba(255, 255, 255, 0.12);
}

.account-menu {
  position: relative;
}

.account-menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ui-nav-fg);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.34rem 0.56rem;
  cursor: pointer;
}

.account-menu-trigger:hover {
  background: rgba(255, 255, 255, 0.16);
}

.account-avatar {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-primary);
  color: var(--brand-on-primary);
  font-size: 0.76rem;
  font-weight: 700;
  overflow: hidden;
}

.account-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  padding: 0.35rem;
  border: 1px solid #dbe3ee;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.16);
  z-index: 1500;
}

.account-dropdown a {
  display: block;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  color: #334155;
  text-decoration: none;
  border-bottom: none;
}

.account-dropdown a:hover {
  background: #f1f5f9;
}

.account-dropdown-group-label {
  margin: 0.4rem 0.5rem 0.25rem;
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.account-notice-badge {
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #dc2626;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0 5px;
}

.navbar-menu-public {
  gap: 1rem;
}

.navbar-cta-link {
  background: #1d4ed8;
  color: #fff !important;
}

.navbar-cta-link:hover {
  background: #1e40af;
}

.navbar-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 6px;
  background: transparent;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  padding: 0;
  cursor: pointer;
}

.navbar-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: #fff;
}

/* Main content */
main {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
  min-height: calc(100vh - 200px);
}

/* Alerts */
.alert {
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 4px;
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-danger {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.app-toast-container {
  position: fixed;
  right: 16px;
  bottom: 16px;
  display: grid;
  gap: var(--space-1);
  z-index: 2600;
  pointer-events: none;
}

.app-toast {
  min-width: 220px;
  max-width: 360px;
  border-radius: 10px;
  border: 1px solid #dbe3ee;
  background: #0f172a;
  color: #fff;
  padding: 0.52rem 0.7rem;
  font-size: 0.87rem;
  font-weight: 600;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.24);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.app-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.app-toast.is-success {
  background: #166534;
  border-color: #22c55e;
}

.app-toast.is-error {
  background: #991b1b;
  border-color: #ef4444;
}

.app-toast.is-warn {
  background: #92400e;
  border-color: #f59e0b;
}

/* Forms */
form div {
  margin-bottom: 1rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: inherit;
  font-size: 1rem;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #2c3e50;
  box-shadow: 0 0 5px rgba(44, 62, 80, 0.1);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 16px;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.25s ease, box-shadow 0.2s ease, transform 0.2s ease;
  vertical-align: middle;
  appearance: none;
  -webkit-appearance: none;
}

.btn-primary,
input[type="submit"].btn {
  background-color: #1f3650;
  color: #ffffff;
}

.btn-primary:hover,
input[type="submit"].btn:hover {
  background-color: #17293d;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.15);
  transform: translateY(-1px);
}

input[type="submit"] {
  height: 40px;
  padding: 0 16px;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  line-height: 1;
  background-color: #2c3e50;
  color: white;
  cursor: pointer;
}

input[type="submit"]:hover {
  background-color: #1a252f;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.15);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: #95a5a6;
  color: white;
}

.btn:hover {
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.12);
}

.btn-secondary:hover {
  background-color: #7f8c8d;
}

.btn-success {
  background-color: #27ae60;
  color: white;
}

.btn-success:hover {
  background-color: #1e8449;
}

.btn-danger {
  background-color: #e74c3c;
  color: white;
}

.btn-danger:hover {
  background-color: #c0392b;
}

.btn-info {
  background-color: #3498db;
  color: white;
}

.btn-info:hover {
  background-color: #2980b9;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

table thead {
  background-color: var(--ui-table-head-bg);
  color: var(--ui-table-head-fg);
}

table th,
table td {
  padding: 0.62rem 0.68rem;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: middle;
}

table tbody tr:hover {
  background-color: #f8fafc;
}

table a {
  color: #2c3e50;
  text-decoration: none;
}

table a:hover {
  text-decoration: underline;
}

.table-responsive {
  width: 100%;
}

/* Follow-up status highlighting */
.customer-row.follow-up-overdue {
  background-color: #ffe6e6;
}

.customer-row.follow-up-overdue:hover {
  background-color: #ffcccc;
}

.customer-row.follow-up-upcoming {
  background-color: #fff9e6;
}

.customer-row.follow-up-upcoming:hover {
  background-color: #fff3cc;
}

.customer-row.follow-up-today {
  background-color: #e9f3ff;
}

.customer-row.follow-up-today:hover {
  background-color: #dbeafe;
}

.overdue-badge {
  display: inline-block;
  background-color: #e74c3c;
  color: white;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 0.5rem;
}

.upcoming-badge {
  display: inline-block;
  background-color: #f39c12;
  color: white;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 0.5rem;
}

.today-badge {
  display: inline-block;
  background-color: #2563eb;
  color: white;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 0.5rem;
}

.customer-name-link {
  color: #1f2937;
  text-decoration: none;
}

.customer-name-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.customer-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 16px 0;
  color: #64748b;
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
}

.customer-back-link:hover {
  color: #334155;
  text-decoration: underline;
}

.quote-history {
  margin-top: var(--space-2);
}

.quote-history h3 {
  margin: 0 0 var(--space-1) 0;
}

.quote-history-meta {
  margin: calc(var(--space-1) * -0.25) 0 var(--space-1) 0;
  display: flex;
  gap: var(--space-1);
  flex-wrap: wrap;
  color: #64748b;
  font-size: 0.82rem;
}

.quote-history-tabs {
  display: flex;
  gap: var(--space-1);
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.history-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  flex: 0 0 auto;
}

.history-tab:hover {
  background: #eef2f7;
  border-color: #94a3b8;
}

.history-tab.active {
  background: #1d4ed8;
  color: #fff;
  border-color: #1d4ed8;
}

.history-tab-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 0.67rem;
  font-weight: 700;
}

.history-tab.active .history-tab-tag {
  background: rgba(255, 255, 255, 0.24);
  color: #fff;
}

.history-tab-tag.history-tab-tag-latest {
  background: #ecfdf5;
  color: #047857;
}

.history-tab.active .history-tab-tag.history-tab-tag-latest {
  background: rgba(16, 185, 129, 0.26);
  color: #d1fae5;
}

.share-link-group {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.share-link-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 250px;
  max-width: 320px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  padding: 0.55rem 0.65rem;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16);
  z-index: 2200;
}

.share-link-panel-message {
  font-size: 0.84rem;
  color: #0f172a;
  font-weight: 600;
  line-height: 1.35;
}

.share-link-panel-actions {
  margin-top: 0.5rem;
  display: flex;
  gap: 0.4rem;
}

.share-link-panel-btn {
  border: 1px solid #94a3b8;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  text-decoration: none;
  cursor: pointer;
}

.share-link-panel-btn:hover {
  border-color: #475569;
  color: #0f172a;
}

.share-link-panel-btn.is-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.share-link-panel.is-error {
  border-color: #fecaca;
  background: #fef2f2;
}

.share-link-panel.is-error .share-link-panel-message {
  color: #991b1b;
}

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

.sales-dashboard {
  margin-bottom: 1rem;
}

.sales-dashboard-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.kpi-period-toggle {
  display: inline-flex;
  gap: var(--space-1);
}

.sales-dashboard-toggle {
  height: 34px;
  padding: 0 12px;
  font-size: 0.88rem;
}

.sales-dashboard-summary {
  margin-top: var(--space-1);
  margin-bottom: var(--space-1);
  display: flex;
  gap: var(--space-1);
  flex-wrap: wrap;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  background: #f8fbff;
  padding: var(--space-1) var(--space-2);
  color: #334155;
  font-size: 0.9rem;
}

.sales-dashboard-summary strong {
  color: #0f172a;
  font-weight: 700;
}

.dashboard-kpi-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: var(--space-1);
  margin-bottom: var(--space-1);
}

.dashboard-kpi-card {
  background: #fff;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  padding: 0.95rem 1.05rem;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.dashboard-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
}

.dashboard-kpi-head {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.dashboard-kpi-icon {
  width: 20px;
  height: 20px;
  color: #2563eb;
  display: inline-flex;
}

.dashboard-kpi-icon svg {
  width: 100%;
  height: 100%;
}

.dashboard-kpi-head span {
  display: block;
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 600;
}

.dashboard-kpi-card strong {
  display: block;
  margin-top: 0.26rem;
  color: #0f172a;
  font-size: 1.7rem;
  line-height: 1.05;
}

.dashboard-kpi-trend {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.76rem;
  font-weight: 600;
}

.dashboard-kpi-trend.is-up {
  color: #15803d;
}

.dashboard-kpi-trend.is-down {
  color: #b45309;
}

.dashboard-kpi-health {
  margin-top: var(--space-1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  padding: 0 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
}

.dashboard-kpi-health.is-good {
  border-color: #86efac;
  background: #ecfdf5;
  color: #166534;
}

.dashboard-kpi-health.is-stable {
  border-color: #c7d2fe;
  background: #f8fafc;
  color: #334155;
}

.dashboard-kpi-health.is-watch {
  border-color: #e2e8f0;
  background: #f8fafc;
  color: #475569;
}

.dashboard-kpi-health.is-risk {
  border-color: #e2e8f0;
  background: #f8fafc;
  color: #64748b;
}

.dashboard-kpi-health.is-attention {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.dashboard-kpi-health.is-neutral {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #475569;
}

.dashboard-alert-strip {
  margin-bottom: var(--space-1);
  display: flex;
  gap: var(--space-1);
  flex-wrap: wrap;
}

.dashboard-alert-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  padding: 0 0.7rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.dashboard-alert-pill strong {
  margin-right: 0.22rem;
}

.dashboard-alert-pill.is-danger {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.dashboard-alert-pill.is-today {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.dashboard-alert-pill.is-watch {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.dashboard-alert-pill.is-good {
  border-color: #bbf7d0;
  background: #ecfdf5;
  color: #166534;
}

.dashboard-detail-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: var(--space-1);
}

.dashboard-panel {
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
  padding: var(--space-2);
}

.dashboard-panel h2 {
  margin: 0 0 var(--space-1) 0;
  color: #0f172a;
  font-size: 1rem;
  font-weight: 600;
}

.dashboard-action-center {
  margin-bottom: var(--space-1);
}

.dashboard-action-summary {
  margin-bottom: var(--space-1);
}

.dashboard-action-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-1);
  flex-wrap: wrap;
}

.dashboard-action-summary-head h2 {
  margin: 0;
}

.dashboard-action-summary-risk {
  margin-left: auto;
}

.dashboard-action-summary-note {
  margin: var(--space-1) 0 0 0;
  color: #64748b;
  font-size: 0.88rem;
}

.dashboard-action-list {
  display: grid;
  gap: var(--space-1);
}

.dashboard-action-item {
  border: 1px solid #dbe3ee;
  border-radius: 10px;
  background: #f8fafc;
  padding: var(--space-1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-1);
  flex-wrap: wrap;
}

.dashboard-action-item-primary {
  padding: var(--space-2);
}

.dashboard-action-primary-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  padding: 0 0.45rem;
  border-radius: 999px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.68rem;
  font-weight: 700;
  margin-bottom: var(--space-1);
}

.dashboard-action-item strong {
  color: #0f172a;
  font-size: 0.92rem;
}

.dashboard-action-item p {
  margin: var(--space-1) 0 0 0;
  color: #475569;
  font-size: 0.84rem;
}

.dashboard-action-item.is-urgent {
  border-color: #fecaca;
  background: #fef2f2;
}

.dashboard-action-item.is-today {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.dashboard-action-item.is-watch {
  border-color: #fde68a;
  background: #fffbeb;
}

.dashboard-action-item.is-normal {
  border-color: #dbe3ee;
  background: #f8fafc;
}

.dashboard-action-secondary-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 18px;
  padding: 0 0.4rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  font-size: 0.66rem;
  font-weight: 700;
  margin-bottom: var(--space-1);
}

.dashboard-action-link {
  min-height: 30px;
  height: 30px;
  border-radius: 999px;
  font-size: 0.8rem;
  padding: 0 var(--space-2);
}

.dashboard-action-more {
  display: grid;
  gap: var(--space-1);
  margin-top: var(--space-1);
}

.dashboard-action-more[hidden] {
  display: none;
}

.dashboard-action-toggle {
  margin-top: var(--space-1);
  cursor: pointer;
  user-select: none;
}

.dashboard-recent-table {
  box-shadow: none;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

.dashboard-recent-table thead {
  background: #1f3650;
}

.dashboard-recent-table th,
.dashboard-recent-table td {
  padding: 0.52rem 0.62rem;
  font-size: 0.86rem;
  vertical-align: middle;
  white-space: nowrap;
}

.dashboard-panel-note {
  margin: 0 0 var(--space-1) 0;
  color: #64748b;
  font-size: 0.8rem;
}

.dashboard-recent-table tbody tr {
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.dashboard-recent-table tbody tr:hover {
  background: #f8fafc;
  box-shadow: inset 0 0 0 1px #e2e8f0;
}

.dashboard-recent-table tbody tr:hover .dashboard-next-step-btn {
  background: #e2e8f0;
  border-color: #94a3b8;
}

.dashboard-overview-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-1);
}

.dashboard-overview-list li {
  border-bottom: 1px solid #e2e8f0;
  border-radius: 0;
  background: transparent;
  padding: var(--space-1) 0;
}

.dashboard-overview-list li:last-child {
  border-bottom: none;
}

.dashboard-overview-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-1);
}

.dashboard-overview-list span {
  display: block;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 600;
}

.dashboard-overview-label-row small {
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 600;
}

.dashboard-overview-list strong,
.dashboard-overview-value {
  display: block;
  margin-top: var(--space-1);
  color: #0f172a;
  font-size: 1.1rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.dashboard-overview-insight {
  margin-top: var(--space-1);
  color: #64748b;
  font-size: 0.8rem;
}

.dashboard-next-step-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: transparent;
  color: #334155;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0 0.5rem;
  text-decoration: none;
  border-bottom: none;
  white-space: nowrap;
  line-height: 1;
}

.dashboard-next-step-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.dashboard-next-step-btn.is-primary {
  border-color: #cbd5e1;
  background: transparent;
  color: #334155;
}

.dashboard-next-step-btn.is-watch {
  border-color: #cbd5e1;
  background: transparent;
  color: #334155;
}

.dashboard-next-step-btn.is-attention {
  border-color: #cbd5e1;
  background: transparent;
  color: #334155;
}

.dashboard-engagement-pill {
  font-size: 0.76rem;
  font-weight: 500;
  color: #94a3b8;
}

.dashboard-engagement-pill.is-subtle {
  color: #cbd5e1;
}

.dashboard-next-step-btn.is-neutral {
  border-color: #cbd5e1;
  background: transparent;
  color: #475569;
}

.dashboard-recent-table .text-right {
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.follow-up-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.summary-card {
  background: #fff;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.summary-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 14px rgba(15, 23, 42, 0.08);
}

.summary-card.active {
  border-color: #1d4ed8;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

.summary-card strong {
  font-size: 1.2rem;
  color: #0f172a;
}

.summary-currency-lines {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.12rem;
}

.summary-currency-lines strong {
  font-size: 0.95rem;
}

.currency-lines-toggle {
  margin-top: 0.18rem;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.46rem;
  cursor: pointer;
}

.currency-lines-toggle:hover {
  border-color: #94a3b8;
  color: #0f172a;
}

.summary-label-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.summary-icon {
  color: #475569;
  width: 14px;
  height: 14px;
  display: inline-flex;
}

.summary-icon svg {
  width: 100%;
  height: 100%;
}

.summary-label {
  font-size: 0.86rem;
  color: #475569;
  font-weight: 600;
}

.summary-today { border-left: 4px solid #2563eb; background: linear-gradient(90deg, #eff6ff 0%, #ffffff 65%); }
.summary-upcoming { border-left: 4px solid #f59e0b; background: linear-gradient(90deg, #fffbeb 0%, #ffffff 65%); }
.summary-overdue { border-left: 4px solid #dc2626; background: linear-gradient(90deg, #fef2f2 0%, #ffffff 65%); }
.summary-normal { border-left: 4px solid #9ca3af; background: linear-gradient(90deg, #f8fafc 0%, #ffffff 65%); }
.summary-won { border-left: 4px solid #16a34a; }
.summary-lost { border-left: 4px solid #dc2626; }

.quote-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: var(--space-1);
  margin-bottom: var(--space-2);
}

.quote-filter-bar {
  display: flex;
  gap: var(--space-1);
  flex-wrap: wrap;
  margin-bottom: var(--space-2);
}

.quote-filter-pill {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  font-size: 0.85rem;
  background: #fff;
  color: #334155;
}

.quote-filter-pill:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.quote-filter-pill.active {
  background: #1d4ed8;
  color: #fff;
  border-color: #1d4ed8;
}

.customer-list-filters {
  display: flex;
  gap: var(--space-1);
  flex-wrap: wrap;
  margin-bottom: var(--space-2);
}

.customer-list-filters .quote-filter-pill {
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.customer-list-filters .quote-filter-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(37, 99, 235, 0.16);
}

.customer-sort-link {
  color: #f8fafc;
  text-decoration: none;
  font-weight: 600;
}

.customer-sort-link-with-icon {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

.sort-indicator {
  font-size: 0.72rem;
  font-weight: 700;
}

.sort-indicator.is-neutral {
  opacity: 0.7;
}

.sort-indicator.is-asc,
.sort-indicator.is-desc {
  color: #bfdbfe;
}

.customer-sort-link:hover {
  color: #dbeafe;
  text-decoration: underline;
}

.customers-empty-row {
  text-align: center;
  color: #4b5563;
  padding: 1.25rem;
}

.customers-table {
  border-radius: 12px;
  overflow: hidden;
}

.customers-table thead th {
  font-size: 0.86rem;
  letter-spacing: 0.01em;
}

.customers-table tbody tr {
  transition: background-color 0.14s ease;
}

.customers-table tbody tr:nth-child(even):not(.follow-up-overdue):not(.follow-up-upcoming):not(.follow-up-today) {
  background: #fbfdff;
}

.customers-table tbody tr:hover td {
  background: #f5f9ff;
}

.customer-row.risk-high td {
  background: #fff4f4;
}

.customer-row.risk-medium td {
  background: #fff9eb;
}

.customers-mobile-list {
  display: none;
}

.customer-mobile-card {
  background: #fff;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
  overflow: hidden;
}

.customer-mobile-card.risk-high {
  border-color: #fecaca;
}

.customer-mobile-card.risk-medium {
  border-color: #fde68a;
}

.customer-mobile-head {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-2);
  border-bottom: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.customer-mobile-title-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-1);
}

.customer-mobile-title-wrap .customer-name-link {
  font-size: 1rem;
}

.customer-mobile-next {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  flex-wrap: wrap;
}

.customer-mobile-next-label {
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 600;
}

.customer-mobile-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.customer-mobile-metric {
  padding: var(--space-1) var(--space-2);
  border-top: 1px solid #e2e8f0;
}

.customer-mobile-metric:nth-child(odd) {
  border-right: 1px solid #e2e8f0;
}

.customer-mobile-metric span {
  display: block;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 600;
}

.customer-mobile-metric strong {
  display: block;
  margin-top: 0.25rem;
  color: #0f172a;
  font-size: 0.96rem;
}

.customer-mobile-details {
  border-top: 1px solid #e2e8f0;
  background: #fafcff;
}

.customer-mobile-details summary {
  cursor: pointer;
  list-style: none;
  padding: var(--space-1) var(--space-2);
  color: #2563eb;
  font-size: 0.85rem;
  font-weight: 600;
}

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

.customer-mobile-details-grid {
  display: grid;
  gap: var(--space-1);
  padding: 0 var(--space-2) var(--space-2);
}

.customer-mobile-detail-item {
  display: flex;
  justify-content: space-between;
  gap: var(--space-1);
}

.customer-mobile-detail-item span {
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 600;
}

.customer-mobile-detail-item strong {
  font-size: 0.88rem;
  color: #0f172a;
  overflow-wrap: anywhere;
}

.next-action-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.14rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid #cbd5e1;
  color: #334155;
  background: #f8fafc;
  white-space: nowrap;
}

.next-action-pill.is-danger {
  border-color: #fecaca;
  color: #991b1b;
  background: #fef2f2;
}

.next-action-pill.is-today {
  border-color: #bfdbfe;
  color: #1d4ed8;
  background: #eff6ff;
}

.next-action-pill.is-upcoming {
  border-color: #fde68a;
  color: #92400e;
  background: #fffbeb;
}

.next-action-pill.is-muted {
  border-color: #cbd5e1;
  color: #475569;
  background: #f8fafc;
}

.global-app-footer {
  margin: 1rem auto 1.4rem;
  max-width: 1240px;
  padding: 0 1rem;
  display: flex;
  justify-content: flex-end;
}

.global-app-footer-public {
  max-width: 920px;
  padding: 0;
  margin-top: 1rem;
}

.app-version-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.2rem 0.6rem;
}

.quote-card-list {
  display: grid;
  gap: var(--space-1);
}

.quote-card-list-scroll {
  max-height: 760px;
  overflow-y: auto;
  padding-right: 0.2rem;
}

.quote-card-list[hidden] {
  display: none;
}

.quote-pagination {
  margin-top: var(--space-1);
  display: flex;
  align-items: center;
  gap: var(--space-1);
  flex-wrap: wrap;
}

.quote-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.9rem 1rem;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.quote-card-action-callout {
  margin-bottom: var(--space-1);
  border: 1px solid #dbeafe;
  background: #f8fbff;
  color: #1e3a8a;
  border-radius: 8px;
  padding: var(--space-1);
  font-size: 0.84rem;
}

.quote-card-action-callout.is-urgent {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.quote-card:hover {
  transform: translateY(-1px);
  border-color: #cbd5e1;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.09);
}

.quote-card-layout {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.quote-card-main {
  flex: 1;
  min-width: 0;
}

.quote-card-side {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  min-width: 150px;
}

.quote-card-main h4 {
  margin: 0;
  font-size: 1.03rem;
  color: #0f172a;
}

.quote-card-badges {
  display: flex;
  gap: var(--space-1);
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.revision-pill {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 700;
}

.status-expired {
  background-color: #e5e7eb;
  color: #374151;
}

.quote-card-meta {
  margin-top: var(--space-2);
  display: grid;
  gap: var(--space-1);
  justify-items: start;
}

.quote-card-meta p {
  margin: 0;
  text-align: left;
}

.quote-total-value {
  font-size: 1.05rem;
  color: #0f172a;
}

.quote-card-diff {
  margin-top: var(--space-2);
  display: grid;
  flex-wrap: wrap;
  gap: var(--space-1);
  color: #475569;
  font-size: 0.92rem;
  justify-items: start;
}

.quote-card-diff .diff-value {
  font-weight: 700;
}

.quote-card-diff .diff-value.up {
  color: #b91c1c;
}

.quote-card-diff .diff-value.down {
  color: #15803d;
}

.quote-card-actions {
  margin-top: var(--space-2);
  display: flex;
  gap: var(--space-1);
  flex-wrap: wrap;
  align-items: center;
}

.quote-card-actions .button_to {
  margin: 0;
  display: inline-flex;
}

.quote-card-actions .btn {
  margin: 0;
}

/* Lists */
ul,
ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

li {
  margin-bottom: 0.5rem;
}

.status-potential {
  background-color: #d1ecf1;
  color: #0c5460;
}

.status-following {
  background-color: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.mini-progress {
  margin-top: 0.38rem;
  margin-left: auto;
  width: 78px;
  height: 6px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.mini-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: #2563eb;
}

.status-closed {
  background-color: #e2e3e5;
  color: #383d41;
}

.status-new {
  background-color: #e0f2fe;
  color: #075985;
  border-color: #bae6fd;
}

.status-contacted {
  background-color: #ede9fe;
  color: #5b21b6;
  border-color: #ddd6fe;
}

.status-quoting {
  background-color: #fff7ed;
  color: #9a3412;
  border-color: #fed7aa;
}

.status-inactive {
  background-color: #f1f5f9;
  color: #475569;
  border-color: #cbd5e1;
}

/* Details sections */
.customer-details,
.quote-details {
  background: white;
  padding: 1.5rem;
  border-radius: 4px;
  margin-bottom: 2rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.customer-details p,
.quote-details p {
  margin-bottom: 0.75rem;
}

.customer-top-summary {
  margin-top: 0.65rem;
  margin-bottom: 0.8rem;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
}

.customer-next-follow-up-line {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  border-radius: 0;
  padding: 0;
  margin-left: 0;
}

.customer-next-follow-up-line strong {
  min-width: 0;
}

.customer-next-follow-up-line.follow-up-today {
  background: transparent;
}

.customer-next-follow-up-line.follow-up-overdue {
  background: transparent;
}

.customer-follow-up-callout {
  margin: -0.45rem 0 1rem 0;
  border: 1px solid #dbeafe;
  background: #f8fbff;
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.customer-follow-up-callout strong {
  display: block;
  color: #0f172a;
  margin-top: 0.15rem;
}

.customer-follow-up-meta {
  margin-top: 0.35rem;
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  color: #475569;
  font-size: 0.82rem;
}

.customer-follow-up-callout.follow-up-overdue {
  border-color: #fecaca;
  background: #fef2f2;
}

.customer-follow-up-callout.follow-up-today {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.customer-follow-up-callout.follow-up-upcoming {
  border-color: #fde68a;
  background: #fffbeb;
}

.customer-follow-up-callout-actions {
  display: flex;
  gap: var(--space-1);
  flex-wrap: wrap;
}

.customer-follow-up-callout-actions .button_to {
  margin: 0;
}

.customer-task-board,
.customer-timeline {
  background: #fff;
  border: 1px solid #dbe3ee;
  border-radius: 10px;
  padding: var(--space-2);
  margin: 0 0 var(--space-2) 0;
}

.customer-task-board h3,
.customer-timeline h3 {
  margin: 0 0 var(--space-1) 0;
}

.customer-task-list {
  display: grid;
  gap: var(--space-1);
}

.customer-task-more[hidden] {
  display: none;
}

.customer-task-toggle {
  margin-top: var(--space-1);
}

.customer-task-card {
  border: 1px solid #dbe3ee;
  border-radius: 9px;
  background: #f8fbff;
  padding: var(--space-1) var(--space-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-1);
  flex-wrap: wrap;
}

.customer-task-card.is-urgent {
  border-color: #fecaca;
  background: #fef2f2;
}

.customer-task-card.is-today {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.customer-task-card.is-upcoming {
  border-color: #fde68a;
  background: #fffbeb;
}

.customer-task-priority {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  padding: 0 0.48rem;
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.customer-task-meta h4 {
  margin: var(--space-1) 0 0 0;
  color: #0f172a;
  font-size: 0.97rem;
}

.customer-task-meta p {
  margin: var(--space-1) 0 0 0;
  color: #475569;
  font-size: 0.88rem;
}

.customer-task-actions {
  display: inline-flex;
  align-items: center;
}

.customer-task-actions-note {
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 600;
}

.customer-task-actions .button_to {
  margin: 0;
}

.customer-engagement-badge.is-active {
  background: #ecfdf5;
  color: #166534;
}

.customer-engagement-badge.is-cooling {
  background: #fffbeb;
  color: #92400e;
}

.customer-engagement-badge.is-risk {
  background: #fef2f2;
  color: #991b1b;
}

.customer-timeline-list {
  display: grid;
  gap: var(--space-1);
}

.customer-timeline-list-scroll {
  max-height: 440px;
  overflow-y: auto;
  padding-right: 0.2rem;
}

.customer-timeline-item {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: var(--space-1);
  align-items: start;
}

.customer-timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-top: var(--space-1);
  background: #94a3b8;
  box-shadow: 0 0 0 3px #f1f5f9;
}

.customer-timeline-item.is-good .customer-timeline-dot {
  background: #16a34a;
}

.customer-timeline-item.is-urgent .customer-timeline-dot {
  background: #dc2626;
}

.customer-timeline-item.is-today .customer-timeline-dot {
  background: #2563eb;
}

.customer-timeline-content {
  border-left: 1px solid #e2e8f0;
  padding-left: var(--space-1);
  padding-bottom: var(--space-1);
}

.customer-timeline-time {
  margin: 0;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 600;
}

.customer-timeline-content h4 {
  margin: var(--space-1) 0 0 0;
  color: #0f172a;
  font-size: 0.95rem;
}

.customer-timeline-content p {
  margin: var(--space-1) 0 0 0;
  color: #475569;
  font-size: 0.88rem;
}

.customer-timeline-toggle {
  margin-top: var(--space-1);
}

.customer-timeline-more {
  display: grid;
  gap: var(--space-1);
  max-height: 360px;
  overflow-y: auto;
  padding-right: 0.2rem;
}

.customer-timeline-hint {
  margin: 0 0 var(--space-1) 0;
  color: #475569;
  font-size: 0.86rem;
}

.customer-timeline-subhead {
  margin: var(--space-1) 0;
  color: #334155;
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.customer-timeline-system {
  margin-top: var(--space-1);
  border-top: 1px dashed #dbe3ee;
  padding-top: var(--space-1);
}

.customer-timeline-more[hidden] {
  display: none;
}

.quote-queue-toolbar {
  margin-top: var(--space-1);
  margin-bottom: var(--space-1);
  border: 1px solid #dbe3ee;
  border-radius: 10px;
  background: #fff;
  padding: var(--space-1) var(--space-2);
}

.quote-queue-toolbar-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px auto;
  gap: var(--space-1);
  align-items: center;
}

.quote-action-primary {
  min-width: 150px;
}

.quote-expand-toggle {
  margin-top: var(--space-1);
}

.quotes-mode-note {
  margin: -0.2rem 0 0.2rem 0;
  color: #475569;
  font-size: 0.84rem;
}

.quotes-structure-note {
  margin: 0 0 var(--space-1) 0;
  color: #64748b;
  font-size: 0.82rem;
  display: flex;
  gap: var(--space-1);
  flex-wrap: wrap;
}

.quotes-structure-note strong {
  color: #0f172a;
}

.final-amount {
  color: #27ae60;
  font-weight: 600;
}

/* Quote Items Table */
.quote-items-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px;
  margin: 1rem 0;
  background: transparent;
  overflow: visible;
  box-shadow: none;
}

.quote-items-responsive {
  overflow: visible;
}

.quote-items-table thead {
  background-color: #34495e;
  color: white;
}

.quote-items-table th {
  padding: 0.7rem 0.8rem;
  text-align: left;
  font-size: 0.88rem;
  letter-spacing: 0.01em;
}

.quote-items-table td {
  padding: 0.74rem;
  border-top: 1px solid #d8e1eb;
  border-bottom: 1px solid #d8e1eb;
  overflow: visible;
  position: relative;
  background: #fff;
  vertical-align: middle;
}

.quote-items-table td:first-child {
  border-left: 1px solid #d8e1eb;
  border-radius: 10px 0 0 10px;
}

.quote-items-table td:last-child {
  border-right: 1px solid #d8e1eb;
  border-radius: 0 10px 10px 0;
}

.quote-items-table tbody tr:hover td {
  background-color: #f8fbff;
}

.quote-col-product { width: 32%; }
.quote-col-desc { width: 20%; }
.quote-col-specs { width: 16%; }
.quote-col-addons { width: 16%; }
.quote-col-price { width: 8%; }
.quote-col-qty { width: 8%; }
.quote-col-remove { width: 10%; }

.quote-col-remove .btn {
  width: 100%;
  min-width: 92px;
}

.quote-item-remove-icon {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid #fecaca;
  background: #fff1f2;
  color: #b91c1c;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.quote-item-remove-icon:hover {
  background: #fee2e2;
  box-shadow: 0 2px 8px rgba(185, 28, 28, 0.15);
}

.quote-item-remove-icon:active {
  transform: translateY(1px);
}

.quote-col-specs textarea,
.quote-col-addons textarea {
  min-width: 170px;
  min-height: 96px;
  resize: vertical;
  line-height: 1.35;
}

.quote-items-table th {
  white-space: nowrap;
}

.quote-item-row {
  position: relative;
}

.quote-item-row.is-dropdown-open {
  z-index: 40;
}

.quote-item-row.is-new {
  animation: quoteRowIn 220ms ease-out;
}

.quote-document {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.25rem 1.25rem 1.5rem;
  box-shadow: 0 6px 18px rgba(17, 24, 39, 0.06);
}

.quote-doc-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  border-bottom: 1px solid #edf2f7;
  padding-bottom: 0.85rem;
  margin-bottom: 1rem;
}

.quote-signal-strip {
  margin: 0.75rem 0 0.95rem;
  padding: 0.54rem 0.68rem;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  background: #f8fbff;
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 0.52rem;
}

.quote-signal-strip.is-urgent {
  border-color: #fde68a;
  background: #fffbeb;
}

.quote-signal-item {
  display: grid;
  gap: 0.12rem;
}

.quote-signal-label {
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
  font-weight: 700;
}

.quote-signal-item strong {
  color: #0f172a;
  font-size: 0.88rem;
  line-height: 1.3;
}

.quote-doc-kicker {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: #64748b;
  margin-bottom: 0.25rem;
}

.quote-doc-header h1 {
  margin: 0;
  color: #0f172a;
  font-size: 1.45rem;
}

.quote-doc-version {
  color: #475569;
  font-size: 1rem;
}

.quote-doc-subline {
  color: #64748b;
  margin-top: 0.2rem;
}

.quote-doc-logo-wrap {
  min-width: 150px;
  text-align: right;
}

.quote-doc-logo {
  max-height: 64px;
  max-width: 180px;
}

.quote-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.quote-engagement-details {
  margin: 0.15rem 0 0.8rem 0;
  border: none;
  border-radius: 8px;
  background: transparent;
}

.quote-engagement-details summary {
  cursor: pointer;
  list-style: none;
  padding: 0.2rem 0.15rem;
  font-size: 0.76rem;
  font-weight: 600;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  gap: 0.36rem;
}

.quote-engagement-details summary::before {
  content: "▶";
  font-size: 0.66rem;
  color: #94a3b8;
  transition: transform 0.12s ease;
}

.quote-engagement-details[open] summary::before {
  transform: rotate(90deg);
}

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

.quote-engagement-details-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem 0.7rem;
  margin-top: 0.28rem;
  padding: 0.5rem 0.6rem 0.55rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.quote-engagement-details-grid p {
  margin: 0;
  font-size: 0.85rem;
  color: #334155;
}

.quote-meta-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
}

.quote-meta-card h3 {
  margin: 0 0 0.35rem 0;
  font-size: 0.95rem;
  color: #1e293b;
}

.quote-meta-card p {
  margin-bottom: 0.2rem;
  font-size: 0.9rem;
}

.quote-doc-table thead {
  background-color: #1f3650;
}

.quote-item-image {
  width: 52px;
  height: 52px;
  max-width: 100%;
  display: block;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #dbe1e8;
}

.quote-item-details {
  margin-top: 0.35rem;
  font-size: 0.82rem;
  color: #475569;
  line-height: 1.35;
  text-align: left;
}

.quote-total-box {
  margin-top: 0.38rem;
  margin-left: auto;
  max-width: 360px;
  border: 1px solid #dce7f2;
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  background: #f8fbff;
}

.quote-total-box p {
  margin: 0.35rem 0;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: baseline;
  font-variant-numeric: tabular-nums;
}

.quote-total-box p:not(.quote-total-grand) {
  color: #64748b;
}

.quote-total-grand {
  padding-top: 0.42rem;
  border-top: 1px solid #9fb4c8;
  font-size: 1.2rem;
  font-weight: 700;
}

.quote-total-grand span {
  color: #0f172a;
  font-weight: 500;
}

.quote-section-block {
  margin-top: 1rem;
  border-top: 1px solid #edf2f7;
  padding-top: 0.75rem;
}

.quote-section-block h3 {
  margin: 0 0 0.5rem 0;
}

.quote-section-block p {
  margin-bottom: 0.35rem;
}

.quote-public-actions {
  margin-top: 1rem;
}

.quote-back-link {
  color: #475569;
  font-size: 0.95rem;
  text-decoration: none;
}

.quote-back-link:hover {
  color: #1e293b;
  text-decoration: underline;
}

.quote-back-link-inline {
  display: inline-block;
  margin-top: 0.45rem;
}

.quote-form-hint {
  margin-top: -8px;
  color: #6b7280;
  margin-bottom: 0.4rem;
}

.quote-form-hint-warning {
  margin-top: 0;
  color: #9a3412;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 0.45rem 0.55rem;
}

.quote-edit-shell {
  display: grid;
  gap: 1rem;
}

.quote-edit-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 0.7rem;
}

.quote-edit-summary-card {
  background: #fff;
  border: 1px solid #dce6f0;
  border-radius: 10px;
  padding: 0.7rem 0.75rem;
  display: grid;
  gap: 0.28rem;
}

.quote-edit-summary-card strong {
  color: #0f172a;
  font-size: 1.02rem;
}

.quote-form-section {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.9rem 1rem;
}

.quote-form-section h3 {
  margin: 0 0 0.75rem 0;
}

.quote-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 0.75rem;
}

.quote-form-grid-span-2 {
  grid-column: 1 / -1;
}

.quote-conditional[data-show-when-status] {
  display: none;
}

.quote-form-section-totals {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1rem;
  align-items: start;
}

.quote-live-totals {
  border: 1px solid #dce7f2;
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  background: #f8fbff;
}

.quote-live-totals h4 {
  margin: 0 0 0.55rem 0;
  color: #1f3650;
}

.quote-live-totals p {
  margin: 0.24rem 0;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}

.quote-live-totals .quote-live-grand {
  margin-top: 0.36rem;
  padding-top: 0.36rem;
  border-top: 1px dashed #9fb4c8;
}

.quote-live-totals .quote-live-grand strong {
  font-size: 1.08rem;
}

.quote-form-submit {
  margin-top: 0.35rem;
}

.quote-form-add-row {
  margin-top: 10px;
}

.product-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
}

.product-search .js-product-name {
  width: 100%;
  min-width: 180px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.product-search .js-product-name.is-matched {
  border-color: #16a34a;
  background: #f0fdf4;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.12);
}

.product-search .js-product-toggle {
  width: 36px;
  height: 36px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
  color: #334155;
  cursor: pointer;
  margin: 0;
  padding: 0;
  line-height: 1;
  font-size: 18px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.08s ease;
}

.product-search .js-product-toggle:hover {
  border-color: #94a3b8;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.product-search .js-product-toggle:active {
  transform: translateY(1px);
}

.product-search .js-product-toggle span {
  display: inline-block;
  transform: translateY(-1px);
}

.product-search .js-product-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  max-height: 240px;
  overflow: auto;
  z-index: 1200;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.product-search .js-product-dropdown.open-up {
  top: auto;
  bottom: calc(100% + 2px);
}

.product-search .js-product-dropdown.is-open {
  display: block;
  animation: productDropdownIn 120ms ease-out;
}

.product-search .js-product-option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: none;
  background: #fff;
  cursor: pointer;
  font-size: 0.95rem;
  margin: 0;
}

.product-search .js-product-option:hover {
  background: #f3f4f6;
}

.product-option-empty {
  padding: 6px 8px;
  color: #6b7280;
}

.product-feedback {
  min-height: 0;
  margin-top: 0.25rem;
  font-size: 0.76rem;
  color: #64748b;
}

.product-feedback:empty {
  display: none;
}

.product-feedback-ok {
  color: #15803d;
}

.product-feedback-muted {
  color: #64748b;
}

.product-feedback-warning {
  color: #b45309;
}

.input-error {
  border-color: #dc2626 !important;
  background: #fef2f2;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.12);
}

.field-error-message {
  margin-top: 0.35rem;
  color: #b91c1c;
  font-size: 0.85rem;
  font-weight: 600;
}

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

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

.form-page-back-link {
  display: inline-block;
  margin-top: 0.75rem;
}

.auth-page {
  min-height: calc(100vh - 220px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-card {
  width: 100%;
  max-width: 460px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  padding: 1.5rem;
}

.auth-links {
  margin-top: var(--space-2);
}

.auth-remember {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.auth-remember label {
  margin-bottom: 0;
}

/* Landing page */
.landing-hero {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 1.1rem;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

.landing-hero-copy {
  background: linear-gradient(160deg, #eff6ff 0%, #ffffff 45%, #f8fafc 100%);
  border: 1px solid #dce7f5;
  border-radius: 14px;
  padding: 1.35rem;
}

.landing-kicker {
  margin: 0 0 0.4rem 0;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: #1d4ed8;
  font-weight: 700;
}

.landing-hero-copy h1 {
  margin: 0;
  font-size: clamp(1.7rem, 3.2vw, 2.6rem);
  color: #0f172a;
  line-height: 1.12;
}

.landing-subtitle {
  margin-top: 0.85rem;
  color: #475569;
  max-width: 60ch;
}

.landing-cta {
  margin-top: 1rem;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.landing-ghost-btn {
  background: #fff;
  border: 1px solid #cbd5e1;
  color: #334155;
}

.landing-ghost-btn:hover {
  background: #f8fafc;
}

.landing-trust {
  margin-top: 0.75rem;
  color: #64748b;
  font-size: 0.9rem;
}

.landing-hero-panel {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 14px;
  padding: 1.15rem 1.2rem;
  border: 1px solid #1e293b;
}

.landing-hero-panel h3 {
  margin: 0 0 0.65rem 0;
  color: #f8fafc;
}

.landing-hero-panel ul {
  margin: 0;
  padding-left: 1rem;
}

.landing-hero-panel li {
  margin: 0 0 0.55rem 0;
}

.landing-proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
  margin-top: 0.3rem;
  margin-bottom: 0.9rem;
}

.landing-proof article {
  border: 1px solid #dbe5f1;
  border-radius: 10px;
  background: #fff;
  padding: 0.7rem 0.8rem;
}

.landing-proof strong {
  display: block;
  color: #0f172a;
  font-size: 1.06rem;
}

.landing-proof span {
  display: block;
  margin-top: 0.2rem;
  color: #64748b;
  font-size: 0.84rem;
}

.landing-section {
  margin-top: 1.15rem;
  background: #fff;
  border: 1px solid #dce2ec;
  border-radius: 14px;
  padding: 1.1rem 1.2rem;
}

.landing-section h2 {
  margin: 0 0 0.8rem 0;
}

.landing-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.landing-feature-card {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fbff;
  padding: 0.8rem 0.85rem;
}

.landing-feature-card h3 {
  margin: 0;
  color: #0f172a;
  font-size: 1rem;
}

.landing-feature-card p {
  margin: 0.45rem 0 0 0;
  color: #475569;
}

.landing-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.landing-step {
  background: #f8fafc;
  border: 1px solid #dbe3ee;
  border-radius: 10px;
  padding: 0.75rem;
  display: grid;
  gap: 0.35rem;
}

.landing-step strong {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #1d4ed8;
  color: #fff;
  font-size: 0.85rem;
}

.landing-step span {
  color: #334155;
}

.landing-faq details {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.7rem 0.8rem;
  margin-bottom: 0.5rem;
}

.landing-faq summary {
  cursor: pointer;
  font-weight: 600;
  color: #0f172a;
}

.landing-faq p {
  margin: 0.55rem 0 0 0;
  color: #475569;
}

.landing-contact-intro {
  margin: 0.45rem 0 0 0;
  color: #475569;
}

.landing-contact-layout {
  margin-top: 0.7rem;
  display: grid;
  grid-template-columns: 0.95fr 1.25fr;
  gap: 0.8rem;
}

.landing-contact-side {
  border: 1px solid #cddbeb;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 0.85rem 0.9rem;
}

.landing-contact-side-kicker {
  margin: 0;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1d4ed8;
  font-size: 0.74rem;
  font-weight: 700;
}

.landing-contact-side h3 {
  margin: 0.45rem 0 0 0;
  color: #0f172a;
  font-size: 1.1rem;
}

.landing-contact-form-card {
  border: 1px solid #dbe5f1;
  border-radius: 10px;
  background: #fff;
  padding: 0.8rem 0.85rem;
}

.landing-contact-meta {
  margin-top: var(--space-1);
  display: flex;
  gap: var(--space-1);
  flex-wrap: wrap;
}

.landing-contact-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid #dbeafe;
  background: #f8fbff;
  color: #1e40af;
  font-size: 0.78rem;
  font-weight: 600;
}

.landing-contact-grid {
  margin-top: 0.85rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.landing-contact-form {
  margin-top: 0;
}

.landing-contact-form label {
  margin-bottom: 0.3rem;
  color: #334155;
  font-size: 0.86rem;
}

.landing-contact-submit-wrap {
  display: flex;
  align-items: flex-end;
}

.landing-contact-submit-wrap .btn {
  width: 100%;
}

.landing-contact-message {
  margin-top: 0.7rem;
}

.landing-contact-message textarea {
  resize: vertical;
  min-height: 120px;
}

.landing-contact-alt {
  margin: 0.85rem 0 0 0;
  color: #64748b;
  font-size: 0.9rem;
}

.landing-bottom-cta {
  margin-top: 1.15rem;
  margin-bottom: 1.3rem;
  background: linear-gradient(180deg, #dbeafe 0%, #eff6ff 100%);
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  padding: 1rem 1.1rem 1.1rem;
}

.landing-bottom-cta h2 {
  margin: 0;
  color: #0f172a;
}

/* Actions section */
.actions {
  display: flex;
  gap: var(--space-1);
  margin: var(--space-2) 0;
  flex-wrap: wrap;
  align-items: center;
}

.actions .button_to {
  margin: 0;
  display: inline-flex;
}

/* Search section */
.search-section {
  margin-bottom: 2rem;
  background: white;
  padding: 1.5rem;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.search-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.search-bar input[type="text"] {
  flex: 1;
  min-width: 250px;
}

.search-bar button,
.search-bar a {
  white-space: nowrap;
}

/* Search info */
.search-info {
  background-color: #d1ecf1;
  color: #0c5460;
  padding: 0.75rem 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
  border: 1px solid #bee5eb;
}

/* Header actions */
.header-actions {
  margin-bottom: 2rem;
}

/* Headings */
h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #2c3e50;
}

h2 {
  font-size: 1.5rem;
  margin: 1.5rem 0 1rem 0;
  color: #2c3e50;
}

h3 {
  font-size: 1.25rem;
  margin: 1.5rem 0 1rem 0;
  color: #34495e;
}

/* Links */
a {
  color: #2c3e50;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}

a:hover {
  border-bottom-color: #2c3e50;
}

/* Responsive */
@media (max-width: 768px) {
  .navbar-container {
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    flex-wrap: wrap;
  }

  .navbar-toggle {
    display: inline-flex;
  }

  .navbar-menu {
    width: 100%;
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-1);
    margin-top: 0.25rem;
  }

  .navbar-menu-public {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    gap: var(--space-1);
  }

  .navbar-container.menu-open .navbar-menu {
    display: grid;
  }

  .navbar-menu li {
    margin-bottom: 0;
  }

  .navbar-menu a {
    display: block;
    padding: 0.45rem 0.55rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
  }

  .account-menu {
    width: 100%;
  }

  .account-menu-trigger {
    width: 100%;
    justify-content: flex-start;
  }

  .account-dropdown {
    position: static;
    margin-top: 0.35rem;
    width: 100%;
    box-shadow: none;
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
  }

  .account-dropdown a {
    color: #fff;
  }

  .account-dropdown a:hover {
    background: rgba(255, 255, 255, 0.12);
  }

  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.2rem;
  }

  .quote-items-responsive {
    overflow: visible;
  }

  .quote-items-responsive .quote-items-table {
    min-width: 0;
  }

  .table-responsive table {
    min-width: 680px;
  }

  .customers-table-desktop {
    display: none;
  }

  .customers-mobile-list {
    display: grid;
    gap: 0.75rem;
  }

  table {
    font-size: 0.9rem;
  }

  table th,
  table td {
    padding: 0.5rem;
  }

  h1 {
    font-size: 1.5rem;
  }

  .follow-up-summary {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .quote-summary-grid {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .search-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .search-bar input[type="text"] {
    min-width: 0;
  }

  .search-bar input[type="submit"],
  .search-bar .btn,
  .header-actions .btn,
  form input[type="submit"],
  .actions .btn,
  .actions .button_to,
  .quote-toolbar .btn,
  .quote-toolbar .button_to,
  .quote-card-actions .btn,
  .quote-card-actions .button_to,
  .customer-task-actions .btn,
  .customer-task-actions .button_to {
    width: 100%;
  }

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

  .quote-action-primary {
    width: 100%;
  }

  .customer-task-card {
    align-items: stretch;
  }

  .customer-task-actions {
    width: 100%;
  }

  .customer-follow-up-meta {
    flex-direction: column;
    gap: 0.2rem;
  }

  .quote-toolbar {
    align-items: stretch;
  }

  .quote-toolbar-left,
  .quote-toolbar-right,
  .quote-toolbar-right-secondary,
  .quote-toolbar-right-primary {
    width: 100%;
  }

  .quote-toolbar-right-secondary,
  .quote-toolbar-right-primary {
    justify-content: flex-start;
  }

  .quote-total-box {
    max-width: 100%;
  }

  .landing-hero {
    grid-template-columns: 1fr;
  }

  .landing-hero-copy,
  .landing-hero-panel,
  .landing-section,
  .landing-bottom-cta {
    padding: 0.95rem;
  }

  .landing-proof {
    grid-template-columns: 1fr;
  }

  .landing-feature-grid {
    grid-template-columns: 1fr;
  }

  .landing-steps {
    grid-template-columns: 1fr;
  }

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

  .landing-contact-grid {
    grid-template-columns: 1fr;
  }

  .landing-contact-submit-wrap {
    align-items: stretch;
  }

  .quote-document,
  .customer-details,
  .quote-details,
  .search-section {
    padding: 1rem;
  }

  .quote-filter-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.2rem;
  }

  .customer-list-filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-1);
    overflow: visible;
    padding-bottom: 0;
  }

  .quote-filter-pill {
    white-space: nowrap;
  }

  .customer-list-filters .quote-filter-pill {
    text-align: center;
    padding: 0.45rem 0.35rem;
    white-space: normal;
  }

  .quote-edit-summary {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
  }

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

  .quote-form-grid-span-2 {
    grid-column: auto;
  }

  .quote-form-section-totals {
    grid-template-columns: 1fr;
  }

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

  .quote-doc-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .quote-card-layout {
    flex-direction: column;
  }

  .quote-card-side {
    width: 100%;
    min-width: 0;
    justify-content: flex-start;
  }

  .quote-card-badges {
    justify-content: flex-start;
  }

  .quote-card-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .quote-card-actions .button_to {
    width: 100%;
  }

  .quote-card-actions .btn {
    width: 100%;
  }

  h1 {
    overflow-wrap: anywhere;
  }

  .form-page-back-link {
    display: block;
    margin-top: 1rem;
  }

  .quote-doc-logo-wrap {
    text-align: left;
  }

  .product-search .js-product-name {
    min-width: 140px;
  }

  .quote-items-responsive .quote-items-table input[type="text"],
  .quote-items-responsive .quote-items-table input[type="number"],
  .quote-items-responsive .quote-items-table textarea,
  .quote-items-responsive .quote-items-table .btn {
    min-height: 40px;
  }

  .quote-items-responsive .quote-items-table {
    min-width: 0;
    border-spacing: 0;
    background: transparent;
  }

  .quote-items-responsive .quote-items-table thead {
    display: none;
  }

  .quote-items-responsive .quote-items-table,
  .quote-items-responsive .quote-items-table tbody,
  .quote-items-responsive .quote-items-table tr,
  .quote-items-responsive .quote-items-table td {
    display: block;
    width: 100%;
  }

  .quote-items-responsive .quote-items-table tr {
    margin-bottom: 0.65rem;
    border: 1px solid #d8e1eb;
    border-radius: 10px;
    overflow: visible;
    background: #fff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  }

  .quote-items-responsive .quote-items-table td {
    border: none;
    border-bottom: 1px solid #e5e7eb;
    border-radius: 0;
    padding: 0.55rem 0.65rem;
  }

  .quote-items-responsive .quote-items-table td:last-child {
    border-bottom: none;
  }

  .quote-items-responsive .quote-items-table td::before {
    display: block;
    margin-bottom: 0.35rem;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.01em;
  }

  .quote-items-responsive .quote-items-table td:nth-child(1)::before { content: "Product Name"; }
  .quote-items-responsive .quote-items-table td:nth-child(2)::before { content: "Description"; }
  .quote-items-responsive .quote-items-table td:nth-child(3)::before { content: "Specifications"; }
  .quote-items-responsive .quote-items-table td:nth-child(4)::before { content: "Add-ons"; }
  .quote-items-responsive .quote-items-table td:nth-child(5)::before { content: "Unit Price"; }
  .quote-items-responsive .quote-items-table td:nth-child(6)::before { content: "Quantity"; }
  .quote-items-responsive .quote-items-table td:nth-child(7)::before { content: "Action"; }

  .quote-items-responsive .quote-col-product,
  .quote-items-responsive .quote-col-desc,
  .quote-items-responsive .quote-col-specs,
  .quote-items-responsive .quote-col-addons,
  .quote-items-responsive .quote-col-price,
  .quote-items-responsive .quote-col-qty,
  .quote-items-responsive .quote-col-remove {
    width: 100%;
  }

  .quote-items-responsive .quote-col-remove .btn {
    width: 100%;
  }

  .quote-items-responsive .product-search {
    gap: 6px;
  }

  .quote-items-responsive .product-search .js-product-toggle {
    flex: 0 0 34px;
  }

  .quote-items-responsive .product-search .js-product-dropdown {
    max-height: 160px;
  }

  .auth-page {
    min-height: auto;
    padding-top: 0.5rem;
  }

  .auth-card {
    max-width: 100%;
    padding: 1rem;
  }

  main {
    margin: 1rem auto;
  }
}

@media (max-width: 480px) {
  .navbar-menu {
    grid-template-columns: 1fr;
  }

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

  .customer-mobile-metrics {
    grid-template-columns: 1fr;
  }

  .customer-mobile-metric:nth-child(odd) {
    border-right: none;
  }

  .follow-up-summary,
  .quote-summary-grid {
    grid-template-columns: 1fr;
  }

  .landing-cta .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .quote-item-row.is-new,
  .product-search .js-product-dropdown.is-open {
    animation: none;
  }

  .customer-list-filters .quote-filter-pill,
  .product-search .js-product-name {
    transition: none;
  }
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-2);
}

.template-card {
  background: #fff;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  padding: 0.9rem;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}

.template-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-1);
}

.template-card-head h3 {
  margin: 0;
}

.template-sub {
  color: #64748b;
  font-size: 0.84rem;
}

.template-default-pill {
  background: #1d4ed8;
  color: #fff;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.76rem;
  font-weight: 700;
}

.template-meta {
  margin: 0.35rem 0;
  color: #334155;
}

.template-color-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  vertical-align: middle;
  margin-right: 6px;
}

.template-actions {
  margin-top: var(--space-1);
  display: flex;
  gap: var(--space-1);
  flex-wrap: wrap;
}

.template-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: var(--space-1);
}

.template-toggle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: var(--space-1);
}

.template-toggle-grid label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  margin-bottom: 0;
}

.template-preview {
  margin-top: var(--space-1);
  border: 1px solid #dbe3ee;
  border-radius: 10px;
  padding: var(--space-1);
  background: #fff;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--space-1);
}

.preview-header span {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: #64748b;
}

.preview-header strong {
  color: var(--template-accent);
}

.preview-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-1);
  margin-bottom: var(--space-1);
}

.preview-body div {
  height: 34px;
  border: 1px solid #dbe3ee;
  border-radius: 6px;
  background: #f8fafc;
}

.preview-total {
  margin-left: auto;
  width: 120px;
  text-align: center;
  border-radius: 6px;
  padding: 0.35rem;
  color: #fff;
  background: var(--template-accent);
  font-size: 0.82rem;
  font-weight: 700;
}

.template-preview-modern {
  border-color: #edf1f6;
  background: #fcfdff;
}

.template-preview-modern .preview-body div {
  border: none;
  background: #f5f8fc;
}

.template-preview-industry {
  border-width: 2px;
  border-color: #94a3b8;
}

.template-preview-industry .preview-header {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.35rem 0.5rem;
}

.quote-template-picker {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.quote-template-picker select {
  min-width: 180px;
}

@media (max-width: 768px) {
  .template-form-grid,
  .template-toggle-grid {
    grid-template-columns: 1fr;
  }

  .quote-template-picker {
    width: 100%;
  }

  .quote-template-picker select,
  .quote-template-picker input[type="submit"] {
    width: 100%;
  }
}

.quote-toolbar {
  margin-top: var(--space-2);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.quote-toolbar-left,
.quote-toolbar-right {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  flex-wrap: wrap;
}

.quote-toolbar-left {
  flex: 1 1 260px;
}

.quote-toolbar-right {
  flex: 1 1 520px;
  align-items: flex-end;
  flex-direction: column;
  gap: var(--space-1);
  margin-left: auto;
}

.quote-toolbar-right-secondary,
.quote-toolbar-right-primary {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: var(--space-1);
  flex-wrap: wrap;
  width: 100%;
}

.quote-toolbar-right-primary {
  gap: var(--space-2);
}

.quote-toolbar .button_to {
  margin: 0;
  display: inline-flex;
}

.quote-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  height: 38px;
  padding: 0 13px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.08s ease, opacity 0.12s ease, background-color 0.12s ease, border-color 0.12s ease;
}

.quote-btn:hover {
  opacity: 0.94;
}

.quote-btn:active {
  transform: translateY(1px);
}

.quote-btn:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.quote-btn-primary {
  background: #1f3650;
  border-color: #1f3650;
  color: #fff;
}

.quote-btn-primary:hover {
  background: #17293e;
  border-color: #17293e;
}

.quote-btn-secondary {
  background: transparent;
  border-color: #94a3b8;
  color: #334155;
}

.quote-btn-secondary:hover {
  background: #f8fafc;
  border-color: #64748b;
  color: #0f172a;
}

.quote-btn-danger {
  background: transparent;
  border-color: #fca5a5;
  color: #b91c1c;
}

.quote-btn-danger:hover {
  background: #fff5f5;
  border-color: #ef4444;
  color: #991b1b;
}

.quote-toolbar-export {
  position: relative;
}

.quote-toolbar-export > summary {
  list-style: none;
}

.quote-toolbar-export > summary::-webkit-details-marker {
  display: none;
}

.quote-toolbar-export-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 170px;
  z-index: 50;
  border: 1px solid #dbe3ee;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16);
  padding: 0.45rem;
  display: grid;
  gap: 0.35rem;
}

.quote-toolbar-export:not([open]) .quote-toolbar-export-menu {
  display: none;
}

.quote-col-right {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.quote-template-picker {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

.quote-template-picker label {
  margin: 0;
  font-size: 0.86rem;
  color: #475569;
}

.quote-template-picker select {
  min-width: 190px;
  height: 40px;
  border-radius: 10px;
}

.quote-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  min-width: 180px;
  max-width: 320px;
  background: #0f172a;
  color: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.28);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 1800;
}

.quote-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.quote-toast.is-error {
  background: #991b1b;
}

@media (max-width: 768px) {
  .quote-toolbar-left,
  .quote-toolbar-right,
  .quote-toolbar-right-secondary,
  .quote-toolbar-right-primary {
    width: 100%;
  }

  .quote-toolbar-right-secondary,
  .quote-toolbar-right-primary {
    justify-content: flex-start;
  }

  .quote-template-picker {
    width: 100%;
  }

  .quote-template-picker select {
    width: 100%;
  }

  .quote-btn,
  .quote-toolbar .button_to {
    width: 100%;
  }

  .share-link-group {
    width: 100%;
  }

  .share-link-panel {
    left: 0;
    right: 0;
    max-width: none;
  }

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

.public-quote-themed .quote-doc-header {
  border-bottom: 2px solid var(--doc-accent, #1f4e79);
}

.public-quote-themed .quote-doc-kicker {
  color: var(--doc-accent, #1f4e79);
}

.public-quote-themed .quote-meta-card {
  border-left: 3px solid var(--doc-accent, #1f4e79);
}

.public-quote-themed .quote-doc-table thead {
  background-color: var(--doc-accent, #1f4e79);
}

.public-quote-themed .quote-doc-table thead th {
  color: var(--doc-on-accent, #ffffff);
}

.public-quote-themed .quote-total-grand {
  background: var(--doc-accent, #1f4e79);
  color: var(--doc-on-accent, #ffffff);
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
  border-top: none;
}

.public-quote-themed .quote-total-grand span,
.public-quote-themed .quote-total-grand strong {
  color: var(--doc-on-accent, #ffffff);
}

.public-quote-themed .quote-total-box p:not(.quote-total-grand) span {
  color: #556b84;
}

.public-quote-themed .quote-total-box p:not(.quote-total-grand) strong {
  color: #4a6380;
}

.public-quote-themed .quote-section-block h3 {
  color: var(--doc-accent, #1f4e79);
}

.public-quote-themed .quote-public-actions button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--doc-accent, #1f4e79);
  border-radius: 8px;
  background: #fff;
  color: var(--doc-accent, #1f4e79);
  font-weight: 600;
  cursor: pointer;
}

.public-quote-themed .quote-public-actions button:hover {
  background: #f8fafc;
}

.public-quote-themed {
  font-family: var(--doc-font), "Noto Sans", "Segoe UI", Arial, sans-serif;
  border-color: #dbe3ee;
}

.public-layout-modern .quote-doc-table,
.public-layout-modern .quote-doc-table td,
.public-layout-modern .quote-doc-table th {
  border-color: #e5eaf0;
}

.public-layout-industry {
  border-width: 2px;
}

.public-layout-industry .quote-doc-table thead {
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
}

.public-layout-classic .quote-doc-header {
  border-bottom-width: 1px;
}

.public-quote-document .quote-public-actions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
}

.public-quote-document .quote-items-table {
  border-spacing: 0 6px;
}

@media print {
  body.public-quote-body {
    background: #fff !important;
    color: #111827;
  }

  .public-quote-document {
    border: 1px solid #d1d5db !important;
    box-shadow: none !important;
    border-radius: 0;
    padding: 0.8rem;
  }

  .public-quote-document .quote-doc-table thead {
    background: #f3f4f6 !important;
    color: #111827 !important;
  }

  .public-quote-document .quote-meta-card,
  .public-quote-document .quote-total-box,
  .public-quote-document .quote-section-block {
    background: #fff !important;
    border: 1px solid #e5e7eb;
  }

  .public-quote-document .quote-total-grand {
    color: #111827 !important;
    background: #f3f4f6 !important;
    border: 1px solid #d1d5db;
  }
}

























































































































.demo-page h1 {
  margin: 0;
  color: #0f172a;
  font-size: 1.9rem;
}

.demo-toolbar {
  margin-top: 0.9rem;
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.demo-pill {
  display: inline-flex;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
  font-size: 0.82rem;
  font-weight: 700;
}

.demo-layout {
  margin-top: 0.95rem;
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 0.75rem;
}

.demo-card {
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  background: #fff;
  padding: 0.85rem;
}

.demo-card h2 {
  margin: 0 0 var(--space-1) 0;
  font-size: 1.06rem;
}

.demo-table {
  box-shadow: none;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

.demo-table thead {
  background: #1f3650;
}

.demo-table th,
.demo-table td {
  padding: var(--space-1);
  font-size: 0.9rem;
}

.demo-list {
  margin: 0;
  padding-left: 1rem;
}

.demo-list li {
  margin-bottom: 0.5rem;
  color: #475569;
}

.demo-actions {
  margin-top: var(--space-1);
  display: flex;
  gap: var(--space-1);
  flex-wrap: wrap;
}

.product-main-image {
  max-width: 280px;
  max-height: 200px;
  border-radius: 10px;
  border: 1px solid #dbe1e8;
  object-fit: cover;
}

.product-sku {
  font-family: inherit;
  letter-spacing: 0.01em;
}

.product-price-currency {
  display: inline-block;
  margin-left: 0.25rem;
  color: #475569;
  font-size: 0.86rem;
  font-weight: 600;
}

.product-description-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.product-image-block {
  display: grid;
  gap: 0.5rem;
}

.product-image-preview {
  max-width: 220px;
  max-height: 160px;
  border-radius: 8px;
  border: 1px solid #dbe1e8;
  object-fit: cover;
}

.product-remove-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  margin-bottom: 0;
  font-weight: 500;
}

.product-gallery {
  margin-top: 1rem;
}

.product-gallery-editor {
  margin-top: 0.25rem;
}

.product-gallery-grid {
  margin-top: 0.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--space-1);
}

.product-gallery-item {
  border: 1px solid #dbe1e8;
  border-radius: 10px;
  background: #fff;
  padding: 0.45rem;
  display: grid;
  gap: 0.5rem;
}

.product-gallery-item.is-remove-selected {
  border-color: #fca5a5;
  background: #fff6f6;
  box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.2);
}

.product-gallery-item span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
}

.product-gallery-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border-radius: 8px;
  background: #e8f5ec;
  color: #166534;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.25rem 0.5rem;
}

.product-gallery-item .button_to {
  margin: 0;
}

.product-gallery-action {
  width: 100%;
  height: 34px;
  font-size: 0.9rem;
}

.product-gallery-thumb-wrap {
  display: block;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid transparent;
}

.product-gallery-thumb-wrap:hover {
  border-color: #94a3b8;
}

.product-gallery-thumb-wrap.is-current {
  border-color: #1d4ed8;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.18);
}

.product-gallery-hint {
  font-size: 0.82rem;
  color: #64748b;
}

.product-gallery-thumb-shell {
  position: relative;
}

.product-gallery-hover-actions {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.35rem;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.58), rgba(15, 23, 42, 0.06));
  opacity: 0;
  transition: opacity 0.15s ease;
}

.product-gallery-item:hover .product-gallery-hover-actions {
  opacity: 1;
}

.product-gallery-hover-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 8px;
  border-radius: 7px;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
}

.product-gallery-hover-btn-primary {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.product-gallery-hover-btn-danger {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fecaca;
}

.product-gallery-select-delete {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.product-gallery-select-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.product-gallery-select-pill {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  width: 100%;
}

.product-gallery-item.is-remove-selected .product-gallery-select-pill {
  border-color: #f87171;
  background: #ffe4e6;
  color: #991b1b;
}

.product-upload-preview {
  margin-top: 0.6rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: var(--space-1);
  max-width: 520px;
}

.product-upload-preview-item {
  position: relative;
  border: none;
  border: 1px solid #dbe1e8;
  border-radius: 8px;
  padding: 0.2rem;
  background: #fff;
  cursor: pointer;
  text-align: left;
}

.product-upload-preview-item.is-selected {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.16);
}

.product-upload-preview-thumb {
  width: 100%;
  height: 74px;
  object-fit: cover;
  border-radius: 6px;
}

.product-upload-preview-label {
  margin-top: 0.2rem;
  display: block;
  font-size: 0.8rem;
  color: #475569;
}

.product-upload-preview-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #b91c1c;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.product-quick-edit-link {
  color: inherit;
  text-decoration: none;
  border-bottom: none;
}

.product-quick-edit-link:hover {
  text-decoration: underline;
}

.product-row-actions {
  white-space: nowrap;
}

.product-actions-inline {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

.product-action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  border-bottom: none;
  line-height: 1;
}

.product-action-link:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

.product-action-view {
  border-color: transparent;
  background: transparent;
  color: #334155;
  padding: 0;
  min-height: 20px;
  height: auto;
}

.product-action-view:hover {
  background: transparent;
  border-color: transparent;
  color: #0f172a;
  text-decoration: underline;
}

.product-action-delete {
  border-color: #fca5a5;
  color: #b91c1c;
}

.product-action-delete:hover {
  background: #fff5f5;
  border-color: #ef4444;
  color: #991b1b;
}

.product-gallery-thumb {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
}

.team-members-panel {
  background: #fff;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  padding: var(--space-2);
  margin-bottom: var(--space-2);
}

.team-members-panel h2 {
  margin: 0 0 var(--space-1) 0;
}

.settings-header-card {
  background: #fff;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  padding: var(--space-2);
  margin-bottom: var(--space-2);
}

.settings-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-1);
  flex-wrap: wrap;
}

.settings-header-top h1 {
  margin: 0;
}

.settings-company-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  background: #f8fafc;
  border: 1px solid #dbe3ee;
  border-radius: 999px;
  padding: 0.25rem var(--space-1);
}

.settings-company-label {
  color: #64748b;
  font-size: 0.78rem;
}

.settings-company-pill strong {
  color: #1f2937;
  font-size: 0.86rem;
}

.settings-header-meta {
  margin: var(--space-1) 0;
  color: #475569;
  font-size: 0.9rem;
}

.settings-nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.settings-nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #dbe3ee;
  color: #334155;
  text-decoration: none;
  border-bottom: none;
  font-size: 0.88rem;
  font-weight: 600;
}

.settings-nav-link:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.settings-nav-link.is-active {
  color: var(--brand-on-primary);
  background: var(--brand-primary);
  border-color: var(--brand-primary);
}

.settings-error-summary {
  border: 1px solid #fecaca;
  background: #fff5f5;
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  margin-bottom: 0.85rem;
}

.settings-error-summary h3 {
  margin: 0 0 0.35rem 0;
  color: #991b1b;
  font-size: 0.95rem;
}

.settings-error-summary ul {
  margin: 0;
  padding-left: 1rem;
  color: #7f1d1d;
  font-size: 0.9rem;
}

.team-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.team-overview-item {
  border: 1px solid #dbe3ee;
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  background: #f8fafc;
}

.team-overview-item span {
  display: block;
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 600;
}

.team-overview-item strong {
  display: block;
  margin-top: 0.2rem;
  color: #0f172a;
  font-size: 1rem;
}

.settings-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.settings-section-title {
  grid-column: 1 / -1;
  margin-top: 0.7rem;
  margin-bottom: 0.15rem;
  padding-top: 0.65rem;
  border-top: 1px solid #e2e8f0;
  color: #334155;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.settings-grid-span-2 {
  grid-column: 1 / -1;
}

.settings-actions {
  margin-top: 0.35rem;
}

.company-logo-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.company-logo-preview {
  width: 84px;
  height: 84px;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  background: #f8fafc;
  color: #334155;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
  overflow: hidden;
}

.company-logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.company-logo-actions {
  display: grid;
  gap: var(--space-1);
}

.settings-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-1);
}

.settings-checkbox-grid label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  margin-bottom: 0;
  font-size: 0.9rem;
  font-weight: 500;
  color: #334155;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.role-badge-owner {
  background: #dbeafe;
  color: #1e3a8a;
}

.role-badge-admin {
  background: #dcfce7;
  color: #166534;
}

.role-badge-member {
  background: #f1f5f9;
  color: #334155;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 0.5rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
}

.status-badge-active {
  background: #e8f5ec;
  color: #166534;
}

.status-badge-pending {
  background: #fef3c7;
  color: #92400e;
}

.team-action-note {
  color: #64748b;
  font-size: 0.88rem;
  font-weight: 600;
}

.account-avatar-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 0.9rem;
}

.account-avatar-preview {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  background: #1d4ed8;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  overflow: hidden;
}

.account-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-avatar-actions {
  display: grid;
  gap: 0.35rem;
}

.account-remove-avatar-btn {
  width: fit-content;
}

.account-remove-avatar {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0;
}

.team-members-hint {
  margin: 0 0 0.7rem 0;
  color: #64748b;
  font-size: 0.92rem;
}

.inline-form {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-right: 0.4rem;
}

.inline-form .btn {
  margin-left: 0.55rem;
}

.team-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.invite-link-cell {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.invite-link-cell input[type="text"] {
  min-width: 260px;
  font-size: 0.86rem;
}

.team-actions .button_to {
  margin-left: 0.35rem;
}

.team-avatar-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.team-avatar-link {
  display: inline-flex;
  border-bottom: none;
}

.team-avatar-link:hover .team-avatar-thumb {
  box-shadow: 0 0 0 2px rgba(29, 78, 216, 0.2);
}

.team-member-email-link {
  color: #1f2937;
  border-bottom: none;
  text-decoration: none;
}

.team-member-email-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.team-avatar-thumb {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  object-fit: cover;
}

.team-avatar-fallback {
  background: var(--brand-primary);
  color: var(--brand-on-primary);
  font-size: 0.82rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.quote-filter-pill.active,
.history-tab.active,
.summary-card.active {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: var(--brand-on-primary);
}



.member-profile-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.member-profile-avatar {
  width: 84px;
  height: 84px;
  border-radius: 999px;
  background: #1d4ed8;
  color: #fff;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
}

.member-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.member-profile-meta h2 {
  margin: 0 0 0.4rem 0;
}

.member-profile-meta p {
  margin: 0.2rem 0;
}

@media (max-width: 900px) {
  .demo-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 992px) {
  .dashboard-kpi-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 768px) {
  .navbar-brand-wrap {
    gap: var(--space-1);
  }

  .navbar-company-context {
    font-size: 0.72rem;
    padding: 0 8px;
  }

  .team-overview-grid {
    grid-template-columns: 1fr;
  }

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

  .settings-checkbox-grid {
    grid-template-columns: 1fr;
  }

  .sales-dashboard-toolbar {
    align-items: stretch;
  }

  .sales-dashboard-toggle {
    width: 100%;
  }

  .dashboard-kpi-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
  }

  .dashboard-kpi-card {
    padding: 0.62rem 0.68rem;
  }

  .dashboard-kpi-card strong {
    font-size: 1.18rem;
  }

  .dashboard-kpi-head span {
    font-size: 0.78rem;
  }

  .dashboard-kpi-trend {
    font-size: 0.72rem;
  }

  .product-gallery-hover-actions {
    opacity: 1;
    position: static;
    background: transparent;
    padding: 0;
    justify-content: flex-start;
  }

  .dashboard-recent-table {
    min-width: 0;
    border: none;
  }

  .dashboard-panel .table-responsive {
    overflow-x: visible;
  }

  .dashboard-panel .table-responsive table.dashboard-recent-table {
    min-width: 0 !important;
    width: 100%;
    table-layout: fixed;
  }

  .dashboard-recent-table thead {
    display: none;
  }

  .dashboard-recent-table,
  .dashboard-recent-table tbody,
  .dashboard-recent-table tr {
    display: block;
    width: 100%;
  }

  .dashboard-recent-table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "quote total"
      "buyer status"
      "engage action";
    gap: 0.28rem 0.55rem;
    padding: 0.52rem 0.58rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 0.48rem;
    background: #fff;
  }

  .dashboard-recent-table td {
    border: none;
    padding: 0;
    font-size: 0.82rem;
    line-height: 1.25;
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .dashboard-recent-table td:nth-child(1) {
    grid-area: quote;
    font-weight: 700;
  }

  .dashboard-recent-table td:nth-child(2) {
    grid-area: buyer;
    color: #334155;
  }

  .dashboard-recent-table td:nth-child(3) {
    grid-area: status;
    justify-self: end;
  }

  .dashboard-recent-table td:nth-child(4) {
    grid-area: engage;
    justify-self: start;
  }

  .dashboard-recent-table td:nth-child(5) {
    grid-area: action;
    justify-self: end;
  }

  .dashboard-recent-table td:nth-child(6) {
    grid-area: total;
    justify-self: end;
    font-weight: 700;
    color: #0f172a;
  }

  .dashboard-recent-table tbody tr:nth-child(n + 5) {
    display: none;
  }

  .dashboard-panel {
    padding: 0.7rem 0.72rem;
  }

  .dashboard-overview-list li {
    padding: 0.52rem 0.06rem;
  }

  .dashboard-overview-value {
    font-size: 1rem;
    margin-top: 0.24rem;
  }

  .sales-dashboard,
  .dashboard-detail-grid,
  .dashboard-panel {
    overflow-x: clip;
  }

  .quote-document .quote-items-table,
  .public-quote-document .quote-items-table {
    min-width: 620px;
  }

  .quote-item-image {
    width: 44px;
    height: 44px;
  }
}

/* UI foundation normalization (phase 1) */
:root {
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --ui-radius-sm: 8px;
  --ui-radius-md: 10px;
  --ui-radius-lg: 12px;
  --ui-border: #dbe3ee;
  --ui-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

/* Unified button baseline */
.btn,
.quote-btn {
  min-height: 38px;
  height: 38px;
  padding: 0 13px;
  border-radius: var(--ui-radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1;
}

.btn-primary,
input[type="submit"].btn,
.quote-btn-primary {
  background: #1f3650;
  border-color: #1f3650;
  color: #fff;
}

.btn-secondary,
.quote-btn-secondary {
  background: transparent;
  border-color: #94a3b8;
  color: #334155;
}

.btn-danger,
.quote-btn-danger {
  background: transparent;
  border-color: #fca5a5;
  color: #b91c1c;
}

.btn-danger:hover,
.quote-btn-danger:hover {
  background: #fff5f5;
  border-color: #ef4444;
  color: #991b1b;
}

/* Unified status badge baseline */
.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 0.55rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.status-draft {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #475569;
}

.status-sent,
.status-viewed,
.status-negotiating {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.status-won {
  background: #ecfdf3;
  border-color: #bbf7d0;
  color: #166534;
}

.status-lost,
.status-expired,
.status-paused {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.status-pending {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

/* Unified card baseline for core app containers */
.dashboard-panel,
.quote-document,
.team-members-panel,
.settings-header-card,
.quote-form-section,
.customer-task-board,
.customer-timeline {
  border-color: var(--ui-border);
  border-radius: var(--ui-radius-lg);
  box-shadow: var(--ui-shadow);
}

/* Phase 2: conflict convergence */
h1 {
  margin: 0 0 var(--space-2) 0;
  font-size: 2rem;
  line-height: 1.2;
}

h2 {
  margin: var(--space-3) 0 var(--space-2) 0;
  font-size: 1.5rem;
  line-height: 1.25;
}

h3 {
  margin: var(--space-3) 0 var(--space-2) 0;
  font-size: 1.25rem;
  line-height: 1.3;
}

.customers-table th,
.dashboard-recent-table th,
.quote-doc-table th {
  font-size: 0.86rem;
  padding: 0.62rem 0.68rem;
  letter-spacing: 0.01em;
}

.customers-table td,
.dashboard-recent-table td,
.quote-doc-table td {
  font-size: 0.9rem;
  padding: 0.62rem 0.68rem;
  vertical-align: middle;
}

.customers-table thead,
.dashboard-recent-table thead,
.quote-doc-table thead {
  background-color: var(--ui-table-head-bg);
  color: var(--ui-table-head-fg);
}

.customers-table tbody tr:hover td,
.dashboard-recent-table tbody tr:hover td,
.quote-doc-table tbody tr:hover td {
  background: #f8fafc;
}

/* Phase 3.1: restore muted summary accents */
.summary-card {
  border-left-width: 3px;
  border-left-style: solid;
  border-left-color: #cbd5e1;
}

.summary-normal {
  border-left-color: #94a3b8;
  background: linear-gradient(90deg, #f8fafc 0%, #ffffff 70%);
}

.summary-upcoming {
  border-left-color: #f59e0b;
  background: linear-gradient(90deg, #fffaf0 0%, #ffffff 70%);
}

.summary-today {
  border-left-color: #3b82f6;
  background: linear-gradient(90deg, #f4f8ff 0%, #ffffff 70%);
}

.summary-overdue,
.summary-lost {
  border-left-color: #ef4444;
  background: linear-gradient(90deg, #fff7f7 0%, #ffffff 70%);
}

.summary-won {
  border-left-color: #22c55e;
  background: linear-gradient(90deg, #f4fbf6 0%, #ffffff 70%);
}

.quote-toolbar {
  gap: var(--space-2);
}

.quote-toolbar-left,
.quote-toolbar-right,
.quote-toolbar-right-secondary,
.quote-toolbar-right-primary {
  gap: var(--space-1);
}

.quote-toolbar-right-primary {
  gap: var(--space-2);
}

.quote-toolbar-export > summary.quote-btn {
  min-height: 38px;
  height: 38px;
}

.summary-card,
.dashboard-panel,
.quote-document,
.quote-form-section,
.team-members-panel,
.settings-header-card {
  border-radius: var(--ui-radius-lg);
  border-color: var(--ui-border);
}

/* Phase 3: final UI convergence (buttons/status/tables) */
.btn,
.quote-btn,
input[type="submit"].btn {
  min-height: 38px;
  height: 38px;
  padding: 0 13px;
  border-radius: var(--ui-radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.btn:hover,
.quote-btn:hover,
input[type="submit"].btn:hover {
  transform: none;
  box-shadow: none;
}

.btn-primary,
input[type="submit"].btn,
.quote-btn-primary {
  background: #1f3650;
  border-color: #1f3650;
  color: #fff;
}

.btn-secondary,
.quote-btn-secondary {
  background: transparent;
  border-color: #94a3b8;
  color: #334155;
}

.btn-danger,
.quote-btn-danger {
  background: transparent;
  border-color: #fca5a5;
  color: #b91c1c;
}

.status-badge,
.status-draft,
.status-sent,
.status-viewed,
.status-negotiating,
.status-won,
.status-lost,
.status-expired,
.status-paused,
.status-pending,
.status-badge-active,
.status-badge-pending {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 0.55rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.76rem;
  font-weight: 700;
}

.status-badge-active {
  background: #ecfdf3;
  border-color: #bbf7d0;
  color: #166534;
}

.status-badge-pending {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

.customers-table th,
.dashboard-recent-table th,
.quote-doc-table th {
  padding: 0.62rem 0.68rem;
  font-size: 0.86rem;
  line-height: 1.35;
}

.customers-table td,
.dashboard-recent-table td,
.quote-doc-table td {
  padding: 0.62rem 0.68rem;
  font-size: 0.9rem;
  line-height: 1.35;
  vertical-align: middle;
}

.customers-table tbody td,
.dashboard-recent-table tbody td,
.quote-doc-table tbody td {
  transition: background-color 0.14s ease;
}

.customers-table tbody tr:hover td,
.dashboard-recent-table tbody tr:hover td,
.quote-doc-table tbody tr:hover td {
  background: #f8fafc;
}
