:root {
  --ink: #17233a;
  --muted: #65728a;
  --line: #d9e2ef;
  --surface: #ffffff;
  --canvas: #f3f6fb;
  --nav: #0b1f3a;
  --nav-soft: #12355b;
  --primary: #3498DB;
  --primary-dark: #2588C7;
  --mint: #dff4ea;
  --amber: #c47a16;
  --amber-soft: #fff0d6;
  --red: #b84242;
  --red-soft: #fde7e5;
  --shadow: 0 12px 35px rgba(21, 47, 39, .08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

/* Administración de identidad y acceso */
.login-recovery-link { align-self: center; font-size: .72rem; font-weight: 750; }
.security-form-panel { max-width: 720px; }
.security-create-user { margin-bottom: 16px; }
.security-create-user > summary { cursor: pointer; color: #1767a5; font-weight: 850; }
.security-create-user[open] > summary { margin-bottom: 16px; }
.security-user-layout { align-items: start; }
.security-person-picker { display: grid; min-width: 0; }
.security-person-picker input[type="search"] { width: 100%; min-width: 0; }
.security-user-summary dl { display: grid; gap: 9px; margin: 0; }
.security-user-summary dl div { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid #e6edf4; }
.security-user-summary dt { color: #718096; font-size: .67rem; }
.security-user-summary dd { margin: 0; color: #203a5b; font-size: .7rem; font-weight: 800; text-align: right; }
.security-user-action { min-width: 190px; text-align: right; }
.security-superadmin-required {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  max-width: 175px;
  color: #8a6425;
  font-size: .64rem;
  font-weight: 800;
  line-height: 1.25;
  text-align: right;
}
.security-superadmin-required svg {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: #bd852d;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}
.security-user-list-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 7px; }
@media screen and (max-width: 760px) {
  .security-user-list-tools { width: 100%; justify-content: stretch; }
  .security-user-list-tools .inline-form { flex: 1 1 100%; }
  .security-user-list-tools .inline-form input { min-width: 0; }
  .security-user-list-tools > .button { width: 100%; }
}
.security-actions-panel { margin-top: 16px; }
.security-action-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px,1fr)); gap: 10px; }
.security-action-grid form { display: flex; flex-direction: column; align-items: flex-start; padding: 13px; border: 1px solid #dce5ef; border-radius: 9px; background: #f9fbfd; }
.security-action-grid strong { color: #203852; font-size: .75rem; }
.security-action-grid p { flex: 1; margin: 4px 0 12px; color: #718096; font-size: .64rem; line-height: 1.4; }
.security-role-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin-bottom: 14px; }
.security-role-summary article { display: grid; gap: 3px; }
.security-role-summary span { color: #64748b; font-size: .67rem; font-weight: 750; }
.security-role-summary strong { color: #173554; font-size: 1.6rem; }
.security-role-notice { margin-bottom: 14px; }
.security-role-list { padding-bottom: 0; overflow: hidden; }
.security-role-list .panel-heading { padding: 0 0 14px; }
.security-role-count { flex: 0 0 auto; padding: 6px 10px; border: 1px solid #cbdcec; border-radius: 999px; background: #f3f8fc; color: #315d85; font-size: .64rem; font-weight: 850; white-space: nowrap; }
.security-role-table { min-width: 820px; }
.security-role-table th,.security-role-table td { vertical-align: middle; }
.security-role-table .security-role-actions { width: 150px; text-align: right; }
.security-role-name { display: grid; min-width: 260px; gap: 3px; }
.security-role-name strong { color: #203c5b; font-size: .76rem; }
.security-role-name small { max-width: 580px; color: #71839a; font-size: .62rem; line-height: 1.4; }
.security-role-status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border: 1px solid; border-radius: 999px; font-size: .58rem; font-weight: 850; text-transform: uppercase; white-space: nowrap; }
.security-role-status::before { width: 6px; height: 6px; border-radius: 50%; background: currentColor; content: ""; }
.security-role-status.is-editable { border-color: #b8dfd0; background: #f0faf6; color: #197154; }
.security-role-status.is-protected { border-color: #e4cc96; background: #fff8e8; color: #805f1d; }
body.security-role-modal-open { overflow: hidden; }
.security-role-dialog { width: min(1080px,calc(100vw - 32px)); max-width: none; height: min(860px,calc(100dvh - 32px)); max-height: none; padding: 0; overflow: hidden; border: 0; border-radius: 16px; background: #fff; color: var(--ink); box-shadow: 0 26px 80px rgba(4,18,37,.34); }
.security-role-dialog::backdrop { background: rgba(4,18,37,.7); backdrop-filter: blur(4px); }
.security-role-dialog-shell { display: grid; grid-template-rows: auto minmax(0,1fr) auto; width: 100%; height: 100%; margin: 0; }
.security-role-dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 19px 22px 16px; border-bottom: 1px solid #dce5ef; background: #f8fbfe; }
.security-role-dialog-header h2 { margin: 2px 0 4px; color: #1f3c5c; font-size: 1.15rem; }
.security-role-dialog-header p { max-width: 760px; margin: 0; color: #71839a; font-size: .7rem; line-height: 1.45; }
.security-role-dialog-close { flex: 0 0 34px; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 9px; background: #e8eff6; color: #587087; font-size: 1.35rem; line-height: 1; cursor: pointer; }
.security-role-dialog-close:hover { background: #dce8f2; color: #254866; }
.security-role-dialog-body { min-height: 0; padding: 18px 22px 22px; overflow: auto; }
.security-role-dialog-summary { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.security-role-dialog-summary span { padding: 7px 10px; border: 1px solid #d9e4ee; border-radius: 8px; background: #f7fafc; color: #61758a; font-size: .64rem; }
.security-role-dialog-summary strong { color: #214767; }
.security-role-dialog-body > .notice { margin-bottom: 16px; }
.security-role-dialog-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 13px 22px; border-top: 1px solid #dce5ef; background: #f8fbfe; }
.security-permission-form { margin-top: 14px; }
.security-permission-form-locked { border-color: #d7e0ea; background: #f8fafc; }
.security-profile-label { display: block; margin-bottom: 3px; color: #71839a; font-size: .56rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.security-permission-locked { flex: 0 0 auto; padding: 7px 10px; border: 1px solid #d8c28d; border-radius: 999px; background: #fff8e8; color: #7b5b18; font-size: .62rem; font-weight: 850; white-space: nowrap; }
.security-permission-grid { display: grid; gap: 16px; }
.security-permission-module { min-width: 0; }
.security-permission-grid h3 { margin: 0 0 7px; color: #2b5d8b; font-size: .7rem; letter-spacing: .04em; text-transform: uppercase; }
.security-permission-items { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px 12px; }
.security-permission-grid label { display: grid; grid-template-columns: 20px minmax(0,1fr); gap: 10px; align-items: start; min-height: 66px; padding: 10px 11px; border: 1px solid #e1e8f0; border-radius: 8px; background: #fbfcfe; cursor: pointer; }
.security-permission-grid label.is-assigned { border-color: #b9dfcf; background: #f4fbf8; }
.security-permission-grid label.is-unassigned { background: #f8fafc; }
.security-permission-grid label.is-readonly { cursor: default; }
.security-permission-grid input[type="checkbox"] { width: 18px; height: 18px; min-width: 18px; margin: 1px 0 0; padding: 0; accent-color: #1677e8; box-shadow: none; }
.security-permission-grid input[type="checkbox"]:disabled { opacity: .8; }
.security-permission-grid label > span { display: grid; min-width: 0; gap: 2px; }
.security-permission-grid strong { color: #263e59; font-size: .68rem; }
.security-permission-grid small { overflow-wrap: anywhere; color: #8290a2; font-size: .56rem; }
.security-permission-state { margin-top: 3px; color: #77879a; font-size: .56rem; font-style: normal; font-weight: 850; text-transform: uppercase; }
.is-assigned .security-permission-state { color: #177254; }
.security-account-card { max-width: 760px; }
.security-setup-steps { color: #5d6f84; font-size: .74rem; line-height: 1.55; }
.security-secret { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 12px 0; padding: 13px; border: 1px dashed #8db7dc; border-radius: 9px; background: #f0f8ff; }
.security-secret code { overflow-wrap: anywhere; color: #174e7c; font-size: .9rem; font-weight: 850; letter-spacing: .08em; }
.security-uri { display: block; overflow-wrap: anywhere; margin-top: 8px; padding: 10px; background: #f4f6f8; }
.security-code-form { display: flex; align-items: end; gap: 10px; margin-top: 15px; }
.security-code-form label { flex: 1; }
.security-danger-zone { margin-top: 15px; padding: 12px; border: 1px solid #efc2c2; border-radius: 8px; }
.security-danger-zone form { display: grid; gap: 10px; margin-top: 12px; }
.sales-admin-lookup { margin-bottom: 16px; }
.sales-admin-summary { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 10px; margin: 14px 0; }
.sales-admin-summary > div { display: grid; gap: 4px; padding: 12px; border: 1px solid #e1e8f0; border-radius: 9px; background: #f9fbfd; }
.sales-admin-summary small { color: #718096; font-size: .58rem; }
.sales-admin-summary strong { overflow-wrap: anywhere; color: #203852; font-size: .72rem; }
.sales-admin-payments { color: #516579; font-size: .7rem; }
.sales-admin-task-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.sales-admin-task-grid-single { grid-template-columns: minmax(0,720px); }
.sales-admin-task { display: flex; flex-direction: column; align-items: flex-start; border-color: #efc2c2; }
.sales-admin-task h2 { margin: 4px 0 6px; color: #7f2730; }
.sales-admin-task p { flex: 1; color: #64748b; font-size: .7rem; }
.sales-admin-task code { overflow-wrap: anywhere; }
.sales-admin-confirm { display: grid; grid-template-columns: 20px minmax(0,1fr); gap: 9px; align-items: start; margin: 10px 0 15px; color: #4b5d70; font-size: .66rem; }
.sales-admin-confirm input { width: 18px; height: 18px; margin: 0; padding: 0; accent-color: #b9333b; box-shadow: none; }
.product-import-grid { display: grid; grid-template-columns: minmax(0,1.05fr) minmax(300px,.95fr); gap: 16px; margin-bottom: 16px; }
.product-import-guide,.product-import-warehouses { min-width: 0; }
.product-import-columns { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0 15px; }
.product-import-columns code { padding: 7px 9px; border: 1px solid #cfe0ef; border-radius: 7px; background: #f3f8fc; color: #28577f; font-size: .63rem; font-weight: 800; }
.product-import-copy { color: #5f7084; font-size: .7rem; line-height: 1.55; }
.product-import-warehouses .table-wrap { max-height: 280px; }
.product-import-form { display: grid; gap: 15px; max-width: 820px; }
.product-import-file { display: grid; gap: 8px; font-weight: 800; }
.product-import-file input { padding: 14px; border: 1px dashed #8eb7dc; background: #f3f9ff; }
.product-import-clear { display: grid; grid-template-columns: 20px minmax(0,1fr); gap: 10px; align-items: start; padding: 12px; border: 1px solid #efcf9d; border-radius: 9px; background: #fffbf2; cursor: pointer; }
.product-import-clear input { width: 18px; height: 18px; margin: 1px 0 0; padding: 0; accent-color: #b36a12; box-shadow: none; }
.product-import-clear span { display: grid; gap: 3px; }
.product-import-clear strong { color: #70470f; font-size: .7rem; }
.product-import-clear small { color: #806a4b; font-size: .62rem; line-height: 1.45; }
.product-import-batches { margin-top: 16px; padding: 16px; }
.product-import-batches .panel-heading { margin-bottom: 10px; }
.product-import-batches .panel-heading > .button { flex: 0 0 auto; white-space: nowrap; }
.product-import-batches table { min-width: 960px; table-layout: fixed; }
.product-import-batches th,.product-import-batches td { padding: 8px 7px; }
.product-import-batches th.number,.product-import-batches td.number { text-align: center !important; }
.product-import-batches .product-batch-date { width: 104px; }
.product-import-batches .product-batch-user { width: 78px; }
.product-import-batches .product-batch-count { width: 82px; }
.product-import-batches .product-batch-actions { width: 150px; }
.product-batch-date-value { white-space: nowrap; }
.product-import-batch-id { display: block; overflow: hidden; margin-top: 2px; color: #8190a2; font-size: .53rem; text-overflow: ellipsis; white-space: nowrap; }
.product-import-batches td:last-child { text-align: right; }
.product-import-actions { display: flex; justify-content: flex-end; align-items: flex-start; gap: 6px; white-space: nowrap; }
.product-import-actions .button { min-height: 32px; padding: 5px 9px; font-size: .7rem; white-space: nowrap; }
.product-load-confirm { position: relative; }
.product-load-confirm summary { list-style: none; cursor: pointer; }
.product-load-confirm summary::-webkit-details-marker { display: none; }
.product-load-confirm form { position: absolute; z-index: 5; right: 0; top: calc(100% + 6px); display: grid; gap: 8px; width: 220px; padding: 12px; border: 1px solid #e0b4b4; border-radius: 9px; background: #fff; box-shadow: 0 10px 30px rgba(35,48,65,.18); text-align: left; }
.product-load-confirm label,.product-load-form label { display: grid; gap: 6px; font-size: .66rem; }
.product-load-step { display: grid; gap: 14px; border-color: #e4c0b9; }
.product-load-form { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; }
.product-load-form label { min-width: 240px; }
.product-warehouse-modal-open { overflow: hidden; }
.product-warehouse-dialog { width: min(1120px,calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px); padding: 0; overflow: hidden; border: 0; border-radius: 16px; background: #fff; color: #1b314d; box-shadow: 0 24px 70px rgba(4,18,37,.3); }
.product-warehouse-dialog[open] { display: flex; flex-direction: column; }
.product-warehouse-dialog::backdrop { background: rgba(4,18,37,.7); backdrop-filter: blur(4px); }
.product-warehouse-dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 20px 22px 16px; border-bottom: 1px solid #dce5ef; background: #f8fbfe; }
.product-warehouse-dialog-header h2 { margin: 3px 0; font-size: 1.2rem; }
.product-warehouse-dialog-header p { margin: 0; color: #71839a; font-size: .72rem; }
.product-warehouse-dialog-header > button { flex: 0 0 34px; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 9px; background: #e9eff5; color: #60758b; font-size: 1.35rem; line-height: 1; }
.product-warehouse-dialog-body { flex: 1 1 auto; min-height: 180px; padding: 18px 22px; overflow: auto; }
.product-warehouse-loading { display: grid; min-height: 150px; place-items: center; color: #61778e; font-size: .78rem; font-weight: 800; }
.product-warehouse-reference { margin-bottom: 12px; }
.product-warehouse-table { min-width: 970px; }
.product-warehouse-table th,.product-warehouse-table td { padding: 9px 8px; }
.product-warehouse-table tfoot th { border-top: 2px solid #cbd9e7; background: #f3f7fb; color: #26445f; }
.product-warehouse-delta { color: #176b50; font-weight: 850; }
.product-warehouse-dialog-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 22px; border-top: 1px solid #dce5ef; background: #f8fbfe; }
.product-warehouse-dialog-footer small { color: #6f8195; font-size: .65rem; }
.product-warehouse-dialog-footer > div { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.product-validation-results { display: grid; gap: 16px; margin-top: 22px; }
.product-validation-header { margin-bottom: 0; }
.product-validation-header h2 { overflow-wrap: anywhere; font-size: 1rem; }
.product-validation-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.product-validation-summary article { display: grid; gap: 5px; border-top: 3px solid #4b8bc3; }
.product-validation-summary small { color: #748398; font-size: .62rem; font-weight: 800; }
.product-validation-summary strong { color: #193b5e; font-size: 1.55rem; }
.product-validation-detail table,.product-validation-preview table { min-width: 1050px; }
.security-recovery-codes { display: grid; grid-template-columns: repeat(2,1fr); gap: 7px; padding: 12px; border: 1px dashed #94a8ba; border-radius: 9px; background: #f6f8fa; }
.security-recovery-codes code { padding: 5px; color: #173a5c; font-weight: 850; text-align: center; }
.registration-employee-toggle { display: grid; gap: 9px; margin-top: 4px; padding: 13px; border: 1px solid #cbdced; border-radius: 10px; background: #f5f9fd; }
.registration-employee-toggle > label { display: grid; grid-template-columns: 20px minmax(0,1fr); align-items: start; gap: 10px; cursor: pointer; }
.registration-employee-toggle input[type="checkbox"] { width: 18px; height: 18px; min-width: 18px; margin: 1px 0 0; padding: 0; accent-color: #1677e8; box-shadow: none; }
.registration-employee-toggle label span { display: grid; gap: 3px; }
.registration-employee-toggle label strong { color: #203a5b; font-size: .76rem; }
.registration-employee-toggle label small { color: #6d7f92; font-size: .66rem; line-height: 1.4; }

@media (max-width: 760px) {
    .security-role-summary, .security-permission-items { grid-template-columns: 1fr; }
    .security-role-list .panel-heading { align-items: stretch; flex-direction: column; }
    .security-role-count { align-self: flex-start; }
    .security-role-dialog { width: 100vw; height: 100dvh; border-radius: 0; }
    .security-role-dialog-header,.security-role-dialog-body { padding-right: 16px; padding-left: 16px; }
    .security-role-dialog-footer { padding: 12px 16px; }
    .security-role-dialog-footer .button { flex: 1 1 auto; }
    .security-permission-form .panel-heading { align-items: stretch; flex-direction: column; }
    .security-permission-form .panel-heading .button { width: 100%; }
    .security-permission-locked { align-self: flex-start; }
    .security-code-form { align-items: stretch; flex-direction: column; }
    .sales-admin-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .sales-admin-task-grid { grid-template-columns: 1fr; }
    .product-import-grid { grid-template-columns: 1fr; }
    .product-import-batches .panel-heading { align-items: stretch; flex-direction: column; }
    .product-warehouse-dialog { width: 100vw; height: 100dvh; max-height: none; border-radius: 0; }
    .product-warehouse-dialog-header,.product-warehouse-dialog-body { padding: 16px; }
    .product-warehouse-dialog-footer { align-items: stretch; flex-direction: column; padding: 12px 16px; }
    .product-warehouse-dialog-footer > div { justify-content: stretch; }
    .product-warehouse-dialog-footer .button { flex: 1 1 auto; }
    .product-validation-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

/* CUSTOMER PERSON EDIT MODAL --------------------------------------------- */
body.person-edit-modal-open { overflow: hidden; }
.customer-table-wrap table { min-width: 1120px; }
.customer-actions-heading,
.customer-actions-cell { width: 148px; text-align: right !important; }
.customer-edit-button { gap: 7px; white-space: nowrap; }
.customer-edit-button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.person-edit-dialog {
  width: min(1580px, calc(100vw - 24px));
  max-width: none;
  height: calc(100dvh - 24px);
  max-height: none;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  background: #eef3f9;
  color: var(--ink);
  box-shadow: 0 38px 110px rgba(3, 15, 33, .46);
}
.person-edit-dialog[open] { display: flex; flex-direction: column; }
.person-edit-dialog::backdrop { background: rgba(5, 18, 37, .72); backdrop-filter: blur(6px); }
.person-edit-dialog-header {
  z-index: 3;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 66px;
  padding: 10px 14px 10px 18px;
  border-bottom: 1px solid #d7e2ef;
  background: linear-gradient(180deg, #fff, #f8fbfe);
}
.person-edit-dialog-heading { display: flex; align-items: center; gap: 11px; min-width: 0; }
.person-edit-dialog-heading > div { min-width: 0; }
.person-edit-dialog-heading small,
.person-edit-dialog-heading strong { display: block; }
.person-edit-dialog-heading small {
  margin-bottom: 2px;
  color: #3498DB;
  font-size: .63rem;
  font-weight: 900;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.person-edit-dialog-heading strong {
  overflow: hidden;
  color: #152b48;
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.person-edit-dialog-icon {
  display: grid;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 11px;
  background: #eaf2ff;
  color: #3498DB;
}
.person-edit-dialog-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.person-edit-dialog-close {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: #edf2f7;
  color: #627188;
  font-size: 1.65rem;
  line-height: 1;
}
.person-edit-dialog-close:hover { background: #e1e8f0; color: #173b69; }
.person-edit-dialog-body { position: relative; flex: 1 1 auto; min-height: 0; background: #eef3f9; }
.person-edit-dialog iframe { display: block; width: 100%; height: 100%; border: 0; background: #eef3f9; }
.person-edit-frame-loading {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 13px;
  background: #f2f6fb;
  color: #31577f;
  font-size: .78rem;
}
.person-edit-frame-loading[hidden] { display: none; }
.person-edit-frame-loading span {
  width: 34px;
  height: 34px;
  border: 3px solid #cbdcf0;
  border-top-color: #3498DB;
  border-radius: 50%;
  animation: person-edit-spin .75s linear infinite;
}
@keyframes person-edit-spin { to { transform: rotate(360deg); } }

body.app-shell.person-edit-embedded { display: block; min-height: 100dvh; background: #eef3f9; }
.person-edit-embedded .sidebar,
.person-edit-embedded .sidebar-backdrop,
.person-edit-embedded .topbar { display: none !important; }
.person-edit-embedded .content { min-height: 100dvh; padding: 14px 16px 24px; }
.person-edit-embedded .registration-hero { margin-bottom: 14px; padding: 16px 20px; border-radius: 14px; }
.person-edit-embedded .registration-hero-mark,
.person-edit-embedded .registration-hero-meta { display: none; }
.person-edit-embedded .registration-hero h1 { font-size: 1.55rem; }
.person-edit-embedded .registration-form { gap: 16px; }
.person-edit-embedded .registration-progress { top: 14px; }

@media (max-width: 760px) {
  .person-edit-dialog { width: calc(100vw - 6px); height: calc(100dvh - 6px); border-radius: 12px; }
  .person-edit-dialog-header { min-height: 58px; padding: 8px 9px 8px 11px; }
  .person-edit-dialog-icon { width: 36px; height: 36px; flex-basis: 36px; }
  .person-edit-dialog-heading strong { max-width: calc(100vw - 125px); font-size: .88rem; }
  .person-edit-embedded .content { padding: 8px; }
  .person-edit-embedded .registration-hero { padding: 14px; }
}

/* Reporte diario: acceso y modal de detalle de ventas. */
.report-page-side { display: grid; justify-items: end; gap: 10px; }
.report-scope-chip { display: flex; align-items: center; gap: 10px; min-width: 245px; padding: 9px 12px; border: 1px solid #b9dcf2; border-radius: 12px; background: #eff8fe; color: #24445f; box-shadow: 0 6px 18px rgba(52,152,219,.08); }
.report-scope-icon { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border-radius: 9px; background: #fff; color: #3498db; }
.report-scope-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.report-scope-chip small,.report-scope-chip strong,.report-scope-chip em { display: block; }
.report-scope-chip small { color: #6f8499; font-size: .56rem; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.report-scope-chip strong { margin-top: 2px; color: #2176ad; font-size: .76rem; }
.report-scope-chip em { margin-top: 1px; color: #75889b; font-size: .56rem; font-style: normal; }
.report-daily-table tbody tr { transition: background-color .16s ease; }
.report-daily-table tbody tr:has(.report-date-trigger:hover) { background: #f2f8ff; }
.report-date-trigger {
    display: inline-grid;
    grid-template-columns: 28px auto auto;
    align-items: center;
    gap: 9px;
    min-height: 38px;
    padding: 4px 8px 4px 4px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #183450;
    font: inherit;
    font-weight: 750;
    cursor: pointer;
    transition: color .16s ease, background .16s ease;
}
.report-date-trigger > svg {
    width: 28px;
    height: 28px;
    padding: 6px;
    border-radius: 8px;
    background: #eaf2ff;
    fill: none;
    stroke: #3498DB;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.report-date-trigger-action {
    color: #3498DB;
    font-size: .72rem;
    font-weight: 800;
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity .16s ease, transform .16s ease;
}
.report-date-trigger:hover,
.report-date-trigger:focus-visible { background: #eff6ff; color: #3498DB; outline: none; }
.report-date-trigger:hover .report-date-trigger-action,
.report-date-trigger:focus-visible .report-date-trigger-action { opacity: 1; transform: translateX(0); }
.report-daily-empty { padding: 28px !important; color: var(--muted); text-align: center; }

.report-detail-dialog {
    width: min(1180px, calc(100vw - 38px));
    max-width: none;
    height: min(760px, calc(100dvh - 38px));
    max-height: none;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 18px;
    background: #f5f8fc;
    color: var(--ink);
    box-shadow: 0 36px 100px rgba(1, 13, 32, .42);
}
.report-detail-dialog[open] { display: flex; flex-direction: column; }
.report-detail-dialog::backdrop { background: rgba(5, 19, 38, .68); backdrop-filter: blur(5px); }
.report-detail-header {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 76px;
    padding: 14px 20px;
    border-bottom: 1px solid #dce5ef;
    background: #fff;
}
.report-detail-heading { display: flex; align-items: center; gap: 12px; }
.report-detail-heading small,
.report-detail-heading strong { display: block; }
.report-detail-heading small { margin-bottom: 2px; color: #3498DB; font-size: .66rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.report-detail-heading strong { color: #142b48; font-size: 1.12rem; }
.report-detail-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #eaf2ff;
    color: #3498DB;
}
.report-detail-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.report-detail-close {
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: #eef2f7;
    color: #617187;
    font-size: 1.65rem;
    line-height: 1;
    cursor: pointer;
}
.report-detail-close:hover { background: #e3e9f1; color: #173b69; }
.report-detail-body { flex: 1 1 auto; min-height: 0; padding: 20px; overflow: auto; }
.report-detail-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.report-detail-summary article { padding: 15px 16px; border: 1px solid #dce5ef; border-radius: 12px; background: #fff; box-shadow: 0 6px 18px rgba(24, 52, 80, .05); }
.report-detail-summary article.featured { border-color: #bfdbfe; background: linear-gradient(135deg, #073354, #2176AD); }
.report-detail-summary span,
.report-detail-summary strong { display: block; }
.report-detail-summary span { color: #6b7d94; font-size: .7rem; font-weight: 800; }
.report-detail-summary strong { margin-top: 6px; color: #152b47; font-size: 1.35rem; letter-spacing: -.025em; }
.report-detail-summary .featured span { color: #bfdbfe; }
.report-detail-summary .featured strong { color: #fff; }
.report-detail-table-wrap { overflow: auto; border: 1px solid #d7e1ec; border-radius: 13px; background: #fff; }
.report-detail-table { min-width: 980px; margin: 0; }
.report-detail-table thead th { position: sticky; top: 0; z-index: 1; background: #edf3f8; color: #526a84; font-size: .66rem; letter-spacing: .035em; text-transform: uppercase; }
.report-detail-table tbody tr:hover { background: #f3f9fb; }
.report-detail-table td { vertical-align: middle; }
.report-detail-folio { padding: 0; border: 0; background: transparent; color: #3498DB; font: inherit; font-weight: 850; text-decoration: none; cursor: pointer; }
.report-detail-folio:hover { text-decoration: underline; }
.report-detail-action { display: inline-flex; align-items: center; justify-content: center; min-height: 30px; padding: 5px 10px; border: 1px solid #c8d8e7; border-radius: 8px; color: #234666; font-size: .7rem; font-weight: 800; text-decoration: none; }
.report-detail-action:hover { border-color: #93c5fd; background: #eff6ff; color: #3498DB; }
.report-detail-loading { display: grid; min-height: 360px; place-items: center; align-content: center; gap: 13px; color: #536b84; }
.report-detail-loading[hidden],
.report-detail-error[hidden],
[data-report-detail-content][hidden],
.report-detail-empty[hidden],
.report-detail-table[hidden] { display: none !important; }
.report-detail-loading > span { width: 34px; height: 34px; border: 3px solid #cfe1ea; border-top-color: #3498DB; border-radius: 50%; animation: report-detail-spin .75s linear infinite; }
@keyframes report-detail-spin { to { transform: rotate(360deg); } }
.report-detail-error { max-width: 520px; margin: 70px auto; padding: 24px; border: 1px solid #f3cbc8; border-radius: 14px; background: #fff4f3; color: #8e2e27; text-align: center; }
.report-detail-error p { margin: 6px 0 16px; color: #7b5360; }
.report-detail-empty { padding: 54px 20px; color: #6b7d94; text-align: center; }
.report-detail-footer { display: flex; flex: 0 0 auto; justify-content: flex-end; gap: 9px; padding: 13px 20px; border-top: 1px solid #dce5ef; background: #fff; }

@media (max-width: 760px) {
    .report-page-side { width: 100%; justify-items: stretch; }
    .report-scope-chip { min-width: 0; }
    .report-page-side .actions { width: 100%; }
    .report-page-side .actions .button { flex: 1; }
    .report-date-trigger { grid-template-columns: 28px auto; }
    .report-date-trigger-action { display: none; }
    .report-detail-dialog { width: calc(100vw - 8px); height: calc(100dvh - 8px); border-radius: 13px; }
    .report-detail-header { min-height: 64px; padding: 10px 12px; }
    .report-detail-icon { width: 38px; height: 38px; }
    .report-detail-body { padding: 12px; }
    .report-detail-summary { grid-template-columns: 1fr 1fr; gap: 8px; }
    .report-detail-summary article { padding: 12px; }
    .report-detail-summary strong { font-size: 1.05rem; }
    .report-detail-footer { padding: 10px 12px; }
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--canvas); color: var(--ink); }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }

.app-shell { display: grid; grid-template: "sidebar topbar" 72px "sidebar content" 1fr / 246px 1fr; }
.sidebar { grid-area: sidebar; position: fixed; inset: 0 auto 0 0; width: 246px; padding: 22px 18px; background: var(--nav); color: #f3fff9; display: flex; flex-direction: column; z-index: 20; }
.brand { display: flex; align-items: center; gap: 12px; color: white; padding: 0 8px 24px; }
.brand:hover { color: white; }
.brand-mark { width: 42px; height: 42px; border-radius: 13px; display: inline-grid; place-items: center; background: #52d39f; color: #0c2a21; font-weight: 900; letter-spacing: -.04em; }
.brand-mark.large { width: 54px; height: 54px; border-radius: 16px; font-size: 1.15rem; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 1.05rem; letter-spacing: .01em; }
.brand small { color: #98b6ac; margin-top: 2px; font-size: .72rem; }
.sidebar nav { display: grid; gap: 5px; }
.sidebar nav a { color: #b7cbc4; padding: 11px 12px; border-radius: 10px; display: flex; align-items: center; gap: 12px; font-weight: 650; font-size: .91rem; }
.sidebar nav a span { font-size: .65rem; color: #68857b; font-variant-numeric: tabular-nums; }
.sidebar nav a:hover, .sidebar nav a.active { background: var(--nav-soft); color: #fff; }
.sidebar nav a.active span { color: #52d39f; }
.sidebar-user { margin-top: auto; padding: 14px 8px 0; border-top: 1px solid #28443b; display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 9px; }
.sidebar-user .avatar { width: 36px; height: 36px; border-radius: 50%; background: #26483d; display: grid; place-items: center; color: #78e1b6; font-size: .75rem; font-weight: 800; }
.sidebar-user strong, .sidebar-user small { display: block; max-width: 105px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user strong { font-size: .8rem; }.sidebar-user small { font-size: .65rem; color: #91aaa1; margin-top: 2px; }
.sidebar-user .link-button { color: #9eb8ae; font-size: .68rem; padding: 0; }

.topbar { grid-area: topbar; position: sticky; top: 0; z-index: 15; height: 72px; padding: 0 32px; display: flex; align-items: center; justify-content: space-between; background: rgba(255,255,255,.9); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.topbar > div { margin-left: auto; margin-right: 20px; text-align: right; }.topbar small,.topbar strong { display: block; }.topbar small { color: var(--muted); font-size: .68rem; }.topbar strong { font-size: .78rem; }
.menu-button { display: none; border: 0; background: transparent; color: var(--ink); font-weight: 700; }
.content { grid-area: content; min-width: 0; padding: 32px; }

.page-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 22px; }
.page-header h1 { font-size: clamp(1.8rem, 3vw, 2.45rem); margin: 4px 0 6px; letter-spacing: -.045em; line-height: 1.05; }
.page-header p { margin: 0; color: var(--muted); }
.eyebrow { color: var(--primary); font-size: .7rem; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.date-chip { border: 1px solid var(--line); border-radius: 999px; padding: 9px 14px; background: white; color: var(--muted); font-size: .82rem; }
.actions { display: flex; gap: 8px; }

.button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 10px; padding: 9px 16px; font-weight: 750; font-size: .85rem; transition: .15s ease; }
.button:hover { transform: translateY(-1px); }.button.primary { color: white; background: var(--primary); }.button.primary:hover { background: var(--primary-dark); color: white; }
.button.secondary { color: var(--ink); background: #eef4f1; border-color: #d7e3de; }.button.ghost { color: var(--ink); background: white; border-color: var(--line); }.button.danger { color: white; background: var(--red); }
.button.compact { min-height: 36px; padding: 7px 12px; font-size: .77rem; }.button.full { width: 100%; }
.link-button { border: 0; background: transparent; color: var(--primary); font-weight: 750; cursor: pointer; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 20px; min-width: 0; }
.panel-heading, .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.panel-heading h2, .section-heading h2 { margin: 0 0 3px; font-size: 1rem; }.panel-heading p,.section-heading p { margin: 0; color: var(--muted); font-size: .78rem; }.panel-heading a { font-size: .76rem; font-weight: 750; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 18px; }
.metric { padding: 19px; min-height: 132px; background: white; border: 1px solid var(--line); border-radius: 15px; display: flex; flex-direction: column; justify-content: space-between; box-shadow: var(--shadow); }
.metric > span { color: var(--muted); font-size: .76rem; font-weight: 700; }.metric strong { font-size: 1.8rem; letter-spacing: -.045em; }.metric small { color: var(--muted); }.metric.featured { background: var(--nav); color: white; border-color: var(--nav); }.metric.featured > span,.metric.featured small { color: #a7c4ba; }.metric.featured strong { color: #69d9ad; }.metric.warning { border-color: #efcf9f; background: #fffaf1; }
.split-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .75fr); gap: 18px; align-items: start; }.cash-grid { margin-bottom: 18px; }

.table-wrap { overflow-x: auto; }.table-wrap table { width: 100%; border-collapse: collapse; font-size: .82rem; }.table-wrap th { padding: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-size: .63rem; text-align: left; border-bottom: 1px solid var(--line); }.table-wrap td { padding: 12px 10px; border-bottom: 1px solid #edf1ef; vertical-align: middle; }.table-wrap tbody tr:hover { background: #f8faf9; }.table-wrap tbody tr:last-child td { border-bottom: 0; }.number { text-align: right !important; font-variant-numeric: tabular-nums; }.strong { font-weight: 780; }.table-subtitle { display: block; margin-top: 3px; color: var(--muted); font-size: .7rem; }
.badge { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 999px; background: #eef2f0; color: #52645e; font-weight: 780; font-size: .66rem; white-space: nowrap; }.badge.green { background: var(--mint); color: #0b6a4e; }.badge.amber { background: var(--amber-soft); color: #93590f; }.badge.red { background: var(--red-soft); color: #a33434; }
.alert-list { display: grid; gap: 4px; }.alert-list article,.list-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 4px; border-bottom: 1px solid #edf1ef; }.alert-list article:last-child,.list-row:last-child { border-bottom: 0; }.alert-list strong,.alert-list small,.list-row strong,.list-row small { display: block; }.alert-list small,.list-row small { color: var(--muted); margin-top: 2px; font-size: .7rem; }.alert-list article > span { min-width: 42px; text-align: center; background: var(--amber-soft); color: #8c550d; border-radius: 9px; padding: 7px; font-weight: 800; }

.filters { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; padding-bottom: 18px; margin-bottom: 2px; border-bottom: 1px solid var(--line); }.filters label,.form-grid label,.pos-layout label,.login-form label { display: grid; gap: 6px; color: var(--muted); font-size: .72rem; font-weight: 750; }.search-field { flex: 1; min-width: 230px; }.check-field { display: flex !important; align-items: center; flex-direction: row; min-height: 42px; }.check-field input { width: auto; }
input,select,textarea { width: 100%; border: 1px solid #ccd8d3; border-radius: 9px; background: white; color: var(--ink); padding: 10px 11px; outline: none; }.filters input,.filters select { min-height: 42px; }.filters select { min-width: 150px; }input:focus,select:focus,textarea:focus { border-color: #52aa8d; box-shadow: 0 0 0 3px rgba(10,123,91,.11); }
.form-grid { display: grid; gap: 13px; }.form-grid.two { grid-template-columns: repeat(2,minmax(0,1fr)); }.compact-form { margin-top: 18px; }.compact-form .button { align-self: end; }
.inline-create { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }

.notice,.flash { border-radius: 11px; padding: 11px 14px; font-size: .81rem; margin-bottom: 16px; }.notice.warning,.flash.error { background: var(--amber-soft); color: #7b4a09; border: 1px solid #ebcb9b; }.notice.success,.flash.success { background: var(--mint); color: #09593f; border: 1px solid #b9e3d2; }
.empty-state { color: var(--muted); padding: 18px 0; text-align: center; }.empty-state.spacious { padding: 48px 0; background: #f7f9f8; border-radius: 11px; }

.pos-layout { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 18px; align-items: start; }.pos-main { display: grid; gap: 18px; }.checkout-card { position: sticky; top: 94px; display: grid; gap: 14px; }.checkout-card h2 { margin: 0; }.checkout-total { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 16px 0; }.checkout-total span,.checkout-total small { display: block; color: var(--muted); }.checkout-total strong { display: block; font-size: 2rem; margin: 3px 0; letter-spacing: -.05em; }.credit-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; padding: 12px; background: var(--amber-soft); border-radius: 10px; }.cart-lines { display: grid; gap: 9px; }.cart-line { display: grid; grid-template-columns: minmax(260px,1fr) 100px 110px auto; align-items: end; gap: 10px; padding: 12px; background: #f6f9f7; border: 1px solid #e1e8e5; border-radius: 12px; }.line-value span,.line-value strong { display: block; }.line-value span { color: var(--muted); font-size: .68rem; font-weight: 750; }.line-value strong { margin-top: 10px; }.remove-line { border: 0; background: transparent; color: var(--red); padding: 10px 2px; font-size: .72rem; }

.current-session { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 18px; background: var(--nav); color: white; border-radius: 13px; }.current-session h3,.current-session p { margin: 2px 0; }.current-session p,.current-session small { color: #a7c4ba; }.current-session > strong { color: #69d9ad; font-size: 1.25rem; }.status-dot { width: 10px; height: 10px; border-radius: 50%; background: #5ce0ad; box-shadow: 0 0 0 5px rgba(92,224,173,.12); }
.ticket { max-width: 900px; margin: 0 auto; }.ticket-heading,.ticket-meta,.ticket-bottom { display: flex; align-items: center; justify-content: space-between; gap: 20px; }.ticket-heading { padding-bottom: 20px; border-bottom: 2px solid var(--ink); }.ticket-heading > div { display: flex; align-items: center; gap: 9px; }.ticket-heading > div:last-child { flex-direction: column; align-items: flex-end; }.ticket-meta { padding: 18px 0; }.ticket-meta div { flex: 1; }.ticket-meta span,.ticket-meta strong { display: block; }.ticket-meta span { color: var(--muted); font-size: .7rem; }.ticket-bottom { align-items: flex-start; padding-top: 20px; }.ticket-bottom h3 { margin: 0 0 8px; }.ticket-bottom p { margin: 5px 0; }.ticket-bottom p strong { margin-left: 18px; }.ticket-bottom dl { min-width: 270px; display: grid; grid-template-columns: 1fr auto; gap: 8px 20px; }.ticket-bottom dt,.ticket-bottom dd { margin: 0; }.ticket-bottom dd { text-align: right; }.ticket-bottom .total { font-size: 1.1rem; font-weight: 850; padding-top: 8px; border-top: 1px solid var(--line); }

.guest-content { min-height: 100vh; display: grid; place-items: center; padding: 28px; background: radial-gradient(circle at 15% 15%, #1a4437 0, #10231f 42%, #0b1916 100%); }.login-panel { width: min(980px,100%); min-height: 580px; display: grid; grid-template-columns: 1.15fr .85fr; background: white; border-radius: 22px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.3); }.login-copy { padding: 64px; color: white; background: linear-gradient(145deg, rgba(14,49,40,.88), rgba(7,96,69,.86)), linear-gradient(35deg,#0b221c,#148162); display: flex; flex-direction: column; justify-content: center; }.login-copy .eyebrow { color: #7ae0b8; }.login-copy h1 { max-width: 500px; font-size: clamp(2.4rem,5vw,4.2rem); line-height: .98; letter-spacing: -.06em; margin: 16px 0 22px; }.login-copy p { color: #bfdbd1; max-width: 450px; font-size: 1.05rem; line-height: 1.6; }.login-form { padding: 54px 44px; align-self: center; display: grid; gap: 16px; }.login-form h2 { margin: 8px 0 -8px; font-size: 1.7rem; }.login-form > p { color: var(--muted); margin: 0 0 8px; }.login-form .muted { color: var(--muted); line-height: 1.5; text-align: center; }
.error-page { min-height: 60vh; display: grid; justify-items: center; align-content: center; text-align: center; }.error-page > span { color: #b9cdc5; font-size: 6rem; font-weight: 950; letter-spacing: -.09em; }.error-page h1 { margin: -15px 0 5px; }.error-page p { color: var(--muted); margin-bottom: 22px; }

@media (max-width: 1100px) { .metric-grid { grid-template-columns: repeat(2,1fr); }.split-grid,.pos-layout { grid-template-columns: 1fr; }.checkout-card { position: static; }.cart-line { grid-template-columns: minmax(220px,1fr) 100px 100px auto; } }
@media (max-width: 760px) { .app-shell { display: block; }.sidebar { transform: translateX(-105%); transition: transform .2s ease; box-shadow: 10px 0 40px rgba(0,0,0,.22); }.sidebar.open { transform: translateX(0); }.topbar { padding: 0 16px; }.topbar > div { display: none; }.menu-button { display: block; }.content { padding: 22px 14px; }.page-header { align-items: flex-start; flex-direction: column; }.metric-grid { grid-template-columns: 1fr; }.form-grid.two,.credit-fields { grid-template-columns: 1fr; }.cart-line { grid-template-columns: 1fr 90px; }.cart-line .product-select { grid-column: 1 / -1; }.login-panel { grid-template-columns: 1fr; }.login-copy { display: none; }.login-form { padding: 42px 28px; }.inline-create { grid-template-columns: 1fr; }.ticket-meta,.ticket-bottom { align-items: stretch; flex-direction: column; }.ticket-bottom dl { width: 100%; }.print-hidden { display: flex; } }
@media print { .sidebar,.topbar,.print-hidden,.flash { display: none !important; }.app-shell { display: block; }.content { padding: 0; }.panel { border: 0; box-shadow: none; }.ticket { max-width: none; } }

/* NX BLUE PROFESSIONAL THEME ------------------------------------------------ */
:root {
  --ink: #17233a;
  --muted: #65728a;
  --line: #d9e2ef;
  --surface: #ffffff;
  --canvas: #f3f6fb;
  --nav: #0b1f3a;
  --nav-soft: #12355b;
  --primary: #3498DB;
  --primary-dark: #2176AD;
  --mint: #e8f0ff;
  --shadow: 0 14px 38px rgba(18, 48, 89, .09);
}

body {
  background:
    radial-gradient(circle at 78% -10%, rgba(21, 94, 239, .075), transparent 28rem),
    var(--canvas);
}

.app-shell { grid-template: "sidebar topbar" 76px "sidebar content" 1fr / 258px 1fr; }
.sidebar {
  width: 258px;
  padding: 24px 18px 20px;
  color: #f5f8ff;
  background:
    radial-gradient(circle at 12% 5%, rgba(56, 189, 248, .16), transparent 14rem),
    linear-gradient(180deg, #0d2849 0%, #091a31 58%, #07162a 100%);
  border-right: 1px solid rgba(147, 197, 253, .1);
  box-shadow: 12px 0 38px rgba(8, 24, 48, .08);
}
.brand { gap: 13px; padding-bottom: 29px; }
.brand-mark {
  background: linear-gradient(145deg, #62B9EA, #3498DB);
  color: #fff;
  box-shadow: 0 9px 24px rgba(37, 99, 235, .36), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.brand small { color: #8faac7; letter-spacing: .035em; }
.sidebar nav { gap: 6px; }
.sidebar nav a {
  position: relative;
  color: #a9bed5;
  padding: 12px 13px;
  border: 1px solid transparent;
  transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}
.sidebar nav a span { color: #6f89a7; }
.sidebar nav a:hover {
  background: rgba(30, 76, 121, .58);
  border-color: rgba(147, 197, 253, .08);
  transform: translateX(2px);
}
.sidebar nav a.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(37, 99, 235, .32), rgba(30, 78, 121, .46));
  border-color: rgba(96, 165, 250, .16);
  box-shadow: inset 3px 0 #62B9EA;
}
.sidebar nav a.active span { color: #93c5fd; }
.sidebar-user { border-top-color: rgba(147, 197, 253, .14); }
.sidebar-user .avatar { background: #153a63; color: #93c5fd; box-shadow: inset 0 0 0 1px rgba(147, 197, 253, .14); }
.sidebar-user small, .sidebar-user .link-button { color: #89a4c0; }

.topbar {
  height: 76px;
  padding: 0 34px;
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 1px 0 rgba(18, 48, 89, .02);
  backdrop-filter: blur(18px) saturate(145%);
}
.content { padding: 34px; }
.page-header { margin-bottom: 25px; }
.page-header h1 { color: #13213a; font-weight: 820; }
.eyebrow { color: #3498DB; }
.date-chip { box-shadow: 0 5px 18px rgba(18, 48, 89, .05); }

.button { border-radius: 9px; box-shadow: 0 1px 2px rgba(18, 48, 89, .06); }
.button.primary {
  background: linear-gradient(135deg, #3498DB, #3498DB);
  box-shadow: 0 8px 18px rgba(21, 94, 239, .2);
}
.button.primary:hover { background: linear-gradient(135deg, #2588C7, #2176AD); box-shadow: 0 10px 22px rgba(21, 94, 239, .25); }
.button.secondary { color: #1e3a5f; background: #edf3fc; border-color: #d5e2f2; }
.button.secondary:hover { background: #e3edfa; }
.button.ghost:hover { color: var(--primary); border-color: #a8c4f7; background: #f8fbff; }

.panel, .metric {
  border-color: #dde6f2;
  box-shadow: 0 10px 32px rgba(18, 48, 89, .065);
}
.panel { border-radius: 15px; }
.metric {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.metric::after {
  content: "";
  position: absolute;
  width: 74px;
  height: 74px;
  right: -31px;
  top: -34px;
  border-radius: 50%;
  background: rgba(37, 99, 235, .07);
}
.metric:hover { transform: translateY(-2px); border-color: #c8d9ef; box-shadow: 0 16px 38px rgba(18, 48, 89, .1); }
.metric.featured {
  background: linear-gradient(140deg, #123a68 0%, #0b2442 62%, #081a30 100%);
  border-color: #173c64;
  box-shadow: 0 16px 34px rgba(7, 28, 54, .2);
}
.metric.featured::after { background: rgba(96, 165, 250, .13); }
.metric.featured > span, .metric.featured small { color: #a8bfda; }
.metric.featured strong { color: #93c5fd; }

.table-wrap table { font-variant-numeric: tabular-nums; }
.table-wrap th { color: #526681; background: #f7f9fc; border-bottom-color: #dbe5f1; }
.table-wrap th:first-child { border-radius: 8px 0 0 8px; }
.table-wrap th:last-child { border-radius: 0 8px 8px 0; }
.table-wrap td { border-bottom-color: #e9eef5; }
.table-wrap tbody tr { transition: background .12s ease; }
.table-wrap tbody tr:hover { background: #f5f8fd; }
.badge { background: #edf2f8; color: #53657c; }
.badge.green { background: #e1f5ec; color: #087451; }

input, select, textarea { border-color: #cbd8e8; border-radius: 8px; box-shadow: inset 0 1px 2px rgba(18, 48, 89, .025); }
input:hover, select:hover, textarea:hover { border-color: #afc2da; }
input:focus, select:focus, textarea:focus { border-color: #4f86ef; box-shadow: 0 0 0 3px rgba(21, 94, 239, .11); }
.empty-state.spacious { background: #f6f8fc; }
.cart-line { background: #f7f9fc; border-color: #dde6f1; }
.current-session {
  background: linear-gradient(135deg, #123b68, #0a2341);
  box-shadow: 0 14px 28px rgba(8, 35, 65, .15);
}
.current-session p, .current-session small { color: #afc4dc; }
.current-session > strong { color: #93c5fd; }

.guest-content {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 8%, rgba(56, 189, 248, .2), transparent 28rem),
    radial-gradient(circle at 92% 92%, rgba(37, 99, 235, .2), transparent 30rem),
    linear-gradient(145deg, #0a2240, #07182d 56%, #050f20);
}
.guest-content::before, .guest-content::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(147, 197, 253, .11);
  border-radius: 50%;
  pointer-events: none;
}
.guest-content::before { width: 420px; height: 420px; left: -210px; bottom: -220px; }
.guest-content::after { width: 290px; height: 290px; right: -145px; top: -145px; }
.login-panel {
  position: relative;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 20px;
  box-shadow: 0 36px 90px rgba(0, 9, 24, .45);
}
.login-copy {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(12, 47, 84, .94), rgba(17, 84, 157, .89)),
    #0a284a;
}
.login-copy::after {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  right: -180px;
  bottom: -190px;
  border: 42px solid rgba(125, 211, 252, .08);
  border-radius: 50%;
}
.login-copy > * { position: relative; z-index: 1; }
.login-copy .eyebrow { color: #93c5fd; }
.login-copy h1 { text-shadow: 0 2px 18px rgba(0, 24, 62, .2); }
.login-copy p { color: #c3d5e9; }
.login-form { background: linear-gradient(180deg, #fff, #fbfcff); }
.login-form h2 { color: #14233d; }
.error-page > span { color: #c8d8ea; }

@media (max-width: 760px) {
  .topbar { height: 70px; padding: 0 16px; }
  .content { padding: 24px 15px; }
  .guest-content { width: 100%; padding: 16px; }
  .login-panel { width: 100%; min-width: 0; min-height: auto; grid-template-columns: minmax(0, 1fr); }
  .login-form { width: 100%; min-width: 0; padding: 46px 24px; }
  .login-form > .muted { max-width: 100%; overflow-wrap: anywhere; }
}

@media print {
  body { background: white; }
  .panel, .metric { box-shadow: none; }
}

/* POS TERMINAL ------------------------------------------------------------- */
.pos-terminal {
  display: grid;
  grid-template: "topbar" 76px "content" 1fr / 1fr;
  min-height: 100vh;
  background: #eef3f9;
}
.pos-terminal .sidebar { display: none; }
.pos-terminal .topbar { grid-area: topbar; padding: 0 24px; }
.pos-terminal .topbar > div { margin-left: auto; }
.pos-terminal .content { grid-area: content; padding: 8px 8px 14px; }
.pos-terminal-brand { display: flex; align-items: center; gap: 11px; color: var(--ink); }
.pos-terminal-brand:hover { color: var(--ink); }
.pos-terminal-brand .brand-mark { width: 38px; height: 38px; border-radius: 11px; }
.pos-terminal-brand strong, .pos-terminal-brand small { display: block; }
.pos-terminal-brand strong { font-size: .95rem; }
.pos-terminal-brand small { margin-top: 1px; color: var(--muted); font-size: .68rem; }

.pos-page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.pos-page-heading h1 { margin: 4px 0 4px; color: #13213a; font-size: clamp(1.65rem, 2.5vw, 2.15rem); letter-spacing: -.045em; line-height: 1; }
.pos-page-heading p { margin: 0; color: var(--muted); font-size: .85rem; }
.pos-session-chip { display: flex; align-items: center; gap: 10px; min-width: 235px; padding: 10px 13px; border: 1px solid #cfe1f5; border-radius: 11px; background: rgba(255,255,255,.88); box-shadow: 0 7px 22px rgba(18,48,89,.06); }
.pos-session-chip i { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: #16a36a; box-shadow: 0 0 0 5px rgba(22,163,106,.1); }
.pos-session-chip small, .pos-session-chip strong { display: block; }
.pos-session-chip small { color: var(--muted); font-size: .63rem; text-transform: uppercase; letter-spacing: .08em; }
.pos-session-chip strong { margin-top: 2px; font-size: .76rem; }
.pos-notice { margin-top: -6px; }

.pos-terminal-layout { display: grid; grid-template-columns: minmax(0,1fr) 390px; gap: 18px; align-items: start; }
.pos-catalog, .pos-cart-panel { min-width: 0; border: 1px solid #dbe5f1; background: #fff; box-shadow: 0 12px 34px rgba(18,48,89,.07); }
.pos-catalog { padding: 16px; border-radius: 15px; }
.pos-cart-panel { position: sticky; top: 98px; display: flex; flex-direction: column; min-height: calc(100vh - 120px); max-height: calc(100vh - 120px); border-radius: 15px; overflow: hidden; }

.pos-searchbar { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 11px; padding: 0 13px; border: 1px solid #c8d7e8; border-radius: 11px; background: #fff; transition: border-color .15s ease, box-shadow .15s ease; }
.pos-searchbar:focus-within { border-color: #4f86ef; box-shadow: 0 0 0 3px rgba(21,94,239,.1); }
.pos-searchbar > span { color: #2d5f9c; font-size: 1.8rem; line-height: 1; transform: rotate(-18deg); }
.pos-searchbar input { min-height: 49px; padding: 0; border: 0; box-shadow: none; font-size: .93rem; }
.pos-searchbar input:focus { box-shadow: none; }
.pos-searchbar kbd, .pos-pay-button kbd { padding: 3px 7px; border: 1px solid #d7e1ed; border-bottom-width: 2px; border-radius: 6px; background: #f7f9fc; color: #64748b; font: 700 .66rem/1.2 inherit; }
.pos-catalog-controls { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 13px 0 15px; }
.pos-filter-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.pos-filter-chips button { min-height: 34px; padding: 6px 13px; border: 1px solid #dce5f0; border-radius: 999px; background: #f5f7fa; color: #53657c; font-size: .72rem; font-weight: 750; }
.pos-filter-chips button:hover { color: var(--primary); border-color: #b9cef3; background: #f4f8ff; }
.pos-filter-chips button.active { color: #fff; border-color: var(--primary); background: linear-gradient(135deg,#3498DB,#3498DB); box-shadow: 0 6px 14px rgba(21,94,239,.2); }
.pos-warehouse-select { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .7rem; font-weight: 750; }
.pos-warehouse-select select { width: 185px; min-height: 36px; padding: 6px 9px; font-size: .76rem; }

.pos-product-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(205px,1fr)); gap: 13px; max-height: calc(100vh - 285px); overflow-y: auto; padding: 1px 4px 8px 1px; scrollbar-color: #bdd0e6 transparent; scrollbar-width: thin; }
.pos-product-card { position: relative; display: grid; grid-template-rows: 108px 1fr auto; min-height: 285px; overflow: hidden; border: 1px solid #dfe7f1; border-radius: 13px; background: #fff; box-shadow: 0 5px 16px rgba(18,48,89,.045); transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.pos-product-card[hidden] { display: none; }
.pos-product-card:hover { z-index: 1; transform: translateY(-2px); border-color: #b9cff0; box-shadow: 0 13px 25px rgba(18,48,89,.1); }
.pos-product-visual { position: relative; display: grid; place-items: center; background: linear-gradient(145deg,#f5f8fc,#edf3fa); border-bottom: 1px solid #e8edf4; }
.pos-product-visual::after { content: ""; position: absolute; width: 72px; height: 72px; border: 1px solid rgba(37,99,235,.11); border-radius: 50%; }
.pos-product-visual > span { z-index: 1; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: linear-gradient(145deg,#dceaff,#c7ddfc); color: #1e5cae; font-size: .95rem; font-weight: 900; letter-spacing: -.03em; box-shadow: 0 8px 18px rgba(40,91,155,.1); }
.pos-product-visual small { position: absolute; top: 8px; right: 8px; padding: 4px 7px; border-radius: 999px; background: #e8f5ee; color: #087451; font-size: .58rem; font-weight: 800; }
.pos-product-info { display: flex; flex-direction: column; padding: 12px 13px 10px; }
.pos-product-sku { color: #5c78a0; font-size: .61rem; font-weight: 800; text-transform: uppercase; letter-spacing: .045em; }
.pos-product-info h3 { display: -webkit-box; min-height: 34px; margin: 6px 0 5px; overflow: hidden; color: #17233a; font-size: .79rem; line-height: 1.3; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.pos-product-info > small { color: var(--muted); font-size: .62rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos-product-info > div { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; }
.pos-product-info > div strong { color: #102a4e; font-size: 1rem; }
.pos-product-info > div span { color: var(--muted); font-size: .62rem; }
.pos-product-card > button { min-height: 37px; margin: 0 10px 10px; border: 1px solid #95b9f6; border-radius: 8px; background: #f8fbff; color: #3498DB; font-size: .74rem; font-weight: 800; }
.pos-product-card > button:hover { color: #fff; border-color: #3498DB; background: #3498DB; }
.pos-catalog-empty { display: grid; justify-items: center; gap: 5px; min-height: 260px; place-content: center; color: var(--muted); }
.pos-catalog-empty strong { color: var(--ink); }
.pos-catalog-empty span { font-size: .78rem; }

.pos-cart-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 16px; border-bottom: 1px solid #e2e9f2; background: linear-gradient(180deg,#fff,#fbfcfe); }
.pos-cart-heading > div { display: flex; align-items: center; gap: 10px; }
.pos-cart-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: #e7f0ff; color: #3498DB; font-size: 1.1rem; }
.pos-cart-heading small, .pos-cart-heading strong { display: block; }
.pos-cart-heading small { color: var(--muted); font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; }
.pos-cart-heading strong { margin-top: 2px; font-size: .88rem; }
.pos-cart-heading > button { padding: 6px 8px; border: 0; background: transparent; color: #d13f4d; font-size: .7rem; font-weight: 750; }
.pos-customer-block { display: grid; gap: 7px; padding: 13px 16px; border-bottom: 1px solid #e7edf4; background: #f8fafe; }
.pos-customer-block label { display: grid; gap: 5px; }
.pos-customer-block label span { color: #49617f; font-size: .68rem; font-weight: 800; }
.pos-customer-block input, .pos-customer-block select { min-height: 38px; padding: 7px 9px; font-size: .76rem; }
.pos-customer-block .pos-customer-search { grid-column: 1 / -1; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px; }
.pos-customer-block .pos-customer-search input { width: 100%; min-width: 0; }
.pos-customer-block > select { grid-column: 1 / -1; width: 100%; min-width: 0; }
.pos-customer-search-feedback { grid-column: 1 / -1; display: block; min-height: 17px; color: #617792; font-size: .66rem; font-weight: 700; line-height: 1.35; }
.pos-customer-search-feedback.searching { color: #2563a8; }
.pos-customer-search-feedback.selected { padding: 7px 9px; border: 1px solid #b9ead6; border-radius: 7px; background: #eaf9f3; color: #08744e; }
.pos-customer-search-feedback.empty { color: #b42332; }
.pos-customer-suggestions { grid-column: 1 / -1; display: grid; max-height: 190px; overflow-y: auto; border: 1px solid #b9cde7; border-radius: 9px; background: #fff; box-shadow: 0 10px 22px rgba(39, 69, 105, .14); }
.pos-customer-suggestions[hidden] { display: none; }
.pos-customer-suggestions button { display: grid; gap: 2px; width: 100%; padding: 9px 11px; border: 0; border-bottom: 1px solid #e5edf6; background: #fff; color: #183657; text-align: left; cursor: pointer; }
.pos-customer-suggestions button:last-child { border-bottom: 0; }
.pos-customer-suggestions button:hover, .pos-customer-suggestions button:focus-visible { outline: 0; background: #eaf4ff; }
.pos-customer-suggestions button strong { font-size: .76rem; }
.pos-customer-suggestions button small { color: #657b96; font-size: .64rem; }
.pos-cart-lines { flex: 1; min-height: 0; overflow-y: auto; scrollbar-color: #c5d4e5 transparent; scrollbar-width: thin; }
.pos-cart-line { position: relative; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 9px 12px; padding: 13px 38px 13px 15px; border-bottom: 1px solid #e8edf4; }
.pos-cart-line:hover { background: #f9fbfe; }
.pos-cart-product { display: grid; grid-template-columns: 35px minmax(0,1fr); align-items: center; gap: 9px; }
.pos-cart-product > span { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 9px; background: #e8f1ff; color: #1e5cae; font-size: .65rem; font-weight: 900; }
.pos-cart-product strong, .pos-cart-product small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pos-cart-product strong { color: #16243b; font-size: .73rem; }
.pos-cart-product small { margin-top: 3px; color: var(--muted); font-size: .58rem; }
.pos-cart-price { text-align: right; }
.pos-cart-price span, .pos-cart-price small { display: block; }
.pos-cart-price span { color: var(--muted); font-size: .65rem; }
.pos-cart-price small { margin-top: 4px; color: #193b68; font-size: .78rem; font-weight: 850; }
.pos-quantity-control { display: grid; grid-template-columns: 30px 52px 30px; align-items: center; grid-column: 1 / -1; width: max-content; margin-left: 44px; border: 1px solid #ccd9e8; border-radius: 8px; overflow: hidden; }
.pos-quantity-control button { height: 29px; border: 0; background: #f2f6fb; color: #285b98; font-weight: 900; }
.pos-quantity-control input { height: 29px; padding: 3px; border: 0; border-right: 1px solid #d7e1ed; border-left: 1px solid #d7e1ed; border-radius: 0; text-align: center; font-size: .7rem; box-shadow: none; }
.pos-remove-line { position: absolute; right: 12px; top: 16px; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 7px; background: #fff0f1; color: #cf3f4d; font-size: 1rem; }
.pos-cart-empty { flex: 1; display: grid; justify-items: center; align-content: center; gap: 5px; min-height: 180px; padding: 30px; color: var(--muted); text-align: center; }
.pos-cart-empty[hidden] { display: none; }
.pos-cart-empty > span { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 4px; border: 1px dashed #aac1df; border-radius: 14px; background: #f3f7fc; color: #4b7bb6; font-size: 1.5rem; }
.pos-cart-empty strong { color: #294566; font-size: .82rem; }
.pos-cart-empty small { max-width: 210px; font-size: .68rem; line-height: 1.5; }
.pos-sale-notes { padding: 8px 16px; border-top: 1px solid #e7edf4; }
.pos-sale-notes summary { color: #5d718a; font-size: .68rem; font-weight: 750; cursor: pointer; }
.pos-sale-notes textarea { margin-top: 8px; font-size: .72rem; }
.pos-cart-summary { display: grid; gap: 7px; padding: 13px 16px; border-top: 1px solid #e1e8f1; background: #fbfcfe; }
.pos-cart-summary > div { display: flex; justify-content: space-between; gap: 14px; color: var(--muted); font-size: .74rem; }
.pos-cart-summary > div strong { color: #253a56; }
.pos-cart-summary .total { align-items: flex-end; margin-top: 4px; padding-top: 10px; border-top: 1px solid #dce5f0; color: #152944; font-weight: 850; }
.pos-cart-summary .total strong { color: #3498DB; font-size: 1.45rem; letter-spacing: -.04em; }
.pos-pay-button { width: auto; min-height: 48px; margin: 0 16px 16px; justify-content: space-between; padding-right: 12px; padding-left: 16px; }
.pos-pay-button kbd { border-color: rgba(255,255,255,.35); background: rgba(255,255,255,.13); color: #fff; }

.payment-dialog { width: min(980px, calc(100vw - 38px)); max-height: calc(100vh - 38px); padding: 0; overflow: auto; border: 0; border-radius: 17px; background: #fff; color: var(--ink); box-shadow: 0 35px 90px rgba(1,13,32,.38); }
.payment-dialog::backdrop { background: rgba(6,18,36,.64); backdrop-filter: blur(4px); }
.payment-dialog-header { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px 20px; border-bottom: 1px solid #dde6f1; background: rgba(255,255,255,.95); backdrop-filter: blur(14px); }
.payment-dialog-header > div { display: flex; align-items: center; gap: 11px; }
.payment-dialog-header > div > span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: #e8f1ff; color: #3498DB; font-size: 1.05rem; }
.payment-dialog-header strong, .payment-dialog-header small { display: block; }
.payment-dialog-header strong { font-size: 1.06rem; }
.payment-dialog-header small { margin-top: 2px; color: var(--muted); font-size: .72rem; }
.payment-dialog-header > button { border: 0; background: transparent; color: #718096; font-size: 1.7rem; line-height: 1; }
.payment-balance { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; margin: 18px 20px; overflow: hidden; border: 1px solid #dde6f1; border-radius: 11px; background: #dde6f1; }
.payment-balance > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; background: #f8fafd; }
.payment-balance span { color: var(--muted); font-size: .7rem; }
.payment-balance strong { color: #203650; font-size: .92rem; }
.payment-balance .paid strong { color: #119364; }
.payment-balance .pending strong { color: #d08700; }
.payment-method-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; padding: 0 20px; }
.payment-method-card { align-self: start; padding: 13px; border: 1px solid #d6e0eb; border-radius: 11px; background: #fff; }
.payment-method-card:focus-within { border-color: #88aff3; box-shadow: 0 0 0 3px rgba(21,94,239,.075); }
.payment-method-card > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.payment-method-card > header > span { color: #20344e; font-size: .84rem; font-weight: 850; }
.payment-method-card > header button { padding: 5px 8px; border: 1px solid #bdcce0; border-radius: 7px; background: #fff; color: #50657e; font-size: .66rem; font-weight: 750; }
.payment-method-card > header button:hover { color: var(--primary); border-color: #8eb3f3; background: #f7faff; }
.payment-method-card label { display: grid; gap: 5px; color: #53677e; font-size: .66rem; font-weight: 750; }
.payment-method-card > label input { text-align: right; font-size: .85rem; }
.payment-method-card > small { display: block; margin-top: 8px; color: var(--muted); font-size: .67rem; }
.payment-extra { display: grid; gap: 9px; margin-top: 11px; padding: 11px; border: 1px solid #dbe5ef; border-radius: 9px; background: #f7f9fc; }
.payment-extra[hidden] { display: none; }
.payment-extra > strong { color: #183657; font-size: .75rem; }
.payment-extra > div { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.payment-extra small { color: var(--muted); font-size: .62rem; line-height: 1.4; }
.payment-extra > .credit-rate-panel { display: grid; grid-template-columns: minmax(0,1fr); gap: 6px; padding: 9px 10px; border: 1px solid #c9d9ee; border-radius: 8px; background: #fff; }
.credit-rate-panel input { text-align: right; }
.credit-rate-panel small { display: block; color: #42648c; }
.credit-rate-panel .credit-rate-authorization { display: grid; gap: 5px; padding: 8px; border-radius: 6px; background: #fff4d6; color: #855600; font-weight: 750; }
.credit-rate-panel .credit-rate-authorization select { width: 100%; min-width: 0; background: #fff; }
.credit-rate-panel .credit-rate-authorization small { color: #855600; font-weight: 650; }
.credit-rate-panel .credit-rate-authorization[hidden] { display: none; }
.credit-client-warning { margin: 0; padding: 9px 10px; border: 1px solid #f2c078; border-radius: 8px; background: #fff7e8; color: #8a4b08; font-size: .68rem; font-weight: 750; line-height: 1.4; }
.credit-client-warning[hidden] { display: none; }
.payment-discount-row { display: flex; align-items: flex-end; gap: 14px; margin: 18px 20px; padding: 13px; border: 1px solid #dfe7f1; border-radius: 10px; background: #fafbfd; }
.payment-discount-row label { display: grid; gap: 6px; color: #425a76; font-size: .7rem; font-weight: 800; }
.payment-discount-row input { width: 220px; text-align: right; }
.payment-discount-row small { padding-bottom: 10px; color: var(--muted); font-size: .67rem; }
.payment-error { margin: -8px 20px 15px; padding: 9px 11px; border: 1px solid #f1bcc2; border-radius: 8px; background: #fff3f4; color: #b32e3d; font-size: .72rem; }
.payment-dialog > footer { position: sticky; bottom: 0; z-index: 3; display: flex; justify-content: flex-end; gap: 9px; padding: 14px 20px; border-top: 1px solid #dde6f1; background: rgba(255,255,255,.96); backdrop-filter: blur(14px); }

@media (max-width: 1180px) {
  .pos-terminal-layout { grid-template-columns: minmax(0,1fr) 350px; }
  .pos-product-grid { grid-template-columns: repeat(auto-fill,minmax(190px,1fr)); }
}
@media (max-width: 900px) {
  .pos-terminal-layout { grid-template-columns: 1fr; }
  .pos-cart-panel { position: static; min-height: 560px; max-height: none; }
  .pos-product-grid { max-height: 560px; }
  .payment-method-grid { grid-template-columns: 1fr; }
  .payment-method-card { align-self: stretch; }
}
@media (max-width: 640px) {
  .pos-terminal .topbar { height: 70px; padding: 0 14px; }
  .pos-terminal .topbar > div { display: none; }
  .pos-terminal .content { padding: 6px 6px 12px; }
  .pos-terminal-brand small { display: block; }
  .pos-page-heading { align-items: flex-start; flex-direction: column; }
  .pos-session-chip { width: 100%; }
  .pos-catalog { padding: 11px; }
  .pos-catalog-controls { align-items: stretch; flex-direction: column; }
  .pos-warehouse-select { justify-content: space-between; }
  .pos-warehouse-select select { flex: 1; }
  .pos-product-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .pos-product-card { grid-template-rows: 92px 1fr auto; min-height: 260px; }
  .payment-dialog { width: calc(100vw - 16px); max-height: calc(100vh - 16px); border-radius: 13px; }
  .payment-dialog-header small { display: none; }
  .payment-balance { grid-template-columns: 1fr; margin: 12px; }
  .payment-method-grid { padding: 0 12px; }
  .payment-discount-row { align-items: stretch; flex-direction: column; margin: 14px 12px; }
  .payment-discount-row input { width: 100%; }
}
@media (max-width: 420px) {
  .pos-product-grid { grid-template-columns: 1fr; }
  .pos-terminal-brand span:last-child { display: none; }
}

/* POS RESPONSIVE + INVENTORY EMPHASIS ------------------------------------- */
.pos-catalog,
.pos-cart-panel {
  height: calc(100dvh - 190px);
  min-height: 0;
  max-height: calc(100dvh - 190px);
}
.pos-catalog { display: flex; flex-direction: column; overflow: hidden; }
.pos-product-grid { flex: 1; min-height: 0; max-height: none; }
.pos-catalog-empty[hidden] { display: none !important; }

.pos-product-visual small.low { background: #fff4d6; color: #9a6300; }
.pos-product-visual small.critical { background: #ffe5e8; color: #b42335; }
.pos-stock-level {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 7px;
  border: 1px solid #bfe5d4;
  border-radius: 8px;
  background: #e8f7f0;
  color: #087451 !important;
  font-size: .62rem !important;
  font-weight: 750;
  line-height: 1;
  white-space: nowrap;
}
.pos-stock-level b { font-size: .78rem; }
.pos-stock-level.low { border-color: #f0d69a; background: #fff5db; color: #966000 !important; }
.pos-stock-level.critical { border-color: #f0bbc1; background: #ffe8ea; color: #b42335 !important; }
.pos-cart-product small { color: #11815c; font-weight: 800; }
.pos-cart-line.stock-low .pos-cart-product small { color: #9a6300; }
.pos-cart-line.stock-critical .pos-cart-product small { color: #c23645; }

@media (max-height: 680px) and (min-width: 901px) {
  .pos-terminal { grid-template-rows: 64px 1fr; }
  .pos-terminal .topbar { height: 64px; }
  .pos-terminal .content { padding: 6px 8px 10px; }
  .pos-page-heading { margin-bottom: 10px; }
  .pos-page-heading h1 { font-size: 1.55rem; }
  .pos-page-heading p, .pos-page-heading .eyebrow { display: none; }
  .pos-session-chip { padding: 7px 11px; }
  .pos-catalog, .pos-cart-panel { height: calc(100dvh - 132px); max-height: calc(100dvh - 132px); }
  .pos-searchbar input { min-height: 42px; }
  .pos-catalog-controls { margin: 9px 0 11px; }
  .pos-product-card { grid-template-rows: 92px 1fr auto; min-height: 258px; }
  .pos-cart-heading { padding-top: 10px; padding-bottom: 10px; }
  .pos-customer-block { padding-top: 9px; padding-bottom: 9px; }
  .pos-cart-summary { padding-top: 9px; padding-bottom: 9px; }
  .pos-pay-button { min-height: 43px; margin-bottom: 10px; }
}

@media (max-width: 900px) {
  .pos-catalog, .pos-cart-panel { height: auto; max-height: none; }
  .pos-cart-panel { min-height: 0; }
  .pos-product-grid { flex: none; max-height: 560px; }
}

@media (max-width: 640px) {
  .pos-stock-level { align-items: flex-start; flex-direction: column; gap: 2px; }
  .pos-product-info > div { align-items: flex-start; flex-direction: column; }
}

/* POS EXACT VIEWPORT FIT -------------------------------------------------- */
body.pos-terminal {
  width: 100%;
  max-width: 100vw;
  height: 100dvh;
  min-height: 0;
  grid-template-rows: 76px minmax(0, 1fr);
  overflow: hidden;
}
.pos-terminal .topbar,
.pos-terminal .content,
.pos-terminal-layout,
.pos-terminal-layout > * { min-width: 0; max-width: 100%; }
.pos-terminal .content {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 0;
  overflow: hidden;
}
.pos-page-heading,
.pos-notice { flex: 0 0 auto; }
.pos-terminal-layout {
  flex: 1 1 0;
  width: 100%;
  height: auto;
  min-height: 0;
  overflow: hidden;
}
.pos-catalog,
.pos-cart-panel {
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: 100%;
}
.pos-cart-panel { position: relative; top: auto; }
.pos-cart-lines { min-height: 0; overflow-x: hidden; overflow-y: auto; }
.pos-product-grid { min-width: 0; overflow-x: hidden; overflow-y: auto; }
.pos-product-card { min-width: 0; }
.pos-product-info > div { min-width: 0; flex-wrap: wrap; }
.pos-pay-button { min-width: 0; overflow: hidden; }
.button.full.pos-pay-button {
  width: auto;
  max-width: none;
  align-self: stretch;
  margin-right: 16px;
  margin-left: 16px;
}
.pos-pay-button > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pos-pay-button kbd { flex: 0 0 auto; }

@media (max-height: 680px) and (min-width: 901px) {
  body.pos-terminal { grid-template-rows: 64px minmax(0, 1fr); }
  .pos-catalog, .pos-cart-panel { height: 100%; max-height: 100%; }
}

@media (max-width: 900px) {
  body.pos-terminal {
    height: auto;
    min-height: 100dvh;
    grid-template-rows: 70px auto;
    overflow-x: hidden;
    overflow-y: auto;
  }
  .pos-terminal .content { display: block; overflow: visible; }
  .pos-terminal-layout { height: auto; overflow: visible; }
  .pos-catalog, .pos-cart-panel { height: auto; max-height: none; }
}

/* ACTION STATES ----------------------------------------------------------- */
.button:disabled,
.button:disabled:hover {
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.button.primary:disabled,
.button.primary:disabled:hover {
  border-color: #ccd7e5;
  background: #dce4ee;
  color: #718096;
  box-shadow: none;
}

/* CREDIT DATES ------------------------------------------------------------ */
.payment-extra > .credit-dates-panel {
  display: block;
  padding: 10px;
  border: 1px solid #a9c8f8;
  border-left: 4px solid #3498DB;
  border-radius: 9px;
  background: linear-gradient(135deg, #eef5ff, #f7faff);
}
.credit-dates-title {
  display: block;
  margin-bottom: 9px;
  color: #174f9b;
  font-size: .67rem;
  font-weight: 900;
  letter-spacing: .045em;
  text-transform: uppercase;
}
.credit-date-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.credit-date-field > span {
  color: #173b69;
  font-size: .67rem;
  font-weight: 850;
}
.credit-date-field input {
  min-height: 40px;
  border-color: #8eb4ed;
  background: #fff;
  color: #102f59;
  font-size: .75rem;
  font-weight: 800;
}
.credit-date-field input:focus {
  border-color: #3498DB;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

@media (max-width: 640px) {
  .credit-date-grid { grid-template-columns: 1fr; }
}

/* CAPTURED AMOUNTS -------------------------------------------------------- */
.payment-method-card > label input,
.payment-discount-row input {
  min-height: 50px;
  padding: 10px 13px;
  color: #10294d;
  font-size: 1.08rem;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
}

/* CREDIT PROJECTION ------------------------------------------------------- */
.button.full.pos-project-credit-button {
  width: auto;
  min-height: 43px;
  align-self: stretch;
  justify-content: space-between;
  margin: -7px 16px 16px;
  color: #31577f;
  border-color: #b9cbe0;
  background: #fff;
}
.pos-project-credit-button:hover { color: #3498DB; border-color: #8db1ee; background: #f5f9ff; }
.pos-project-credit-button > span { font-weight: 850; }
.pos-project-credit-button > small { color: #718399; font-size: .6rem; font-weight: 700; }
.pos-project-credit-button:disabled { color: #93a1b2; border-color: #d9e1eb; background: #f2f5f8; }

.projection-page-header { align-items: center; }
.projection-parameters { margin-bottom: 18px; }
.projection-form-grid { display: grid; grid-template-columns: 1.35fr .75fr .65fr .8fr .8fr .8fr; gap: 12px; align-items: end; }
.projection-form-grid label { display: grid; gap: 6px; color: #52657e; font-size: .69rem; font-weight: 800; }
.projection-form-grid input, .projection-form-grid select { min-height: 42px; font-size: .76rem; }
.projection-form-grid input[name="amount"] { text-align: right; font-size: .9rem; font-weight: 850; }
.projection-form-grid .projection-date-field { padding: 8px; border: 1px solid #c8d9f1; border-radius: 9px; background: #f3f7fd; color: #224d83; }
.projection-form-grid .projection-date-field input { min-height: 38px; }
.projection-form-summary { grid-column: 1 / -2; display: grid; gap: 3px; align-self: center; padding: 4px 2px; }
.projection-form-summary strong { color: #1b3555; font-size: .76rem; }
.projection-form-summary span { color: #50657f; font-size: .75rem; }
.projection-form-summary small { color: var(--muted); font-size: .67rem; }
.projection-form-grid > .button { min-height: 44px; }

.projection-sheet { padding: 22px; }
.projection-sheet-header { display: grid; grid-template-columns: minmax(0,1fr) 230px; gap: 24px; align-items: start; padding-bottom: 15px; border-bottom: 2px solid #3498DB; }
.projection-sheet-header h2 { margin: 4px 0 3px; color: #142743; font-size: 1.25rem; letter-spacing: -.025em; }
.projection-sheet-header p { margin: 0; color: var(--muted); font-size: .76rem; }
.projection-sheet-header dl { display: grid; grid-template-columns: 1fr auto; gap: 7px 15px; margin: 0; font-size: .72rem; }
.projection-sheet-header dt { color: var(--muted); font-weight: 650; }
.projection-sheet-header dd { margin: 0; color: #172a45; text-align: right; font-weight: 850; }
.projection-badges { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.projection-badges span { padding: 5px 9px; border: 1px solid #cfe0f7; border-radius: 999px; background: #eef5ff; color: #49627f; font-size: .65rem; }
.projection-badges strong { color: #173e70; }
.projection-kpis { display: grid; grid-template-columns: repeat(4,1fr); gap: 11px; margin: 16px 0 12px; }
.projection-kpis article { display: grid; gap: 5px; padding: 13px; border: 1px solid #dce5f0; border-radius: 11px; background: #fff; }
.projection-kpis span { color: var(--muted); font-size: .66rem; }
.projection-kpis strong { color: #173452; font-size: 1.02rem; font-variant-numeric: tabular-nums; }
.projection-kpis small { color: #7a899b; font-size: .61rem; }
.projection-kpis article.featured { border-color: #b9d0f5; background: linear-gradient(145deg,#edf4ff,#f8fbff); }
.projection-kpis article.featured strong { color: #3498DB; }
.projection-table { border: 1px solid #dfe6ef; border-radius: 9px; }
.projection-table tfoot th { padding: 11px 10px; border-top: 2px solid #ced9e7; background: #f5f8fc; color: #263e5b; font-size: .7rem; }
.projection-settled { color: #0b8b5f; font-weight: 850; }
.projection-signatures { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 34px 0 20px; }
.projection-signatures div { padding-top: 8px; border-top: 1px solid #52657a; color: #2f435a; text-align: center; font-size: .68rem; }
.projection-notes { padding: 14px; border: 1px solid #dce5ef; border-radius: 9px; background: #f8fafc; color: #465c75; font-size: .68rem; line-height: 1.5; }
.projection-notes > strong { display: block; margin-bottom: 5px; color: #1d3654; font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; }
.projection-notes p { margin: 5px 0 0; }
.projection-footer { margin-top: 14px; padding-top: 9px; border-top: 1px solid #e1e7ef; color: #7b8b9d; text-align: right; font-size: .62rem; }

@media (max-width: 1180px) {
  .projection-form-grid { grid-template-columns: repeat(3,1fr); }
  .projection-form-summary { grid-column: 1 / 3; }
}
@media (max-width: 760px) {
  .projection-form-grid { grid-template-columns: 1fr; }
  .projection-form-summary { grid-column: auto; }
  .projection-sheet-header { grid-template-columns: 1fr; }
  .projection-sheet-header dl { max-width: 330px; }
  .projection-kpis { grid-template-columns: repeat(2,1fr); }
}
@media print {
  @page { size: A4 portrait; margin: 9mm; }
  .projection-sheet { padding: 0; }
  .projection-sheet-header { grid-template-columns: 1fr 190px; gap: 12px; }
  .projection-kpis { gap: 6px; margin: 10px 0 8px; }
  .projection-kpis article { padding: 8px; }
  .projection-table th, .projection-table td { padding: 6px 5px; font-size: 9px; }
  .projection-signatures { margin: 26px 0 14px; }
  .projection-notes { page-break-inside: avoid; }
}

/* POS COMPACT WORKSPACE + VISIBLE CART ----------------------------------- */
@media (min-width: 901px) {
  .pos-terminal .content { padding: 8px 8px 14px; }
  .pos-page-heading { align-items: center; margin-bottom: 10px; }
  .pos-page-heading .eyebrow { display: none; }
  .pos-page-heading h1 { margin: 0 0 3px; font-size: 1.65rem; }
  .pos-page-heading p { font-size: .76rem; }
  .pos-session-chip { min-width: 220px; padding: 8px 11px; }
  .pos-terminal-layout { gap: 16px; }

  .pos-cart-heading { padding: 10px 14px; }
  .pos-cart-icon { width: 32px; height: 32px; }
  .pos-customer-block {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: end;
    gap: 8px;
    padding: 9px 14px 10px;
  }
  .pos-customer-block input,
  .pos-customer-block select { min-height: 40px; }

  .pos-cart-lines {
    flex: 1 1 auto;
    min-height: 165px;
    background: #fff;
    scroll-padding: 10px;
  }
  .pos-cart-line { gap: 6px 10px; padding: 10px 36px 10px 12px; }
  .pos-cart-product { grid-template-columns: 32px minmax(0, 1fr); gap: 8px; }
  .pos-cart-product > span { width: 32px; height: 32px; }
  .pos-cart-product small { margin-top: 2px; }
  .pos-cart-price small { margin-top: 2px; }
  .pos-quantity-control { margin-left: 40px; }
  .pos-remove-line { top: 10px; }

  .pos-sale-notes { padding: 7px 14px; }
  .pos-cart-summary { gap: 4px; padding: 9px 14px; }
  .pos-cart-summary .total { margin-top: 2px; padding-top: 7px; }
  .pos-cart-summary .total strong { font-size: 1.3rem; }
  .button.full.pos-pay-button {
    min-height: 44px;
    margin: 0 14px 9px;
  }
  .button.full.pos-project-credit-button {
    min-height: 39px;
    margin: 0 14px 12px;
  }
}

@media (min-width: 901px) and (max-width: 1180px) {
  .pos-customer-block { grid-template-columns: 1fr; }
  .pos-cart-lines { min-height: 185px; }
}

@media (max-width: 900px) {
  .pos-cart-lines { min-height: 240px; }
}

/* CREDIT PROJECTION MODAL ------------------------------------------------ */
.projection-dialog {
  width: min(1540px, calc(100vw - 28px));
  max-width: none;
  height: calc(100dvh - 28px);
  max-height: none;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 35px 100px rgba(5, 20, 43, .42);
}
.projection-dialog[open] { display: flex; flex-direction: column; }
.projection-dialog::backdrop { background: rgba(7, 20, 39, .7); backdrop-filter: blur(5px); }
.projection-dialog-header {
  z-index: 2;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 66px;
  padding: 10px 16px 10px 18px;
  border-bottom: 1px solid #dce5f0;
  background: linear-gradient(180deg, #fff, #f9fbfe);
}
.projection-dialog-header > div:first-child { display: flex; align-items: center; gap: 11px; }
.projection-dialog-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: #e7f0ff; color: #3498DB; font-size: 1.2rem; font-weight: 900; }
.projection-dialog-header strong,
.projection-dialog-header small { display: block; }
.projection-dialog-header strong { color: #152944; font-size: 1rem; }
.projection-dialog-header small { margin-top: 2px; color: var(--muted); font-size: .68rem; }
.projection-dialog-actions { display: flex; align-items: center; gap: 8px; }
.projection-dialog-close { width: 38px; height: 38px; padding: 0; border: 0; border-radius: 10px; background: #f2f5f9; color: #64748b; font-size: 1.55rem; line-height: 1; }
.projection-dialog-close:hover { background: #e7edf5; color: #173b69; }
.projection-dialog-body { position: relative; flex: 1 1 auto; min-height: 0; background: #eef3f9; }
.projection-dialog iframe { display: block; width: 100%; height: 100%; border: 0; background: #eef3f9; }
.projection-frame-loading { position: absolute; inset: 0; z-index: 1; display: grid; place-content: center; justify-items: center; gap: 12px; background: #f2f6fb; color: #31577f; font-size: .78rem; }
.projection-frame-loading[hidden] { display: none; }
.projection-frame-loading span { width: 32px; height: 32px; border: 3px solid #cbdcf5; border-top-color: #3498DB; border-radius: 50%; animation: projection-spin .75s linear infinite; }
@keyframes projection-spin { to { transform: rotate(360deg); } }

body.app-shell.projection-embedded { display: block; min-height: 100dvh; background: #eef3f9; }
.projection-embedded .sidebar,
.projection-embedded .topbar,
.projection-embedded .projection-page-header { display: none !important; }
.projection-embedded .content { min-height: 100dvh; padding: 14px; }
.projection-embedded .projection-parameters { margin-bottom: 12px; }
.projection-embedded .projection-sheet { box-shadow: 0 8px 24px rgba(18, 48, 89, .06); }

@media (max-width: 760px) {
  .projection-dialog { width: calc(100vw - 8px); height: calc(100dvh - 8px); border-radius: 13px; }
  .projection-dialog-header { min-height: 58px; padding: 8px 10px 8px 12px; }
  .projection-dialog-header small,
  .projection-dialog-actions .button { display: none; }
  .projection-embedded .content { padding: 8px; }
}

/* PAYMENT FIELD CONTAINMENT ---------------------------------------------- */
.payment-method-card,
.payment-extra,
.payment-extra > div,
.payment-extra label,
.credit-date-grid,
.credit-date-field { min-width: 0; }

.payment-extra > div,
.credit-date-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.payment-extra > .credit-dates-panel {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.payment-extra input,
.payment-extra select,
.credit-date-field input {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.credit-date-field input {
  padding-right: 7px;
  padding-left: 8px;
  font-size: .7rem;
}

@media (max-width: 640px) {
  .payment-extra > div,
  .credit-date-grid { grid-template-columns: 1fr; }
}

/* THERMAL SALES TICKET ---------------------------------------------------- */
@page pos80-ticket {
  size: auto;
  margin: 0;
}

.thermal-ticket-screen {
  display: flex;
  justify-content: center;
  padding: 22px;
  border: 1px solid #dce5ef;
  border-radius: 14px;
  background: #e9eef5;
}

.thermal-ticket-sheet {
  page: pos80-ticket;
  width: 72mm;
  max-width: 100%;
  padding: 2mm;
  box-sizing: border-box;
  background: #fff;
  color: #000;
  font-family: "Courier New", Consolas, monospace;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  overflow-wrap: anywhere;
  box-shadow: 0 12px 32px rgba(17, 35, 59, .16);
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.thermal-ticket-sheet *,
.thermal-ticket-sheet *::before,
.thermal-ticket-sheet *::after {
  max-width: 100%;
  box-sizing: border-box;
}

.thermal-ticket-sheet b { font-size: 12px; font-weight: 700; }
.thermal-ticket-center { text-align: center; }
.thermal-ticket-title { margin: 3px 0; text-align: center; font-size: 13px; font-weight: 700; }
.thermal-ticket-line { height: 1px; margin: 4px 0; border-bottom: 1px dashed #000; }
.thermal-ticket-row { display: block; margin: 0; padding: 0; }
.thermal-ticket-item { margin: 0 0 4px; }
.thermal-ticket-total { font-size: 14px; font-weight: 700; }
.thermal-ticket-actions { display: flex; justify-content: center; gap: 7px; margin-top: 10px; }
.thermal-ticket-actions .button { font-family: system-ui, sans-serif; }

@media (max-width: 480px) {
  .thermal-ticket-screen { padding: 10px; }
  .thermal-ticket-sheet { width: 100%; }
}

@media print {
  body.thermal-ticket-page {
    page: pos80-ticket;
    display: block !important;
    width: 80mm !important;
    min-width: 80mm !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
  }
  body.thermal-ticket-page .content {
    display: block !important;
    width: 80mm !important;
    max-width: 80mm !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .thermal-ticket-screen {
    display: block !important;
    width: 80mm !important;
    max-width: 80mm !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #fff !important;
  }
  .thermal-ticket-sheet {
    page: pos80-ticket;
    width: 80mm !important;
    max-width: 80mm !important;
    margin: 0 !important;
    padding: 2mm 4mm !important;
    overflow: visible !important;
    box-shadow: none !important;
  }
}

/* CASH OPERATIONS --------------------------------------------------------- */
.cash-session-card { margin-bottom: 16px; }
.cash-session-card > strong { font-size: 1.45rem; }

.cash-metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.cash-metric {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 15px;
  border: 1px solid #d9e4f2;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(18, 48, 89, .06);
}
.cash-metric span { color: #65758d; font-size: .68rem; font-weight: 800; }
.cash-metric strong { color: #183454; font-size: 1.12rem; font-variant-numeric: tabular-nums; letter-spacing: -.025em; }
.cash-metric.income { border-color: #bfe8d7; background: #f3fcf8; }
.cash-metric.income strong { color: #0b815b; }
.cash-metric.withdrawal { border-color: #f0c8cd; background: #fff7f8; }
.cash-metric.withdrawal strong { color: #bd3446; }
.cash-metric.featured { border-color: #3498DB; background: linear-gradient(145deg, #3498DB, #2176AD); }
.cash-metric.featured span { color: #d8e6ff; }
.cash-metric.featured strong { color: #fff; }

.cash-operation-grid { grid-template-columns: minmax(0, 1.45fr) minmax(300px, .55fr); margin-bottom: 18px; }
.cash-movement-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.cash-movement-form label,
.cash-close-panel label { display: grid; gap: 6px; color: #52657e; font-size: .72rem; font-weight: 800; }
.cash-movement-form .full-row { grid-column: 1 / -1; }
.cash-movement-form input[name="amount"],
.cash-close-panel input[name="closing_amount"] {
  min-height: 48px;
  color: #102f59;
  text-align: right;
  font-size: 1.05rem;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}
.cash-expected-amount { color: #3498DB; font-size: 1.18rem; font-variant-numeric: tabular-nums; }
.cash-close-panel { border-top: 3px solid #3498DB; }
.cash-open-panel { margin-bottom: 18px; }
.cash-movements-panel { margin-bottom: 18px; }
.cash-row-cancelled { opacity: .58; }
.cash-cancel { position: relative; }
.cash-cancel summary { color: #b63747; font-size: .68rem; font-weight: 850; cursor: pointer; }
.cash-cancel form {
  position: absolute;
  z-index: 4;
  right: 0;
  top: calc(100% + 6px);
  display: grid;
  width: 240px;
  gap: 7px;
  padding: 10px;
  border: 1px solid #e7c5ca;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(28, 43, 65, .17);
}
.cash-cancel input { min-width: 0; }
.cash-admin-grid { grid-template-columns: minmax(300px, .7fr) minmax(0, 1.3fr); }

@media (max-width: 1180px) {
  .cash-metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cash-operation-grid,
  .cash-admin-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .cash-session-card { grid-template-columns: auto 1fr; }
  .cash-session-card > strong { grid-column: 2; }
  .cash-metric-grid { grid-template-columns: 1fr 1fr; }
  .cash-movement-form { grid-template-columns: 1fr; }
  .cash-movement-form .full-row { grid-column: auto; }
}

@media (max-width: 430px) {
  .cash-metric-grid { grid-template-columns: 1fr; }
}

/* PERSON REGISTRATION ----------------------------------------------------- */
.registration-header { align-items: center; }
.registration-form {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.registration-progress {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #d9e4f2;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(18, 48, 89, .07);
}
.registration-progress > div:not(.registration-required-note) {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 2px 10px;
  padding: 11px;
  border-radius: 11px;
  color: #52657e;
}
.registration-progress > div.active { background: #edf4ff; color: #174f9b; }
.registration-progress span {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #e4edf9;
  color: #315d91;
  font-size: .68rem;
  font-weight: 900;
}
.registration-progress .active span { background: #3498DB; color: #fff; }
.registration-progress strong { font-size: .77rem; }
.registration-progress small { color: #718198; font-size: .64rem; }
.registration-required-note { padding: 10px 11px 2px; color: #718198; font-size: .68rem; }
.registration-required-note b,
.registration-actions > span b,
.registration-grid label > b,
.registration-fieldset legend b { color: #d83b4d; }

.registration-content { display: grid; min-width: 0; gap: 18px; }
.registration-section { padding: 0; overflow: visible; }
.registration-section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 17px 20px;
  border-bottom: 1px solid #e1e8f2;
  background: linear-gradient(180deg, #fff, #f9fbfe);
  border-radius: 16px 16px 0 0;
}
.registration-section-heading > span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: #e8f0ff;
  color: #3498DB;
  font-size: .72rem;
  font-weight: 900;
}
.registration-section-heading h2 { margin: 0 0 2px; color: #17304e; font-size: .98rem; }
.registration-section-heading p { margin: 0; color: #718198; font-size: .68rem; }

.registration-grid {
  display: grid;
  gap: 17px 15px;
  padding: 20px;
}
.registration-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.registration-grid label:not(.registration-segmented label) {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
  color: #425873;
  font-size: .7rem;
  font-weight: 800;
}
.registration-grid label > small { color: #8492a5; font-size: .61rem; font-weight: 650; }
.registration-grid input,
.registration-grid select,
.registration-grid textarea { min-width: 0; border-color: #cbd9ea; }
.registration-grid input,
.registration-grid select { min-height: 44px; }
.registration-grid input:focus,
.registration-grid select:focus,
.registration-grid textarea:focus { border-color: #4f87e8; box-shadow: 0 0 0 3px rgba(21, 94, 239, .1); }
.registration-grid .span-two { grid-column: span 2; }
.registration-grid .span-three { grid-column: 1 / -1; }
.registration-code { text-transform: uppercase; letter-spacing: .045em; font-weight: 780; }
.registration-code.generated {
  border-color: #48a984;
  background: #f1fbf7;
  color: #0c7252;
  box-shadow: 0 0 0 3px rgba(15, 151, 105, .08);
}
.registration-identity-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: -3px;
  padding: 11px 12px;
  border: 1px solid #cfe0f7;
  border-radius: 10px;
  background: #f5f9ff;
}
.registration-identity-actions strong,
.registration-identity-actions small { display: block; }
.registration-identity-actions strong { color: #1d477b; font-size: .72rem; }
.registration-identity-actions small { margin-top: 2px; color: #637a96; font-size: .64rem; }

.registration-fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.registration-fieldset legend { margin-bottom: 8px; color: #425873; font-size: .7rem; font-weight: 800; }
.registration-segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}
.registration-segmented label { position: relative; min-width: 0; cursor: pointer; }
.registration-segmented input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.registration-segmented span {
  display: grid;
  place-items: center;
  min-height: 44px;
  padding: 8px;
  border: 1px solid #cbd9ea;
  border-radius: 9px;
  background: #fff;
  color: #51657e;
  font-size: .72rem;
  font-weight: 800;
}
.registration-segmented input:checked + span { border-color: #3475e3; background: #edf4ff; color: #3498DB; box-shadow: 0 0 0 2px rgba(21, 94, 239, .08); }
.registration-segmented input:focus-visible + span { outline: 3px solid rgba(21, 94, 239, .18); }

.registration-location-field { position: relative; }
.registration-location-results {
  position: absolute;
  z-index: 12;
  top: calc(100% - 17px);
  right: 0;
  left: 0;
  max-height: 270px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid #bed0e8;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(18, 48, 89, .18);
}
.registration-location-results[hidden] { display: none; }
.registration-location-results button {
  display: grid;
  width: 100%;
  gap: 2px;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
}
.registration-location-results button:hover,
.registration-location-results button:focus { background: #edf4ff; outline: none; }
.registration-location-results strong { color: #193a61; font-size: .72rem; }
.registration-location-results small { color: #6d7f96; font-size: .63rem; }

.registration-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 16px 18px;
  border: 1px solid #d9e4f2;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(18, 48, 89, .06);
}
.registration-actions > span { color: #718198; font-size: .7rem; }
.registration-actions > div { display: flex; gap: 8px; }

@media (max-width: 1180px) {
  .registration-form { grid-template-columns: 1fr; }
  .registration-progress { position: static; grid-template-columns: 1fr 1fr; }
  .registration-required-note { display: none; }
}

@media (max-width: 900px) {
  .registration-grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .registration-header .actions { width: 100%; }
  .registration-header .actions > * { flex: 1; }
  .registration-progress { grid-template-columns: 1fr; }
  .registration-grid.three { grid-template-columns: 1fr; }
  .registration-grid .span-two,
  .registration-grid .span-three { grid-column: auto; }
  .registration-identity-actions { align-items: stretch; flex-direction: column; }
  .registration-actions { align-items: stretch; flex-direction: column; }
  .registration-actions > div { display: grid; grid-template-columns: 1fr 1fr; }
}

/* PERSON REGISTRATION — REFINED WORKSPACE -------------------------------- */
.registration-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  min-height: 154px;
  margin-bottom: 8px;
  padding: 26px 30px;
  overflow: hidden;
  border: 1px solid rgba(96, 165, 250, .18);
  border-radius: 19px;
  color: #fff;
  background:
    radial-gradient(circle at 84% 8%, rgba(255, 255, 255, .2), transparent 18rem),
    linear-gradient(128deg, #3498DB 0%, #2588C7 58%, #2176AD 100%);
  box-shadow: 0 12px 30px rgba(52, 152, 219, .2);
}
.registration-hero::before,
.registration-hero::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(191, 219, 254, .12);
  border-radius: 50%;
  pointer-events: none;
}
.registration-hero::before { width: 260px; height: 260px; right: -105px; top: -170px; }
.registration-hero::after { width: 170px; height: 170px; right: 130px; bottom: -145px; }
.registration-hero-main,
.registration-hero-side { position: relative; z-index: 1; }
.registration-hero-main { display: flex; align-items: center; gap: 18px; min-width: 0; }
.registration-hero-mark {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 17px;
  color: #fff;
  background: linear-gradient(145deg, rgba(96, 165, 250, .92), rgba(37, 99, 235, .92));
  box-shadow: 0 14px 28px rgba(4, 22, 49, .24), inset 0 1px 0 rgba(255, 255, 255, .28);
  font-size: .92rem;
  font-weight: 900;
  letter-spacing: -.025em;
}
.registration-hero-kicker {
  display: block;
  margin-bottom: 6px;
  color: #9dc8ff;
  font-size: .66rem;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.registration-hero h1 {
  margin: 0 0 7px;
  color: #fff;
  font-size: clamp(1.9rem, 3vw, 2.55rem);
  line-height: 1;
  letter-spacing: -.045em;
}
.registration-hero p { max-width: 660px; margin: 0; color: #c2d5ea; font-size: .88rem; line-height: 1.5; }
.registration-hero-side { display: grid; justify-items: end; gap: 16px; flex: 0 0 auto; }
.registration-hero-meta { display: flex; align-items: center; gap: 18px; color: #bed2e8; font-size: .65rem; }
.registration-hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.registration-hero-meta strong { color: #fff; font-size: .72rem; }
.registration-hero .actions { gap: 9px; }
.registration-hero .button { min-height: 40px; border-radius: 9px; }
.registration-hero .button.ghost {
  color: #eaf3ff;
  border-color: rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .08);
  box-shadow: none;
}
.registration-hero .button.ghost:hover { color: #fff; border-color: rgba(255, 255, 255, .38); background: rgba(255, 255, 255, .14); }
.registration-hero .button.primary { color: #164b9b; background: #fff; box-shadow: 0 10px 24px rgba(4, 22, 49, .2); }
.registration-hero .button.primary:hover { color: #2176AD; background: #f3f7ff; box-shadow: 0 12px 28px rgba(4, 22, 49, .25); }

.registration-form { grid-template-columns: 250px minmax(0, 1fr); gap: 22px; }
.registration-progress {
  top: 98px;
  gap: 6px;
  padding: 16px;
  border-color: #dce6f3;
  border-radius: 17px;
  box-shadow: 0 14px 36px rgba(18, 48, 89, .075);
}
.registration-progress > div.registration-progress-heading {
  display: block;
  padding: 0 4px 14px;
  border-bottom: 1px solid #e5ecf5;
  border-radius: 0;
  color: inherit;
}
.registration-progress-heading small,
.registration-progress-heading strong { display: block; }
.registration-progress-heading small { margin-bottom: 3px; color: #7b8aa0; font-size: .62rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.registration-progress-heading strong { color: #1d3350; font-size: .82rem; }
.registration-progress > a {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 2px 11px;
  padding: 12px 11px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #52657e;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}
.registration-progress > a:hover { color: #174f9b; border-color: #d5e3f5; background: #f6f9fe; transform: translateX(2px); }
.registration-progress > a.active { color: #174f9b; border-color: #d8e6fb; background: linear-gradient(135deg, #edf4ff, #f6f9ff); }
.registration-progress > a span {
  grid-row: 1 / 3;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: #e9eff8;
  color: #416488;
  box-shadow: inset 0 0 0 1px rgba(65, 100, 136, .04);
}
.registration-progress > a.active span { color: #fff; background: linear-gradient(145deg, #3478f6, #3498DB); box-shadow: 0 8px 16px rgba(21, 94, 239, .22); }
.registration-progress > a strong { align-self: end; font-size: .75rem; }
.registration-progress > a small { color: #7d8da3; font-size: .62rem; }
.registration-required-note { margin-top: 5px; padding: 11px 6px 2px; border-top: 1px dashed #dce6f2; color: #7b8aa0; line-height: 1.5; }

.registration-content { gap: 22px; }
.registration-section {
  scroll-margin-top: 146px;
  border-color: #dae5f2;
  border-radius: 17px;
  box-shadow: 0 12px 34px rgba(18, 48, 89, .07);
}
.registration-section-heading {
  gap: 13px;
  padding: 19px 22px;
  border-bottom-color: #e2eaf4;
  border-radius: 17px 17px 0 0;
  background: linear-gradient(180deg, #fff, #f8fafd);
}
.registration-section-heading > span {
  width: 40px;
  height: 40px;
  border: 1px solid #d9e5f7;
  border-radius: 11px;
  background: #edf3ff;
  box-shadow: inset 0 1px 0 #fff;
}
.registration-section-heading h2 { margin-bottom: 3px; color: #172d49; font-size: 1rem; }
.registration-section-heading p { color: #78899f; font-size: .67rem; }
.registration-section-tag {
  margin-left: auto;
  padding: 6px 9px;
  border: 1px solid #d8e5f8;
  border-radius: 999px;
  color: #3565a2;
  background: #f1f6ff;
  font-size: .59rem;
  font-weight: 800;
  letter-spacing: .035em;
  text-transform: uppercase;
  white-space: nowrap;
}
.registration-section-tag.optional { color: #5f6f84; border-color: #e0e6ee; background: #f7f9fb; }

.registration-grid { gap: 18px 16px; padding: 23px 24px 25px; }
.registration-grid label:not(.registration-segmented label) { gap: 7px; color: #354d6b; font-size: .69rem; }
.registration-field-label { display: inline-flex; align-items: center; gap: 3px; }
.registration-field-label b { color: #d83b4d; }
.registration-grid label > small { color: #8997a9; }
.registration-grid input,
.registration-grid select,
.registration-grid textarea { border-color: #cbd9ea; background: #fbfcfe; }
.registration-grid input,
.registration-grid select { min-height: 46px; }
.registration-grid textarea { min-height: 96px; resize: vertical; }
.registration-grid input:hover,
.registration-grid select:hover,
.registration-grid textarea:hover { border-color: #acc2df; background: #fff; }
.registration-grid input:focus,
.registration-grid select:focus,
.registration-grid textarea:focus { border-color: #4f87e8; background: #fff; box-shadow: 0 0 0 3px rgba(21, 94, 239, .1); }

.registration-group-title {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin-top: 3px;
  padding-top: 18px;
  border-top: 1px solid #e8edf4;
}
.registration-group-title.first { margin-top: 0; padding-top: 0; border-top: 0; }
.registration-group-title strong { color: #21446f; font-size: .68rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.registration-group-title small { color: #8997aa; font-size: .62rem; }
.registration-subgrid { display: grid; gap: 16px; min-width: 0; }
.registration-subgrid-four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.registration-address-grid { grid-template-columns: minmax(0, 1fr) 130px 130px; }

.registration-identity-actions {
  position: relative;
  overflow: hidden;
  margin-top: -2px;
  padding: 12px 14px 12px 17px;
  border-color: #cbdcf3;
  border-radius: 11px;
  background: linear-gradient(90deg, #f2f7ff, #f8fbff);
}
.registration-identity-actions::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: #2598EC; }
.registration-identity-actions strong { color: #1d477b; }
.registration-segmented span { min-height: 46px; border-color: #cbd9ea; background: #fbfcfe; }
.registration-segmented input:checked + span { border-color: #4a80df; background: #eef4ff; box-shadow: 0 0 0 2px rgba(21, 94, 239, .07); }
.registration-location-results { top: calc(100% - 18px); border-color: #b9cce6; border-radius: 12px; box-shadow: 0 20px 46px rgba(18, 48, 89, .18); }

.registration-actions {
  position: sticky;
  z-index: 8;
  bottom: 16px;
  padding: 15px 17px;
  border-color: #d6e2f0;
  border-radius: 15px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 16px 38px rgba(18, 48, 89, .13);
  backdrop-filter: blur(14px) saturate(150%);
}
.registration-actions-copy strong,
.registration-actions-copy small { display: block; }
.registration-actions-copy strong { margin-bottom: 3px; color: #243a57; font-size: .76rem; }
.registration-actions-copy small { color: #7b899c; font-size: .64rem; }
.registration-actions-copy b { color: #d83b4d; }
.registration-actions > div:last-child { display: flex; gap: 8px; }

@media (max-width: 1400px) {
  .registration-subgrid-four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1180px) {
  .registration-form { grid-template-columns: 1fr; }
  .registration-progress { position: static; grid-template-columns: 1fr 1fr; }
  .registration-progress > div.registration-progress-heading { grid-column: 1 / -1; }
  .registration-required-note { display: none; }
}

@media (max-width: 900px) {
  .registration-hero { align-items: flex-start; }
  .registration-hero-main { align-items: flex-start; }
  .registration-hero-side { align-self: stretch; }
  .registration-grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .registration-grid .span-three { grid-column: 1 / -1; }
  .registration-address-grid { grid-template-columns: minmax(0, 1fr) 120px 120px; }
}

@media (max-width: 760px) {
  .registration-hero { flex-direction: column; gap: 22px; padding: 24px; }
  .registration-hero-side { width: 100%; align-items: center; grid-template-columns: 1fr auto; }
  .registration-hero-meta { justify-self: start; }
}

@media (max-width: 640px) {
  .registration-hero { padding: 21px 18px; border-radius: 16px; }
  .registration-hero-main { gap: 13px; }
  .registration-hero-mark { width: 48px; height: 48px; border-radius: 14px; }
  .registration-hero h1 { font-size: 1.75rem; }
  .registration-hero-side { display: grid; grid-template-columns: 1fr; justify-items: stretch; }
  .registration-hero-meta { justify-self: stretch; justify-content: space-between; }
  .registration-hero .actions { display: grid; grid-template-columns: 1fr 1fr; }
  .registration-progress { grid-template-columns: 1fr; }
  .registration-progress > div.registration-progress-heading { grid-column: auto; }
  .registration-section-heading { padding: 17px; }
  .registration-section-tag { display: none; }
  .registration-grid { padding: 19px 17px 21px; }
  .registration-grid.three,
  .registration-subgrid-four,
  .registration-address-grid { grid-template-columns: 1fr; }
  .registration-grid .span-two,
  .registration-grid .span-three { grid-column: auto; }
  .registration-group-title { align-items: flex-start; flex-direction: column; gap: 3px; }
  .registration-identity-actions { align-items: stretch; flex-direction: column; }
  .registration-actions { position: static; align-items: stretch; flex-direction: column; }
  .registration-actions > div:last-child { display: grid; grid-template-columns: 1fr 1fr; }
}
.cash-movement-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cash-movement-module-grid {
    margin-bottom: 18px;
}

.cash-movement-context {
    border-top: 3px solid #3498DB;
}

.cash-movement-context dl {
    display: grid;
    gap: 0;
    margin: 0 0 18px;
}

.cash-movement-context dl > div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #e6edf6;
}

.cash-movement-context dt {
    color: #6c7c92;
    font-size: .68rem;
    font-weight: 750;
}

.cash-movement-context dd {
    margin: 0;
    color: #203957;
    text-align: right;
    font-size: .76rem;
    font-weight: 800;
}

.cash-module-empty {
    margin-bottom: 18px;
}

.cash-module-empty a {
    color: inherit;
    font-weight: 850;
    text-decoration: underline;
}

.cash-close-standalone {
    max-width: 620px;
    margin: 0 0 18px auto;
}

@media (max-width: 900px) {
    .cash-movement-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cash-close-standalone {
        max-width: none;
    }
}

/* CASH CUT FINANCIAL INSTRUMENTS ---------------------------------------- */
.cut-financial-section,
.cut-detail-section {
    margin-top: 18px;
    border: 1px solid #dce5f0;
    border-radius: 13px;
    background: #fff;
}

.cut-financial-section {
    overflow: hidden;
    border-top: 3px solid #3498DB;
}

.cut-financial-heading,
.cut-detail-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 18px;
    border-bottom: 1px solid #e1e8f1;
    background: #f8fafd;
}

.cut-financial-heading small,
.cut-detail-heading small {
    color: #3498DB;
    font-size: .58rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.cut-financial-heading h2,
.cut-detail-heading h2 {
    margin: 3px 0 0;
    color: #173657;
    font-size: .95rem;
}

.cut-financial-heading p {
    margin: 5px 0 0;
    color: #718198;
    font-size: .65rem;
}

.cut-financial-heading > span,
.cut-detail-heading > span {
    flex: 0 0 auto;
    padding: 5px 9px;
    border-radius: 999px;
    background: #e8f1ff;
    color: #3498DB;
    font-size: .58rem;
    font-weight: 850;
}

.cut-instrument-cards {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
    padding: 14px 16px;
}

.cut-instrument-cards article {
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 11px 10px;
    border: 1px solid #dce5f0;
    border-radius: 10px;
    background: #f8fafd;
}

.cut-instrument-cards article.cash { background: #eef9f4; border-color: #caebdd; }
.cut-instrument-cards article.transfer { background: #edf5ff; border-color: #cfe0f8; }
.cut-instrument-cards article.credit { background: #fff8e8; border-color: #f0dfb5; }
.cut-instrument-cards article.debit_card { background: #f3f0ff; border-color: #ddd5fb; }
.cut-instrument-cards article.wallet { background: #f0f6ff; border-color: #bfdbfe; }
.cut-instrument-cards article.alert { background: #fff3f4; border-color: #efc5cb; }

.cut-instrument-cards small {
    overflow: hidden;
    color: #667991;
    font-size: .55rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cut-instrument-cards strong {
    color: #183958;
    font-size: .84rem;
    font-variant-numeric: tabular-nums;
}

.cut-instrument-cards span {
    color: #8794a5;
    font-size: .5rem;
}

.cut-financial-alert {
    margin: 0 16px 12px;
    padding: 9px 11px;
    border: 1px solid #efc5cb;
    border-radius: 8px;
    background: #fff4f5;
    color: #a93647;
    font-size: .64rem;
}

.cut-table-wrap {
    overflow-x: auto;
    padding: 0 16px 14px;
}

.cut-financial-matrix,
.cut-detail-table {
    width: 100%;
    min-width: 860px;
    border-collapse: separate;
    border-spacing: 0;
    color: #294663;
    font-size: .61rem;
}

.cut-financial-matrix th,
.cut-financial-matrix td,
.cut-detail-table th,
.cut-detail-table td {
    padding: 8px 9px;
    border-right: 1px solid #e3eaf2;
    border-bottom: 1px solid #e3eaf2;
    text-align: right;
    vertical-align: top;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.cut-financial-matrix tr > :first-child,
.cut-detail-table tr > :first-child {
    border-left: 1px solid #e3eaf2;
    text-align: left;
}

.cut-financial-matrix thead th,
.cut-detail-table thead th {
    border-top: 1px solid #e3eaf2;
    background: #edf2f8;
    color: #50657e;
    font-size: .54rem;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.cut-financial-matrix thead tr:first-child th:first-child,
.cut-detail-table thead tr:first-child th:first-child { border-top-left-radius: 8px; }
.cut-financial-matrix thead tr:first-child th:last-child,
.cut-detail-table thead tr:first-child th:last-child { border-top-right-radius: 8px; }

.cut-financial-matrix tbody th {
    color: #405a75;
    font-weight: 750;
}

.cut-financial-matrix .matrix-total th,
.cut-financial-matrix .matrix-total td,
.cut-detail-table tfoot th,
.cut-detail-table tfoot td {
    background: #eaf2ff;
    color: #184f9c;
    font-weight: 900;
}

.cut-financial-matrix .unclassified,
.cut-detail-table .unclassified {
    background: #fff0f2;
    color: #b72f42;
    font-weight: 900;
}

.cut-financial-rule,
.cut-detail-intro {
    margin: 0;
    padding: 0 17px 15px;
    color: #687a90;
    font-size: .61rem;
    line-height: 1.45;
}

.cut-financial-rule strong { color: #1d5aa8; }

.cut-detail-section {
    overflow: hidden;
}

.cut-detail-heading {
    padding-block: 13px;
}

.cut-detail-intro {
    padding-top: 11px;
}

.cut-detail-table td small {
    display: block;
    margin-top: 3px;
    color: #8290a2;
    font-size: .52rem;
}

.cut-detail-table td:nth-child(2),
.cut-detail-table td:nth-child(3) {
    text-align: left;
}

.cut-detail-table .instrument-cash { background: #f1faf6; }
.cut-detail-table .instrument-transfer { background: #f2f7ff; }
.cut-detail-table .instrument-credit { background: #fff9ec; }

.daily-cut-credit-payments tfoot th {
    text-align: right;
}

.daily-cut-credit-payments tbody td:nth-child(n + 6),
.daily-cut-credit-payments tfoot td {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.cut-sale-support td {
    padding: 8px 13px 10px;
    background: #fafbfd;
    text-align: left !important;
    white-space: normal;
}

.cut-sale-support td > div {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 9px;
    margin: 3px 0;
}

.cut-sale-support td strong {
    color: #3498DB;
    font-size: .54rem;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.cut-sale-support td span {
    color: #63758b;
    font-size: .56rem;
}

.unclassified-text { color: #b72f42 !important; font-weight: 800; }

.cut-instrument-badge {
    display: inline-flex;
    padding: 4px 7px;
    border-radius: 999px;
    background: #edf1f6;
    color: #536980;
    font-size: .52rem;
    font-weight: 850;
}

.cut-instrument-badge.cash { background: #e3f6ed; color: #087451; }
.cut-instrument-badge.transfer { background: #e8f1ff; color: #3498DB; }
.cut-instrument-badge.credit { background: #fff1cd; color: #916000; }
.cut-instrument-badge.debit_card { background: #eee9ff; color: #6241b5; }
.cut-instrument-badge.wallet { background: #eaf2ff; color: #2176AD; }
.cut-instrument-badge.unclassified { background: #fde9ec; color: #b72f42; }

.cut-empty {
    padding: 18px !important;
    color: #8491a1;
    text-align: center !important;
}

@media (max-width: 1180px) {
    .cut-instrument-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
    .cut-instrument-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cut-financial-heading,
    .cut-detail-heading { align-items: flex-start; }
}

@media print {
    @page cash-cut { size: A4 landscape; margin: 7mm; }
    .cut-financial-section,
    .cut-detail-section { break-inside: auto; }
    .cut-financial-heading,
    .cut-detail-heading,
    .cut-instrument-cards article,
    .cut-financial-matrix tr,
    .cut-detail-table tr { break-inside: avoid; }
    .cut-print-page-break { break-before: page; }
    .cut-table-wrap { overflow: visible; padding-inline: 0; }
    .cut-financial-matrix,
    .cut-detail-table { min-width: 0; font-size: 5.8pt; }
    .cut-financial-matrix th,
    .cut-financial-matrix td,
    .cut-detail-table th,
    .cut-detail-table td { padding: 4px 5px; }
}

@media (max-width: 560px) {
    .cash-movement-summary-grid {
        grid-template-columns: 1fr;
    }
}

/* PHYSICAL PEOPLE REPORT ------------------------------------------------- */
.people-report-filter-panel {
    margin-bottom: 16px;
}

.people-report-filters {
    display: grid;
    grid-template-columns: repeat(5, minmax(150px, 1fr)) auto;
    align-items: end;
    margin: 0;
    padding: 0;
    border: 0;
}

.people-report-filters select {
    min-width: 0;
}

.people-report-filter-actions {
    display: flex;
    gap: 8px;
}

.people-report-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
    padding: 17px 20px;
    border: 1px solid #cbdcf0;
    border-radius: 14px;
    background: linear-gradient(135deg, #0d3760, #3498DB);
    color: #fff;
    box-shadow: 0 12px 28px rgba(20, 72, 145, .16);
}

.people-report-summary article {
    display: flex;
    align-items: baseline;
    gap: 14px;
}

.people-report-summary article span,
.people-report-summary div span {
    color: #d6e7ff;
    font-size: .72rem;
    font-weight: 750;
}

.people-report-summary strong {
    font-size: 1.8rem;
    letter-spacing: -.04em;
}

.people-report-summary > div {
    display: grid;
    gap: 3px;
    text-align: right;
}

.people-report-summary small {
    color: #9ec5ff;
    font-size: .64rem;
}

.people-report-summary .people-report-map-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.people-report-map-button {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    gap: 7px;
    border-color: rgba(255,255,255,.5);
    background: #fff;
    color: #15517e;
}
.people-report-map-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.people-report-missing-address {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    gap: 6px;
    padding: 7px 11px;
    border: 1px solid #ffb5bb;
    border-radius: 9px;
    background: #fff0f1;
    color: #aa2532 !important;
    white-space: nowrap;
}
.people-report-missing-address strong { color: #d22636; font-size: 1rem; letter-spacing: -.02em; }

.people-map-dialog {
    width: min(1100px, calc(100vw - 24px));
    max-width: none;
    max-height: calc(100dvh - 16px);
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 35px 100px rgba(3,18,38,.48);
}
.people-map-dialog[open] { display: flex; flex-direction: column; }
.people-map-dialog::backdrop { background: rgba(4,18,37,.72); backdrop-filter: blur(5px); }
.people-map-dialog > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 17px;
    background: linear-gradient(120deg,#113b64,#268ec8);
    color: #fff;
    flex: 0 0 auto;
}
.people-map-dialog > header small { color: #c9e8fa; font-size: .62rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.people-map-dialog > header h2 { margin: 2px 0 0; color: #fff; font-size: 1.08rem; }
.people-map-dialog > header button {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.15);
    color: #fff;
    cursor: pointer;
    font-size: 1.35rem;
}
.people-map-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(120px, 170px)) 1fr;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid #dfe8f0;
    background: #f8fafc;
    flex: 0 0 auto;
}
.people-map-metrics article { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 7px 10px; border: 1px solid #dce7ef; border-radius: 9px; background: #fff; }
.people-map-metrics article span { color: #63788d; font-size: .61rem; font-weight: 700; }
.people-map-metrics article strong { color: #173d60; font-size: 1rem; }
.people-map-metrics article.located strong { color: #0b8067; }
.people-map-metrics article.missing { border-color: #ffc6ca; background: #fff4f5; }
.people-map-metrics article.missing strong { color: #cf2635; }
.people-map-metrics > div { display: flex; align-items: center; justify-content: flex-end; gap: 10px; color: #61768a; font-size: .61rem; }
.people-map-legend > span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.people-map-legend i { display: inline-grid; width: 20px; height: 20px; place-items: center; border-radius: 50%; font-style: normal; font-size: .57rem; font-weight: 850; }
.people-map-legend .single { border: 2px solid rgba(197,31,49,.75); background: rgba(239,48,67,.38); }
.people-map-legend .cluster { border: 2px solid #fff; background: #d5263b; color: #fff; box-shadow: 0 0 0 3px rgba(213,38,59,.2); }
.people-map-legend .spread { position: relative; border: 1px dashed #9e5260; background: #fff; }
.people-map-legend .spread::after { content: '•••'; color: #d5263b; letter-spacing: 1px; transform: translateY(-1px); }
.people-map-canvas { width: 100%; height: min(63vh, 640px); min-height: 220px; flex: 1 1 500px; background: #e8eef3; }
.people-map-state { min-height: 36px; padding: 9px 15px; border-top: 1px solid #dfe8ef; color: #5f7488; font-size: .68rem; flex: 0 0 auto; }
.people-map-cluster-wrapper { border: 0; background: transparent; }
.people-map-cluster { display: grid; place-items: center; border: 3px solid #fff; border-radius: 50%; background: #d5263b; color: #fff; box-shadow: 0 0 0 6px rgba(213,38,59,.22), 0 5px 10px rgba(63,17,27,.32); font-size: .72rem; font-weight: 900; cursor: pointer; }
.people-map-popup { display: grid; gap: 3px; min-width: 160px; }
.people-map-popup strong { color: #173d60; font-size: .76rem; }
.people-map-popup span { color: #60758a; font-size: .65rem; }

.people-report-results {
    overflow: hidden;
}

.people-report-table-wrap {
    max-height: calc(100vh - 260px);
    overflow: auto;
    border: 1px solid #e1e9f3;
    border-radius: 10px;
}

.people-report-table {
    min-width: 4030px;
}

.people-report-table th,
.people-report-table td {
    white-space: nowrap;
}

.people-report-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #eef4fb;
}

.people-report-table .people-column-actions {
    position: sticky;
    left: 0;
    z-index: 2;
    min-width: 132px;
    background: #fff;
}

.people-report-table .people-column-IdPersona {
    position: sticky;
    left: 132px;
    z-index: 2;
    min-width: 70px;
    background: #fff;
}

.people-report-table .people-column-Nombre {
    position: sticky;
    left: 202px;
    z-index: 2;
    min-width: 160px;
    background: #fff;
    box-shadow: 8px 0 12px rgba(30, 61, 101, .05);
}

.people-report-table thead .people-column-actions,
.people-report-table thead .people-column-IdPersona,
.people-report-table thead .people-column-Nombre {
    z-index: 5;
    background: #e8f0fa;
}

.people-report-table tbody tr:hover .people-column-actions,
.people-report-table tbody tr:hover .people-column-IdPersona,
.people-report-table tbody tr:hover .people-column-Nombre {
    background: #f5f8fd;
}

.people-report-table .people-column-Domicilio,
.people-report-table .people-column-NotasTrabajo {
    min-width: 240px;
    max-width: 320px;
    white-space: normal;
}

.people-report-table .people-column-Email {
    min-width: 220px;
}

.people-report-page-size label {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #61768d;
    font-size: .67rem;
    font-weight: 700;
}

.people-report-page-size select {
    min-width: 72px;
    min-height: 34px;
    padding: 5px 8px;
}

.people-report-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 9px;
    padding: 10px 12px 0;
    border-top: 1px solid #dbe5ed;
}

.people-report-pagination > span {
    color: #718398;
    font-size: .64rem;
    font-weight: 750;
}

.people-report-pagination > div {
    display: flex;
    align-items: center;
    gap: 4px;
}

.people-report-pagination a,
.people-report-pagination > div > span {
    display: inline-flex;
    min-width: 31px;
    height: 31px;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    border: 1px solid #d4e0ea;
    border-radius: 7px;
    background: #fff;
    color: #34536f;
    font-size: .62rem;
    font-weight: 800;
    text-decoration: none;
}

.people-report-pagination a:hover { border-color: #62b9ea; color: #2588c7; background: #eff8fe; }
.people-report-pagination .current { border-color: #3498db; background: #3498db; color: #fff; }
.people-report-pagination .disabled { color: #a4b0bc; background: #f1f4f6; }
.people-report-pagination .ellipsis { min-width: 20px; padding: 0 2px; border-color: transparent; background: transparent; }

@media (max-width: 1320px) {
    .people-report-filters {
        grid-template-columns: repeat(3, minmax(160px, 1fr));
    }
}

@media (max-width: 760px) {
    .people-report-filters {
        grid-template-columns: 1fr;
    }

    .people-report-filter-actions,
    .people-report-filter-actions .button {
        width: 100%;
    }

    .people-report-summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .people-report-summary > div {
        text-align: left;
    }

    .people-report-summary .people-report-map-tools { width: 100%; align-items: stretch; flex-direction: column; }
    .people-report-map-button,
    .people-report-missing-address { justify-content: center; width: 100%; }
    .people-map-dialog { width: calc(100vw - 8px); max-height: calc(100dvh - 8px); }
    .people-map-metrics { grid-template-columns: 1fr 1fr; }
    .people-map-metrics article:first-child { grid-column: 1 / -1; }
    .people-map-metrics > div { grid-column: 1 / -1; justify-content: flex-start; padding: 4px; }
    .people-map-canvas { height: 56dvh; min-height: 210px; }

    .people-report-table-wrap {
        max-height: none;
    }

    .people-report-results > .panel-heading { align-items: stretch; flex-direction: column; }
    .people-report-page-size label { justify-content: space-between; }
    .people-report-pagination { align-items: stretch; flex-direction: column; padding-inline: 0; }
    .people-report-pagination > div { overflow-x: auto; }
}

@page people-report {
    size: A3 landscape;
    margin: 7mm;
}

@media print {
    body.page-reports-physical-people { page: people-report; }
    .people-report-summary { color: #17233a; background: #fff; box-shadow: none; }
    .people-report-summary article span,
    .people-report-summary div span,
    .people-report-summary small { color: #526681; }
    .people-report-table-wrap { max-height: none; overflow: visible; border: 0; }
    .people-report-table { min-width: 0; font-size: 5.5pt; }
    .people-report-table th,
    .people-report-table td { position: static !important; padding: 3px 4px; white-space: normal; }
}

/* CASH CUT REPORTS ------------------------------------------------------- */
.cash-date-lookup {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(360px, .8fr);
    gap: 28px;
    align-items: center;
    margin-bottom: 14px;
    padding: 20px 22px;
    border-top: 3px solid #3498DB;
    background: linear-gradient(135deg, #fff 0%, #f5f9ff 100%);
}

.cash-date-lookup-copy {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cash-date-icon {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 13px;
    background: linear-gradient(145deg, #3d8cf4, #3498DB);
    color: #fff;
    font-size: .6rem;
    font-weight: 900;
    letter-spacing: .06em;
    box-shadow: 0 8px 18px rgba(21, 94, 239, .22);
}

.cash-date-lookup h2 {
    margin: 3px 0 4px;
    color: #183653;
    font-size: 1rem;
}

.cash-date-lookup p {
    margin: 0;
    color: #718198;
    font-size: .68rem;
}

.cash-date-lookup form {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    border: 0;
}

.cash-date-lookup form > label {
    color: #536980;
    font-size: .62rem;
    font-weight: 850;
}

.cash-date-lookup form > div {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) auto;
    gap: 8px;
}

.cash-date-lookup input {
    min-width: 0;
    background: #fff;
    font-weight: 800;
}

.cash-date-lookup nav {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 14px;
}

.cash-date-lookup nav a {
    color: #3498DB;
    font-size: .59rem;
    font-weight: 800;
    text-decoration: none;
}

.cash-date-lookup nav a:hover { text-decoration: underline; }

.cash-report-filter-panel {
    margin-bottom: 16px;
}

.cash-advanced-filter-heading {
    margin: -2px 0 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e1e8f1;
}

.cash-advanced-filter-heading > div {
    display: flex;
    align-items: baseline;
    gap: 9px;
}

.cash-advanced-filter-heading strong {
    color: #203d5d;
    font-size: .76rem;
}

.cash-advanced-filter-heading span {
    color: #8190a2;
    font-size: .6rem;
}

.cash-report-filters {
    display: grid;
    grid-template-columns: repeat(5, minmax(140px, 1fr)) auto;
    align-items: end;
    margin: 0;
    padding: 0;
    border: 0;
}

.cash-report-filter-actions {
    display: flex;
    gap: 8px;
}

.cash-report-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.cash-report-metrics article {
    display: grid;
    gap: 5px;
    min-height: 118px;
    padding: 19px;
    border: 1px solid #d6e1ee;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(24, 50, 86, .06);
}

.cash-report-metrics article:first-child {
    color: #fff;
    border-color: #0d3760;
    background: linear-gradient(145deg, #0d3760, #3498DB);
}

.cash-report-metrics span {
    color: #667892;
    font-size: .7rem;
    font-weight: 800;
}

.cash-report-metrics article:first-child span,
.cash-report-metrics article:first-child small {
    color: #c8dcf5;
}

.cash-report-metrics strong {
    font-size: 1.55rem;
    letter-spacing: -.04em;
}

.cash-report-metrics small {
    align-self: end;
    color: #8997aa;
    font-size: .64rem;
}

.cash-report-metrics article.negative strong,
.cash-report-difference.negative {
    color: #c73345;
}

.cash-report-metrics article.positive strong,
.cash-report-difference.positive {
    color: #07835d;
}

.cash-report-difference.balanced {
    color: #3498DB;
}

.cash-report-table {
    min-width: 1380px;
}

.cash-report-table td:first-child {
    min-width: 210px;
}

.cut-report-sheet {
    page: cash-cut;
    max-width: 1120px;
    margin: 0 auto;
    padding: 30px;
    border: 1px solid #d7e2ef;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 20px 50px rgba(18, 48, 89, .1);
}

.cut-report-sheet-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding-bottom: 22px;
    border-bottom: 2px solid #173e6b;
}

.cut-report-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cut-report-brand > span {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(145deg, #5b9cff, #3498DB);
    color: #fff;
    font-size: 1.05rem;
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(21, 94, 239, .2);
}

.cut-report-brand div {
    display: grid;
    gap: 2px;
}

.cut-report-brand strong {
    color: #142a47;
    font-size: 1.1rem;
}

.cut-report-brand small,
.cut-report-number small {
    color: #73839a;
    font-size: .66rem;
}

.cut-report-number {
    display: grid;
    justify-items: end;
    gap: 4px;
}

.cut-report-number > strong {
    color: #142a47;
    font-size: 1.45rem;
}

.cut-report-status {
    display: inline-flex;
    padding: 5px 10px;
    border-radius: 999px;
    background: #edf2f8;
    color: #53657c;
    font-size: .64rem;
    font-weight: 850;
}

.cut-report-status.balanced { background: #e7f0ff; color: #3498DB; }
.cut-report-status.positive { background: #e1f5ec; color: #087451; }
.cut-report-status.negative { background: #fde9ec; color: #b72f42; }
.cut-report-status.pending { background: #fff3d8; color: #9a6200; }

.cut-report-identity {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    padding: 22px 0;
}

.cut-report-identity > div {
    display: grid;
    gap: 5px;
    padding: 13px 15px;
    border: 1px solid #e2eaf4;
    border-radius: 10px;
    background: #f8fafd;
}

.cut-report-identity small,
.cut-report-block-heading small,
.cut-report-note small {
    color: #75859b;
    font-size: .62rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .07em;
}

.cut-report-identity strong {
    color: #1d3859;
    font-size: .78rem;
}

.cut-report-timeline {
    display: grid;
    grid-template-columns: 1fr minmax(40px, .3fr) 1fr;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
    padding: 17px 19px;
    border-radius: 12px;
    background: #0e345d;
    color: #fff;
}

.cut-report-timeline > div {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cut-report-timeline > i {
    height: 1px;
    background: rgba(255, 255, 255, .24);
}

.cut-report-step {
    display: grid;
    place-items: center;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #2a6eea;
    color: #dbe9ff;
    font-size: .68rem;
    font-weight: 850;
}

.cut-report-timeline div div {
    display: grid;
    gap: 2px;
}

.cut-report-timeline small,
.cut-report-timeline span:last-child {
    color: #abc4e1;
    font-size: .64rem;
}

.cut-report-timeline strong {
    font-size: .75rem;
}

.cut-report-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.cut-report-block {
    overflow: hidden;
    border: 1px solid #dce5f0;
    border-radius: 13px;
}

.cut-report-block-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    background: #f6f9fd;
    border-bottom: 1px solid #dce5f0;
}

.cut-report-block-heading h2 {
    margin: 3px 0 0;
    color: #173657;
    font-size: 1rem;
}

.cut-report-block-heading > span {
    color: #6f8096;
    font-size: .64rem;
    font-weight: 850;
}

.cut-report-breakdown {
    margin: 0;
    padding: 8px 18px 14px;
}

.cut-report-breakdown > div {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 10px 0;
    border-bottom: 1px solid #edf1f6;
}

.cut-report-breakdown > div:last-child {
    border-bottom: 0;
}

.cut-report-breakdown dt {
    color: #65768d;
    font-size: .72rem;
}

.cut-report-breakdown dd {
    margin: 0;
    color: #193959;
    font-size: .75rem;
    font-weight: 850;
    font-variant-numeric: tabular-nums;
}

.cut-report-breakdown .plus dd { color: #087451; }
.cut-report-breakdown .minus dd { color: #b72f42; }
.cut-report-breakdown .total {
    margin: 5px -8px;
    padding: 12px 8px;
    border: 0;
    border-radius: 8px;
    background: #edf4ff;
}
.cut-report-breakdown .total dt,
.cut-report-breakdown .total dd { color: #3498DB; font-weight: 900; }
.cut-report-breakdown .difference { margin-top: 4px; border-top: 2px solid #dce5f0; }
.cut-report-breakdown .difference.balanced dt,
.cut-report-breakdown .difference.balanced dd { color: #3498DB; }
.cut-report-breakdown .difference.positive dt,
.cut-report-breakdown .difference.positive dd { color: #087451; }
.cut-report-breakdown .difference.negative dt,
.cut-report-breakdown .difference.negative dd { color: #b72f42; }

.cut-report-note {
    margin: 0 18px 18px;
    padding: 13px 15px;
    border-left: 3px solid #8db8f4;
    background: #f5f8fc;
}

.cut-report-note p {
    margin: 5px 0 0;
    color: #425874;
    font-size: .72rem;
    line-height: 1.5;
}

.cut-report-warning {
    margin: 16px 0 0;
}

.cut-report-signatures {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 70px;
    margin-top: 58px;
    padding: 0 40px 8px;
}

.cut-report-signatures > div {
    display: grid;
    justify-items: center;
    gap: 4px;
    text-align: center;
}

.cut-report-signatures span {
    width: 100%;
    border-top: 1px solid #718198;
}

.cut-report-signatures strong {
    color: #213f61;
    font-size: .7rem;
}

.cut-report-signatures small {
    color: #7b899b;
    font-size: .6rem;
}

@media (max-width: 1280px) {
    .cash-date-lookup {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .cash-report-filters {
        grid-template-columns: repeat(3, minmax(150px, 1fr));
    }

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

@media (max-width: 760px) {
    .cash-report-filters,
    .cash-report-metrics,
    .cut-report-identity,
    .cut-report-columns {
        grid-template-columns: 1fr;
    }

    .cash-report-filter-actions,
    .cash-report-filter-actions .button {
        width: 100%;
    }

    .cash-date-lookup {
        padding: 17px;
    }

    .cash-date-lookup form > div {
        grid-template-columns: 1fr;
    }

    .cash-date-lookup form .button {
        width: 100%;
    }

    .cut-report-sheet {
        padding: 18px;
        border-radius: 12px;
    }

    .cut-report-timeline {
        grid-template-columns: 1fr;
    }

    .cut-report-timeline > i {
        display: none;
    }

    .cut-report-signatures {
        grid-template-columns: 1fr;
        gap: 48px;
        padding-inline: 10px;
    }
}

@media print {
    @page cash-cut { size: A4 landscape; margin: 7mm; }
    .cut-report-sheet { max-width: none; padding: 0; border: 0; border-radius: 0; box-shadow: none; }
    .cut-report-sheet-header { padding-bottom: 12px; }
    .cut-report-identity { padding: 12px 0; }
    .cut-report-timeline { margin-bottom: 12px; padding: 12px 14px; }
    .cut-report-breakdown > div { padding: 7px 0; }
    .cut-report-signatures { margin-top: 38px; }
    .cash-report-metrics article { box-shadow: none; }
}

/* PHYSICAL CASH COUNT ---------------------------------------------------- */
.cash-close-with-count {
    margin-bottom: 18px;
    border-top: 3px solid #3498DB;
}

.cash-close-with-count > .panel-heading {
    align-items: center;
}

.cash-close-with-count .eyebrow {
    margin-bottom: 4px;
}

.cash-expected-heading {
    display: grid;
    justify-items: end;
    gap: 4px;
}

.cash-expected-heading small {
    color: #708097;
    font-size: .64rem;
    font-weight: 800;
}

.cash-count-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, .65fr);
    gap: 18px;
    align-items: start;
}

.cash-count-capture {
    overflow: hidden;
    border: 1px solid #dde6f1;
    border-radius: 12px;
}

.cash-count-section-heading,
.cash-count-summary-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.cash-count-section-heading {
    padding: 15px 17px;
    border-bottom: 1px solid #dde6f1;
    background: #f7f9fc;
}

.cash-count-section-heading h3 {
    margin: 0 0 3px;
    color: #183756;
    font-size: .9rem;
}

.cash-count-section-heading p,
.cash-count-section-heading > span {
    margin: 0;
    color: #77879b;
    font-size: .64rem;
}

.cash-count-section-heading > span {
    padding: 5px 9px;
    border-radius: 999px;
    background: #e9f1fd;
    color: #2464c6;
    font-weight: 800;
}

.cash-denomination-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.cash-denomination-row {
    display: grid !important;
    grid-template-columns: minmax(80px, 1fr) 90px minmax(90px, .8fr);
    align-items: center;
    gap: 10px !important;
    padding: 12px 14px;
    border-bottom: 1px solid #edf1f6;
}

.cash-denomination-row:nth-child(odd) {
    border-right: 1px solid #edf1f6;
}

.cash-denomination-row > span {
    display: grid;
    gap: 2px;
}

.cash-denomination-row small {
    color: #8896a8;
    font-size: .57rem;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.cash-denomination-row strong {
    color: #173959;
    font-size: .82rem;
}

.cash-denomination-row input {
    min-width: 0;
    padding: 8px 9px;
    text-align: center;
    font-weight: 800;
}

.cash-denomination-row > b {
    color: #536980;
    text-align: right;
    font-size: .7rem;
    font-variant-numeric: tabular-nums;
}

.cash-count-summary {
    position: sticky;
    top: 94px;
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid #d4dfec;
    border-radius: 13px;
    background: #f8fafd;
}

.cash-count-summary-heading span {
    color: #173959;
    font-size: .82rem;
    font-weight: 850;
}

.cash-count-summary-heading small {
    color: #8290a2;
    font-size: .6rem;
}

.cash-count-summary dl {
    margin: 0;
    overflow: hidden;
    border: 1px solid #dbe5f0;
    border-radius: 10px;
    background: #fff;
}

.cash-count-summary dl > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 11px 13px;
    border-bottom: 1px solid #e9eef5;
}

.cash-count-summary dl > div:last-child {
    border-bottom: 0;
}

.cash-count-summary dt {
    color: #65768c;
    font-size: .68rem;
}

.cash-count-summary dd {
    margin: 0;
    color: #1b3a5a;
    font-size: .79rem;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}

.cash-count-summary .counted {
    background: #edf4ff;
}

.cash-count-summary .counted dt,
.cash-count-summary .counted dd {
    color: #3498DB;
}

.cash-count-summary .difference.balanced dt,
.cash-count-summary .difference.balanced dd { color: #3498DB; }
.cash-count-summary .difference.positive dt,
.cash-count-summary .difference.positive dd { color: #087451; }
.cash-count-summary .difference.negative dt,
.cash-count-summary .difference.negative dd { color: #b72f42; }

.cash-count-confirmation {
    display: flex !important;
    align-items: flex-start;
    grid-template-columns: none !important;
    flex-direction: row;
    gap: 9px !important;
    padding: 11px 12px;
    border: 1px solid #dbe5f0;
    border-radius: 9px;
    background: #fff;
}

.cash-count-confirmation input {
    flex: 0 0 auto;
    width: auto;
    margin-top: 2px;
}

.cash-count-confirmation span {
    color: #4c627c;
    font-size: .68rem;
    line-height: 1.4;
}

.cash-count-help {
    color: #8290a2;
    text-align: center;
    font-size: .59rem;
}

.cut-physical-count {
    overflow: hidden;
    margin-top: 16px;
    border: 1px solid #dce5f0;
    border-radius: 13px;
}

.cut-physical-count-meta {
    display: grid;
    justify-items: end;
    gap: 2px;
}

.cut-physical-count-meta span {
    color: #354f6d;
    font-size: .67rem;
    font-weight: 800;
}

.cut-physical-count-meta small {
    color: #8190a2;
    font-size: .58rem;
}

.cut-physical-count-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.cut-physical-count-grid > div {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 10px;
    padding: 11px 13px;
    border-right: 1px solid #edf1f6;
    border-bottom: 1px solid #edf1f6;
}

.cut-physical-count-grid > div:nth-child(4n) {
    border-right: 0;
}

.cut-physical-count-grid span {
    display: grid;
    gap: 2px;
}

.cut-physical-count-grid small {
    color: #8896a8;
    font-size: .54rem;
    text-transform: uppercase;
}

.cut-physical-count-grid span strong {
    color: #1c3c5d;
    font-size: .72rem;
}

.cut-physical-count-grid b {
    color: #576c84;
    font-size: .64rem;
}

.cut-physical-count-grid em {
    grid-column: 1 / -1;
    color: #3498DB;
    font-size: .68rem;
    font-style: normal;
    font-weight: 850;
}

.cut-physical-count > footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 16px;
    background: #0e345d;
    color: #fff;
}

.cut-physical-count > footer span {
    color: #c6d9ef;
    font-size: .68rem;
}

.cut-physical-count > footer strong {
    font-size: .95rem;
}

@media (max-width: 1180px) {
    .cash-count-layout {
        grid-template-columns: 1fr;
    }

    .cash-count-summary {
        position: static;
    }
}

@media (max-width: 760px) {
    .cash-denomination-grid,
    .cut-physical-count-grid {
        grid-template-columns: 1fr 1fr;
    }

    .cut-physical-count-grid > div:nth-child(4n) {
        border-right: 1px solid #edf1f6;
    }

    .cut-physical-count-grid > div:nth-child(2n) {
        border-right: 0;
    }
}

@media (max-width: 480px) {
    .cash-denomination-grid,
    .cut-physical-count-grid {
        grid-template-columns: 1fr;
    }

    .cash-denomination-row:nth-child(odd),
    .cut-physical-count-grid > div {
        border-right: 0;
    }

    .cash-denomination-row {
        grid-template-columns: minmax(76px, 1fr) 78px minmax(80px, .8fr);
    }
}

@media print {
    .cut-physical-count { break-inside: avoid; }
    .cut-physical-count-grid > div { padding: 7px 9px; }
}

/* CASH CLOSE AUTHORIZATION ---------------------------------------------- */
.cash-close-operator {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    padding: 12px;
    border: 1px solid #d9e4f0;
    border-radius: 10px;
    background: #fff;
}

.cash-close-operator .avatar {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: #e8f1ff;
    color: #3498DB;
    font-size: .72rem;
    font-weight: 900;
}

.cash-close-operator > div {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.cash-close-operator small {
    color: #7d8b9e;
    font-size: .56rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.cash-close-operator strong {
    overflow: hidden;
    color: #1d3a59;
    font-size: .76rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cash-close-operator > div > span {
    color: #78879a;
    font-size: .6rem;
}

.cash-close-operator > b {
    padding: 5px 8px;
    border-radius: 999px;
    font-size: .58rem;
}

.cash-close-operator.authorized {
    border-color: #bfe7d7;
    background: #f3fbf7;
}

.cash-close-operator.authorized .avatar {
    background: #dff5ea;
    color: #087451;
}

.cash-close-operator.authorized > b {
    background: #dff5ea;
    color: #087451;
}

.cash-close-operator.unauthorized {
    border-color: #f1cbd1;
    background: #fff7f8;
}

.cash-close-operator.unauthorized .avatar,
.cash-close-operator.unauthorized > b {
    background: #fde9ec;
    color: #b72f42;
}

.cash-close-permission-notice {
    margin: 0;
    font-size: .64rem;
    line-height: 1.45;
}

.cash-count-summary .button:disabled {
    cursor: not-allowed;
    opacity: .55;
}

@media (max-width: 480px) {
    .cash-close-operator {
        grid-template-columns: 38px minmax(0, 1fr);
    }

.cash-close-operator > b {
        grid-column: 2;
        justify-self: start;
    }
}

/* CONSOLIDATED DAILY CASH CUT ------------------------------------------ */
.daily-cut-date-selector {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 15px;
    padding: 15px 18px;
    border-top: 3px solid #3498DB;
}

.daily-cut-date-selector > div {
    display: grid;
    gap: 3px;
}

.daily-cut-date-selector > div strong {
    color: #264562;
    font-size: .72rem;
}

.daily-cut-date-selector form {
    display: flex;
    gap: 8px;
    margin: 0;
    padding: 0;
    border: 0;
}

.daily-cut-date-selector input {
    min-width: 185px;
    background: #fff;
    font-weight: 800;
}

.daily-cut-sheet {
    page: daily-cash-cut;
    max-width: 1480px;
    margin: 0 auto;
    padding: 26px 28px 34px;
    border: 1px solid #dbe4ee;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(20, 48, 82, .09);
}

.daily-cut-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 16px;
    border-bottom: 3px solid #3498DB;
}

.daily-cut-header > div:last-child {
    display: grid;
    justify-items: end;
    gap: 3px;
}

.daily-cut-header > div:last-child small,
.daily-cut-header > div:last-child span {
    color: #718198;
    font-size: .6rem;
}

.daily-cut-header > div:last-child strong {
    color: #183958;
    font-size: 1.15rem;
}

.daily-cut-section {
    margin-top: 24px;
}

.daily-cut-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 11px;
}

.daily-cut-section-title > span {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #3498DB;
    color: #fff;
    font-size: .6rem;
    font-weight: 900;
}

.daily-cut-section-title div {
    display: grid;
    gap: 1px;
}

.daily-cut-section-title small {
    color: #718198;
    font-size: .54rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.daily-cut-section-title h2 {
    margin: 0;
    color: #173657;
    font-size: .98rem;
}

.daily-cut-primary-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.daily-cut-primary-cards article {
    display: grid;
    gap: 5px;
    min-height: 105px;
    padding: 15px;
    border: 1px solid #d8e2ed;
    border-radius: 11px;
    background: #fafbfd;
}

.daily-cut-primary-cards article.cash { background: #eaf8f1; border-color: #c8e8d8; }
.daily-cut-primary-cards article.transfer { background: #eaf3ff; border-color: #ccdef4; }
.daily-cut-primary-cards article.credit { background: #fff5db; border-color: #ecd9a6; }

.daily-cut-primary-cards small {
    color: #62758d;
    font-size: .63rem;
}

.daily-cut-primary-cards strong {
    color: #152f4d;
    font-size: 1.28rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: -.02em;
}

.daily-cut-primary-cards span {
    align-self: end;
    color: #7e8da0;
    font-size: .58rem;
}

.daily-cut-matrix { min-width: 1180px; }
.daily-cut-users { min-width: 1780px; }
.daily-cut-sales { min-width: 1780px; }
.daily-cut-credit-payments { min-width: 1580px; }

.daily-cut-sale-head th,
.daily-cut-sale-head td {
    border-top-width: 2px;
    background: #f2f7fc;
    font-weight: 750;
}

.daily-cut-product-row td {
    background: #fbfcfe;
    color: #66778b;
    font-size: .55rem;
}

.daily-cut-product-row td:first-child {
    padding-left: 16px;
    color: #3498DB;
    font-weight: 850;
}

.daily-cut-user-subtotal th,
.daily-cut-user-subtotal td {
    background: #e8eff4;
    color: #244660;
    font-weight: 850;
}

.daily-cut-sales-products td:nth-child(n + 5),
.daily-cut-sales-products tfoot td,
.daily-cut-credit-payments td:nth-child(n + 6),
.daily-cut-credit-payments tfoot td {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.daily-cut-pdf-capture {
    width: var(--cash-report-capture-width, 1900px) !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 24px !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.daily-cut-pdf-capture .cut-table-wrap {
    overflow: visible !important;
    padding-inline: 0 !important;
}

.daily-cut-difference {
    min-width: 90px;
}

.daily-cut-difference span {
    display: inline-flex;
    margin-top: 4px;
    padding: 3px 6px;
    border-radius: 999px;
    font-size: .48rem;
    font-weight: 900;
}

.daily-cut-difference.balanced strong { color: #3498DB; }
.daily-cut-difference.balanced span { background: #e8f1ff; color: #3498DB; }
.daily-cut-difference.review strong { color: #b72f42; }
.daily-cut-difference.review span { background: #fde9ec; color: #b72f42; }

.daily-cut-two-tables {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.daily-cut-two-tables .cut-table-wrap {
    padding: 0;
}

.daily-cut-two-tables h3 {
    margin: 0 0 8px;
    color: #264562;
    font-size: .74rem;
}

@media (max-width: 980px) {
    .daily-cut-primary-cards,
    .daily-cut-two-tables { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 650px) {
    .daily-cut-date-selector,
    .daily-cut-date-selector form { align-items: stretch; flex-direction: column; }
    .daily-cut-primary-cards,
    .daily-cut-two-tables { grid-template-columns: 1fr; }
    .daily-cut-sheet { padding: 18px; border-radius: 12px; }
}

@media print {
    @page daily-cash-cut { size: legal landscape; margin: 5mm; }
    .daily-cut-sheet { max-width: none; padding: 0; border: 0; border-radius: 0; box-shadow: none; }
    .daily-cut-section { margin-top: 15px; }
    .daily-cut-primary-cards article { min-height: 78px; padding: 10px; break-inside: avoid; }
    .daily-cut-matrix,
    .daily-cut-users,
    .daily-cut-sales,
    .daily-cut-credit-payments { min-width: 0; font-size: 5.2pt; }
    .daily-cut-two-tables { grid-template-columns: 1fr; }
}

/* INDIVIDUAL DAILY CASH SUMMARY ---------------------------------------- */
.cash-summary-sheet {
    page: daily-cash-summary;
    max-width: 820px;
    margin: 0 auto;
    padding: 34px 38px 42px;
    border: 1px solid #d8e2ec;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 18px 42px rgba(20, 48, 82, .1);
}

.cash-summary-header {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    align-items: start;
    padding-bottom: 18px;
    border-bottom: 3px solid #3498DB;
}

.cash-summary-header dl {
    display: grid;
    gap: 5px;
    min-width: 230px;
    margin: 0;
}

.cash-summary-header dl > div {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 8px;
    font-size: .64rem;
}

.cash-summary-header dt { color: #718198; font-weight: 750; }
.cash-summary-header dd { margin: 0; color: #203d5d; font-weight: 850; }
.cash-summary-header dd small { display: block; color: #8493a5; font-size: .55rem; }

.cash-summary-section { margin-top: 24px; }

.cash-summary-section-title {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 10px;
}

.cash-summary-section-title > span {
    display: grid;
    width: 25px;
    height: 25px;
    place-items: center;
    border-radius: 50%;
    background: #3498DB;
    color: #fff;
    font-size: .54rem;
    font-weight: 900;
}

.cash-summary-section-title h2 { margin: 0; color: #2588C7; font-size: .93rem; }

.cash-summary-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.cash-summary-cards article {
    display: grid;
    gap: 4px;
    min-height: 91px;
    padding: 12px;
    border: 1px solid #d8e2ed;
    border-radius: 9px;
    background: #fff;
}

.cash-summary-cards article.cash { background: #eaf8f1; border-color: #c8e8d8; }
.cash-summary-cards article.transfer { background: #eaf3ff; border-color: #ccdef4; }
.cash-summary-cards article.credit { background: #fff5db; border-color: #ecd9a6; }
.cash-summary-cards span { color: #65778d; font-size: .61rem; font-weight: 750; }
.cash-summary-cards strong { color: #183958; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.cash-summary-cards small { align-self: end; color: #8190a2; font-size: .54rem; }

.cash-summary-table-wrap { overflow-x: auto; }
.cash-summary-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.cash-summary-table th,
.cash-summary-table td { padding: 7px 8px; border: 1px solid #d8e1eb; font-size: .6rem; overflow-wrap: anywhere; }
.cash-summary-table thead th { background: #f1f5f9; color: #38526d; text-align: left; }
.cash-summary-table td:not(:first-child),
.cash-summary-table thead th:not(:first-child),
.cash-summary-table tfoot td { text-align: right; font-variant-numeric: tabular-nums; }
.cash-summary-table tfoot th,
.cash-summary-table tfoot td { background: #e8eff4; color: #274761; font-weight: 900; }
.cash-summary-table .instrument-cash { background: #eef9f4; }
.cash-summary-table .instrument-transfer { background: #edf5ff; }
.cash-summary-table .instrument-credit { background: #fff8e8; }
.cash-summary-table .unclassified { background: #fff0f2; color: #b72f42; }

.cash-summary-reconciliation {
    overflow: hidden;
    border: 2px solid #3498DB;
    border-radius: 10px;
}

.cash-summary-reconciliation dl { margin: 0; }
.cash-summary-reconciliation dl > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 8px 11px;
    border-bottom: 1px solid #e0e7ef;
}
.cash-summary-reconciliation dl > div:last-child { border-bottom: 0; }
.cash-summary-reconciliation dt { color: #526981; font-size: .64rem; }
.cash-summary-reconciliation dd { margin: 0; color: #183958; font-size: .68rem; font-weight: 850; font-variant-numeric: tabular-nums; }
.cash-summary-reconciliation .expected { background: #eaf3ff; }
.cash-summary-reconciliation .expected dt,
.cash-summary-reconciliation .expected dd { color: #2588C7; font-size: .73rem; font-weight: 900; text-transform: uppercase; }
.cash-summary-reconciliation .difference.balanced { background: #e9f8ef; }
.cash-summary-reconciliation .difference.review { background: #fff0f0; }
.cash-summary-reconciliation .difference.balanced dt,
.cash-summary-reconciliation .difference.balanced dd { color: #087451; }
.cash-summary-reconciliation .difference.review dt,
.cash-summary-reconciliation .difference.review dd { color: #b72f42; }
.cash-summary-reconciliation .difference span { display: inline-flex; margin-left: 7px; padding: 3px 6px; border-radius: 999px; background: rgba(255,255,255,.7); font-size: .46rem; }
.cash-summary-formula,
.cash-summary-note { margin: 8px 0 0; color: #718198; font-size: .57rem; line-height: 1.5; }

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

.cash-summary-denominations article {
    display: grid;
    gap: 3px;
    padding: 9px;
    border: 1px solid #dbe4ed;
    border-radius: 8px;
    background: #fafcfe;
    text-align: center;
}
.cash-summary-denominations small { color: #8190a2; font-size: .48rem; }
.cash-summary-denominations strong { color: #274761; font-size: .74rem; }
.cash-summary-denominations span { color: #64788d; font-size: .52rem; }
.cash-summary-denominations b { color: #2588C7; font-size: .61rem; font-variant-numeric: tabular-nums; }

.cash-summary-count-totals {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 7px;
    margin: 9px 0 0;
}
.cash-summary-count-totals > div { padding: 9px; border: 1px solid #dbe4ed; border-radius: 8px; background: #f7fafc; }
.cash-summary-count-totals dt { color: #718198; font-size: .52rem; }
.cash-summary-count-totals dd { margin: 4px 0 0; color: #274761; font-size: .75rem; font-weight: 900; }
.cash-summary-count-totals .balanced { background: #e9f8ef; }
.cash-summary-count-totals .balanced dd { color: #087451; }
.cash-summary-count-totals .review { background: #fff0f0; }
.cash-summary-count-totals .review dd { color: #b72f42; }

.cash-summary-signatures {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 54px;
    margin-top: 48px;
}
.cash-summary-signatures div { display: grid; gap: 3px; text-align: center; }
.cash-summary-signatures span { border-top: 1px solid #5f6f81; }
.cash-summary-signatures strong { color: #29465f; font-size: .64rem; }
.cash-summary-signatures small { color: #7c8b9b; font-size: .55rem; }

@media (max-width: 760px) {
    .cash-summary-sheet { padding: 20px; border-radius: 11px; }
    .cash-summary-header { grid-template-columns: 1fr; }
    .cash-summary-header dl { min-width: 0; }
    .cash-summary-cards { grid-template-columns: 1fr 1fr; }
    .cash-summary-denominations { grid-template-columns: repeat(3, 1fr); }
}

@media print {
    @page daily-cash-summary { size: A4 portrait; margin: 8mm; }
    .cash-summary-sheet { max-width: none; padding: 0; border: 0; border-radius: 0; box-shadow: none; }
    .cash-summary-section { margin-top: 14px; }
    .cash-summary-cards article,
    .cash-summary-table tr,
    .cash-summary-denominations article { break-inside: avoid; }
    .cash-summary-page-break { break-before: page; }
    .cash-summary-signatures { margin-top: 34px; }
}

/* CASH OPEN AUTHENTICATED RESPONSIBLE ---------------------------------- */
.cash-open-responsible {
    display: grid;
    gap: 7px;
}

.cash-open-responsible > span {
    color: #53657d;
    font-size: .67rem;
    font-weight: 800;
}

.cash-open-responsible .cash-close-operator {
    min-height: 46px;
    padding: 7px 9px;
}

.cash-open-responsible .cash-close-operator .avatar {
    width: 34px;
    height: 34px;
}

.cash-open-permission-notice {
    grid-column: 1 / -1;
    margin: 0;
}

.cash-movement-fixed-date {
    display: grid;
    align-content: center;
    gap: 5px;
    min-height: 72px;
    padding: 10px 12px;
    border: 1px solid var(--primary-border, #bfdbfe);
    border-radius: 10px;
    background: var(--primary-soft, #eff6ff);
}

.cash-movement-fixed-date span,
.cash-movement-fixed-date small {
    color: var(--muted, #687892);
    font-size: .68rem;
    font-weight: 700;
}

.cash-movement-fixed-date strong {
    color: var(--ink, #14233b);
    font-size: .95rem;
}

.cash-movement-fixed-date small { font-size: .63rem; font-weight: 600; }

.cash-opening-form {
    align-items: start;
}

.cash-opening-amount small,
.cash-opening-observation small {
    display: block;
    margin-top: 7px;
    color: var(--muted, #687892);
    font-size: .72rem;
    font-weight: 600;
    line-height: 1.35;
}

.cash-opening-amount input {
    font-size: 1.15rem;
    font-weight: 850;
}

.cash-opening-observation {
    padding: 10px 12px;
    border: 1px solid var(--line, #d7e1ee);
    border-radius: 12px;
    background: #f8fbff;
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.cash-opening-observation textarea {
    margin-top: 7px;
    resize: vertical;
}

.cash-opening-observation.is-adjusted {
    border-color: #f0b94c;
    background: #fff9ec;
    box-shadow: 0 0 0 3px rgba(240, 185, 76, .12);
}

.cash-opening-observation.is-adjusted small {
    color: #9a5d00;
}

.cash-opening-confirmation {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    min-height: 42px;
    padding: 11px 12px;
    border: 1px solid var(--primary-border, #bfdbfe);
    border-radius: 11px;
    background: var(--primary-soft, #eff6ff);
    color: var(--ink, #14233b);
    font-size: .78rem;
    font-weight: 750;
    line-height: 1.35;
}

.cash-opening-confirmation input {
    flex: 0 0 auto;
    margin-top: 2px;
}

.cash-opening-submit {
    align-self: stretch;
    min-height: 42px;
}

/* CASH EXPENSE AUTHORIZATION --------------------------------------------- */
.expense-page-header { margin-bottom: 15px; }
.expense-session-card { margin-bottom: 14px; }
.expense-session-warning { margin-bottom: 14px; }
.expense-history-filter-panel { margin-bottom: 14px; padding: 14px; }
.expense-history-filters { display: grid; grid-template-columns: minmax(150px,.45fr) minmax(150px,.45fr) minmax(180px,.6fr) auto auto; align-items: end; gap: 10px; }
.expense-history-filters label { display: grid; gap: 6px; color: #65788f; font-size: .7rem; font-weight: 800; }
.expense-history-filters input,.expense-history-filters select { min-height: 42px; }
.expense-history-filter-panel > p { margin: 9px 0 0; color: #718398; font-size: .67rem; }

.expense-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.expense-summary-grid article {
    position: relative;
    overflow: hidden;
    min-height: 104px;
    padding: 16px 18px;
    border: 1px solid var(--line, #d7e1ee);
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--shadow, 0 8px 24px rgba(15, 40, 75, .07));
}

.expense-summary-grid article::after {
    position: absolute;
    top: -26px;
    right: -23px;
    width: 78px;
    height: 78px;
    border-radius: 50%;
    background: #fff2cf;
    content: '';
}

.expense-summary-grid article.authorized::after { background: #dff7ec; }
.expense-summary-grid article.rejected::after { background: #fdebed; }
.expense-summary-grid span,
.expense-summary-grid small { display: block; color: var(--muted, #687892); }
.expense-summary-grid span { font-size: .7rem; font-weight: 800; }
.expense-summary-grid strong { display: block; margin: 8px 0 3px; color: var(--ink, #14233b); font-size: 1.55rem; }
.expense-summary-grid small { font-size: .7rem; }

.expense-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(270px, .8fr);
    gap: 14px;
    margin-bottom: 14px;
}

.expense-capture-panel,
.expense-rule-panel,
.expense-list-panel { margin: 0; }

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

.expense-form label {
    display: grid;
    align-content: start;
    gap: 6px;
    color: #53677e;
    font-size: .72rem;
    font-weight: 800;
}

.expense-form .full-row { grid-column: 1 / -1; }
.expense-form textarea { resize: vertical; }
.expense-form label small { color: var(--muted, #687892); font-size: .66rem; font-weight: 600; }
.expense-amount-field input { color: var(--primary-dark, #2176ad); font-size: 1.15rem; font-weight: 850; }

.expense-form-audit {
    display: grid;
    grid-template-columns: auto 1fr auto 1fr auto auto;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--primary-border, #bfdbfe);
    border-radius: 10px;
    background: var(--primary-soft, #eff6ff);
    font-size: .7rem;
}

.expense-form-audit > span { color: var(--muted, #687892); }
.expense-form-audit > strong { color: var(--ink, #14233b); }

.expense-status {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 5px 8px;
    border-radius: 999px;
    background: #fff3d7;
    color: #976000;
    font-size: .66rem;
    font-weight: 850;
}

.expense-status.authorized { background: #def6eb; color: #087553; }
.expense-status.rejected { background: #fde8eb; color: #b33140; }

.expense-rule-panel ol {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.expense-rule-panel li { display: grid; grid-template-columns: 32px 1fr; gap: 10px; }
.expense-rule-panel li > span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--primary-soft, #eff6ff); color: var(--primary-dark, #2176ad); font-size: .72rem; font-weight: 900; }
.expense-rule-panel strong { color: var(--ink, #14233b); font-size: .8rem; }
.expense-rule-panel p { margin: 3px 0 0; color: var(--muted, #687892); font-size: .7rem; line-height: 1.45; }
.expense-admin-badge { margin-top: 16px; padding: 10px; border-radius: 9px; background: #def6eb; color: #087553; text-align: center; font-size: .7rem; font-weight: 850; }

.expense-list-panel { margin-bottom: 20px; }
.expense-table { min-width: 1080px; }
.expense-table td { vertical-align: top; }
.expense-table td > strong { color: var(--ink, #14233b); }
.expense-resolution-cell { min-width: 150px; }
.expense-resolution-cell details { display: inline-block; margin-left: 5px; vertical-align: top; }
.expense-resolution-cell summary { padding: 7px 8px; color: #b33140; font-size: .68rem; font-weight: 800; cursor: pointer; }
.expense-resolution-cell details form { display: grid; gap: 7px; width: 230px; margin-top: 7px; padding: 9px; border: 1px solid #efc0c5; border-radius: 9px; background: #fff7f8; }
.expense-resolution-cell details input { min-width: 0; }
.expense-resolution-cell .expense-approve-action summary { color: var(--primary-dark, #2176ad); }
.expense-resolution-cell .expense-approve-action form { border-color: var(--primary-border, #bfdbfe); background: var(--primary-soft, #eff6ff); }
.expense-resolution-cell .expense-approve-action label { display: flex; align-items: center; gap: 6px; color: #405873; font-size: .66rem; font-weight: 750; }
.expense-resolution-cell .expense-approve-action label input { flex: 0 0 auto; }
.expense-action-note { color: #9b5b06; font-size: .63rem; line-height: 1.4; }

@media (max-width: 900px) {
    .expense-workspace { grid-template-columns: 1fr; }
    .expense-history-filters { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .expense-form-audit { grid-template-columns: auto 1fr; }
}

@media (max-width: 650px) {
    .expense-summary-grid,
    .expense-form,
    .expense-history-filters { grid-template-columns: 1fr; }
    .expense-form .full-row { grid-column: auto; }
}

/* RETAIL POS INTERFACE 2026 ----------------------------------------------- */
:root {
    --ink: #14233b;
    --muted: #687892;
    --line: #d7e1ee;
    --surface: #ffffff;
    --canvas: #edf3f9;
    --nav: #071a30;
    --nav-soft: #0e3156;
    --primary: #3498DB;
    --primary-dark: #2176AD;
    --primary-light: #62B9EA;
    --primary-soft: #eff6ff;
    --primary-border: #bfdbfe;
    --mint: #e7f8f2;
    --amber: #d97706;
    --amber-soft: #fff4da;
    --red: #c33e45;
    --red-soft: #fdebed;
    --shadow: 0 8px 24px rgba(15, 40, 75, .07);
}

body {
    background:
        linear-gradient(135deg, rgba(18, 102, 231, .025) 0, transparent 35%),
        var(--canvas);
    font-size: 15px;
}

body.app-shell:not(.pos-terminal):not(.projection-embedded):not(.person-edit-embedded) {
    grid-template: "sidebar topbar" 70px "sidebar content" 1fr / 238px 1fr;
}

.sidebar {
    width: 238px;
    padding: 20px 14px 16px;
    background:
        radial-gradient(circle at 12% 2%, rgba(59, 130, 246, .2), transparent 14rem),
        linear-gradient(180deg, #0b2949 0%, #071a30 54%, #051425 100%);
    border-right: 1px solid rgba(148, 198, 255, .12);
    box-shadow: 10px 0 32px rgba(7, 26, 48, .08);
}

.sidebar .brand {
    gap: 11px;
    min-height: 52px;
    padding: 0 8px 18px;
}

.sidebar .brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(145deg, #62B9EA, #2598EC 72%);
    box-shadow: 0 10px 24px rgba(18, 102, 231, .3), inset 0 1px 0 rgba(255,255,255,.38);
}

.sidebar .brand strong { font-size: 1rem; letter-spacing: -.01em; }
.sidebar .brand small { color: #91abc8; font-size: .68rem; letter-spacing: .055em; }

.sidebar nav {
    display: block;
    min-height: 0;
    margin: 0 -4px;
    padding: 2px 4px 12px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(125, 211, 252, .2) transparent;
}

.nav-group { margin: 0 0 16px; }
.nav-group:last-child { margin-bottom: 8px; }
.nav-group-label {
    display: block;
    padding: 0 10px 7px;
    color: #5e7d9c;
    font-size: .57rem;
    font-weight: 850;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.sidebar nav .nav-link {
    min-height: 42px;
    margin: 2px 0;
    padding: 8px 10px;
    gap: 10px;
    border-radius: 9px;
    color: #aec2d8;
    font-size: .79rem;
    font-weight: 720;
}

.sidebar nav .nav-link:hover {
    transform: none;
    color: #fff;
    background: rgba(31, 83, 128, .55);
}

.sidebar nav .nav-link.active {
    color: #fff;
    background: linear-gradient(90deg, rgba(18, 102, 231, .5), rgba(23, 77, 124, .55));
    border-color: rgba(109, 190, 255, .25);
    box-shadow: inset 3px 0 #62B9EA, 0 6px 16px rgba(3, 17, 32, .14);
}

.nav-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    color: #6f98bd;
}

.nav-link:hover .nav-icon,
.nav-link.active .nav-icon { color: #93c5fd; }

.sidebar nav .nav-link .nav-link-label {
    color: inherit;
    font-size: inherit;
    font-variant-numeric: normal;
}

.sidebar-user {
    padding: 13px 7px 0;
    border-top-color: rgba(148, 198, 255, .13);
    grid-template-columns: 34px minmax(0, 1fr) auto;
}

.sidebar-user .avatar {
    width: 34px;
    height: 34px;
    background: linear-gradient(145deg, #174879, #0d3157);
    color: #bfdbfe;
}
.sidebar-user strong { color: #f6f9fd; font-size: .75rem; }
.sidebar-user small, .sidebar-user .link-button { color: #7895b2; }

.sidebar-backdrop { display: none; }

.topbar:not(.pos-terminal-topbar) {
    height: 70px;
    padding: 0 26px;
    background: rgba(255, 255, 255, .93);
    border-bottom-color: #dce5ef;
    box-shadow: 0 4px 18px rgba(17, 44, 82, .035);
    backdrop-filter: blur(16px) saturate(150%);
}

.topbar-context {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 !important;
    text-align: left !important;
}

.topbar-section-icon {
    width: 35px;
    height: 35px;
    display: grid;
    place-items: center;
    border: 1px solid #d9e6f4;
    border-radius: 9px;
    color: var(--primary);
    background: #eff6ff;
}
.topbar-section-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.topbar-context small { color: #8593a8; font-size: .56rem; font-weight: 780; letter-spacing: .08em; text-transform: uppercase; }
.topbar-context strong { margin-top: 1px; color: #1a2c47; font-size: .82rem; }

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 13px;
    margin: 0 !important;
    text-align: left !important;
}
.system-status {
    display: inline-flex !important;
    align-items: center;
    gap: 7px;
    min-height: 30px;
    padding: 6px 10px;
    border: 1px solid #ccebdd;
    border-radius: 999px;
    color: #08724f !important;
    background: #edfaf5;
    font-size: .63rem !important;
    font-weight: 800;
}
.system-status i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #17a673;
    box-shadow: 0 0 0 3px rgba(23, 166, 115, .13);
}
.topbar-clock {
    min-width: 73px;
    padding-right: 13px;
    border-right: 1px solid #e0e7f0;
}
.topbar-clock small { color: #8a97a9; font-size: .55rem; }
.topbar-clock strong { margin-top: 1px; color: #243753; font-size: .72rem; font-variant-numeric: tabular-nums; text-transform: uppercase; }
.topbar-sale-action { gap: 6px; min-height: 39px !important; padding: 8px 14px !important; }
.topbar-sale-action span { color: inherit !important; font-size: 1rem !important; line-height: 1; }

.content:not(.projection-embedded .content):not(.person-edit-embedded .content) {
    padding: 8px 8px 18px;
}

.page-header {
    min-height: 70px;
    margin-bottom: 18px;
    align-items: center;
}
.page-header > div:first-child { min-width: 0; }
.page-header h1 {
    margin: 3px 0 4px;
    color: #14243e;
    font-size: clamp(1.65rem, 2.4vw, 2.2rem);
    font-weight: 850;
    letter-spacing: -.04em;
}
.page-header p { color: #6c7b91; font-size: .87rem; }
.eyebrow {
    color: #3498DB;
    font-size: .61rem;
    font-weight: 900;
    letter-spacing: .14em;
}
.date-chip {
    padding: 8px 12px;
    border-radius: 8px;
    color: #40536f;
    background: rgba(255,255,255,.86);
    font-size: .73rem;
    font-weight: 750;
    box-shadow: 0 3px 12px rgba(17, 44, 82, .04);
}

.button {
    min-height: 42px;
    border-radius: 8px;
    padding: 9px 15px;
    font-size: .79rem;
    font-weight: 800;
    box-shadow: 0 2px 4px rgba(17, 44, 82, .05);
}
.button:hover { transform: translateY(-1px); }
.button.primary {
    background: linear-gradient(135deg, #3498DB, #2588C7);
    box-shadow: 0 7px 16px rgba(18, 102, 231, .2);
}
.button.primary:hover { background: linear-gradient(135deg, #3498DB, #2176AD); }
.button.secondary { color: #22415f; background: #edf4fb; border-color: #d3e0ee; }
.button.ghost { color: #243753; border-color: #d3deeb; }
.button.danger { background: linear-gradient(135deg, #d44a51, #b9333b); }
.button.compact { min-height: 36px; }

.panel,
.metric {
    border-color: #d8e2ee;
    border-radius: 12px;
    box-shadow: var(--shadow);
}
.panel { padding: 18px; }
.panel-heading, .section-heading { margin-bottom: 14px; }
.panel-heading h2, .section-heading h2 { color: #1a304d; font-size: .94rem; }
.panel-heading p, .section-heading p { color: #74839a; font-size: .72rem; }
.panel-heading a { font-size: .7rem; }

.metric-grid { gap: 12px; margin-bottom: 16px; }
.metric {
    min-height: 116px;
    padding: 16px;
    border-top: 3px solid #62B9EA;
}
.metric:nth-child(2) { border-top-color: #8b5cf6; }
.metric:nth-child(3) { border-top-color: #f59e0b; }
.metric:nth-child(4) { border-top-color: #15a67a; }
.metric > span { color: #6b7b92; font-size: .7rem; }
.metric strong { color: #152944; font-size: 1.55rem; font-variant-numeric: tabular-nums; }
.metric small { font-size: .68rem; }
.metric.featured {
    border-top-color: #62B9EA;
    background: linear-gradient(140deg, #0e3b67, #092645 64%, #071d35);
}
.metric.featured strong { color: #bfdbfe; }

.filters {
    gap: 9px;
    margin: -2px -2px 14px;
    padding: 12px;
    border: 1px solid #dce5ef;
    border-radius: 10px;
    background: #f7f9fc;
}
.filters label, .form-grid label, .pos-layout label, .login-form label {
    gap: 5px;
    color: #586a82;
    font-size: .67rem;
    font-weight: 800;
}
input, select, textarea {
    min-height: 42px;
    border-color: #cbd8e6;
    border-radius: 7px;
    color: #172a45;
    background: #fff;
}
input:hover, select:hover, textarea:hover { border-color: #a9bdd5; }
input:focus, select:focus, textarea:focus {
    border-color: #347bed;
    box-shadow: 0 0 0 3px rgba(18, 102, 231, .11);
}

.table-wrap {
    border: 1px solid #e0e7f0;
    border-radius: 9px;
    background: #fff;
}
.table-wrap table { font-size: .76rem; }
.table-wrap th {
    padding: 9px 10px;
    color: #52667f;
    background: #f2f6fa;
    border-bottom-color: #dbe4ee;
    border-radius: 0 !important;
    font-size: .56rem;
    font-weight: 900;
    letter-spacing: .065em;
}
.table-wrap td { padding: 10px; border-bottom-color: #e8edf4; }
.table-wrap tbody tr:nth-child(even) { background: #fbfcfe; }
.table-wrap tbody tr:hover { background: #eef6ff; }
.table-wrap a { font-weight: 800; }
.badge { border-radius: 5px; font-size: .6rem; }

.current-session {
    border: 1px solid #165184;
    border-radius: 10px;
    background: linear-gradient(120deg, #0d3b67, #082746);
    box-shadow: 0 10px 22px rgba(7, 32, 60, .15);
}
.cart-line { border-radius: 9px; }
.notice, .flash { border-radius: 8px; }
.empty-state.spacious { border: 1px dashed #ccd9e7; border-radius: 9px; background: #f7f9fc; }

/* Dashboard de operación */
.operator-guide {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
    padding: 15px 17px;
    border: 1px solid #f0c36a;
    border-radius: 11px;
    background: #fff9e9;
}
.operator-guide.ready { border-color: #99d5b0; background: #effaf3; }
.operator-guide-status {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #805100;
    background: #ffe4a5;
    font-size: 1.15rem;
    font-weight: 900;
}
.operator-guide.ready .operator-guide-status { color: #126334; background: #ccefd8; }
.operator-guide-copy { min-width: 0; }
.operator-guide-copy small { color: #7b6a49; font-size: .57rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.operator-guide-copy h2 { margin: 2px 0 3px; color: #172a44; font-size: 1rem; }
.operator-guide-copy p { margin: 0; color: #65738a; font-size: .72rem; line-height: 1.45; }
.pos-quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}
.pos-quick-action {
    min-width: 0;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 88px;
    padding: 13px;
    border: 1px solid #d7e2ef;
    border-radius: 11px;
    color: #1a304d;
    background: #fff;
    box-shadow: 0 6px 18px rgba(17, 44, 82, .055);
    transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.pos-quick-action:hover {
    color: #3498DB;
    transform: translateY(-2px);
    border-color: #a8c9f7;
    box-shadow: 0 10px 22px rgba(17, 70, 135, .1);
}
.pos-quick-action-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    color: #3498DB;
    background: #eaf3ff;
}
.pos-quick-action-icon svg { width: 20px; height: 20px; }
.pos-quick-action-copy { min-width: 0; display: grid; gap: 2px; }
.pos-quick-action-copy small { color: #7c8ba0; font-size: .54rem; font-weight: 850; letter-spacing: .065em; text-transform: uppercase; }
.pos-quick-action-copy strong { color: inherit; font-size: .82rem; }
.pos-quick-action-copy > span { overflow: hidden; color: #74839a; font-size: .62rem; line-height: 1.35; text-overflow: ellipsis; }
.pos-quick-action-arrow { color: #9aacbf; font-size: 1rem; }
.pos-quick-action-primary {
    border-color: #1257be;
    color: #fff;
    background: linear-gradient(135deg, #3498DB, #2588C7);
    box-shadow: 0 10px 23px rgba(18, 102, 231, .21);
}
.pos-quick-action-primary:hover { color: #fff; border-color: #2176AD; }
.pos-quick-action-primary .pos-quick-action-icon { color: #fff; background: rgba(255,255,255,.15); }
.pos-quick-action-primary .pos-quick-action-copy small,
.pos-quick-action-primary .pos-quick-action-copy > span,
.pos-quick-action-primary .pos-quick-action-arrow { color: #cfe3ff; }

.cash-movement-plain-guide {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
    padding: 12px;
    border: 1px solid #d9e7f4;
    border-radius: 9px;
    color: #586a80;
    background: #f5f9fd;
    font-size: .72rem;
    line-height: 1.45;
}
.cash-movement-plain-guide p { margin: 0; }

.pos-workflow {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 0 0 12px;
    padding: 0;
    list-style: none;
}
.pos-workflow li {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 11px;
    border: 1px solid #d9e3ee;
    border-radius: 9px;
    color: #718096;
    background: #fff;
}
.pos-workflow li > b {
    width: 27px;
    height: 27px;
    flex: 0 0 27px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #60748d;
    background: #eaf0f6;
    font-size: .7rem;
}
.pos-workflow li > span { min-width: 0; display: grid; gap: 1px; }
.pos-workflow strong { color: inherit; font-size: .69rem; }
.pos-workflow small { overflow: hidden; font-size: .57rem; white-space: nowrap; text-overflow: ellipsis; }
.pos-workflow li.active { border-color: #3498DB; color: #155996; background: #edf7ff; }
.pos-workflow li.active > b { color: #fff; background: #3498DB; }
.pos-workflow li.complete { color: #277548; border-color: #a9d8ba; background: #f1faf4; }
.pos-workflow li.complete > b { color: #fff; background: #36a466; }

.help-operation-flow { display: grid; gap: 9px; margin-bottom: 16px; }
.help-operation-flow article {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 12px;
    padding: 13px 15px;
    border: 1px solid #dce6f0;
    border-radius: 10px;
    background: #fff;
}
.help-operation-flow article > b {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: #3498DB;
}
.help-operation-flow h2 { margin: 0 0 3px; color: #18304e; font-size: .88rem; }
.help-operation-flow p { margin: 0; color: #66778d; font-size: .72rem; line-height: 1.45; }
.help-checklist { display: grid; gap: 9px; margin: 0; padding-left: 20px; color: #52657c; font-size: .75rem; }
.help-checklist li::marker { color: #36a466; }
.help-definitions { display: grid; gap: 10px; margin: 0; }
.help-definitions div { padding-bottom: 9px; border-bottom: 1px solid #e8edf3; }
.help-definitions div:last-child { padding-bottom: 0; border-bottom: 0; }
.help-definitions dt { color: #203a5b; font-size: .73rem; font-weight: 850; }
.help-definitions dd { margin: 2px 0 0; color: #68798e; font-size: .69rem; line-height: 1.4; }

/* Pantallas densas de operación y reportes */
.cash-control-shell,
.cash-cut-shell,
.physical-people-report,
.daily-cut-shell,
.registration-shell { color: #14233b; }
.report-grid > a,
.registration-option,
.cash-history-card,
.cut-summary-card { border-radius: 10px; }
.registration-layout,
.cash-close-layout { gap: 14px; }
.registration-card,
.cash-close-card,
.cash-history-panel { border-radius: 11px; }

/* Acceso con identidad de terminal */
.guest-content {
    background:
        radial-gradient(circle at 12% 8%, rgba(96, 165, 250, .2), transparent 26rem),
        radial-gradient(circle at 92% 92%, rgba(18, 102, 231, .2), transparent 30rem),
        linear-gradient(145deg, #0b2949, #07192e 58%, #04101e);
}
.login-panel { border-radius: 16px; }
.login-copy { background: linear-gradient(145deg, rgba(8, 46, 82, .95), rgba(16, 99, 181, .9)), #082746; }
.login-form .button.primary { min-height: 46px; }

@media (max-width: 1180px) {
    .pos-quick-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .topbar-actions .system-status { display: none !important; }
}

@media (max-width: 760px) {
    body.app-shell:not(.pos-terminal):not(.projection-embedded):not(.person-edit-embedded) { display: block; }
    body.sidebar-open { overflow: hidden; }
    .operator-guide { grid-template-columns: 38px minmax(0, 1fr); padding: 13px; }
    .operator-guide-status { width: 36px; height: 36px; }
    .operator-guide > .button { grid-column: 1 / -1; width: 100%; }
    .pos-workflow { grid-template-columns: 1fr; }
    .pos-workflow li { display: none; }
    .pos-workflow li.active { display: flex; }
    .sidebar {
        width: min(286px, 86vw);
        padding: 18px 14px 16px;
        transform: translateX(-105%);
        transition: transform .2s ease;
        box-shadow: 18px 0 45px rgba(3, 17, 32, .28);
    }
    .sidebar.open { transform: translateX(0); }
    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 19;
        display: block;
        visibility: hidden;
        border: 0;
        opacity: 0;
        background: rgba(4, 17, 32, .5);
        transition: opacity .2s ease, visibility .2s ease;
    }
    body.sidebar-open .sidebar-backdrop { visibility: visible; opacity: 1; }
    .topbar:not(.pos-terminal-topbar) { height: 64px; padding: 0 13px; gap: 10px; }
    .menu-button {
        width: 38px;
        height: 38px;
        flex: 0 0 38px;
        display: grid;
        align-content: center;
        gap: 4px;
        padding: 9px;
        border: 1px solid #d8e2ee;
        border-radius: 8px;
        background: #fff;
    }
    .menu-button span { display: block; height: 2px; border-radius: 2px; background: #263b57; }
    .topbar-context { display: flex !important; flex: 1; }
    .topbar-section-icon { display: none; }
    .topbar-context small { display: none; }
    .topbar-context strong { font-size: .78rem; }
    .topbar-actions { display: flex !important; margin-left: auto !important; }
    .topbar-clock { display: none; }
    .topbar-sale-action { min-height: 36px !important; padding: 7px 10px !important; font-size: .68rem; }
    .content:not(.projection-embedded .content):not(.person-edit-embedded .content) { padding: 6px 6px 14px; }
    .page-header { min-height: 0; align-items: flex-start; gap: 13px; }
    .page-header h1 { font-size: 1.65rem; }
    .page-header p { font-size: .78rem; }
    .date-chip { align-self: flex-start; }
    .pos-quick-actions { grid-template-columns: 1fr; }
    .pos-quick-action { min-height: 76px; }
    .panel { padding: 14px; }
    .filters { margin-left: 0; margin-right: 0; }
    .actions { width: 100%; flex-wrap: wrap; }
    .actions .button { flex: 1; }
}

@media (max-width: 440px) {
    .topbar-sale-action { width: 38px; overflow: hidden; white-space: nowrap; color: transparent !important; gap: 0; }
    .topbar-sale-action span { color: #fff !important; }
    .metric-grid { grid-template-columns: 1fr; }
}

@media print {
    .sidebar-backdrop, .pos-quick-actions { display: none !important; }
}

/* POS LARGE TOUCH UI ------------------------------------------------------ */
@media screen {
    :root {
        --primary: #3498DB;
        --primary-dark: #2176AD;
        --pos-accent: #f59e0b;
        --pos-accent-dark: #d97706;
        --canvas: #eef2f6;
    }

    body { font-size: 16px; }

    body.app-shell:not(.pos-terminal):not(.projection-embedded):not(.person-edit-embedded) {
        grid-template: "sidebar topbar" 58px "sidebar content" 1fr / 232px 1fr;
    }

    .sidebar {
        width: 232px;
        padding: 20px 12px 16px;
        background:
            radial-gradient(circle at 15% 0, rgba(37, 99, 235, .35), transparent 16rem),
            linear-gradient(180deg, #123b73 0%, #0b2550 58%, #061a38 100%);
    }

    .sidebar .brand { min-height: 58px; padding: 0 9px 20px; }
    .sidebar .brand-mark {
        width: 46px;
        height: 46px;
        border-radius: 11px;
        background: linear-gradient(145deg, #2598EC, #3498DB);
        box-shadow: 0 10px 25px rgba(30, 64, 175, .4);
        font-size: 1rem;
    }
    .sidebar .brand strong { font-size: 1.08rem; }
    .sidebar .brand small { color: #9bb8c7; font-size: .76rem; }
    .nav-group { margin-bottom: 18px; }
    .nav-group-label { color: #7394a5; font-size: .65rem; padding-bottom: 8px; }
    .sidebar nav .nav-link {
        min-height: 48px;
        padding: 10px 11px;
        gap: 11px;
        border-radius: 9px;
        color: #c2d3dc;
        font-size: .9rem;
    }
    .nav-icon { width: 20px; height: 20px; flex-basis: 20px; color: #7f9fc3; }
    .sidebar nav .nav-link.active {
        color: #fff;
        background: linear-gradient(90deg, rgba(37, 99, 235, .92), rgba(29, 78, 216, .78));
        border-color: rgba(147, 197, 253, .34);
        box-shadow: inset 4px 0 #fbbf24, 0 7px 18px rgba(2, 18, 27, .2);
    }
    .nav-link:hover .nav-icon,
    .nav-link.active .nav-icon { color: #dbeafe; }
    .sidebar-user strong { font-size: .84rem; }
    .sidebar-user small, .sidebar-user .link-button { font-size: .7rem; }

    .topbar:not(.pos-terminal-topbar) {
        height: 58px;
        justify-content: flex-start;
        gap: 12px;
        padding: 0 16px;
        border-bottom: 1px solid #d8e0e8;
        box-shadow: 0 5px 18px rgba(14, 37, 54, .06);
    }
    .topbar-section-icon {
        width: 38px;
        height: 38px;
        border-color: #c7d7f5;
        color: #3498DB;
        background: #eff6ff;
    }
    .topbar-section-icon svg { width: 19px; height: 19px; }
    .topbar-context { flex: 1; gap: 9px; }
    .topbar-context small { font-size: .59rem; }
    .topbar-context strong { font-size: .87rem; }
    .topbar-actions { flex: 0 0 auto; gap: 11px; }
    .system-status { min-height: 31px; padding: 5px 9px; font-size: .67rem !important; }
    .topbar-clock { min-width: 82px; padding-right: 11px; }
    .topbar-clock small { font-size: .58rem; }
    .topbar-clock strong { font-size: .76rem; }
    .topbar-sale-action {
        min-height: 38px !important;
        padding: 8px 15px !important;
        border-color: #d58605 !important;
        background: linear-gradient(135deg, #ffb310, #e88904) !important;
        box-shadow: 0 8px 20px rgba(217, 119, 6, .27) !important;
        font-size: .8rem !important;
    }

    .content:not(.projection-embedded .content):not(.person-edit-embedded .content) {
        padding: 8px 8px 18px;
    }

    .page-header { min-height: 56px; margin-bottom: 12px; }
    .page-header h1 {
        margin: 5px 0 7px;
        font-size: clamp(2.15rem, 3vw, 2.75rem);
        line-height: 1;
    }
    .page-header p { font-size: 1rem; line-height: 1.45; }
    .eyebrow { color: #3498DB; font-size: .74rem; }
    .date-chip { padding: 11px 15px; font-size: .86rem; }

    .button {
        min-height: 48px;
        padding: 11px 18px;
        border-radius: 9px;
        font-size: .9rem;
    }
    .button.primary {
        background: linear-gradient(135deg, #2598EC, #2588C7);
        box-shadow: 0 8px 18px rgba(37, 99, 235, .22);
    }
    .button.primary:hover { background: linear-gradient(135deg, #3498DB, #2176AD); }
    .button.compact { min-height: 42px; font-size: .82rem; }

    .panel { padding: 22px; border-radius: 13px; }
    .panel-heading, .section-heading { margin-bottom: 18px; }
    .panel-heading h2, .section-heading h2 { font-size: 1.14rem; }
    .panel-heading p, .section-heading p { font-size: .84rem; }
    .panel-heading a { font-size: .82rem; }

    .metric { min-height: 138px; padding: 20px; border-top-width: 5px; }
    .metric > span { font-size: .84rem; }
    .metric strong { font-size: 2rem; }
    .metric small { font-size: .78rem; }

    .filters { gap: 12px; padding: 16px; border-radius: 11px; }
    .filters label, .form-grid label, .pos-layout label, .login-form label {
        gap: 7px;
        font-size: .8rem;
    }
    input, select, textarea {
        min-height: 48px;
        padding: 11px 13px;
        border-radius: 8px;
        font-size: .92rem;
    }
    .filters input, .filters select { min-height: 48px; }

    .table-wrap table { font-size: .88rem; }
    .table-wrap th { padding: 12px; font-size: .7rem; }
    .table-wrap td { padding: 13px 12px; }
    .table-subtitle { font-size: .78rem; }
    .badge { padding: 5px 9px; font-size: .72rem; }
    .notice, .flash { padding: 14px 16px; font-size: .92rem; }
    .alert-list small, .list-row small { font-size: .78rem; }

    .pos-quick-action { min-height: 105px; padding: 16px; }
    .pos-quick-action-icon { width: 44px; height: 44px; }
    .pos-quick-action-icon svg { width: 23px; height: 23px; }
    .pos-quick-action-copy small { font-size: .62rem; }
    .pos-quick-action-copy strong { font-size: .96rem; }
    .pos-quick-action-copy > span { font-size: .72rem; }
    .pos-quick-action-primary {
        border-color: #d58605;
        background: linear-gradient(135deg, #ffb310, #e88904);
        box-shadow: 0 11px 24px rgba(217, 119, 6, .24);
    }
    .pos-quick-action-primary:hover {
        border-color: #c46b04;
        background: linear-gradient(135deg, #f4a407, #d97706);
    }

    /* Ventanilla de venta: dimensiones de uso táctil */
    .pos-page-heading h1 { font-size: clamp(2rem, 3vw, 2.55rem); }
    .pos-page-heading p { font-size: .96rem; }
    .pos-searchbar input { min-height: 56px; font-size: 1.05rem; }
    .pos-filter-chips button { min-height: 40px; padding: 8px 15px; font-size: .82rem; }
    .pos-warehouse-select, .pos-customer-block label span { font-size: .8rem; }
    .pos-warehouse-select select { min-height: 42px; font-size: .84rem; }
    .pos-product-sku { font-size: .7rem; }
    .pos-product-info h3 { min-height: 40px; font-size: .9rem; }
    .pos-product-info > small { font-size: .72rem; }
    .pos-product-info > div strong { font-size: 1.18rem; }
    .pos-product-info > div span { font-size: .72rem; }
    .pos-product-card > button { min-height: 43px; font-size: .84rem; }
    .pos-product-grid {
        align-items: start;
        grid-auto-rows: max-content;
    }
    .pos-product-card {
        width: 100%;
        min-height: 310px;
        grid-template-rows: 108px minmax(140px, 1fr) 60px;
    }
    .pos-product-card > button {
        align-self: center;
        width: calc(100% - 24px);
        height: 44px;
        min-height: 44px;
        margin: 0 12px 12px;
        flex-shrink: 0;
    }
    .pos-filter-chips button.active {
        border-color: #3498DB;
        background: linear-gradient(135deg, #2598EC, #2588C7);
        box-shadow: 0 6px 14px rgba(37, 99, 235, .22);
    }
    .pos-cart-heading small { font-size: .74rem; }
    .pos-cart-heading strong { font-size: 1rem; }
    .pos-customer-block input, .pos-customer-block select { min-height: 43px; font-size: .84rem; }
    .pos-cart-product strong { font-size: .83rem; }
    .pos-cart-product small { font-size: .68rem; }
    .pos-cart-summary > div { font-size: .86rem; }
    .pos-cart-summary .total strong { font-size: 1.8rem; }

    /* Alta de persona */
    .registration-hero h1 { font-size: clamp(2.25rem, 3.5vw, 3rem); }
    .registration-hero p { font-size: 1rem; }
    .registration-hero-meta { font-size: .76rem; }
    .registration-progress-heading small { font-size: .7rem; }
    .registration-progress-heading strong { font-size: .94rem; }
    .registration-progress > a strong { font-size: .88rem; }
    .registration-progress > a small { font-size: .74rem; }
    .registration-section-heading h2 { font-size: 1.18rem; }
    .registration-section-heading p { font-size: .8rem; }
    .registration-grid label:not(.registration-segmented label) { font-size: .82rem; }
    .registration-grid label > small { font-size: .72rem; }
    .registration-group-title strong { font-size: .8rem; }
    .registration-group-title small { font-size: .74rem; }
    .registration-actions-copy strong { font-size: .9rem; }
    .registration-actions-copy small { font-size: .76rem; }

    /* Corte de caja: lectura financiera prioritaria */
    .cut-report-sheet {
        max-width: none;
        padding: 34px;
        border-radius: 14px;
        border-top: 7px solid #3498DB;
        box-shadow: 0 16px 45px rgba(12, 36, 54, .11);
    }
    .cut-report-sheet-header { padding-bottom: 26px; border-bottom: 3px solid #153b52; }
    .cut-report-brand > span {
        width: 58px;
        height: 58px;
        background: linear-gradient(145deg, #2598EC, #3498DB);
        font-size: 1.25rem;
    }
    .cut-report-brand strong { font-size: 1.42rem; }
    .cut-report-brand small, .cut-report-number small { font-size: .8rem; }
    .cut-report-number > strong { font-size: 1.85rem; }
    .cut-report-status { padding: 7px 12px; font-size: .78rem; }

    .cut-report-identity { gap: 14px; padding: 26px 0; }
    .cut-report-identity > div {
        min-height: 82px;
        padding: 16px 18px;
        border-left: 5px solid #93c5fd;
        background: #f5f9ff;
    }
    .cut-report-identity small,
    .cut-report-block-heading small,
    .cut-report-note small { font-size: .75rem; }
    .cut-report-identity strong { font-size: .96rem; }

    .cut-report-timeline {
        margin-bottom: 26px;
        padding: 21px 23px;
        border-radius: 11px;
        background: linear-gradient(110deg, #103b50, #2176AD);
    }
    .cut-report-step { width: 40px; height: 40px; flex-basis: 40px; background: #f59e0b; color: #2e2108; font-size: .78rem; }
    .cut-report-timeline small,
    .cut-report-timeline span:last-child { color: #bfdbfe; font-size: .77rem; }
    .cut-report-timeline strong { font-size: .92rem; }

    .cut-financial-section {
        margin-top: 24px;
        border-top: 6px solid #f59e0b;
        border-radius: 13px;
    }
    .cut-financial-heading,
    .cut-detail-heading {
        padding: 21px 22px;
        background: linear-gradient(90deg, #f7fafb, #eff6ff);
    }
    .cut-financial-heading small,
    .cut-detail-heading small { color: #3498DB; font-size: .72rem; }
    .cut-financial-heading h2,
    .cut-detail-heading h2 { margin-top: 5px; font-size: 1.35rem; }
    .cut-financial-heading p { max-width: 760px; font-size: .84rem; line-height: 1.45; }
    .cut-financial-heading > span,
    .cut-detail-heading > span { padding: 7px 11px; background: #dbeafe; color: #2176AD; font-size: .75rem; }

    .cut-instrument-cards {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 12px;
        padding: 20px 22px;
    }
    .cut-instrument-cards article {
        min-height: 100px;
        align-content: space-between;
        gap: 7px;
        padding: 16px;
        border-width: 2px;
        border-radius: 11px;
    }
    .cut-instrument-cards small { font-size: .78rem; }
    .cut-instrument-cards strong { font-size: 1.35rem; }
    .cut-instrument-cards span { font-size: .7rem; }
    .cut-financial-alert { margin: 0 22px 16px; padding: 13px 15px; font-size: .82rem; }

    .cut-table-wrap { padding: 0 22px 20px; }
    .cut-financial-matrix,
    .cut-detail-table {
        min-width: 1040px;
        font-size: .82rem;
    }
    .cut-financial-matrix { min-width: 0; table-layout: fixed; }
    .cut-detail-table { min-width: 1280px; }
    .cut-financial-matrix th,
    .cut-financial-matrix td { padding: 11px 7px; }
    .cut-financial-matrix tr > :first-child {
        width: 26%;
        white-space: normal;
    }
    .cut-financial-matrix thead th { white-space: normal; line-height: 1.25; }
    .cut-financial-matrix th,
    .cut-financial-matrix td,
    .cut-detail-table th,
    .cut-detail-table td { padding: 12px 13px; }
    .cut-financial-matrix thead th,
    .cut-detail-table thead th { font-size: .7rem; background: #e8eff4; }
    .cut-financial-rule,
    .cut-detail-intro { padding: 0 22px 20px; font-size: .82rem; }
    .cut-detail-intro { padding-top: 15px; }
    .cut-detail-table td small { font-size: .7rem; }
    .cut-sale-support td strong { font-size: .7rem; }
    .cut-sale-support td span { font-size: .74rem; }
    .cut-instrument-badge { font-size: .7rem; }

    .cut-report-columns { gap: 20px; margin-top: 24px; }
    .cut-report-block { border-radius: 12px; }
    .cut-report-block-heading { padding: 20px 22px; background: #f2f7f8; }
    .cut-report-block-heading h2 { font-size: 1.28rem; }
    .cut-report-block-heading > span { font-size: .78rem; }
    .cut-report-breakdown { padding: 10px 22px 18px; }
    .cut-report-breakdown > div { padding: 13px 0; }
    .cut-report-breakdown dt { font-size: .88rem; }
    .cut-report-breakdown dd { font-size: .94rem; }
    .cut-report-note p { font-size: .86rem; }

    /* Listados de corte, arqueo, crédito y proyección */
    .cash-metric span { font-size: .8rem; }
    .cash-metric strong { font-size: 1.4rem; }
    .cash-close-panel label { font-size: .84rem; }
    .cash-expected-amount { font-size: 1.5rem; }
    .cash-report-table { font-size: .84rem; }
    .daily-cut-primary-cards small { font-size: .78rem; }
    .daily-cut-primary-cards strong { font-size: 1.55rem; }
    .daily-cut-primary-cards span { font-size: .7rem; }
    .daily-cut-section-title small { font-size: .7rem; }
    .daily-cut-section-title h2 { font-size: 1.2rem; }
    .projection-form-grid label { font-size: .82rem; }
    .projection-form-grid input,
    .projection-form-grid select { font-size: .9rem; }
    .projection-sheet-header h2 { font-size: 1.55rem; }
    .projection-sheet-header p { font-size: .88rem; }
    .projection-kpis span { font-size: .78rem; }
    .projection-kpis strong { font-size: 1.25rem; }
    .projection-table { font-size: .82rem; }
}

@media screen and (max-width: 1180px) {
    .cut-instrument-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media screen and (max-width: 760px) {
    body { font-size: 15px; }
    .topbar:not(.pos-terminal-topbar) { height: 58px; }
    .content:not(.projection-embedded .content):not(.person-edit-embedded .content) { padding: 6px 6px 14px; }
    .page-header { min-height: 0; margin-bottom: 10px; }
    .page-header h1 { font-size: 2rem; }
    .page-header p { font-size: .9rem; }
    .topbar-sale-action { min-height: 40px !important; padding: 8px 12px !important; }
    .cut-report-sheet { padding: 20px; border-top-width: 5px; }
    .cut-report-identity { grid-template-columns: 1fr; }
    .cut-instrument-cards { grid-template-columns: 1fr; padding: 16px; }
    .cut-financial-heading, .cut-detail-heading { padding: 17px; }
    .cut-table-wrap { padding-inline: 16px; }
    .pos-product-card {
        min-height: 300px;
        grid-template-rows: 96px minmax(142px, 1fr) 60px;
    }
}

/* Directorio de personas: lectura rápida y edición desde modal. */
.directory-header { align-items: end; }
.directory-header > div { max-width: 760px; }
.directory-header p { margin: 5px 0 0; color: #62748d; }
.directory-eyebrow {
  display: block;
  margin-bottom: 4px;
  color: #2475bd;
  font-size: .69rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.directory-filter-panel { padding: 15px 17px; }
.directory-filters {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(140px, 180px) minmax(170px, 210px) auto;
  gap: 12px;
  align-items: end;
}
.directory-filters > label { display: grid; gap: 5px; color: #516780; font-size: .72rem; font-weight: 750; }
.directory-search-field > div { position: relative; }
.directory-search-field svg {
  position: absolute;
  top: 50%;
  left: 12px;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: #6e8199;
  stroke-width: 1.8;
  transform: translateY(-50%);
  pointer-events: none;
}
.directory-search-field input { width: 100%; padding-left: 39px; }
.directory-filter-actions { display: flex; gap: 7px; }
.directory-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px;
  margin: 13px 0;
}
.directory-summary-link {
  min-width: 0;
  color: inherit;
  text-decoration: none;
}
.directory-summary article {
  height: 100%;
  padding: 14px 16px;
  border: 1px solid #d9e3ee;
  border-radius: 13px;
  background: linear-gradient(145deg, #fff, #f7faff);
  box-shadow: 0 5px 16px rgba(26, 62, 99, .05);
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.directory-summary-link:hover article {
  border-color: #9dc8ec;
  box-shadow: 0 8px 20px rgba(26, 87, 145, .12);
  transform: translateY(-2px);
}
.directory-summary-link:focus-visible { outline: none; }
.directory-summary-link:focus-visible article {
  outline: 3px solid rgba(37, 136, 199, .25);
  outline-offset: 2px;
}
.directory-summary-link.active article {
  border-color: #2588c7;
  background: linear-gradient(145deg, #f7fcff, #eaf5fd);
  box-shadow: inset 4px 0 0 #2588c7, 0 6px 17px rgba(26, 87, 145, .1);
}
.directory-summary span,
.directory-summary small { display: block; color: #71829a; }
.directory-summary span { font-size: .7rem; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
.directory-summary strong { display: block; margin: 4px 0 1px; color: #183a63; font-size: 1.55rem; }
.directory-summary small { font-size: .68rem; }
.directory-results { padding: 0; overflow: hidden; }
.directory-results-heading { padding: 15px 17px 12px; }
.directory-results-heading form label { display: flex; align-items: center; gap: 7px; color: #65778d; font-size: .72rem; font-weight: 700; }
.directory-results-heading select { min-width: 75px; }
.directory-table-wrap { border-top: 1px solid #e1e8f0; }
.directory-table { min-width: 1060px; }
.directory-table th { color: #526a85; font-size: .66rem; letter-spacing: .045em; text-transform: uppercase; }
.directory-table td { vertical-align: middle; }
.directory-person { display: flex; align-items: center; gap: 10px; min-width: 245px; }
.directory-person > div,
.directory-contact { display: grid; gap: 2px; min-width: 0; }
.directory-person strong { color: #1a3b62; font-size: .81rem; }
.directory-person small,
.directory-contact small,
.directory-contact span { color: #7a899d; font-size: .66rem; }
.directory-avatar {
  display: grid;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 11px;
  background: #e4f1ff;
  color: #2276c3;
  font-size: .88rem;
  font-weight: 850;
}
.directory-contact { min-width: 170px; }
.directory-contact a { max-width: 220px; overflow: hidden; color: #245e96; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.directory-address { max-width: 260px; color: #51657d; font-size: .7rem; line-height: 1.4; }
.directory-address span { color: #8a98aa; }
.directory-tags { display: flex; flex-wrap: wrap; gap: 4px; max-width: 210px; }
.directory-tags span {
  padding: 3px 7px;
  border-radius: 999px;
  background: #edf3fa;
  color: #45617f;
  font-size: .61rem;
  font-weight: 750;
}
.directory-tags span.employee { background: #e7f7f1; color: #147158; }
.directory-tags span.user { background: #e9f2ff; color: #2467a7; }
.directory-tags small { color: #8492a4; font-size: .65rem; }
.directory-status { display: inline-flex; align-items: center; gap: 6px; font-size: .68rem; font-weight: 800; }
.directory-status i { width: 8px; height: 8px; border-radius: 50%; }
.directory-status.active { color: #137252; }
.directory-status.active i { background: #24b27d; box-shadow: 0 0 0 3px #def6ed; }
.directory-status.inactive { color: #8a5d5d; }
.directory-status.inactive i { background: #bd7777; box-shadow: 0 0 0 3px #f6e8e8; }
.directory-action-column { width: 105px; text-align: right; }
.directory-action-column .button svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.directory-readonly { color: #8794a6; font-size: .65rem; }
.directory-pagination { display: flex; align-items: center; justify-content: space-between; padding: 12px 17px; border-top: 1px solid #e2e9f1; }
.directory-pagination > span { color: #718198; font-size: .7rem; font-weight: 700; }
.directory-pagination > div { display: flex; gap: 7px; }

@media screen and (max-width: 1040px) {
  .directory-filters { grid-template-columns: minmax(280px, 1fr) repeat(2, minmax(140px, 180px)); }
  .directory-filter-actions { grid-column: 1 / -1; }
}

@media screen and (max-width: 760px) {
  .directory-header { align-items: stretch; }
  .directory-header .button { width: 100%; }
  .directory-filters { grid-template-columns: 1fr 1fr; }
  .directory-search-field { grid-column: 1 / -1; }
  .directory-filter-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .directory-summary { grid-template-columns: 1fr 1fr; }
  .directory-summary article { padding: 11px 12px; }
  .directory-summary strong { font-size: 1.25rem; }
  .directory-results-heading { align-items: end; }
  .directory-table-wrap { overflow: visible; }
  .directory-table { min-width: 0; }
  .directory-table thead { display: none; }
  .directory-table tbody,
  .directory-table tr,
  .directory-table td { display: block; width: 100%; }
  .directory-table tbody { display: grid; gap: 9px; padding: 10px; }
  .directory-table tr { padding: 12px; border: 1px solid #dce5ee; border-radius: 12px; background: #fff; }
  .directory-table td { display: grid; grid-template-columns: 78px 1fr; gap: 9px; padding: 7px 0; border: 0; border-bottom: 1px solid #edf1f5; }
  .directory-table td::before { content: attr(data-label); color: #8190a2; font-size: .62rem; font-weight: 800; text-transform: uppercase; }
  .directory-table td:first-child { grid-template-columns: 1fr; padding-top: 0; }
  .directory-table td:first-child::before { display: none; }
  .directory-table td:last-child { padding-bottom: 0; border-bottom: 0; }
  .directory-person,
  .directory-contact { min-width: 0; }
  .directory-address,
  .directory-tags { max-width: none; }
  .directory-action-column { text-align: left; }
  .directory-action-column .button { width: 100%; justify-content: center; }
}

/* REGISTRATION HORIZONTAL WORKFLOW --------------------------------------- */
@media screen {
    .registration-hero {
        min-height: 100px;
        padding: 14px 18px;
    }
    .registration-hero-main { gap: 15px; }
    .registration-hero-mark {
        width: 52px;
        height: 52px;
        border-radius: 14px;
    }
    .registration-hero-kicker { margin-bottom: 5px; font-size: .7rem; }
    .registration-hero h1 {
        margin: 0;
        font-size: clamp(1.9rem, 2.3vw, 2.25rem);
        line-height: 1.05;
    }

    .registration-form {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    .registration-progress {
        position: sticky;
        z-index: 10;
        top: 66px;
        display: grid;
        grid-template-columns: minmax(150px, .55fr) repeat(2, minmax(240px, 1fr)) minmax(170px, .62fr);
        align-items: center;
        gap: 8px;
        padding: 8px 10px;
        border-radius: 13px;
        background: rgba(255, 255, 255, .97);
        backdrop-filter: blur(12px) saturate(140%);
    }
    .registration-progress > div.registration-progress-heading {
        grid-column: auto;
        padding: 4px 16px 4px 4px;
        border-right: 1px solid #dce6f2;
        border-bottom: 0;
    }
    .registration-progress-heading small { font-size: .66rem; }
    .registration-progress-heading strong { font-size: .88rem; }
    .registration-progress > a {
        min-height: 56px;
        padding: 7px 10px;
    }
    .registration-progress > a:hover { transform: none; }
    .registration-progress > a strong { font-size: .84rem; }
    .registration-progress > a small { font-size: .72rem; }
    .registration-progress > a span {
        width: 40px;
        height: 40px;
    }
    .registration-required-note {
        margin: 0;
        padding: 4px 4px 4px 15px;
        border-top: 0;
        border-left: 1px dashed #d3deeb;
        font-size: .72rem;
    }
    .registration-content { width: 100%; gap: 18px; }
}

@media screen and (max-width: 1180px) {
    .registration-progress {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .registration-progress > div.registration-progress-heading {
        grid-column: 1 / -1;
        padding: 2px 4px 10px;
        border-right: 0;
        border-bottom: 1px solid #e5ecf5;
    }
    .registration-required-note { display: none; }
}

@media screen and (max-width: 760px) {
    .registration-hero { min-height: 0; padding: 20px 18px; }
    .registration-hero h1 { font-size: 1.8rem; }
    .registration-progress { position: static; grid-template-columns: 1fr; }
    .registration-progress > div.registration-progress-heading { grid-column: auto; }
    .registration-section { scroll-margin-top: 66px; }
}

.person-edit-embedded .registration-progress { top: 8px; }
.person-edit-embedded .registration-section { scroll-margin-top: 88px; }

/* COMPACT PERSON EDITOR -------------------------------------------------- */
.person-edit-dialog-header {
  min-height: 54px;
  padding: 7px 12px;
}
.person-edit-dialog-icon {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
  border-radius: 10px;
}
.person-edit-dialog-icon svg { width: 19px; height: 19px; }
.person-edit-dialog-heading { gap: 9px; }
.person-edit-dialog-heading small { margin-bottom: 1px; font-size: .57rem; font-weight: 650; }
.person-edit-dialog-heading strong { font-size: .88rem; font-weight: 650; }
.person-edit-dialog-close { width: 34px; height: 34px; font-size: 1.35rem; }

.person-edit-embedded .content { padding: 6px 8px 14px; }
.person-edit-embedded .registration-hero {
  min-height: 72px;
  margin-bottom: 6px;
  padding: 10px 14px;
  border-radius: 11px;
}
.person-edit-embedded .registration-hero-kicker { margin-bottom: 3px; font-size: .59rem; font-weight: 700; }
.person-edit-embedded .registration-hero h1 { font-size: 1.32rem; font-weight: 650; letter-spacing: -.025em; }
.person-edit-embedded .registration-hero .button { min-height: 36px; padding: 7px 12px; font-size: .74rem; font-weight: 650; }
.person-edit-embedded .registration-form { gap: 6px; }
.person-edit-embedded .registration-progress {
  top: 6px;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 11px;
}
.person-edit-embedded .registration-progress > div.registration-progress-heading { padding: 2px 10px 2px 2px; }
.person-edit-embedded .registration-progress-heading small { margin-bottom: 2px; font-size: .57rem; font-weight: 600; }
.person-edit-embedded .registration-progress-heading strong { font-size: .72rem; font-weight: 650; }
.person-edit-embedded .registration-progress > a { min-height: 44px; padding: 4px 8px; }
.person-edit-embedded .registration-progress > a span { width: 32px; height: 32px; border-radius: 9px; font-size: .61rem; font-weight: 700; }
.person-edit-embedded .registration-progress > a strong { font-size: .73rem; font-weight: 650; }
.person-edit-embedded .registration-progress > a small { font-size: .61rem; }
.person-edit-embedded .registration-required-note { padding-block: 2px; font-size: .62rem; }
.person-edit-embedded .registration-content { gap: 10px; }
.person-edit-embedded .registration-section { border-radius: 12px; }
.person-edit-embedded .registration-section-heading {
  gap: 10px;
  padding: 11px 14px;
  border-radius: 12px 12px 0 0;
}
.person-edit-embedded .registration-section-heading > span { width: 34px; height: 34px; border-radius: 9px; font-size: .64rem; font-weight: 700; }
.person-edit-embedded .registration-section-heading h2 { margin-bottom: 2px; font-size: .91rem; font-weight: 650; }
.person-edit-embedded .registration-section-heading p { font-size: .63rem; }
.person-edit-embedded .registration-section-tag { padding: 4px 7px; font-size: .54rem; font-weight: 650; }
.person-edit-embedded .registration-grid { gap: 13px 12px; padding: 14px 16px 18px; }
.person-edit-embedded .registration-grid label:not(.registration-segmented label),
.person-edit-embedded .registration-fieldset legend { gap: 5px; font-size: .67rem; font-weight: 600; }
.person-edit-embedded .registration-grid input,
.person-edit-embedded .registration-grid select { min-height: 40px; padding: 8px 10px; font-size: .82rem; font-weight: 550; }
.person-edit-embedded .registration-grid textarea { min-height: 78px; padding: 8px 10px; font-size: .82rem; font-weight: 500; }
.person-edit-embedded .registration-code { font-weight: 650; }
.person-edit-embedded .registration-segmented span { min-height: 40px; font-size: .68rem; font-weight: 650; }
.person-edit-embedded .registration-group-title { padding-top: 12px; }
.person-edit-embedded .registration-group-title strong { font-size: .63rem; font-weight: 700; }
.person-edit-embedded .registration-actions {
  bottom: 8px;
  padding: 10px 12px;
  border-radius: 11px;
}
.person-edit-embedded .registration-actions-copy strong { margin-bottom: 1px; font-size: .7rem; font-weight: 650; }
.person-edit-embedded .registration-actions-copy small { font-size: .6rem; }
.person-edit-embedded .registration-actions .button { min-height: 38px; padding: 7px 12px; font-size: .74rem; font-weight: 650; }

.registration-ine-capture {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: 13px 16px 0;
  padding: 12px 14px;
  border: 1px solid #bcdcf1;
  border-radius: 13px;
  background: linear-gradient(135deg, #f4fbff, #f5fbf8);
}
.registration-ine-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(145deg, #1379b4, #20a19a);
  color: #fff;
  box-shadow: 0 7px 18px rgba(15, 111, 158, .2);
}
.registration-ine-icon svg { width: 25px; height: 25px; }
.registration-ine-capture > div { display: grid; gap: 2px; min-width: 0; }
.registration-ine-capture strong { color: #173d61; font-size: .79rem; }
.registration-ine-capture small { color: #60758b; font-size: .67rem; }
.registration-ine-capture > div > span {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  color: #188269;
  font-size: .62rem;
  font-weight: 650;
}
.registration-ine-capture > div > span i {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #24a779;
  box-shadow: 0 0 0 3px rgba(36, 167, 121, .12);
}
.registration-ine-capture .button { min-height: 39px; white-space: nowrap; }
.ine-ocr-dialog {
  width: min(980px, calc(100vw - 24px));
  max-width: none;
  max-height: calc(100dvh - 24px);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 35px 100px rgba(3, 18, 38, .5);
}
.ine-ocr-dialog[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: min(720px, calc(100dvh - 24px));
}
.ine-ocr-dialog::backdrop { background: rgba(4, 18, 37, .74); backdrop-filter: blur(5px); }
.ine-ocr-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 17px;
  background: linear-gradient(120deg, #103a62, #177ead 55%, #1d968d);
  color: #fff;
}
.ine-ocr-header small { color: #cbe8ef; font-size: .61rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
.ine-ocr-header h2 { margin: 2px 0 0; color: #fff; font-size: 1.06rem; }
.ine-ocr-close {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .15);
  color: #fff;
  cursor: pointer;
  font-size: 1.35rem;
}
.ine-ocr-body {
  display: grid;
  grid-template-columns: minmax(300px, .88fr) minmax(360px, 1.12fr);
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}
.ine-ocr-source,
.ine-ocr-review { display: flex; min-width: 0; flex-direction: column; gap: 12px; padding: 16px; }
.ine-ocr-source { border-right: 1px solid #dde7f0; background: #f6f9fc; }
.ine-ocr-preview {
  position: relative;
  display: grid;
  min-height: 300px;
  overflow: hidden;
  place-items: center;
  border: 1px dashed #9cb8ce;
  border-radius: 13px;
  background: #e9f0f5;
}
.ine-ocr-preview img { width: 100%; height: 100%; max-height: 360px; object-fit: contain; background: #1a2733; }
.ine-ocr-preview > div { display: grid; max-width: 250px; justify-items: center; gap: 6px; padding: 25px; color: #526a82; text-align: center; }
.ine-ocr-preview > div svg { width: 54px; height: 54px; margin-bottom: 3px; color: #4288b2; }
.ine-ocr-preview > div strong { color: #274d6e; font-size: .78rem; }
.ine-ocr-preview > div small { font-size: .66rem; line-height: 1.5; }
.ine-ocr-source-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ine-ocr-source-actions .button { width: 100%; }
.ine-ocr-privacy {
  display: grid;
  gap: 2px;
  padding: 10px 11px;
  border: 1px solid #cce9dc;
  border-radius: 10px;
  background: #f0faf5;
}
.ine-ocr-privacy strong { color: #177459; font-size: .66rem; }
.ine-ocr-privacy span { color: #527367; font-size: .61rem; line-height: 1.45; }
.ine-ocr-state {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid #d9e5ef;
  border-radius: 11px;
  background: #f7fafc;
}
.ine-ocr-state-icon {
  display: grid;
  width: 37px;
  height: 37px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  background: #e1edf6;
  color: #1e6d9d;
  font-size: .62rem;
  font-weight: 800;
}
.ine-ocr-state > div { display: grid; gap: 2px; }
.ine-ocr-state strong { color: #244866; font-size: .74rem; }
.ine-ocr-state small { color: #667b8e; font-size: .63rem; line-height: 1.4; }
.ine-ocr-state.working { border-color: #b8d9ed; background: #f2f9fd; }
.ine-ocr-state.success { border-color: #b9e5d0; background: #f1faf6; }
.ine-ocr-state.success .ine-ocr-state-icon { background: #d9f3e5; color: #14724f; }
.ine-ocr-state.error { border-color: #efc8ce; background: #fff5f6; }
.ine-ocr-state.error .ine-ocr-state-icon { background: #f8dfe3; color: #b32d42; }
.ine-ocr-progress { height: 5px; overflow: hidden; border-radius: 99px; background: #e2eaf1; }
.ine-ocr-progress i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #218bc3, #23a87e); transition: width .18s ease; }
.ine-ocr-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ine-ocr-fields[hidden] { display: none; }
.ine-ocr-review-heading { display: grid; grid-column: 1 / -1; gap: 2px; padding: 2px 0 3px; }
.ine-ocr-review-heading strong { color: #1d4567; font-size: .77rem; }
.ine-ocr-review-heading small { color: #6b7e91; font-size: .62rem; }
.ine-ocr-fields label { display: grid; min-width: 0; gap: 5px; color: #455e76; font-size: .64rem; font-weight: 650; }
.ine-ocr-fields input,
.ine-ocr-fields textarea { width: 100%; min-height: 39px; border: 1px solid #c9d6e2; border-radius: 9px; padding: 8px 9px; background: #fff; color: #153854; font: inherit; font-size: .76rem; text-transform: uppercase; }
.ine-ocr-fields textarea { resize: vertical; }
.ine-ocr-fields .wide { grid-column: 1 / -1; }
.ine-ocr-derived { min-height: 29px; padding: 7px 9px; border-radius: 8px; background: #edf6fb; color: #3d6985; font-size: .62rem; }
.ine-ocr-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 11px 14px 14px;
  border-top: 1px solid #e1e9f0;
  background: #f8fafc;
}

.registration-address-workspace {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}
.registration-address-card {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
  padding: 15px;
  border: 1px solid #dbe5ef;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 7px 20px rgba(32, 63, 96, .055);
}
.registration-address-card-street { grid-column: 1 / -1; }
.registration-address-workspace-no-geolocation > .registration-address-card { grid-column: 1 / -1; }
.registration-address-card-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.registration-address-card-heading > span {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  background: #e4f1ff;
  color: #1478c7;
  font-size: .68rem;
  font-weight: 800;
}
.registration-address-card-heading > div { display: grid; gap: 2px; min-width: 0; }
.registration-address-card-heading strong { color: #173c61; font-size: .78rem; }
.registration-address-card-heading small { color: #647991; font-size: .64rem; line-height: 1.35; }
.registration-neighborhood-field { margin-top: 1px; }
.registration-location-picker {
  display: grid;
  gap: 11px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #dce8f4;
  border-radius: 11px;
  background: #f7faff;
}
.registration-location-toolbar {
  display: grid;
  grid-template-columns: minmax(150px, 220px) auto;
  align-items: end;
  gap: 9px;
}
.registration-location-toolbar .button { min-height: 40px; }
.registration-postal-field,
.registration-location-field { min-width: 0; }
.registration-location-field select {
  width: 100%;
  min-width: 0;
  text-overflow: ellipsis;
}
.registration-location-field small {
  min-height: 1.1em;
  color: #60728b;
  font-weight: 500;
}
.registration-location-fallback {
  padding-top: 2px;
  color: #526985;
  font-size: .7rem;
}
.registration-location-fallback summary {
  width: max-content;
  cursor: pointer;
  color: #1978bd;
  font-weight: 650;
}
.registration-location-fallback > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 9px;
}
.registration-location-fallback .button { min-height: 40px; }
.registration-geolocation {
  display: grid;
  gap: 11px;
  border-color: #cfe4df;
  background: linear-gradient(145deg, #fbfdff, #f3fbf8);
}
.registration-geolocation-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.registration-geolocation-heading .button { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; }
.registration-coordinate-paste { display: grid; gap: 6px; }
.registration-coordinate-paste > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
}
.registration-coordinate-paste .button { min-height: 40px; }
.registration-coordinate-paste > small { color: #657b90; font-size: .62rem; font-weight: 500; line-height: 1.35; }
.registration-geolocation-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #8191a3;
  font-size: .59rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.registration-geolocation-divider::before,
.registration-geolocation-divider::after { content: ""; height: 1px; flex: 1; background: #dce7e8; }
.registration-geolocation-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.registration-geolocation-fields input { width: 100%; }
.registration-geolocation-fields .registration-field-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.registration-geolocation-fields .registration-field-label small { color: #8393a6; font-size: .58rem; font-weight: 550; }
.registration-geolocation-summary {
  position: relative;
  min-height: 34px;
  padding: 9px 10px 9px 31px;
  border: 1px solid #dce8e6;
  border-radius: 9px;
  background: rgba(255, 255, 255, .82);
  color: #5c7184;
  font-size: .65rem;
  line-height: 1.35;
}
.registration-geolocation-summary::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 12px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9aabba;
  box-shadow: 0 0 0 4px #edf1f4;
}
.registration-geolocation[data-state="ready"] .registration-geolocation-summary { border-color: #bfe2d2; background: #f1faf6; color: #287257; }
.registration-geolocation[data-state="ready"] .registration-geolocation-summary::before { background: #27a774; box-shadow: 0 0 0 4px #dff3ea; }
.registration-geolocation[data-state="error"] .registration-geolocation-summary { border-color: #edc5c9; background: #fff5f5; color: #a43b49; }
.registration-geolocation[data-state="error"] .registration-geolocation-summary::before { background: #d8495d; box-shadow: 0 0 0 4px #f8dfe3; }
.geolocation-dialog {
  width: min(900px, calc(100vw - 24px));
  max-width: none;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 35px 100px rgba(3, 18, 38, .46);
}
.geolocation-dialog::backdrop { background: rgba(4, 18, 37, .72); backdrop-filter: blur(5px); }
.geolocation-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 17px;
  background: linear-gradient(120deg, #113b64, #268ec8);
  color: #fff;
}
.geolocation-dialog-header small { color: #c7e3f5; font-size: .61rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
.geolocation-dialog-header h2 { margin: 2px 0 0; color: #fff; font-size: 1.06rem; }
.geolocation-dialog-close {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .15);
  color: #fff;
  cursor: pointer;
  font-size: 1.35rem;
}
.geolocation-map { width: 100%; height: min(55vh, 520px); min-height: 340px; background: #e9f0f4; }
.geolocation-marker-icon {
  border: 0;
  background: transparent;
  cursor: grab;
  filter: drop-shadow(0 5px 5px rgba(8, 35, 68, .38));
}
.geolocation-marker-icon:active { cursor: grabbing; }
.geolocation-marker-icon svg { display: block; width: 44px; height: 54px; overflow: visible; }
.geolocation-marker-icon path { fill: #168bd1; stroke: #fff; stroke-width: 2.5; }
.geolocation-marker-icon circle { fill: #fff; stroke: #0b6fab; stroke-width: 2; }
.geolocation-dialog-status { min-height: 38px; padding: 10px 17px; border-top: 1px solid #e0e8f0; color: #536a82; font-size: .7rem; }
.geolocation-dialog-actions {
  display: grid;
  grid-template-columns: auto auto 1fr auto auto;
  gap: 8px;
  padding: 11px 14px 14px;
  border-top: 1px solid #e6edf4;
  background: #f8fafc;
}
.registration-step-actions { display: none; }

@media screen and (max-width: 1080px) {
  .registration-address-workspace { grid-template-columns: 1fr; }
  .registration-address-card-street { grid-column: auto; }
}

@media screen and (max-width: 760px) {
  .registration-ine-capture { grid-template-columns: auto 1fr; margin: 10px 10px 0; padding: 10px; }
  .registration-ine-capture .button { grid-column: 1 / -1; width: 100%; }
  .ine-ocr-dialog { width: calc(100vw - 8px); max-height: calc(100dvh - 8px); border-radius: 10px; }
  .ine-ocr-dialog[open] { height: calc(100dvh - 8px); }
  .ine-ocr-body { grid-template-columns: 1fr; }
  .ine-ocr-source { border-right: 0; border-bottom: 1px solid #dde7f0; }
  .ine-ocr-preview { min-height: 230px; }
  .ine-ocr-fields { grid-template-columns: 1fr; }
  .ine-ocr-actions { flex-wrap: wrap; }
  .ine-ocr-actions .button { min-width: 0; flex: 1 1 145px; white-space: normal; }
  .person-edit-dialog { width: calc(100vw - 4px); height: calc(100dvh - 4px); border-radius: 10px; }
  .person-edit-dialog-header { min-height: 50px; padding: 6px 8px; }
  .person-edit-embedded .content { padding: 4px; }
  .person-edit-embedded .registration-hero { gap: 9px; padding: 9px 11px; }
  .person-edit-embedded .registration-hero-side { grid-template-columns: 1fr; justify-items: stretch; gap: 7px; }
  .person-edit-embedded .registration-hero .actions { display: grid; grid-template-columns: 1fr 1fr; }
  .person-edit-embedded .registration-progress { grid-template-columns: 1fr; }
  .person-edit-embedded .registration-progress > div.registration-progress-heading { padding: 3px 5px 7px; }
  .person-edit-embedded .registration-section-heading { padding: 10px 11px; }
  .person-edit-embedded .registration-grid { padding: 12px 11px 15px; }
  .person-edit-embedded .registration-actions { bottom: 4px; }
  .registration-form { gap: 7px; }
  .registration-progress {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    padding: 6px;
  }
  .registration-progress > div.registration-progress-heading {
    grid-column: 1 / -1;
    padding: 3px 6px 5px;
  }
  .registration-progress > a { min-width: 0; padding: 5px 7px; }
  .registration-progress > a span { width: 30px; height: 30px; }
  .registration-progress > a strong { font-size: .68rem; font-weight: 620; }
  .registration-progress > a small { display: none; }
  .registration-section:not(.is-active) { display: none; }
  .registration-section-heading { gap: 9px; padding: 10px 11px; }
  .registration-section-heading > span { width: 34px; height: 34px; }
  .registration-section-heading h2 { font-size: .92rem; font-weight: 620; }
  .registration-section-heading p { font-size: .65rem; font-weight: 400; }
  .registration-grid,
  .person-edit-embedded .registration-grid { gap: 11px; padding: 11px 10px 13px; }
  .registration-grid label:not(.registration-segmented label),
  .registration-fieldset legend { font-size: .68rem; font-weight: 570; }
  .registration-grid input,
  .registration-grid select { min-height: 40px; font-size: .8rem; font-weight: 500; }
  .registration-address-workspace { gap: 9px; }
  .registration-address-card { gap: 10px; padding: 11px; border-radius: 11px; box-shadow: none; }
  .registration-address-card-heading > span { width: 28px; height: 28px; }
  .registration-location-picker { gap: 10px; padding: 10px; }
  .registration-location-toolbar { grid-template-columns: minmax(0, 1fr) auto; }
  .registration-location-fallback > div { grid-template-columns: 1fr; }
  .registration-location-fallback .button { width: 100%; }
  .registration-geolocation-heading { align-items: stretch; flex-direction: column; }
  .registration-geolocation-heading .button { justify-content: center; width: 100%; }
  .registration-coordinate-paste > div { grid-template-columns: 1fr; }
  .registration-coordinate-paste .button { width: 100%; }
  .registration-geolocation-fields { grid-template-columns: 1fr; }
  .geolocation-dialog { width: calc(100vw - 8px); }
  .geolocation-map { height: 50dvh; min-height: 280px; }
  .geolocation-dialog-actions { grid-template-columns: 1fr 1fr; }
  .geolocation-dialog-actions > span { display: none; }
  .geolocation-dialog-actions .button { width: 100%; }
  .registration-step-actions {
    display: flex;
    justify-content: flex-end;
    padding: 0 10px 12px;
  }
  .registration-step-actions .button { width: 100%; min-height: 42px; }
  .registration-step-actions-back { justify-content: flex-start; }
  .registration-form[data-active-section="registration-general"] .registration-actions { display: none; }
}

/* SINGLE VISIBLE SCREEN TITLE ------------------------------------------ */
@media screen {
  body.app-shell:not(.projection-embedded):not(.person-edit-embedded) .page-header {
    min-height: 0;
    justify-content: flex-end;
    margin-bottom: 8px;
  }
  body.app-shell:not(.projection-embedded):not(.person-edit-embedded) .page-header > :first-child:has(> h1) {
    display: none;
  }
  body.app-shell:not(.projection-embedded):not(.person-edit-embedded) .page-header:not(:has(> :nth-child(2))) {
    display: none;
  }

  body.app-shell:not(.person-edit-embedded) .registration-hero {
    min-height: 0;
    justify-content: flex-end;
    padding: 8px 10px;
  }
  body.app-shell:not(.person-edit-embedded) .registration-hero-main { display: none; }
  body.app-shell:not(.person-edit-embedded) .registration-hero-side {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .pos-terminal .pos-page-heading {
    min-height: 0;
    justify-content: flex-end;
    margin-bottom: 8px;
  }
  .pos-terminal .pos-page-heading > :first-child:has(> h1) { display: none; }
}

/* COLLAPSIBLE DESKTOP SIDEBAR -------------------------------------------- */
@media screen and (min-width: 761px) {
    body.app-shell:not(.pos-terminal):not(.projection-embedded):not(.person-edit-embedded) {
        grid-template-columns: 232px minmax(0, 1fr);
        transition: grid-template-columns .2s ease;
    }

    .menu-button {
        width: 42px;
        height: 42px;
        flex: 0 0 42px;
        display: grid;
        align-content: center;
        gap: 5px;
        padding: 10px;
        border: 1px solid #d5e1eb;
        border-radius: 9px;
        background: #fff;
        box-shadow: 0 3px 10px rgba(14, 37, 54, .05);
        transition: border-color .16s ease, background .16s ease, transform .16s ease;
    }
    .menu-button:hover {
        border-color: #bfdbfe;
        background: #f0f6ff;
        transform: translateY(-1px);
    }
    .menu-button span {
        display: block;
        height: 2px;
        border-radius: 2px;
        background: #244158;
        transition: width .18s ease, transform .18s ease;
    }
    .menu-button span:nth-child(2) { width: 70%; }

    .sidebar {
        transition: width .2s ease, padding .2s ease;
    }

    body.sidebar-collapsed.app-shell:not(.pos-terminal):not(.projection-embedded) {
        grid-template-columns: 78px minmax(0, 1fr);
    }
    body.sidebar-collapsed .sidebar {
        width: 78px;
        padding-inline: 10px;
    }
    body.sidebar-collapsed .sidebar .brand {
        justify-content: center;
        padding-inline: 0;
    }
    body.sidebar-collapsed .sidebar .brand > span:last-child,
    body.sidebar-collapsed .nav-group-label,
    body.sidebar-collapsed .nav-link-label,
    body.sidebar-collapsed .sidebar-user > div,
    body.sidebar-collapsed .sidebar-user form {
        display: none;
    }
    body.sidebar-collapsed .nav-group { margin-bottom: 10px; }
    body.sidebar-collapsed .sidebar nav .nav-link {
        justify-content: center;
        width: 52px;
        min-height: 48px;
        margin: 3px auto;
        padding: 10px;
    }
    body.sidebar-collapsed .sidebar nav .nav-link.active {
        box-shadow: inset 3px 0 #fbbf24, 0 7px 18px rgba(2, 18, 27, .2);
    }
    body.sidebar-collapsed .nav-icon {
        width: 22px;
        height: 22px;
        flex-basis: 22px;
    }
    body.sidebar-collapsed .sidebar-user {
        display: flex;
        justify-content: center;
        padding-inline: 0;
    }
    body.sidebar-collapsed .sidebar-user .avatar {
        width: 38px;
        height: 38px;
    }
    body.sidebar-collapsed .menu-button span:nth-child(1) {
        width: 72%;
        transform: translateX(5px);
    }
    body.sidebar-collapsed .menu-button span:nth-child(2) { width: 100%; }
    body.sidebar-collapsed .menu-button span:nth-child(3) {
        width: 72%;
        transform: translateX(5px);
    }
}

/* INVENTORY OPERATIONS --------------------------------------------------- */
body.inventory-modal-open { overflow: hidden; }
.inventory-page-header { align-items: flex-end; gap: 24px; }
.inventory-header-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.inventory-header-actions .button { white-space: nowrap; }
.inventory-topbar-product-action,
.customers-topbar-registration-action { flex: 0 0 auto; gap: 5px; margin: 0 12px 0 auto; white-space: nowrap; }
.inventory-quick-panel {
  display: grid;
  grid-template-columns: .7fr repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid #d5e2ee;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 9px 24px rgba(22, 49, 78, .06);
}
.inventory-quick-heading { display: grid; align-content: center; gap: 3px; padding: 8px 12px; }
.inventory-quick-heading span { color: #3498DB; font-size: .7rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.inventory-quick-heading small { color: #172f4d; font-size: .92rem; font-weight: 850; }
.inventory-quick-panel > button {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #d8e4ef;
  border-radius: 11px;
  background: #f8fbfd;
  color: #18314e;
  text-align: left;
}
.inventory-quick-panel > button:hover { border-color: #93c5fd; background: #eff6ff; transform: translateY(-1px); }
.inventory-quick-panel > button b { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 9px; background: #dbeafe; color: #3498DB; }
.inventory-quick-panel > button span,.inventory-quick-panel > button strong,.inventory-quick-panel > button small { display: block; min-width: 0; }
.inventory-quick-panel > button strong { font-size: .78rem; }
.inventory-quick-panel > button small { margin-top: 3px; overflow: hidden; color: #74869b; font-size: .67rem; text-overflow: ellipsis; white-space: nowrap; }
.inventory-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.inventory-kpi {
  position: relative;
  min-height: 134px;
  padding: 22px;
  overflow: hidden;
  border: 1px solid #d6e2ef;
  border-top: 4px solid #8b5cf6;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(20, 45, 75, .07);
}
.inventory-kpi::after {
  position: absolute;
  top: -42px;
  right: -32px;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: #f0f4ff;
  content: "";
}
.inventory-kpi > * { position: relative; z-index: 1; display: block; }
.inventory-kpi span { color: #667991; font-size: .78rem; font-weight: 800; }
.inventory-kpi strong { margin: 10px 0 4px; color: #152944; font-size: clamp(1.55rem, 2.2vw, 2.15rem); line-height: 1; }
.inventory-kpi small { color: #71839a; }
.inventory-kpi.primary { border-top-color: #62B9EA; background: linear-gradient(135deg, #0d4268, #082845); }
.inventory-kpi.primary::after { background: rgba(46, 181, 220, .14); }
.inventory-kpi.primary span,.inventory-kpi.primary small { color: #b8d7e8; }
.inventory-kpi.primary strong { color: #bfdbfe; }
.inventory-kpi.alert { border-top-color: #f59e0b; }
.inventory-kpi.alert::after { background: #fff5df; }
.inventory-kpi.value { border-top-color: #2598EC; }
.inventory-kpi.value::after { background: #eaf2ff; }

.inventory-filter-panel { margin-bottom: 18px; }
.inventory-filters {
  display: grid;
  grid-template-columns: minmax(260px, 1.6fr) minmax(180px, .7fr) minmax(160px, .6fr) minmax(80px, .25fr) auto auto;
  align-items: end;
  gap: 12px;
}
.inventory-filters label,.inventory-form-grid label,.inventory-dialog-body > label {
  display: grid;
  gap: 7px;
  color: #52677f;
  font-size: .78rem;
  font-weight: 800;
}
.inventory-filters input,.inventory-filters select,
.inventory-dialog input,.inventory-dialog select,.inventory-dialog textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 13px;
  border: 1px solid #cbd9e8;
  border-radius: 10px;
  outline: none;
  background: #fff;
  color: #182d49;
  font: inherit;
  font-size: .9rem;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.inventory-dialog textarea { min-height: 82px; resize: vertical; }
.inventory-filters input:focus,.inventory-filters select:focus,
.inventory-dialog input:focus,.inventory-dialog select:focus,.inventory-dialog textarea:focus {
  border-color: #2598EC;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .12);
}
.inventory-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}
.inventory-section-heading h2 { margin: 0 0 3px; color: #162b47; font-size: 1.18rem; }
.inventory-section-heading p { margin: 0; color: #73849a; }
.inventory-trigger-note {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #3498DB;
  font-size: .75rem;
  font-weight: 800;
}
.inventory-trigger-note::before { width: 8px; height: 8px; border-radius: 50%; background: #13b8a6; box-shadow: 0 0 0 4px #dcf8f3; content: ""; }
.inventory-stock-panel,.inventory-movements-panel { margin-bottom: 18px; }
.inventory-table-wrap { max-height: 600px; }
.inventory-table { min-width: 930px; }
.inventory-table thead th,.inventory-movement-wrap thead th { position: sticky; top: 0; z-index: 2; }
.inventory-table tbody tr:hover { background: #f4fbfc; }
.inventory-stock-value { color: #102d50; font-size: 1.05rem; }
.inventory-price-source { color: #3498DB; font-weight: 800; }
.inventory-price-source.specific { color: #d97706; }
.pos-warehouse-price { color: #d97706; font-size: .63rem; font-style: normal; font-weight: 900; text-transform: uppercase; }
.inventory-actions-column { width: 126px; text-align: center; }
.inventory-manage-button {
  padding: 8px 13px;
  border: 1px solid #bfdbfe;
  border-radius: 9px;
  background: #edfafa;
  color: #3498DB;
  font-size: .76rem;
  font-weight: 900;
}
.inventory-manage-button:hover { border-color: #3498DB; background: #3498DB; color: #fff; }
.inventory-row-actions { display: flex; justify-content: center; gap: 6px; }
.inventory-row-actions button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  padding: 0;
  border: 1px solid #cadbea;
  border-radius: 9px;
  background: #fff;
  color: #3498DB;
  font-size: 1rem;
  font-weight: 900;
}
.inventory-row-actions button:hover { border-color: #62B9EA; background: #eafafb; transform: translateY(-1px); }
.inventory-empty { display: grid; justify-items: center; gap: 5px; padding: 42px; color: #71849b; text-align: center; }
.inventory-empty strong { color: #253d59; }
.inventory-movement-wrap { max-height: 520px; }
.inventory-movement-wrap table { min-width: 1160px; }
.inventory-movement-canceled { opacity: .58; }
.inventory-movement-canceled td { text-decoration-color: #9aa8b8; }
.inventory-cancel-link { padding: 5px 8px; border: 0; background: none; color: #bc4949; font-weight: 800; }
.inventory-cancel-link:hover { text-decoration: underline; }
.inventory-movements-details > summary { cursor: pointer; list-style: none; }
.inventory-movements-details > summary::-webkit-details-marker { display: none; }
.inventory-movements-details:not([open]) > summary { margin-bottom: 0; }
.inventory-history-toggle { display: flex; align-items: center; gap: 10px; color: #3498DB; font-size: .78rem; }
.inventory-history-toggle i { font-size: 1.2rem; font-style: normal; transition: transform .18s ease; }
.inventory-movements-details[open] .inventory-history-toggle i { transform: rotate(180deg); }
.inventory-history-note { margin: -7px 0 14px; color: #78899d; font-size: .76rem; }

.inventory-dialog {
  width: min(820px, calc(100vw - 28px));
  max-width: none;
  max-height: calc(100dvh - 28px);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  background: #f4f7fb;
  color: #162b47;
  box-shadow: 0 38px 110px rgba(3, 18, 39, .5);
}
.inventory-dialog[open] { display: block; }
.inventory-dialog::backdrop { background: rgba(4, 18, 37, .72); backdrop-filter: blur(5px); }
.inventory-product-dialog { width: min(1480px, calc(100vw - 28px)); height: calc(100dvh - 28px); max-height: none; }
.inventory-small-dialog { width: min(590px, calc(100vw - 28px)); }
.inventory-manage-dialog { width: min(780px, calc(100vw - 28px)); }
.inventory-manage-shell { display: flex; flex-direction: column; max-height: calc(100dvh - 28px); }
.inventory-dialog > form { display: flex; flex-direction: column; width: 100%; max-height: calc(100dvh - 28px); }
.inventory-product-dialog > form { height: 100%; }
.inventory-dialog-header {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 24px;
  border-bottom: 1px solid #d8e3ef;
  background: #fff;
}
.inventory-dialog-header .eyebrow { margin-bottom: 4px; }
.inventory-dialog-header h2 { margin: 0; color: #152b48; font-size: 1.35rem; }
.inventory-dialog-header p { margin: 4px 0 0; color: #71839a; }
.inventory-dialog-header > button {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 11px;
  background: #edf2f7;
  color: #62758c;
  font-size: 1.6rem;
}
.inventory-dialog-header > button:hover { background: #dfe8f1; color: #173a61; }
.inventory-dialog-body { flex: 1 1 auto; min-height: 0; padding: 22px 24px; overflow: auto; }
.inventory-form-section { padding: 18px; border: 1px solid #d7e3ef; border-radius: 14px; background: #fff; }
.inventory-form-section + .inventory-form-section { margin-top: 14px; }
.inventory-form-section.highlighted { border-color: #bfdbfe; background: #f3fcfc; }
.inventory-form-section h3 { margin: 0 0 14px; color: #183552; font-size: .98rem; }
.inventory-form-section > p { margin: -8px 0 14px; color: #6d8198; font-size: .8rem; }
.inventory-form-grid { display: grid; gap: 14px; }
.inventory-form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.inventory-form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.inventory-form-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.inventory-form-grid .span-2 { grid-column: span 2; }
.inventory-quantity-hint { color: #3498DB; font-size: .69rem; font-weight: 750; }
.inventory-quantity-hint.error { color: #b42318; }
.inventory-quantity-hint[hidden] { display: none; }
.inventory-movement-target {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 16px;
  padding: 14px 16px;
  border: 1px solid #9fcbed;
  border-radius: 12px;
  background: #eef8ff;
}
.inventory-movement-target span {
  grid-column: 1 / -1;
  color: #2877aa;
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.inventory-movement-target strong { min-width: 0; color: #153b5c; overflow-wrap: anywhere; }
.inventory-movement-target small { align-self: center; color: #4f6f88; font-size: .72rem; font-weight: 750; text-align: right; }
.inventory-dialog input[aria-invalid="true"] { border-color: #d64545; box-shadow: 0 0 0 3px rgba(214, 69, 69, .1); }
.inventory-dialog [data-submit-enable]:disabled { border-color: #d5dee8; background: #edf2f6; color: #64758a; cursor: not-allowed; }
.inventory-dialog-footer .button[data-transfer-submit]:disabled { cursor: not-allowed; }
.inventory-price-toggle {
  display: flex !important;
  align-items: center;
  align-self: end;
  min-height: 46px;
  grid-template-columns: none !important;
  gap: 10px !important;
  padding: 10px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #f0fbfb;
  color: #274c77 !important;
  cursor: pointer;
}
.inventory-price-toggle input { width: 18px; min-height: 18px; height: 18px; flex: 0 0 18px; accent-color: #3498DB; }
[data-warehouse-price-field][hidden] { display: none !important; }
.inventory-price-default {
  display: grid;
  gap: 4px;
  margin-bottom: 18px;
  padding: 17px 18px;
  border: 1px solid #d5e2ef;
  border-radius: 12px;
  background: #fff;
}
.inventory-price-default span,.inventory-price-default small { color: #70839a; }
.inventory-price-default strong { color: #15324f; font-size: 1.6rem; }
.inventory-manage-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }
.inventory-manage-summary > div { display: grid; gap: 3px; padding: 15px; border: 1px solid #d7e3ee; border-radius: 11px; background: #fff; }
.inventory-manage-summary span,.inventory-manage-summary small { color: #74869b; font-size: .7rem; font-weight: 750; }
.inventory-manage-summary strong { color: #17314e; font-size: 1.25rem; }
.inventory-manage-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.inventory-manage-choices h3 { grid-column: 1 / -1; margin: 0 0 3px; color: #18324e; font-size: .95rem; }
.inventory-manage-choices [data-manage-open="product-edit"] { grid-column: 1 / -1; border-color: #bfdbfe; background: #f1fbfb; }
.inventory-manage-choices button {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 12px;
  padding: 15px;
  border: 1px solid #d5e2ee;
  border-radius: 11px;
  background: #fff;
  color: #193451;
  text-align: left;
}
.inventory-manage-choices button:hover { border-color: #93c5fd; background: #f0fbfb; }
.inventory-manage-choices button span { font-weight: 900; }
.inventory-manage-choices button small { grid-column: 1; color: #71849a; }
.inventory-manage-choices button b { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: #3498DB; font-size: .72rem; }
.inventory-form-notice { margin-top: 16px; padding: 12px 14px; border-left: 4px solid #2598EC; border-radius: 8px; background: #e9f9fa; color: #386474; font-size: .82rem; }
.inventory-form-notice.warning { border-left-color: #e39a22; background: #fff6e7; color: #76551d; }
.inventory-dialog-footer {
  display: flex;
  flex: 0 0 auto;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 24px;
  border-top: 1px solid #d8e3ef;
  background: #fff;
}
.inventory-dialog-footer .button.danger { border-color: #b64040; background: #b64040; color: #fff; }
.inventory-dialog-footer .button.danger:hover { background: #993535; }
.inventory-dialog-footer .button:disabled { cursor: wait; opacity: .65; }

@media screen and (max-width: 1180px) {
  .inventory-quick-panel { grid-template-columns: repeat(3, 1fr); }
  .inventory-quick-heading { grid-column: 1 / -1; }
  .inventory-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inventory-filters { grid-template-columns: 1fr 1fr; }
  .inventory-filters .search-field { grid-column: span 2; }
  .inventory-form-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media screen and (max-width: 760px) {
  .inventory-page-header { align-items: stretch; }
  .inventory-header-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .inventory-header-actions .button { justify-content: center; }
  .inventory-quick-panel { grid-template-columns: 1fr; }
  .inventory-quick-heading { grid-column: auto; }
  .inventory-kpis { grid-template-columns: 1fr; }
  .inventory-kpi { min-height: 110px; }
  .inventory-filters { display: grid; grid-template-columns: 1fr; }
  .inventory-filters .search-field { grid-column: auto; }
  .inventory-section-heading { align-items: flex-start; flex-direction: column; }
  .inventory-trigger-note { align-items: flex-start; }
  .inventory-dialog,.inventory-product-dialog { width: 100vw; height: 100dvh; max-height: none; border-radius: 0; }
  .inventory-dialog > form { height: 100%; max-height: none; }
  .inventory-dialog-header { padding: 16px; }
  .inventory-dialog-body { padding: 16px; }
  .inventory-dialog-footer { padding: 12px 16px; }
  .inventory-form-grid.two,.inventory-form-grid.three,.inventory-form-grid.four { grid-template-columns: 1fr; }
  .inventory-form-grid .span-2 { grid-column: auto; }
  .inventory-movement-target { grid-template-columns: 1fr; }
  .inventory-movement-target span { grid-column: auto; }
  .inventory-movement-target small { text-align: left; }
  .inventory-manage-summary,.inventory-manage-choices { grid-template-columns: 1fr; }
  .inventory-manage-choices h3 { grid-column: auto; }
}

/* CUSTOMER ELECTRONIC RECORD -------------------------------------------- */
.customer-actions-heading,
.customer-actions-cell { width: 260px; }
.customer-actions-cell { white-space: nowrap; }
.customer-actions-cell .button + .button { margin-left: 6px; }
.customer-record-button { display: inline-flex; gap: 7px; }
.customer-record-button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.customer-record-header { align-items: flex-end; }
.customer-record-search-panel { margin-bottom: 18px; padding: 18px 20px; }
.customer-record-search-panel .filters { margin: 0; }
.customer-record-layout {
  display: grid;
  grid-template-columns: minmax(270px, 330px) minmax(0, 1fr);
  align-items: start;
  gap: 18px;
}
.customer-record-directory {
  position: sticky;
  top: 94px;
  padding: 0;
  overflow: hidden;
}
.record-panel-heading,
.record-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.record-panel-heading { align-items: center; padding: 18px 18px 13px; border-bottom: 1px solid #dbe5ef; }
.record-panel-heading .eyebrow,
.record-section-heading .eyebrow { margin-bottom: 3px; }
.record-panel-heading h2,
.record-section-heading h2 { margin: 0; color: #172e4c; font-size: 1.16rem; }
.record-section-heading p { margin: 4px 0 0; color: #71839b; }
.record-count {
  display: grid;
  min-width: 34px;
  height: 34px;
  place-items: center;
  padding: 0 9px;
  border-radius: 11px;
  background: #eaf2ff;
  color: #3498DB;
  font-size: .8rem;
  font-weight: 900;
}
.customer-record-list { max-height: calc(100dvh - 280px); min-height: 190px; overflow: auto; }
.customer-record-result {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  border-bottom: 1px solid #e4ebf2;
  color: #19324f;
  text-decoration: none;
  transition: background .16s ease, border-color .16s ease;
}
.customer-record-result:hover { background: #f2fafb; }
.customer-record-result.active { border-left: 4px solid #3498DB; background: #eff6ff; padding-left: 10px; }
.record-avatar {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #3498DB, #2598EC);
  color: #fff;
  font-size: .75rem;
  font-weight: 950;
  letter-spacing: .03em;
}
.record-avatar.large { width: 58px; height: 58px; border-radius: 17px; font-size: 1rem; }
.record-result-copy { min-width: 0; }
.record-result-copy strong,
.record-result-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.record-result-copy strong { font-size: .79rem; }
.record-result-copy small { margin-top: 3px; color: #74859a; font-size: .68rem; }
.record-result-arrow { color: #7990a7; font-size: 1.35rem; }
.record-empty { padding: 34px 18px; }
.customer-record-content { min-width: 0; }
.record-welcome {
  display: grid;
  min-height: 420px;
  place-content: center;
  justify-items: center;
  gap: 8px;
  padding: 50px;
  color: #71839a;
  text-align: center;
}
.record-welcome h2 { margin: 8px 0 0; color: #18314f; }
.record-welcome p { max-width: 540px; margin: 0; }
.record-welcome-icon {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border-radius: 20px;
  background: #eaf2ff;
  color: #3498DB;
  font-size: 2rem;
  font-weight: 900;
}
.record-welcome-points { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }
.record-welcome-points span { padding: 7px 11px; border-radius: 999px; background: #edf3f8; color: #476078; font-size: .72rem; font-weight: 800; }
.customer-record-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  margin-bottom: 8px;
  padding: 6px 8px;
  border-radius: 16px;
  background: linear-gradient(120deg, #10375b, #2588C7);
  box-shadow: 0 13px 30px rgba(16, 55, 91, .17);
  color: #fff;
}
.customer-record-identity { display: flex; align-items: center; gap: 9px; min-width: 0; }
.customer-record-identity .record-avatar { border: 1px solid rgba(255,255,255,.26); background: rgba(255,255,255,.15); }
.customer-record-identity .eyebrow { color: #bfdbfe; }
.customer-record-identity h2 { overflow: hidden; margin: 2px 0 3px; color: #fff; font-size: 1.45rem; text-overflow: ellipsis; white-space: nowrap; }
.customer-record-identity p { margin: 0; color: #c4dbe7; }
.customer-record-hero-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.customer-record-edit-action { border-color: rgba(255,255,255,.7); background: rgba(255,255,255,.96); color: #2176ad; box-shadow: 0 5px 14px rgba(9,65,104,.14); white-space: nowrap; }
.customer-record-edit-action:hover { border-color: #fff; background: #fff; color: #155f91; }
.customer-record-tags { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.customer-record-tags .badge { border: 1px solid rgba(255,255,255,.22); }
.customer-record-nav {
  position: sticky;
  top: 72px;
  z-index: 5;
  display: flex;
  gap: 5px;
  margin-bottom: 12px;
  padding: 7px;
  overflow-x: auto;
  border: 1px solid #d6e3ee;
  border-radius: 13px;
  background: rgba(255,255,255,.95);
  box-shadow: 0 7px 18px rgba(26,54,80,.07);
  backdrop-filter: blur(10px);
}
.customer-record-nav a { flex: 1 0 auto; padding: 9px 12px; border-radius: 9px; color: #35536e; font-size: .74rem; font-weight: 850; text-align: center; text-decoration: none; }
.customer-record-nav a:hover { background: #eff6ff; color: #3498DB; }
.record-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.record-metrics article { display: grid; gap: 4px; min-height: 110px; padding: 17px; border: 1px solid #d8e3ed; border-top: 4px solid #b9cce0; border-radius: 13px; background: #fff; }
.record-metrics article.primary { border-top-color: #3498DB; }
.record-metrics article.danger { border-top-color: #d15b5b; background: #fffafa; }
.record-metrics small { color: #708299; font-size: .69rem; font-weight: 850; }
.record-metrics strong { color: #172e4c; font-size: 1.42rem; }
.record-metrics span { align-self: end; color: #7a8ca0; font-size: .68rem; }
.record-metrics article.record-metric-action { padding: 0; overflow: hidden; transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.record-metric-action > button { display: grid; width: 100%; height: 100%; min-height: 106px; gap: 4px; padding: 17px; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.record-metric-action:hover { border-color: #d67a74; box-shadow: 0 8px 20px rgba(115,39,39,.09); transform: translateY(-1px); }
.record-metric-action:focus-within { outline: 3px solid rgba(11,150,162,.2); outline-offset: 2px; }
.record-metric-action > button:focus { outline: 0; }
.record-metric-action > button span { color: #a3433e; font-weight: 800; }

.overdue-breakdown-dialog { width: min(460px, calc(100vw - 24px)); max-width: none; padding: 0; overflow: hidden; border: 0; border-radius: 17px; background: #fff; color: #18314d; box-shadow: 0 30px 90px rgba(4,18,38,.38); }
.overdue-breakdown-dialog::backdrop { background: rgba(5,19,38,.64); backdrop-filter: blur(4px); }
.overdue-breakdown-dialog header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px 19px; border-bottom: 1px solid #e1e7ee; background: linear-gradient(180deg,#fff,#fbf6f6); }
.overdue-breakdown-dialog header small,.overdue-breakdown-dialog header strong { display: block; }
.overdue-breakdown-dialog header small { margin-bottom: 2px; color: #a0443e; font-size: .62rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.overdue-breakdown-dialog header strong { font-size: 1rem; }
.overdue-breakdown-dialog header button { width: 35px; height: 35px; padding: 0; border: 0; border-radius: 9px; background: #f3e9e8; color: #99433e; font-size: 1.45rem; line-height: 1; cursor: pointer; }
.overdue-breakdown-body { padding: 18px 20px; }
.overdue-breakdown-body > p { margin: 0 0 14px; color: #718297; font-size: .7rem; }
.overdue-breakdown-body dl { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 9px 18px; margin: 0; }
.overdue-breakdown-body dt { color: #667b91; font-size: .74rem; }
.overdue-breakdown-body dd { margin: 0; color: #243c57; font-size: .79rem; font-weight: 850; text-align: right; }
.overdue-breakdown-body .is-zero { color: #a7b2be; }
.overdue-breakdown-total { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-top: 16px; padding: 14px; border: 1px solid #efc5c1; border-radius: 11px; background: #fff5f4; }
.overdue-breakdown-total span { color: #98413c; font-size: .73rem; font-weight: 850; }
.overdue-breakdown-total strong { color: #b53d36; font-size: 1.25rem; }
.overdue-breakdown-dialog footer { display: flex; justify-content: flex-end; padding: 12px 19px; border-top: 1px solid #e2e8ef; background: #fafbfd; }
.record-section .sales-history-table { min-width: 1180px; }
.sales-history-table th:nth-child(3) { width: 30%; }
.sale-items-cell { min-width: 285px; white-space: normal; }
.sale-items-list,.sale-items-list details > div { display: grid; gap: 5px; }
.sale-items-list > span,.sale-items-list details > div > span { color: #405872; font-size: .7rem; line-height: 1.35; }
.sale-items-list span b { color: #3498DB; font-weight: 900; white-space: nowrap; }
.sale-items-list details { margin-top: 2px; }
.sale-items-list summary { width: fit-content; color: #2588C7; font-size: .66rem; font-weight: 850; cursor: pointer; }
.sale-items-list details > div { margin-top: 6px; padding: 7px 9px; border-left: 2px solid #bfdbfe; background: #f8fbff; }
.sale-items-empty { color: #97a5b5; font-size: .68rem; font-style: italic; }
.record-section { margin-bottom: 12px; padding: 22px; scroll-margin-top: 135px; }
.record-section-heading { margin-bottom: 18px; }
.record-data-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid #dbe5ef; border-radius: 12px; background: #dbe5ef; }
.record-data-grid > div { display: grid; align-content: start; gap: 5px; min-height: 82px; padding: 15px; background: #fff; }
.record-data-grid > div.wide { grid-column: span 2; }
.record-data-grid small { color: #74859a; font-size: .66rem; font-weight: 850; text-transform: uppercase; }
.record-data-grid strong { overflow-wrap: anywhere; color: #203955; font-size: .82rem; }
.credit-status-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.credit-status-grid article { padding: 16px; border: 1px solid #d9e4ee; border-radius: 12px; background: #f9fbfd; }
.credit-status-grid article.has-overdue { border-color: #ebc2bd; background: #fffafa; }
.credit-status-grid article > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.credit-status-grid article > div > strong { color: #16314e; font-size: 1.65rem; }
.credit-status-badges { display: flex; flex-wrap: wrap; gap: 5px; }
.credit-status-grid article > p { margin: -4px 0 13px; color: #a0443e; font-size: .67rem; font-weight: 800; line-height: 1.4; }
.credit-status-grid dl { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin: 0; }
.credit-status-grid dt { color: #74869a; font-size: .69rem; }
.credit-status-grid dd { margin: 0; color: #223b56; font-size: .75rem; font-weight: 850; }
.credit-status-grid .credit-status-balance { padding-bottom: 12px; border-bottom: 1px solid #dce5ed; }
.credit-status-breakdown { margin-top: 12px; }
.credit-status-grid article > .credit-status-breakdown { display: block; margin-bottom: 0; }
.credit-status-breakdown > strong { display: block; margin-bottom: 9px; color: #4d6379; font-size: .65rem; letter-spacing: .06em; text-transform: uppercase; }
.credit-status-breakdown .is-zero { color: #a2afbd; }
.credit-status-breakdown .credit-status-total { margin-top: 4px; padding-top: 9px; border-top: 1px solid #e7c9c5; color: #a53d37; font-weight: 900; }
.record-total-balance { display: grid; justify-items: end; color: #73859b; font-size: .68rem; font-weight: 800; }
.record-total-balance strong { margin-top: 2px; color: #17334f; font-size: 1.3rem; }
.record-section .table-wrap { max-height: 490px; }
.record-section table { min-width: 940px; }
.record-section thead th { position: sticky; top: 0; z-index: 2; }
.text-danger { color: #b84242 !important; font-weight: 900; }

@media screen and (max-width: 1280px) {
  .customer-record-layout { grid-template-columns: 270px minmax(0, 1fr); }
  .record-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .record-data-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media screen and (max-width: 920px) {
  .customer-record-layout { grid-template-columns: 1fr; }
  .customer-record-directory { position: static; }
  .customer-record-list { max-height: 280px; }
  .credit-status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media screen and (max-width: 620px) {
  .customer-record-header { align-items: stretch; }
  .customer-record-header .button { justify-content: center; }
  .customer-record-hero { align-items: flex-start; flex-direction: column; }
  .customer-record-hero-actions { width: 100%; justify-content: flex-start; }
  .customer-record-tags { justify-content: flex-start; }
  .customer-record-identity h2 { white-space: normal; }
  .record-metrics,.record-data-grid,.credit-status-grid { grid-template-columns: 1fr; }
  .record-data-grid > div.wide { grid-column: auto; }
  .record-section-heading { align-items: stretch; flex-direction: column; }
  .record-total-balance { justify-items: start; }
  .record-section { padding: 17px; }
  .customer-actions-heading,.customer-actions-cell { width: 230px; }
}

/* TABBED CUSTOMER RECORD ------------------------------------------------ */
.page-customer-records .content { max-width: 1840px; }
.page-customer-records .customer-record-search-panel {
  border-color: #d6e4ef;
  background: linear-gradient(135deg, #ffffff 0%, #f4fafc 100%);
  box-shadow: 0 9px 26px rgba(23, 54, 82, .06);
}
.page-customer-records .customer-record-directory {
  border-color: #d3e1ec;
  box-shadow: 0 10px 28px rgba(22, 55, 82, .08);
}
.customer-record-navigation {
  position: sticky;
  top: 72px;
  z-index: 6;
  margin: 0 0 14px;
  overflow: hidden;
  border: 1px solid #cbdbe7;
  border-radius: 16px;
  background: rgba(247, 250, 252, .97);
  box-shadow: 0 10px 25px rgba(19, 50, 78, .09);
  backdrop-filter: blur(12px);
}
.customer-record-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  margin: 0;
  padding: 8px;
}
.customer-record-tab {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 66px;
  padding: 10px 12px;
  overflow: hidden;
  border: 1px solid #dce6ee;
  border-radius: 12px;
  background: rgba(255,255,255,.88);
  color: #405a72;
  text-align: left;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}
.customer-record-tab:hover {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #3498DB;
  transform: translateY(-1px);
}
.customer-record-tab.active {
  border-color: #3498DB;
  background: linear-gradient(135deg, #3498DB 0%, #2598EC 100%);
  box-shadow: 0 8px 18px rgba(37, 99, 235, .22);
  color: #fff;
}
.customer-record-tab::after {
  position: absolute;
  right: 12px;
  bottom: 0;
  left: 12px;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: transparent;
  content: '';
}
.customer-record-tab.active::after { background: rgba(255,255,255,.8); }
.record-tab-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid #d6e7ee;
  border-radius: 11px;
  background: #f4f9fc;
  color: #3498DB;
}
.customer-record-tab.active .record-tab-icon { border-color: rgba(255,255,255,.25); background: rgba(255,255,255,.14); color: #fff; }
.record-tab-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.customer-record-tab > span:last-child { display: block; min-width: 0; }
.customer-record-tab strong,
.customer-record-tab small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.customer-record-tab strong { font-size: .76rem; line-height: 1.2; }
.customer-record-tab small { margin-top: 4px; color: #7a8ca0; font-size: .62rem; font-weight: 700; }
.customer-record-tab.active small { color: #dbeafe; }
.record-tab-panel[hidden] { display: none !important; }
.record-tab-panel.active { animation: record-panel-in .2s ease both; }
@keyframes record-panel-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}
.record-tab-panel {
  --record-accent: #3498DB;
  --record-soft: #eff6ff;
  min-height: 0;
  margin-bottom: 0;
  padding: 0 20px 20px;
  overflow: hidden;
  border: 1px solid #cbd9e5;
  border-top: 4px solid var(--record-accent);
  border-radius: 16px;
  background: #f5f8fb;
  box-shadow: 0 11px 28px rgba(21, 52, 79, .08);
  container-type: inline-size;
}
#datos-generales { --record-accent: #3498DB; --record-soft: #eff6ff; }
#creditos-estatus { --record-accent: #4979b8; --record-soft: #f0f4fb; }
#cartera-propia { --record-accent: #336d9d; --record-soft: #edf4f9; }
#ahorros { --record-accent: #17845f; --record-soft: #edf8f3; }
#historial-ventas { --record-accent: #8a6b34; --record-soft: #faf6ed; }
.record-tab-panel .record-section-heading {
  margin: 0 -20px 18px;
  padding: 17px 20px;
  border-bottom: 1px solid #d7e2ea;
  background: linear-gradient(90deg, var(--record-soft) 0%, #fff 68%);
  box-shadow: 0 4px 12px rgba(23, 54, 80, .035);
}
.record-tab-panel .record-section-heading .eyebrow { color: var(--record-accent); }
.record-tab-panel { scroll-margin-top: 205px; }
.record-tab-panel .table-wrap { border-color: #cbd9e4; background: #fff; }
.record-tab-panel .customer-info-section {
  padding: 14px;
  border: 1px solid #d6e1e9;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(25, 55, 80, .035);
}
.record-overview {
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid #d0dde7;
  border-radius: 16px;
  background: #f1f5f8;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}
.record-overview .record-metrics { margin-bottom: 0; }
.page-customer-records .record-metrics article {
  position: relative;
  overflow: hidden;
  box-shadow: 0 7px 18px rgba(25, 56, 84, .05);
}
.page-customer-records .record-metrics article::after {
  position: absolute;
  right: -24px;
  top: -28px;
  width: 75px;
  height: 75px;
  border-radius: 50%;
  background: rgba(37, 99, 235, .07);
  content: '';
}
.page-customer-records .record-metrics article.danger::after { background: rgba(184, 66, 66, .08); }

@media screen and (max-width: 1000px) {
  .customer-record-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media screen and (max-width: 760px) {
  .customer-record-navigation { position: static; }
  .customer-record-tabs {
    display: flex;
    padding: 7px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
  }
  .customer-record-tab { flex: 0 0 min(260px, 82vw); scroll-snap-align: start; }
  .record-tab-panel { min-height: 300px; padding: 0 14px 14px; scroll-margin-top: 82px; }
  .record-tab-panel .record-section-heading { margin-inline: -14px; padding-inline: 14px; }
}

/* FULL-WIDTH RECORD AND CREDIT MOVEMENTS -------------------------------- */
.customer-record-layout.has-record { grid-template-columns: minmax(0, 1fr); }
.customer-record-layout.has-record .customer-record-content { width: 100%; }
.record-search-compact { padding: 13px 16px; }
.record-search-compact .filters { grid-template-columns: minmax(280px, 1fr) auto auto; }
.credit-movement-workspace {
  display: grid;
  grid-template-columns: minmax(250px, 300px) minmax(0, 1fr);
  gap: 14px;
  min-height: 0;
  padding: 12px;
  border: 1px solid #d5e0e8;
  border-radius: 15px;
  background: #edf2f6;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}
.credit-account-list {
  align-self: start;
  max-height: none;
  overflow: visible;
  border: 1px solid #d5e2ed;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 5px 14px rgba(27, 57, 81, .045);
}
.credit-account-list-heading {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 14px;
  border-bottom: 1px solid #d8e4ee;
  background: rgba(255,255,255,.97);
  color: #18324f;
  font-size: .78rem;
}
.credit-account-list-heading span {
  display: grid;
  min-width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 9px;
  background: #eaf2ff;
  color: #3498DB;
  font-size: .7rem;
  font-weight: 900;
}
.credit-account-card {
  position: relative;
  display: grid;
  gap: 7px;
  padding: 14px;
  border-bottom: 1px solid #dde7ef;
  color: #203955;
  text-decoration: none;
  transition: background .16s ease, border-color .16s ease;
}
.credit-account-card:last-child { border-bottom: 0; }
.credit-account-card:hover { background: #edf9fa; }
.credit-account-card.active {
  padding-left: 11px;
  border-left: 4px solid #3498DB;
  background: #eff6ff;
}
.credit-account-card.active::after {
  position: absolute;
  right: 12px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-top: 2px solid #3498DB;
  border-right: 2px solid #3498DB;
  content: '';
  transform: translateY(-50%) rotate(45deg);
}
.credit-account-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-right: 15px; }
.credit-account-top > strong { color: #183653; font-size: .8rem; }
.credit-account-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.credit-account-product { overflow: hidden; color: #526a80; font-size: .73rem; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.credit-account-meta { color: #8090a2; font-size: .65rem; }
.credit-account-amounts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 3px; }
.credit-account-amounts small { display: grid; gap: 2px; color: #78899c; font-size: .62rem; }
.credit-account-amounts b { color: #1e3955; font-size: .75rem; }
.credit-movement-detail {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #d4e2ed;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(27, 57, 81, .05);
}
.credit-movement-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 18px;
  border-bottom: 1px solid #dce6ef;
  background: linear-gradient(135deg, #f9fcfe, #f1f9fa);
}
.credit-movement-heading h3 { margin: 2px 0 3px; color: #173451; font-size: 1.08rem; }
.credit-movement-heading p { margin: 0; color: #73859a; font-size: .73rem; }
.credit-movement-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; border-bottom: 1px solid #dbe5ee; background: #dbe5ee; }
.credit-movement-summary > div { display: grid; gap: 4px; padding: 13px 15px; background: #fff; }
.credit-movement-summary > div.primary { background: #effafa; }
.credit-movement-summary > div.danger { background: #fff3f2; }
.credit-movement-summary small { color: #78899d; font-size: .63rem; font-weight: 800; }
.credit-movement-summary strong { color: #173550; font-size: 1rem; }
.credit-movement-summary .primary strong { color: #3498DB; }
.credit-movement-summary .danger strong { color: #b84242; }
.credit-movement-table-wrap {
  max-height: none !important;
  overflow-x: auto;
  overflow-y: visible;
  border: 0;
  border-radius: 0;
}
.credit-movement-table { min-width: 760px !important; }
.credit-movement-table tfoot th {
  position: sticky;
  bottom: 0;
  z-index: 2;
  border-top: 2px solid #c9d8e4;
  background: #eaf0f5;
  color: #1d3853;
}
.movement-charge { color: #b34a4a; font-weight: 850; }
.movement-payment { color: #087f68; font-weight: 900; }
.credit-due-cell { min-width: 145px; }
.credit-overdue-days { display: inline-flex; align-items: baseline; gap: 4px; margin: 3px 0 0 5px; padding: 3px 7px; border: 1px solid transparent; border-radius: 999px; line-height: 1; white-space: nowrap; }
.credit-overdue-days strong { font-size: .78rem; line-height: 1; }
.credit-overdue-days small { font-size: .56rem; font-weight: 850; letter-spacing: .01em; text-transform: none; }
.credit-overdue-days.current { border-color: #bce3d3; background: #edf9f3; color: #08794f; }
.credit-overdue-days.warning { border-color: #f1d28a; background: #fff8df; color: #966300; }
.credit-overdue-days.high { border-color: #efb1a9; background: #fff0ee; color: #b43b32; }
.credit-overdue-days.critical { border-color: #e8aaa6; background: #fff0ee; color: #ad302e; }
.credit-risk-row-critical > td:first-child { border-left: 3px solid #c94d4d; }
.credit-risk-row-high > td:first-child { border-left: 4px solid #df6d62; }
.savings-record-workspace {
  display: grid;
  grid-template-columns: minmax(270px, 320px) minmax(0, 1fr);
  gap: 14px;
  padding: 12px;
  border: 1px solid #d2e2da;
  border-radius: 15px;
  background: #edf5f1;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}
.savings-account-card.active { border-left-color: #078454; background: #edf9f3; }
.savings-account-card.active::after { border-color: #078454; }
.savings-movement-summary > div.primary { background: #edf9f3; }
.savings-movement-summary .primary strong { color: #078454; }
.savings-movement-table { min-width: 930px !important; }

/* SAVINGS ACCOUNT STATEMENT -------------------------------------------- */
@page savings-letter { size: letter portrait; margin: 0; }
.savings-statement-screen-header { max-width: 1050px; margin-inline: auto; }
.savings-statement-controls { max-width: 1050px; margin: 0 auto 16px; }
.savings-statement-controls form { display: flex; align-items: end; gap: 10px; }
.savings-statement-controls label { display: grid; gap: 5px; min-width: 180px; color: #4a6177; font-size: .68rem; font-weight: 850; }
.savings-statement-controls input { height: 40px; }
.savings-statement-stage { display: flex; justify-content: center; }
.savings-statement-sheet {
  page: savings-letter;
  display: flex;
  width: 8.5in;
  max-width: 100%;
  min-height: 11in;
  padding: .48in;
  flex-direction: column;
  background: #fff;
  color: #162b3d;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 10.5px;
  box-shadow: 0 16px 42px rgba(18,43,65,.17);
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.savings-statement-document-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 12px; border-bottom: 3px solid #3498DB; }
.savings-statement-document-header > div { display: flex; align-items: center; gap: 10px; }
.savings-statement-document-header > div:last-child { display: grid; justify-items: end; gap: 2px; text-align: right; }
.savings-statement-document-header strong,.savings-statement-document-header small,.savings-statement-document-header span { display: block; }
.savings-statement-document-header > div:last-child span { color: #3498DB; font-size: 9px; font-weight: 900; letter-spacing: .14em; }
.savings-statement-document-header > div:last-child strong { color: #173a55; font-size: 19px; letter-spacing: .04em; }
.savings-statement-document-header small { color: #697b8d; }
.savings-statement-brand { display: grid !important; width: 42px; height: 42px; place-items: center; border-radius: 10px; background: #3498DB; color: #fff; font-size: 15px; font-weight: 950; }
.savings-statement-account-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-top: 13px; border: 1px solid #d4e1e9; background: #d4e1e9; }
.savings-statement-account-grid > div { display: grid; gap: 3px; padding: 9px 10px; background: #f8fbfc; }
.savings-statement-account-grid > div.wide { grid-column: span 2; }
.savings-statement-account-grid small { color: #6f8191; font-size: 7.5px; font-weight: 900; letter-spacing: .08em; }
.savings-statement-account-grid strong { color: #183850; font-size: 10.5px; }
.savings-statement-account-grid span { color: #758594; font-size: 8.5px; }
.savings-statement-balances { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 13px 0; }
.savings-statement-balances > div { display: grid; gap: 4px; padding: 10px 11px; border: 1px solid #d6e2e9; border-radius: 7px; background: #f8fafc; }
.savings-statement-balances small { color: #667b8c; font-size: 8px; font-weight: 850; }
.savings-statement-balances strong { color: #183850; font-size: 14px; }
.savings-statement-balances .deposit { background: #edf9f3; }.savings-statement-balances .deposit strong { color: #08794f; }
.savings-statement-balances .charge { background: #fff5f4; }.savings-statement-balances .charge strong { color: #ad4242; }
.savings-statement-balances .closing { border-color: #93c5fd; background: #eff6ff; }.savings-statement-balances .closing strong { color: #3498DB; }
.credit-statement-document-header { border-bottom-color: #336d9d; }
.credit-statement-document-header .savings-statement-brand { background: #336d9d; }
.credit-statement-document-header > div:last-child span { color: #336d9d; }
.credit-statement-balances {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  margin: 13px 0;
}
.credit-statement-balances > div {
  display: grid;
  gap: 4px;
  padding: 9px 10px;
  border: 1px solid #d6e2e9;
  border-radius: 7px;
  background: #f8fafc;
}
.credit-statement-balances small { color: #667b8c; font-size: 7.5px; font-weight: 850; }
.credit-statement-balances strong { color: #183850; font-size: 13px; }
.credit-statement-balances .charge { background: #fff6f3; }.credit-statement-balances .charge strong { color: #a84b3e; }
.credit-statement-balances .payment { background: #edf8f3; }.credit-statement-balances .payment strong { color: #08794f; }
.credit-statement-balances .concepts { background: #f4f2fb; }.credit-statement-balances .concepts strong { color: #65549a; }
.credit-statement-balances .closing { border-color: #9dbbd4; background: #edf4f9; }.credit-statement-balances .closing strong { color: #285f8d; }
.savings-statement-document-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.savings-statement-document-table th { padding: 7px 6px; border-bottom: 2px solid #264b65; background: #eaf2f5; color: #29485f; font-size: 7.5px; letter-spacing: .04em; text-align: left; }
.savings-statement-document-table td { padding: 7px 6px; border-bottom: 1px solid #dfe6eb; color: #2b4052; vertical-align: top; }
.savings-statement-document-table th:nth-child(1) { width: 12%; }.savings-statement-document-table th:nth-child(2) { width: 13%; }.savings-statement-document-table th:nth-child(3) { width: 36%; }
.savings-statement-document-table td small { display: block; margin-top: 2px; color: #758595; font-size: 7.5px; }
.savings-statement-document-table .number { text-align: right; white-space: nowrap; }.savings-statement-document-table td.deposit { color: #08794f; font-weight: 800; }.savings-statement-document-table td.charge { color: #ad4242; font-weight: 800; }
.credit-statement-document-table { font-size: 8.5px; }
.credit-statement-document-table th { padding-inline: 4px; font-size: 6.8px; }
.credit-statement-document-table td { padding: 6px 4px; }
.credit-statement-document-table th:nth-child(1) { width: 9%; }
.credit-statement-document-table th:nth-child(2) { width: 9%; }
.credit-statement-document-table th:nth-child(3) { width: 25%; }
.credit-statement-document-table th:nth-child(4),
.credit-statement-document-table th:nth-child(5),
.credit-statement-document-table th:nth-child(6),
.credit-statement-document-table th:nth-child(7),
.credit-statement-document-table th:nth-child(8) { width: 11.4%; }
.credit-statement-document-table tfoot th {
  padding: 7px 4px;
  border-top: 2px solid #335f7e;
  background: #eaf1f5;
  color: #213f57;
}
.savings-statement-document-footer { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-top: auto; padding-top: 15px; border-top: 1px solid #bccbd5; color: #6c7c89; }
.savings-statement-document-footer > div { display: grid; gap: 3px; }.savings-statement-document-footer > div:last-child { justify-items: end; text-align: right; }.savings-statement-document-footer strong { color: #344f62; }

@media screen and (max-width: 900px) {
  .savings-record-workspace { grid-template-columns: 1fr; }
  .savings-statement-controls form { align-items: stretch; flex-direction: column; }
  .savings-statement-controls label { min-width: 0; }
  .savings-statement-sheet { min-width: 8.5in; }
  .savings-statement-stage { justify-content: flex-start; overflow-x: auto; }
}

@media print {
  body.app-shell.savings-statement-page { page: savings-letter; display: block !important; min-height: 0; margin: 0 !important; background: #fff !important; }
  .savings-statement-page .sidebar,.savings-statement-page .sidebar-backdrop,.savings-statement-page .topbar,.savings-statement-page .savings-statement-screen-header,.savings-statement-page .savings-statement-controls,.savings-statement-page .flash { display: none !important; }
  .savings-statement-page .content { display: block !important; min-height: 0 !important; padding: 0 !important; margin: 0 !important; }
  .savings-statement-page .savings-statement-stage { display: block; }
  .savings-statement-page .savings-statement-sheet { width: 8.5in; max-width: none; min-height: 11in; margin: 0; padding: .42in; box-shadow: none; }
  .savings-statement-document-table thead { display: table-header-group; }
  .savings-statement-document-table tr { break-inside: avoid; page-break-inside: avoid; }
  .savings-statement-document-footer { break-inside: avoid; page-break-inside: avoid; }
}

@container (max-width: 1040px) {
  .credit-movement-workspace,.savings-record-workspace { grid-template-columns: 1fr; }
  .credit-account-list {
    display: flex;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
  }
  .credit-account-list-heading {
    position: sticky;
    left: 0;
    flex: 0 0 90px;
    align-content: center;
    flex-direction: column;
  }
  .credit-account-card {
    flex: 0 0 280px;
    border-right: 1px solid #dde7ef;
    border-bottom: 0;
    scroll-snap-align: start;
  }
  .credit-account-card.active {
    padding-left: 14px;
    border-top: 4px solid #3498DB;
    border-left: 0;
  }
}

@media screen and (max-width: 1120px) {
  .credit-movement-workspace,.savings-record-workspace { grid-template-columns: 1fr; }
  .credit-account-list { display: flex; max-height: none; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; }
  .credit-account-list-heading { position: sticky; left: 0; flex: 0 0 90px; align-content: center; flex-direction: column; }
  .credit-account-card { flex: 0 0 280px; border-right: 1px solid #dde7ef; border-bottom: 0; scroll-snap-align: start; }
  .credit-account-card.active { padding-left: 14px; border-top: 4px solid #3498DB; border-left: 0; }
}
@media screen and (max-width: 700px) {
  .record-search-compact .filters { grid-template-columns: 1fr; }
  .credit-movement-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .credit-account-card { flex-basis: 250px; }
}

/* CREDIT COLLECTION WINDOW --------------------------------------------- */
.credit-collection-window {
  --credit-accent: #3498DB;
  --credit-accent-dark: #2176AD;
  --credit-accent-soft: #eff6ff;
}
.credit-collection-window .content.content { height: calc(100dvh - 58px); min-height: 0; padding: 8px 10px; overflow: hidden; background: linear-gradient(145deg,#edf4fa,#d9e7f2); }
.credit-collection-window .flash { position: fixed; z-index: 80; top: 82px; right: 24px; width: min(460px,calc(100vw - 48px)); }
.credit-window-backdrop { display: grid; height: 100%; min-height: 0; place-items: stretch center; }
.credit-window { display: flex; width: min(1020px,100%); height: 100%; min-height: 0; max-height: none; flex-direction: column; overflow: hidden; border: 1px solid #a9d4f0; border-radius: 15px; background: #fff; box-shadow: 0 18px 45px rgba(26,91,137,.2); }
.credit-window-header { display: flex; flex: 0 0 auto; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 12px 16px 11px; background: linear-gradient(110deg,var(--credit-accent-dark) 0%,var(--credit-accent) 72%,#62B9EA 125%); color: #fff; }
.credit-window-header h1 { margin: 0; color: #fff; font-size: 1.12rem; letter-spacing: -.02em; }
.credit-window-header p { margin: 4px 0 0; color: rgba(255,255,255,.9); font-size: .68rem; font-weight: 720; }
.credit-window-close { display: grid; width: 32px; height: 32px; flex: 0 0 32px; place-items: center; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; background: rgba(255,255,255,.16); color: #fff; font-size: 1.35rem; font-weight: 400; line-height: 1; text-decoration: none; }
.credit-window-close:hover { background: rgba(255,255,255,.28); }
.credit-window-notice { flex: 0 0 auto; margin: 8px 14px 0; padding: 9px 12px; font-size: .74rem; line-height: 1.45; }
.credit-window-form { display: flex; min-height: 0; flex: 1; flex-direction: column; overflow: hidden; }
.credit-window-body { display: grid; min-height: 0; flex: 1; grid-template-columns: 255px minmax(0,1fr); gap: 12px; padding: 10px 14px 12px; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.credit-window-summary { display: grid; align-content: start; gap: 7px; }
.credit-window-card { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid #d5e0ec; border-radius: 10px; background: #fff; }
.credit-window-card small,.credit-window-totals small { color: #465c78; font-size: .63rem; font-weight: 900; letter-spacing: .09em; }
.credit-window-card strong { color: #142f50; font-size: .94rem; }
.credit-window-card span { color: #52677f; font-size: .67rem; line-height: 1.4; }
.credit-window-person strong { font-size: 1rem; line-height: 1.28; }
.credit-window-totals { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.credit-window-totals article { display: grid; min-width: 0; gap: 5px; padding: 9px 9px; border: 1px solid #d5e0ec; border-radius: 9px; background: #fbfcfe; }
.credit-window-totals strong { color: #142f50; font-size: .9rem; overflow-wrap: anywhere; }
.credit-window-change { width: 100%; gap: 3px; padding: 11px 13px; border: 2px solid #c5d6ce; background: #f5f8f6; }
.credit-window-change small { color: #587267; font-size: .68rem; }
.credit-window-change strong { color: #547066; font-size: clamp(1.8rem,3vw,2.35rem); font-weight: 950; line-height: 1; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.credit-window-change span { margin-top: 5px; color: #61776e; font-size: .61rem; font-weight: 900; letter-spacing: .055em; }
.credit-window-change.has-change { border-color: #10a85f; background: linear-gradient(135deg,#eafff2,#c9f7dc); box-shadow: 0 10px 24px rgba(5,135,73,.18),inset 0 0 0 1px rgba(255,255,255,.8); }
.credit-window-change.has-change small { color: #087544; }
.credit-window-change.has-change strong { color: #008a49; text-shadow: 0 1px 0 #fff; }
.credit-window-change.has-change span { color: #066d3e; }
.credit-window-change.sent-to-savings { border-color: #078454; background: linear-gradient(135deg,#e6fff1,#baf0d1); }
.credit-window-account-meta { display: grid; gap: 5px; padding: 7px 4px 1px; }
.credit-window-account-meta span { display: flex; justify-content: space-between; gap: 12px; color: #66798f; font-size: .64rem; }
.credit-window-account-meta strong { color: #29425d; }
.credit-window-cash { display: flex; align-items: center; gap: 9px; padding: 8px 9px; border-radius: 9px; background: #edf9f5; }
.credit-window-cash i { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: #15986d; box-shadow: 0 0 0 4px rgba(21,152,109,.12); }
.credit-window-cash span,.credit-window-cash small,.credit-window-cash strong { display: block; }
.credit-window-cash small { color: #4a806f; font-size: .57rem; }
.credit-window-cash strong { margin-top: 2px; color: #17684d; font-size: .64rem; }
.credit-window-capture { display: grid; min-width: 0; align-content: start; gap: 8px; }
.credit-window-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.credit-window-grid label { display: grid; min-width: 0; align-content: start; gap: 6px; color: #122d4d; font-size: .75rem; font-weight: 850; }
.credit-window-grid input,.credit-window-grid select,.credit-window-grid textarea { width: 100%; margin: 0; border-color: #cbd9e8; border-radius: 9px; background: #fff; color: #0f2846; font-size: .76rem; }
.credit-window-grid input,.credit-window-grid select { height: 43px; }
.credit-window-grid textarea { min-height: 43px; resize: vertical; }
.credit-window-grid label > small { color: #536a84; font-size: .63rem; font-weight: 650; line-height: 1.55; }
.credit-window-amount > span { display: grid; grid-template-columns: 38px minmax(0,1fr); }
.credit-window-amount > span b { display: grid; place-items: center; border: 2px solid #93c5fd; border-right: 0; border-radius: 9px 0 0 9px; background: var(--credit-accent-soft); color: #2588C7; font-size: 1rem; }
.credit-window-amount > span input { border: 2px solid #93c5fd; border-left: 0; border-radius: 0 9px 9px 0; background: #effafa; font-size: 1.25rem; font-weight: 900; }
.credit-window-amount > span input.is-invalid { border-color: #e58a96; background: #fff5f6; color: #a61b2b; }
.credit-amount-feedback { display: grid; grid-template-columns: 28px minmax(190px,1fr) auto; align-items: center; gap: 9px; padding: 9px 10px; border: 1px solid #efbd75; border-radius: 10px; background: #fff8eb; }
.credit-amount-feedback[hidden] { display: none; }
.credit-amount-feedback > span { display: grid; width: 26px; height: 26px; place-items: center; border-radius: 50%; background: #d98308; color: #fff; font-size: .78rem; font-weight: 950; }
.credit-amount-feedback strong,.credit-amount-feedback small { display: block; }
.credit-amount-feedback strong { color: #7b4505; font-size: .68rem; }
.credit-amount-feedback small { margin-top: 2px; color: #8b6937; font-size: .58rem; }
.credit-amount-feedback-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.credit-amount-feedback-actions .button { min-height: 31px; padding: 6px 9px; font-size: .58rem; white-space: nowrap; }
.credit-amount-feedback-actions .button[hidden] { display: none; }
.credit-window-savings { display: grid; grid-template-columns: minmax(260px,1.2fr) minmax(230px,.8fr); align-items: center; gap: 8px 12px; padding: 9px 11px; border: 1px solid #9fd8bd; border-radius: 10px; background: #f1fbf6; }
.credit-window-savings[hidden] { display: none; }
.credit-window-savings.unavailable { border-color: #cbd9e4; background: #f5f8fa; }
.credit-window-savings.unavailable .credit-window-savings-toggle,
.credit-window-savings.unavailable .credit-window-savings-new-account { opacity: .68; }
.credit-window-savings-toggle { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.credit-window-savings-toggle input { width: 18px; height: 18px; flex: 0 0 18px; margin: 0; accent-color: #078454; }
.credit-window-savings-toggle span,.credit-window-savings-toggle strong,.credit-window-savings-toggle small { display: block; }
.credit-window-savings-toggle strong { color: #126343; font-size: .72rem; }
.credit-window-savings-toggle small { margin-top: 3px; color: #4c7a67; font-size: .6rem; line-height: 1.35; }
.credit-window-savings-account { display: grid; gap: 5px; color: #315f4d; font-size: .63rem; font-weight: 850; }
.credit-window-savings-account select { width: 100%; height: 40px; margin: 0; border-color: #a8d7c0; background: #fff; font-size: .67rem; }
.credit-window-savings-new-account { display: grid; gap: 3px; padding: 8px 10px; border-left: 3px solid #23a36d; }
.credit-window-savings-new-account small { color: #527463; font-size: .55rem; font-weight: 900; letter-spacing: .06em; }
.credit-window-savings-new-account strong { color: #126343; font-size: .83rem; }
.credit-window-savings-new-account span { color: #668173; font-size: .58rem; }
.credit-window-savings > small { grid-column: 1 / -1; color: #537b6a; font-size: .6rem; font-weight: 700; }
.credit-window-savings > small.error { color: #b42318; }
.credit-window-savings-empty { grid-column: 1 / -1; display: grid; gap: 3px; }
.credit-window-savings-empty strong { color: #3e6856; font-size: .7rem; }
.credit-window-savings-empty span { color: #668173; font-size: .61rem; }
.credit-backdate-authorization { display: grid; gap: 10px; padding: 12px; border: 1px solid #efc779; border-radius: 10px; background: #fff9ec; }
.credit-backdate-authorization[hidden] { display: none; }
.credit-backdate-heading { display: flex; align-items: center; gap: 10px; }
.credit-backdate-heading > span { display: grid; width: 27px; height: 27px; flex: 0 0 27px; place-items: center; border-radius: 50%; background: #d98608; color: #fff; font-weight: 950; }
.credit-backdate-heading strong,.credit-backdate-heading small { display: block; }
.credit-backdate-heading strong { color: #764406; font-size: .72rem; }
.credit-backdate-heading small { margin-top: 3px; color: #886a3b; font-size: .59rem; line-height: 1.4; }
.credit-backdate-fields { display: grid; grid-template-columns: minmax(180px,.8fr) minmax(240px,1.2fr) auto; align-items: end; gap: 9px; }
.credit-backdate-fields label { display: grid; gap: 5px; color: #63451c; font-size: .63rem; font-weight: 850; }
.credit-backdate-fields input { width: 100%; height: 40px; margin: 0; border-color: #dfbd7d; background: #fff; font-size: .7rem; text-transform: uppercase; }
.credit-backdate-fields p { grid-column: 2 / -1; margin: 0; color: #75572c; font-size: .65rem; line-height: 1.45; }
.credit-backdate-fields .button { min-height: 40px; white-space: nowrap; }
.credit-backdate-result { min-height: 15px; color: #816333; font-size: .61rem; font-weight: 750; }
.credit-backdate-result.success { color: #08794f; }
.credit-backdate-result.error { color: #b42318; }
.credit-window-projection { min-width: 0; margin-top: 2px; border-top: 1px solid #dbe5ef; }
.credit-window-projection-status { min-height: 27px; padding: 7px 9px 4px; color: #5f7289; font-size: .61rem; font-weight: 750; }
.credit-window-projection .table-wrap { border: 0; border-radius: 0; box-shadow: none; }
.credit-window-projection table { min-width: 650px; }
.credit-window-projection th { padding: 8px 9px; background: #f2f5f9; color: #435a75; font-size: .59rem; letter-spacing: .04em; text-transform: uppercase; }
.credit-window-projection td { padding: 10px 9px; color: #0e2948; font-size: .68rem; font-weight: 750; }
.credit-window-projection td:last-child { color: #2588C7; font-weight: 900; }
.credit-window-recent { display: flex; min-width: 0; align-items: center; gap: 8px; overflow-x: auto; padding: 5px 0 0; white-space: nowrap; }
.credit-window-recent > span { color: #63758a; font-size: .6rem; font-weight: 850; }
.credit-window-recent a { padding: 5px 8px; border-radius: 7px; background: #f0f5fa; color: #2f5276; font-size: .58rem; text-decoration: none; }
.credit-window-footer { position: relative; z-index: 4; display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 14px; border-top: 1px solid #d8e3ee; background: #fff; box-shadow: 0 -5px 14px rgba(16,43,62,.06); }
.credit-window-footer > span { color: #315575; font-size: .67rem; font-weight: 850; }
.credit-window-footer > span.error { color: #ad2435; }

/* CREDIT PAYMENT CONFIRMATION ----------------------------------------- */
.credit-payment-confirm { width: min(560px,calc(100vw - 28px)); max-height: calc(100dvh - 40px); padding: 0; overflow: auto; border: 0; border-radius: 16px; background: #fff; color: #142f50; box-shadow: 0 28px 80px rgba(4,20,41,.4); }
.credit-payment-confirm::backdrop { background: rgba(9,23,42,.7); backdrop-filter: blur(5px); }
.credit-payment-confirm > header { display: grid; grid-template-columns: 42px minmax(0,1fr) 32px; align-items: center; gap: 11px; padding: 16px 18px; border-bottom: 1px solid #dce6f0; background: linear-gradient(135deg,#f7fbff,#eef5ff); }
.credit-payment-confirm-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 12px; background: linear-gradient(145deg,#2598EC,#2588C7); color: #fff; font-size: 1.18rem; font-weight: 950; box-shadow: 0 8px 20px rgba(37,99,235,.24); }
.credit-payment-confirm header small { display: block; margin-bottom: 4px; color: #2588C7; font-size: .63rem; font-weight: 950; letter-spacing: .12em; }
.credit-payment-confirm header h2 { margin: 0; color: #122c4b; font-size: 1.18rem; letter-spacing: -.02em; }
.credit-payment-confirm header p { margin: 4px 0 0; color: #667a91; font-size: .72rem; }
.credit-payment-confirm header > button { display: grid; width: 34px; height: 34px; place-items: center; border: 0; border-radius: 10px; background: #e6eef7; color: #61758b; font-size: 1.35rem; line-height: 1; }
.credit-payment-confirm-body { display: grid; gap: 11px; padding: 16px 18px; }
.credit-payment-confirm-summary { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.credit-payment-confirm-summary article { display: grid; min-width: 0; gap: 4px; padding: 10px 11px; border: 1px solid #d9e4ef; border-radius: 10px; background: #f9fbfd; }
.credit-payment-confirm-summary article.amount { border-color: #bfdbfe; background: #effafa; }
.credit-payment-confirm-summary small,.credit-payment-confirm-reason small { color: #62778e; font-size: .6rem; font-weight: 950; letter-spacing: .085em; }
.credit-payment-confirm-summary strong { overflow-wrap: anywhere; color: #183652; font-size: .86rem; }
.credit-payment-confirm-summary .amount strong { color: #2588C7; font-size: 1.05rem; }
.credit-payment-confirm-reason { display: grid; grid-template-columns: 25px minmax(0,1fr); gap: 8px; padding: 11px 12px; border-left: 4px solid #e8a11a; border-radius: 10px; background: #fff8e9; }
.credit-payment-confirm-reason > span { color: #d28708; font-family: Georgia,serif; font-size: 1.7rem; line-height: 1; }
.credit-payment-confirm-reason p { margin: 5px 0 0; color: #694713; font-size: .77rem; font-weight: 720; line-height: 1.45; overflow-wrap: anywhere; }
.credit-payment-confirm-note { display: flex; align-items: flex-start; gap: 8px; padding: 9px 11px; border-radius: 9px; background: #edf8f5; color: #256655; }
.credit-payment-confirm-note > span { display: grid; width: 19px; height: 19px; flex: 0 0 19px; place-items: center; border-radius: 50%; background: #19856c; color: #fff; font-size: .7rem; font-weight: 900; }
.credit-payment-confirm-note p { margin: 1px 0 0; font-size: .69rem; line-height: 1.45; }
.credit-payment-confirm > footer { display: flex; justify-content: flex-end; gap: 9px; padding: 12px 18px 14px; border-top: 1px solid #e1e9f1; background: #fbfcfe; }
.credit-payment-confirm > footer .button { min-height: 39px; }

@media screen and (max-width: 560px) {
  .credit-payment-confirm > header { grid-template-columns: 42px minmax(0,1fr) 32px; padding: 16px; }
  .credit-payment-confirm-icon { width: 42px; height: 42px; border-radius: 12px; }
  .credit-payment-confirm-body { padding: 16px; }
  .credit-payment-confirm-summary { grid-template-columns: 1fr; }
  .credit-payment-confirm > footer { align-items: stretch; flex-direction: column-reverse; padding: 13px 16px 16px; }
  .credit-payment-confirm > footer .button { width: 100%; }
}
@media screen and (max-width: 700px) {
  .credit-amount-feedback { grid-template-columns: 28px minmax(0,1fr); }
  .credit-amount-feedback-actions { grid-column: 1 / -1; justify-content: stretch; }
  .credit-amount-feedback-actions .button { flex: 1 1 145px; }
}
.credit-window-footer > div { display: flex; gap: 9px; }
.credit-window-footer .button { min-height: 38px; }

.credits-collection-panel { scroll-margin-top: 90px; }
body.page-credits .content:not(.projection-embedded .content):not(.person-edit-embedded .content) { padding: 8px 8px 18px; }
.credits-collection-heading {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 18px;
  margin-bottom: 14px;
}
.credits-collection-heading > span { padding: 7px 10px; border-radius: 8px; background: #eff6ff; color: #3498DB; font-size: .68rem; font-weight: 900; }
.credits-topbar-counter-action { flex: 0 0 auto; margin: 0 12px 0 auto; }
.credits-filters { grid-template-columns: minmax(280px, 1fr) 190px auto auto; }
.credits-table-wrap table { width: 100%; min-width: 920px; table-layout: fixed; font-size: .78rem; }
.credits-table-wrap th { padding: 9px 8px; font-size: .64rem; line-height: 1.25; }
.credits-table-wrap td { padding: 9px 8px; }
.credits-table-wrap th:nth-child(1) { width: 78px; }
.credits-table-wrap th:nth-child(2) { width: 145px; }
.credits-table-wrap th:nth-child(3) { width: 140px; }
.credits-table-wrap th:nth-child(4) { width: 95px; }
.credits-table-wrap th:nth-child(5) { width: 112px; }
.credits-table-wrap th:nth-child(6) { width: 125px; }
.credits-table-wrap th:nth-child(7) { width: 110px; }
.credits-table-wrap th:nth-child(8) { width: 175px; }
.credits-table-wrap td.number { white-space: nowrap; }
.credit-sale-detail-link {
  display: block;
  margin-top: 3px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #55708a;
  font: inherit;
  font-size: .67rem;
  line-height: 1.25;
  text-align: left;
  text-decoration: underline dotted;
  text-underline-offset: 2px;
  cursor: pointer;
}
.credit-sale-detail-link:hover { color: #3498DB; }
.credits-collect-action { width: 175px; text-align: right; }
.credits-action-group { display: flex; justify-content: flex-end; align-items: center; gap: 5px; }
.credits-collect-action .button { min-width: 0; min-height: 36px; justify-content: center; padding: 7px 10px; font-size: .72rem; white-space: nowrap; }
.credit-movement-heading-actions { display: flex; align-items: center; gap: 9px; }

.credit-collect-header { align-items: flex-end; }
.credit-collect-identity {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
  padding: 16px 18px;
  border-radius: 13px;
  background: linear-gradient(120deg, #113a5b, #3498DB);
  box-shadow: 0 10px 26px rgba(12, 70, 88, .17);
  color: #fff;
}
.credit-collect-avatar { display: grid; width: 54px; height: 54px; place-items: center; border: 1px solid rgba(255,255,255,.25); border-radius: 15px; background: rgba(255,255,255,.14); font-weight: 950; }
.credit-collect-identity small { color: #bfdbfe; font-size: .62rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.credit-collect-identity h2 { margin: 2px 0; color: #fff; font-size: 1.2rem; }
.credit-collect-identity p { margin: 0; color: #dbeafe; font-size: .72rem; }
.credit-collect-notice { margin-bottom: 12px; }
.credit-collect-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(290px, 340px); align-items: start; gap: 14px; }
.credit-collect-main,.credit-collect-sidebar { min-width: 0; }
.credit-collect-sidebar { display: grid; gap: 14px; }
.credit-collect-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.credit-collect-metrics article { display: grid; gap: 5px; min-height: 112px; padding: 16px; border: 1px solid #d7e3ed; border-top: 4px solid #94adc3; border-radius: 12px; background: #fff; box-shadow: 0 7px 18px rgba(25,56,84,.05); }
.credit-collect-metrics article.due { border-top-color: #d9901c; background: #fffaf0; }
.credit-collect-metrics article.liquidation { border-top-color: #3498DB; background: #f5f9ff; }
.credit-collect-metrics small { color: #718399; font-size: .66rem; font-weight: 850; }
.credit-collect-metrics strong { color: #173451; font-size: 1.42rem; }
.credit-collect-metrics span { align-self: end; color: #8090a2; font-size: .65rem; }
.credit-payment-panel { padding: 0; overflow: hidden; }
.credit-payment-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px 20px; border-bottom: 1px solid #dce6ef; background: linear-gradient(135deg,#fff,#f5f9ff); }
.credit-payment-heading h2 { margin: 3px 0; color: #17324f; font-size: 1.12rem; }
.credit-payment-heading p { margin: 0; color: #72849a; font-size: .72rem; }
.credit-payment-heading > span { padding: 7px 10px; border-radius: 8px; background: #eaf2ff; color: #3498DB; font-size: .68rem; font-weight: 900; }
.credit-payment-panel form { padding: 18px 20px 20px; }
.credit-payment-modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 18px; padding: 0; border: 0; }
.credit-payment-modes legend { margin-bottom: 8px; color: #5c7087; font-size: .66rem; font-weight: 900; }
.credit-payment-modes label { position: relative; display: block; cursor: pointer; }
.credit-payment-modes label.disabled { opacity: .5; cursor: not-allowed; }
.credit-payment-modes input { position: absolute; opacity: 0; pointer-events: none; }
.credit-payment-modes label > span { display: grid; gap: 4px; min-height: 70px; padding: 13px 14px; border: 1px solid #d4e1ec; border-radius: 11px; background: #fff; transition: border-color .16s ease, background .16s ease, box-shadow .16s ease; }
.credit-payment-modes input:checked + span { border-color: #3498DB; background: #eff6ff; box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.credit-payment-modes strong { color: #193653; font-size: .8rem; }
.credit-payment-modes small { color: #75879b; font-size: .66rem; }
.credit-payment-fields { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 11px; }
.credit-payment-fields label { color: #5c7087; font-size: .67rem; font-weight: 850; }
.credit-payment-amount > span { display: grid; grid-template-columns: 38px 1fr; margin-top: 5px; }
.credit-payment-amount > span b { display: grid; place-items: center; border: 1px solid #bed4df; border-right: 0; border-radius: 8px 0 0 8px; background: #eff6ff; color: #3498DB; font-size: 1rem; }
.credit-payment-amount input { margin: 0; border-radius: 0 8px 8px 0; font-size: 1.08rem; font-weight: 900; }
.credit-payment-review { display: grid; grid-template-columns: 1fr 1fr auto; align-items: center; gap: 12px; margin: 18px -20px -20px; padding: 15px 20px; border-top: 1px solid #dce6ef; background: #f7fafc; }
.credit-payment-review > div { display: grid; gap: 3px; }
.credit-payment-review small { color: #75879b; font-size: .62rem; font-weight: 850; }
.credit-payment-review strong { color: #173550; font-size: 1rem; }
.credit-payment-review > div:first-child strong { color: #3498DB; }
.credit-account-summary dl,.credit-receipt-breakdown dl { margin: 0; }
.credit-account-summary dl > div { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid #e5ebf1; }
.credit-account-summary dt { color: #75869a; font-size: .69rem; }
.credit-account-summary dd { margin: 0; color: #1c3853; font-size: .73rem; font-weight: 900; }
.credit-cash-session { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 11px; border-radius: 10px; background: #edf9f5; }
.credit-cash-session > span { width: 9px; height: 9px; flex: 0 0 9px; border-radius: 50%; background: #15986d; box-shadow: 0 0 0 4px rgba(21,152,109,.12); }
.credit-cash-session small,.credit-cash-session strong,.credit-cash-session p { display: block; margin: 0; }
.credit-cash-session small { color: #48806d; font-size: .58rem; }
.credit-cash-session strong { color: #17684d; font-size: .73rem; }
.credit-cash-session p { color: #6b8a7e; font-size: .62rem; }
.credit-recent-payments { padding-bottom: 8px; }
.credit-recent-payments > a { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 -8px; padding: 10px 8px; border-bottom: 1px solid #e8edf2; color: #193551; text-decoration: none; }
.credit-recent-payments > a:hover { background: #f1fafb; }
.credit-recent-payments > a span,.credit-recent-payments > a strong,.credit-recent-payments > a small { display: block; }
.credit-recent-payments > a small { margin-top: 3px; color: #7a8b9e; font-size: .61rem; }
.credit-recent-payments > a b { color: #3498DB; font-size: .73rem; }

.credit-payment-receipt { max-width: 840px; margin: 0 auto; overflow: hidden; border: 1px solid #d5e1eb; border-radius: 15px; background: #fff; box-shadow: 0 18px 45px rgba(20,50,76,.11); color: #17324f; }
.credit-payment-receipt > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 24px 26px; border-bottom: 1px solid #dce6ee; background: linear-gradient(135deg,#f9fcfe,#f3f7ff); }
.credit-receipt-brand { display: flex; align-items: center; gap: 12px; }
.credit-receipt-brand > span { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 13px; background: linear-gradient(145deg,#2598EC,#3498DB); color: #fff; font-weight: 950; }
.credit-receipt-brand strong,.credit-receipt-brand small { display: block; }
.credit-receipt-brand strong { font-size: .9rem; }
.credit-receipt-brand small { max-width: 420px; margin-top: 3px; color: #74869a; font-size: .64rem; }
.credit-receipt-number { display: grid; justify-items: end; gap: 2px; }
.credit-receipt-number small { color: #3498DB; font-size: .6rem; font-weight: 900; text-transform: uppercase; }
.credit-receipt-number strong { font-size: 1.3rem; }
.credit-receipt-number span { color: #77899d; font-size: .67rem; }
.credit-receipt-customer { display: grid; grid-template-columns: 1.7fr .7fr 1fr; gap: 1px; padding: 1px 0; background: #dce5ed; }
.credit-receipt-customer > div { display: grid; gap: 3px; padding: 16px 20px; background: #fff; }
.credit-receipt-customer small,.credit-receipt-balance small { color: #75869a; font-size: .6rem; font-weight: 850; text-transform: uppercase; }
.credit-receipt-customer strong { font-size: .78rem; }
.credit-receipt-customer span { color: #7d8d9f; font-size: .64rem; }
.credit-receipt-total { display: grid; justify-items: center; gap: 3px; padding: 28px 20px; background: linear-gradient(135deg,#0f3857,#3498DB); color: #fff; text-align: center; }
.credit-receipt-total small { color: #bfdbfe; font-size: .65rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.credit-receipt-total strong { font-size: 2.25rem; }
.credit-receipt-total span { color: #dbeafe; font-size: .65rem; }
.credit-receipt-breakdown { padding: 22px 26px; }
.credit-receipt-breakdown h2 { margin: 0 0 12px; font-size: .9rem; }
.credit-receipt-breakdown dl > div { display: flex; justify-content: space-between; gap: 20px; padding: 8px 0; border-bottom: 1px solid #e7ecf1; }
.credit-receipt-breakdown dt { color: #6f8195; font-size: .71rem; }
.credit-receipt-breakdown dd { margin: 0; font-size: .74rem; font-weight: 850; }
.credit-receipt-breakdown dl > div.total { padding-top: 12px; border-bottom: 0; color: #3498DB; }
.credit-receipt-authorization { display: grid; gap: 4px; margin-top: 16px; padding: 13px 14px; border: 1px solid #efc779; border-radius: 9px; background: #fff9ec; }
.credit-receipt-savings { display: grid; gap: 4px; margin-top: 16px; padding: 13px 14px; border: 1px solid #9fd8bd; border-radius: 9px; background: #f1fbf6; }
.credit-receipt-savings small { color: #08794f; font-size: .57rem; font-weight: 900; letter-spacing: .06em; }
.credit-receipt-savings strong { color: #126343; font-size: .78rem; }
.credit-receipt-savings span { color: #537b6a; font-size: .62rem; }
.credit-receipt-authorization small { color: #9a6109; font-size: .57rem; font-weight: 900; letter-spacing: .06em; }
.credit-receipt-authorization strong { color: #6f4305; font-size: .75rem; }
.credit-receipt-authorization span,.credit-receipt-authorization p { margin: 0; color: #795d35; font-size: .62rem; line-height: 1.45; }
.credit-receipt-balance { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin: 0 26px 22px; padding: 15px; border: 1px solid #d8e5eb; border-radius: 10px; background: #f4fafb; }
.credit-receipt-balance > div { display: grid; gap: 4px; }
.credit-receipt-balance strong { font-size: .8rem; }
.credit-payment-receipt > footer { padding: 18px 26px 24px; border-top: 1px solid #e2e9ef; }
.credit-payment-receipt > footer p { margin: 0 0 34px; color: #718397; font-size: .66rem; text-align: center; }
.credit-payment-receipt > footer > div { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.credit-payment-receipt > footer span { padding-top: 7px; border-top: 1px solid #8fa0b0; color: #708195; font-size: .62rem; text-align: center; }

@media screen and (max-width: 1120px) {
  .credit-window { height: 100%; max-height: none; }
  .credit-window-body { grid-template-columns: 250px minmax(0,1fr); }
  .credit-collect-layout { grid-template-columns: 1fr; }
  .credit-collect-sidebar { grid-template-columns: 1fr 1fr; }
}
@media screen and (max-width: 760px) {
  .credit-collection-window .content.content { height: auto; min-height: 100dvh; padding: 0; overflow: visible; }
  .credit-window-backdrop { min-height: 100dvh; place-items: stretch; }
  .credit-window { width: 100%; max-height: none; min-height: 100dvh; border: 0; border-radius: 0; }
  .credit-window-header { padding: 17px 15px 15px; }
  .credit-window-header p { margin-top: 7px; }
  .credit-window-body { grid-template-columns: 1fr; padding: 12px; overflow: visible; }
  .credit-window-summary { grid-template-columns: 1fr 1fr; }
  .credit-window-person,.credit-window-account-meta,.credit-window-cash { grid-column: 1 / -1; }
  .credit-window-change { width: auto; }
  .credit-window-grid { grid-template-columns: 1fr; gap: 10px; }
  .credit-window-savings { grid-template-columns: 1fr; }
  .credit-backdate-fields { grid-template-columns: 1fr; }
  .credit-backdate-fields p { grid-column: auto; }
  .credit-window-footer { position: sticky; z-index: 4; bottom: 0; align-items: stretch; flex-direction: column; }
  .credit-window-footer > div { display: grid; grid-template-columns: 1fr 1fr; }
  .credit-collect-header { align-items: stretch; }
  .credit-collect-header .button { justify-content: center; }
  .credits-filters { grid-template-columns: 1fr; }
  .credit-movement-heading-actions { align-items: flex-end; flex-direction: column; }
  .credit-collect-metrics,.credit-payment-fields,.credit-collect-sidebar { grid-template-columns: 1fr; }
  .credit-payment-modes { grid-template-columns: 1fr; }
  .credit-payment-heading { align-items: stretch; flex-direction: column; }
  .credit-payment-review { grid-template-columns: 1fr 1fr; }
  .credit-payment-review .button { grid-column: 1 / -1; justify-content: center; }
  .credit-receipt-customer,.credit-receipt-balance { grid-template-columns: 1fr; }
  .credit-payment-receipt > header { flex-direction: column; }
  .credit-receipt-number { justify-items: start; }
}

@media print {
  .credit-payment-receipt { max-width: none; border: 0; box-shadow: none; }
}

/* TICKET PREVIEW MODAL --------------------------------------------------- */
body.ticket-dialog-open { overflow: hidden; }
.ticket-preview-dialog {
  width: min(760px, calc(100vw - 24px));
  max-width: none;
  height: calc(100dvh - 24px);
  max-height: none;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  background: #eef3f8;
  color: #18324f;
  box-shadow: 0 38px 110px rgba(4, 18, 37, .48);
}
.ticket-preview-dialog.ticket-preview-dialog-compact {
  width: min(680px, calc(100vw - 32px));
  height: min(680px, calc(100dvh - 48px));
}
.ticket-preview-dialog[open] { display: flex; flex-direction: column; }
.ticket-preview-dialog::backdrop { background: rgba(4, 18, 37, .72); backdrop-filter: blur(6px); }
.ticket-preview-header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 66px;
  padding: 10px 14px 10px 18px;
  border-bottom: 1px solid #d7e2ec;
  background: linear-gradient(180deg, #fff, #f8fbfd);
}
.ticket-preview-heading { display: flex; align-items: center; gap: 11px; min-width: 0; }
.ticket-preview-heading > div { min-width: 0; }
.ticket-preview-heading small,
.ticket-preview-heading strong { display: block; }
.ticket-preview-heading small { margin-bottom: 2px; color: #3498DB; font-size: .63rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.ticket-preview-heading strong { overflow: hidden; color: #17324f; font-size: 1rem; text-overflow: ellipsis; white-space: nowrap; }
.ticket-preview-icon {
  display: grid;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 11px;
  background: #eaf2ff;
  color: #3498DB;
}
.ticket-preview-icon svg,
.ticket-preview-footer svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ticket-preview-header > button {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: #edf2f7;
  color: #62758a;
  font-size: 1.55rem;
  line-height: 1;
}
.ticket-preview-header > button:hover { background: #dfe8f0; color: #173a5d; }
.ticket-preview-body { position: relative; flex: 1 1 auto; min-height: 0; background: #e9eef5; }
.ticket-preview-body iframe { display: block; width: 100%; height: 100%; border: 0; background: #e9eef5; }
.ticket-preview-loading {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 13px;
  background: #eef3f8;
  color: #3b5872;
  font-size: .75rem;
}
.ticket-preview-loading[hidden] { display: none; }
.ticket-preview-loading span { width: 34px; height: 34px; border: 3px solid #cadbe7; border-top-color: #3498DB; border-radius: 50%; animation: ticket-preview-spin .75s linear infinite; }
@keyframes ticket-preview-spin { to { transform: rotate(360deg); } }
.ticket-preview-footer {
  display: flex;
  flex: 0 0 auto;
  justify-content: flex-end;
  gap: 9px;
  padding: 12px 16px;
  border-top: 1px solid #d6e2ec;
  background: #fff;
}
.ticket-preview-footer .button { gap: 8px; }
.ticket-preview-footer svg { width: 17px; height: 17px; }

body.app-shell.ticket-embedded { display: block; min-height: 100dvh; background: #e9eef5; }
.ticket-embedded .sidebar,
.ticket-embedded .sidebar-backdrop,
.ticket-embedded .topbar { display: none !important; }
.ticket-embedded .content { min-height: 100dvh; padding: 14px; }
.ticket-embedded .thermal-ticket-screen { min-height: calc(100dvh - 28px); align-items: flex-start; border: 0; }

@media screen and (max-width: 620px) {
  .ticket-preview-dialog { width: calc(100vw - 6px); height: calc(100dvh - 6px); border-radius: 12px; }
  .ticket-preview-header { min-height: 58px; padding: 8px 9px 8px 11px; }
  .ticket-preview-footer { padding: 9px; }
  .ticket-preview-footer .button { flex: 1; justify-content: center; }
  .ticket-embedded .content { padding: 7px; }
  .ticket-embedded .thermal-ticket-screen { min-height: calc(100dvh - 14px); padding: 10px; }
}

/* CUSTOMER GENERAL DATA -------------------------------------------------- */
.customer-general-overview {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 18px;
}
.customer-photo-card {
  display: flex;
  min-height: 220px;
  margin: 0;
  overflow: hidden;
  flex-direction: column;
  border: 1px solid #d3e1eb;
  border-radius: 14px;
  background: linear-gradient(145deg, #eff6ff, #dbeafe);
}
.customer-photo-card > img,
.customer-photo-card > span {
  display: grid;
  flex: 1 1 auto;
  width: 100%;
  min-height: 180px;
  place-items: center;
  object-fit: cover;
  color: #3498DB;
  font-size: 2.25rem;
  font-weight: 950;
  letter-spacing: .04em;
}
.customer-photo-card figcaption {
  flex: 0 0 auto;
  padding: 9px 10px;
  overflow: hidden;
  border-top: 1px solid #d3e1eb;
  background: rgba(255,255,255,.9);
  color: #70849a;
  font-size: .62rem;
  font-weight: 750;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.customer-identity-summary {
  overflow: hidden;
  border: 1px solid #d6e2ec;
  border-radius: 14px;
  background: #fff;
}
.customer-identity-name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 19px;
  border-bottom: 1px solid #dce6ee;
  background: linear-gradient(135deg, #f9fcfe, #f3f7ff);
}
.customer-identity-name h3 { flex: 1 1 auto; margin: 0; color: #173450; font-size: 1.18rem; }
.customer-identity-name > div { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.customer-identity-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  background: #dde6ee;
}
.customer-identity-fields > div { min-height: 72px; padding: 13px 15px; background: #fff; }
.customer-identity-fields > div.wide { grid-column: span 2; }
.customer-identity-fields dt,
.customer-related-card dt { color: #75879b; font-size: .62rem; font-weight: 850; text-transform: uppercase; }
.customer-identity-fields dd,
.customer-related-card dd { margin: 5px 0 0; overflow-wrap: anywhere; color: #203a56; font-size: .77rem; font-weight: 800; }
.customer-info-section { margin-top: 16px; }
.customer-info-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.customer-info-heading > span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 10px;
  background: #eaf2ff;
  color: #3498DB;
  font-size: .65rem;
  font-weight: 950;
}
.customer-info-heading strong,
.customer-info-heading small { display: block; }
.customer-info-heading strong { color: #1a3854; font-size: .82rem; }
.customer-info-heading small { margin-top: 2px; color: #7a8b9f; font-size: .64rem; }
.customer-contact-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.customer-related-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.customer-related-card {
  overflow: hidden;
  border: 1px solid #d5e2ec;
  border-radius: 13px;
  background: #fff;
}
.customer-related-card.guarantor { border-color: #d9deed; }
.related-card-heading {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 15px;
  border-bottom: 1px solid #dce6ee;
  background: linear-gradient(135deg, #f4fbfc, #eff6ff);
}
.customer-related-card.guarantor .related-card-heading { background: linear-gradient(135deg, #f7f8fd, #f0f2fa); }
.related-photo {
  display: grid;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  overflow: hidden;
  place-items: center;
  border-radius: 12px;
  background: #dff4f5;
  color: #3498DB;
  font-size: .7rem;
  font-weight: 950;
}
.customer-related-card.guarantor .related-photo { background: #e8ebf7; color: #4d5d96; }
.related-photo img { width: 100%; height: 100%; object-fit: cover; }
.related-card-heading > div { min-width: 0; }
.related-card-heading small,
.related-card-heading strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.related-card-heading small { margin-bottom: 3px; color: #71859a; font-size: .61rem; font-weight: 850; text-transform: uppercase; }
.related-card-heading strong { color: #183650; font-size: .82rem; }
.customer-related-card dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 0; background: #dfe7ee; }
.customer-related-card dl > div { min-height: 72px; padding: 12px 13px; background: #fff; }
.customer-related-card dl > div.wide { grid-column: 1 / -1; }
.customer-notes { margin-top: 16px; padding: 14px 16px; border-left: 4px solid #3498DB; border-radius: 10px; background: #f3f7ff; }
.customer-notes small { color: #3498DB; font-size: .62rem; font-weight: 900; text-transform: uppercase; }
.customer-notes p { margin: 5px 0 0; color: #355269; font-size: .76rem; }

@media screen and (max-width: 1100px) {
  .customer-identity-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .customer-contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .customer-related-card dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media screen and (max-width: 760px) {
  .customer-general-overview { grid-template-columns: 1fr; }
  .customer-photo-card { width: min(220px, 100%); justify-self: center; }
  .customer-identity-name { align-items: flex-start; flex-direction: column; }
  .customer-identity-name > div { justify-content: flex-start; }
  .customer-related-grid { grid-template-columns: 1fr; }
}
@media screen and (max-width: 520px) {
  .customer-identity-fields,.customer-contact-grid,.customer-related-card dl { grid-template-columns: 1fr; }
  .customer-identity-fields > div.wide,.record-data-grid > div.wide { grid-column: auto; }
}

/* CREDIT PRINT FORMATS --------------------------------------------------- */
@page credit-letter {
  size: letter portrait;
  margin: 0;
}
.credit-documents-section { margin-top: 18px; padding-top: 18px; border-top: 1px solid #dce6ee; }
.credit-documents-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.credit-documents-heading strong,
.credit-documents-heading small { display: block; }
.credit-documents-heading strong { color: #183650; font-size: .86rem; }
.credit-documents-heading small { margin-top: 3px; color: #788a9e; font-size: .65rem; }
.credit-documents-heading > span { padding: 6px 9px; border-radius: 999px; background: #eaf2ff; color: #3498DB; font-size: .64rem; font-weight: 900; }
.credit-document-row { overflow: hidden; border: 1px solid #d5e2ec; border-radius: 13px; background: #fff; }
.credit-document-row + .credit-document-row { margin-top: 10px; }
.credit-document-account { display: flex; align-items: center; gap: 11px; padding: 12px 14px; border-bottom: 1px solid #dce6ee; background: #f8fbfd; }
.credit-document-mark { display: grid; min-width: 50px; height: 36px; place-items: center; padding: 0 8px; border-radius: 10px; background: #173b5b; color: #fff; font-size: .7rem; font-weight: 900; }
.credit-document-account > div { min-width: 0; }
.credit-document-account strong,
.credit-document-account small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.credit-document-account strong { color: #1b3853; font-size: .78rem; }
.credit-document-account small { margin-top: 3px; color: #77899d; font-size: .64rem; }
.credit-document-actions { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; padding: 10px; }
.credit-document-button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 56px;
  padding: 8px 9px;
  border: 1px solid #d5e1eb;
  border-radius: 10px;
  background: #fff;
  color: #28445e;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.credit-document-button:hover { border-color: #93c5fd; background: #effafb; transform: translateY(-1px); }
.credit-document-button > span:first-child { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 9px; background: #eaf2ff; color: #3498DB; font-size: .62rem; font-weight: 950; }
.credit-document-button > span:last-child { min-width: 0; }
.credit-document-button strong,
.credit-document-button small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.credit-document-button strong { font-size: .68rem; }
.credit-document-button small { margin-top: 2px; color: #8190a1; font-size: .56rem; }

body.credit-document-dialog-open { overflow: hidden; }
.credit-document-dialog {
  width: min(1500px, calc(100vw - 24px));
  max-width: none;
  height: calc(100dvh - 24px);
  max-height: none;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  background: #e8edf3;
  color: #18324f;
  box-shadow: 0 38px 110px rgba(4, 18, 37, .5);
}
.credit-document-dialog[open] { display: flex; flex-direction: column; }
.credit-document-dialog::backdrop { background: rgba(4, 18, 37, .74); backdrop-filter: blur(6px); }
.credit-document-dialog-header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 66px;
  padding: 10px 14px 10px 18px;
  border-bottom: 1px solid #d4e0ea;
  background: linear-gradient(180deg, #fff, #f7fafc);
}
.credit-document-dialog-header > div { display: flex; align-items: center; gap: 11px; min-width: 0; }
.credit-document-dialog-header > div > div { min-width: 0; }
.credit-document-dialog-header small,
.credit-document-dialog-header strong { display: block; }
.credit-document-dialog-header small { margin-bottom: 2px; color: #3498DB; font-size: .62rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.credit-document-dialog-header strong { overflow: hidden; color: #17334f; font-size: .96rem; text-overflow: ellipsis; white-space: nowrap; }
.credit-document-dialog-icon { display: grid; flex: 0 0 40px; width: 40px; height: 40px; place-items: center; border-radius: 11px; background: #eaf2ff; color: #3498DB; }
.credit-document-dialog-icon svg,
.credit-document-dialog-footer svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.credit-document-dialog-header > button { display: grid; width: 40px; height: 40px; place-items: center; padding: 0; border: 0; border-radius: 10px; background: #edf2f7; color: #61748a; font-size: 1.55rem; }
.credit-document-dialog-header > button:hover { background: #dfe8f0; color: #173a5d; }
.credit-document-dialog-body { position: relative; flex: 1 1 auto; min-height: 0; background: #e8edf3; }
.credit-document-dialog-body iframe { display: block; width: 100%; height: 100%; border: 0; background: #e8edf3; }
.credit-document-loading { position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; justify-items: center; gap: 13px; background: #edf2f7; color: #3b5872; font-size: .75rem; }
.credit-document-loading[hidden] { display: none; }
.credit-document-loading span { width: 34px; height: 34px; border: 3px solid #c9d9e5; border-top-color: #3498DB; border-radius: 50%; animation: credit-document-spin .75s linear infinite; }
@keyframes credit-document-spin { to { transform: rotate(360deg); } }
.credit-document-dialog-footer { display: flex; flex: 0 0 auto; justify-content: flex-end; gap: 9px; padding: 12px 16px; border-top: 1px solid #d4e0ea; background: #fff; }
.credit-document-dialog-footer .button { gap: 8px; }
.credit-document-dialog-footer svg { width: 17px; height: 17px; }

body.app-shell.credit-document-embedded { display: block; min-height: 100dvh; background: #e8edf3; }
.credit-document-embedded .sidebar,
.credit-document-embedded .sidebar-backdrop,
.credit-document-embedded .topbar { display: none !important; }
.credit-document-embedded .content { min-height: 100dvh; padding: 20px; }
.credit-document-embedded .credit-print-document { zoom: 1.5; }
.credit-print-stage { display: flex; justify-content: center; }
.credit-print-document {
  page: credit-letter;
  width: 8.5in;
  max-width: 100%;
  min-height: 11in;
  padding: .5in;
  background: #fff;
  color: #17212b;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
  line-height: 1.45;
  box-shadow: 0 15px 40px rgba(19, 42, 63, .15);
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.credit-print-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 10px; border-bottom: 2px solid #163b5b; }
.credit-print-brand { display: flex; align-items: center; gap: 9px; max-width: 60%; }
.credit-print-brand > span { display: grid; flex: 0 0 36px; width: 36px; height: 36px; place-items: center; border-radius: 9px; background: #3498DB; color: #fff; font-size: 12px; font-weight: 900; }
.credit-print-brand strong,
.credit-print-brand small,
.credit-print-header > div:last-child strong,
.credit-print-header > div:last-child small { display: block; }
.credit-print-brand strong { font-size: 11px; }
.credit-print-brand small { margin-top: 2px; color: #667584; font-size: 8px; }
.credit-print-header > div:last-child { text-align: right; }
.credit-print-header > div:last-child strong { color: #173b5b; font-size: 12px; text-transform: uppercase; }
.credit-print-header > div:last-child small { margin-top: 3px; color: #677787; font-size: 8px; }
.credit-print-title { padding: 18px 0 13px; text-align: center; }
.credit-print-title > span { color: #687887; font-size: 8px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.credit-print-title h1 { margin: 5px 0 2px; color: #142f48; font-size: 19px; letter-spacing: .025em; }
.credit-print-title p { margin: 0; color: #667584; font-size: 9px; }
.credit-print-block { margin-top: 13px; break-inside: avoid; }
.credit-print-block h2 { margin: 0 0 7px; padding-left: 7px; border-left: 3px solid #3498DB; color: #17354f; font-size: 11px; }
.credit-print-data { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 0; overflow: hidden; border: 1px solid #d4dce3; border-radius: 6px; background: #d4dce3; }
.credit-print-data > div { min-height: 46px; padding: 7px 9px; background: #fff; }
.credit-print-data > div.wide { grid-column: 1 / -1; }
.credit-print-data dt { color: #6c7a87; font-size: 7px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.credit-print-data dd { margin: 3px 0 0; color: #1b2d3d; font-size: 9px; font-weight: 600; }
.credit-print-legal p { margin: 0 0 8px; text-align: justify; }
.credit-print-legal.prominent { margin: 16px 0; padding: 12px 14px; border: 1px solid #cfd9e2; border-radius: 7px; background: #fbfcfd; }
.credit-print-signatures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 38px; margin-top: 42px; break-inside: avoid; text-align: center; }
.credit-print-signatures span { display: block; border-top: 1px solid #1d2935; }
.credit-print-signatures strong,
.credit-print-signatures small { display: block; }
.credit-print-signatures strong { margin-top: 5px; font-size: 9px; }
.credit-print-signatures small { margin-top: 2px; color: #687785; font-size: 8px; }
.promissory-amount { display: grid; gap: 4px; margin: 10px 0 16px; padding: 13px 16px; border: 2px solid #173b5b; border-radius: 8px; text-align: center; }
.promissory-amount small { color: #687786; font-size: 8px; font-weight: 800; }
.promissory-amount strong { color: #142f48; font-size: 24px; }
.promissory-amount span { font-size: 9px; text-transform: uppercase; }
.credit-print-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin: 4px 0 13px; }
.credit-print-summary.single { grid-template-columns: minmax(0, 300px); justify-content: center; }
.credit-print-summary > div { display: grid; gap: 3px; padding: 9px; border: 1px solid #d5dde4; border-radius: 6px; background: #f9fbfc; }
.credit-print-summary > div.accent { border-color: #93c5fd; background: #edf9fa; }
.credit-print-summary small { color: #687887; font-size: 7px; font-weight: 700; text-transform: uppercase; }
.credit-print-summary strong { color: #183650; font-size: 12px; }
.credit-print-summary span { color: #748391; font-size: 8px; }
.credit-print-table-wrap { overflow: hidden; border: 1px solid #ccd7df; border-radius: 6px; }
.credit-print-table-wrap table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.credit-print-table-wrap th,
.credit-print-table-wrap td { padding: 6px 7px; border-bottom: 1px solid #dce3e9; font-size: 8px; text-align: left; white-space: nowrap; }
.credit-print-table-wrap th { background: #edf2f6; color: #334b60; font-size: 7px; letter-spacing: .03em; text-transform: uppercase; }
.credit-print-table-wrap .number { text-align: right; }
.credit-print-table-wrap .strong { font-weight: 800; }
.credit-print-table-wrap .empty { padding: 20px; color: #73818d; text-align: center; }
.credit-print-table-wrap tfoot th { border-top: 2px solid #bfcbd5; background: #e6edf2; }
.credit-print-table-wrap table.dense th,
.credit-print-table-wrap table.dense td { padding: 5px 5px; font-size: 7px; }
.credit-print-table-wrap table.current { min-width: 980px; }
.credit-print-status { display: inline-block; padding: 2px 4px; border-radius: 999px; background: #fff0d6; color: #915d13; font-size: 6px; font-weight: 800; text-transform: uppercase; }
.credit-print-status.paid { background: #dff3e9; color: #087253; }
.credit-print-notes { margin-top: 13px; padding: 10px 12px; border: 1px solid #d7dfe6; border-radius: 6px; background: #f8fafb; break-inside: avoid; }
.credit-print-notes strong { font-size: 9px; }
.credit-print-notes ul { margin: 5px 0 0 16px; padding: 0; }
.credit-print-notes li { margin: 2px 0; font-size: 8px; }
.credit-print-footer { display: flex; justify-content: space-between; margin-top: 18px; padding-top: 7px; border-top: 1px solid #d5dde4; color: #778591; font-size: 7px; }

@media screen and (max-width: 1180px) {
  .credit-document-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media screen and (max-width: 760px) {
  .credit-document-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .credit-document-dialog { width: calc(100vw - 6px); height: calc(100dvh - 6px); border-radius: 12px; }
  .credit-document-dialog-header { min-height: 58px; padding: 8px 9px 8px 11px; }
  .credit-document-dialog-footer { padding: 9px; }
  .credit-document-dialog-footer .button { flex: 1; justify-content: center; }
  .credit-document-embedded .content { padding: 7px; }
  .credit-print-document { padding: 9mm 7mm; }
}
@media screen and (max-width: 480px) {
  .credit-document-actions { grid-template-columns: 1fr; }
}

@media print {
  .credit-document-embedded .content { padding: 0 !important; }
  .credit-print-stage { display: block; }
  .credit-print-document { width: 8.5in !important; max-width: none !important; min-height: 11in; margin: 0 !important; padding: .5in !important; box-shadow: none !important; zoom: 1 !important; }
  .credit-print-table-wrap table.current { min-width: 0 !important; table-layout: fixed; }
  .credit-print-table-wrap table.current th,
  .credit-print-table-wrap table.current td { padding: 3px 2px !important; overflow: hidden; font-size: 5.5px !important; text-overflow: ellipsis; }
}

/* POS SHORT DESKTOP VIEWPORT --------------------------------------------- */
/* Keep totals and payment actions visible on laptops and browser zoom. */
@media screen and (min-width: 901px) and (max-height: 800px) {
  body.pos-terminal { grid-template-rows: 64px minmax(0, 1fr); overflow: hidden; }
  .pos-terminal .topbar { height: 64px; min-width: 0; padding: 0 16px; }
  .pos-terminal .content {
    min-width: 0;
    padding: 6px 8px 10px;
    overflow: hidden;
  }
  .pos-page-heading { min-height: 0; margin-bottom: 8px; }
  .pos-page-heading h1 { margin: 0; font-size: 1.55rem; }
  .pos-page-heading p,
  .pos-page-heading .eyebrow { display: none; }
  .pos-session-chip { min-width: 0; padding: 6px 10px; }

  .pos-terminal-layout {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 370px);
    gap: 12px;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
  }
  .pos-catalog,
  .pos-cart-panel { min-width: 0; min-height: 0; height: 100%; max-height: 100%; }
  .pos-catalog { padding: 12px; }
  .pos-searchbar input { min-height: 42px; font-size: .88rem; }
  .pos-catalog-controls { margin: 8px 0 10px; }
  .pos-filter-chips button { min-height: 34px; padding: 6px 12px; font-size: .72rem; }
  .pos-warehouse-select select { min-height: 36px; font-size: .76rem; }
  .pos-product-grid { max-height: none; min-height: 0; }
  .pos-product-card {
    min-height: 250px;
    grid-template-rows: 86px minmax(112px, 1fr) 48px;
  }
  .pos-product-card > button {
    height: 36px;
    min-height: 36px;
    margin: 0 10px 10px;
    font-size: .76rem;
  }

  .pos-cart-heading { padding: 8px 12px; }
  .pos-cart-icon { width: 30px; height: 30px; }
  .pos-customer-block { gap: 7px; padding: 7px 12px 8px; }
  .pos-customer-block label span { font-size: .68rem; }
  .pos-customer-block input,
  .pos-customer-block select { min-width: 0; min-height: 36px; font-size: .72rem; }
  .pos-cart-lines { flex: 1 1 80px; min-height: 80px; }
  .pos-cart-line { padding-top: 8px; padding-bottom: 8px; }
  .pos-sale-notes { padding: 6px 12px; }
  .pos-cart-summary { gap: 3px; padding: 7px 12px; }
  .pos-cart-summary > div { font-size: .72rem; }
  .pos-cart-summary .total { margin-top: 1px; padding-top: 5px; }
  .pos-cart-summary .total strong { font-size: 1.3rem; }
  .button.full.pos-pay-button { min-height: 38px; margin: 0 12px 7px; }
  .button.full.pos-project-credit-button { min-height: 36px; margin: 0 12px 9px; }
}

@media screen and (min-width: 901px) and (max-width: 1180px) and (max-height: 800px) {
  .pos-terminal-layout { grid-template-columns: minmax(0, 1fr) 340px; }
  .pos-customer-block { grid-template-columns: 1fr; }
  .pos-cart-lines { min-height: 65px; }
}

/* GLOBAL STOCK QUERY ----------------------------------------------------- */
.stock-query-header { align-items: flex-end; gap: 20px; }
.stock-query-readonly {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 190px;
  padding: 11px 14px;
  border: 1px solid #b9e6df;
  border-radius: 12px;
  background: #effbf8;
  color: #08745f;
}
.stock-query-readonly > span { color: #14a989; font-size: .75rem; }
.stock-query-readonly strong,.stock-query-readonly small { display: block; }
.stock-query-readonly strong { font-size: .78rem; }
.stock-query-readonly small { margin-top: 2px; color: #648078; font-size: .66rem; }
.stock-query-topbar-readonly { display: flex !important; flex: 0 0 auto; min-width: 150px; margin: 0 12px 0 auto !important; padding: 5px 9px; box-shadow: none; text-align: left !important; }
.stock-query-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: #f5f9ff;
  color: #36576b;
}
.stock-query-notice svg {
  flex: 0 0 22px;
  width: 22px;
  fill: none;
  stroke: #3498DB;
  stroke-width: 1.8;
  stroke-linecap: round;
}
.stock-query-notice p { flex: 1; margin: 0; font-size: .78rem; line-height: 1.5; }
.stock-query-kpis { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-bottom: 16px; }
.stock-query-kpis article {
  position: relative;
  overflow: hidden;
  padding: 16px 17px;
  border: 1px solid #dbe4ef;
  border-top: 3px solid #4b8cf7;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 7px 22px rgba(20,46,79,.055);
}
.stock-query-kpis span,.stock-query-kpis strong,.stock-query-kpis small { display: block; }
.stock-query-kpis span { color: #6b7c91; font-size: .7rem; font-weight: 850; text-transform: uppercase; letter-spacing: .055em; }
.stock-query-kpis strong { margin: 7px 0 4px; color: #183250; font-size: 1.55rem; letter-spacing: -.04em; }
.stock-query-kpis small { color: #78889a; font-size: .68rem; }
.stock-query-kpis .primary { border-top-color: #2598EC; background: linear-gradient(135deg,#0d4268,#082c4a); }
.stock-query-kpis .primary span,.stock-query-kpis .primary small { color: #b9d9e7; }
.stock-query-kpis .primary strong { color: #93c5fd; }
.stock-query-kpis .available { border-top-color: #12a779; }
.stock-query-kpis .available strong { color: #087451; }
.stock-query-kpis .warning { border-top-color: #e8a11d; }
.stock-query-kpis .warning strong { color: #a96705; }
.stock-query-filter-panel { margin-bottom: 13px; padding: 15px; }
.stock-query-filters { display: grid; grid-template-columns: minmax(280px,1fr) minmax(160px,.35fr) minmax(145px,.28fr) minmax(80px,.15fr) auto auto; align-items: end; gap: 10px; }
.stock-query-filters label { display: grid; gap: 6px; color: #65788f; font-size: .7rem; font-weight: 800; }
.stock-query-filters input,.stock-query-filters select { min-height: 42px; }
.stock-query-search > span { position: relative; display: block; }
.stock-query-search svg { position: absolute; top: 12px; left: 12px; width: 18px; fill: none; stroke: #7990a8; stroke-width: 1.8; pointer-events: none; }
.stock-query-search input { padding-left: 39px; }
.stock-query-departments {
  display: flex;
  gap: 7px;
  margin-bottom: 13px;
  padding: 2px 1px 7px;
  overflow-x: auto;
  scrollbar-color: #bdcad8 transparent;
  scrollbar-width: thin;
}
.stock-query-departments a {
  flex: 0 0 auto;
  padding: 8px 13px;
  border: 1px solid #dde5ee;
  border-radius: 999px;
  background: #fff;
  color: #536981;
  font-size: .68rem;
  font-weight: 800;
  text-decoration: none;
}
.stock-query-departments a:hover { border-color: #bfdbfe; color: #3498DB; }
.stock-query-departments a.active { border-color: #3498DB; background: #3498DB; color: #fff; box-shadow: 0 4px 12px rgba(37,99,235,.18); }
.stock-query-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.stock-query-toolbar p { margin: 0; color: #687a8f; font-size: .73rem; }
.stock-query-toolbar > div { display: flex; align-items: center; gap: 9px; }
.stock-query-toolbar .button svg { width: 15px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.stock-query-view-switch { display: flex; padding: 3px; border: 1px solid #d7e1ec; border-radius: 10px; background: #fff; }
.stock-query-view-switch button { min-height: 30px; padding: 5px 10px; border: 0; border-radius: 7px; background: transparent; color: #6b7d91; font-size: .68rem; font-weight: 800; }
.stock-query-view-switch button.active { background: #eaf2ff; color: #3498DB; }
.stock-query-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(220px,1fr)); gap: 13px; }
.stock-query-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dfe7f0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 7px 20px rgba(20,47,82,.055);
  transition: transform .16s ease,border-color .16s ease,box-shadow .16s ease;
}
.stock-query-card:hover { transform: translateY(-2px); border-color: #bfdbfe; box-shadow: 0 13px 28px rgba(20,47,82,.1); }
.stock-query-card[hidden],.stock-query-table tr[hidden] { display: none !important; }
.stock-query-photo { position: relative; display: grid; height: 126px; place-items: center; overflow: hidden; background: radial-gradient(circle at 50% 48%,#fff 0,#f4f7fa 68%,#edf2f7 100%); }
.stock-query-photo::after { position: absolute; right: 0; bottom: 0; left: 0; height: 30px; background: linear-gradient(transparent,rgba(255,255,255,.72)); content: ""; pointer-events: none; }
.stock-query-photo-placeholder svg { width: 42px; fill: none; stroke: #b9c7d5; stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; }
.stock-query-photo img { position: absolute; inset: 0; width: 100%; height: 100%; padding: 10px 12px 18px; object-fit: contain; cursor: zoom-in; }
.stock-query-state,.stock-query-price,.stock-query-list-price { z-index: 1; border-radius: 999px; font-size: .64rem; font-weight: 850; box-shadow: 0 3px 10px rgba(20,40,68,.1); }
.stock-query-card-summary { position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 30px; margin: -28px 0 13px; }
.stock-query-state { display: inline-flex; align-items: center; min-width: 0; padding: 6px 9px; white-space: nowrap; }
.stock-query-state::before { flex: 0 0 6px; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: currentColor; content: ""; opacity: .75; }
.stock-query-state.available { background: #dcf6eb; color: #087451; }
.stock-query-state.low { background: #fff0cf; color: #986000; }
.stock-query-state.zero { background: #fde4e8; color: #ad3042; }
.stock-query-price { flex: 0 0 auto; padding: 6px 10px; background: #fff; color: #1257b1; font-size: .76rem; }
.stock-query-list-price { position: absolute; top: 9px; left: 9px; padding: 5px 8px; background: rgba(255,255,255,.94); color: #ad4250; text-decoration: line-through; }
.stock-query-card-body { position: relative; padding: 14px 14px 11px; border-top: 0; background: #fff; }
.stock-query-card-body::before { position: absolute; top: -16px; right: 0; left: 0; height: 18px; border-radius: 16px 16px 0 0; background: #fff; content: ""; }
.stock-query-card-body > small { color: #3498DB; font-size: .62rem; font-weight: 850; text-transform: uppercase; letter-spacing: .05em; }
.stock-query-card-body h2 { min-height: 38px; margin: 5px 0 10px; color: #172d48; font-size: .88rem; line-height: 1.3; }
.stock-query-card-body dl { display: grid; gap: 5px; margin: 0; }
.stock-query-card-body dl div { display: flex; min-width: 0; justify-content: space-between; gap: 10px; font-size: .66rem; }
.stock-query-card-body dt { color: #8391a2; }
.stock-query-card-body dd { overflow: hidden; margin: 0; color: #4c6178; font-weight: 750; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.stock-query-card footer { display: flex; justify-content: space-between; gap: 8px; padding: 9px 14px; border-top: 1px solid #edf0f4; background: #fafbfd; font-size: .61rem; }
.stock-query-card footer span { color: #8190a1; }
.stock-query-card footer strong { color: #0a8b78; }
.stock-query-table-panel { padding: 0; overflow: hidden; }
.module-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; border-top: 1px solid #dbe5ed; background: #f8fafc; }
.module-pagination > span { color: #667b90; font-size: .68rem; font-weight: 800; }
.module-pagination > div { display: flex; align-items: center; gap: 4px; }
.module-pagination a,.module-pagination > div > span { display: inline-flex; min-width: 32px; height: 32px; align-items: center; justify-content: center; padding: 0 9px; border: 1px solid #d4e0ea; border-radius: 7px; background: #fff; color: #34536f; font-size: .66rem; font-weight: 850; text-decoration: none; }
.module-pagination a:hover { border-color: #62b9ea; color: #2588c7; background: #eff8fe; }
.module-pagination .current { border-color: #3498db; background: #3498db; color: #fff; }
.module-pagination .disabled { color: #a4b0bc; background: #f1f4f6; }
.module-pagination .ellipsis { min-width: 20px; padding: 0 2px; border-color: transparent; background: transparent; }
.stock-query-pagination { margin-top: 14px; border: 1px solid #dbe5ed; border-radius: 10px; }
.stock-query-table-wrap { max-height: 680px; }
.stock-query-table { min-width: 1320px; }
.stock-query-table thead th { position: sticky; top: 0; z-index: 2; }
.stock-query-table-state { display: inline-block; min-width: 70px; padding: 4px 7px; border-radius: 999px; text-align: center; }
.stock-query-table-state.available { background: #e3f6ef; color: #087451; }
.stock-query-table-state.low { background: #fff1d6; color: #986000; }
.stock-query-table-state.zero { background: #fde7ea; color: #ad3042; }
.stock-query-empty { display: grid; justify-items: center; padding: 48px 20px; color: #71849a; text-align: center; }
.stock-query-empty > span { margin-bottom: 8px; color: #afbdca; font-size: 2.6rem; }
.stock-query-empty strong { color: #243b57; }
.stock-query-empty p { margin: 6px 0 0; }
.stock-query-photo-dialog { width: min(860px,calc(100vw - 24px)); max-width: none; padding: 0; border: 0; border-radius: 15px; background: #fff; box-shadow: 0 30px 90px rgba(4,18,38,.4); }
.stock-query-photo-dialog::backdrop { background: rgba(5,18,37,.72); backdrop-filter: blur(4px); }
.stock-query-photo-dialog header { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 13px 16px; border-bottom: 1px solid #dfe6ed; }
.stock-query-photo-dialog h2 { margin: 0; color: #18314f; font-size: 1rem; }
.stock-query-photo-dialog header button { width: 35px; height: 35px; border: 0; border-radius: 9px; background: #edf2f7; color: #5d6f83; font-size: 1.4rem; }
.stock-query-photo-dialog > div { display: grid; min-height: 300px; max-height: calc(100dvh - 110px); place-items: center; padding: 18px; overflow: auto; background: #f5f8fb; }
.stock-query-photo-dialog img { display: block; max-width: 100%; max-height: calc(100dvh - 150px); object-fit: contain; }

@media (max-width: 1100px) {
  .stock-query-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .stock-query-filters { grid-template-columns: minmax(260px,1fr) 1fr 1fr; }
  .stock-query-filters .button { min-height: 42px; }
}
@media (max-width: 700px) {
  .stock-query-header { align-items: stretch; }
  .stock-query-readonly { min-width: 0; }
  .stock-query-topbar-readonly { min-width: 0; margin: 0 4px !important; }
  .stock-query-topbar-readonly small { display: none; }
  .stock-query-notice { align-items: flex-start; flex-wrap: wrap; }
  .stock-query-notice p { min-width: calc(100% - 38px); }
  .stock-query-kpis { gap: 8px; }
  .stock-query-kpis article { padding: 13px; }
  .stock-query-kpis strong { font-size: 1.25rem; }
  .stock-query-filters { grid-template-columns: 1fr 1fr; }
  .stock-query-search { grid-column: 1 / -1; }
  .stock-query-toolbar { align-items: flex-start; flex-direction: column; }
  .stock-query-toolbar > div { width: 100%; justify-content: space-between; }
  .module-pagination { align-items: stretch; flex-direction: column; }
  .module-pagination > div { overflow-x: auto; }
  .stock-query-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .stock-query-photo { height: 116px; }
}
@media (max-width: 460px) {
  .stock-query-kpis { grid-template-columns: 1fr; }
  .stock-query-filters { grid-template-columns: 1fr; }
  .stock-query-search { grid-column: auto; }
  .stock-query-grid { grid-template-columns: 1fr; }
  .stock-query-photo { height: 142px; }
}

/* UNIFIED COUNTER -------------------------------------------------------- */
body.counter-dialog-open { overflow: hidden; }

/* SUPPLIERS ------------------------------------------------------------- */
body.supplier-edit-modal-open { overflow: hidden; }
.supplier-edit-dialog-icon {
  background: linear-gradient(145deg, #e9f4ff, #dcecff);
  color: #217fbd;
  font-size: .68rem;
  font-weight: 950;
  letter-spacing: .04em;
}
.supplier-page-header { align-items: flex-end; }
.supplier-page-header > div { max-width: 760px; }
.supplier-page-header .button { gap: 7px; }
.supplier-metrics .metric { min-height: 118px; }
.supplier-metrics .metric strong { font-size: 1.55rem; }
.supplier-results-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 17px 2px 10px;
}
.supplier-results-heading strong,
.supplier-results-heading small { display: block; }
.supplier-results-heading strong { color: #183654; font-size: .88rem; }
.supplier-results-heading small { margin-top: 3px; color: var(--muted); font-size: .68rem; }
.supplier-table-wrap table { min-width: 1080px; }
.supplier-table-wrap td { line-height: 1.35; }
.supplier-code { font-variant-numeric: tabular-nums; letter-spacing: .025em; }
.supplier-action-heading { width: 92px; }
.supplier-form-hero .registration-hero-mark { background: linear-gradient(145deg, #60a5fa, #1769aa); }
.supplier-form .registration-progress { align-self: start; }
.supplier-form .registration-fieldset.span-two { grid-column: span 2; }
.supplier-readonly-field { color: #607086 !important; background: #edf1f6 !important; cursor: not-allowed; }

@media (max-width: 760px) {
  .supplier-page-header .button { width: 100%; }
  .supplier-form .registration-progress { grid-template-columns: 1fr; }
  .supplier-form .registration-fieldset.span-two { grid-column: auto; }
  .supplier-form .registration-step-actions-back { gap: 8px; flex-direction: column-reverse; }
  .supplier-form[data-active-section="registration-contact"] .registration-actions { display: none; }
}

/* OPERATIONAL CATALOGS -------------------------------------------------- */
body.operational-catalog-modal-open { overflow: hidden; }
.operational-catalog-header { align-items: flex-end; }
.operational-catalog-header > div { max-width: 760px; }
.operational-catalog-metrics { grid-template-columns: repeat(auto-fit,minmax(190px,1fr)); }
.operational-catalog-metrics .metric { min-height: 112px; }
.operational-catalog-metrics .metric strong { font-size: 1.45rem; }
.operational-catalog-audit { border-top-color: #15a37a !important; }
.operational-catalog-audit strong { color: #087c5b !important; }
.operational-catalog-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 12px;
  padding: 9px 11px;
  border: 1px solid #d8e4ee;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(21,53,83,.045);
}
.operational-catalog-nav a { padding: 7px 10px; border-radius: 8px; color: #38617f; font-size: .7rem; font-weight: 850; text-decoration: none; }
.operational-catalog-nav a:hover { background: #edf6fd; color: #217fbd; }
.operational-catalog-panel { margin-bottom: 14px; scroll-margin-top: 16px; overflow: hidden; }
.operational-catalog-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 18px 13px; border-bottom: 1px solid #dfe7ef; }
.operational-catalog-panel > header > div { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; }
.operational-catalog-panel > header h2 { align-self: end; margin: 0; color: #173451; font-size: 1rem; }
.operational-catalog-panel > header p { grid-column: 2; margin: 3px 0 0; color: #708398; font-size: .7rem; }
.operational-catalog-number { grid-row: 1 / 3; display: grid; width: 36px; height: 36px; place-items: center; border-radius: 9px; background: #eaf5fd; color: #238bc8; font-size: .65rem; font-weight: 950; }
.operational-catalog-callout { display: flex; align-items: center; gap: 9px; margin: 11px 16px 0; padding: 9px 11px; border: 1px solid #cce2f1; border-radius: 9px; background: #f2f9fe; color: #5f768b; font-size: .65rem; }
.operational-catalog-callout strong { color: #216b9d; }
.operational-catalog-table { border: 0; }
.operational-catalog-table table { min-width: 980px; margin: 0; }
.operational-catalog-table th { color: #536b83; font-size: .64rem; }
.operational-catalog-table td { color: #29455f; font-size: .7rem; line-height: 1.4; }
.operational-catalog-table td > strong { color: #173b5d; }
.operational-catalog-table .button { white-space: nowrap; }
.operational-locality-table table { min-width: 720px; }
.operational-catalog-locality-status { border-left: 3px solid #3498db; border-radius: 7px; background: #f1f8fd; padding: 9px 11px; color: #557189; font-size: .63rem; }

.operational-catalog-dialog { width: min(820px,calc(100vw - 24px)); max-width: none; max-height: calc(100dvh - 24px); padding: 0; overflow: hidden; border: 0; border-radius: 16px; background: #fff; color: #17324f; box-shadow: 0 34px 100px rgba(5,22,43,.42); }
.operational-catalog-dialog::backdrop { background: rgba(7,25,45,.68); backdrop-filter: blur(5px); }
.operational-catalog-dialog[open] { display: block; }
.operational-catalog-dialog > form { display: flex; max-height: calc(100dvh - 24px); flex-direction: column; }
.operational-catalog-dialog > form > header { display: flex; flex: 0 0 auto; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 16px 18px; border-bottom: 1px solid #dce5ee; background: linear-gradient(135deg,#f7fbff,#fff); }
.operational-catalog-dialog header small { color: #2588c7; font-size: .59rem; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.operational-catalog-dialog header h2 { margin: 3px 0 2px; color: #163451; font-size: 1.1rem; }
.operational-catalog-dialog header p { margin: 0; color: #71849a; font-size: .68rem; }
.operational-catalog-dialog header > button { display: grid; width: 36px; height: 36px; place-items: center; border: 0; border-radius: 9px; background: #eaf0f5; color: #62768a; font-size: 1.45rem; cursor: pointer; }
.operational-catalog-dialog-body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 16px 18px 18px; }
.operational-catalog-dialog-body > section { display: grid; gap: 12px; }
.operational-catalog-dialog-body > section[hidden] { display: none; }
.operational-catalog-form-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 7px; border-bottom: 1px solid #e3eaf1; }
.operational-catalog-form-heading strong { color: #244660; font-size: .75rem; }
.operational-catalog-form-heading small { color: #8292a3; font-size: .61rem; }
.operational-catalog-form-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.operational-catalog-form-grid label:not(.operational-catalog-check) { display: grid; gap: 5px; color: #526b82; font-size: .67rem; font-weight: 800; }
.operational-catalog-form-grid input,
.operational-catalog-form-grid select,
.operational-catalog-form-grid textarea { width: 100%; border-color: #c9d7e4; background: #fbfdff; }
.operational-catalog-form-grid textarea { min-height: 78px; resize: vertical; }
.operational-catalog-form-grid .span-two { grid-column: span 2; }
.operational-catalog-form-grid .span-three { grid-column: 1 / -1; }
.operational-catalog-check { display: flex; align-items: center; gap: 9px; min-height: 48px; border: 1px solid #d8e4ed; border-radius: 9px; background: #f7fafc; padding: 8px 10px; cursor: pointer; }
.operational-catalog-check input { width: 17px; height: 17px; flex: 0 0 17px; accent-color: #3498db; }
.operational-catalog-check span strong,.operational-catalog-check span small { display: block; }
.operational-catalog-check span strong { color: #294b66; font-size: .66rem; }
.operational-catalog-check span small { margin-top: 2px; color: #8091a2; font-size: .58rem; }
.operational-catalog-protection { display: flex; gap: 8px; margin-top: 13px; border-left: 3px solid #d99729; border-radius: 7px; background: #fff8e9; padding: 9px 11px; color: #806a45; font-size: .62rem; }
.operational-catalog-protection[hidden] { display: none; }
.operational-catalog-protection strong { color: #77510f; white-space: nowrap; }
.operational-catalog-dialog > form > footer { display: flex; flex: 0 0 auto; justify-content: flex-end; gap: 8px; padding: 11px 18px; border-top: 1px solid #dce5ee; background: #f8fafc; }

/* MODULE LAUNCHER ------------------------------------------------------ */
.module-launcher { display: grid; gap: 16px; max-width: 1380px; margin: 0 auto; }
.module-launcher-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 28px;
  border: 1px solid #bfdef2;
  border-radius: 18px;
  background: linear-gradient(135deg,#f7fcff 0%,#eaf6fd 62%,#e5f8f2 100%);
  box-shadow: 0 12px 30px rgba(31,91,130,.08);
}
.module-launcher-hero h1 { margin: 5px 0 6px; color: #153b5d; font-size: clamp(1.45rem,2.4vw,2.15rem); letter-spacing: -.035em; }
.module-launcher-hero p { margin: 0; color: #617a91; font-size: .82rem; }
.module-launcher-role { padding: 8px 12px; border: 1px solid #a8d9c8; border-radius: 999px; background: #effbf7; color: #08785a; font-size: .68rem; font-weight: 850; white-space: nowrap; }
.module-launcher-search {
  display: grid;
  grid-template-columns: 24px minmax(0,1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 8px 12px 8px 16px;
  border: 2px solid #76bde7;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(30,104,151,.09);
}
.module-launcher-search:focus-within { border-color: #238fd0; box-shadow: 0 0 0 4px rgba(52,152,219,.12),0 10px 25px rgba(30,104,151,.1); }
.module-launcher-search svg { width: 22px; height: 22px; fill: none; stroke: #388bbd; stroke-width: 2; stroke-linecap: round; }
.module-launcher-search input { min-height: 42px; padding: 0; border: 0; outline: 0; background: transparent; color: #173956; font-size: .95rem; font-weight: 700; }
.module-launcher-search input::placeholder { color: #8ca0b2; font-weight: 600; }
.module-launcher-search kbd { padding: 4px 8px; border: 1px solid #d6e2ec; border-bottom-width: 2px; border-radius: 6px; background: #f7fafc; color: #6f8192; font: 700 .7rem/1 sans-serif; }
.module-launcher-count { margin: -6px 2px 0; color: #76899b; font-size: .7rem; }
.module-launcher-count strong { color: #267fad; }
.module-launcher-groups { display: grid; gap: 17px; }
.module-launcher-group { display: grid; gap: 9px; }
.module-launcher-group[hidden],.module-launcher-card[hidden],.module-launcher-empty[hidden] { display: none; }
.module-launcher-group > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 3px; }
.module-launcher-group > header h2 { margin: 0; color: #31536f; font-size: .79rem; text-transform: uppercase; letter-spacing: .055em; }
.module-launcher-group > header span { color: #8294a5; font-size: .64rem; font-weight: 700; }
.module-launcher-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(230px,1fr)); gap: 10px; }
.module-launcher-card {
  display: grid;
  grid-template-columns: 44px minmax(0,1fr) auto;
  align-items: center;
  gap: 11px;
  min-height: 76px;
  padding: 12px 14px;
  border: 1px solid #d9e5ee;
  border-radius: 13px;
  background: #fff;
  color: #193b57;
  text-decoration: none;
  box-shadow: 0 5px 16px rgba(31,67,96,.045);
  transition: border-color .16s ease,box-shadow .16s ease,transform .16s ease;
}
.module-launcher-card:hover { transform: translateY(-2px); border-color: #73bce8; box-shadow: 0 10px 25px rgba(31,105,151,.12); }
.module-launcher-icon { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 11px; background: #eaf6fd; color: #248dcc; }
.module-launcher-icon svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.module-launcher-card > span:nth-child(2) { display: grid; gap: 4px; min-width: 0; }
.module-launcher-card strong { overflow: hidden; font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.module-launcher-card small { color: #8192a2; font-size: .61rem; }
.module-launcher-card b { color: #86a4b8; font-size: 1rem; }
.module-launcher-empty { display: grid; gap: 5px; place-items: center; min-height: 150px; padding: 25px; border: 1px dashed #c8d9e5; border-radius: 14px; background: #f8fbfd; text-align: center; }
.module-launcher-empty strong { color: #294d68; }
.module-launcher-empty span { color: #7a8c9d; font-size: .72rem; }

@media (max-width: 680px) {
  .module-launcher-hero { align-items: flex-start; flex-direction: column; padding: 19px; }
  .module-launcher-grid { grid-template-columns: 1fr; }
  .module-launcher-search kbd { display: none; }
  .module-launcher-search { grid-template-columns: 24px minmax(0,1fr); }
}

@media (max-width: 980px) {
  .operational-catalog-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 680px) {
  .operational-catalog-metrics { grid-template-columns: 1fr 1fr; gap: 8px; }
  .operational-catalog-panel > header { align-items: stretch; flex-direction: column; }
  .operational-catalog-panel > header .button { width: 100%; }
  .operational-catalog-callout { align-items: flex-start; flex-direction: column; }
  .operational-catalog-dialog { width: calc(100vw - 6px); max-height: calc(100dvh - 6px); border-radius: 12px; }
  .operational-catalog-dialog > form { max-height: calc(100dvh - 6px); }
  .operational-catalog-dialog-body { padding: 13px 12px 15px; }
  .operational-catalog-form-grid { grid-template-columns: 1fr; }
  .operational-catalog-form-grid .span-two,.operational-catalog-form-grid .span-three { grid-column: auto; }
  .operational-catalog-form-heading { align-items: flex-start; flex-direction: column; gap: 3px; }
}
.counter-operator-chip { display: flex; align-items: center; gap: 10px; padding: 9px 13px; border: 1px solid #d3e0ec; border-radius: 12px; background: #fff; box-shadow: 0 6px 18px rgba(16,45,82,.05); }
.counter-operator-avatar { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; background: #eaf2ff; color: #3498DB; font-size: .7rem; font-weight: 900; }
.counter-operator-chip small,.counter-operator-chip strong { display: block; }.counter-operator-chip small { color: #7a8ba0; font-size: .58rem; font-weight: 800; text-transform: uppercase; }.counter-operator-chip strong { margin-top: 2px; color: #18314f; font-size: .76rem; }
.counter-topbar-operator { flex: 0 0 auto; margin: 0 12px !important; padding: 5px 10px; box-shadow: none; text-align: left !important; }
.counter-topbar-operator .counter-operator-avatar { width: 30px; height: 30px; }
.counter-session-alert { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 12px; margin-bottom: 14px; padding: 11px 14px; border: 1px solid; border-radius: 12px; }
.counter-session-alert.open { border-color: #a9dec9; background: #edf9f4; }.counter-session-alert.closed,.counter-session-alert.blocked { border-color: #efcf8b; background: #fff8e9; }
.counter-session-icon { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; background: #15986d; color: #fff; font-size: .76rem; font-weight: 950; }.counter-session-alert.closed .counter-session-icon,.counter-session-alert.blocked .counter-session-icon { background: #d58b16; }
.counter-session-alert strong { color: #173c34; font-size: .76rem; }.counter-session-alert p { margin: 3px 0 0; color: #54766c; font-size: .68rem; }.counter-session-alert.closed strong,.counter-session-alert.blocked strong { color: #704d12; }.counter-session-alert.closed p,.counter-session-alert.blocked p { color: #846e48; }
.counter-session-time { color: #367261; font-size: .66rem; font-weight: 750; }
.counter-search-panel { margin-bottom: 16px; padding: 13px 14px; }
.counter-search-form { display: grid; grid-template-columns: minmax(300px,1fr) auto auto; align-items: end; gap: 10px; }
.counter-search-form label { display: grid; gap: 6px; color: #536a84; font-size: .68rem; font-weight: 850; }.counter-search-input { position: relative; }.counter-search-input svg { position: absolute; top: 13px; left: 13px; width: 18px; fill: none; stroke: #6e849b; stroke-width: 1.8; }.counter-search-input input { min-height: 44px; padding-left: 41px; border-color: #c3d4e3; font-size: .78rem; }
.counter-selection-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 12px; }.counter-selection-heading h2 { margin: 3px 0; color: #172e4b; font-size: 1.15rem; }.counter-selection-heading p { margin: 0; color: #718299; font-size: .72rem; }.counter-selection-heading > span { padding: 6px 10px; border-radius: 8px; background: #edf4ff; color: #3498DB; font-size: .66rem; font-weight: 850; }
.counter-customer-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(310px,1fr)); gap: 11px; }
.counter-customer-card { display: grid; min-width: 0; grid-template-columns: auto minmax(0,1fr) auto auto; align-items: center; gap: 11px; padding: 13px; border: 1px solid #d9e3ed; border-radius: 12px; background: #fff; color: #203a57; box-shadow: 0 6px 18px rgba(17,45,82,.045); text-decoration: none; transition: .16s ease; }.counter-customer-card:hover { transform: translateY(-2px); border-color: #93c5fd; box-shadow: 0 11px 24px rgba(17,67,90,.1); }
.counter-customer-initials { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 11px; background: linear-gradient(135deg,#dbeafe,#e8f1fb); color: #3498DB; font-size: .7rem; font-weight: 900; }.counter-customer-copy { min-width: 0; }.counter-customer-copy strong,.counter-customer-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.counter-customer-copy strong { font-size: .78rem; }.counter-customer-copy small { margin-top: 3px; color: #75879c; font-size: .61rem; }
.counter-customer-products { display: grid; grid-template-columns: auto auto; align-items: baseline; gap: 2px 5px; color: #557087; }.counter-customer-products b { color: #3498DB; font-size: .75rem; }.counter-customer-products small { font-size: .55rem; }.counter-customer-arrow { color: #8da1b5; font-size: 1rem; }
.counter-empty-selection { grid-column: 1/-1; padding: 45px; text-align: center; }.counter-empty-selection p { color: #77889c; }
.counter-workspace { display: block; }
.counter-client-workspace { min-width: 0; }.counter-client-header { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 16px 17px; border-radius: 13px 13px 0 0; background: linear-gradient(120deg,#102f50,#2588C7); color: #fff; }.counter-client-identity { display: flex; min-width: 0; align-items: center; gap: 12px; }.counter-client-identity > span { display: grid; flex: 0 0 48px; width: 48px; height: 48px; place-items: center; border-radius: 13px; background: rgba(255,255,255,.14); font-size: .82rem; font-weight: 900; }.counter-client-identity div { min-width: 0; }.counter-client-identity small { color: #bfdbfe; font-size: .59rem; font-weight: 850; text-transform: uppercase; }.counter-client-identity h2 { overflow: hidden; margin: 3px 0; color: #fff; font-size: 1.15rem; text-overflow: ellipsis; white-space: nowrap; }.counter-client-identity p { margin: 0; color: #c5dce3; font-size: .65rem; }.counter-client-header .button { border-color: rgba(255,255,255,.35); color: #fff; background: rgba(255,255,255,.1); }
.counter-client-kpis { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); border: 1px solid #d9e3ec; border-top: 0; background: #fff; }.counter-client-kpis article { padding: 12px 15px; border-right: 1px solid #e3e9ef; }.counter-client-kpis article:last-child { border-right: 0; }.counter-client-kpis span,.counter-client-kpis strong,.counter-client-kpis small { display: block; }.counter-client-kpis span { color: #7a8b9f; font-size: .59rem; font-weight: 850; text-transform: uppercase; }.counter-client-kpis strong { margin: 5px 0 2px; color: #183451; font-size: 1.1rem; }.counter-client-kpis small { color: #74869a; font-size: .59rem; }.counter-client-kpis .ready strong { color: #07805a; }.counter-client-kpis .disabled strong { color: #b37819; }
.counter-client-kpis article { background: linear-gradient(180deg,#fff,#f8fbff); }
.counter-client-kpis span { color: #2588C7; font-size: .66rem; font-weight: 950; letter-spacing: .035em; }
.counter-client-kpis strong { color: #174f83; font-size: 1.28rem; font-weight: 950; }
.counter-operation-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }.counter-operation-tabs button { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 11px 14px; border: 1px solid #d7e2ec; border-radius: 11px; background: #fff; color: #536a82; text-align: left; }.counter-operation-tabs button span { font-size: .76rem; font-weight: 900; }.counter-operation-tabs button b { grid-row: span 2; align-self: center; font-size: 1.15rem; }.counter-operation-tabs button small { font-size: .59rem; }.counter-operation-tabs button.active { border-color: #62B9EA; background: #eff6ff; color: #3498DB; box-shadow: 0 6px 16px rgba(37,99,235,.09); }
.counter-operation-panel { min-height: 250px; padding: 15px; border: 1px solid #d9e3ec; border-radius: 12px; background: #fff; }.counter-operation-panel[hidden] { display: none; }.counter-operation-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }.counter-operation-heading h3 { margin: 3px 0; color: #18314f; font-size: 1rem; }.counter-operation-heading p { margin: 0; color: #75869a; font-size: .65rem; }
.counter-product-list { display: grid; gap: 10px; }.counter-product-card { overflow: hidden; border: 1px solid #dce4ec; border-radius: 11px; background: #fbfcfe; }.counter-product-card.inactive { opacity: .68; }.counter-product-card > header { display: flex; align-items: start; justify-content: space-between; gap: 12px; padding: 11px 12px 9px; border-bottom: 1px solid #e5eaf0; background: #fff; }.counter-product-card header small { color: #7a8ba0; font-size: .56rem; font-weight: 750; }.counter-product-card h4 { margin: 4px 0 0; color: #1b3552; font-size: .78rem; }.counter-product-values { display: grid; grid-template-columns: repeat(3,1fr); }.counter-product-values > div { padding: 10px 12px; border-right: 1px solid #e5eaf0; }.counter-product-values > div:last-child { border-right: 0; }.counter-product-values small,.counter-product-values strong { display: block; }.counter-product-values small { color: #7a8b9e; font-size: .56rem; }.counter-product-values strong { margin-top: 4px; color: #203a56; font-size: .76rem; }.counter-product-values strong.danger { color: #b53648; }
.counter-product-card h4 { color: #174f9b; font-size: .88rem; font-weight: 950; }
.counter-product-values > div:first-child { background: #eff8fe; }
.counter-product-values > div:first-child small { color: #2588C7; font-size: .62rem; font-weight: 900; }
.counter-product-values > div:first-child strong { color: #174f83; font-size: .9rem; font-weight: 950; }
.counter-product-card > footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 12px; border-top: 1px solid #e7ebf0; background: #f6f8fa; }.counter-product-card footer > span:first-child { color: #6e8094; font-size: .6rem; }
.counter-savings-balance { display: flex; align-items: baseline; gap: 9px; padding: 12px; background: linear-gradient(120deg,#f0f6ff,#f8fbff); }.counter-savings-balance small { color: #637f75; font-size: .6rem; }.counter-savings-balance strong { color: #087451; font-size: 1.2rem; }.counter-savings-balance span { margin-left: auto; color: #6f817c; font-size: .59rem; }.counter-savings-rule { display: grid; grid-template-columns: 1fr auto; gap: 3px 12px; padding: 9px 12px; }.counter-savings-rule span { color: #708398; font-size: .6rem; }.counter-savings-rule strong { color: #26415e; font-size: .7rem; }.counter-savings-rule small { grid-column: 1/-1; color: #8a98a8; font-size: .55rem; }.counter-product-empty { padding: 38px; border: 1px dashed #cbd8e4; border-radius: 10px; color: #71849a; text-align: center; }.counter-product-empty strong { color: #29415c; }.counter-product-empty p { margin: 5px 0 0; font-size: .68rem; }
.counter-withdraw-dialog { width: min(700px,calc(100vw - 24px)); max-width: none; padding: 0; overflow: hidden; border: 0; border-radius: 16px; background: #fff; box-shadow: 0 35px 100px rgba(3,18,38,.46); }.counter-withdraw-dialog::backdrop { background: rgba(4,18,37,.72); backdrop-filter: blur(5px); }.counter-withdraw-dialog > form > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 15px 17px; background: linear-gradient(120deg,#113353,#2588C7); color: #fff; }.counter-withdraw-dialog header h2 { margin: 3px 0; color: #fff; font-size: 1.1rem; }.counter-withdraw-dialog header p { margin: 0; color: #c3dfe3; font-size: .65rem; }.counter-withdraw-dialog header .eyebrow { color: #bfdbfe; }.counter-withdraw-dialog header button { display: grid; width: 32px; height: 32px; place-items: center; border: 0; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; font-size: 1.3rem; }
.counter-withdraw-body { display: grid; gap: 13px; padding: 16px 18px; }.counter-withdraw-summary { display: grid; grid-template-columns: repeat(3,1fr); overflow: hidden; border: 1px solid #d8e3ec; border-radius: 11px; }.counter-withdraw-summary > div { padding: 11px; border-right: 1px solid #dfe7ee; }.counter-withdraw-summary > div:last-child { border-right: 0; }.counter-withdraw-summary small,.counter-withdraw-summary strong { display: block; }.counter-withdraw-summary small { color: #73859a; font-size: .58rem; }.counter-withdraw-summary strong { margin-top: 5px; color: #183553; font-size: .9rem; }.counter-withdraw-summary .projected { background: #edf9f5; }.counter-withdraw-summary .projected strong { color: #087451; }
.counter-withdraw-body label { display: grid; gap: 6px; color: #203b58; font-size: .68rem; font-weight: 850; }.counter-withdraw-amount > span { display: grid; grid-template-columns: 42px 1fr; }.counter-withdraw-amount b { display: grid; place-items: center; border: 2px solid #62B9EA; border-right: 0; border-radius: 10px 0 0 10px; background: #eff6ff; color: #3498DB; font-size: 1.1rem; }.counter-withdraw-amount input { min-height: 52px; border: 2px solid #62B9EA; border-left: 0; border-radius: 0 10px 10px 0; background: #f5f9ff; font-size: 1.3rem; font-weight: 900; }.counter-withdraw-amount > small { color: #65798f; font-size: .59rem; }.counter-withdraw-amount > small.error { color: #b42338; }.counter-withdraw-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }.counter-withdraw-confirm { display: flex !important; align-items: center; grid-template-columns: none; gap: 8px !important; padding: 10px 11px; border-radius: 9px; background: #f1f5f8; }.counter-withdraw-confirm input { width: 17px; height: 17px; margin: 0; accent-color: #3498DB; }.counter-withdraw-warning { display: grid; gap: 3px; padding: 10px 12px; border-left: 3px solid #df9b22; border-radius: 7px; background: #fff8e9; }.counter-withdraw-warning strong { color: #81560c; font-size: .66rem; }.counter-withdraw-warning span { color: #806b48; font-size: .59rem; line-height: 1.45; }.counter-withdraw-dialog > form > footer { display: flex; justify-content: flex-end; gap: 8px; padding: 11px 17px; border-top: 1px solid #dfe6ed; background: #f8fafb; }
.thermal-ticket-signatures { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 34px 0 16px; }.thermal-ticket-signatures span { padding-top: 5px; border-top: 1px solid #111; font-size: 9px; text-align: center; }

@media (max-width: 760px) { .counter-topbar-operator { gap: 6px; margin: 0 4px !important; padding: 5px 7px; }.counter-topbar-operator .counter-operator-avatar,.counter-topbar-operator small { display: none; }.counter-topbar-operator strong { margin: 0; font-size: .68rem; }.counter-session-alert { grid-template-columns: auto 1fr; }.counter-session-alert .button,.counter-session-time { grid-column: 2; justify-self: start; }.counter-search-form { grid-template-columns: 1fr 1fr; }.counter-search-form label { grid-column: 1/-1; }.counter-client-header { align-items: flex-start; flex-direction: column; }.counter-client-kpis { grid-template-columns: 1fr; }.counter-client-kpis article { border-right: 0; border-bottom: 1px solid #e3e9ef; }.counter-client-kpis article:last-child { border-bottom: 0; }.counter-product-values { grid-template-columns: 1fr; }.counter-product-values > div { border-right: 0; border-bottom: 1px solid #e5eaf0; }.counter-product-values > div:last-child { border-bottom: 0; }.counter-withdraw-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .counter-search-form { grid-template-columns: 1fr; }.counter-search-form label { grid-column: auto; }.counter-customer-grid { grid-template-columns: 1fr; }.counter-customer-card { grid-template-columns: auto minmax(0,1fr) auto; }.counter-customer-products { display: none; }.counter-operation-tabs { grid-template-columns: 1fr; }.counter-savings-balance { align-items: flex-start; flex-direction: column; }.counter-savings-balance span { margin-left: 0; }.counter-product-card > footer { align-items: stretch; flex-direction: column; }.counter-product-card footer .button { justify-content: center; }.counter-withdraw-summary { grid-template-columns: 1fr; }.counter-withdraw-summary > div { border-right: 0; border-bottom: 1px solid #dfe7ee; }.counter-withdraw-summary > div:last-child { border-bottom: 0; } }
.counter-withdraw-summary .projected.invalid { background: #fff0f1; }
.counter-withdraw-summary .projected.invalid strong { color: #b42338; }
.counter-savings-history { margin-top: 16px; padding-top: 14px; border-top: 1px solid #dfe7ee; }
.counter-history-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.counter-history-heading h4 { margin: 0; color: #203a56; font-size: .82rem; }
.counter-history-heading p { margin: 3px 0 0; color: #7a8b9d; font-size: .6rem; }
.counter-history-heading > span { padding: 4px 8px; border-radius: 999px; background: #eaf2ff; color: #3498DB; font-size: .58rem; font-weight: 850; }
.counter-savings-history table { min-width: 1080px; font-size: .68rem; }
.counter-savings-history th { font-size: .58rem; }
.counter-movement-reversed { opacity: .62; }
.counter-history-action { display: flex; min-width: 145px; align-items: center; justify-content: flex-end; gap: 6px; }
.counter-reverse-control { position: static; }
.counter-reverse-control summary { color: #b42338; font-size: .61rem; font-weight: 850; cursor: pointer; }
.counter-reverse-control form { display: grid; width: 220px; gap: 7px; margin-top: 7px; padding: 9px; border: 1px solid #e5b8be; border-radius: 9px; background: #fff; }
.counter-reverse-control input { min-height: 36px; font-size: .65rem; }

/* INVENTORY VALUATION REPORT ------------------------------------------- */
.page-reports-inventory-valuation .content { padding-bottom: 8px !important; }
.inventory-value-header { align-items: center; margin-bottom: 10px; }
.inventory-value-header h1 { margin: 0; }
.inventory-value-header-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.inventory-value-header-actions .button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.inventory-value-scope { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 12px; margin-bottom: 14px; padding: 12px 15px; border: 1px solid #cfe1ef; border-radius: 12px; background: linear-gradient(120deg,#f7fbff,#edf7fd); box-shadow: 0 8px 22px rgba(24,75,115,.05); }
.inventory-value-scope-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 10px; background: #3498db; color: #fff; box-shadow: 0 7px 16px rgba(52,152,219,.22); }
.inventory-value-scope-icon svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.inventory-value-scope div { display: grid; gap: 1px; }
.inventory-value-scope small { color: #6f8398; font-size: .56rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.inventory-value-scope strong { color: #193653; font-size: .76rem; }
.inventory-value-scope span:not(.inventory-value-scope-icon) { color: #71859a; font-size: .61rem; }
.inventory-value-filter-panel { margin-bottom: 10px; padding: 10px 11px; }
.inventory-value-filters { display: grid; grid-template-columns: minmax(260px,1.45fr) minmax(190px,1fr) minmax(180px,.85fr) auto; align-items: end; gap: 8px; }
.inventory-value-filters label { display: grid; gap: 6px; color: #4e647c; font-size: .66rem; font-weight: 850; }
.inventory-value-search > span { position: relative; display: block; }
.inventory-value-search svg { position: absolute; top: 12px; left: 12px; width: 18px; fill: none; stroke: #71869a; stroke-width: 1.8; }
.inventory-value-search input { width: 100%; padding-left: 39px; }
.inventory-value-filters select:disabled { color: #8b98a6; background: #f3f6f8; cursor: not-allowed; }
.inventory-value-filter-actions { display: flex; align-items: center; gap: 6px; }
.inventory-value-active-filters { padding: 4px 7px; border-radius: 999px; background: #e8f7f1; color: #087b57; font-size: .56rem; font-weight: 850; white-space: nowrap; }
.inventory-value-filter-note { margin: 5px 1px 0; color: #8492a0; font-size: .56rem; }
.inventory-value-kpis { display: grid; grid-template-columns: .8fr repeat(4,1fr); gap: 10px; margin-bottom: 14px; }
.inventory-value-kpis article { position: relative; overflow: hidden; min-width: 0; padding: 14px 15px; border: 1px solid #d7e2eb; border-radius: 12px; background: #fff; box-shadow: 0 8px 22px rgba(20,53,87,.055); }
.inventory-value-kpis article::after { position: absolute; top: -22px; right: -20px; width: 65px; height: 65px; border-radius: 50%; background: rgba(52,152,219,.07); content: ''; }
.inventory-value-kpis article span,.inventory-value-kpis article strong,.inventory-value-kpis article small { position: relative; z-index: 1; display: block; }
.inventory-value-kpis article span { color: #687d94; font-size: .61rem; font-weight: 850; }
.inventory-value-kpis article strong { margin: 6px 0 3px; color: #173452; font-size: clamp(1.05rem,1.6vw,1.35rem); font-variant-numeric: tabular-nums; white-space: nowrap; }
.inventory-value-kpis article small { color: #7a8da0; font-size: .57rem; }
.inventory-value-kpis article.primary { border-color: #2588c7; background: linear-gradient(125deg,#3498db,#2588c7); }
.inventory-value-kpis article.primary span,.inventory-value-kpis article.primary strong,.inventory-value-kpis article.primary small { color: #fff; }
.inventory-value-kpis article.positive { border-color: #b9e6d4; background: #f1fbf7; }
.inventory-value-kpis article.positive strong { color: #087b57; }
.inventory-value-kpis article.warning { border-color: #f0d398; background: #fff9eb; }
.inventory-value-kpis article.warning strong { color: #ae6d08; }
.inventory-value-results { overflow: hidden; padding: 0; }
.inventory-value-results > .panel-heading { padding: 15px 17px 12px; }
.inventory-value-result-total { display: grid; justify-items: end; gap: 2px; color: #718399; font-size: .58rem; }
.inventory-value-result-total strong { color: #087b57; font-size: 1rem; font-variant-numeric: tabular-nums; }
.inventory-value-results-tools { display: flex; align-items: center; gap: 16px; }
.inventory-value-results-tools form label { display: flex; align-items: center; gap: 6px; color: #718399; font-size: .6rem; font-weight: 800; }
.inventory-value-results-tools select { width: 68px; min-height: 34px; padding: 6px 22px 6px 8px; font-size: .65rem; }
.inventory-value-table-wrap { max-height: calc(100vh - 370px); min-height: 270px; border-top: 1px solid #d9e3ec; }
.inventory-value-table { min-width: 1500px; font-size: .66rem; }
.inventory-value-table th { padding: 10px 9px; background: #eaf2f8; color: #526a84; font-size: .56rem; letter-spacing: .025em; line-height: 1.25; text-transform: uppercase; white-space: normal; }
.inventory-value-table td { padding: 9px; vertical-align: middle; color: #314b67; }
.inventory-value-table tbody tr:hover td { background: #f5faff; }
.inventory-value-table th:first-child,.inventory-value-table td:first-child { position: sticky; left: 0; z-index: 2; width: 330px; min-width: 330px; background: #fff; box-shadow: 1px 0 #dbe5ed; }
.inventory-value-table thead th:first-child { z-index: 4; background: #eaf2f8; }
.inventory-value-table tbody tr:hover td:first-child { background: #f5faff; }
.inventory-value-table td:nth-child(2) { width: 190px; }
.inventory-value-table .number { font-variant-numeric: tabular-nums; white-space: nowrap; }
.inventory-value-product { display: grid; grid-template-columns: 42px minmax(0,1fr); align-items: center; gap: 9px; }
.inventory-value-photo { display: grid; overflow: hidden; width: 42px; height: 42px; place-items: center; border: 1px solid #d8e4ec; border-radius: 9px; background: #f1f6fa; color: #8ca4b8; }
.inventory-value-photo img { width: 100%; height: 100%; object-fit: contain; }
.inventory-value-photo svg { width: 23px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.inventory-value-product > span:last-child { min-width: 0; }
.inventory-value-product small,.inventory-value-product strong,.inventory-value-product em { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inventory-value-product small { color: #3498db; font-size: .55rem; font-weight: 850; }
.inventory-value-product strong { margin: 3px 0; color: #193550; font-size: .68rem; }
.inventory-value-product em { max-width: 260px; color: #8090a1; font-size: .55rem; font-style: normal; }
.inventory-value-stock { display: inline-flex; min-width: 58px; justify-content: center; padding: 4px 7px; border-radius: 999px; background: #e8f7f1; color: #087b57; font-size: .64rem; }
.inventory-value-stock.low { background: #fff1cf; color: #9d650a; }
.inventory-value-stock.out { background: #ffe7ea; color: #b42338; }
.inventory-value-stock.over { background: #e8f1ff; color: #2765b0; }
.inventory-value-cost { color: #455d76 !important; font-weight: 800; }
.inventory-value-public { color: #087b57 !important; font-weight: 900; }
.inventory-value-table tfoot th,.inventory-value-table tfoot td { position: sticky; bottom: 0; z-index: 3; padding: 11px 9px; border-top: 2px solid #b9d8ef; background: #eaf4ff; color: #174f83; font-weight: 900; }
.inventory-value-table tfoot th { text-align: left; }
.inventory-value-table tfoot th:first-child { left: 0; }
.inventory-value-empty { padding: 55px !important; text-align: center; }
.inventory-value-empty strong,.inventory-value-empty span { display: block; }
.inventory-value-empty strong { color: #29445f; font-size: .82rem; }
.inventory-value-empty span { margin-top: 4px; color: #7b8c9d; }
.inventory-value-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-top: 1px solid #dbe5ed; background: #f8fafc; }
.inventory-value-pagination > span { color: #718398; font-size: .61rem; font-weight: 750; }
.inventory-value-pagination > div { display: flex; align-items: center; gap: 4px; }
.inventory-value-pagination a,.inventory-value-pagination > div > span { display: inline-flex; min-width: 31px; height: 31px; align-items: center; justify-content: center; padding: 0 8px; border: 1px solid #d4e0ea; border-radius: 7px; background: #fff; color: #34536f; font-size: .62rem; font-weight: 850; text-decoration: none; }
.inventory-value-pagination a:hover { border-color: #62b9ea; color: #2588c7; background: #eff8fe; }
.inventory-value-pagination .current { border-color: #3498db; background: #3498db; color: #fff; }
.inventory-value-pagination .disabled { color: #a4b0bc; background: #f1f4f6; }
.inventory-value-pagination .ellipsis { min-width: 20px; padding: 0 2px; border-color: transparent; background: transparent; }

@media screen and (max-width: 1100px) {
  .inventory-value-filters { grid-template-columns: 1fr 1fr; }
  .inventory-value-filter-actions { align-self: end; }
  .inventory-value-kpis { grid-template-columns: repeat(3,1fr); }
  .inventory-value-kpis article:nth-child(n+4) { grid-column: span 1; }
}
@media screen and (max-width: 700px) {
  .page-reports-inventory-valuation .content { padding-bottom: 6px !important; }
  .inventory-value-header-actions { width: 100%; justify-content: stretch; }
  .inventory-value-header-actions .button { flex: 1; justify-content: center; }
  .inventory-value-scope { grid-template-columns: auto 1fr; }
  .inventory-value-filters,.inventory-value-kpis { grid-template-columns: 1fr; }
  .inventory-value-filter-actions .button { flex: 1; justify-content: center; }
  .inventory-value-result-total { display: none; }
  .inventory-value-pagination { align-items: stretch; flex-direction: column; }
  .inventory-value-pagination > div { overflow-x: auto; }
  .inventory-value-table-wrap { max-height: none; }
}
@media print {
  @page inventory-valuation { size: landscape; margin: 8mm; }
  body.page-reports-inventory-valuation { page: inventory-valuation; }
  .inventory-value-scope,.inventory-value-kpis { break-inside: avoid; }
  .inventory-value-kpis { grid-template-columns: repeat(5,1fr); }
  .inventory-value-results { border: 0; box-shadow: none; }
  .inventory-value-table-wrap { max-height: none; overflow: visible; border: 0; }
  .inventory-value-table { width: 100%; min-width: 0; font-size: 6pt; }
  .inventory-value-table th,.inventory-value-table td { position: static !important; padding: 4px; }
  .inventory-value-table th:first-child,.inventory-value-table td:first-child { width: 25%; min-width: 0; box-shadow: none; }
  .inventory-value-photo { display: none; }
  .inventory-value-product { grid-template-columns: 1fr; }
}

/* PROFITABILITY DASHBOARD ---------------------------------------------- */
.page-reports-profitability .content { padding-top: 8px !important; }
.profit-header { min-height: 44px; margin-bottom: 9px; }
.profit-header h1 { margin: 0; }
.profit-topbar-actions { display: flex !important; flex: 0 0 auto; align-items: center; gap: 6px; margin: 0 12px 0 auto !important; text-align: left !important; }
.profit-filters { margin-bottom: 10px; padding: 10px 11px; }
.profit-filters form { display: grid; grid-template-columns: 145px 145px minmax(150px,.8fr) minmax(190px,1fr) auto auto auto; align-items: end; gap: 8px; }
.profit-filters label { display: grid; gap: 5px; color: #526a82; font-size: .62rem; font-weight: 850; }
.profit-filters input,.profit-filters select { min-height: 39px; padding-block: 8px; }
.profit-filter-count { align-self: center; padding: 5px 8px; border-radius: 999px; background: #e8f7f1; color: #087b57; font-size: .57rem; font-weight: 850; white-space: nowrap; }
.profit-kpis { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 9px; margin-bottom: 10px; }
.profit-kpis article { position: relative; overflow: hidden; padding: 12px 14px; border: 1px solid #d7e3ed; border-radius: 11px; background: #fff; box-shadow: 0 7px 18px rgba(20,53,87,.05); }
.profit-kpis article::after { position: absolute; top: -25px; right: -18px; width: 68px; height: 68px; border-radius: 50%; background: rgba(52,152,219,.07); content: ''; }
.profit-kpis span,.profit-kpis strong,.profit-kpis small { position: relative; z-index: 1; display: block; }
.profit-kpis span { color: #6d8196; font-size: .59rem; font-weight: 850; }
.profit-kpis strong { margin: 5px 0 2px; color: #173451; font-size: clamp(1.05rem,1.55vw,1.28rem); font-variant-numeric: tabular-nums; white-space: nowrap; }
.profit-kpis small { color: #8391a0; font-size: .55rem; }
.profit-kpis .featured { border-color: #2588c7; background: linear-gradient(125deg,#3498db,#2588c7); }
.profit-kpis .featured span,.profit-kpis .featured strong,.profit-kpis .featured small { color: #fff; }
.profit-kpis .profit { border-color: #b8e5d2; background: #f0fbf6; }
.profit-kpis .profit strong { color: #087b57; }
.profit-kpis .margin { border-color: #c7dcf3; background: #f2f8ff; }
.profit-kpis .margin strong { color: #247ab3; }
.profit-empty { padding: 70px; text-align: center; }
.profit-empty strong { color: #233e59; }.profit-empty p { margin: 5px 0 0; color: #75879a; }
.profit-visual-grid { display: grid; grid-template-columns: minmax(0,1.7fr) minmax(280px,.7fr); gap: 10px; margin-bottom: 10px; }
.profit-donut-card,.profit-ranking-card,.profit-trend-card,.profit-detail-card { padding: 0; overflow: hidden; }
.profit-donut-card > header,.profit-ranking-card > header,.profit-trend-card > header,.profit-detail-card > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; border-bottom: 1px solid #e0e8ef; }
.profit-donut-card h2,.profit-ranking-card h2,.profit-trend-card h2,.profit-detail-card h2 { margin: 0; color: #193550; font-size: .84rem; }
.profit-donut-card header p,.profit-ranking-card header p,.profit-trend-card header p,.profit-detail-card header p { margin: 3px 0 0; color: #8090a0; font-size: .57rem; }
.profit-rotate-controls { display: flex; align-items: center; gap: 7px; }
.profit-rotate-controls button { display: grid; width: 31px; height: 31px; place-items: center; border: 1px solid #cfe0ed; border-radius: 8px; background: #f6faff; color: #2588c7; font-size: 1rem; cursor: pointer; }
.profit-rotate-controls button:hover { border-color: #62b9ea; background: #eaf6fd; }
.profit-rotate-controls span { color: #7d8e9f; font-size: .55rem; font-weight: 750; }
.profit-donut-stage { position: relative; height: 310px; padding: 4px 12px 0; }
.profit-donut-stage canvas { width: 100%; height: 100%; cursor: grab; touch-action: none; }
.profit-donut-stage canvas:active { cursor: grabbing; }
.profit-donut-stage canvas:focus-visible { outline: 2px solid #3498db; outline-offset: -4px; border-radius: 10px; }
.profit-donut-readout { position: absolute; top: 50%; left: 50%; display: grid; width: 150px; justify-items: center; gap: 2px; pointer-events: none; text-align: center; transform: translate(-50%,-43%); }
.profit-donut-readout small { color: #71869a; font-size: .55rem; font-weight: 850; text-transform: uppercase; }
.profit-donut-readout strong { max-width: 150px; overflow: hidden; color: #173957; font-size: 1.12rem; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.profit-donut-readout span { max-width: 145px; overflow: hidden; color: #708398; font-size: .57rem; text-overflow: ellipsis; white-space: nowrap; }
.profit-donut-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px 12px; min-height: 36px; padding: 7px 12px 10px; }
.profit-donut-legend button { display: inline-flex; align-items: center; gap: 5px; padding: 3px 5px; border: 0; border-radius: 6px; background: transparent; color: #546b82; font-size: .56rem; cursor: pointer; }
.profit-donut-legend button:hover,.profit-donut-legend button.active { background: #edf6fc; color: #1f75ac; }
.profit-donut-legend i { width: 8px; height: 8px; border-radius: 50%; background: var(--legend-color); }
.profit-ranking { display: grid; padding: 6px 13px 10px; }
.profit-ranking > div { display: grid; grid-template-columns: 24px minmax(0,1fr) auto; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px solid #edf1f5; }
.profit-ranking > div:last-child { border-bottom: 0; }
.profit-rank-number { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 7px; background: #edf5fc; color: #2588c7; font-size: .57rem; font-weight: 900; }
.profit-rank-copy { display: grid; min-width: 0; gap: 2px; }
.profit-rank-copy strong { overflow: hidden; color: #29445f; font-size: .62rem; text-overflow: ellipsis; white-space: nowrap; }
.profit-rank-copy small { color: #8391a0; font-size: .53rem; }
.profit-rank-copy i { display: block; width: var(--profit-width); max-width: 100%; height: 3px; margin-top: 3px; border-radius: 999px; background: linear-gradient(90deg,#62b9ea,#2588c7); }
.profit-ranking b { color: #087b57; font-size: .62rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.profit-ranking .negative b { color: #b42338; }.profit-ranking .negative .profit-rank-copy i { background: #d94a5d; }
.profit-trend-card { margin-bottom: 10px; }
.profit-trend-card > header > span { color: #6f8296; font-size: .58rem; font-weight: 800; }
.profit-trend-stage { height: 220px; padding: 10px 14px 0; }
.profit-trend-stage canvas { width: 100%; height: 100%; }
.profit-trend-legend { display: flex; justify-content: center; gap: 18px; padding: 5px 12px 10px; }
.profit-trend-legend span { display: inline-flex; align-items: center; gap: 5px; color: #667b90; font-size: .55rem; font-weight: 750; }
.profit-trend-legend span::before { width: 17px; height: 3px; border-radius: 999px; background: #3498db; content: ''; }
.profit-trend-legend .cost::before { background: #8296aa; }.profit-trend-legend .utility::before { background: #14a677; }
.profit-detail-card { margin-bottom: 5px; }
.profit-detail-wrap { max-height: 430px; }
.profit-detail-wrap table { min-width: 1250px; font-size: .64rem; }
.profit-detail-wrap th { position: sticky; top: 0; z-index: 2; padding: 9px; background: #eaf2f8; font-size: .54rem; }
.profit-detail-wrap td { padding: 8px 9px; }
.profit-detail-wrap tfoot th,.profit-detail-wrap tfoot td { position: sticky; bottom: 0; z-index: 2; border-top: 2px solid #b9d8ef; background: #eaf4ff; color: #174f83; font-weight: 900; }
.profit-detail-value { color: #087b57; font-weight: 900; }.profit-detail-value.negative { color: #b42338; }
.profit-margin-chip { display: inline-flex; min-width: 55px; justify-content: center; padding: 3px 6px; border-radius: 999px; background: #e8f7f1; color: #087b57; font-weight: 900; }
.profit-margin-chip.negative { background: #ffe7ea; color: #b42338; }

@media screen and (max-width: 1150px) {
  .profit-filters form { grid-template-columns: repeat(3,1fr); }
  .profit-kpis { grid-template-columns: repeat(3,1fr); }
  .profit-visual-grid { grid-template-columns: 1fr; }
}
@media screen and (max-width: 700px) {
  .profit-filters form,.profit-kpis { grid-template-columns: 1fr; }
  .profit-rotate-controls span { display: none; }
  .profit-donut-stage { height: 260px; }
  .profit-donut-readout { width: 120px; }.profit-donut-readout strong { font-size: .9rem; }
  .profit-trend-card > header { align-items: flex-start; flex-direction: column; }
}
@media print {
  @page profitability-dashboard { size: landscape; margin: 8mm; }
  body.page-reports-profitability { page: profitability-dashboard; }
  .profit-kpis { grid-template-columns: repeat(5,1fr); }
  .profit-visual-grid { grid-template-columns: 1.7fr .7fr; }
  .profit-donut-stage { height: 260px; }
  .profit-detail-wrap { max-height: none; overflow: visible; }
}

/* LIVE CASH CONTROL ---------------------------------------------------- */
.page-reports-cash-cuts .content { padding-top: 9px !important; }
.cash-control-header { align-items: flex-end; margin-bottom: 10px; }
.cash-control-header h1 { margin: 2px 0; }
.cash-control-header p { margin: 0; color: #73869a; font-size: .68rem; }
.cash-control-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; padding: 7px; border: 1px solid #d8e4ee; border-radius: 11px; background: #fff; box-shadow: 0 5px 16px rgba(21,53,83,.045); }
.cash-control-tabs a { padding: 7px 11px; border-radius: 8px; color: #526d86; font-size: .65rem; font-weight: 850; text-decoration: none; }
.cash-control-tabs a:hover { background: #edf6fc; color: #217fbd; }
.cash-control-tabs a.active { background: #3498db; color: #fff; box-shadow: 0 5px 12px rgba(52,152,219,.22); }
.cash-live-status { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px; padding: 8px 11px; border: 1px solid #c6e5d8; border-radius: 9px; background: #f1faf6; color: #1d7458; }
.cash-live-status span { display: inline-flex; align-items: center; gap: 7px; font-size: .62rem; font-weight: 850; }
.cash-live-status span i { width: 8px; height: 8px; border-radius: 50%; background: #18a879; box-shadow: 0 0 0 4px rgba(24,168,121,.12); }
.cash-live-status small { color: #6b8277; font-size: .57rem; }
.cash-live-status.is-loading span i { animation: cash-live-pulse .8s ease-in-out infinite alternate; }
.cash-live-status.is-error { border-color: #efc4ca; background: #fff3f4; color: #b42338; }
.cash-live-status.is-error span i { background: #d1495b; box-shadow: 0 0 0 4px rgba(209,73,91,.12); }
@keyframes cash-live-pulse { to { opacity: .35; transform: scale(.72); } }
.cash-live-kpis { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 9px; margin-bottom: 10px; }
.cash-live-kpis article { position: relative; overflow: hidden; min-width: 0; padding: 12px 13px; border: 1px solid #d8e3ed; border-radius: 11px; background: #fff; box-shadow: 0 7px 18px rgba(20,53,87,.05); }
.cash-live-kpis article::after { position: absolute; top: -27px; right: -20px; width: 70px; height: 70px; border-radius: 50%; background: rgba(52,152,219,.07); content: ''; }
.cash-live-kpis span,.cash-live-kpis strong,.cash-live-kpis small { position: relative; z-index: 1; display: block; }
.cash-live-kpis span { color: #6e8297; font-size: .57rem; font-weight: 850; }
.cash-live-kpis strong { overflow: hidden; margin: 5px 0 2px; color: #193956; font-size: clamp(.96rem,1.45vw,1.25rem); font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.cash-live-kpis small { color: #8492a1; font-size: .53rem; }
.cash-live-kpis small b { color: inherit; }
.cash-live-kpis .featured { border-color: #2588c7; background: linear-gradient(125deg,#3498db,#2588c7); }
.cash-live-kpis .featured span,.cash-live-kpis .featured strong,.cash-live-kpis .featured small { color: #fff; }
.cash-live-kpis .income { border-color: #bce5d4; background: #f1fbf7; }.cash-live-kpis .income strong { color: #087b57; }
.cash-live-kpis .cash { border-color: #c4dcf1; background: #f2f8fd; }.cash-live-kpis .cash strong { color: #2578ad; }
.cash-live-panel { padding: 0; overflow: hidden; }
.cash-live-panel .panel-heading { padding: 13px 15px; border-bottom: 1px solid #dfe7ef; }
.cash-live-table-wrap { max-height: calc(100dvh - 355px); min-height: 250px; }
.cash-live-table { min-width: 1550px; font-size: .67rem; }
.cash-live-table th { position: sticky; top: 0; z-index: 2; padding: 9px 8px; background: #eef5fa; font-size: .54rem; white-space: nowrap; }
.cash-live-table td { padding: 9px 8px; }
.cash-live-table td:nth-child(n+6):nth-child(-n+11) { white-space: nowrap; }
.cash-live-table .button { white-space: nowrap; }
.cash-live-state { display: inline-flex; align-items: center; gap: 6px; padding: 5px 7px; border: 1px solid; border-radius: 999px; font-size: .54rem; font-weight: 900; white-space: nowrap; }
.cash-live-state i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.cash-live-state.operating { border-color: #b9e3d2; background: #effaf5; color: #087b57; }
.cash-live-state.available { border-color: #c9ddef; background: #f1f7fc; color: #39779f; }
.cash-live-state.idle { border-color: #efd5a7; background: #fff8e9; color: #95620e; }
.cash-live-state.inactive { border-color: #dce2e8; background: #f5f7f9; color: #788797; }
.cash-live-empty[hidden] { display: none; }

@media screen and (max-width: 1180px) {
  .cash-live-kpis { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .cash-live-table-wrap { max-height: none; }
}
@media screen and (max-width: 700px) {
  .cash-control-header { align-items: stretch; }
  .cash-control-header .actions { width: 100%; }
  .cash-control-header .button { flex: 1 1 auto; }
  .cash-control-tabs { display: grid; grid-template-columns: 1fr 1fr; }
  .cash-control-tabs a { text-align: center; }
  .cash-live-status { align-items: flex-start; flex-direction: column; }
  .cash-live-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media print {
  .cash-live-dashboard { display: none !important; }
}

/* CONSOLIDATED CASH-CUT DASHBOARD -------------------------------------- */
.page-reports-cash-consolidation .content { padding-top: 8px !important; }
.cash-consolidation-header { min-height: 44px; margin-bottom: 9px; }.cash-consolidation-header h1 { margin: 0; }
.cash-consolidation-filters { margin-bottom: 10px; padding: 10px 11px; }
.cash-consolidation-filters form { display: grid; grid-template-columns: 150px 150px minmax(210px,1fr) auto auto; align-items: end; gap: 8px; }
.cash-consolidation-filters label { display: grid; gap: 5px; color: #526a82; font-size: .62rem; font-weight: 850; }
.cash-consolidation-filters input,.cash-consolidation-filters select { min-height: 39px; padding-block: 8px; }
.cash-consolidation-kpis { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 9px; margin-bottom: 10px; }
.cash-consolidation-kpis article { position: relative; overflow: hidden; padding: 12px 14px; border: 1px solid #d7e3ed; border-radius: 11px; background: #fff; box-shadow: 0 7px 18px rgba(20,53,87,.05); }
.cash-consolidation-kpis article::after { position: absolute; top: -24px; right: -18px; width: 66px; height: 66px; border-radius: 50%; background: rgba(52,152,219,.07); content: ''; }
.cash-consolidation-kpis span,.cash-consolidation-kpis strong,.cash-consolidation-kpis small { position: relative; z-index: 1; display: block; }
.cash-consolidation-kpis span { color: #6d8196; font-size: .59rem; font-weight: 850; }
.cash-consolidation-kpis strong { margin: 5px 0 2px; color: #173451; font-size: clamp(1.02rem,1.5vw,1.26rem); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cash-consolidation-kpis small { color: #8391a0; font-size: .55rem; }
.cash-consolidation-kpis .primary { border-color: #2588c7; background: linear-gradient(125deg,#3498db,#2588c7); }.cash-consolidation-kpis .primary span,.cash-consolidation-kpis .primary strong,.cash-consolidation-kpis .primary small { color: #fff; }
.cash-consolidation-kpis .difference.shortage { border-color: #f1c3c9; background: #fff3f4; }.cash-consolidation-kpis .difference.shortage strong { color: #b42338; }
.cash-consolidation-kpis .difference.surplus { border-color: #b9e4d3; background: #effaf5; }.cash-consolidation-kpis .difference.surplus strong,.cash-consolidation-kpis .difference.balanced strong { color: #087b57; }
.cash-consolidation-empty { padding: 70px; text-align: center; }.cash-consolidation-empty strong { color: #233e59; }.cash-consolidation-empty p { margin: 5px 0 0; color: #75879a; }
.cash-flow-card { margin-bottom: 10px; padding: 0; overflow: hidden; }
.cash-flow-card > header,.cash-reconciliation-chart > header,.cash-difference-list > header,.cash-consolidation-detail > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; border-bottom: 1px solid #e0e8ef; }
.cash-flow-card h2,.cash-reconciliation-chart h2,.cash-difference-list h2,.cash-consolidation-detail h2 { margin: 0; color: #193550; font-size: .84rem; }
.cash-flow-card header p,.cash-reconciliation-chart header p,.cash-difference-list header p,.cash-consolidation-detail header p { margin: 3px 0 0; color: #8090a0; font-size: .57rem; }
.cash-flow-card header > span { padding: 4px 7px; border-radius: 999px; background: #e8f7f1; color: #087b57; font-size: .55rem; font-weight: 850; }
.cash-flow-equation { display: grid; grid-template-columns: repeat(15,auto); align-items: stretch; gap: 4px; overflow-x: auto; padding: 12px 14px; }
.cash-flow-equation article { display: grid; min-width: 92px; align-content: center; gap: 4px; padding: 9px 8px; border: 1px solid #dce5ed; border-radius: 9px; background: #f8fafc; }
.cash-flow-equation small { color: #718499; font-size: .51rem; font-weight: 800; }.cash-flow-equation strong { color: #203c58; font-size: .68rem; font-variant-numeric: tabular-nums; }
.cash-flow-equation > b { display: grid; place-items: center; color: #8a9aab; font-size: .82rem; }
.cash-flow-equation .income { border-color: #c2e8d9; background: #f2fbf7; }.cash-flow-equation .income strong { color: #087b57; }
.cash-flow-equation .outflow { border-color: #f0cdd1; background: #fff6f7; }.cash-flow-equation .outflow strong { color: #b42338; }
.cash-flow-equation .subtotal { border-color: #c7daec; background: #f1f7fd; }.cash-flow-equation .subtotal strong { color: #286c9e; }
.cash-flow-equation .total { border-color: #2588c7; background: linear-gradient(125deg,#3498db,#2588c7); }.cash-flow-equation .total small,.cash-flow-equation .total strong { color: #fff; }
.cash-flow-card > footer { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-top: 1px solid #e2e9ef; background: #f8fafc; }.cash-flow-card footer span { color: #63788e; font-size: .59rem; font-weight: 800; }.cash-flow-card footer strong { color: #276fa5; font-size: .72rem; }.cash-flow-card footer small { margin-left: auto; color: #8492a1; font-size: .54rem; }
.cash-consolidation-grid { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(280px,.65fr); gap: 10px; margin-bottom: 10px; }
.cash-reconciliation-chart,.cash-difference-list,.cash-consolidation-detail { padding: 0; overflow: hidden; }
.cash-reconciliation-chart > header > span { color: #728498; font-size: .57rem; font-weight: 800; }
.cash-reconciliation-chart > div { position: relative; height: 255px; padding: 8px 14px 0; }.cash-reconciliation-chart canvas { width: 100%; height: 100%; }
.cash-chart-tooltip { position: absolute; z-index: 3; display: grid; min-width: 145px; gap: 3px; padding: 8px 9px; border: 1px solid #cbdbe7; border-radius: 8px; background: rgba(255,255,255,.96); box-shadow: 0 8px 22px rgba(20,53,87,.14); color: #536b82; font-size: .55rem; pointer-events: none; transform: translate(-50%,-110%); }.cash-chart-tooltip strong { color: #1d3a56; font-size: .62rem; }.cash-chart-tooltip b { color: #087b57; font-variant-numeric: tabular-nums; }.cash-chart-tooltip b.negative { color: #b42338; }
.cash-reconciliation-chart > footer { display: flex; justify-content: center; gap: 18px; padding: 5px 12px 10px; }.cash-reconciliation-chart footer span { display: inline-flex; align-items: center; gap: 5px; color: #667b90; font-size: .55rem; font-weight: 750; }.cash-reconciliation-chart footer span::before { width: 12px; height: 7px; border-radius: 2px; background: #3498db; content: ''; }.cash-reconciliation-chart footer .counted::before { background: #14a677; }.cash-reconciliation-chart footer .variance::before { height: 3px; background: #d1495b; }
.cash-difference-list > div { display: grid; padding: 5px 13px 9px; }
.cash-difference-list article { display: grid; grid-template-columns: 36px minmax(0,1fr) auto; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px solid #edf1f5; }.cash-difference-list article:last-child { border-bottom: 0; }
.cash-difference-date { display: grid; width: 34px; height: 30px; place-items: center; border-radius: 7px; background: #eef4f9; color: #526e89; font-size: .57rem; font-weight: 900; }
.cash-difference-list article > span:nth-child(2) { display: grid; gap: 2px; }.cash-difference-list article strong { color: #2a445f; font-size: .62rem; }.cash-difference-list article small { color: #8291a0; font-size: .53rem; }.cash-difference-list article b { color: #b42338; font-size: .62rem; font-variant-numeric: tabular-nums; white-space: nowrap; }.cash-difference-list article.surplus b,.cash-difference-list article.balanced b { color: #087b57; }
.cash-consolidation-detail { margin-bottom: 5px; }
.cash-consolidation-table-wrap { max-height: 440px; }
.cash-consolidation-table-wrap table { min-width: 2150px; font-size: .62rem; }
.cash-consolidation-table-wrap th { position: sticky; top: 0; z-index: 2; padding: 9px 8px; background: #eaf2f8; font-size: .52rem; white-space: normal; }
.cash-consolidation-table-wrap th.sales-group { background: #e6f3fc; }.cash-consolidation-table-wrap th.collection-group { background: #e9f7f2; }.cash-consolidation-table-wrap th.movement-group { background: #f0f4fb; }.cash-consolidation-table-wrap th.expense-group { background: #fff3e6; }.cash-consolidation-table-wrap th.control-group { background: #e8f0ff; }
.cash-consolidation-table-wrap td { padding: 8px; white-space: nowrap; }
.cash-consolidation-table-wrap tfoot th,.cash-consolidation-table-wrap tfoot td { position: sticky; bottom: 0; z-index: 2; border-top: 2px solid #b9d8ef; background: #eaf4ff; color: #174f83; font-weight: 900; }
.cash-difference-chip { display: inline-flex; min-width: 76px; justify-content: center; padding: 3px 6px; border-radius: 999px; background: #ffe7ea; color: #b42338; font-weight: 900; }.cash-difference-chip.surplus,.cash-difference-chip.balanced { background: #e8f7f1; color: #087b57; }

@media screen and (max-width: 1120px) {
  .cash-consolidation-kpis { grid-template-columns: repeat(3,1fr); }
  .cash-consolidation-grid { grid-template-columns: 1fr; }
}
@media screen and (max-width: 700px) {
  .cash-consolidation-filters form,.cash-consolidation-kpis { grid-template-columns: 1fr; }
  .cash-flow-card footer { align-items: flex-start; flex-direction: column; }.cash-flow-card footer small { margin-left: 0; }
  .cash-reconciliation-chart > header { align-items: flex-start; flex-direction: column; }
}
@media print {
  @page cash-consolidation-dashboard { size: landscape; margin: 7mm; }
  body.page-reports-cash-consolidation { page: cash-consolidation-dashboard; }
  .cash-consolidation-kpis { grid-template-columns: repeat(5,1fr); }
  .cash-consolidation-grid { grid-template-columns: 1.65fr .65fr; }
  .cash-consolidation-table-wrap { max-height: none; overflow: visible; }
}

/* REFERENCE SKY-BLUE PALETTE -------------------------------------------- */
:root {
  --primary: #3498db;
  --primary-dark: #2176ad;
  --primary-light: #62b9ea;
  --primary-soft: #eff8fe;
  --primary-border: #b9dcf2;
}

.sidebar {
  background:
    radial-gradient(circle at 12% 0, rgba(255,255,255,.17), transparent 16rem),
    linear-gradient(180deg, #3498db 0%, #3498db 48%, #2c8dca 100%);
  border-right-color: rgba(255,255,255,.2);
  box-shadow: 10px 0 30px rgba(31,118,173,.16);
}
.sidebar .brand-mark {
  background: #fff;
  color: #3498db;
  box-shadow: 0 8px 20px rgba(16,92,145,.18);
}
.sidebar .brand small,
.nav-group-label,
.sidebar-user small,
.sidebar-user .link-button { color: rgba(255,255,255,.74); }
.sidebar .nav-group-label {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  width: 100%;
  margin: 0 0 6px;
  padding: 7px 9px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 8px;
  background: rgba(255,255,255,.085);
  color: rgba(255,255,255,.96);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-align: left;
  text-shadow: 0 1px 2px rgba(18,76,113,.28);
  transition: background .16s ease, border-color .16s ease;
}
.sidebar .nav-group-label:hover {
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.22);
}
.sidebar .nav-group-label::before {
  content: "";
  width: 3px;
  height: 13px;
  flex: 0 0 3px;
  border-radius: 999px;
  background: rgba(255,255,255,.9);
}
.sidebar .nav-group-label > span { flex: 1; }
.sidebar .nav-group-label > svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  transition: transform .18s ease;
}
.sidebar .nav-group.is-collapsed .nav-group-label > svg { transform: rotate(-90deg); }
.sidebar .nav-group-items[hidden] { display: none; }
body.sidebar-collapsed .sidebar .nav-group-items[hidden] { display: block; }
.sidebar nav .nav-link { color: rgba(255,255,255,.92); }
.sidebar nav .nav-link:hover { background: rgba(255,255,255,.11); }
.sidebar nav .nav-link.active {
  background: linear-gradient(90deg, rgba(37,152,236,.96), rgba(27,135,210,.9));
  border-color: rgba(255,255,255,.28);
  box-shadow: inset 4px 0 #ffad2f, 0 7px 18px rgba(23,102,157,.18);
}
body.sidebar-collapsed .sidebar nav .nav-link.active {
  border-color: rgba(255,255,255,.28);
  box-shadow: inset 3px 0 #ffad2f, 0 7px 18px rgba(23,102,157,.18);
}
.nav-icon,
.nav-link:hover .nav-icon,
.nav-link.active .nav-icon { color: #fff; }
.sidebar-user { border-top-color: rgba(255,255,255,.2); }
.sidebar-user .avatar { background: rgba(255,255,255,.18); color: #fff; }

.button.primary,
.pos-filter-chips button.active {
  border-color: #2598ec;
  background: linear-gradient(135deg, #2598ec, #3498db);
  box-shadow: 0 8px 18px rgba(52,152,219,.24);
}
.button.primary:hover,
.pos-filter-chips button.active:hover {
  background: linear-gradient(135deg, #3498db, #2588c7);
  box-shadow: 0 10px 22px rgba(52,152,219,.3);
}
.eyebrow { color: #2588c7; }

.metric.featured,
.current-session,
.report-detail-summary article.featured,
.inventory-kpi.primary,
.stock-query-kpis .primary,
.customer-record-hero,
.credit-collect-identity,
.credit-receipt-total,
.counter-client-header,
.counter-withdraw-dialog > form > header {
  border-color: #2588c7;
  background: linear-gradient(120deg, #3498db 0%, #2598ec 52%, #2588c7 100%);
}
.customer-record-tab.active {
  border-color: #2588c7;
  background: linear-gradient(135deg, #3498db, #2598ec);
  box-shadow: 0 8px 18px rgba(52,152,219,.24);
}
.counter-operation-tabs button.active {
  border-color: #62b9ea;
  background: #eff8fe;
  color: #2588c7;
  box-shadow: 0 6px 16px rgba(52,152,219,.12);
}

/* DAILY CASH-CUT MATRIX: PREVENT HEADER COLLISIONS ---------------------- */
@media screen {
  .cut-financial-matrix.daily-cut-matrix {
    width: 100%;
    min-width: max(100%, var(--daily-cut-min-width, 780px));
    table-layout: fixed;
  }
  .daily-cut-matrix tr > :first-child {
    width: 220px;
    min-width: 220px;
  }
  .daily-cut-matrix thead th {
    padding-inline: 9px;
    overflow-wrap: anywhere;
    white-space: normal;
    line-height: 1.2;
    text-align: center;
  }
  .daily-cut-matrix thead th:first-child { text-align: left; }

  .cut-instrument-cards.is-compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .cut-financial-matrix.session-cut-matrix {
    width: 100%;
    min-width: max(100%, var(--session-cut-min-width, 708px));
    table-layout: fixed;
  }
  .session-cut-matrix tr > :first-child {
    width: 260px;
    min-width: 260px;
  }
  .session-cut-matrix thead th {
    padding-inline: 9px;
    overflow-wrap: anywhere;
    white-space: normal;
    line-height: 1.2;
    text-align: center;
  }
  .session-cut-matrix thead th:first-child { text-align: left; }
}

@media screen and (max-width: 680px) {
  .cut-instrument-cards.is-compact {
    grid-template-columns: 1fr;
  }
}

/* SINGLE CASH-CUT RECONCILIATION ---------------------------------------- */
.cut-reconciliation-check {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 22px 22px;
  padding: 14px 16px;
  border: 1px solid #b9e4d3;
  border-radius: 10px;
  background: #effaf5;
  color: #176b4a;
}
.cut-reconciliation-check > div {
  display: grid;
  gap: 3px;
}
.cut-reconciliation-check small {
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.cut-reconciliation-check strong { font-size: .9rem; }
.cut-reconciliation-check > span {
  font-size: .78rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}
.cut-reconciliation-check.review {
  border-color: #f0c9a9;
  background: #fff7ed;
  color: #9a4d10;
}
.cut-credit-payments tfoot th,
.cut-savings-detail tfoot th { text-align: right; }
.cut-credit-payments tbody td:nth-child(n + 6),
.cut-credit-payments tfoot td,
.cut-savings-detail tbody td:nth-child(n + 7),
.cut-savings-detail tfoot td {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
@media screen and (max-width: 680px) {
  .cut-reconciliation-check {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* EXECUTIVE DASHBOARD -------------------------------------------------- */
.executive-dashboard {
  display: grid;
  gap: 14px;
  color: #17324f;
}
.executive-header { margin-bottom: 0; }
.executive-header h1 { letter-spacing: -.035em; }
.executive-header p { max-width: 720px; }
.executive-filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 14px;
}
.executive-filters form {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 9px;
}
.executive-filters label {
  display: grid;
  gap: 4px;
  min-width: 145px;
  color: #63778d;
  font-size: .67rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .045em;
}
.executive-filters select { min-width: 190px; }
.executive-filters input,
.executive-filters select { height: 39px; }
.executive-scope {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}
.executive-scope span,
.executive-credit-card > header > span,
.executive-instruments-card > header > span {
  border: 1px solid #d7e5f1;
  border-radius: 999px;
  background: #f6faff;
  padding: 6px 9px;
  color: #52708d;
  font-size: .66rem;
  font-weight: 800;
  white-space: nowrap;
}
.executive-notice {
  padding: 9px 13px;
  border: 1px solid #f0d19a;
  border-radius: 9px;
  background: #fff8e8;
  color: #8d5a05;
  font-size: .78rem;
  font-weight: 700;
}
.executive-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}
.executive-kpis article {
  position: relative;
  min-width: 0;
  min-height: 118px;
  overflow: hidden;
  border: 1px solid #d7e3ee;
  border-radius: 12px;
  background: #fff;
  padding: 16px;
  box-shadow: 0 7px 22px rgba(31,65,94,.06);
}
.executive-kpis article::after {
  position: absolute;
  top: -25px;
  right: -25px;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: rgba(38,144,214,.06);
  content: '';
}
.executive-kpis span,
.executive-kpis small,
.executive-kpis strong { display: block; }
.executive-kpis span { color: #687b91; font-size: .72rem; font-weight: 800; }
.executive-kpis strong {
  margin-top: 13px;
  color: #142e4c;
  font-size: clamp(1.18rem, 1.35vw, 1.55rem);
  line-height: 1;
  letter-spacing: -.035em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.executive-kpis small { margin-top: 9px; color: #7b8da0; font-size: .66rem; }
.executive-kpis .primary {
  border-color: transparent;
  background: linear-gradient(135deg,#137fc4,#35a4e5);
}
.executive-kpis .primary span,
.executive-kpis .primary strong,
.executive-kpis .primary small { color: #fff; }
.executive-kpis .positive { border-top: 3px solid #10a479; }
.executive-kpis .positive strong { color: #087e5c; }
.executive-kpis .collection { border-top: 3px solid #7458d4; }
.executive-kpis .savings { border-top: 3px solid #13a9a0; }
.executive-empty { padding: 34px; text-align: center; }
.executive-empty p { margin-bottom: 0; color: #71849a; }
.executive-main-grid,
.executive-secondary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, .75fr);
  gap: 14px;
}
.executive-secondary-grid { grid-template-columns: minmax(300px, .72fr) minmax(0, 1.4fr); }
.executive-dashboard .panel > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
  padding: 16px 18px 12px;
}
.executive-dashboard .panel > header h2 { margin: 0; color: #17324f; font-size: 1rem; }
.executive-dashboard .panel > header p { margin: 4px 0 0; color: #74869b; font-size: .72rem; }
.executive-dashboard .panel > header > span,
.executive-sales-card > header > span,
.executive-savings-card > header > span { color: #61768d; font-size: .7rem; font-weight: 800; white-space: nowrap; }
.executive-trend-card { min-width: 0; overflow: hidden; }
.executive-chart-tabs {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid #d8e4ef;
  border-radius: 8px;
  background: #f4f8fb;
}
.executive-chart-tabs button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  padding: 6px 9px;
  color: #62788f;
  font: inherit;
  font-size: .68rem;
  font-weight: 800;
  cursor: pointer;
}
.executive-chart-tabs button.active { background: #fff; color: #167fbe; box-shadow: 0 2px 7px rgba(35,75,110,.12); }
.executive-trend-stage { height: 290px; padding: 0 12px; }
.executive-trend-stage canvas { display: block; width: 100%; height: 100%; }
.executive-trend-card > footer {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
  padding: 7px 16px 14px;
  color: #62758b;
  font-size: .7rem;
  font-weight: 700;
}
.executive-trend-card > footer span { display: inline-flex; align-items: center; gap: 6px; }
.executive-trend-card > footer i { width: 9px; height: 9px; border-radius: 50%; background: var(--legend-color); }
.executive-sales-card { overflow: hidden; }
.executive-sale-total { padding: 7px 18px 14px; }
.executive-sale-total small,
.executive-sale-total strong { display: block; }
.executive-sale-total small { color: #73869a; font-size: .68rem; font-weight: 750; }
.executive-sale-total strong { margin-top: 4px; color: #163252; font-size: 1.75rem; letter-spacing: -.04em; }
.executive-sale-split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 18px 16px; }
.executive-sale-split > i {
  display: flex;
  grid-column: 1 / -1;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf3f8;
}
.executive-sale-split > i span:first-child { width: var(--share); background: linear-gradient(90deg,#238fd2,#42abe5); }
.executive-sale-split > i span:last-child { width: var(--share); background: linear-gradient(90deg,#6955cf,#8975e4); }
.executive-sale-split article { min-width: 0; }
.executive-sale-split article > span { display: flex; align-items: center; gap: 6px; color: #63778e; font-size: .68rem; font-weight: 800; }
.executive-sale-split article b.cash,
.executive-sale-split article b.credit { width: 8px; height: 8px; border-radius: 50%; background: #2d9ad8; }
.executive-sale-split article b.credit { background: #745fd6; }
.executive-sale-split article strong { display: block; margin-top: 7px; color: #183552; font-size: 1rem; }
.executive-sale-split article small { color: #8090a2; font-size: .62rem; }
.executive-sales-foot {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid #e3eaf1;
  background: #f8fafc;
}
.executive-sales-foot span { padding: 11px 10px; color: #718399; font-size: .61rem; text-align: center; }
.executive-sales-foot b { display: block; margin-top: 3px; color: #304d69; font-size: .69rem; }
.executive-credit-card { overflow: hidden; }
.executive-credit-card > header > strong { color: #244866; font-size: 1.35rem; white-space: nowrap; }
.executive-credit-components {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  border-block: 1px solid #e2eaf2;
  background: #e2eaf2;
}
.executive-credit-components article { min-width: 0; padding: 15px 16px; background: #fff; }
.executive-credit-components article::before { display: block; width: 28px; height: 3px; margin-bottom: 10px; border-radius: 9px; background: #318fc9; content: ''; }
.executive-credit-components .ordinary::before { background: #12a17b; }
.executive-credit-components .late::before { background: #e18d27; }
.executive-credit-components .tax::before { background: #765bd3; }
.executive-credit-components .fees::before { background: #8294a8; }
.executive-credit-components span,
.executive-credit-components strong,
.executive-credit-components small { display: block; }
.executive-credit-components span { color: #687c91; font-size: .68rem; font-weight: 800; }
.executive-credit-components strong { margin: 8px 0 5px; color: #173553; font-size: 1rem; white-space: nowrap; }
.executive-credit-components small { color: #8595a6; font-size: .62rem; line-height: 1.4; }
.executive-credit-total { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 13px 18px; background: #eff9f5; color: #087857; }
.executive-credit-total span { font-size: .75rem; font-weight: 800; }
.executive-credit-total small { display: block; margin-top: 2px; color: #5e8f7e; font-size: .62rem; font-weight: 600; }
.executive-credit-total strong { font-size: 1.15rem; }
.executive-savings-card { overflow: hidden; }
.executive-savings-balance { margin: 0 18px 13px; border-radius: 11px; background: linear-gradient(135deg,#0e927f,#21b5a2); padding: 18px; color: #fff; }
.executive-savings-balance.negative { background: linear-gradient(135deg,#b6404c,#d86069); }
.executive-savings-balance small,
.executive-savings-balance strong { display: block; }
.executive-savings-balance small { font-size: .68rem; font-weight: 800; opacity: .85; }
.executive-savings-balance strong { margin-top: 6px; font-size: 1.65rem; letter-spacing: -.04em; }
.executive-savings-flow { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; padding: 0 18px; }
.executive-savings-flow article { border: 1px solid #dfe8ef; border-radius: 9px; padding: 11px; }
.executive-savings-flow span,
.executive-savings-flow strong { display: block; }
.executive-savings-flow span { color: #74879b; font-size: .65rem; font-weight: 800; }
.executive-savings-flow strong { margin-top: 6px; color: #0a8865; font-size: .88rem; }
.executive-savings-flow article:last-child strong { color: #b84150; }
.executive-definition { margin: 13px 18px 17px; color: #7b8d9f; font-size: .63rem; line-height: 1.45; }
.executive-departments-card > header a { color: #2089ca; font-size: .7rem; font-weight: 800; white-space: nowrap; }
.executive-department-list { display: grid; gap: 11px; padding: 4px 18px 18px; }
.executive-department-list article { display: grid; grid-template-columns: minmax(125px, .7fr) minmax(120px, 1.2fr) auto; align-items: center; gap: 12px; }
.executive-department-list span strong,
.executive-department-list span small { display: block; }
.executive-department-list span strong { overflow: hidden; color: #24425f; font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.executive-department-list span small { margin-top: 2px; color: #8393a3; font-size: .59rem; }
.executive-department-list i { height: 7px; overflow: hidden; border-radius: 99px; background: #edf2f6; }
.executive-department-list i b { display: block; width: var(--width); height: 100%; border-radius: inherit; background: linear-gradient(90deg,#258fd0,#29b295); }
.executive-department-list em { min-width: 82px; color: #087c5b; font-size: .7rem; font-style: normal; font-weight: 800; text-align: right; }
.executive-department-list em.negative { color: #b43c4b; }
.executive-no-data { color: #7b8da0; font-size: .75rem; }
.executive-instruments-card,
.executive-daily-card { overflow: hidden; }
.executive-instrument-summary {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}
.executive-instrument-summary span {
  display: grid;
  gap: 2px;
  border: 1px solid #d8e5f0;
  border-radius: 8px;
  background: #f6faff;
  padding: 6px 9px;
  color: #6d8094;
  font-size: .58rem;
  font-weight: 750;
  text-transform: uppercase;
  white-space: nowrap;
}
.executive-instrument-summary b { color: #1b577f; font-size: .7rem; font-variant-numeric: tabular-nums; }
.executive-instruments-card .table-wrap,
.executive-daily-card .table-wrap { border-top: 1px solid #dfe8f0; }
.executive-instruments-card table,
.executive-daily-card table { margin: 0; min-width: 850px; }
.executive-instruments-card th,
.executive-instruments-card td,
.executive-daily-card th,
.executive-daily-card td { padding: 11px 13px; font-size: .68rem; }
.executive-instruments-card tbody th { color: #35536e; text-align: left; }
.executive-instruments-card tbody th small { display: block; margin-top: 2px; color: #8494a4; font-size: .58rem; font-weight: 600; }
.executive-instruments-card .muted-cell { background: #faf8ff; color: #725ec1; }
.executive-instruments-card tfoot th,
.executive-instruments-card tfoot td { background: #eaf4ff; color: #17558b; }
.executive-daily-card .positive-value { color: #087e5d; font-weight: 800; }
.executive-accounting-note {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  border: 1px solid #dce6ef;
  border-radius: 10px;
  background: #f7fafc;
  padding: 9px 12px;
  color: #687d92;
  font-size: .64rem;
}
.executive-accounting-note strong { margin-right: 4px; color: #31516f; }
.executive-accounting-note span { padding: 4px 7px; border-radius: 6px; background: #fff; }

@media screen and (max-width: 1280px) {
  .executive-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .executive-filters { align-items: flex-start; flex-direction: column; }
  .executive-scope { justify-content: flex-start; }
}
@media screen and (max-width: 980px) {
  .executive-main-grid,
  .executive-secondary-grid { grid-template-columns: 1fr; }
  .executive-credit-components { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .executive-credit-components article:last-child { grid-column: 1 / -1; }
}
@media screen and (max-width: 680px) {
  .executive-dashboard { gap: 10px; }
  .executive-kpis { grid-template-columns: 1fr 1fr; gap: 8px; }
  .executive-kpis article { min-height: 104px; padding: 13px; }
  .executive-kpis strong { white-space: normal; }
  .executive-filters form,
  .executive-filters label,
  .executive-filters select { width: 100%; }
  .executive-filters .button { flex: 1; }
  .executive-dashboard .panel > header { flex-direction: column; }
  .executive-trend-stage { height: 245px; padding: 0 5px; }
  .executive-credit-components { grid-template-columns: 1fr; }
  .executive-credit-components article:last-child { grid-column: auto; }
  .executive-sale-split,
  .executive-savings-flow { grid-template-columns: 1fr; }
  .executive-sale-split > i { grid-column: auto; }
  .executive-department-list article { grid-template-columns: minmax(110px, .8fr) 1fr auto; gap: 7px; }
}

@media print {
  .executive-dashboard { gap: 8px; }
  .executive-kpis { grid-template-columns: repeat(6, 1fr); }
  .executive-kpis article { min-height: 90px; padding: 10px; box-shadow: none; }
  .executive-main-grid { grid-template-columns: 1.5fr .8fr; }
  .executive-secondary-grid { grid-template-columns: .75fr 1.25fr; }
  .executive-trend-stage { height: 220px; }
  .executive-credit-components article { padding: 10px; }
}

/* PORTFOLIO ANALYSIS DASHBOARD ---------------------------------------- */
.portfolio-dashboard {
  display: grid;
  gap: 14px;
  color: #17324f;
}
.portfolio-header { margin-bottom: 0; }
.portfolio-header h1 { margin-top: 3px; letter-spacing: -.035em; }
.portfolio-header p { max-width: 690px; }
.portfolio-eyebrow {
  color: #238cc9;
  font-size: .67rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.portfolio-filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 14px;
}
.portfolio-filters form {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 9px;
}
.portfolio-filters label {
  display: grid;
  gap: 4px;
  min-width: 150px;
  color: #63778d;
  font-size: .67rem;
  font-weight: 800;
  letter-spacing: .045em;
  text-transform: uppercase;
}
.portfolio-filters .portfolio-search { min-width: 260px; }
.portfolio-filters input,
.portfolio-filters select { height: 39px; }
.portfolio-filter-scope {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}
.portfolio-filter-scope span,
.portfolio-dashboard .panel > header > span {
  border: 1px solid #d7e5f1;
  border-radius: 999px;
  background: #f6faff;
  padding: 6px 9px;
  color: #52708d;
  font-size: .65rem;
  font-weight: 800;
  white-space: nowrap;
}
.portfolio-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.portfolio-kpi {
  position: relative;
  min-width: 0;
  min-height: 120px;
  overflow: hidden;
  border: 1px solid #d7e3ee;
  border-top: 3px solid #8aa3b8;
  border-radius: 12px;
  background: #fff;
  padding: 16px;
  box-shadow: 0 7px 22px rgba(31,65,94,.06);
}
.portfolio-kpi::after {
  position: absolute;
  top: -28px;
  right: -25px;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: rgba(38,144,214,.06);
  content: '';
}
.portfolio-kpi > span,
.portfolio-kpi > strong,
.portfolio-kpi > small { display: block; }
.portfolio-kpi > span { color: #687b91; font-size: .71rem; font-weight: 800; }
.portfolio-kpi > strong {
  margin-top: 13px;
  color: #142e4c;
  font-size: clamp(1.16rem, 1.45vw, 1.55rem);
  line-height: 1;
  letter-spacing: -.035em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.portfolio-kpi > small { margin-top: 9px; color: #7b8da0; font-size: .65rem; }
.portfolio-kpi.primary {
  border-color: transparent;
  background: linear-gradient(135deg,#126da9,#2b9ddc);
}
.portfolio-kpi.primary > span,
.portfolio-kpi.primary > strong,
.portfolio-kpi.primary > small { color: #fff; }
.portfolio-kpi.overdue { border-top-color: #df5d68; }
.portfolio-kpi.overdue > strong { color: #bc3647; }
.portfolio-kpi.ratio { border-top-color: #e69a2e; }
.portfolio-kpi.ratio > strong { color: #b96b09; }
.portfolio-kpi.at-risk { border-top-color: #a74961; }
.portfolio-kpi.at-risk > strong { color: #a9364f; }
.portfolio-kpi.compliance { border-top-color: #14a67c; }
.portfolio-kpi.compliance > strong { color: #087d5c; }
.portfolio-trend-card { min-width: 0; margin-bottom: 0; }
.portfolio-trend-card > header { align-items: center !important; }
.portfolio-trend-legend { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 14px; }
.portfolio-trend-legend span { display: inline-flex; align-items: center; gap: 6px; color: #60758a; font-size: .67rem; font-weight: 850; white-space: nowrap; }
.portfolio-trend-legend i { width: 11px; height: 11px; border-radius: 3px; background: #3498db; }
.portfolio-trend-legend .balance i { height: 3px; border-radius: 99px; background: #765bd3; box-shadow: 0 0 0 3px rgba(118,91,211,.12); }
.portfolio-trend-stage { position: relative; height: 285px; padding: 8px 12px 0; background: linear-gradient(180deg,#fff,#fbfdff); }
.portfolio-trend-stage canvas { display: block; width: 100%; height: 100%; cursor: pointer; }
.portfolio-trend-stage canvas:focus-visible { outline: 2px solid #3498db; outline-offset: -4px; border-radius: 8px; }
.portfolio-trend-tooltip { position: absolute; z-index: 3; min-width: 150px; pointer-events: none; border: 1px solid #d6e2ec; border-radius: 9px; background: rgba(255,255,255,.97); padding: 8px 10px; color: #536a80; font-size: .64rem; line-height: 1.45; box-shadow: 0 9px 25px rgba(18,48,79,.16); transform: translate(-50%,-100%); }
.portfolio-trend-tooltip strong { display: block; margin-bottom: 3px; color: #193550; font-size: .72rem; }
.portfolio-trend-tooltip span { display: block; white-space: nowrap; }
.portfolio-trend-tooltip b { color: #6848c4; }
.portfolio-trend-drilldown { border-top: 1px solid #dce7ef; background: linear-gradient(135deg,#f7fbfe,#f8f6fd); padding: 12px 14px 14px; }
.portfolio-trend-drilldown[hidden] { display: none; }
.portfolio-trend-drilldown > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.portfolio-trend-drilldown > header > div { display: grid; gap: 2px; }
.portfolio-trend-drilldown > header span { color: #238cc9; font-size: .56rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.portfolio-trend-drilldown > header strong { color: #193550; font-size: .86rem; }
.portfolio-trend-drilldown > header small { color: #71869a; font-size: .62rem; }
.portfolio-trend-drilldown > header button { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid #d4e1eb; border-radius: 8px; background: #fff; color: #587086; font-size: 1.1rem; line-height: 1; cursor: pointer; }
.portfolio-trend-drilldown > header button:hover { border-color: #efb2b8; background: #fff1f2; color: #b63243; }
.portfolio-trend-drilldown > div { display: grid; grid-template-columns: repeat(auto-fit,minmax(255px,1fr)); gap: 7px; }
.portfolio-trend-user-row { display: grid; grid-template-columns: 26px minmax(0,1fr) auto 16px; align-items: center; gap: 9px; min-width: 0; border: 1px solid #dce6ee; border-radius: 9px; background: #fff; padding: 9px 10px; color: inherit; text-decoration: none; transition: border-color .15s ease,box-shadow .15s ease,transform .15s ease; }
.portfolio-trend-user-row:hover { border-color: #8871d8; box-shadow: 0 5px 14px rgba(81,58,160,.1); transform: translateY(-1px); }
.portfolio-trend-user-row > b { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 7px; background: #f1edfb; color: #7152b5; font-size: .62rem; }
.portfolio-trend-user-row > div { display: grid; min-width: 0; gap: 3px; }
.portfolio-trend-user-row strong { overflow: hidden; color: #29445f; font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.portfolio-trend-user-row small { color: #7b8da0; font-size: .59rem; }
.portfolio-trend-user-row i { display: block; width: var(--width); height: 4px; border-radius: 99px; background: linear-gradient(90deg,#55b1e3,#765bd3); }
.portfolio-trend-user-row > span { color: #6848c4; font-size: .68rem; font-weight: 900; font-variant-numeric: tabular-nums; white-space: nowrap; }
.portfolio-trend-user-row > em { color: #91a0ae; font-size: 1rem; font-style: normal; }
.portfolio-trend-card > footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 14px 10px; border-top: 1px solid #e4ebf2; background: #fafcfe; color: #75879a; }
.portfolio-trend-card > footer span { border-radius: 999px; background: #edf5fb; padding: 4px 8px; color: #3f6787; font-size: .61rem; font-weight: 850; }
.portfolio-trend-card > footer small { font-size: .59rem; }
.portfolio-empty {
  display: grid;
  place-items: center;
  min-height: 260px;
  padding: 34px;
  text-align: center;
}
.portfolio-empty > span { font-size: 1.8rem; }
.portfolio-empty > strong { margin-top: 10px; font-size: 1rem; }
.portfolio-empty > p { margin: 6px 0 0; color: #71849a; font-size: .78rem; }
.portfolio-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr);
  gap: 14px;
}
.portfolio-dashboard .panel { overflow: hidden; }
.portfolio-dashboard .panel > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
  padding: 16px 18px 12px;
}
.portfolio-dashboard .panel > header h2 { margin: 0; color: #17324f; font-size: 1rem; }
.portfolio-dashboard .panel > header p { margin: 4px 0 0; color: #74869b; font-size: .71rem; }
.portfolio-dashboard .panel > header a { color: #2089ca; font-size: .7rem; font-weight: 800; white-space: nowrap; }
.portfolio-health-body {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  padding: 8px 20px 22px;
}
.portfolio-health-ring {
  display: grid;
  width: 172px;
  height: 172px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(#16a27b 0 var(--health-angle),#edf2f6 var(--health-angle) 360deg);
  box-shadow: inset 0 0 0 1px rgba(11,104,77,.08);
}
.portfolio-health-ring::before {
  grid-area: 1 / 1;
  width: 126px;
  height: 126px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 5px 18px rgba(28,64,91,.08);
  content: '';
}
.portfolio-health-ring > div { z-index: 1; grid-area: 1 / 1; text-align: center; }
.portfolio-health-ring strong,
.portfolio-health-ring span { display: block; }
.portfolio-health-ring strong { color: #087e5d; font-size: 1.75rem; letter-spacing: -.05em; }
.portfolio-health-ring span { margin-top: 3px; color: #71859a; font-size: .65rem; font-weight: 800; text-transform: uppercase; }
.portfolio-health-breakdown { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.portfolio-health-breakdown article {
  min-width: 0;
  border: 1px solid #dfe7ef;
  border-radius: 10px;
  background: #f9fbfd;
  padding: 12px;
}
.portfolio-health-breakdown article:last-child { grid-column: 1 / -1; }
.portfolio-health-breakdown article.healthy { border-color: #bee3d6; background: #f1fbf7; }
.portfolio-health-breakdown article.late { border-color: #f0c9cd; background: #fff6f6; }
.portfolio-health-breakdown span,
.portfolio-health-breakdown strong,
.portfolio-health-breakdown small { display: block; }
.portfolio-health-breakdown span { color: #73869a; font-size: .64rem; font-weight: 800; }
.portfolio-health-breakdown strong { margin-top: 7px; color: #173451; font-size: .93rem; white-space: nowrap; }
.portfolio-health-breakdown .healthy strong { color: #087e5d; }
.portfolio-health-breakdown .late strong { color: #bc3647; }
.portfolio-health-breakdown small { margin-top: 4px; color: #8191a1; font-size: .59rem; }
.portfolio-risk-list { display: grid; gap: 13px; padding: 7px 18px 21px; }
.portfolio-risk-trigger {
  position: relative;
  display: grid;
  grid-template-columns: minmax(120px, .75fr) minmax(100px, 1fr) minmax(100px, .65fr);
  align-items: center;
  gap: 11px;
  width: calc(100% + 12px);
  margin: -5px -6px;
  padding: 5px 22px 5px 6px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.portfolio-risk-trigger::after {
  position: absolute;
  right: 7px;
  color: #9aabba;
  font-size: .95rem;
  content: '\203A';
  transition: transform .16s ease;
}
.portfolio-risk-trigger:hover { background: #f3f8fc; }
.portfolio-risk-trigger:hover::after { color: #238cca; transform: translateX(2px); }
.portfolio-risk-trigger:focus-visible { outline: 2px solid #3498db; outline-offset: 2px; }
.portfolio-risk-trigger > div:first-child {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 7px;
}
.portfolio-risk-trigger > div:first-child small { grid-column: 2; }
.portfolio-risk-list strong,
.portfolio-risk-list small { display: block; }
.portfolio-risk-list strong { overflow: hidden; color: #27445f; font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.portfolio-risk-list small { margin-top: 2px; color: #8393a3; font-size: .58rem; }
.portfolio-risk-total { text-align: right; }
.risk-dot { width: 9px; height: 9px; border-radius: 50%; background: #8da0b1; }
.risk-dot.low,.portfolio-risk-bar i.low { background: #13a27a; }
.risk-dot.medium,.portfolio-risk-bar i.medium { background: #e49a2e; }
.risk-dot.high,.portfolio-risk-bar i.high { background: #d95562; }
.risk-dot.neutral,.portfolio-risk-bar i.neutral { background: #7d8fa1; }
.portfolio-risk-bar { height: 7px; overflow: hidden; border-radius: 99px; background: #edf2f6; }
.portfolio-risk-bar i { display: block; width: var(--width); height: 100%; border-radius: inherit; }
.portfolio-no-data { color: #7b8da0; font-size: .75rem; }
.portfolio-concentration {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: auto;
  padding: 13px 18px 18px;
  border-top: 1px solid #e2eaf1;
  background: #f8fbfd;
}
.portfolio-concentration article { min-width: 0; }
.portfolio-concentration span,
.portfolio-concentration strong,
.portfolio-concentration small { display: block; }
.portfolio-concentration span { color: #74879a; font-size: .58rem; font-weight: 850; text-transform: uppercase; }
.portfolio-concentration strong { margin-top: 5px; color: #193955; font-size: .78rem; white-space: nowrap; }
.portfolio-concentration small { margin-top: 3px; overflow: hidden; color: #8494a3; font-size: .56rem; text-overflow: ellipsis; white-space: nowrap; }
.portfolio-risk-card { display: flex; flex-direction: column; }

body.portfolio-risk-modal-open { overflow: hidden; }
.portfolio-risk-dialog {
  width: min(1180px, calc(100vw - 36px));
  max-width: none;
  height: min(760px, calc(100dvh - 36px));
  max-height: none;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  background: #f5f8fb;
  color: #17324f;
  box-shadow: 0 34px 100px rgba(5,20,39,.42);
}
.portfolio-risk-dialog[open] { display: flex; flex-direction: column; }
.portfolio-risk-dialog::backdrop { background: rgba(5,18,37,.68); backdrop-filter: blur(5px); }
.portfolio-risk-dialog-header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  padding: 11px 15px 11px 19px;
  border-bottom: 1px solid #dce5ee;
  background: #fff;
}
.portfolio-risk-dialog-heading { display: flex; align-items: center; gap: 11px; min-width: 0; }
.portfolio-risk-dialog-heading > div { min-width: 0; }
.portfolio-risk-dialog-heading small,
.portfolio-risk-dialog-heading strong { display: block; }
.portfolio-risk-dialog-heading small { color: #71859a; font-size: .61rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.portfolio-risk-dialog-heading strong { margin-top: 2px; overflow: hidden; color: #173451; font-size: 1rem; text-overflow: ellipsis; white-space: nowrap; }
.portfolio-risk-dialog-mark { width: 12px; height: 42px; border-radius: 99px; background: #8295a8; }
.portfolio-risk-dialog-mark.low { background: #13a27a; }
.portfolio-risk-dialog-mark.medium { background: #e49a2e; }
.portfolio-risk-dialog-mark.high { background: #d95562; }
.portfolio-risk-dialog-header > button {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: #edf2f7;
  color: #607287;
  font-size: 1.6rem;
  line-height: 1;
}
.portfolio-risk-dialog-header > button:hover { background: #e2eaf2; color: #173451; }
.portfolio-risk-dialog-body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 16px 18px; }
.portfolio-risk-detail-panel { min-height: 100%; }
.portfolio-risk-detail-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin-bottom: 13px; }
.portfolio-risk-detail-summary article { border: 1px solid #dbe5ee; border-radius: 11px; background: #fff; padding: 12px 14px; }
.portfolio-risk-detail-summary span,
.portfolio-risk-detail-summary strong,
.portfolio-risk-detail-summary small { display: block; }
.portfolio-risk-detail-summary span { color: #73869a; font-size: .61rem; font-weight: 850; text-transform: uppercase; }
.portfolio-risk-detail-summary strong { margin-top: 7px; color: #173451; font-size: 1rem; }
.portfolio-risk-detail-summary small { margin-top: 4px; color: #8292a2; font-size: .59rem; }
.portfolio-risk-detail-summary .overdue strong { color: #b63243; }
.portfolio-risk-detail-tools { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin-bottom: 10px; }
.portfolio-risk-detail-tools label { display: grid; gap: 5px; width: min(390px, 100%); }
.portfolio-risk-detail-tools label span { color: #65798e; font-size: .63rem; font-weight: 850; text-transform: uppercase; }
.portfolio-risk-detail-tools input { height: 39px; }
.portfolio-risk-detail-tools > span { color: #71859a; font-size: .68rem; font-weight: 800; }
.portfolio-risk-detail-table-wrap { max-height: 430px; border: 1px solid #dce5ee; border-radius: 11px; background: #fff; }
.portfolio-risk-detail-table-wrap table { margin: 0; min-width: 860px; }
.portfolio-risk-detail-table-wrap thead { position: sticky; top: 0; z-index: 1; }
.portfolio-risk-detail-table-wrap th,
.portfolio-risk-detail-table-wrap td { padding: 10px 12px; font-size: .67rem; }
.portfolio-risk-detail-table-wrap td:first-child strong,
.portfolio-risk-detail-table-wrap td:first-child small { display: block; }
.portfolio-risk-detail-table-wrap td:first-child strong { color: #24445f; }
.portfolio-risk-detail-table-wrap td:first-child small { margin-top: 3px; color: #8192a3; font-size: .58rem; }
.portfolio-risk-sale-link {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #238cca;
  font: inherit;
  font-weight: 800;
  text-decoration: underline dotted;
  text-underline-offset: 2px;
  cursor: pointer;
}
.portfolio-risk-sale-link:hover { color: #126da9; text-decoration-style: solid; }
.portfolio-risk-sale-link:focus-visible { border-radius: 2px; outline: 2px solid #3498db; outline-offset: 2px; }
.portfolio-risk-detail-empty { padding: 38px 20px; border: 1px dashed #cfdbe6; border-radius: 11px; background: #fff; color: #718398; font-size: .75rem; text-align: center; }
.portfolio-risk-dialog > footer { display: flex; flex: 0 0 auto; justify-content: flex-end; padding: 11px 18px; border-top: 1px solid #dce5ee; background: #fff; }
.portfolio-aging-grid { display: grid; gap: 0; border-top: 1px solid #e2eaf1; }
.portfolio-aging-grid > article {
  display: grid;
  grid-template-columns: minmax(175px, .8fr) minmax(240px, 1.7fr) minmax(120px, .55fr);
  align-items: center;
  gap: 18px;
  min-height: 68px;
  padding: 10px 18px;
  border-bottom: 1px solid #e8eef3;
}
.portfolio-aging-grid > article:last-child { border-bottom: 0; }
.portfolio-aging-grid > article > div span,
.portfolio-aging-grid > article > div strong,
.portfolio-aging-grid > article > div small { display: block; }
.portfolio-aging-grid > article > div span { color: #5f7489; font-size: .65rem; font-weight: 900; letter-spacing: .035em; }
.portfolio-aging-grid > article > div strong { margin-top: 4px; color: #1e3e59; font-size: .83rem; }
.portfolio-aging-grid > article > div small { margin-top: 3px; color: #8494a4; font-size: .59rem; }
.portfolio-aging-grid > article > i { height: 9px; overflow: hidden; border-radius: 99px; background: #edf2f6; }
.portfolio-aging-grid > article > i b { display: block; width: var(--width); min-width: 2px; height: 100%; border-radius: inherit; background: #718da5; }
.portfolio-aging-grid .aging-1 > i b { background: #13a27a; }
.portfolio-aging-grid .aging-2 > i b { background: #74b57d; }
.portfolio-aging-grid .aging-3 > i b { background: #dfb438; }
.portfolio-aging-grid .aging-4 > i b { background: #e58c31; }
.portfolio-aging-grid .aging-5 > i b { background: #dd665d; }
.portfolio-aging-grid .aging-6 > i b { background: #b9374a; }
.portfolio-aging-overdue { text-align: right; }
.portfolio-aging-overdue small,
.portfolio-aging-overdue strong { display: block; }
.portfolio-aging-overdue small { color: #8695a5; font-size: .58rem; font-weight: 750; text-transform: uppercase; }
.portfolio-aging-overdue strong { margin-top: 4px; color: #a94450; font-size: .74rem; }
.portfolio-priority-card .table-wrap { border-top: 1px solid #dfe8f0; }
.portfolio-priority-card table { margin: 0; min-width: 930px; }
.portfolio-priority-card th,
.portfolio-priority-card td { padding: 11px 13px; font-size: .68rem; }
.portfolio-priority-card td:first-child strong,
.portfolio-priority-card td:first-child small { display: block; }
.portfolio-priority-card td:first-child strong { max-width: 260px; overflow: hidden; color: #23415e; text-overflow: ellipsis; white-space: nowrap; }
.portfolio-priority-card td:first-child small { margin-top: 3px; color: #8292a2; font-size: .58rem; }
.portfolio-risk-badge {
  display: inline-flex;
  border-radius: 999px;
  background: #edf2f6;
  padding: 5px 8px;
  color: #536b80;
  font-size: .59rem;
  font-weight: 900;
  white-space: nowrap;
}
.portfolio-risk-badge.low { background: #e9f8f2; color: #087b5b; }
.portfolio-risk-badge.medium { background: #fff5df; color: #a76208; }
.portfolio-risk-badge.high { background: #fff0f1; color: #b63243; }
.portfolio-overdue-value { color: #b63243; font-weight: 900; }
.portfolio-priority-empty { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 145px; padding: 24px; }
.portfolio-priority-empty > span { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; background: #e9f8f2; color: #087b5b; font-weight: 900; }
.portfolio-priority-empty strong { color: #24445f; font-size: .85rem; }
.portfolio-priority-empty p { margin: 4px 0 0; color: #7b8da0; font-size: .7rem; }
.portfolio-method-note {
  border: 1px solid #dce6ef;
  border-radius: 10px;
  background: #f7fafc;
  padding: 9px 12px;
  color: #687d92;
  font-size: .64rem;
}
.portfolio-method-note strong { color: #31516f; }

@media screen and (max-width: 1280px) {
  .portfolio-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .portfolio-filters { align-items: flex-start; flex-direction: column; }
  .portfolio-filter-scope { justify-content: flex-start; }
}
@media screen and (max-width: 980px) {
  .portfolio-main-grid { grid-template-columns: 1fr; }
}
@media screen and (max-width: 680px) {
  .portfolio-dashboard { gap: 10px; }
  .portfolio-kpis { grid-template-columns: 1fr 1fr; gap: 8px; }
  .portfolio-kpi { min-height: 106px; padding: 13px; }
  .portfolio-kpi.primary { grid-column: 1 / -1; }
  .portfolio-kpi > strong { white-space: normal; }
  .portfolio-filters form,
  .portfolio-filters label,
  .portfolio-filters .portfolio-search,
  .portfolio-filters input,
  .portfolio-filters select { width: 100%; }
  .portfolio-filters .button { flex: 1; }
  .portfolio-dashboard .panel > header { flex-direction: column; }
  .portfolio-trend-legend { justify-content: flex-start; }
  .portfolio-trend-stage { height: 235px; padding-inline: 4px; }
  .portfolio-trend-drilldown > div { grid-template-columns: 1fr; }
  .portfolio-trend-user-row { grid-template-columns: 25px minmax(0,1fr) auto 14px; }
  .portfolio-trend-card > footer { align-items: flex-start; flex-direction: column; }
  .portfolio-health-body { grid-template-columns: 1fr; justify-items: center; }
  .portfolio-health-breakdown { width: 100%; }
  .portfolio-risk-trigger { grid-template-columns: minmax(110px, .75fr) 1fr; }
  .portfolio-risk-total { grid-column: 2; }
  .portfolio-concentration { grid-template-columns: 1fr; }
  .portfolio-concentration article {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    gap: 3px 10px;
  }
  .portfolio-concentration strong { text-align: right; }
  .portfolio-concentration small { grid-column: 1 / -1; }
  .portfolio-aging-grid > article { grid-template-columns: 1fr minmax(100px, 1fr); gap: 10px; }
  .portfolio-aging-overdue { grid-column: 2; }
  .portfolio-risk-dialog { width: calc(100vw - 8px); height: calc(100dvh - 8px); border-radius: 13px; }
  .portfolio-risk-dialog-header { min-height: 60px; padding: 9px 10px 9px 13px; }
  .portfolio-risk-dialog-body { padding: 11px; }
  .portfolio-risk-detail-summary { grid-template-columns: 1fr 1fr; gap: 7px; }
  .portfolio-risk-detail-summary article { padding: 10px 11px; }
  .portfolio-risk-detail-tools { align-items: stretch; flex-direction: column; }
  .portfolio-risk-detail-tools label { width: 100%; }
  .portfolio-risk-detail-table-wrap { max-height: none; }
}

@media print {
  .portfolio-dashboard { gap: 8px; }
  .portfolio-kpis { grid-template-columns: repeat(5, 1fr); }
  .portfolio-kpi { min-height: 94px; padding: 10px; box-shadow: none; }
  .portfolio-main-grid { grid-template-columns: 1.1fr .9fr; }
  .portfolio-health-body { grid-template-columns: 145px 1fr; gap: 12px; padding: 4px 14px 14px; }
  .portfolio-health-ring { width: 132px; height: 132px; }
  .portfolio-health-ring::before { width: 96px; height: 96px; }
  .portfolio-health-ring strong { font-size: 1.35rem; }
  .portfolio-priority-card table { min-width: 0; }
}

/* CLOSED CREDIT RECONCILIATION ------------------------------------------ */
.page-reports-closed-credits .content { padding-top: 10px; }
.portfolio-full-detail { overflow: hidden; }
.portfolio-full-detail > header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 17px 12px; border-bottom: 1px solid #dce6ef; }
.portfolio-full-detail > header h2 { margin: 3px 0 4px; color: #183b59; font-size: 1rem; }
.portfolio-full-detail > header p { margin: 0; color: #74879a; font-size: .67rem; }
.portfolio-full-detail > header code { color: #276e99; font-size: .64rem; }
.portfolio-full-detail > header .button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.portfolio-full-detail-summary { display: flex; align-items: center; gap: 14px; padding: 9px 17px; border-bottom: 1px solid #e3eaf0; background: #f7fafc; color: #718498; font-size: .66rem; }
.portfolio-full-detail-summary strong { color: #294d69; }
.portfolio-full-detail-summary label { display: flex; align-items: center; gap: 6px; margin-left: auto; font-weight: 750; }
.portfolio-full-detail-summary select { min-height: 30px; padding: 4px 26px 4px 8px; font-size: .65rem; }
.portfolio-full-detail-table { max-height: 610px; border: 0; overflow: auto; }
.portfolio-full-detail-table table { width: max-content; min-width: 100%; margin: 0; }
.portfolio-full-detail-table th { position: sticky; z-index: 3; top: 0; min-width: 130px; max-width: 210px; padding: 9px 10px; background: #eaf2f8; color: #47627a; font-size: .59rem; line-height: 1.25; white-space: normal; }
.portfolio-full-detail-table td { max-width: 320px; padding: 8px 10px; color: #29465e; font-size: .63rem; line-height: 1.35; white-space: nowrap; }
.portfolio-full-detail-table td:nth-child(5),
.portfolio-full-detail-table td:nth-child(14),
.portfolio-full-detail-table td:nth-child(15) { white-space: normal; }
.portfolio-full-detail-table th:nth-child(1),.portfolio-full-detail-table td:nth-child(1) { position: sticky; z-index: 2; left: 0; min-width: 110px; background: #f8fbfd; }
.portfolio-full-detail-table th:nth-child(2),.portfolio-full-detail-table td:nth-child(2) { position: sticky; z-index: 2; left: 110px; min-width: 105px; background: #f8fbfd; }
.portfolio-full-detail-table th:nth-child(3),.portfolio-full-detail-table td:nth-child(3) { position: sticky; z-index: 2; left: 215px; min-width: 90px; background: #f8fbfd; box-shadow: 5px 0 9px rgba(33,67,93,.06); }
.portfolio-full-detail-table thead th:nth-child(-n+3) { z-index: 5; background: #e2eef6; }
.portfolio-detail-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 11px 16px; border-top: 1px solid #e0e8ef; background: #fafcfd; }
.portfolio-detail-pagination span { color: #718397; font-size: .67rem; }
.portfolio-detail-pagination strong { color: #234b69; }

.closed-credit-dashboard { display: grid; gap: 11px; color: #17324f; }
.closed-credit-header { margin-bottom: 0; }
.closed-credit-header h1 { margin-top: 3px; letter-spacing: -.035em; }
.closed-credit-header p { max-width: 740px; }
.closed-credit-eyebrow { color: #8158bd; font-size: .64rem; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.closed-credit-filters { padding: 11px 13px; }
.closed-credit-filters form { display: grid; grid-template-columns: minmax(210px,1.15fr) 135px 135px minmax(160px,.8fr) minmax(170px,.9fr) minmax(155px,.75fr) 75px auto auto; align-items: end; gap: 8px; }
.closed-credit-filters label { display: grid; gap: 5px; min-width: 0; color: #5d7288; font-size: .6rem; font-weight: 850; text-transform: uppercase; }
.closed-credit-filters input,
.closed-credit-filters select { width: 100%; min-height: 39px; }
.closed-credit-scope { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; padding-top: 9px; border-top: 1px solid #e2eaf1; }
.closed-credit-scope span,
.closed-credit-dashboard .panel > header > span { border: 1px solid #d8e4ef; border-radius: 999px; background: #f6faff; padding: 5px 8px; color: #5f758b; font-size: .59rem; font-weight: 800; }
.closed-credit-kpis { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 9px; }
.closed-credit-kpis article { position: relative; min-width: 0; overflow: hidden; border: 1px solid #d8e3ed; border-top: 3px solid #8298ab; border-radius: 11px; background: #fff; padding: 15px 16px; box-shadow: 0 6px 18px rgba(20,53,87,.05); }
.closed-credit-kpis article::after { position: absolute; top: -27px; right: -20px; width: 70px; height: 70px; border-radius: 50%; background: rgba(52,152,219,.07); content: ''; }
.closed-credit-kpis span,
.closed-credit-kpis strong,
.closed-credit-kpis small { position: relative; z-index: 1; display: block; }
.closed-credit-kpis span { color: #5f7489; font-size: .73rem; font-weight: 850; }
.closed-credit-kpis strong { margin: 9px 0 6px; color: #173451; font-size: clamp(1.28rem,1.65vw,1.58rem); font-variant-numeric: tabular-nums; white-space: nowrap; }
.closed-credit-kpis small { color: #788b9e; font-size: .66rem; line-height: 1.35; }
.closed-credit-kpis .primary { border-color: #318dcc; background: linear-gradient(130deg,#2389c8,#3ba6df); }
.closed-credit-kpis .primary span,
.closed-credit-kpis .primary strong,
.closed-credit-kpis .primary small { color: #fff; }
.closed-credit-kpis .clean { border-top-color: #13a27a; }.closed-credit-kpis .clean strong { color: #087c5b; }
.closed-credit-kpis .warning { border-top-color: #e49a2e; }.closed-credit-kpis .warning strong { color: #ad690e; }
.closed-credit-kpis .danger { border-top-color: #d95562; }.closed-credit-kpis .danger strong { color: #b63243; }
.closed-credit-trend-card { margin-bottom: 0; }
.closed-credit-trend-card > header { align-items: center !important; }
.closed-credit-trend-legend { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 14px; }
.closed-credit-trend-legend span { display: inline-flex; align-items: center; gap: 6px; color: #60758a; font-size: .66rem; font-weight: 850; white-space: nowrap; }
.closed-credit-trend-legend i { width: 11px; height: 11px; border-radius: 3px; background: #3498db; }
.closed-credit-trend-legend .collected i { height: 3px; border-radius: 99px; background: #0b9c72; box-shadow: 0 0 0 3px rgba(11,156,114,.12); }
.closed-credit-trend-stage { position: relative; height: 275px; padding: 8px 12px 0; background: linear-gradient(180deg,#fff 0%,#fbfdff 100%); }
.closed-credit-trend-stage canvas { display: block; width: 100%; height: 100%; cursor: pointer; }
.closed-credit-trend-stage canvas:focus-visible { outline: 2px solid #3498db; outline-offset: -4px; border-radius: 8px; }
.closed-credit-trend-tooltip { position: absolute; z-index: 3; min-width: 145px; pointer-events: none; border: 1px solid #d6e2ec; border-radius: 9px; background: rgba(255,255,255,.97); padding: 8px 10px; color: #536a80; font-size: .64rem; line-height: 1.45; box-shadow: 0 9px 25px rgba(18,48,79,.16); transform: translate(-50%,-100%); }
.closed-credit-trend-tooltip strong { display: block; margin-bottom: 3px; color: #193550; font-size: .72rem; }
.closed-credit-trend-tooltip span { display: block; white-space: nowrap; }
.closed-credit-trend-tooltip b { color: #0a7f60; }
.closed-credit-trend-drilldown { border-top: 1px solid #dce7ef; background: linear-gradient(135deg,#f7fbfe,#f5faf8); padding: 12px 14px 14px; }
.closed-credit-trend-drilldown[hidden] { display: none; }
.closed-credit-trend-drilldown > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.closed-credit-trend-drilldown > header > div { display: grid; gap: 2px; }
.closed-credit-trend-drilldown > header span { color: #2187c4; font-size: .56rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.closed-credit-trend-drilldown > header strong { color: #193550; font-size: .86rem; }
.closed-credit-trend-drilldown > header small { color: #71869a; font-size: .62rem; }
.closed-credit-trend-drilldown > header button { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid #d4e1eb; border-radius: 8px; background: #fff; color: #587086; font-size: 1.1rem; line-height: 1; cursor: pointer; }
.closed-credit-trend-drilldown > header button:hover { border-color: #efb2b8; background: #fff1f2; color: #b63243; }
.closed-credit-trend-drilldown > div { display: grid; grid-template-columns: repeat(auto-fit,minmax(255px,1fr)); gap: 7px; }
.closed-credit-user-row { display: grid; grid-template-columns: 26px minmax(0,1fr) auto 16px; align-items: center; gap: 9px; min-width: 0; border: 1px solid #dce6ee; border-radius: 9px; background: #fff; padding: 9px 10px; color: inherit; text-decoration: none; transition: border-color .15s ease,box-shadow .15s ease,transform .15s ease; }
.closed-credit-user-row:hover { border-color: #75b9df; box-shadow: 0 5px 14px rgba(30,104,150,.09); transform: translateY(-1px); }
.closed-credit-user-row > b { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 7px; background: #edf5fb; color: #2687bf; font-size: .62rem; }
.closed-credit-user-row > div { display: grid; min-width: 0; gap: 3px; }
.closed-credit-user-row strong { overflow: hidden; color: #29445f; font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.closed-credit-user-row small { color: #7b8da0; font-size: .59rem; }
.closed-credit-user-row i { display: block; width: var(--width); height: 4px; border-radius: 99px; background: linear-gradient(90deg,#55b1e3,#159a73); }
.closed-credit-user-row > span { color: #087b5c; font-size: .68rem; font-weight: 900; font-variant-numeric: tabular-nums; white-space: nowrap; }
.closed-credit-user-row > em { color: #91a0ae; font-size: 1rem; font-style: normal; }
.closed-credit-trend-card > footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 14px 10px; border-top: 1px solid #e4ebf2; background: #fafcfe; color: #75879a; }
.closed-credit-trend-card > footer span { border-radius: 999px; background: #edf5fb; padding: 4px 8px; color: #3f6787; font-size: .61rem; font-weight: 850; }
.closed-credit-trend-card > footer small { font-size: .59rem; }
.closed-credit-paid-card { margin-bottom: 0; }
.closed-credit-paid-summary { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 9px; padding: 12px 14px 14px; }
.closed-credit-paid-summary article { position: relative; min-width: 0; overflow: hidden; border: 1px solid #dbe5ee; border-left: 4px solid #4d91bd; border-radius: 9px; background: #f9fbfd; padding: 12px 13px; }
.closed-credit-paid-summary article::after { position: absolute; right: -22px; bottom: -28px; width: 68px; height: 68px; border-radius: 50%; background: rgba(52,152,219,.06); content: ''; }
.closed-credit-paid-summary .total { border-left-color: #258fd5; background: #f2f9fe; }
.closed-credit-paid-summary .capital { border-left-color: #0c9b71; }
.closed-credit-paid-summary .ordinary { border-left-color: #765bd3; }
.closed-credit-paid-summary .late { border-left-color: #e28e28; }
.closed-credit-paid-summary .collection { border-left-color: #d95562; }
.closed-credit-paid-summary span,
.closed-credit-paid-summary strong,
.closed-credit-paid-summary small { position: relative; z-index: 1; display: block; }
.closed-credit-paid-summary span { color: #60758a; font-size: .7rem; font-weight: 900; }
.closed-credit-paid-summary strong { overflow: hidden; margin: 7px 0 4px; color: #173451; font-size: clamp(1rem,1.3vw,1.25rem); font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.closed-credit-paid-summary small { color: #7b8da0; font-size: .62rem; line-height: 1.35; }
.closed-credit-empty { padding: 75px 24px; text-align: center; }
.closed-credit-empty strong { color: #233e59; font-size: .95rem; }.closed-credit-empty p { margin: 6px 0 0; color: #75879a; font-size: .72rem; }
.closed-credit-main-grid { display: grid; grid-template-columns: minmax(420px,1.35fr) minmax(300px,.85fr); align-items: start; gap: 10px; }
.closed-credit-dashboard .panel { overflow: hidden; }
.closed-credit-dashboard .panel > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 13px 15px 10px; border-bottom: 1px solid #e2e9f0; }
.closed-credit-dashboard .panel > header h2 { margin: 0; color: #193550; font-size: .98rem; }
.closed-credit-dashboard .panel > header p { margin: 4px 0 0; color: #7c8e9f; font-size: .68rem; line-height: 1.35; }
.closed-credit-component-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px 14px 14px; }
.closed-credit-component-grid article { border: 1px solid #dde6ee; border-radius: 9px; background: #f9fbfd; padding: 11px; }
.closed-credit-component-grid article::before { display: block; width: 27px; height: 3px; margin-bottom: 8px; border-radius: 99px; background: #3a91c8; content: ''; }
.closed-credit-component-grid .ordinary::before { background: #765bd3; }.closed-credit-component-grid .late::before { background: #e28e28; }.closed-credit-component-grid .collection::before { background: #d95562; }
.closed-credit-component-grid span,
.closed-credit-component-grid strong,
.closed-credit-component-grid small { display: block; }
.closed-credit-component-grid span { color: #6d8195; font-size: .61rem; font-weight: 850; }
.closed-credit-component-grid strong { margin: 7px 0 3px; color: #173451; font-size: .92rem; }
.closed-credit-component-grid small { color: #8393a3; font-size: .55rem; }
.closed-credit-ranking { display: grid; padding: 4px 13px 10px; }
.closed-credit-ranking article { display: grid; grid-template-columns: 27px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid #edf1f5; }
.closed-credit-ranking article:last-child { border-bottom: 0; }
.closed-credit-rank { display: grid; width: 26px; height: 26px; place-items: center; border-radius: 8px; background: #eaf4fc; color: #2386c2; font-size: .66rem; font-weight: 900; }
.closed-credit-rank.user { background: #f1edfb; color: #7152b5; }
.closed-credit-ranking article > div { display: grid; min-width: 0; gap: 2px; }
.closed-credit-ranking strong { overflow: hidden; color: #29445f; font-size: .74rem; text-overflow: ellipsis; white-space: nowrap; }
.closed-credit-ranking small { color: #8392a1; font-size: .61rem; line-height: 1.3; }
.closed-credit-ranking i { display: block; width: var(--width); height: 3px; margin-top: 3px; border-radius: 99px; background: linear-gradient(90deg,#5eb5e4,#278bc7); }
.closed-credit-ranking b { color: #b63243; font-size: .71rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.closed-credit-detail-card { margin-bottom: 0; }
.closed-credit-table-wrap { max-height: 480px; }
.closed-credit-table-wrap table { min-width: 2280px; margin: 0; }
.closed-credit-table-wrap th { position: sticky; top: 0; z-index: 2; padding: 10px 9px; background: #eaf2f8; font-size: .6rem; }
.closed-credit-table-wrap td { padding: 9px; font-size: .69rem; white-space: nowrap; }
.closed-credit-table-wrap td:nth-child(2) { min-width: 230px; white-space: normal; }
.closed-credit-table-wrap td:first-child strong,
.closed-credit-table-wrap td:first-child small,
.closed-credit-table-wrap td:nth-child(2) strong,
.closed-credit-table-wrap td:nth-child(2) small { display: block; }
.closed-credit-table-wrap td:first-child small,
.closed-credit-table-wrap td:nth-child(2) small { margin-top: 3px; color: #8192a3; font-size: .6rem; }
.closed-credit-table-wrap tr.has-difference td { background: #fffafb; }
.closed-credit-status { display: inline-flex; border-radius: 999px; padding: 4px 7px; font-size: .53rem; font-weight: 900; }
.closed-credit-status.clean { background: #e8f7f1; color: #087b58; }
.closed-credit-status.difference { background: #ffebed; color: #b32f40; }
.closed-credit-overdue { color: #b32f40; font-weight: 900; }
.closed-credit-paid-value { color: #08795b; font-weight: 850; }
.closed-credit-record-button { white-space: nowrap; }
.closed-credit-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; border-top: 1px solid #dbe5ed; background: #f8fafc; }
.closed-credit-pagination-top { border-top: 0; border-bottom: 1px solid #dbe5ed; background: #f4f8fc; }
.closed-credit-pagination > span { color: #667b90; font-size: .68rem; font-weight: 800; }
.closed-credit-pagination > div { display: flex; align-items: center; gap: 4px; }
.closed-credit-pagination a,
.closed-credit-pagination > div > span { display: inline-flex; min-width: 32px; height: 32px; align-items: center; justify-content: center; padding: 0 9px; border: 1px solid #d4e0ea; border-radius: 7px; background: #fff; color: #34536f; font-size: .66rem; font-weight: 850; text-decoration: none; }
.closed-credit-pagination a:hover { border-color: #62b9ea; color: #2588c7; background: #eff8fe; }
.closed-credit-pagination .current { border-color: #3498db; background: #3498db; color: #fff; }
.closed-credit-pagination .disabled { color: #a4b0bc; background: #f1f4f6; }
.closed-credit-pagination .ellipsis { min-width: 20px; padding: 0 2px; border-color: transparent; background: transparent; }

body.closed-credit-record-modal-open { overflow: hidden; }
.closed-credit-record-dialog { width: min(1420px,calc(100vw - 28px)); height: min(900px,calc(100dvh - 28px)); max-width: none; max-height: none; margin: auto; padding: 0; overflow: hidden; border: 0; border-radius: 16px; background: #f2f6fa; box-shadow: 0 28px 90px rgba(12,34,58,.32); }
.closed-credit-record-dialog::backdrop { background: rgba(13,33,55,.58); backdrop-filter: blur(3px); }
.closed-credit-record-dialog[open] { display: grid; grid-template-rows: auto minmax(0,1fr); }
.closed-credit-record-dialog > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 16px; border-bottom: 1px solid #d7e2ec; background: #fff; }
.closed-credit-record-heading { display: grid; min-width: 0; gap: 2px; }
.closed-credit-record-heading span { color: #6f8296; font-size: .59rem; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.closed-credit-record-heading strong { overflow: hidden; color: #173451; font-size: 1rem; text-overflow: ellipsis; white-space: nowrap; }
.closed-credit-record-heading small { color: #6c8094; font-size: .68rem; font-weight: 750; }
.closed-credit-record-actions { display: flex; align-items: center; gap: 8px; }
.closed-credit-record-actions > button { display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid #d4e0ea; border-radius: 9px; background: #f7fafc; color: #405b74; font-size: 1.35rem; line-height: 1; cursor: pointer; }
.closed-credit-record-actions > button:hover { border-color: #efb2b8; background: #fff1f2; color: #b63243; }
.closed-credit-record-body { position: relative; min-height: 0; overflow: hidden; background: #eef3f8; }
.closed-credit-record-body iframe { display: block; width: 100%; height: 100%; border: 0; background: #eef3f8; }
.closed-credit-record-loading { position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; justify-items: center; gap: 10px; background: #eef3f8; color: #60768c; font-size: .75rem; font-weight: 800; }
.closed-credit-record-loading[hidden] { display: none; }
.closed-credit-record-loading span { width: 30px; height: 30px; border: 3px solid #c9d9e7; border-top-color: #3498db; border-radius: 50%; animation: closed-credit-record-spin .8s linear infinite; }
@keyframes closed-credit-record-spin { to { transform: rotate(360deg); } }

body.app-shell.customer-record-embedded { display: block; min-height: 100dvh; background: #eef3f8; }
.customer-record-embedded .sidebar,
.customer-record-embedded .sidebar-backdrop,
.customer-record-embedded .topbar,
.customer-record-embedded .customer-record-header,
.customer-record-embedded .customer-record-search-panel { display: none !important; }
.customer-record-embedded .content { grid-area: auto; width: 100%; max-width: none; min-height: 100dvh; padding: 10px 12px 20px; }
.customer-record-embedded .customer-record-layout { margin: 0; }
.closed-credit-method-note { border: 1px solid #dce6ef; border-radius: 9px; background: #f7fafc; padding: 8px 11px; color: #6b7f93; font-size: .58rem; line-height: 1.45; }
.closed-credit-method-note strong { color: #31516f; }

@media screen and (max-width: 1380px) {
  .closed-credit-filters form { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .closed-credit-main-grid { grid-template-columns: 1.2fr 1fr; }
}
@media screen and (max-width: 900px) {
  .closed-credit-kpis { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .closed-credit-paid-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .closed-credit-main-grid { grid-template-columns: 1fr; }
}
@media screen and (max-width: 680px) {
  .closed-credit-dashboard { gap: 8px; }
  .closed-credit-filters form,
  .closed-credit-kpis,
  .closed-credit-paid-summary { grid-template-columns: 1fr; }
  .closed-credit-component-grid { grid-template-columns: 1fr; }
  .closed-credit-dashboard .panel > header { flex-direction: column; }
  .closed-credit-trend-legend { justify-content: flex-start; }
  .closed-credit-trend-stage { height: 235px; padding-inline: 4px; }
  .closed-credit-trend-drilldown > div { grid-template-columns: 1fr; }
  .closed-credit-user-row { grid-template-columns: 25px minmax(0,1fr) auto 14px; }
  .closed-credit-trend-card > footer { align-items: flex-start; flex-direction: column; }
  .closed-credit-pagination { align-items: stretch; flex-direction: column; }
  .closed-credit-pagination > div { overflow-x: auto; }
  .closed-credit-record-dialog { width: 100vw; height: 100dvh; border-radius: 0; }
  .closed-credit-record-dialog > header { padding: 10px; }
  .closed-credit-record-actions .button { display: none; }
  .customer-record-embedded .content { padding: 6px; }
}
@media print {
  @page closed-credit-report { size: landscape; margin: 7mm; }
  body.page-reports-closed-credits { page: closed-credit-report; }
  .closed-credit-dashboard { gap: 7px; }
  .closed-credit-kpis { grid-template-columns: repeat(5,1fr); }
  .closed-credit-kpis article { box-shadow: none; }
  .closed-credit-main-grid { grid-template-columns: 1.35fr .85fr; }
  .closed-credit-table-wrap { max-height: none; overflow: visible; }
  .closed-credit-table-wrap table { min-width: 0; font-size: .48rem; }
}

/* COMPACT PHYSICAL PEOPLE REPORT ---------------------------------------- */
@media screen {
  body.page-reports-physical-people .content { padding: 6px 6px 10px; }
  .page-reports-physical-people .people-report-header { margin-bottom: 6px; }
  .page-reports-physical-people .people-report-filter-panel {
    margin-bottom: 6px;
    padding: 10px 12px 12px;
    border-radius: 10px;
  }
  .page-reports-physical-people .people-report-filter-panel .panel-heading {
    margin-bottom: 8px;
  }
  .page-reports-physical-people .people-report-filter-panel .panel-heading h2 {
    font-size: .86rem;
    font-weight: 650;
  }
  .page-reports-physical-people .people-report-filter-panel .panel-heading p {
    font-size: .64rem;
  }
  .page-reports-physical-people .people-report-filters { gap: 8px; }
  .page-reports-physical-people .people-report-filters label {
    gap: 4px;
    font-size: .64rem;
    font-weight: 600;
  }
  .page-reports-physical-people .people-report-filters select {
    min-height: 38px;
    padding: 7px 9px;
    font-size: .76rem;
    font-weight: 550;
  }
  .page-reports-physical-people .people-report-filter-actions { gap: 6px; }
  .page-reports-physical-people .people-report-filter-actions .button {
    min-height: 38px;
    padding: 7px 11px;
    font-size: .72rem;
    font-weight: 650;
  }

  .page-reports-physical-people .people-report-summary {
    min-height: 50px;
    margin-bottom: 6px;
    padding: 9px 13px;
    border-radius: 10px;
    box-shadow: 0 7px 18px rgba(20, 72, 145, .12);
  }
  .page-reports-physical-people .people-report-summary article { gap: 9px; }
  .page-reports-physical-people .people-report-summary article span,
  .page-reports-physical-people .people-report-summary div span {
    font-size: .64rem;
    font-weight: 600;
  }
  .page-reports-physical-people .people-report-summary strong {
    font-size: 1.35rem;
    font-weight: 650;
  }
  .page-reports-physical-people .people-report-summary small { font-size: .57rem; }

  .page-reports-physical-people .people-report-results {
    padding: 10px 12px 12px;
    border-radius: 10px;
  }
  .page-reports-physical-people .people-report-results > .panel-heading {
    margin-bottom: 8px;
  }
  .page-reports-physical-people .people-report-results > .panel-heading h2 {
    margin-bottom: 1px;
    font-size: .9rem;
    font-weight: 650;
  }
  .page-reports-physical-people .people-report-results > .panel-heading p {
    font-size: .64rem;
  }
  .page-reports-physical-people .people-report-table-wrap {
    max-height: calc(100dvh - 225px);
    border-radius: 8px;
  }
  .page-reports-physical-people .people-report-table {
    width: max-content;
    min-width: 3200px;
    table-layout: auto;
    font-size: .71rem;
  }
  .page-reports-physical-people .people-report-table th,
  .page-reports-physical-people .people-report-table td {
    padding: 8px 9px;
    font-weight: 450;
  }
  .page-reports-physical-people .people-report-table thead th {
    padding-block: 8px;
    font-size: .58rem;
    font-weight: 650;
    letter-spacing: .045em;
  }
  .page-reports-physical-people .people-report-table .customer-edit-button {
    min-height: 34px;
    padding: 6px 9px;
    font-size: .65rem;
    font-weight: 650;
  }
  .page-reports-physical-people .people-report-table .people-column-actions {
    width: 100px;
    min-width: 100px;
    max-width: 100px;
  }
  .page-reports-physical-people .people-report-table .people-column-IdPersona {
    left: 100px;
    width: 62px;
    min-width: 62px;
    max-width: 62px;
  }
  .page-reports-physical-people .people-report-table .people-column-Nombre {
    left: 162px;
    min-width: 132px;
  }
  .page-reports-physical-people .people-report-table .people-column-ApellidoPaterno,
  .page-reports-physical-people .people-report-table .people-column-ApellidoMaterno { min-width: 132px; }
  .page-reports-physical-people .people-report-table .people-column-RFC { min-width: 118px; }
  .page-reports-physical-people .people-report-table .people-column-Homoclave { min-width: 76px; }
  .page-reports-physical-people .people-report-table .people-column-CURP { min-width: 150px; }
  .page-reports-physical-people .people-report-table .people-column-Domicilio,
  .page-reports-physical-people .people-report-table .people-column-NotasTrabajo {
    min-width: 190px;
    max-width: 260px;
  }
  .page-reports-physical-people .people-report-table .people-column-Email { min-width: 180px; }
}

@media screen and (max-width: 760px) {
  body.page-reports-physical-people .content { padding: 4px; }
  .page-reports-physical-people .people-report-filter-panel,
  .page-reports-physical-people .people-report-results { padding: 8px; }
  .page-reports-physical-people .people-report-filter-actions { display: flex; }
  .page-reports-physical-people .people-report-filter-actions .button {
    width: auto;
    flex: 1;
  }
  .page-reports-physical-people .people-report-summary {
    align-items: center;
    flex-direction: row;
    gap: 8px;
    padding: 8px 10px;
  }
  .page-reports-physical-people .people-report-summary > div { text-align: right; }
  .page-reports-physical-people .people-report-summary strong { font-size: 1.2rem; }
  .page-reports-physical-people .people-report-table { min-width: 2850px; }
  .page-reports-physical-people .people-report-table-wrap { max-height: calc(100dvh - 205px); }
}

/* PERSON EDIT — PROFESSIONAL VISUAL LAYER ------------------------------ */
.registration-hero-edit {
  min-height: 92px;
  margin-bottom: 9px;
  padding: 15px 20px;
  border: 1px solid rgba(130, 207, 255, .2);
  border-radius: 16px;
  background:
    radial-gradient(circle at 82% -35%, rgba(124, 225, 255, .32), transparent 19rem),
    linear-gradient(118deg, #15395f 0%, #176ca7 56%, #1d9cc0 100%);
  box-shadow: 0 13px 30px rgba(20, 74, 119, .18);
}
.registration-hero-edit::before {
  width: 230px;
  height: 230px;
  top: -175px;
  right: -45px;
  border-color: rgba(255, 255, 255, .17);
}
.registration-hero-edit::after {
  width: 120px;
  height: 120px;
  right: 175px;
  bottom: -105px;
  border-color: rgba(255, 255, 255, .12);
}
body.app-shell:not(.person-edit-embedded) .registration-hero-edit {
  justify-content: space-between;
  padding: 15px 20px;
}
body.app-shell:not(.person-edit-embedded) .registration-hero-edit .registration-hero-main {
  display: flex;
}
.registration-hero-edit .registration-hero-main { gap: 13px; flex: 1 1 280px; }
.registration-hero-edit .registration-hero-main > div { min-width: 0; }
.registration-hero-edit,
body.app-shell:not(.person-edit-embedded) .registration-hero-edit {
  flex-wrap: wrap;
  gap: 16px 24px;
}
.registration-hero-edit .registration-hero-side,
body.app-shell:not(.person-edit-embedded) .registration-hero-edit .registration-hero-side {
  width: auto;
  max-width: 100%;
  flex: 0 1 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 16px;
}
.registration-hero-edit .registration-hero-meta { flex-wrap: wrap; }
.registration-hero-edit .actions { flex-wrap: wrap; max-width: 100%; }
.registration-hero-edit h1 { overflow-wrap: anywhere; }
.registration-hero-edit .registration-hero-mark {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  color: #e9f9ff;
  background: linear-gradient(145deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, .08));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .24), 0 9px 20px rgba(2, 31, 57, .18);
}
.person-edit-embedded .registration-hero-edit .registration-hero-mark { display: grid; }
.registration-hero-edit .registration-hero-kicker {
  margin-bottom: 3px;
  color: #aee9ff;
  font-size: .6rem;
  font-weight: 680;
  letter-spacing: .135em;
}
.registration-hero-edit h1 {
  margin-bottom: 4px;
  font-size: clamp(1.35rem, 2vw, 1.72rem);
  font-weight: 620;
  letter-spacing: -.03em;
}
.registration-hero-edit p {
  color: rgba(235, 248, 255, .78);
  font-size: .7rem;
  font-weight: 420;
}
.registration-hero-edit .registration-hero-meta {
  color: rgba(232, 248, 255, .76);
  font-weight: 500;
}
.registration-hero-edit .button {
  min-height: 38px;
  font-weight: 620;
}
.registration-hero-edit .button.primary {
  color: #15577f;
  box-shadow: 0 8px 20px rgba(4, 37, 63, .18);
}

.registration-form-edit .registration-progress {
  position: sticky;
  overflow: hidden;
  border: 1px solid #d9e7f3;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 10px 26px rgba(31, 78, 121, .085);
}
.registration-form-edit .registration-progress::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, #3189e7, #24b4c8);
}
.registration-form-edit .registration-progress > a {
  position: relative;
  border-radius: 10px;
}
.registration-form-edit .registration-progress > a.active {
  border-color: #cbdff5;
  background: linear-gradient(135deg, #edf6ff, #f8fbff);
  box-shadow: inset 0 0 0 1px rgba(55, 128, 217, .035);
}
.registration-form-edit .registration-progress > a:nth-of-type(2).active {
  color: #157386;
  border-color: #c7e8ec;
  background: linear-gradient(135deg, #eafafa, #f7fcfc);
}
.registration-form-edit .registration-progress > a:nth-of-type(2).active span {
  background: linear-gradient(145deg, #22a7be, #238baa);
  box-shadow: 0 7px 15px rgba(34, 154, 180, .2);
}

.registration-form-edit .registration-section {
  position: relative;
  overflow: hidden;
  border: 1px solid #dbe7f2;
  border-top-width: 3px;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 11px 29px rgba(29, 72, 112, .075);
}
.registration-form-edit #registration-general { border-top-color: #3b8fe5; }
.registration-form-edit #registration-contact { border-top-color: #27a5b8; }
.registration-form-edit .registration-section-heading {
  min-height: 60px;
  padding: 11px 15px;
  border-bottom: 1px solid #e5edf5;
}
.registration-form-edit #registration-general .registration-section-heading {
  background: linear-gradient(110deg, #f4f9ff, #fff 62%);
}
.registration-form-edit #registration-contact .registration-section-heading {
  background: linear-gradient(110deg, #f0fbfb, #fff 62%);
}
.registration-form-edit .registration-section-heading > span {
  width: 35px;
  height: 35px;
  border: 0;
  border-radius: 10px;
  color: #2477c5;
  background: #e5f1ff;
  box-shadow: inset 0 0 0 1px #cfe3f8;
  font-weight: 680;
}
.registration-form-edit #registration-contact .registration-section-heading > span {
  color: #167c8c;
  background: #def5f5;
  box-shadow: inset 0 0 0 1px #c8e9eb;
}
.registration-form-edit .registration-section-heading h2 {
  font-size: .92rem;
  font-weight: 620;
  letter-spacing: -.012em;
}
.registration-form-edit .registration-section-heading p {
  font-weight: 420;
}
.registration-form-edit .registration-section-tag {
  border: 0;
  background: #eaf3ff;
  font-weight: 650;
}
.registration-form-edit .registration-section-tag.optional {
  color: #247887;
  background: #e6f7f7;
}
.registration-form-edit .registration-grid {
  background:
    linear-gradient(rgba(244, 248, 252, .42), rgba(255, 255, 255, 0) 105px),
    #fff;
}
.registration-form-edit .registration-group-title {
  gap: 8px;
  color: #244d73;
}
.registration-form-edit .registration-group-title::before {
  content: "";
  width: 18px;
  height: 4px;
  flex: 0 0 auto;
  border-radius: 99px;
  background: linear-gradient(90deg, #3a8de1, #22adbf);
}
.registration-form-edit .registration-group-title strong {
  font-weight: 680;
  letter-spacing: .075em;
}
.registration-form-edit .registration-grid input,
.registration-form-edit .registration-grid select,
.registration-form-edit .registration-grid textarea {
  border-color: #ceddea;
  border-radius: 9px;
  background: #fcfdff;
  box-shadow: inset 0 1px 1px rgba(25, 62, 96, .025);
  font-weight: 500;
}
.registration-form-edit .registration-grid input:focus,
.registration-form-edit .registration-grid select:focus,
.registration-form-edit .registration-grid textarea:focus {
  border-color: #318ee1;
  box-shadow: 0 0 0 3px rgba(49, 142, 225, .1), 0 6px 14px rgba(31, 107, 172, .07);
}
.registration-gender-radios {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 18px;
  padding: 7px 11px;
  border: 1px solid #ceddea;
  border-radius: 9px;
  background: #fcfdff;
}
.registration-gender-radios label {
  display: inline-flex;
  width: auto;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  color: #405873;
  font-size: .69rem;
  font-weight: 520;
}
.registration-gender-radios input[type="radio"] {
  position: static;
  width: 16px;
  height: 16px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 1;
  accent-color: #2f88db;
  box-shadow: none;
}
.registration-gender-radios span,
.registration-gender-radios input:checked + span {
  min-height: 0;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  box-shadow: none;
}
.registration-gender-radios input:checked + span {
  color: #176eb4;
  font-weight: 650;
}
.registration-form-edit .registration-identity-actions {
  border: 1px solid #cfe1f3;
  background: linear-gradient(100deg, #edf6ff, #f8fcff);
}
.registration-identity-field {
  display: grid;
  min-width: 0;
  gap: 7px;
  color: #354d6b;
  font-size: .69rem;
}
.registration-identity-field > label { font-weight: 650; }
.registration-identity-field > small {
  color: #8997a9;
  font-size: .61rem;
  font-weight: 650;
}
.registration-rfc-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.registration-form-edit .registration-identity-generate {
  display: inline-flex;
  width: auto;
  min-height: 31px;
  align-items: center;
  align-self: center;
  gap: 5px;
  padding: 5px 9px;
  border-radius: 8px;
  font-size: .64rem;
  font-weight: 620;
  white-space: nowrap;
}
.registration-form-edit .registration-location-picker {
  border-color: #cfe6ea;
  background: linear-gradient(125deg, #f2fbfb, #fbfdff);
}
.registration-form-edit .registration-actions {
  overflow: hidden;
  background: rgba(255, 255, 255, .96);
}
.registration-form-edit .registration-actions::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, #348ce3, #25a9bc);
}

@media screen and (max-width: 760px) {
  .registration-hero-edit,
  body.app-shell:not(.person-edit-embedded) .registration-hero-edit {
    gap: 10px;
    padding: 11px 12px;
    border-radius: 12px;
  }
  .registration-hero-edit .registration-hero-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }
  .registration-hero-edit h1 { font-size: 1.18rem; }
  .registration-hero-edit p,
  .registration-hero-edit .registration-hero-meta { display: none; }
  .registration-hero-edit .registration-hero-main { flex: 0 1 auto; width: 100%; }
  .registration-hero-edit .registration-hero-side,
  body.app-shell:not(.person-edit-embedded) .registration-hero-edit .registration-hero-side {
    width: 100%;
    justify-content: flex-end;
  }
  .registration-hero-edit .actions { display: flex; grid-template-columns: none; }
  .registration-hero-edit .actions .button { min-height: 36px; padding: 7px 9px; font-size: .68rem; }
  .registration-hero-edit .actions .button.primary { display: none; }
  .registration-form-edit .registration-progress { border-radius: 11px; }
  .registration-form-edit .registration-section { border-radius: 12px; }
  .registration-form-edit .registration-section-heading { min-height: 54px; }
  .registration-form-edit .registration-section-tag { display: none; }
  .registration-form-edit .registration-identity-generate { width: auto; }
}

/* Administración de productos de crédito */
.credit-product-metrics { margin-bottom: 14px; }
.credit-product-live-warning { margin-bottom: 16px; }
.credit-product-create { margin-bottom: 16px; }
.credit-product-create > summary {
  cursor: pointer;
  color: #176ca8;
  font-weight: 800;
  list-style-position: inside;
}
.credit-product-create[open] > summary { margin-bottom: 18px; }
.credit-product-form { display: grid; gap: 16px; }
.credit-product-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.credit-product-fieldset {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 12px;
  min-width: 0;
  margin: 0;
  padding: 15px;
  border: 1px solid #dce7f1;
  border-radius: 12px;
  background: #f9fbfd;
}
.credit-product-fieldset legend {
  padding: 0 6px;
  color: #244563;
  font-size: .75rem;
  font-weight: 850;
}
.credit-product-fieldset label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #6d7e91;
  font-size: .7rem;
  font-weight: 750;
}
.credit-product-fieldset input { min-width: 0; }
.credit-product-general { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) auto; }
.credit-product-active { align-self: end; min-height: 42px; }
.credit-product-help {
  grid-column: 1 / -1;
  color: #8392a4;
  font-size: .65rem;
  line-height: 1.4;
}
.credit-product-form-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 2px;
}
.credit-product-editor { margin-bottom: 16px; border-color: #b8d9f0; }
.credit-product-list .table-wrap { overflow-x: auto; }
.credit-product-list table { min-width: 1040px; }
.credit-product-live-row { background: #f5fbff; }

@media screen and (max-width: 900px) {
  .credit-product-form-grid { grid-template-columns: 1fr; }
  .credit-product-general { grid-column: auto; }
}

@media screen and (max-width: 560px) {
  .credit-product-fieldset,
  .credit-product-general { grid-template-columns: 1fr; }
  .credit-product-form-actions .button { width: 100%; }
}

.sidebar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin: 0 0 12px;
  padding: 0 10px;
  min-height: 39px;
  border: 1px solid rgba(255, 255, 255, .38);
  border-radius: 9px;
  background: rgba(255, 255, 255, .15);
  color: #fff;
}
.sidebar-search:focus-within { outline: 2px solid #fff; outline-offset: 2px; }
.sidebar-search > svg { width: 17px; height: 17px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; }
.sidebar .sidebar-search input {
  width: 100%; min-width: 0; margin: 0; padding: 9px 0; border: 0;
  border-radius: 0; background: transparent; color: #fff; box-shadow: none;
  font: inherit; font-size: .8rem; outline: none;
}
.sidebar-search input::placeholder { color: rgba(255, 255, 255, .92); opacity: 1; }
.sidebar-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.sidebar-search button {
  flex-shrink: 0; width: 26px; height: 28px; padding: 0; border: 0;
  background: transparent; color: #fff; font-size: 1.35rem; cursor: pointer;
}
.sidebar-search button:focus-visible { outline: 2px solid #fff; border-radius: 4px; }
.sidebar-search-status { margin: 0 2px 12px; color: #fff; font-size: .76rem; }
.sidebar .nav-group[hidden], .sidebar nav .nav-link[hidden],
.sidebar-search button[hidden], .sidebar-search-status[hidden] { display: none !important; }
@media (min-width: 761px) {
  body.sidebar-collapsed .sidebar-search,
  body.sidebar-collapsed .sidebar-search-status { display: none; }
}
