/* yCustomer phase 1. Scoped additions; existing yCore styles remain untouched. */
.customer-page { --customer-brand: #9061ed; --customer-border: #292936; --customer-muted: #a7a5b2; }
.customer-page .customer-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.customer-heading > .button { flex-shrink: 0; }
.customer-summary { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; margin: -8px 0 22px; font-size: 13px; color: var(--customer-muted); }
.customer-summary > span { display: inline-flex; align-items: center; gap: 7px; }
.customer-summary strong { color: #edecf3; font-variant-numeric: tabular-nums; }
.customer-dot { display: inline-block; flex-shrink: 0; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.customer-dot.active, .customer-status.active { color: #a6ebc7; }
.customer-dot.inactive, .customer-status.inactive { color: #a7a5b2; }
.customer-panel { overflow: hidden; }
.customer-filter { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 18px 20px; border-bottom: 1px solid var(--customer-border); }
.customer-search { flex: 1 1 230px; }
.customer-page input:not([type=checkbox]):not([type=hidden]), .customer-page select { width: 100%; min-width: 0; min-height: 43px; background: #0e0f16; color: #f3f1f8; border: 1px solid #383743; border-radius: 8px; padding: 9px 12px; font: inherit; font-size: 14px; }
.customer-page select { min-width: 145px; }
.customer-page input::placeholder { color: #898793; }
.customer-page :is(input, select, button, a):focus-visible { outline: 2px solid #bfa4ff; outline-offset: 3px; }
.customer-page input[type=checkbox] { accent-color: var(--customer-brand); width: 17px; height: 17px; flex-shrink: 0; }
.customer-reset { font-size: 13px; color: #bfa4ff; text-decoration: underline; text-underline-offset: 3px; padding: 8px; }
.customer-table-wrap { position: relative; overflow-x: auto; }
.customer-table { min-width: 760px; border-collapse: collapse; width: 100%; text-align: left; font-size: 13px; }
.customer-table th { background: #101118; color: var(--customer-muted); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: 12px 20px; }
.customer-table td { padding: 18px 20px; border-top: 1px solid var(--customer-border); vertical-align: middle; }
.customer-table tbody tr:hover { background: #191a25; }
.customer-name-cell { max-width: 290px; min-width: 190px; }
.customer-name { font-size: 14px; font-weight: 600; display: block; overflow-wrap: anywhere; }
.customer-name:hover { color: #bfa4ff; }
.customer-subline { display: block; color: var(--customer-muted); font-size: 12px; margin-top: 3px; overflow-wrap: anywhere; }
.customer-subline.mono { font-family: var(--font-mono, monospace); font-size: 11px; }
.customer-products { display: flex; flex-wrap: wrap; gap: 6px; }
.customer-product { display: inline-flex; padding: 3px 9px; border: 1px solid #4b3b68; border-radius: 6px; background: #271d3f; color: #cbb5fa; font-size: 12px; }
.customer-status { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; white-space: nowrap; }
.customer-row-action { text-align: right; }
.customer-pagination { padding: 14px 20px; border-top: 1px solid var(--customer-border); display: flex; align-items: center; justify-content: space-between; gap: 14px; color: var(--customer-muted); font-size: 12px; }
.customer-pagination > div { display: flex; gap: 8px; }
.customer-empty { padding: 56px 24px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.customer-empty-mark { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: #271d3f; color: #bfa4ff; font-weight: 800; font-size: 27px; }
.customer-empty h2 { margin: 18px 0 0; font-size: 21px; letter-spacing: -.025em; }
.customer-empty p { margin: 8px 0 24px; color: var(--customer-muted); font-size: 14px; max-width: 440px; }
.customer-scope-note { color: var(--customer-muted); font-size: 12px; line-height: 1.6; margin: 20px 0 0; max-width: 860px; }
.customer-form-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .85fr); gap: 18px; align-items: start; }
.customer-fields { padding: 24px; display: grid; gap: 20px; }
.customer-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.customer-field label { font-size: 13px; font-weight: 600; color: #d2d0dc; }
.customer-optional { margin-left: 6px; font-size: 11px; color: var(--customer-muted); font-weight: 400; }
.customer-required { color: #bfa4ff; }
.customer-field small, .customer-help { color: var(--customer-muted); font-size: 12px; line-height: 1.6; margin: 0; }
.customer-side-panels { display: grid; gap: 18px; }
.customer-product-choice { padding: 14px; border: 1px solid #393847; border-radius: 9px; display: flex; gap: 12px; align-items: flex-start; cursor: pointer; background: #191a25; }
.customer-product-choice span { display: flex; flex-direction: column; gap: 3px; }
.customer-product-choice strong { font-size: 15px; }
.customer-product-choice small { font-size: 12px; color: var(--customer-muted); }
.customer-active-check { width: max-content; max-width: 100%; }
.customer-form-actions { padding-top: 22px; margin-top: 18px; border-top: 1px solid var(--customer-border); display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.customer-form-actions > div { display: flex; gap: 10px; flex-shrink: 0; }
.customer-page .alert a { text-decoration: underline; text-underline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 1080px) { .customer-form-grid { grid-template-columns: 1fr; } }
@media (max-width: 650px) {
  .customer-page .customer-heading { flex-direction: column; align-items: stretch; }
  .customer-summary { gap: 14px; }
  .customer-filter { padding: 16px; }
  .customer-search { flex-basis: 100%; }
  .customer-table th, .customer-table td { padding-left: 16px; padding-right: 16px; }
  .customer-fields { padding: 20px; }
  .customer-form-actions { flex-direction: column; align-items: stretch; }
  .customer-form-actions > div { justify-content: flex-end; }
  .customer-pagination { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { .customer-page .button { transition: none; } .customer-page .button:hover { transform: none; } }

/* The additional nav item must also fit on narrow yCore pages. */
@media (max-width: 650px) {
  .ycore-shell .sidebar { grid-template-columns: minmax(0, 1fr) auto; }
  .ycore-shell .sidebar nav { grid-column: 1 / -1; grid-row: 2; min-width: 0; flex-wrap: wrap; gap: 4px; }
  .ycore-shell .sidebar-bottom { grid-column: 2; grid-row: 1; }
}

/* yCustomer form feedback. No new global colors, fonts or UI components. */
.customer-page .customer-field input.customer-input--readonly[readonly] {
  background: #1a1b23;
  color: #a7a5b2;
  border-color: #2e2e3a;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 12px;
  cursor: text;
}
.customer-page .customer-field--readonly label { color: #a7a5b2; }
.customer-page .customer-field-feedback {
  display: block;
  min-height: 1.6em;
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--customer-muted);
  overflow-wrap: anywhere;
}
.customer-page .customer-field-feedback[data-state="valid"] { color: #a6ebc7; }
.customer-page .customer-field-feedback[data-state="invalid"] { color: #ffb7c2; }
.customer-page .customer-field-feedback[data-state="checking"] { color: #bfa4ff; }
.customer-page .customer-field-feedback[data-state="warning"] { color: #eacb85; }
.customer-page .customer-field-feedback[data-state="valid"]::before { content: "\2713"; margin-right: .35em; }
.customer-page .customer-field-feedback[data-state="invalid"]::before { content: "!"; margin-right: .35em; font-weight: 700; }
.customer-page .customer-field input[aria-invalid="true"] { border-color: #c57080; }
.customer-page input[aria-invalid="false"][data-validation-state="valid"]:not([readonly]) { border-color: #467a64; }
.customer-page #customer-form-status[data-state="warning"] { color: #eacb85; }
.customer-page #customer-form-status[data-state="invalid"] { color: #ffb7c2; }
.customer-page #customer-save:disabled { cursor: wait; opacity: .65; transform: none; }
