:root {
  --sidebar-width: 292px;
  --primary: #ef4444;
  --primary-dark: #b91c1c;
  --ink: #111827;
  --muted: #6b7280;
  --surface: #ffffff;
  --body-bg: #f5f7fb;
  --ring: rgba(239, 68, 68, .22);
}

* { box-sizing: border-box; }
body { min-height: 100vh; background: var(--body-bg); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { text-decoration: none; }
.min-w-0 { min-width: 0; }
.btn-primary { --bs-btn-bg: var(--primary); --bs-btn-border-color: var(--primary); --bs-btn-hover-bg: var(--primary-dark); --bs-btn-hover-border-color: var(--primary-dark); --bs-btn-focus-shadow-rgb: 239, 68, 68; }
.text-primary { color: var(--primary) !important; }
.bg-primary-subtle { background: rgba(239, 68, 68, .1) !important; }
.form-control:focus, .form-select:focus, .form-check-input:focus { border-color: var(--primary); box-shadow: 0 0 0 .25rem var(--ring); }
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }

.app-shell { display: flex; min-height: 100vh; }
.app-sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-width); z-index: 1030; color: #fff; background: radial-gradient(circle at top left, rgba(255,255,255,.22), transparent 32%), linear-gradient(160deg, #991b1b 0%, #111827 72%); display: flex; flex-direction: column; padding: 1rem; box-shadow: 24px 0 70px rgba(17, 24, 39, .25); }
.sidebar-brand { display: flex; align-items: center; gap: .9rem; padding: .8rem .7rem 1.2rem; }
.brand-icon, .brand-mark { width: 48px; height: 48px; border-radius: 18px; display: grid; place-items: center; background: linear-gradient(145deg, #f97316, #ef4444); color: #fff; box-shadow: 0 16px 35px rgba(239, 68, 68, .35); font-size: 1.45rem; }
.brand-mark { width: 62px; height: 62px; border-radius: 24px; font-size: 1.9rem; }
.sidebar-brand strong { display: block; font-size: 1.08rem; line-height: 1; }
.sidebar-brand span { display: block; opacity: .78; font-size: .78rem; }
.sidebar-nav { display: grid; gap: .35rem; padding: .6rem 0; }
.sidebar-nav .nav-link { display: flex; align-items: center; gap: .85rem; padding: .84rem .95rem; border-radius: 1rem; color: rgba(255,255,255,.78); transition: .18s ease; }
.sidebar-nav .nav-link:hover, .sidebar-nav .nav-link.active { color: #fff; background: rgba(255,255,255,.14); transform: translateX(2px); }
.sidebar-nav .nav-link i { width: 1.35rem; text-align: center; font-size: 1.08rem; }
.sidebar-user { margin-top: auto; display: flex; align-items: center; gap: .8rem; padding: .9rem; border-radius: 1.2rem; background: rgba(255,255,255,.12); backdrop-filter: blur(12px); }
.sidebar-user strong, .sidebar-user span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user span { opacity: .75; font-size: .82rem; }
.sidebar-backdrop { display: none; }

.app-main { flex: 1; margin-left: var(--sidebar-width); min-width: 0; }
.topbar { min-height: 88px; display: flex; align-items: center; gap: 1rem; padding: 1rem 1.5rem; position: sticky; top: 0; z-index: 1020; background: rgba(245,247,251,.86); backdrop-filter: blur(16px); border-bottom: 1px solid rgba(17,24,39,.06); }
.page-title { font-size: clamp(1.25rem, 2vw, 1.75rem); font-weight: 800; letter-spacing: -.04em; }
.user-pill { display: flex; align-items: center; gap: .5rem; border: 1px solid rgba(17,24,39,.08); border-radius: 1rem; background: #fff; box-shadow: 0 12px 30px rgba(17,24,39,.05); }
.avatar-xs, .avatar-sm { display: inline-grid; place-items: center; border-radius: 50%; font-weight: 800; }
.avatar-xs { width: 30px; height: 30px; background: #111827; color: #fff; font-size: .72rem; }
.avatar-sm { width: 44px; height: 44px; background: rgba(255,255,255,.18); color: #fff; flex: 0 0 auto; }
.content-area { padding: 1.5rem; max-width: 1640px; margin: 0 auto; }

.page-actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; font-weight: 800; color: var(--muted); }
.app-card { border: 0; border-radius: 1.35rem; box-shadow: 0 18px 60px rgba(17,24,39,.075); overflow: hidden; }
.app-card .card-header { padding: 1.2rem 1.25rem 0; }
.app-card .card-body { padding: 1.25rem; }
.app-sticky { top: 112px; }

.metric-card { min-height: 136px; border-radius: 1.45rem; padding: 1.25rem; color: #fff; position: relative; overflow: hidden; box-shadow: 0 20px 55px rgba(17, 24, 39, .16); }
.metric-card span { display: block; opacity: .82; font-size: .86rem; }
.metric-card strong { display: block; font-size: clamp(1.35rem, 2vw, 2.1rem); letter-spacing: -.045em; margin-top: .5rem; }
.metric-card i { position: absolute; right: 1.1rem; bottom: .8rem; font-size: 3.8rem; opacity: .18; }
.gradient-primary { background: linear-gradient(145deg, #ef4444, #7f1d1d); }
.gradient-success { background: linear-gradient(145deg, #22c55e, #14532d); }
.gradient-warning { background: linear-gradient(145deg, #f59e0b, #7c2d12); }
.gradient-dark { background: linear-gradient(145deg, #111827, #374151); }

.search-box { position: relative; }
.search-box i { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: #9ca3af; z-index: 2; }
.search-box .form-control { padding-left: 2.75rem; border-radius: 1rem; }
.soft-pill { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .7rem; border-radius: 99px; background: rgba(17,24,39,.055); color: #374151; font-size: .82rem; font-weight: 700; }
.permission-check { display: flex; gap: .7rem; align-items: flex-start; padding: .78rem; border: 1px solid rgba(17,24,39,.08); border-radius: 1rem; background: #fff; cursor: pointer; min-height: 72px; transition: .15s ease; }
.permission-check:hover { border-color: rgba(239,68,68,.35); background: rgba(239,68,68,.035); }
.permission-check input { margin-top: .25rem; }
.permission-check strong, .permission-check small { display: block; }
.permission-check small { color: var(--muted); }
.small-check { min-height: auto; }
.branch-check-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .65rem; }
.branch-icon { width: 48px; height: 48px; border-radius: 18px; display: grid; place-items: center; background: rgba(239,68,68,.1); color: var(--primary); font-size: 1.3rem; }
.branch-info { display: grid; gap: .45rem; color: var(--muted); font-size: .9rem; }
.branch-info span { display: flex; gap: .5rem; align-items: center; }

.moto-card-image { height: 210px; background: linear-gradient(145deg, #f3f4f6, #e5e7eb); position: relative; overflow: hidden; }
.moto-card-image img { width: 100%; height: 100%; object-fit: cover; display: block; transition: .2s ease; }
.moto-card:hover .moto-card-image img { transform: scale(1.035); }
.moto-placeholder, .photo-preview { display: grid; place-items: center; text-align: center; color: #9ca3af; height: 100%; }
.moto-placeholder i, .photo-preview i { display: block; font-size: 2.4rem; }
.moto-status { position: absolute; left: 1rem; top: 1rem; }
.moto-data { display: grid; gap: .35rem; font-size: .88rem; color: #4b5563; }
.moto-mini-card { display: flex; align-items: center; gap: .8rem; padding: .65rem; border: 1px solid rgba(17,24,39,.07); border-radius: 1.1rem; background: #fff; }
.moto-thumb { width: 72px; height: 58px; border-radius: .9rem; background: #f3f4f6; display: grid; place-items: center; overflow: hidden; flex: 0 0 auto; }
.moto-thumb img { width: 100%; height: 100%; object-fit: cover; }
.moto-mini-card strong, .moto-mini-card span, .moto-mini-card small { display: block; }
.moto-mini-card span, .moto-mini-card small { color: var(--muted); }
.photo-upload-card { border: 1px dashed rgba(17,24,39,.18); border-radius: 1.2rem; padding: .75rem; background: #fff; }
.photo-preview { height: 160px; border-radius: .95rem; overflow: hidden; background: #f3f4f6; }
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.profit-preview { border-radius: 1.25rem; padding: 1rem; background: linear-gradient(145deg, rgba(34,197,94,.12), rgba(239,68,68,.08)); }
.profit-preview span, .profit-preview small { display: block; color: var(--muted); }
.profit-preview strong { font-size: 1.55rem; color: #14532d; }

.mini-stat { border-radius: 1.2rem; background: #fff; box-shadow: 0 16px 45px rgba(17,24,39,.06); padding: 1rem; }
.mini-stat span, .mini-stat small { display: block; color: var(--muted); }
.mini-stat strong { display: block; font-size: 1.6rem; line-height: 1; margin: .35rem 0; }
.empty-state { text-align: center; color: var(--muted); }
.empty-state i { font-size: 3rem; color: #d1d5db; display: block; margin-bottom: .75rem; }
.tax-list { display: grid; gap: .75rem; }
.tax-row { display: grid; grid-template-columns: 1.4fr .8fr .7fr 1fr auto; gap: .6rem; align-items: center; }
.tax-switch { display: flex; gap: .45rem; align-items: center; margin: 0; }
.setting-switch { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem; border-radius: 1.1rem; background: rgba(17,24,39,.04); margin-top: .75rem; }
.setting-switch strong, .setting-switch span { display: block; }
.setting-switch span { color: var(--muted); font-size: .86rem; }

.auth-body { background: #111827; }
.auth-wrapper { min-height: 100vh; display: grid; grid-template-columns: 1.1fr .9fr; }
.single-auth { grid-template-columns: 1fr; background: radial-gradient(circle at top left, rgba(239,68,68,.25), transparent 34%), #111827; }
.auth-visual { padding: 2rem; align-items: stretch; background: radial-gradient(circle at top left, rgba(248,113,113,.38), transparent 34%), linear-gradient(145deg, #7f1d1d, #111827); }
.auth-glass { flex: 1; border-radius: 2rem; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.09); backdrop-filter: blur(16px); color: #fff; padding: clamp(2rem, 4vw, 4rem); display: flex; flex-direction: column; justify-content: flex-end; box-shadow: inset 0 1px 0 rgba(255,255,255,.22); }
.auth-glass h1 { max-width: 720px; font-size: clamp(2rem, 4vw, 4.4rem); letter-spacing: -.07em; line-height: .96; font-weight: 900; }
.auth-glass p { max-width: 520px; opacity: .8; font-size: 1.05rem; }
.auth-pills { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1rem; }
.auth-pills span { display: inline-flex; align-items: center; gap: .45rem; padding: .6rem .85rem; border-radius: 99px; background: rgba(255,255,255,.13); }
.auth-panel { display: grid; place-items: center; padding: 1.5rem; background: #f7f8fc; }
.login-card { width: min(100%, 460px); border-radius: 2rem; background: #fff; padding: clamp(1.5rem, 4vw, 2.3rem); box-shadow: 0 30px 90px rgba(17,24,39,.2); }
.password-field { position: relative; }
.password-toggle { position: absolute; right: .65rem; top: 50%; transform: translateY(-50%); z-index: 3; }
.demo-credentials { display: grid; gap: .25rem; padding: 1rem; border-radius: 1rem; background: #f3f4f6; font-size: .9rem; }

[data-bs-theme="dark"] { --body-bg: #0b1020; --ink: #f9fafb; }
[data-bs-theme="dark"] body, body[data-bs-theme="dark"] { background: #0b1020; color: #f9fafb; }
[data-bs-theme="dark"] .topbar { background: rgba(11,16,32,.82); border-bottom-color: rgba(255,255,255,.08); }
[data-bs-theme="dark"] .app-card, [data-bs-theme="dark"] .user-pill, [data-bs-theme="dark"] .permission-check, [data-bs-theme="dark"] .mini-stat, [data-bs-theme="dark"] .moto-mini-card, [data-bs-theme="dark"] .photo-upload-card { background: #111827; color: #f9fafb; }
[data-bs-theme="dark"] .table { --bs-table-bg: #111827; --bs-table-color: #f9fafb; --bs-table-hover-bg: #182033; }
[data-bs-theme="dark"] .form-control, [data-bs-theme="dark"] .form-select { background-color: #0f172a; border-color: rgba(255,255,255,.12); color: #f9fafb; }

@media (max-width: 991.98px) {
  .app-sidebar { transform: translateX(-104%); transition: transform .22s ease; }
  .app-sidebar.open { transform: translateX(0); }
  .sidebar-backdrop.show { display: block; position: fixed; inset: 0; background: rgba(17,24,39,.55); z-index: 1025; }
  .app-main { margin-left: 0; }
  .content-area { padding: 1rem; }
  .topbar { min-height: 74px; padding: .85rem 1rem; }
  .page-actions { align-items: stretch; flex-direction: column; }
  .auth-wrapper { grid-template-columns: 1fr; }
  .auth-panel { min-height: 100vh; }
  .tax-row { grid-template-columns: 1fr; }
}

@media (max-width: 575.98px) {
  .metric-card { min-height: 118px; padding: 1rem; }
  .metric-card strong { font-size: 1.15rem; }
  .moto-card-image { height: 180px; }
  .app-card .card-body { padding: 1rem; }
  .table { min-width: 760px; }
}

.dashboard-filter-card { padding: .65rem; background: #fff; border: 1px solid rgba(17,24,39,.07); border-radius: 1.25rem; box-shadow: 0 12px 35px rgba(17,24,39,.055); }
.metric-card small { display: block; margin-top: .35rem; opacity: .78; position: relative; z-index: 2; }
.metric-card-hover { transition: transform .18s ease, box-shadow .18s ease; }
.metric-card-hover:hover { transform: translateY(-4px); box-shadow: 0 28px 70px rgba(17, 24, 39, .22); }
.mini-stat-card { min-height: 92px; border-radius: 1.25rem; background: #fff; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.1rem; box-shadow: 0 16px 45px rgba(17,24,39,.06); border: 1px solid rgba(17,24,39,.045); }
.mini-stat-card span { display: block; color: var(--muted); font-size: .85rem; }
.mini-stat-card strong { display: block; font-size: 1.28rem; letter-spacing: -.035em; }
.mini-stat-card i { font-size: 2rem; opacity: .85; }
.list-soft-item { display: flex; align-items: center; justify-content: space-between; gap: .85rem; padding: .8rem; border: 1px solid rgba(17,24,39,.07); border-radius: 1rem; background: rgba(17,24,39,.025); margin-bottom: .65rem; }
.list-soft-item strong, .list-soft-item span, .list-soft-item small { display: block; }
.list-soft-item span, .list-soft-item small { color: var(--muted); font-size: .86rem; }
[data-bs-theme="dark"] .dashboard-filter-card, [data-bs-theme="dark"] .mini-stat-card, [data-bs-theme="dark"] .list-soft-item { background: #111827; color: #f9fafb; border-color: rgba(255,255,255,.08); }

.purchase-items { display: grid; gap: 1rem; }
.purchase-item-card { border: 1px solid rgba(17,24,39,.08); border-radius: 1.35rem; padding: 1rem; background: #fff; box-shadow: 0 14px 40px rgba(17,24,39,.045); }
.purchase-moto-section { border: 1px solid rgba(239,68,68,.16); background: rgba(239,68,68,.025); border-radius: 1.2rem; padding: 1rem; }
.purchase-total-box { display: grid; grid-template-columns: 1fr auto; gap: .45rem .8rem; padding: 1rem; border-radius: 1.2rem; background: rgba(17,24,39,.04); }
.purchase-total-box span { color: var(--muted); }
.purchase-total-box strong { text-align: right; }
.payment-application-card { border: 1px solid rgba(17,24,39,.08); border-radius: 1rem; padding: .85rem; background: #fff; margin-bottom: .7rem; }
[data-bs-theme="dark"] .purchase-item-card, [data-bs-theme="dark"] .payment-application-card { background: #111827; border-color: rgba(255,255,255,.08); }
[data-bs-theme="dark"] .purchase-total-box { background: rgba(255,255,255,.055); }
.sidebar-nav { overflow-y: auto; padding-right: .15rem; }
.sidebar-nav::-webkit-scrollbar { width: 6px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.22); border-radius: 999px; }

.summary-line, .summary-total { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .55rem 0; }
.summary-line span, .summary-total span { color: var(--muted); }
.summary-line strong { text-align: right; }
.summary-total { font-size: 1.05rem; }
.summary-total strong { font-size: 1.35rem; letter-spacing: -.04em; text-align: right; }
.icon-soft { width: 48px; height: 48px; flex: 0 0 48px; border-radius: 1rem; display: grid !important; place-items: center; }
.icon-soft i { font-size: 1.35rem !important; opacity: 1 !important; }
.purchase-item-row { border-color: rgba(17,24,39,.075) !important; box-shadow: 0 12px 36px rgba(17,24,39,.04); }
[data-bs-theme="dark"] .purchase-item-row { background: #111827 !important; border-color: rgba(255,255,255,.08) !important; }
.sticky-xl-top { z-index: 10; }
.table code { color: var(--primary); }

.nav-section {
  color: rgba(255,255,255,.42);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin: 1rem 1.05rem .35rem;
}
.dashboard-filter-alert {
  display:flex;
  align-items:center;
  gap:.65rem;
  padding:.85rem 1rem;
  border-radius:1.1rem;
  background: linear-gradient(135deg, rgba(13,110,253,.10), rgba(255,64,64,.08));
  color: var(--bs-body-color);
  border:1px solid rgba(13,110,253,.12);
}
.soft-stat-card {
  background: var(--bs-body-bg);
  border: 1px solid rgba(30,41,59,.08);
  border-radius: 1.35rem;
  padding: 1rem;
  display:flex;
  align-items:center;
  gap: .85rem;
  box-shadow: 0 14px 35px rgba(15,23,42,.06);
  min-height: 92px;
}
.soft-stat-card i { font-size:1.75rem; width:44px; height:44px; display:grid; place-items:center; border-radius:1rem; background:rgba(15,23,42,.04); }
.soft-stat-card span { display:block; color:var(--bs-secondary-color); font-size:.82rem; }
.soft-stat-card strong { display:block; font-size:1.1rem; font-weight:800; }
.supplier-debt-row, .payment-mini-card {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  padding:.85rem 0;
  border-bottom:1px solid rgba(148,163,184,.18);
}
.supplier-debt-row:last-child, .payment-mini-card:last-child { border-bottom:0; }
.supplier-debt-row span, .payment-mini-card span, .payment-mini-card small { display:block; color:var(--bs-secondary-color); font-size:.78rem; }
.supplier-debt-row b { color:#dc3545; }
.purchase-total-box {
  border-radius: 1.25rem;
  padding:1rem;
  background: linear-gradient(135deg, #ff4141, #ff7a18);
  color:white;
  box-shadow:0 20px 45px rgba(255,65,65,.22);
}
.purchase-total-box span { display:block; opacity:.9; font-size:.85rem; }
.purchase-total-box strong { font-size:1.6rem; }
.purchase-item-card {
  border:1px solid rgba(148,163,184,.22);
  background:rgba(255,255,255,.72);
  border-radius:1.35rem;
  padding:1rem;
  margin-bottom:1rem;
  box-shadow:0 14px 35px rgba(15,23,42,.05);
}
[data-bs-theme="dark"] .purchase-item-card { background:rgba(255,255,255,.04); }
.moto-detail-panel {
  border-radius:1rem;
  background:rgba(255,65,65,.08);
  border:1px dashed rgba(255,65,65,.30);
  padding:1rem;
}
.attachment-link {
  display:flex;
  align-items:center;
  gap:.55rem;
  color:inherit;
  text-decoration:none;
  padding:.65rem .75rem;
  border-radius:.9rem;
  background:rgba(15,23,42,.04);
  margin-bottom:.5rem;
}
.attachment-link:hover { background:rgba(13,110,253,.08); color:var(--bs-primary); }
@media (max-width: 991.98px) {
  .page-actions { align-items:flex-start; }
  .page-actions > .d-flex { width:100%; flex-wrap:wrap; }
  .page-actions select, .page-actions .btn { flex:1 1 auto; }
}

.permission-code { color: var(--bs-secondary-color); font-size: .72rem; opacity: .8; }
.wizard-shell { border-radius: 1.55rem; background: rgba(255,255,255,.82); border: 1px solid rgba(148,163,184,.20); box-shadow: 0 20px 55px rgba(15,23,42,.08); padding: .85rem; }
.wizard-progress { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .65rem; }
.wizard-step { border: 0; background: transparent; border-radius: 1.15rem; padding: .85rem; display: grid; grid-template-columns: auto 1fr; grid-template-areas: 'num title' 'num small'; gap: .1rem .65rem; text-align: left; color: var(--bs-secondary-color); transition: .18s ease; }
.wizard-step span { grid-area: num; width: 36px; height: 36px; border-radius: .9rem; display: grid; place-items: center; background: rgba(15,23,42,.06); font-weight: 800; color: var(--ink); }
.wizard-step strong { grid-area: title; color: var(--ink); line-height: 1.1; }
.wizard-step small { grid-area: small; font-size: .76rem; }
.wizard-step.active { background: linear-gradient(135deg, rgba(239,68,68,.16), rgba(249,115,22,.12)); box-shadow: inset 0 0 0 1px rgba(239,68,68,.12); }
.wizard-step.active span, .wizard-step.done span { background: linear-gradient(135deg, #ef4444, #f97316); color: #fff; }
.wizard-panel { display: none; animation: fadeUp .22s ease; }
.wizard-panel.active { display: block; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.type-choice { min-height: 150px; cursor: pointer; display: flex; flex-direction: column; gap: .35rem; padding: 1.15rem; border: 1px solid rgba(148,163,184,.28); border-radius: 1.35rem; background: #fff; box-shadow: 0 14px 35px rgba(15,23,42,.05); transition: .18s ease; }
.type-choice input { position: absolute; opacity: 0; pointer-events: none; }
.type-choice i { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 1rem; background: rgba(15,23,42,.05); font-size: 1.6rem; color: var(--primary); }
.type-choice strong { font-size: 1.1rem; }
.type-choice span { color: var(--bs-secondary-color); font-size: .86rem; }
.type-choice.active { border-color: rgba(239,68,68,.45); background: linear-gradient(135deg, rgba(239,68,68,.08), rgba(249,115,22,.08)); transform: translateY(-2px); }
.type-choice.active i { background: linear-gradient(135deg, #ef4444, #f97316); color: #fff; }
.wizard-actions { z-index: 25; }
.pos-layout { display: grid; grid-template-columns: minmax(0, 1fr) 430px; gap: 1rem; align-items: start; }
.pos-search-card, .pos-cart { border-radius: 1.5rem; background: #fff; border: 1px solid rgba(148,163,184,.18); box-shadow: 0 22px 65px rgba(15,23,42,.08); }
.pos-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .85rem; }
.pos-product-card { border: 1px solid rgba(148,163,184,.22); border-radius: 1.2rem; padding: 1rem; background: rgba(255,255,255,.78); display: flex; flex-direction: column; gap: .75rem; min-height: 178px; transition: .16s ease; }
.pos-product-card:hover { transform: translateY(-3px); box-shadow: 0 18px 45px rgba(15,23,42,.09); }
.pos-product-card .product-head { display:flex; align-items:flex-start; justify-content:space-between; gap:.75rem; }
.pos-product-card .product-head strong { line-height: 1.15; }
.stock-pill { display: inline-flex; align-items: center; gap:.35rem; padding:.35rem .55rem; border-radius:999px; background:rgba(13,110,253,.08); color:#0d6efd; font-size:.78rem; font-weight:700; }
.cart-line { display: grid; grid-template-columns: 1fr auto; gap:.65rem; padding:.85rem; border:1px solid rgba(148,163,184,.20); border-radius:1rem; margin-bottom:.65rem; background:rgba(15,23,42,.025); }
.cart-line input { max-width: 86px; }
.cart-line small { color: var(--bs-secondary-color); display:block; }
.cart-empty { display:grid; place-items:center; text-align:center; padding:2rem 1rem; color:var(--bs-secondary-color); }
.cart-empty i { font-size:2.5rem; opacity:.45; }
.payment-row { display:grid; grid-template-columns: 1fr 120px 1fr auto; gap:.5rem; align-items:center; margin-bottom:.55rem; }
.receipt-paper { max-width: 760px; margin:auto; background:#fff; color:#111827; border-radius:1.35rem; padding:2rem; box-shadow:0 28px 80px rgba(15,23,42,.16); }
.receipt-paper.ticket { max-width: 360px; font-size:.88rem; border-radius:0; box-shadow:none; }
.fiscal-range-card { border:1px solid rgba(148,163,184,.22); border-radius:1.2rem; padding:1rem; background:#fff; box-shadow:0 14px 40px rgba(15,23,42,.05); }
.range-meter { height: 10px; border-radius:999px; background:rgba(15,23,42,.07); overflow:hidden; }
.range-meter > span { display:block; height:100%; background:linear-gradient(135deg, #ef4444, #f97316); }
.tour-step { display:flex; gap:1rem; align-items:flex-start; padding:1rem; border-radius:1.15rem; background:rgba(15,23,42,.035); margin-bottom:.75rem; }
.tour-step span { width:34px; height:34px; display:grid; place-items:center; border-radius:.9rem; background:linear-gradient(135deg, #ef4444, #f97316); color:white; font-weight:800; flex:0 0 auto; }
.tour-step strong, .tour-step small { display:block; }
[data-bs-theme="dark"] .wizard-shell, [data-bs-theme="dark"] .type-choice, [data-bs-theme="dark"] .pos-search-card, [data-bs-theme="dark"] .pos-cart, [data-bs-theme="dark"] .pos-product-card, [data-bs-theme="dark"] .fiscal-range-card { background:#111827; border-color:rgba(255,255,255,.10); }
[data-bs-theme="dark"] .type-choice i { background:rgba(255,255,255,.08); }
[data-bs-theme="dark"] .cart-line, [data-bs-theme="dark"] .tour-step { background:rgba(255,255,255,.045); border-color:rgba(255,255,255,.08); }
@media (max-width: 1199.98px) { .pos-layout { grid-template-columns: 1fr; } .pos-cart { position: static !important; } }
@media (max-width: 767.98px) { .wizard-progress { grid-template-columns: 1fr; } .payment-row { grid-template-columns: 1fr; } .wizard-actions { flex-direction: column; align-items: stretch !important; } .wizard-actions > div, .wizard-actions .btn { width: 100%; } }
@media print { .app-sidebar, .topbar, .no-print, .sidebar-backdrop { display:none !important; } .app-main { margin:0 !important; } .content-area { padding:0 !important; } body { background:#fff !important; } .receipt-paper { box-shadow:none !important; border-radius:0 !important; max-width:none !important; } }

/* Phase 3 POS, wizard and guided tour */
.app-tabs .nav-link { border-radius: 999px; color: var(--bs-secondary-color); font-weight: 700; }
.app-tabs .nav-link.active { background: linear-gradient(135deg, #ff4141, #ff7a18); color: #fff; box-shadow: 0 14px 30px rgba(239,68,68,.22); }
.wizard-shell { display: grid; gap: 1rem; }
.wizard-nav { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; margin-bottom: 1rem; }
.wizard-nav button { border: 0; background: #fff; border-radius: 1.25rem; padding: .9rem; text-align: left; box-shadow: 0 12px 35px rgba(17,24,39,.06); color: var(--bs-body-color); }
.wizard-nav button span { width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 50%; background: rgba(15,23,42,.06); margin-right: .55rem; font-weight: 900; }
.wizard-nav button.active { background: linear-gradient(135deg, rgba(255,65,65,.12), rgba(255,122,24,.12)); outline: 2px solid rgba(255,65,65,.25); }
.wizard-nav button.active span { background: linear-gradient(135deg, #ff4141, #ff7a18); color: #fff; }
.wizard-actions { position: sticky; bottom: 0; background: rgba(247,248,252,.82); backdrop-filter: blur(18px); padding: 1rem; border-radius: 1.3rem; box-shadow: 0 -12px 40px rgba(17,24,39,.08); z-index: 25; }
.pos-search-card { overflow: hidden; }
.pos-results { min-height: 360px; }
.pos-product-card { cursor: pointer; display: flex; gap: .85rem; align-items: stretch; background: #fff; border: 1px solid rgba(15,23,42,.08); border-radius: 1.35rem; padding: .9rem; box-shadow: 0 14px 40px rgba(15,23,42,.055); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; height: 100%; }
.pos-product-card:hover { transform: translateY(-3px); border-color: rgba(255,65,65,.28); box-shadow: 0 24px 55px rgba(15,23,42,.10); }
.pos-product-card strong, .pos-product-card span, .pos-product-card small { display: block; }
.pos-product-card span, .pos-product-card small { color: var(--bs-secondary-color); font-size: .85rem; }
.pos-product-img { width: 78px; height: 78px; flex: 0 0 78px; border-radius: 1rem; background: linear-gradient(135deg, rgba(255,65,65,.12), rgba(255,122,24,.12)); display: grid; place-items: center; overflow: hidden; }
.pos-product-img img { width: 100%; height: 100%; object-fit: cover; }
.pos-product-img i { font-size: 2rem; color: #ef4444; }
.pos-cart-card { top: 92px; }
.pos-cart-items { max-height: 360px; overflow: auto; padding-right: .25rem; }
.pos-cart-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .75rem; padding: .75rem 0; border-bottom: 1px solid rgba(148,163,184,.18); }
.pos-cart-row:last-child { border-bottom: 0; }
.pos-cart-row strong, .pos-cart-row span, .pos-cart-row small { display: block; }
.pos-cart-row span, .pos-cart-row small { color: var(--bs-secondary-color); font-size: .78rem; }
.pos-cart-controls { display: grid; grid-template-columns: 70px 100px 38px; gap: .35rem; align-items: center; }
.pos-cart-controls input { border: 1px solid rgba(15,23,42,.12); border-radius: .85rem; padding: .35rem .45rem; width: 100%; }
.pos-totals { background: linear-gradient(135deg, rgba(15,23,42,.05), rgba(255,65,65,.06)); border-radius: 1.25rem; padding: 1rem; display: grid; gap: .4rem; }
.pos-totals > div { display: flex; justify-content: space-between; align-items: center; }
.pos-totals span { color: var(--bs-secondary-color); }
.pos-totals .grand { padding-top: .55rem; border-top: 1px dashed rgba(15,23,42,.18); font-size: 1.2rem; }
.pos-totals .grand strong { font-size: 1.55rem; letter-spacing: -.04em; }
.pos-payment-row { border: 1px solid rgba(148,163,184,.18); border-radius: 1.1rem; padding: .85rem; margin-bottom: .75rem; background: rgba(15,23,42,.025); }
.tour-overlay { position: fixed; inset: 0; background: rgba(15,23,42,.42); z-index: 2000; backdrop-filter: blur(2px); }
.tour-box { position: fixed; z-index: 2001; width: min(340px, calc(100vw - 32px)); background: #fff; color: #111827; border-radius: 1.35rem; padding: 1.1rem; box-shadow: 0 30px 90px rgba(0,0,0,.28); }
.tour-box h5 { font-weight: 900; margin-bottom: .35rem; }
.tour-box p { color: #64748b; margin-bottom: .9rem; }
.tour-count { display: inline-flex; padding: .25rem .55rem; border-radius: 999px; background: rgba(255,65,65,.12); color: #ef4444; font-weight: 800; font-size: .72rem; margin-bottom: .7rem; }
.tour-highlight { outline: 4px solid rgba(255,193,7,.75) !important; outline-offset: 4px; border-radius: 1rem; position: relative; z-index: 2002; }
[data-bs-theme="dark"] .wizard-nav button, [data-bs-theme="dark"] .pos-product-card, [data-bs-theme="dark"] .tour-box { background: #111827; color: #f9fafb; border-color: rgba(255,255,255,.08); }
[data-bs-theme="dark"] .pos-payment-row, [data-bs-theme="dark"] .pos-totals { background: rgba(255,255,255,.055); }
[data-bs-theme="dark"] .wizard-actions { background: rgba(11,16,32,.86); }
@media (max-width: 991.98px) { .wizard-nav { grid-template-columns: 1fr 1fr; } .pos-cart-card { position: static !important; } }
@media (max-width: 575.98px) { .wizard-nav { grid-template-columns: 1fr; } .pos-cart-row { grid-template-columns: 1fr; } .pos-cart-controls { grid-template-columns: 1fr 1fr 38px; } }

/* Phase 4 PRO UX */
.fw-black { font-weight: 950 !important; letter-spacing: -.045em; }
.topbar-greeting { display:inline-flex; align-items:center; gap:.25rem; padding:.25rem .65rem; border-radius:999px; background:rgba(255,65,65,.10); color:#ef4444; font-size:.78rem; font-weight:800; margin-bottom:.35rem; }
.help-btn i { font-size: 1.08rem; }
.pro-panel { background:#fff; border:1px solid rgba(148,163,184,.18); border-radius:1.7rem; box-shadow:0 24px 70px rgba(15,23,42,.075); }
.pro-section-card { background:#fff; border:1px solid rgba(148,163,184,.18); border-radius:1.7rem; padding:1.55rem; box-shadow:0 22px 65px rgba(15,23,42,.065); }
.pro-section-header { display:flex; align-items:center; gap:.85rem; margin-bottom:1.1rem; }
.icon-bubble { width:46px; height:46px; border-radius:1.2rem; display:grid; place-items:center; color:#fff; background:linear-gradient(135deg,#ff4141,#ff7a18); box-shadow:0 14px 35px rgba(239,68,68,.22); }
.input-group-rounded .input-group-text { border-radius:1rem 0 0 1rem; background:rgba(15,23,42,.035); border-color:rgba(148,163,184,.25); color:#64748b; }
.input-group-rounded .form-control, .input-group-rounded .form-select { border-radius:0 1rem 1rem 0; }
.input-icon { position:relative; }
.input-icon > i { position:absolute; left:1rem; top:50%; transform:translateY(-50%); color:#94a3b8; z-index:2; }
.input-icon > .form-control, .input-icon > .form-select { padding-left:2.65rem; }
.stock-branch-card { background:linear-gradient(135deg,rgba(15,23,42,.025),rgba(255,65,65,.035)); border:1px solid rgba(148,163,184,.18); border-radius:1.35rem; padding:1rem; height:100%; }
.stock-branch-card strong, .stock-branch-card small { display:block; }
.inline-create-hint { font-size:.8rem; color:#64748b; margin-top:.35rem; }
.module-empty { display:grid; place-items:center; min-height:260px; text-align:center; color:#64748b; }
.module-empty i { font-size:3rem; color:#cbd5e1; margin-bottom:.75rem; }

/* POS inspired by app catalog */
.pos-pro-shell { min-height:calc(100vh - 130px); }
.pos-terminal-grid { display:grid; grid-template-columns:minmax(0,1fr) 410px; gap:1rem; align-items:start; }
.pos-workspace { background:#f8fafc; border:1px solid rgba(148,163,184,.22); border-radius:1.5rem; box-shadow:0 20px 55px rgba(15,23,42,.06); overflow:hidden; }
.pos-pro-topbar { display:flex; align-items:center; gap:.75rem; padding:.8rem; background:#fff; border-bottom:1px solid rgba(148,163,184,.18); }
.cash-status-pill { display:inline-flex; align-items:center; gap:.35rem; padding:.45rem .75rem; border-radius:999px; background:rgba(34,197,94,.10); color:#16a34a; font-weight:850; font-size:.78rem; }
.pos-toolbar { display:grid; grid-template-columns:1.2fr 1fr 1fr 1fr; gap:.75rem; padding:1rem; background:#fff; border-bottom:1px solid rgba(148,163,184,.16); }
.pos-search-xl { display:flex; align-items:center; gap:.75rem; background:#fff; border:1px solid rgba(148,163,184,.26); border-radius:1.2rem; padding:.65rem .85rem; box-shadow:0 12px 30px rgba(15,23,42,.045); }
.pos-search-xl i { color:#64748b; font-size:1.1rem; }
.pos-search-xl input { border:0; outline:0; width:100%; background:transparent; font-size:1rem; }
.pos-catalog-head { display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:1rem; }
.pos-category-chips { display:flex; gap:.5rem; overflow:auto; padding:0 1rem 1rem; }
.pos-category-chips .chip { border:1px solid rgba(148,163,184,.25); background:#fff; border-radius:999px; padding:.45rem .75rem; white-space:nowrap; font-weight:750; color:#475569; }
.pos-category-chips .chip.active { background:linear-gradient(135deg,#ff4141,#ff7a18); color:#fff; border-color:transparent; }
.pos-filter-row { display:grid; grid-template-columns:repeat(4,1fr); gap:.65rem; padding:0 1rem 1rem; }
.pos-product-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:.8rem; padding:0 1rem 1rem; max-height:calc(100vh - 340px); overflow:auto; }
.pos-pro-card { background:#fff; border:1px solid rgba(148,163,184,.22); border-radius:1.1rem; padding:.65rem; cursor:pointer; transition:.18s ease; position:relative; box-shadow:0 12px 28px rgba(15,23,42,.055); }
.pos-pro-card:hover { transform:translateY(-4px); border-color:rgba(255,65,65,.35); box-shadow:0 20px 45px rgba(15,23,42,.10); }
.pos-pro-img { height:94px; border-radius:.9rem; background:linear-gradient(135deg,rgba(255,65,65,.10),rgba(255,122,24,.12)); display:grid; place-items:center; overflow:hidden; margin-bottom:.55rem; }
.pos-pro-img img { width:100%; height:100%; object-fit:cover; }
.pos-pro-img i { font-size:2.1rem; color:#ef4444; }
.mini-badge { display:inline-flex; align-items:center; gap:.25rem; border-radius:999px; padding:.18rem .45rem; background:rgba(15,23,42,.065); font-size:.68rem; font-weight:850; }
.pos-pro-body strong { display:block; font-size:.86rem; line-height:1.12; min-height:38px; }
.pos-pro-meta { color:#64748b; font-size:.72rem; display:flex; align-items:center; justify-content:space-between; gap:.5rem; margin:.45rem 0; }
.pos-pro-footer { display:flex; align-items:center; justify-content:space-between; gap:.5rem; }
.stock-pill.warn { background:rgba(245,158,11,.12); color:#d97706; }
.pos-cart-pro { position:sticky; top:92px; max-height:calc(100vh - 112px); display:flex; flex-direction:column; background:#fff; border-radius:1.5rem; border:1px solid rgba(148,163,184,.18); box-shadow:0 24px 70px rgba(15,23,42,.08); overflow:hidden; }
.cart-title-row { display:flex; align-items:center; justify-content:space-between; padding:1rem; border-bottom:1px solid rgba(148,163,184,.16); }
.cart-lines-pro { flex:1; overflow:auto; min-height:260px; padding:1rem; }
.cart-pro-line { border:1px solid rgba(148,163,184,.18); border-radius:1rem; padding:.85rem; margin-bottom:.75rem; background:rgba(15,23,42,.025); }
.cart-pro-line strong, .cart-pro-line small { display:block; }
.cart-inputs { display:grid; grid-template-columns:72px 1fr 40px; gap:.45rem; margin-top:.65rem; }
.cart-inputs input { border-radius:.85rem; border:1px solid rgba(148,163,184,.28); padding:.4rem .5rem; }
.pos-totals-pro { margin:1rem; padding:1rem; border-radius:1.2rem; background:linear-gradient(135deg,rgba(15,23,42,.055),rgba(255,65,65,.065)); }
.pos-totals-pro > div { display:flex; justify-content:space-between; margin-bottom:.35rem; }
.pos-totals-pro .grand { border-top:1px dashed rgba(15,23,42,.22); padding-top:.55rem; margin-top:.55rem; font-size:1.12rem; }
.payment-pro-row { display:grid; grid-template-columns:1fr 110px 1fr 38px; gap:.45rem; margin-bottom:.45rem; }

/* Supplier payment PRO */
.supplier-pay-layout { display:grid; grid-template-columns:minmax(0,1fr) 390px; gap:1rem; align-items:start; }
.supplier-summary-mini { display:grid; grid-template-columns:repeat(4,1fr); gap:.75rem; margin-top:1rem; }
.supplier-summary-mini > div { border-radius:1.1rem; padding:.8rem; background:rgba(15,23,42,.035); }
.invoice-pay-list { display:grid; gap:.85rem; }
.invoice-pay-card { border:1px solid rgba(148,163,184,.2); border-radius:1.25rem; padding:1rem; background:#fff; transition:.16s ease; }
.invoice-pay-card:hover { border-color:rgba(255,65,65,.25); box-shadow:0 18px 45px rgba(15,23,42,.08); }
.invoice-pay-head { display:grid; grid-template-columns:1fr auto; gap:1rem; align-items:start; }
.invoice-pay-actions { display:flex; gap:.45rem; flex-wrap:wrap; justify-content:flex-end; }
.invoice-items-panel { display:none; margin-top:.8rem; border-top:1px dashed rgba(148,163,184,.35); padding-top:.8rem; }
.invoice-items-panel.open { display:block; }
.invoice-item-line { display:grid; grid-template-columns:1fr 110px 130px; gap:.75rem; align-items:center; padding:.65rem; border-radius:.95rem; background:rgba(15,23,42,.025); margin-bottom:.5rem; }
.item-apply-input { text-align:right; }
.supplier-payment-sticky { position:sticky; top:92px; }
.allocation-total-card { border-radius:1.2rem; padding:1rem; background:linear-gradient(135deg,#ff4141,#ff7a18); color:#fff; display:flex; justify-content:space-between; align-items:center; margin-top:1rem; }
.allocation-total-card strong { font-size:1.55rem; }

/* Separate commercial modules */
.quote-builder-grid { display:grid; grid-template-columns:minmax(0,1fr) 380px; gap:1rem; align-items:start; }
.quotation-module .quote-lines { max-height:420px; overflow:auto; }
.reservation-card { background:#fff; border:1px solid rgba(148,163,184,.18); border-radius:1.5rem; padding:1rem; box-shadow:0 18px 48px rgba(15,23,42,.06); }
.reservation-data { display:grid; grid-template-columns:repeat(4,1fr); gap:.75rem; }
.moto-select-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(210px,1fr)); gap:.85rem; max-height:460px; overflow:auto; }
.moto-reserve-choice { border:1px solid rgba(148,163,184,.22); border-radius:1.2rem; padding:1rem; cursor:pointer; background:#fff; transition:.16s ease; }
.moto-reserve-choice:hover, .moto-reserve-choice.active { border-color:rgba(255,65,65,.38); background:rgba(255,65,65,.045); transform:translateY(-2px); }
.moto-reserve-icon { width:52px; height:52px; border-radius:1.2rem; display:grid; place-items:center; background:rgba(255,65,65,.10); color:#ef4444; font-size:1.6rem; margin-bottom:.6rem; }
.credit-calc-box { border-radius:1.35rem; padding:1rem; background:linear-gradient(135deg,rgba(15,23,42,.055),rgba(59,130,246,.075)); }
.warranty-items-box { border:1px solid rgba(148,163,184,.18); border-radius:1.25rem; padding:1rem; max-height:360px; overflow:auto; }

/* Help center and live tour */
.help-center-modal { overflow:hidden; }
.help-card { display:flex; flex-direction:column; gap:.55rem; border:1px solid rgba(148,163,184,.2); border-radius:1.3rem; padding:1rem; background:#fff; transition:.16s ease; }
.help-card:hover { transform:translateY(-2px); border-color:rgba(255,65,65,.26); box-shadow:0 18px 45px rgba(15,23,42,.08); }
.help-card i { width:42px; height:42px; display:grid; place-items:center; border-radius:1rem; background:linear-gradient(135deg,#ff4141,#ff7a18); color:#fff; font-size:1.25rem; }
.help-card strong, .help-card small { display:block; }
.tour-live-overlay { position:fixed; inset:0; z-index:2998; background:rgba(15,23,42,.48); backdrop-filter:blur(2px); }
.tour-highlight-live { position:relative !important; z-index:3000 !important; outline:4px solid rgba(255,193,7,.85) !important; outline-offset:5px !important; border-radius:1.2rem !important; box-shadow:0 0 0 9999px rgba(15,23,42,.02),0 0 40px rgba(255,193,7,.38) !important; }
.tour-live-card { position:fixed; z-index:3001; width:min(390px,calc(100vw - 32px)); background:#fff; color:#111827; border-radius:1.35rem; padding:1.1rem; }
.tour-live-count { display:inline-flex; padding:.26rem .58rem; border-radius:999px; background:rgba(255,65,65,.12); color:#ef4444; font-weight:850; font-size:.72rem; margin-bottom:.75rem; }
.tour-live-card h5 { font-weight:950; letter-spacing:-.02em; margin-bottom:.35rem; }
.tour-live-card p { color:#64748b; }

[data-bs-theme="dark"] .pro-panel, [data-bs-theme="dark"] .pro-section-card, [data-bs-theme="dark"] .pos-workspace, [data-bs-theme="dark"] .pos-pro-topbar, [data-bs-theme="dark"] .pos-toolbar, [data-bs-theme="dark"] .pos-search-xl, [data-bs-theme="dark"] .pos-pro-card, [data-bs-theme="dark"] .pos-cart-pro, [data-bs-theme="dark"] .invoice-pay-card, [data-bs-theme="dark"] .reservation-card, [data-bs-theme="dark"] .moto-reserve-choice, [data-bs-theme="dark"] .help-card { background:#111827; border-color:rgba(255,255,255,.1); }
[data-bs-theme="dark"] .stock-branch-card, [data-bs-theme="dark"] .cart-pro-line, [data-bs-theme="dark"] .invoice-item-line { background:rgba(255,255,255,.045); }
@media (max-width:1199.98px) { .pos-terminal-grid, .supplier-pay-layout, .quote-builder-grid { grid-template-columns:1fr; } .pos-cart-pro, .supplier-payment-sticky { position:static; max-height:none; } .pos-product-grid { max-height:none; } }
@media (max-width:991.98px) { .pos-toolbar, .pos-filter-row, .supplier-summary-mini, .reservation-data { grid-template-columns:1fr 1fr; } }
@media (max-width:575.98px) { .pos-toolbar, .pos-filter-row, .supplier-summary-mini, .reservation-data, .payment-pro-row, .invoice-item-line { grid-template-columns:1fr; } .cart-inputs { grid-template-columns:1fr 1fr 40px; } }

/* Mejora completa Fase 4 */
.pagination-pro { display:flex; align-items:center; justify-content:space-between; gap:1rem; flex-wrap:wrap; }
.pagination-pro .page-link { border:0; border-radius:.9rem; margin:0 .15rem; color:#111827; box-shadow:0 10px 24px rgba(15,23,42,.06); }
.pagination-pro .page-item.active .page-link { background:linear-gradient(135deg,#ff4141,#ff7a18); color:#fff; }
.input-group-pro { border:1px solid rgba(15,23,42,.12); border-radius:1rem; overflow:hidden; background:#fff; }
.input-group-pro .input-group-text, .input-group-pro .form-control { border:0; background:transparent; }
.pro-section-card, .pro-panel { background:#fff; border:1px solid rgba(15,23,42,.07); border-radius:1.65rem; box-shadow:0 24px 70px rgba(15,23,42,.07); padding:1.35rem; }
.supplier-pay-layout { display:grid; grid-template-columns:minmax(0,1fr) 380px; gap:1.25rem; align-items:start; }
.supplier-payment-sticky { position:sticky; top:92px; }
.invoice-pay-list { display:grid; gap:1rem; }
.invoice-pay-card { border:1px solid rgba(15,23,42,.08); border-radius:1.35rem; padding:1rem; background:linear-gradient(180deg,#fff,#f8fafc); }
.invoice-pay-head { display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; }
.invoice-pay-head strong, .invoice-pay-head small, .invoice-pay-head span, .invoice-pay-head b { display:block; }
.invoice-pay-head small { color:var(--muted); }
.invoice-pay-head b { color:#dc2626; font-size:1.12rem; }
.invoice-pay-actions { display:flex; gap:.5rem; flex-wrap:wrap; margin-top:.85rem; }
.invoice-items-panel { display:none; margin-top:1rem; border-top:1px solid rgba(15,23,42,.08); padding-top:.8rem; }
.invoice-items-panel.open { display:grid; gap:.65rem; }
.invoice-item-line { display:flex; justify-content:space-between; gap:1rem; align-items:center; padding:.75rem; border-radius:1rem; background:#fff; border:1px solid rgba(15,23,42,.06); }
.invoice-item-line strong, .invoice-item-line small { display:block; }
.invoice-item-line small { color:var(--muted); }
.item-apply-input { display:flex; align-items:center; gap:.5rem; width:210px; }
.allocation-total-card { display:flex; align-items:center; justify-content:space-between; gap:1rem; border-radius:1.25rem; background:linear-gradient(135deg,#ff4141,#ff7a18); color:#fff; padding:1rem 1.1rem; box-shadow:0 20px 45px rgba(255,65,65,.22); }
.allocation-total-card span { opacity:.84; }
.allocation-total-card strong { font-size:1.45rem; }
.reservation-card { background:#fff; border:1px solid rgba(15,23,42,.07); border-radius:1.65rem; padding:1.25rem; box-shadow:0 22px 58px rgba(15,23,42,.07); min-height:100%; }
.reservation-data { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.75rem; margin:1rem 0; }
.reservation-data span { display:flex; gap:.4rem; color:#334155; }
.warranty-card { min-height:250px; }
.receipt-paper, .document-paper { background:#fff; border:1px solid rgba(15,23,42,.08); border-radius:1.25rem; padding:2rem; box-shadow:0 24px 80px rgba(15,23,42,.1); max-width:920px; }
.print-header-pro, .document-header { display:flex; justify-content:space-between; align-items:flex-start; gap:1.5rem; border-bottom:2px solid rgba(15,23,42,.08); padding-bottom:1rem; margin-bottom:1.2rem; }
.print-brand { display:flex; align-items:flex-start; gap:1rem; }
.print-brand h2 { font-weight:900; letter-spacing:-.04em; margin:0; }
.print-brand p { margin:0; color:var(--muted); }
.print-box { border:1px solid rgba(15,23,42,.08); border-radius:1.05rem; padding:1rem; background:#f8fafc; min-height:100%; }
.print-box strong { display:block; margin-bottom:.25rem; }
.print-section-title { font-size:.78rem; text-transform:uppercase; letter-spacing:.12em; font-weight:900; color:#ef4444; margin:1rem 0 .55rem; }
.warranty-items-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:.65rem; }
.warranty-item { border:1px solid rgba(15,23,42,.08); border-radius:1rem; padding:.75rem; display:flex; align-items:center; gap:.55rem; }
.signatures hr, .doc-signatures div:before { border-top:1px solid #111; opacity:.4; }
.returns-form .sticky-xl-top { z-index:5; }
.help-card { cursor:pointer; transition: transform .16s ease, box-shadow .16s ease; }
.help-card:hover { transform:translateY(-4px); box-shadow:0 26px 60px rgba(15,23,42,.14); }
.tour-live-card { position:fixed; z-index:1095; width:min(390px, calc(100vw - 32px)); background:#fff; color:#111827; border:0; border-radius:1.35rem; padding:1rem; }
.tour-live-card h5 { font-weight:900; letter-spacing:-.03em; }
.tour-live-card p { color:#64748b; margin-bottom:1rem; }
.tour-live-count { display:inline-flex; padding:.25rem .55rem; border-radius:999px; background:#fff0f0; color:#ef4444; font-weight:800; font-size:.78rem; margin-bottom:.5rem; }
.tour-live-overlay { position:fixed; inset:0; z-index:1090; background:rgba(15,23,42,.56); backdrop-filter:blur(2px); pointer-events:none; }
.tour-highlight-live { position:relative; z-index:1092 !important; outline:4px solid rgba(255,122,24,.85); border-radius:1rem; box-shadow:0 0 0 9999px rgba(15,23,42,.08), 0 0 0 8px rgba(255,255,255,.8); }
@media (max-width: 1199.98px) { .supplier-pay-layout { grid-template-columns:1fr; } .supplier-payment-sticky { position:static; } }
@media print {
  body { background:#fff!important; }
  .app-sidebar,.topbar,.no-print,.sidebar-backdrop { display:none!important; }
  .app-main { margin:0!important; }
  .content-area { padding:0!important; }
  .receipt-paper,.document-paper { box-shadow:none!important; border:0!important; max-width:100%!important; border-radius:0!important; padding:.25in!important; }
  .print-ticket-80 { width:80mm!important; font-size:11px; }
  .print-half-letter { width:8.5in!important; min-height:5.5in!important; }
  .print-letter, .document-letter { width:8.5in!important; min-height:11in!important; }
}
[data-bs-theme="dark"] .pro-section-card, [data-bs-theme="dark"] .pro-panel, [data-bs-theme="dark"] .invoice-pay-card, [data-bs-theme="dark"] .invoice-item-line, [data-bs-theme="dark"] .reservation-card, [data-bs-theme="dark"] .receipt-paper, [data-bs-theme="dark"] .document-paper { background:#111827; color:#f8fafc; border-color:rgba(255,255,255,.08); }
[data-bs-theme="dark"] .print-box { background:#0f172a; border-color:rgba(255,255,255,.08); }

/* POS limpio: productos primero, pagos en modal */
.pos-clean-shell{max-width:1680px;margin:0 auto}.pos-clean-grid{display:grid;grid-template-columns:minmax(0,1fr) 390px;gap:1.25rem;align-items:start}.pos-clean-cart{position:sticky;top:88px;padding:1.25rem;max-height:calc(100vh - 110px);overflow:auto}.pos-sale-context{padding:1rem}.pos-clean-search-row{display:grid;grid-template-columns:minmax(280px,1fr) 150px 180px 170px;gap:.75rem;align-items:center}.pos-clean-search{display:flex;align-items:center;gap:.7rem;background:#fff;border:1px solid #e5e7eb;border-radius:1.25rem;padding:.7rem .75rem;box-shadow:0 16px 35px #0f172a0d}.pos-clean-search i{font-size:1.35rem;color:#64748b}.pos-clean-search input{border:0;outline:0;width:100%;font-size:1rem;background:transparent}.pos-clean-tabs{display:flex;gap:.55rem;flex-wrap:wrap}.pos-clean-tabs button{border:1px solid #e5e7eb;background:#fff;border-radius:999px;padding:.55rem .9rem;font-weight:800;color:#334155;display:flex;gap:.35rem;align-items:center}.pos-clean-tabs button.active{background:#111827;color:#fff;border-color:#111827}.pos-clean-products{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:1rem;min-height:360px}.pos-clean-card{background:#fff;border:1px solid #e5e7eb;border-radius:1.35rem;padding:.85rem;box-shadow:0 18px 45px #0f172a0c;cursor:pointer;transition:.18s;display:flex;flex-direction:column;gap:.65rem}.pos-clean-card:hover{transform:translateY(-3px);box-shadow:0 20px 55px #0f172a18;border-color:#fecaca}.pos-card-img{height:118px;border-radius:1rem;background:linear-gradient(135deg,#fff1f2,#ffedd5);display:grid;place-items:center;position:relative;overflow:hidden}.pos-card-img img{width:100%;height:100%;object-fit:cover}.pos-card-img i{font-size:2.2rem;color:#ef4444}.mini-badge{position:absolute;bottom:.65rem;left:50%;transform:translateX(-50%);border-radius:999px;color:#fff;font-size:.72rem;font-weight:900;padding:.2rem .55rem}.pos-card-title strong{display:block;line-height:1.2;font-size:.98rem}.pos-card-title small{display:block;color:#64748b;margin-top:.2rem;line-height:1.25}.pos-card-stock{display:flex;gap:.35rem;flex-wrap:wrap}.pos-card-stock span{font-size:.78rem;font-weight:800;color:#2563eb;background:#eff6ff;border-radius:999px;padding:.3rem .5rem;display:flex;gap:.25rem;align-items:center}.pos-card-stock span.warn{background:#fff7ed;color:#ea580c}.pos-card-foot{display:flex;justify-content:space-between;align-items:center;margin-top:auto}.pos-card-foot b{font-size:1.05rem}.cart-pro-line{border:1px solid #e5e7eb;border-radius:1.15rem;padding:.9rem;margin-bottom:.75rem;background:#fff;display:flex;gap:.75rem;align-items:flex-start;justify-content:space-between}.cart-pro-line small{display:block;color:#64748b}.cart-inputs{display:flex;gap:.4rem;margin-top:.55rem}.cart-inputs input{max-width:112px;border:1px solid #e5e7eb;border-radius:.9rem;padding:.45rem .6rem}.cart-inputs button{border:1px solid #e5e7eb;border-radius:.9rem;background:#fff;width:42px}.payment-clean-list{display:flex;flex-direction:column;gap:.85rem}.payment-clean-row{border:1px solid #e5e7eb;border-radius:1.25rem;padding:1rem;background:#fff;box-shadow:0 12px 35px #0f172a0a}.payment-clean-row label{font-size:.8rem;font-weight:800;color:#64748b;margin-bottom:.2rem}.payment-summary-card{background:linear-gradient(135deg,#f8fafc,#fff1f2);border-radius:1.4rem;padding:1.25rem;border:1px solid #e5e7eb}.payment-summary-card>div{display:flex;justify-content:space-between;gap:1rem;margin-bottom:.7rem}.payment-summary-card span{color:#475569}.payment-summary-card strong{font-size:1.15rem}.payment-summary-card .grand{border-top:1px dashed #cbd5e1;padding-top:.75rem;margin-top:.75rem}.payment-summary-card .grand strong{font-size:1.5rem;color:#ef4444}@media(max-width:1200px){.pos-clean-grid{grid-template-columns:1fr}.pos-clean-cart{position:static;max-height:none}.pos-clean-search-row{grid-template-columns:1fr 1fr}}@media(max-width:768px){.pos-clean-search-row{grid-template-columns:1fr}.pos-clean-products{grid-template-columns:repeat(auto-fill,minmax(155px,1fr))}.pos-clean-cart{padding:1rem}.pos-clean-tabs button{font-size:.85rem}.cart-inputs{flex-wrap:wrap}}

/* Configuración de métodos de pago por pestañas */
.payment-help-card{background:#eff6ff;border:1px solid #bfdbfe;border-radius:1.25rem;padding:1rem;color:#1e3a8a}.payment-help-card strong{display:block;margin-bottom:.25rem}.settings-tabs .nav-link{border-radius:999px;font-weight:800}.settings-tabs .nav-link.active{background:#ef4444;color:#fff}.method-rules-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:.75rem}.method-rules-grid .form-check{background:#f8fafc;border:1px solid #e5e7eb;border-radius:1rem;padding:.8rem .8rem .8rem 2.8rem}.warranty-review-card{background:linear-gradient(135deg,#f8fafc,#fff1f2);border:1px solid #e5e7eb;border-radius:1.25rem;padding:1rem}.warranty-mini-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:.75rem}.warranty-mini-card{border:1px solid #e5e7eb;border-radius:1rem;padding:.9rem;background:#fff}.warranty-mini-card input{margin-right:.4rem}

/* Refinamiento Fase 5: POS limpio, pagos por modal y formularios por fases */
.pos-clean-shell .page-actions { align-items:flex-start; }
.pos-clean-grid { display:grid; grid-template-columns:minmax(0,1fr) 390px; gap:1.25rem; align-items:start; }
.pos-clean-left { min-width:0; }
.pos-context-card { padding:1rem; }
.pos-context-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:.85rem; }
.field-icon-wrap { border:1px solid rgba(15,23,42,.08); border-radius:1.15rem; padding:.75rem; background:linear-gradient(180deg,#fff,#f8fafc); min-width:0; }
.field-icon-wrap > i { width:34px; height:34px; display:grid; place-items:center; border-radius:.9rem; background:rgba(255,65,65,.10); color:#ef4444; margin-bottom:.45rem; }
.field-icon-wrap label { display:block; font-size:.78rem; color:#64748b; font-weight:800; text-transform:uppercase; letter-spacing:.06em; margin-bottom:.25rem; }
.field-icon-wrap .form-select { border:0; background:transparent; padding-left:0; font-weight:700; box-shadow:none!important; }
.pos-catalog-panel { padding:1rem; }
.pos-search-line { display:flex; gap:.75rem; align-items:center; }
.pos-scan-box { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:.65rem; align-items:center; border:1px solid rgba(15,23,42,.10); border-radius:1.25rem; padding:.55rem .65rem; background:#fff; width:100%; box-shadow:0 14px 35px rgba(15,23,42,.05); }
.pos-scan-box i { color:#64748b; font-size:1.3rem; }
.pos-scan-box input { border:0; outline:0; background:transparent; min-width:0; font-size:1.02rem; }
.pos-filter-compact { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.75rem; }
.pos-type-tabs { display:flex; gap:.5rem; flex-wrap:wrap; }
.pos-type-tabs button { border:1px solid rgba(15,23,42,.08); background:#fff; border-radius:999px; padding:.55rem .9rem; font-weight:800; color:#334155; display:inline-flex; gap:.45rem; align-items:center; }
.pos-type-tabs button.active { background:#111827; color:#fff; }
.pos-product-grid-clean { display:grid; grid-template-columns:repeat(auto-fill,minmax(190px,1fr)); gap:.9rem; min-height:360px; max-height:calc(100vh - 360px); overflow:auto; padding-right:.25rem; }
.pos-product-card-clean { border:1px solid rgba(15,23,42,.08); border-radius:1.25rem; padding:.75rem; background:#fff; cursor:pointer; display:flex; flex-direction:column; gap:.65rem; min-height:265px; transition:.16s ease; box-shadow:0 14px 38px rgba(15,23,42,.06); }
.pos-product-card-clean:hover { transform:translateY(-3px); box-shadow:0 24px 55px rgba(15,23,42,.12); border-color:rgba(255,65,65,.28); }
.pos-card-image { height:105px; border-radius:1rem; background:linear-gradient(135deg,rgba(255,65,65,.12),rgba(255,122,24,.10)); display:grid; place-items:center; position:relative; overflow:hidden; color:#ef4444; }
.pos-card-image img { width:100%; height:100%; object-fit:cover; }
.pos-card-image i { font-size:2.1rem; }
.pos-card-image span { position:absolute; bottom:.5rem; left:.5rem; background:#ef4444; color:#fff; border-radius:999px; font-size:.72rem; font-weight:900; padding:.22rem .55rem; }
.pos-card-content strong { display:block; line-height:1.15; color:#111827; }
.pos-card-content small { display:block; color:#64748b; font-size:.82rem; margin-top:.25rem; }
.pos-card-tags { display:flex; flex-wrap:wrap; gap:.35rem; margin-top:auto; }
.stock-pill.warn { background:#fff7ed; color:#c2410c; }
.pos-card-bottom { display:flex; align-items:center; justify-content:space-between; gap:.5rem; }
.pos-card-bottom b { font-size:1.05rem; }
.pos-clean-cart { position:sticky; top:92px; padding:1rem; max-height:calc(100vh - 110px); overflow:auto; }
.cart-lines-clean { min-height:210px; max-height:360px; overflow:auto; padding-right:.25rem; }
.cart-line-clean { border:1px solid rgba(15,23,42,.08); border-radius:1.2rem; padding:.85rem; background:#fff; display:grid; grid-template-columns:minmax(0,1fr) auto; gap:.75rem; align-items:start; margin-bottom:.7rem; }
.cart-line-clean strong, .cart-line-clean small { display:block; }
.cart-line-clean small { color:#64748b; font-size:.82rem; }
.cart-controls-clean { display:grid; grid-template-columns:70px 1fr 38px; gap:.45rem; margin-top:.55rem; }
.cart-controls-clean input, .cart-controls-clean button { border:1px solid rgba(15,23,42,.10); border-radius:.85rem; padding:.45rem .55rem; background:#fff; width:100%; }
.cart-controls-clean button { display:grid; place-items:center; }
.compact-total-card { margin-top:1rem; }
.quick-doc-actions { display:grid; grid-template-columns:1fr; gap:.5rem; }
.quick-doc-actions a { display:flex; align-items:center; justify-content:center; gap:.45rem; font-weight:800; }
.payment-modal-pro { border:0; border-radius:1.6rem; overflow:hidden; }
.payment-help-box, .credit-note-info { border:1px solid rgba(15,23,42,.08); background:#f8fafc; border-radius:1.2rem; padding:1rem; display:flex; gap:.85rem; }
.payment-help-box i { color:#0d6efd; font-size:1.45rem; }
.payment-help-box span, .credit-note-info small { color:#64748b; }
.payment-row-clean { border:1px solid rgba(15,23,42,.08); border-radius:1.2rem; background:#fff; padding:1rem; margin-bottom:.8rem; box-shadow:0 12px 32px rgba(15,23,42,.05); }
.payment-summary-card { border-radius:1.35rem; padding:1.1rem; background:linear-gradient(135deg,rgba(15,23,42,.04),rgba(255,65,65,.07)); display:grid; gap:.75rem; }
.payment-summary-card > div { display:flex; align-items:center; justify-content:space-between; gap:1rem; }
.payment-summary-card span { color:#64748b; }
.payment-summary-card strong { font-size:1.25rem; }
.payment-summary-card > div:first-child strong { font-size:1.6rem; color:#111827; }
.pm-tabs .nav-link { border-radius:999px; font-weight:800; color:#334155; }
.pm-tabs .nav-link.active { background:#111827; color:#fff; }
.explain-box { border:1px solid rgba(15,23,42,.08); background:#eff6ff; border-radius:1.25rem; padding:1rem; display:flex; gap:.75rem; color:#1e3a8a; }
.warranty-wizard-grid { display:grid; grid-template-columns:300px minmax(0,1fr); gap:1.2rem; align-items:start; }
.warranty-steps { background:#fff; border:1px solid rgba(15,23,42,.08); border-radius:1.45rem; padding:.75rem; position:sticky; top:92px; }
.warranty-step-btn { border:0; width:100%; background:transparent; border-radius:1rem; padding:.9rem; text-align:left; display:flex; align-items:center; gap:.75rem; font-weight:850; color:#334155; }
.warranty-step-btn span { width:34px; height:34px; border-radius:.9rem; background:#f1f5f9; display:grid; place-items:center; }
.warranty-step-btn.active { background:linear-gradient(135deg,rgba(255,65,65,.13),rgba(255,122,24,.10)); color:#111827; }
.warranty-step-btn.active span { background:#ef4444; color:#fff; }
.warranty-panel { display:none; }
.warranty-panel.active { display:block; }
.warranty-actionbar { position:sticky; bottom:0; z-index:20; margin-top:1rem; background:rgba(248,250,252,.88); backdrop-filter:blur(12px); border-radius:1.25rem; padding:1rem; box-shadow:0 -12px 38px rgba(15,23,42,.08); display:flex; justify-content:space-between; gap:1rem; }
.credit-note-info-card { border:1px dashed rgba(14,165,233,.35); border-radius:1rem; background:#f0f9ff; padding:.85rem; color:#075985; }
@media (max-width:1199.98px){ .pos-clean-grid{grid-template-columns:1fr;} .pos-clean-cart{position:static; max-height:none;} .pos-product-grid-clean{max-height:none;} .warranty-wizard-grid{grid-template-columns:1fr;} .warranty-steps{position:static;} }
@media (max-width:991.98px){ .pos-context-grid{grid-template-columns:repeat(2,minmax(0,1fr));} .pos-filter-compact{grid-template-columns:1fr;} }
@media (max-width:575.98px){ .pos-context-grid{grid-template-columns:1fr;} .pos-scan-box{grid-template-columns:auto 1fr;} .pos-scan-box button{grid-column:1/3;} .cart-line-clean{grid-template-columns:1fr;} }
[data-bs-theme="dark"] .field-icon-wrap, [data-bs-theme="dark"] .pos-scan-box, [data-bs-theme="dark"] .pos-type-tabs button, [data-bs-theme="dark"] .pos-product-card-clean, [data-bs-theme="dark"] .cart-line-clean, [data-bs-theme="dark"] .payment-row-clean, [data-bs-theme="dark"] .warranty-steps { background:#111827; border-color:rgba(255,255,255,.1); }
[data-bs-theme="dark"] .pos-card-content strong, [data-bs-theme="dark"] .payment-summary-card > div:first-child strong { color:#f8fafc; }
[data-bs-theme="dark"] .payment-help-box, [data-bs-theme="dark"] .credit-note-info, [data-bs-theme="dark"] .payment-summary-card, [data-bs-theme="dark"] .explain-box { background:rgba(255,255,255,.04); border-color:rgba(255,255,255,.1); color:#dbeafe; }

/* UX Pro Refinamiento: selects escribibles, tablas paginadas, tooltips y formularios limpios */
.smart-select { position: relative; width: 100%; }
.smart-select-native { position: absolute !important; left: 0; top: 0; width: 1px !important; height: 1px !important; opacity: 0 !important; pointer-events: none !important; }
.smart-select-control { display:grid; grid-template-columns: 1fr auto; align-items:center; gap:.35rem; width:100%; min-height:46px; border:1px solid #dbe3ee; border-radius:1rem; background:#fff; padding:.2rem .65rem .2rem .95rem; box-shadow:0 8px 22px rgba(15,23,42,.035); }
.smart-select-control:focus-within { border-color:#ef4444; box-shadow:0 0 0 .25rem rgba(239,68,68,.13); }
.smart-select-control input { border:0; outline:0; background:transparent; width:100%; min-width:40px; color:inherit; font-size:1rem; padding:.5rem 0; }
.smart-select-control button { width:32px; height:32px; border:0; border-radius:.75rem; display:grid; place-items:center; background:#f8fafc; color:#64748b; }
.smart-select-options { position:absolute; z-index:1060; inset:auto 0 auto 0; margin-top:.35rem; background:#fff; border:1px solid rgba(15,23,42,.10); border-radius:1rem; box-shadow:0 22px 55px rgba(15,23,42,.18); max-height:270px; overflow:auto; padding:.35rem; display:none; }
.smart-select.open .smart-select-options { display:block; }
.smart-select-option { display:flex; align-items:center; justify-content:space-between; gap:.5rem; padding:.65rem .75rem; border-radius:.75rem; cursor:pointer; color:#111827; }
.smart-select-option:hover, .smart-select-option.active { background:#eff6ff; color:#0d6efd; }
.smart-select-empty { padding:.9rem; color:#64748b; text-align:center; }
[data-bs-theme="dark"] .smart-select-control, [data-bs-theme="dark"] .smart-select-options { background:#111827; border-color:rgba(255,255,255,.12); }
[data-bs-theme="dark"] .smart-select-option { color:#f8fafc; }
.input-icon-group { position:relative; }
.input-icon-group > i { position:absolute; left:1rem; top:50%; transform:translateY(-50%); color:#94a3b8; z-index:2; }
.input-icon-group > .form-control { padding-left:2.75rem; }
.action-icon { display:inline-flex; align-items:center; justify-content:center; min-width:38px; gap:.35rem; }
.list-per-page { display:flex; align-items:center; gap:.45rem; justify-content:flex-end; }
.list-toolbar-pro { display:flex; align-items:center; justify-content:space-between; gap:1rem; flex-wrap:wrap; margin:1rem 0; }
.table-pro thead th { white-space:nowrap; font-size:.86rem; color:#475569; text-transform:none; }
.table-pro td { vertical-align:middle; }
.tooltip-inner { border-radius:.7rem; padding:.45rem .65rem; }
.form-hint { color:#64748b; font-size:.82rem; margin-top:.35rem; }
.icon-field-title { display:flex; align-items:center; gap:.55rem; font-weight:850; }
.icon-field-title i { width:34px; height:34px; display:grid; place-items:center; border-radius:.9rem; background:rgba(239,68,68,.10); color:#ef4444; }
.quote-builder-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(320px,430px); gap:1rem; align-items:start; }
.cart-lines-pro, .cart-lines-clean { overflow-x:hidden !important; }
.cart-pro-line { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:.75rem; align-items:center; border:1px solid rgba(15,23,42,.08); border-radius:1rem; padding:.75rem; margin-bottom:.7rem; background:#fff; }
.cart-pro-line strong { display:block; overflow:hidden; text-overflow:ellipsis; white-space:normal; }
.cart-inputs { display:grid; grid-template-columns:80px minmax(95px,1fr) 38px; gap:.45rem; margin-top:.45rem; }
.cart-inputs input, .cart-inputs button { width:100%; border:1px solid rgba(15,23,42,.12); border-radius:.8rem; padding:.43rem .55rem; background:#fff; }
.import-status-new { color:#15803d; font-weight:800; }
.import-status-existing { color:#0d6efd; font-weight:800; }
.report-card-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:1rem; }
.label-roll { display:flex; flex-wrap:wrap; gap:2mm; align-items:flex-start; }
.label-roll .label-item, .label-sheet .label-item { border:1px dashed #94a3b8; padding:2mm; display:flex; flex-direction:column; justify-content:center; align-items:center; text-align:center; page-break-inside:avoid; overflow:hidden; }
.label-roll.roll_50x25 .label-item { width:50mm; height:25mm; }
.label-roll.roll_70x40 .label-item { width:70mm; height:40mm; }
.label-sheet { display:grid; gap:4mm; }
.label-sheet.letter_3col { grid-template-columns:repeat(3,1fr); }
.label-sheet.letter_2col { grid-template-columns:repeat(2,1fr); }
.label-sheet .label-item { min-height:32mm; }
.barcode-text { font-family:monospace; letter-spacing:1px; font-size:1.1rem; line-height:1; }
.cash-kpi-card { border-radius:1.35rem; padding:1.15rem; background:#fff; border:1px solid rgba(15,23,42,.08); box-shadow:0 14px 38px rgba(15,23,42,.06); display:flex; align-items:center; justify-content:space-between; gap:1rem; }
.cash-kpi-card i { width:48px; height:48px; display:grid; place-items:center; border-radius:1rem; background:rgba(239,68,68,.10); color:#ef4444; font-size:1.35rem; }
.cash-kpi-card span { display:block; color:#64748b; font-size:.85rem; }
.cash-kpi-card strong { display:block; font-size:1.5rem; }
.account-friendly-card { border:1px solid rgba(15,23,42,.08); border-radius:1.25rem; padding:1rem; background:#fff; }
.account-friendly-card small { display:block; color:#64748b; }
.price-pin-modal .modal-content { border:0; border-radius:1.45rem; }
@media(max-width:1200px){ .quote-builder-grid{grid-template-columns:1fr;} }
@media(max-width:768px){ .list-per-page{justify-content:flex-start;} .cart-pro-line{grid-template-columns:1fr;} .quote-builder-grid{gap:.7rem;} }
@media print { .label-roll, .label-sheet { margin:0; } .label-item { box-shadow:none!important; } }

/* ===== Fase 7 PRO refinamientos UX ===== */
.input-group-pro{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.45rem;align-items:center}.input-group-pro>.smart-select{min-width:0}.input-group-pro>.btn{height:46px;min-width:46px}.field-icon-input{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:.55rem;border:1px solid #dbe3ee;border-radius:1rem;background:#fff;padding:.2rem .8rem}.field-icon-input i{color:#94a3b8}.field-icon-input .form-control{border:0!important;box-shadow:none!important;background:transparent!important;padding:.6rem 0}.smart-select-control input{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.smart-select-options{min-width:100%;width:max-content;max-width:min(520px,92vw)}.smart-select-option span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.field-icon-wrap .smart-select-control{border:0;box-shadow:none;background:transparent;padding:.15rem 0}.field-icon-wrap .smart-select-control button{background:#f8fafc}.pos-page .pos-menu-toggle{position:fixed;right:18px;bottom:18px;z-index:1100;box-shadow:0 18px 42px rgba(15,23,42,.18)}.pos-sidebar-collapsed .app-sidebar{transform:translateX(-110%);width:0}.pos-sidebar-collapsed .app-main{margin-left:0}.pos-sidebar-collapsed .content-area{max-width:100%;}.pos-sidebar-collapsed .topbar{left:0}.pos-context-card{overflow:visible!important}.pos-context-grid{grid-template-columns:repeat(4,minmax(160px,1fr))}.pos-clean-cart{scrollbar-width:thin}.pos-product-grid-clean{scrollbar-width:thin}.quote-builder-grid .supplier-payment-sticky{min-width:0}.quote-builder-grid .cart-pro-line{grid-template-columns:1fr;align-items:stretch}.quote-builder-grid .cart-pro-line>b{justify-self:end;font-size:1.05rem}.quote-builder-grid .cart-inputs{display:grid;grid-template-columns:80px minmax(90px,1fr) 40px;max-width:100%}.quote-builder-grid .cart-inputs input{max-width:none}.action-icon-only{width:38px;height:38px;display:inline-grid;place-items:center;border-radius:999px}.table-toolbar-pro{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap;margin-bottom:.9rem}.table-toolbar-pro .search-box{min-width:min(420px,100%)}.report-card-pro{border:1px solid rgba(15,23,42,.08);border-radius:1.45rem;background:#fff;box-shadow:0 18px 55px rgba(15,23,42,.07);overflow:hidden}.report-kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:1rem;margin-bottom:1rem}.report-kpi{background:linear-gradient(135deg,#fff,#fff5f5);border:1px solid rgba(15,23,42,.07);border-radius:1.2rem;padding:1rem}.report-kpi span{display:block;color:#64748b;font-size:.85rem}.report-kpi strong{display:block;font-size:1.2rem}.cash-show-grid{display:grid;grid-template-columns:1.1fr .9fr;gap:1rem}.cash-movement-card{border:1px solid rgba(15,23,42,.08);border-radius:1rem;padding:.8rem;background:#fff;display:flex;justify-content:space-between;gap:.8rem;margin-bottom:.6rem}.audit-diff{font-family:ui-monospace, SFMono-Regular, Menlo, monospace;font-size:.78rem;white-space:pre-wrap;background:#f8fafc;border-radius:.8rem;padding:.75rem;max-height:170px;overflow:auto}.label-preview{min-height:80vh}.help-center-modal .help-card{cursor:pointer}.help-card:hover{transform:translateY(-3px);box-shadow:0 18px 45px rgba(15,23,42,.11)}
@media(max-width:1200px){.pos-context-grid{grid-template-columns:repeat(2,minmax(160px,1fr))}.cash-show-grid{grid-template-columns:1fr}}
@media(max-width:640px){.pos-context-grid{grid-template-columns:1fr}.input-group-pro{grid-template-columns:1fr auto}.smart-select-options{width:100%;max-width:100%}}
[data-bs-theme="dark"] .field-icon-input,[data-bs-theme="dark"] .report-card-pro,[data-bs-theme="dark"] .report-kpi,[data-bs-theme="dark"] .cash-movement-card{background:#111827;border-color:rgba(255,255,255,.1);color:#f8fafc}
.doc-info-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem;margin:1.2rem 0}.doc-info-grid>div{border:1px solid rgba(15,23,42,.08);border-radius:1rem;padding:.85rem;background:#f8fafc}.doc-info-grid strong{display:block;font-size:.76rem;color:#64748b;text-transform:uppercase;letter-spacing:.05em;margin-bottom:.25rem}.doc-info-grid span{display:block;font-weight:700;color:#111827}.metric-mini{border:1px solid rgba(15,23,42,.08);border-radius:1rem;padding:.95rem;background:linear-gradient(135deg,#fff,#f8fafc)}.metric-mini span{display:block;color:#64748b;font-size:.82rem}.metric-mini strong{display:block;font-size:1.05rem}.doc-terms{border:1px solid rgba(15,23,42,.08);border-radius:1rem;padding:1rem;background:#f8fafc;margin-top:1.2rem}.doc-signatures{display:grid;grid-template-columns:1fr 1fr;gap:2rem;margin-top:3rem}.doc-signatures>div{border-top:1px solid #111827;text-align:center;padding-top:.45rem;color:#64748b}@media(max-width:768px){.doc-info-grid{grid-template-columns:1fr}.document-header{flex-direction:column}.doc-signatures{grid-template-columns:1fr}}


/* Fase 8 PRO */
.report-switcher{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:1rem}.report-tile{display:block;text-decoration:none;color:var(--ink);background:#fff;border:1px solid rgba(17,24,39,.06);border-radius:1.35rem;padding:1rem;box-shadow:0 18px 45px rgba(17,24,39,.06);transition:.18s ease}.report-tile:hover{transform:translateY(-3px);box-shadow:0 26px 65px rgba(17,24,39,.10)}.report-tile.active{border-color:rgba(239,68,68,.35);background:linear-gradient(145deg,rgba(239,68,68,.12),#fff)}.report-tile i{width:42px;height:42px;border-radius:1rem;background:rgba(239,68,68,.12);color:var(--primary);display:grid;place-items:center;font-size:1.2rem;margin-bottom:.8rem}.report-tile strong,.report-tile span{display:block}.report-tile span{font-size:.85rem;color:var(--muted);margin-top:.2rem}.metric-soft{position:relative;min-height:116px;border-radius:1.4rem;background:#fff;padding:1.1rem 1.2rem;overflow:hidden;box-shadow:0 18px 48px rgba(17,24,39,.06)}.metric-soft span{display:block;color:var(--muted);font-weight:700}.metric-soft strong{display:block;font-size:1.75rem;letter-spacing:-.05em;margin-top:.35rem}.metric-soft i{position:absolute;right:1rem;bottom:.4rem;font-size:3.6rem;color:rgba(239,68,68,.12)}.transfer-item-row{box-shadow:0 14px 40px rgba(17,24,39,.04)}.searchable-wrap{position:relative}.searchable-wrap .searchable-filter{position:absolute;left:0;right:0;top:100%;z-index:1060;background:#fff;border:1px solid rgba(17,24,39,.12);border-radius:1rem;margin-top:.2rem;padding:.4rem;box-shadow:0 20px 60px rgba(17,24,39,.14);display:none}.searchable-wrap.open .searchable-filter{display:block}.searchable-filter input{border:0;background:#f3f4f6;border-radius:.8rem;padding:.55rem .75rem;width:100%;outline:0}.pos-compact .app-sidebar{transform:translateX(-100%)}.pos-compact .app-main{margin-left:0}.pos-compact .content-area{max-width:none}.table .btn[title]{white-space:nowrap}.filters-pro-overflow{overflow:visible!important}[data-bs-theme="dark"] .report-tile,[data-bs-theme="dark"] .metric-soft,[data-bs-theme="dark"] .searchable-filter{background:#111827;color:#f9fafb;border-color:rgba(255,255,255,.08)}
/* Searchable select PRO */
.searchable-select-pro{position:relative;width:100%}.searchable-native-select{position:absolute!important;opacity:0!important;pointer-events:none!important;width:1px!important;height:1px!important}.searchable-control{width:100%;min-height:48px;border:1px solid var(--bs-border-color,#d1d5db);background:#fff;border-radius:1rem;padding:.68rem .9rem;display:flex;align-items:center;justify-content:space-between;gap:.75rem;text-align:left;color:var(--ink,#111827)}.searchable-control span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.searchable-control i{opacity:.7}.searchable-dropdown{display:none;position:absolute;left:0;right:0;top:calc(100% + .35rem);z-index:1085;background:#fff;border:1px solid rgba(17,24,39,.10);border-radius:1rem;box-shadow:0 24px 75px rgba(17,24,39,.18);padding:.6rem}.searchable-select-pro.open .searchable-dropdown{display:block}.searchable-input-wrap{display:flex;align-items:center;gap:.45rem;background:#f3f4f6;border-radius:.85rem;padding:.45rem .65rem;margin-bottom:.55rem}.searchable-input-wrap input{border:0;background:transparent;outline:0;width:100%;font-size:.95rem}.searchable-options{max-height:260px;overflow:auto;display:grid;gap:.2rem}.searchable-option{border:0;background:transparent;text-align:left;padding:.62rem .7rem;border-radius:.75rem;color:var(--ink,#111827)}.searchable-option:hover,.searchable-option.active{background:rgba(59,130,246,.10);color:#0d6efd}.searchable-empty{padding:.8rem;color:var(--muted,#6b7280);text-align:center}[data-bs-theme="dark"] .searchable-control,[data-bs-theme="dark"] .searchable-dropdown{background:#111827;color:#f9fafb;border-color:rgba(255,255,255,.12)}[data-bs-theme="dark"] .searchable-input-wrap{background:#0f172a}

/* Fase 8 PRO: limpieza visual y módulos nuevos */
.report-module-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:.85rem}.report-module-card{display:flex;align-items:center;gap:.75rem;padding:1rem;border-radius:1.15rem;background:#fff;border:1px solid rgba(15,23,42,.08);text-decoration:none;color:#111827;box-shadow:0 12px 35px rgba(15,23,42,.06);font-weight:800}.report-module-card i{width:38px;height:38px;border-radius:1rem;display:grid;place-items:center;background:#fff1f2;color:#ef4444}.report-module-card.active{background:#111827;color:#fff}.report-module-card.active i{background:#ef4444;color:#fff}.smart-select-options{max-width:min(420px,90vw)!important;width:100%!important}.smart-select-option{min-height:42px}.smart-select-option span{display:block;white-space:nowrap!important;overflow:hidden;text-overflow:ellipsis;max-width:100%}.smart-select-control input{font-size:.96rem}.reservation-card-pro{min-height:0}.supplier-pay-layout{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(330px,.65fr);gap:1rem}.supplier-payment-sticky{position:sticky;top:1rem;align-self:start}.invoice-items-panel{display:none}.invoice-items-panel.open{display:block}.transfer-type-help{font-size:.85rem;color:#64748b}@media(max-width:1100px){.supplier-pay-layout{grid-template-columns:1fr}.supplier-payment-sticky{position:static}}.pos-sidebar-collapsed .app-sidebar{display:none!important}.pos-sidebar-collapsed .app-main{margin-left:0!important}.pos-sidebar-collapsed .topbar{left:0!important}.pos-page .app-sidebar{transition:.2s}.expense-kpi{border-radius:1rem;background:#fff;padding:1rem;box-shadow:0 10px 30px #0000000d}.table-pro th{white-space:nowrap}.table-pro td{vertical-align:middle}.app-card{overflow:visible}.dashboard-filter-card{overflow:visible}

/* Fase 8 PRO: limpieza visual y módulos nuevos */
.report-module-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:.85rem}.report-module-card{display:flex;align-items:center;gap:.75rem;padding:1rem;border-radius:1.15rem;background:#fff;border:1px solid rgba(15,23,42,.08);text-decoration:none;color:#111827;box-shadow:0 12px 35px rgba(15,23,42,.06);font-weight:800}.report-module-card i{width:38px;height:38px;border-radius:1rem;display:grid;place-items:center;background:#fff1f2;color:#ef4444}.report-module-card.active{background:#111827;color:#fff}.report-module-card.active i{background:#ef4444;color:#fff}.smart-select-options{max-width:min(420px,90vw)!important;width:100%!important}.smart-select-option{min-height:42px}.smart-select-option span{display:block;white-space:nowrap!important;overflow:hidden;text-overflow:ellipsis;max-width:100%}.smart-select-control input{font-size:.96rem}.reservation-card-pro{min-height:0}.supplier-pay-layout{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(330px,.65fr);gap:1rem}.supplier-payment-sticky{position:sticky;top:1rem;align-self:start}.invoice-items-panel{display:none}.invoice-items-panel.open{display:block}.transfer-type-help{font-size:.85rem;color:#64748b}@media(max-width:1100px){.supplier-pay-layout{grid-template-columns:1fr}.supplier-payment-sticky{position:static}}.pos-sidebar-collapsed .app-sidebar{display:none!important}.pos-sidebar-collapsed .app-main{margin-left:0!important}.pos-sidebar-collapsed .topbar{left:0!important}.pos-page .app-sidebar{transition:.2s}.expense-kpi{border-radius:1rem;background:#fff;padding:1rem;box-shadow:0 10px 30px #0000000d}.table-pro th{white-space:nowrap}.table-pro td{vertical-align:middle}.app-card{overflow:visible}.dashboard-filter-card{overflow:visible}


/* Fase 9 PRO */
body.sidebar-collapsed .app-sidebar { transform: translateX(-110%); }
body.sidebar-collapsed .app-main { margin-left: 0 !important; }
.sidebar-brand .btn { opacity: .9; }
.transfer-builder .card-body, .dashboard-filter-card, .app-card { overflow: visible; }
.transfer-print-page { max-width: 980px; margin: 0 auto; padding: 24px; background: #fff; }
.signature-line { border-top: 1px solid #111827; height: 42px; margin: 46px 10px 6px; }
.page-break { page-break-after: always; }
@media print { .page-break { page-break-after: always; } .print-page { min-height: 95vh; } }
.inventory-audit-diff-positive { color:#16a34a; }
.inventory-audit-diff-negative { color:#dc2626; }
.sidebar-nav .nav-link span { white-space: nowrap; overflow:hidden; text-overflow:ellipsis; }
@media (min-width: 992px) { body.sidebar-collapsed .topbar { left:0; } }

/* Fase 11 PRO PLUS */
body.sidebar-collapsed .app-sidebar{display:none!important;transform:translateX(-120%)!important;}
body.sidebar-collapsed .app-main{margin-left:0!important;}
body.sidebar-collapsed .topbar{left:0!important;}
.sidebar-collapse-floating{position:fixed;left:calc(var(--sidebar-width) + 12px);top:1rem;z-index:1040}
body.sidebar-collapsed .sidebar-collapse-floating{left:1rem}
.commission-tabs .nav-link{border-radius:1rem;background:#fff;border:1px solid rgba(15,23,42,.08);font-weight:800;color:#111827;box-shadow:0 10px 26px rgba(15,23,42,.04)}
.commission-tabs .nav-link.active{background:#111827;color:#fff}.mini-guide{height:100%;background:#fff;border:1px solid rgba(15,23,42,.08);border-radius:1.25rem;padding:1rem;box-shadow:0 12px 30px rgba(15,23,42,.06)}.mini-guide i{font-size:1.6rem;color:#ef4444}.mini-guide strong,.mini-guide span{display:block}.mini-guide span{color:#64748b;font-size:.92rem;margin-top:.25rem}.service-line-row{background:#fff}.catalog-public-body{background:#f5f7fb;color:#111827}.catalog-hero{background:linear-gradient(135deg,#991b1b,#111827);color:#fff}.catalog-hero .brand-icon{width:70px;height:70px;border-radius:1.5rem;background:#ff5b2e;display:grid;place-items:center;font-size:2rem}.catalog-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:1rem}.catalog-card{display:block;cursor:pointer;border:1px solid rgba(15,23,42,.08);background:#fff;border-radius:1.4rem;overflow:hidden;box-shadow:0 14px 35px rgba(15,23,42,.07);transition:.18s ease}.catalog-card:hover{transform:translateY(-3px);box-shadow:0 22px 55px rgba(15,23,42,.12)}.catalog-card input{position:absolute;opacity:0}.catalog-card:has(input:checked){outline:3px solid #ef4444}.catalog-img{height:130px;background:linear-gradient(135deg,#fff1f2,#fff7ed);display:grid;place-items:center;color:#ef4444;font-size:2.6rem}.pos-page .pos-context-card,.pos-page .pos-toolbar,.pos-page .pos-cart-pro{box-shadow:0 12px 35px rgba(15,23,42,.055)!important}.pos-page .page-actions small,.pos-page .page-actions p{max-width:760px}.pos-page .pos-product-card{min-height:0}.cash-email-note{background:#ecfeff;border:0;border-radius:1rem;padding:1rem;color:#0f766e}.field-icon-input .form-control::placeholder{color:#94a3b8}.modal-content{overflow:visible}.data-card{overflow:visible!important}
@media(max-width:1100px){.catalog-grid{grid-template-columns:repeat(auto-fit,minmax(180px,1fr))}}

/* Fase 12 PRO: menú colapsable, filtros buscables y UI compacta */
.sidebar-menu-search{padding:.55rem .7rem .9rem}.sidebar-search-box{display:flex;align-items:center;gap:.5rem;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.14);border-radius:1rem;padding:.55rem .75rem;color:#fff}.sidebar-search-box input{border:0;background:transparent;color:#fff;outline:0;min-width:0;width:100%;font-size:.9rem}.sidebar-search-box input::placeholder{color:rgba(255,255,255,.65)}
@media (min-width: 992px){body.sidebar-collapsed .app-sidebar{width:86px;padding:.85rem .65rem;overflow:visible}body.sidebar-collapsed .app-main{margin-left:86px}body.sidebar-collapsed .topbar{left:86px}body.sidebar-collapsed .sidebar-brand>div:not(.brand-icon),body.sidebar-collapsed .sidebar-search-box input,body.sidebar-collapsed .sidebar-user .min-w-0,body.sidebar-collapsed .nav-section,body.sidebar-collapsed .nav-link span{display:none!important}body.sidebar-collapsed .sidebar-brand{justify-content:center;padding:.4rem}body.sidebar-collapsed .brand-icon{margin:0}body.sidebar-collapsed .sidebar-nav{padding-right:0}body.sidebar-collapsed .nav-link{justify-content:center;padding:.9rem .65rem;margin:.18rem 0;border-radius:1rem}body.sidebar-collapsed .nav-link i{font-size:1.25rem;margin:0}body.sidebar-collapsed .sidebar-user{justify-content:center;padding:.65rem}.app-sidebar,.app-main,.topbar{transition:all .22s ease}}
.pos-menu-toggle{display:none!important}.sidebar-collapsed .pos-menu-toggle{display:none!important}
.form-hint{font-size:.82rem;color:#64748b;margin-top:.25rem}.form-label .bi,.form-label i{color:#ef4444;margin-right:.25rem}.field-icon-input{min-height:48px}.icon-input{position:relative}.icon-input>i{position:absolute;left:1rem;top:50%;transform:translateY(-50%);color:#94a3b8;z-index:2}.icon-input>.form-control,.icon-input>.form-select{padding-left:2.7rem}.searchable-select-pro{position:relative;width:100%;min-width:0}.searchable-native-select{position:absolute!important;opacity:0!important;pointer-events:none!important;width:1px!important;height:1px!important}.searchable-control{width:100%;min-height:48px;border:1px solid var(--bs-border-color,#d1d5db);background:#fff;border-radius:1rem;padding:.68rem .9rem;display:flex;align-items:center;justify-content:space-between;gap:.75rem;text-align:left;color:var(--ink,#111827);box-shadow:none}.searchable-control span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.searchable-control i{opacity:.7;flex:0 0 auto}.searchable-dropdown{display:none;position:absolute;left:0;right:0;top:calc(100% + .35rem);z-index:1085;background:#fff;border:1px solid rgba(17,24,39,.10);border-radius:1rem;box-shadow:0 24px 75px rgba(17,24,39,.18);padding:.6rem}.searchable-select-pro.open .searchable-dropdown{display:block}.searchable-input-wrap{display:flex;align-items:center;gap:.45rem;background:#f3f4f6;border-radius:.85rem;padding:.45rem .65rem;margin-bottom:.55rem}.searchable-input-wrap input{border:0;background:transparent;outline:0;width:100%;font-size:.95rem}.searchable-options{max-height:260px;overflow:auto;display:grid;gap:.2rem}.searchable-option{border:0;background:transparent;text-align:left;padding:.62rem .7rem;border-radius:.75rem;color:var(--ink,#111827);width:100%}.searchable-option:hover,.searchable-option.active{background:rgba(59,130,246,.10);color:#0d6efd}.searchable-empty{padding:.8rem;color:var(--muted,#6b7280);text-align:center}.commission-layout{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(360px,.8fr);gap:1rem}.commission-form-card{position:sticky;top:1rem;align-self:start}.commission-scope-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.9rem}.module-help-card{border:1px solid rgba(15,23,42,.08);border-radius:1rem;background:#fff;padding:1rem;height:100%;box-shadow:0 14px 35px rgba(15,23,42,.05)}.module-help-card i{width:42px;height:42px;border-radius:1rem;background:#fff1f2;color:#ef4444;display:grid;place-items:center;font-size:1.25rem;margin-bottom:.75rem}.input-help{display:inline-grid;place-items:center;width:22px;height:22px;border-radius:50%;background:#f1f5f9;color:#64748b;font-size:.8rem;margin-left:.25rem}.manager-mobile-kpis .metric-soft{background:#fff;color:#111827}.barcode-svg{max-width:100%;height:auto;display:block;margin:.5mm auto}.voucher-paper{background:#fff;border-radius:1rem;box-shadow:0 18px 60px rgba(15,23,42,.1);padding:1.5rem}.voucher-copy{page-break-inside:avoid;margin-bottom:1.2rem;border:1px dashed #cbd5e1;border-radius:1rem;padding:1rem}.signature-line{border-top:1px solid #111827;text-align:center;padding-top:.4rem;margin-top:2.5rem}.promo-tabs .nav-link{border-radius:1rem;font-weight:800}.promo-card{border:1px solid rgba(15,23,42,.08);border-radius:1.2rem;background:#fff;padding:1rem;box-shadow:0 14px 35px rgba(15,23,42,.05)}
@media(max-width:1100px){.commission-layout{grid-template-columns:1fr}.commission-form-card{position:static}.commission-scope-grid{grid-template-columns:1fr}}
@media print{.voucher-paper{box-shadow:none;border-radius:0}.voucher-copy{border:0;border-bottom:1px dashed #999;border-radius:0}}
[data-bs-theme="dark"] .searchable-control,[data-bs-theme="dark"] .searchable-dropdown,[data-bs-theme="dark"] .module-help-card,[data-bs-theme="dark"] .promo-card{background:#111827;color:#f9fafb;border-color:rgba(255,255,255,.12)}[data-bs-theme="dark"] .searchable-input-wrap{background:#0f172a}


/* Fase 12 PRO polish */
html.sidebar-collapsed .app-sidebar, body.sidebar-collapsed .app-sidebar{display:none!important;transform:translateX(-120%)!important;}
html.sidebar-collapsed .app-main, body.sidebar-collapsed .app-main{margin-left:0!important;}
html.sidebar-collapsed .topbar, body.sidebar-collapsed .topbar{left:0!important;}
.sidebar-collapse-btn{width:44px;height:44px;display:grid!important;place-items:center;}
.sidebar-search{position:relative;margin:.75rem .15rem 1rem;}
.sidebar-search i{position:absolute;left:.9rem;top:50%;transform:translateY(-50%);opacity:.65;color:#fff;z-index:2;}
.sidebar-search input{width:100%;border:1px solid rgba(255,255,255,.16);background:rgba(255,255,255,.12);color:#fff;border-radius:1rem;padding:.72rem .85rem .72rem 2.35rem;outline:0;}
.sidebar-search input::placeholder{color:rgba(255,255,255,.72)}
.nav-link.d-none+.nav-section{display:none!important}.input-help{display:inline-grid;place-items:center;width:22px;height:22px;border-radius:50%;background:#f1f5f9;color:#64748b;font-size:.8rem;margin-left:.25rem}.input-with-icon{position:relative}.input-with-icon>i{position:absolute;left:1rem;top:50%;transform:translateY(-50%);color:#94a3b8;z-index:3}.input-with-icon>.form-control,.input-with-icon>.form-select{padding-left:2.5rem}.tabs-pro .nav-link{border:1px solid rgba(15,23,42,.08);background:#fff;border-radius:1rem;font-weight:800;color:#111827;box-shadow:0 10px 25px rgba(15,23,42,.04)}.tabs-pro .nav-link.active{background:#111827;color:#fff}.form-panel-pro{background:#fff;border:1px solid rgba(15,23,42,.08);border-radius:1.5rem;box-shadow:0 18px 55px rgba(15,23,42,.065);padding:1.25rem}.form-panel-pro h5{display:flex;align-items:center;gap:.55rem}.form-panel-pro h5 i{width:38px;height:38px;border-radius:1rem;background:#fff1f2;color:#ef4444;display:grid;place-items:center}.dynamic-row-pro{border:1px solid rgba(15,23,42,.08);border-radius:1.2rem;background:#fff;padding:1rem;margin-bottom:.8rem;box-shadow:0 10px 30px rgba(15,23,42,.04)}.manager-kpi{background:linear-gradient(135deg,#111827,#1e293b);color:#fff;border-radius:1.4rem;padding:1.2rem;box-shadow:0 20px 55px rgba(15,23,42,.18);min-height:132px;position:relative;overflow:hidden}.manager-kpi span{display:block;opacity:.78}.manager-kpi strong{display:block;font-size:1.55rem;margin-top:.25rem}.manager-kpi i{position:absolute;right:.9rem;bottom:.4rem;font-size:4rem;opacity:.12}.label-barcode{display:flex;align-items:flex-end;justify-content:center;gap:1px;height:13mm;margin:1mm 0}.label-barcode span{display:block;background:#111827}.return-barcode{display:flex;gap:1px;align-items:flex-end;justify-content:center;height:22mm;margin:.6rem 0}.return-barcode span{background:#111827;display:block}.promo-badge{display:inline-flex;align-items:center;gap:.35rem;border-radius:999px;background:#fff1f2;color:#dc2626;font-weight:800;padding:.35rem .65rem}.catalog-card .promo-badge{position:absolute;margin:.75rem}.export-actions{display:flex;gap:.5rem;align-items:center;flex-wrap:wrap}.sidebar-nav .nav-section.d-none{display:none!important}@media(max-width:991px){.sidebar-search{display:block}.app-sidebar{width:min(86vw,var(--sidebar-width))}}
.manager-kpi{position:relative;min-height:126px;border-radius:1.45rem;background:linear-gradient(135deg,#fff,#fff5f5);padding:1.2rem;box-shadow:0 18px 55px rgba(15,23,42,.08);border:1px solid rgba(15,23,42,.06);overflow:hidden}.manager-kpi span{display:block;color:#64748b;font-weight:800;font-size:.86rem}.manager-kpi strong{display:block;font-size:1.7rem;letter-spacing:-.04em;margin-top:.35rem}.manager-kpi i{position:absolute;right:1rem;bottom:.6rem;font-size:3rem;color:rgba(239,68,68,.14)}

/* Fase 12 PRO - overrides finales de UX */
.sidebar-search{padding:.35rem .7rem 1rem}.sidebar-search{position:relative}.sidebar-search i{position:absolute;left:1.5rem;top:1.05rem;color:rgba(255,255,255,.75)}.sidebar-search input{width:100%;border:0;border-radius:1rem;background:rgba(255,255,255,.12);color:#fff;padding:.72rem .9rem .72rem 2.35rem;outline:0}.sidebar-search input::placeholder{color:rgba(255,255,255,.70)}
@media (min-width: 992px){
  body.sidebar-collapsed .app-sidebar{display:flex!important;transform:none!important;width:86px!important;padding:.85rem .65rem!important;overflow:visible!important;transition:width .22s ease,padding .22s ease!important}
  body.sidebar-collapsed .app-main{margin-left:86px!important;transition:margin-left .22s ease!important}
  body.sidebar-collapsed .topbar{left:86px!important;transition:left .22s ease!important}
  body.sidebar-collapsed .sidebar-brand>div:not(.brand-icon),body.sidebar-collapsed .sidebar-search,body.sidebar-collapsed .sidebar-user .min-w-0,body.sidebar-collapsed .nav-section,body.sidebar-collapsed .nav-link span{display:none!important}
  body.sidebar-collapsed .sidebar-brand{justify-content:center!important;padding:.4rem!important}
  body.sidebar-collapsed .brand-icon{margin:0!important}
  body.sidebar-collapsed .nav-link{justify-content:center!important;padding:.9rem .65rem!important;margin:.18rem 0!important;border-radius:1rem!important}
  body.sidebar-collapsed .nav-link i{font-size:1.22rem!important;margin:0!important}
  body.sidebar-collapsed .sidebar-user{justify-content:center!important;padding:.65rem!important}
}
@media (max-width: 991.98px){body.sidebar-collapsed .app-sidebar{transform:translateX(-110%)!important}body.sidebar-collapsed .app-main{margin-left:0!important}body.sidebar-collapsed .topbar{left:0!important}}
.pos-menu-toggle,[data-toggle-pos-menu]{display:none!important}.sidebar-collapse-btn{position:relative;z-index:3}.field-icon-input .form-control::placeholder,.search-box .form-control::placeholder{color:#94a3b8}.multi-select-search-wrap select[multiple]{min-height:145px;border-radius:1rem;padding:.7rem}.commission-help-card,.help-soft-card{border:1px solid rgba(15,23,42,.08);background:#fff;border-radius:1.25rem;padding:1rem;box-shadow:0 14px 38px rgba(15,23,42,.06)}.promo-card,.manager-kpi{border:1px solid rgba(15,23,42,.08);background:#fff;border-radius:1.25rem;padding:1rem;box-shadow:0 14px 38px rgba(15,23,42,.06)}.barcode-svg{max-width:100%;height:auto;display:block;margin:.25rem auto}.input-help{font-size:.82rem;color:#64748b;margin-top:.25rem}.form-label i{color:#ef4444;margin-right:.35rem}.table-action-icon{width:36px;height:36px;border-radius:999px;display:inline-grid;place-items:center}.export-actions{display:flex;gap:.5rem;flex-wrap:wrap}.searchable-select-pro{z-index:auto}.searchable-select-pro.open{z-index:1090}.searchable-control{min-width:0}.searchable-control span{min-width:0}.searchable-dropdown{min-width:100%;width:max-content;max-width:min(540px,92vw)}@media(max-width:768px){.searchable-dropdown{width:100%;max-width:100%}.page-actions{align-items:flex-start}}


/* Phase 13 PRO final UI overrides */
:root{--sidebar-compact:92px}.app-sidebar,.app-main,.topbar{transition:width .22s ease,margin-left .22s ease,left .22s ease,transform .22s ease,padding .22s ease}.sidebar-collapse-btn{width:44px;height:44px;display:inline-grid!important;place-items:center;position:relative;z-index:1050}body.sidebar-collapsed .app-sidebar{display:flex!important;transform:none!important;width:var(--sidebar-compact)!important;padding:.9rem .65rem!important;overflow:visible!important}body.sidebar-collapsed .app-main{margin-left:var(--sidebar-compact)!important}body.sidebar-collapsed .topbar{left:var(--sidebar-compact)!important}body.sidebar-collapsed .sidebar-brand>div:not(.brand-icon),body.sidebar-collapsed .sidebar-search,body.sidebar-collapsed .sidebar-user .min-w-0,body.sidebar-collapsed .nav-section,body.sidebar-collapsed .nav-link span{display:none!important}body.sidebar-collapsed .sidebar-brand{justify-content:center!important;padding:.35rem!important}body.sidebar-collapsed .brand-icon{margin:0!important}body.sidebar-collapsed .nav-link{justify-content:center!important;padding:.9rem .65rem!important;margin:.16rem 0!important;border-radius:1rem!important}body.sidebar-collapsed .nav-link i{font-size:1.25rem!important;margin:0!important}body.sidebar-collapsed .sidebar-user{justify-content:center!important;padding:.65rem!important}@media(max-width:991.98px){body.sidebar-collapsed .app-sidebar{transform:translateX(-110%)!important;width:280px!important}body.sidebar-collapsed .app-main{margin-left:0!important}body.sidebar-collapsed .topbar{left:0!important}}
.searchable-select-pro{position:relative;min-width:0}.searchable-control{width:100%;min-height:48px;border:1px solid #dbe3ee;border-radius:1rem;background:#fff;display:flex;align-items:center;justify-content:space-between;gap:.6rem;padding:.6rem .85rem;text-align:left;color:#172033}.searchable-control span{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.searchable-dropdown{position:absolute;z-index:1080;left:0;right:0;top:calc(100% + .35rem);background:#fff;border-radius:1rem;box-shadow:0 22px 55px rgba(15,23,42,.18);padding:.75rem;display:none;max-height:320px;overflow:auto}.searchable-select-pro.open .searchable-dropdown{display:block}.searchable-native-select{position:absolute!important;opacity:0!important;pointer-events:none!important;width:0!important;height:0!important}.searchable-input-wrap{display:flex;align-items:center;gap:.5rem;background:#f8fafc;border-radius:.85rem;padding:.45rem .7rem;margin-bottom:.55rem}.searchable-input-wrap input{border:0;background:transparent;outline:0;width:100%}.searchable-option{width:100%;border:0;background:transparent;text-align:left;border-radius:.75rem;padding:.65rem .75rem;color:#172033}.searchable-option:hover,.searchable-option.active{background:#eaf2ff;color:#0d6efd}.searchable-empty{padding:.7rem;color:#64748b;text-align:center}.field-icon-input,.input-with-icon{position:relative}.input-with-icon i{position:absolute;left:1rem;top:50%;transform:translateY(-50%);color:#94a3b8;z-index:2}.input-with-icon .form-control{padding-left:2.55rem}.promo-grid-pro{display:grid;grid-template-columns:repeat(auto-fit,minmax(310px,1fr));gap:1rem}.promo-card-pro{background:#fff;border:1px solid rgba(15,23,42,.08);border-radius:1.6rem;padding:1.25rem;box-shadow:0 18px 48px rgba(15,23,42,.07)}.promo-card-pro h4{font-weight:900;letter-spacing:-.04em}.promo-topline{display:flex;align-items:center;justify-content:space-between;gap:.8rem;margin-bottom:.7rem}.promo-code{display:inline-flex;gap:.4rem;align-items:center;background:#fff1f2;color:#ef4444;padding:.35rem .65rem;border-radius:999px;font-size:.78rem;font-weight:900}.promo-meta-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.65rem}.promo-meta-grid div{border-radius:1rem;background:#f8fafc;padding:.75rem}.promo-meta-grid i{color:#ef4444}.promo-meta-grid span{display:block;color:#64748b;font-size:.75rem}.promo-meta-grid strong{display:block;font-size:.88rem}.promo-wizard-tabs .wizard-step{border-radius:1rem}.modal-content .setting-switch{border:1px solid rgba(15,23,42,.08);background:#fff}.quick-doc-actions .btn,.export-actions .btn{display:inline-flex;align-items:center;gap:.35rem}.payment-modal-pro .form-control,.payment-modal-pro .form-select{min-height:46px}.advance-paper{break-inside:avoid} 

/* === Fase 13 PRO Hotfix === */
body.ms-menu-hidden .app-sidebar{width:0!important;min-width:0!important;padding:0!important;transform:translateX(-120%)!important;overflow:hidden!important;box-shadow:none!important;display:block!important}
body.ms-menu-hidden .app-main{margin-left:0!important}
body.ms-menu-hidden .topbar{left:0!important}
body.ms-menu-hidden [data-sidebar-collapse]{position:relative;z-index:2000}
.sidebar-search-wrap{position:relative}.sidebar-search-clear{width:28px;height:28px;border:0;border-radius:999px;background:rgba(255,255,255,.14);color:#fff;display:grid;place-items:center}.sidebar-search-clear:hover{background:rgba(255,255,255,.24)}
.searchable-select-pro{position:relative;min-width:0}.searchable-native-select{position:absolute!important;opacity:0!important;pointer-events:none!important;width:1px!important;height:1px!important}.searchable-control{width:100%;min-height:48px;border:1px solid #dbe3ee;border-radius:1rem;background:#fff;display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:.6rem .9rem;text-align:left;color:#111827}.searchable-control span{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.searchable-dropdown{display:none;position:absolute;z-index:1400;top:calc(100% + 6px);left:0;right:0;background:#fff;border:1px solid rgba(15,23,42,.10);box-shadow:0 24px 70px rgba(15,23,42,.16);border-radius:1.1rem;padding:.55rem;max-height:310px;overflow:auto}.searchable-select-pro.open .searchable-dropdown{display:block}.searchable-input-wrap{display:grid;grid-template-columns:auto minmax(0,1fr);gap:.55rem;align-items:center;background:#f3f6fb;border-radius:.9rem;padding:.55rem .75rem;margin-bottom:.45rem}.searchable-input-wrap input{border:0;background:transparent;outline:0;width:100%;min-width:0}.searchable-option{width:100%;border:0;background:transparent;text-align:left;border-radius:.85rem;padding:.65rem .75rem;display:block;color:#111827}.searchable-option span{white-space:normal;word-break:break-word;line-height:1.25}.searchable-option:hover,.searchable-option.active{background:#eaf2ff;color:#0d6efd}.smart-select-options{width:100%!important;min-width:100%!important;max-width:100%!important;overflow:auto!important}.smart-select-option span{white-space:normal!important;word-break:break-word!important;line-height:1.25}.smart-select-control input{min-width:0!important;text-overflow:ellipsis!important}.field-icon-wrap .searchable-control{border:0;background:transparent;padding:.15rem 0;min-height:38px}.field-icon-wrap .searchable-control i{background:#f8fafc;border-radius:999px;padding:.55rem}.field-icon-wrap .searchable-dropdown{left:-.6rem;right:-.6rem}.pos-context-card,.pos-catalog-panel{overflow:visible!important}.pos-clean-grid,.pos-clean-left{overflow:visible!important}.pos-product-card-clean{transition:.16s ease}.pos-product-card-clean:hover{transform:translateY(-3px);box-shadow:0 20px 55px rgba(15,23,42,.12)}
.promo-card-pro{border:1px solid rgba(15,23,42,.08);background:#fff;border-radius:1.4rem;padding:1.2rem;box-shadow:0 18px 55px rgba(15,23,42,.07);transition:.18s ease}.promo-card-pro:hover{transform:translateY(-3px);box-shadow:0 26px 70px rgba(15,23,42,.12)}.promo-discount-box{display:flex;gap:.8rem;align-items:center;background:linear-gradient(135deg,#fff1f2,#fff);border:1px solid rgba(239,68,68,.12);border-radius:1.1rem;padding:.85rem}.promo-discount-box i{width:42px;height:42px;border-radius:1rem;display:grid;place-items:center;background:#ef4444;color:#fff}.promo-discount-box span{display:block;color:#64748b;font-size:.82rem;font-weight:700}.promo-discount-box strong{font-size:1.25rem}.promo-meta-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.65rem}.promo-meta-grid div{display:flex;gap:.45rem;align-items:center;background:#f8fafc;border-radius:.9rem;padding:.55rem}.promo-meta-grid i{color:#ef4444}.promo-meta-grid span{font-size:.85rem;min-width:0;overflow:hidden;text-overflow:ellipsis}.promo-wizard-tabs .nav-link{border-radius:1rem;font-weight:800;background:#f8fafc;color:#111827}.promo-wizard-tabs .nav-link.active{background:#111827;color:#fff}.promo-modal-pro .modal-body{background:linear-gradient(180deg,#fff,#f8fafc)}
.label-barcode{height:42px;display:flex;gap:1px;align-items:stretch;justify-content:center;max-width:100%;overflow:hidden}.label-barcode span{display:inline-block;background:#000;height:100%}.label-barcode span[style*="transparent"]{background:transparent!important}.label-item{page-break-inside:avoid!important}.export-actions{display:flex;gap:.5rem;align-items:center;flex-wrap:wrap}.ms-enhanced::placeholder{color:#94a3b8}.btn[title], [data-bs-toggle="tooltip"]{cursor:help}.module-help-card{border-radius:1.2rem;background:#fff;box-shadow:0 16px 45px rgba(15,23,42,.07);padding:1rem}.module-help-card i{font-size:1.5rem;color:#ef4444}.input-with-icon{position:relative}.input-with-icon>i{position:absolute;left:.9rem;top:50%;transform:translateY(-50%);color:#94a3b8;z-index:2}.input-with-icon>.form-control{padding-left:2.45rem}
@media(max-width:991.98px){body.ms-menu-hidden .app-sidebar{transform:translateX(-120%)!important}body.ms-menu-hidden .app-main{margin-left:0!important}.searchable-dropdown{position:fixed;left:1rem!important;right:1rem!important;top:auto!important;bottom:1rem;max-height:55vh}}

/* Phase 14 stabilization */
:root { --sidebar-collapsed-width: 5.75rem; }
.app-sidebar, .app-main, .topbar { transition: width .22s ease, margin-left .22s ease, transform .22s ease; }
.sidebar-collapsed .app-sidebar { width: var(--sidebar-collapsed-width) !important; padding-left: .65rem !important; padding-right: .65rem !important; overflow-x: hidden; }
.sidebar-collapsed .app-main { margin-left: var(--sidebar-collapsed-width) !important; }
.sidebar-collapsed .app-sidebar .brand-text,
.sidebar-collapsed .app-sidebar .nav-section,
.sidebar-collapsed .app-sidebar .nav-link span,
.sidebar-collapsed .app-sidebar .sidebar-user .min-w-0,
.sidebar-collapsed .app-sidebar .sidebar-search { display: none !important; }
.sidebar-collapsed .app-sidebar .nav-link { justify-content: center; padding: .9rem .55rem; }
.sidebar-collapsed .app-sidebar .nav-link i { margin: 0 !important; font-size: 1.22rem; }
.sidebar-collapsed .app-sidebar .sidebar-brand { justify-content: center; }
.sidebar-collapsed .app-sidebar .sidebar-user { justify-content: center; padding: .65rem; }
.sidebar-search { position: relative; }
.sidebar-search-clear { position:absolute; right:.85rem; top:50%; transform:translateY(-50%); border:0; background:transparent; color:#fca5a5; }
.pos-grid-stable { grid-template-columns: minmax(0, 1fr) minmax(350px, 430px); align-items: start; }
.pos-context-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
.pos-mini-select .form-select { max-width: 100%; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; }
.pos-clean-cart { position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow: auto; }
.pos-product-grid-clean { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important; gap: 1rem !important; }
.pos-product-card-clean { min-width: 0; }
.pos-card-content strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.pos-card-tags { display: flex; flex-wrap: wrap; gap: .45rem; }
.cart-summary-clean .total strong { font-size: 1.22rem; }
.smart-select-options, .searchable-options { max-height: 280px !important; overflow: auto !important; }
.searchable-dropdown { max-width: min(430px, 88vw) !important; }
.simple-tour-card { position: fixed; right: 24px; bottom: 24px; width: min(430px, calc(100vw - 32px)); z-index: 3000; background:#fff; border:1px solid rgba(15,23,42,.1); border-radius:1.35rem; padding:1.15rem; }
.wizard-steps { display:grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap:.75rem; }
.wizard-step { border:1px solid rgba(15,23,42,.08); background:#fff; border-radius:1.1rem; padding:.85rem 1rem; display:flex; align-items:center; gap:.65rem; font-weight:800; color:#334155; }
.wizard-step span { width:34px; height:34px; border-radius:999px; display:grid; place-items:center; background:#f1f5f9; color:#111827; }
.wizard-step.active { background:#111827; color:#fff; }
.wizard-step.active span { background:#ef4444; color:#fff; }
.wizard-panel { display:none; }
.wizard-panel.active, .wizard-panel:not(.d-none) { display:block; }
.manager-kpi-pro { background:#fff; border:1px solid rgba(15,23,42,.08); border-radius:1.5rem; padding:1.15rem; box-shadow:0 18px 50px rgba(15,23,42,.07); position:relative; overflow:hidden; }
.manager-kpi-pro span{color:#64748b; font-weight:800; display:block;}
.manager-kpi-pro strong{font-size:1.65rem; display:block; margin-top:.35rem; color:#0f172a;}
.manager-kpi-pro i{position:absolute; right:1rem; bottom:.6rem; color:rgba(239,68,68,.12); font-size:3.5rem;}
.report-card-pro .table { font-size:.94rem; }
@media (max-width: 1200px) { .pos-grid-stable{grid-template-columns:1fr}.pos-clean-cart{position:static;max-height:none}.pos-context-grid{grid-template-columns: repeat(2, minmax(0,1fr)) !important;} }
@media (max-width: 700px) { .pos-context-grid{grid-template-columns: 1fr !important;} .sidebar-collapsed .app-main{margin-left:0!important;} }
@media print { .advance-copy { page-break-after: always; } .advance-copy:last-child { page-break-after: auto; } }


/* ===== Fase 14 PRO hotfix final ===== */
body.sidebar-collapsed-v14 .app-sidebar{width:0!important;min-width:0!important;padding:0!important;transform:translateX(-120%)!important;overflow:hidden!important;box-shadow:none!important;display:block!important;opacity:0!important;pointer-events:none!important}
body.sidebar-collapsed-v14 .app-main{margin-left:0!important}
body.sidebar-collapsed-v14 .topbar{left:0!important}
#sidebarCollapseBtn{position:relative;z-index:2100;width:44px;height:44px;display:inline-grid!important;place-items:center}
.sidebar-search{position:relative}.sidebar-search:after{content:'';position:absolute;right:.65rem;top:50%;width:8px;height:8px;border-radius:999px;background:rgba(255,255,255,.35);transform:translateY(-50%)}
.pos-context-card .field-icon-wrap{min-width:0}.pos-context-card .form-select{min-width:0;max-width:100%;text-overflow:ellipsis}.pos-context-card .input-group-pro{grid-template-columns:minmax(0,1fr) auto}.pos-context-card .input-group-pro .btn span{font-size:.82rem}.pos-context-card select[data-no-search="1"]{height:48px;border-radius:1rem;border:1px solid #dbe3ee;padding-left:.9rem;padding-right:2.25rem;background-color:#fff}
.searchable-dropdown{max-height:260px!important;overflow:auto!important}.field-icon-wrap .searchable-dropdown{max-width:320px!important;right:auto!important}.searchable-option span{white-space:normal;line-height:1.22}.pos-product-grid-clean{grid-template-columns:repeat(auto-fill,minmax(210px,1fr))!important}.pos-product-card-clean{min-height:330px}.cart-line-clean small.text-success{display:block;margin-top:.2rem}.promo-card-pro{max-width:560px}.promo-grid-pro,.row.g-3:has(.promo-card-pro){align-items:stretch}.promo-discount-box strong{color:#111827}.promo-modal-pro .tab-content{background:#fff;border:1px solid rgba(15,23,42,.06);border-radius:1.25rem;padding:1rem}.manager-kpi{background:linear-gradient(135deg,#fff,#fff7f7)!important;color:#111827!important;border:1px solid rgba(15,23,42,.08)!important;box-shadow:0 18px 55px rgba(15,23,42,.08)!important}.manager-kpi span{color:#64748b!important}.manager-kpi strong{color:#111827!important}.manager-kpi i{color:rgba(239,68,68,.16)!important}.export-actions .btn{min-width:96px;justify-content:center}.field-icon-input input,.input-with-icon input{min-width:0}.advance-paper{max-width:720px;margin:0 auto 24px;page-break-after:always;border:1px solid #e5e7eb;border-radius:18px;padding:22px;background:#fff}.advance-paper:last-child{page-break-after:auto}.advance-paper .signature-line{border-top:1px solid #111827;text-align:center;padding-top:6px;margin-top:42px}.service-step-layout .wizard-step,.service-wizard .wizard-step{min-width:170px;justify-content:flex-start}@media print{.advance-paper{border:0;box-shadow:none;border-radius:0;max-width:100%;padding:8mm}.no-print,.topbar,.app-sidebar{display:none!important}.app-main{margin-left:0!important}.content-area{padding:0!important}}


/* Fase 14 PRO Hotfix */
body.sidebar-collapsed .app-sidebar{display:flex!important;transform:none!important;width:92px!important;min-width:92px!important;padding:.9rem .65rem!important;overflow:visible!important;box-shadow:0 20px 60px rgba(15,23,42,.16)!important}
body.sidebar-collapsed .app-main{margin-left:92px!important}
body.sidebar-collapsed .topbar{left:92px!important}
body.sidebar-collapsed .sidebar-brand>div:not(.brand-icon),
body.sidebar-collapsed .sidebar-search,
body.sidebar-collapsed .sidebar-user .min-w-0,
body.sidebar-collapsed .nav-section,
body.sidebar-collapsed .nav-link span{display:none!important}
body.sidebar-collapsed .sidebar-brand{justify-content:center!important;padding:.35rem!important}
body.sidebar-collapsed .brand-icon{margin:0!important}
body.sidebar-collapsed .nav-link{justify-content:center!important;padding:.9rem .65rem!important;margin:.16rem 0!important;border-radius:1rem!important}
body.sidebar-collapsed .nav-link i{font-size:1.25rem!important;margin:0!important}
body.sidebar-collapsed .sidebar-user{justify-content:center!important;padding:.65rem!important}
body.ms-menu-hidden .app-sidebar{width:92px!important;min-width:92px!important;padding:.9rem .65rem!important;transform:none!important;overflow:visible!important}
body.ms-menu-hidden .app-main{margin-left:92px!important}
body.ms-menu-hidden .topbar{left:92px!important}
@media(max-width:991.98px){body.sidebar-collapsed .app-sidebar,body.ms-menu-hidden .app-sidebar{transform:translateX(-110%)!important;width:280px!important}body.sidebar-collapsed .app-main,body.ms-menu-hidden .app-main{margin-left:0!important}body.sidebar-collapsed .topbar,body.ms-menu-hidden .topbar{left:0!important}}
.logo-preview-box{border:1px dashed #cbd5e1;border-radius:1rem;padding:.75rem;background:#f8fafc;min-height:80px;display:flex;align-items:center;justify-content:center}.logo-preview-box img{max-width:180px;max-height:80px;object-fit:contain}.manager-kpi{color:#111827!important;background:linear-gradient(135deg,#fff,#fff7f7)!important}.manager-kpi strong{color:#111827!important}.manager-kpi span{color:#64748b!important}.wizard-steps{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:.85rem;align-items:stretch}.wizard-steps .wizard-step{width:100%;min-height:64px;border:1px solid rgba(15,23,42,.08);background:#fff}.wizard-steps .wizard-step.active{border-color:rgba(239,68,68,.35);background:linear-gradient(135deg,rgba(239,68,68,.12),rgba(249,115,22,.08))}.pos-mini-select .form-select{max-width:100%;white-space:nowrap;text-overflow:ellipsis}.field-icon-wrap .form-select{overflow:hidden;text-overflow:ellipsis}.pos-product-grid-clean{grid-template-columns:repeat(auto-fill,minmax(230px,1fr))!important}.promo-modal-pro .nav-pills .nav-link{border:1px solid rgba(15,23,42,.08);border-radius:1rem;background:#fff;color:#111827;font-weight:800}.promo-modal-pro .nav-pills .nav-link.active{background:#111827;color:#fff}.promo-discount-box{border-radius:1.2rem;padding:1rem;display:flex;gap:.9rem;align-items:center;background:linear-gradient(135deg,#fff1f2,#fff);border:1px solid rgba(239,68,68,.15)}.promo-discount-box i{width:44px;height:44px;display:grid;place-items:center;border-radius:1rem;background:#ef4444;color:#fff;font-size:1.3rem}.promo-discount-box span{display:block;color:#64748b;font-size:.82rem}.promo-discount-box strong{font-size:1.4rem}.tour-live-card{z-index:3000}.tour-live-overlay{z-index:2990}.tour-highlight-live{position:relative;z-index:3001!important;box-shadow:0 0 0 4px rgba(239,68,68,.35),0 20px 60px rgba(15,23,42,.25)!important}
.logo-preview-box{border:1px dashed rgba(15,23,42,.18);border-radius:1rem;min-height:125px;display:grid;place-items:center;background:#f8fafc;text-align:center;padding:1rem}


/* Fase 15 - estabilizacion de UX */
body.sidebar-collapsed .app-sidebar{display:none!important;transform:translateX(-120%)!important;width:var(--sidebar-width)!important;min-width:var(--sidebar-width)!important;}
body.sidebar-collapsed .app-main{margin-left:0!important;}
body.sidebar-collapsed .topbar{left:0!important;}
.sidebar-collapse-btn{position:relative;z-index:1045;}
.sidebar-search-clear{position:absolute;right:.65rem;top:50%;transform:translateY(-50%);border:0;background:transparent;color:#fff;opacity:.8;}
.searchable-select-pro{position:relative;min-width:0;width:100%;}
.searchable-native-select{position:absolute!important;opacity:0!important;pointer-events:none!important;width:0!important;height:0!important;}
.searchable-control{display:flex;align-items:center;justify-content:space-between;gap:.6rem;width:100%;min-height:46px;border:1px solid #dbe3ee;border-radius:1rem;background:#fff;padding:.6rem .75rem;box-shadow:0 10px 25px rgba(15,23,42,.035);cursor:pointer;}
.searchable-control span{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.searchable-control i{color:#64748b;flex:0 0 auto;}
.searchable-dropdown{position:absolute;z-index:2070;left:0;top:calc(100% + .35rem);width:min(420px,92vw);max-height:310px;overflow:auto;background:#fff;border:1px solid #e5e7eb;border-radius:1rem;box-shadow:0 24px 70px rgba(15,23,42,.18);padding:.6rem;display:none;}
.searchable-select-pro.open .searchable-dropdown{display:block;}
.searchable-input-wrap{display:flex;align-items:center;gap:.45rem;background:#f1f5f9;border-radius:.85rem;padding:.45rem .65rem;margin-bottom:.45rem;}
.searchable-input-wrap input{border:0;background:transparent;outline:0;width:100%;}
.searchable-option{display:flex;width:100%;border:0;background:transparent;text-align:left;border-radius:.8rem;padding:.6rem .75rem;margin:.1rem 0;color:#111827;}
.searchable-option:hover,.searchable-option.active{background:#eaf2ff;color:#0d6efd;}
.searchable-empty{padding:.7rem;color:#64748b;text-align:center;}
.pos-context-card .field-icon-wrap .searchable-control{border:1px solid #dbe3ee;background:#fff;padding:.55rem .75rem;min-height:48px;}
.pos-context-card .field-icon-wrap .searchable-dropdown{max-width:420px!important;width:360px!important;}
.pos-clean-cart .cart-summary-clean div{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.28rem 0;}
.pos-clean-cart .cart-summary-clean span{color:#475569;}
.pos-clean-cart .cart-summary-clean strong{text-align:right;}
.cart-line-clean{overflow:visible;}
.pos-product-grid-clean{grid-template-columns:repeat(auto-fill,minmax(220px,1fr))!important;}
.pos-product-card-clean{min-height:310px;}
@media(max-width:1200px){.pos-clean-grid{grid-template-columns:1fr!important}.pos-clean-cart{position:static!important;max-height:none!important}}
.print-actions,.export-actions{position:relative;z-index:3;}
@media print{.advance-paper{page-break-after:always;}.advance-paper:last-child{page-break-after:auto}.no-print,.topbar,.app-sidebar,.sidebar-backdrop{display:none!important}.app-main{margin-left:0!important}.content-area{padding:0!important}}

/* Fase 16 - estabilización final POS, menú, pagos y vistas */
body.sidebar-collapsed .app-sidebar{display:none!important;transform:translateX(-120%)!important;width:var(--sidebar-width)!important;min-width:var(--sidebar-width)!important;opacity:0!important;pointer-events:none!important;}
body.sidebar-collapsed .app-main{margin-left:0!important;}
body.sidebar-collapsed .topbar{left:0!important;}
.sidebar-collapse-btn{z-index:2200!important;}
.pos-clean-grid{grid-template-columns:420px minmax(0,1fr)!important;}
.pos-clean-cart{grid-column:1;grid-row:1;top:92px!important;}
.pos-clean-left{grid-column:2;grid-row:1;}
.pos-product-grid-clean{grid-template-columns:repeat(auto-fill,minmax(220px,1fr))!important;max-height:62vh;overflow:auto;padding-right:.3rem;}
.pos-product-card-clean{min-height:340px!important;overflow:hidden;}
.pos-card-image{border:0;width:100%;cursor:zoom-in;}
.pos-card-image img{width:100%;height:100%;object-fit:cover;}
.pos-card-bottom button{cursor:pointer;}
.preview-product-image{min-height:310px;border-radius:1.5rem;background:linear-gradient(135deg,#fff1f2,#ffedd5);display:grid;place-items:center;overflow:hidden;}
.preview-product-image img{width:100%;height:100%;object-fit:cover;}
.preview-product-image i{font-size:4.2rem;color:#ef4444;}
.preview-info-grid{display:grid;grid-template-columns:1fr 1fr;gap:.85rem;}
.preview-info-grid div{background:#f8fafc;border:1px solid #e5e7eb;border-radius:1rem;padding:.85rem;}
.preview-info-grid span{display:block;color:#64748b;font-size:.8rem;}
.preview-info-grid strong{display:block;margin-top:.15rem;}
.pos-customer-search{min-height:46px;}
.pos-customer-search .form-control{min-width:0;}
.payment-summary{display:grid!important;grid-template-columns:repeat(4,minmax(150px,1fr));gap:.75rem;}
.payment-summary>div{border:1px solid #e5e7eb;background:linear-gradient(135deg,#fff,#f8fafc);border-radius:1rem;padding:.9rem;display:flex;justify-content:space-between;gap:.75rem;}
.payment-summary strong{white-space:nowrap;}
.payment-balance-alert{border-radius:1rem;padding:.8rem 1rem;margin-top:1rem;font-weight:800;display:flex;align-items:center;gap:.55rem;}
.payment-balance-alert.ok{background:#dcfce7;color:#166534;}.payment-balance-alert.pending{background:#fff7ed;color:#9a3412;}.payment-balance-alert.change{background:#eff6ff;color:#1d4ed8;}
.tax-row{display:grid;grid-template-columns:1.4fr .8fr .7fr .9fr auto;gap:.65rem;align-items:center;margin-bottom:.65rem;}
.wizard-nav{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:1rem;margin-bottom:1rem;}
.wizard-nav button{border:1px solid #e5e7eb;background:#fff;border-radius:1.3rem;padding:1rem;text-align:left;font-weight:800;display:flex;align-items:center;gap:.65rem;}
.wizard-nav button.active{border-color:#fca5a5;background:#fff1f2;box-shadow:0 12px 35px rgba(239,68,68,.10);}
.wizard-nav button span{width:34px;height:34px;border-radius:999px;background:#f1f5f9;display:grid;place-items:center;}
.wizard-nav button.active span{background:#ef4444;color:#fff;}
#tourBox{max-width:min(520px,calc(100vw - 2rem))!important;}
.tour-highlight{outline-offset:4px!important;}
.manager-kpi strong,.manager-kpi .metric-value{opacity:1!important;color:#111827!important;}
@media(max-width:1300px){.pos-clean-grid{grid-template-columns:390px minmax(0,1fr)!important}.pos-product-grid-clean{grid-template-columns:repeat(auto-fill,minmax(200px,1fr))!important}}
@media(max-width:1100px){.pos-clean-grid{grid-template-columns:1fr!important}.pos-clean-cart,.pos-clean-left{grid-column:auto;grid-row:auto}.pos-clean-cart{position:static!important;max-height:none!important;order:2}.pos-clean-left{order:1}.payment-summary{grid-template-columns:1fr 1fr}.wizard-nav{grid-template-columns:1fr 1fr}}
@media(max-width:720px){.payment-summary{grid-template-columns:1fr}.tax-row{grid-template-columns:1fr}.wizard-nav{grid-template-columns:1fr}.preview-info-grid{grid-template-columns:1fr}}
@media print{.advance-paper{break-after:page;page-break-after:always}.advance-paper:last-child{break-after:auto;page-break-after:auto}}

/* Phase 17 POS customer selector and print/fiscal refinements */
.pos-customer-compact{position:relative;display:flex;gap:.45rem;align-items:center;min-width:0}.pos-customer-selected{min-height:52px;border:1px solid var(--bs-border-color);background:#fff;border-radius:1.15rem;padding:.65rem .8rem;display:flex;align-items:center;justify-content:space-between;gap:.6rem;min-width:150px;max-width:220px;width:100%;font-weight:700;color:#111827;box-shadow:0 8px 22px rgba(15,23,42,.04)}.pos-customer-selected span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pos-new-customer-btn{height:52px;display:inline-flex;align-items:center;gap:.35rem;white-space:nowrap}.pos-customer-dropdown{position:absolute;top:calc(100% + 8px);left:0;width:min(460px,calc(100vw - 2rem));background:#fff;border:1px solid rgba(148,163,184,.3);box-shadow:0 28px 65px rgba(15,23,42,.18);border-radius:1.25rem;padding:.75rem;z-index:1058;display:none}.pos-customer-dropdown.open{display:block}.pos-customer-options{max-height:300px;overflow:auto;padding-top:.45rem;display:grid;gap:.35rem}.pos-customer-option{border:0;background:#fff;border-radius:1rem;padding:.7rem .85rem;text-align:left;display:block;width:100%;transition:.16s ease}.pos-customer-option:hover,.pos-customer-option:focus{background:#eef5ff}.pos-customer-option strong{display:block;color:#0f172a}.pos-customer-option small{display:block;color:#64748b}.payment-summary.pro{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.8rem}.payment-summary.pro>div{border-radius:1.1rem;background:#f8fafc;padding:1rem}.payment-summary.pro span{display:block;color:#64748b}.payment-summary.pro strong{font-size:1.05rem}.template-preview-panel{border:1px dashed #cbd5e1;border-radius:1.25rem;background:#fff;min-height:260px;padding:1rem;overflow:auto}.template-preview-paper{background:#fff;box-shadow:0 14px 30px rgba(15,23,42,.08);border:1px solid #e5e7eb;border-radius:.75rem;margin:auto;padding:1rem;color:#111;max-width:420px}.fiscal-template-toolbar{display:flex;gap:.5rem;align-items:center;justify-content:flex-end;flex-wrap:wrap}.credit-internal-pill{display:inline-flex;align-items:center;gap:.35rem;background:#fef3c7;color:#92400e;border-radius:999px;padding:.35rem .7rem;font-weight:800;font-size:.8rem}.wizard-nav.credit-wizard-nav{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1rem}.credit-moto-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(255px,1fr));gap:1rem;max-height:560px;overflow:auto;padding-right:.35rem}.moto-reserve-choice input{position:absolute;opacity:.001}.moto-reserve-choice{position:relative;cursor:pointer}.moto-reserve-choice>div:not(.moto-reserve-icon){border:1px solid #e5e7eb;border-radius:1.25rem;padding:1rem;background:#fff;min-height:160px}.moto-reserve-choice input:checked~div:not(.moto-reserve-icon){border-color:#ef4444;background:#fff7f7;box-shadow:0 0 0 3px rgba(239,68,68,.08)}.credit-summary-box{border-radius:1.25rem;background:linear-gradient(135deg,#f8fafc,#eef2ff);padding:1rem}.credit-summary-box .line{display:flex;justify-content:space-between;margin:.35rem 0}.credit-summary-box .line.total{font-size:1.1rem;font-weight:900;border-top:1px dashed #cbd5e1;padding-top:.6rem;margin-top:.6rem}.metric-card.gradient-credit{background:linear-gradient(135deg,#2563eb,#1e3a8a);color:#fff}.metric-card.gradient-cash{background:linear-gradient(135deg,#0f766e,#115e59);color:#fff}.metric-card.gradient-primary,.metric-card.gradient-success,.metric-card.gradient-warning,.metric-card.gradient-dark,.metric-card.gradient-credit,.metric-card.gradient-cash{min-height:142px}.tax-row{display:grid;grid-template-columns:2fr 1.2fr 1fr 1.2fr auto;gap:.65rem;align-items:center}.tax-row .field-icon-input input{padding-left:2.4rem}.print-auto-note{font-size:.8rem;color:#64748b}@media (max-width: 900px){.payment-summary.pro{grid-template-columns:1fr 1fr}.wizard-nav.credit-wizard-nav{grid-template-columns:1fr 1fr}.tax-row{grid-template-columns:1fr}.pos-customer-dropdown{width:calc(100vw - 2rem);left:-6rem}}

/* Fase 17: refinamiento POS/cliente, plantillas y crédito */
.pos-customer-box .pos-customer-autocomplete{display:flex;align-items:center;gap:.5rem;width:100%;}
.pos-customer-box .pos-customer-control{display:flex;align-items:center;width:100%;border:1px solid var(--bs-border-color);border-radius:1.25rem;background:#fff;overflow:hidden;min-height:54px;box-shadow:0 12px 30px rgba(15,23,42,.04)}
.pos-customer-box .pos-customer-search-input{border:0!important;box-shadow:none!important;outline:0!important;width:100%;height:52px;padding:0 1rem;background:#fff;font-weight:700;color:#111827}
.pos-customer-box #posCustomerClear{border:0;background:#f6f7fb;width:46px;height:46px;border-radius:1rem;margin-right:.25rem;color:#6b7280}
.pos-customer-box .pos-new-customer-btn{height:54px;min-width:108px;font-weight:800;white-space:nowrap;display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--bs-border-color)}
.pos-customer-results{position:absolute;left:0;right:0;top:calc(100% + 8px);z-index:1080;background:#fff;border-radius:1.25rem;box-shadow:0 24px 70px rgba(15,23,42,.18);padding:.65rem;display:none;max-height:340px;overflow:auto;border:1px solid rgba(15,23,42,.08)}
.pos-customer-results.open{display:block}.pos-customer-result{width:100%;display:flex;gap:.7rem;align-items:center;border:0;background:#fff;border-radius:1rem;padding:.75rem .9rem;text-align:left;color:#111827}.pos-customer-result:hover,.pos-customer-result:focus{background:#eef4ff;color:#0d6efd}.pos-customer-result i{font-size:1.25rem;color:#ef4444}.pos-customer-result span{font-weight:800}.pos-customer-empty{padding:1rem;color:#6b7280;text-align:center}
.pos-customer-box .searchable-select-pro{display:none!important}.pos-mini-select .form-select{font-weight:700}.payment-summary-pro{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1rem}.payment-summary-pro>div{background:#f7f8fb;border-radius:1.25rem;padding:1rem;font-weight:600}.payment-summary-pro .payment-state{grid-column:1/-1;background:#fff1f2;color:#991b1b;font-weight:900}.payment-summary-pro .payment-state.is-ok{background:#dcfce7;color:#166534}.payment-summary-pro .payment-state.is-change{background:#eff6ff;color:#1d4ed8}.template-preview-shell{border:1px solid var(--bs-border-color);border-radius:1.5rem;padding:1rem;background:#f8fafc}.template-preview-shell iframe{width:100%;height:320px;border:1px solid #e5e7eb;border-radius:1rem;background:white}.gradient-info{background:linear-gradient(135deg,#0284c7,#0f172a)!important;color:white}.credit-form-pro .moto-select-grid{max-height:520px;overflow:auto}.credit-form-pro .wizard-actions{position:sticky;bottom:0;background:rgba(248,250,252,.94);backdrop-filter:blur(12px);z-index:20;padding:1rem;border-radius:1.25rem}.print-ticket .credit-print-card{max-width:980px;margin:auto}.invoice-print-logo{max-height:70px;object-fit:contain}
@media (max-width: 991px){.payment-summary-pro{grid-template-columns:1fr 1fr}.pos-customer-box .pos-customer-autocomplete{flex-wrap:wrap}.pos-customer-box .pos-new-customer-btn{width:100%}}


/* Phase 18 Pro fixes: POS layout, selects, caja labels and readability */
.pos-clean-grid{grid-template-columns:minmax(0,1fr) 420px!important;align-items:start!important;}
.pos-clean-left{grid-column:1!important;grid-row:1!important;min-width:0!important;}
.pos-clean-cart{grid-column:2!important;grid-row:1!important;top:92px!important;}
@media(max-width:1199.98px){.pos-clean-grid{grid-template-columns:1fr!important}.pos-clean-left,.pos-clean-cart{grid-column:auto!important;grid-row:auto!important}.pos-clean-cart{position:static!important;max-height:none!important}}
.pos-customer-select-line{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.5rem;align-items:center;width:100%;}
.pos-customer-select-line .searchable-control{min-height:48px!important;border:1px solid #dbe3ee!important;border-radius:1rem!important;background:#fff!important;padding:.6rem .75rem!important;}
.pos-customer-select-line .searchable-dropdown{min-width:360px;max-width:min(520px,92vw);right:auto!important;}
.pos-new-customer-btn{min-height:48px;display:inline-flex;align-items:center;gap:.35rem;font-weight:800;white-space:nowrap;}
.cart-summary-clean div{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:1rem!important;}
.cart-summary-clean span,.cart-summary-clean strong{display:inline-block!important;}
.payment-summary.pro{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:1rem!important;}
.payment-summary.pro>div{background:#f8fafc;border-radius:1rem;padding:1rem;display:flex;flex-direction:column;gap:.25rem;}
.payment-balance-alert{margin-top:1rem;border-radius:1rem;padding:1rem;font-weight:800;display:flex;gap:.55rem;align-items:center;}
.payment-balance-alert.pending{background:#fff7ed;color:#92400e}.payment-balance-alert.ok{background:#dcfce7;color:#166534}.payment-balance-alert.change{background:#dbeafe;color:#1e40af}
.cash-method-code{font-size:.78rem;color:#64748b}.cash-method-kind{font-size:.75rem;font-weight:800;background:#f1f5f9;border-radius:999px;padding:.18rem .5rem;color:#334155;display:inline-flex;margin-top:.25rem}
.select-friendly-note{font-size:.82rem;color:#64748b;margin-top:.3rem}.metric-explain{font-size:.82rem;color:#64748b;margin-top:.25rem}
.quick-action-icon{display:inline-flex;align-items:center;gap:.35rem}.customer-select-clean .searchable-dropdown{min-width:360px;}
.quotation-print-toolbar{display:flex;gap:.5rem;align-items:center;justify-content:flex-end;flex-wrap:wrap;margin-bottom:1rem}
.inventory-status-card .label{font-size:.8rem;color:#64748b}.inventory-status-card .value{font-size:1.35rem;font-weight:900}.inventory-status-card .help{font-size:.78rem;color:#64748b}


/* Fase 18 - estabilización UX final */
body.ms-menu-hidden-v18 .app-sidebar{display:none!important;opacity:0!important;pointer-events:none!important;transform:translateX(-120%)!important;width:0!important;min-width:0!important;padding:0!important;}
body.ms-menu-hidden-v18 .app-main{margin-left:0!important;}
body.ms-menu-hidden-v18 .topbar{left:0!important;}
.pos-grid-left-catalog{grid-template-columns:minmax(0,1fr) minmax(380px,440px)!important;}
.pos-grid-left-catalog .pos-clean-left{order:1!important;}
.pos-grid-left-catalog .pos-clean-cart{order:2!important;}
.pos-customer-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.5rem;align-items:center;}
.pos-customer-row .searchable-control{min-height:48px;border:1px solid #dbe3ee;background:#fff;border-radius:1rem;padding:.65rem .85rem;}
.pos-customer-row .pos-new-customer-btn{min-height:48px;white-space:nowrap;display:inline-flex;align-items:center;gap:.35rem;}
.pos-mini-select .searchable-select-pro{width:100%;}
.pos-clean-cart{background:#fff;border:1px solid rgba(15,23,42,.07);box-shadow:0 22px 60px rgba(15,23,42,.08);}
.cart-summary-clean{background:linear-gradient(135deg,#fff,#fff4f4);border-radius:1.25rem;padding:1rem;margin-top:1rem;}
.payment-summary.pro{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:.8rem;}
.payment-summary.pro>div{background:#f8fafc;border-radius:1rem;padding:1rem;}
.payment-summary.pro span{display:block;color:#64748b}.payment-summary.pro strong{font-size:1.12rem}.payment-balance-alert{border-radius:1rem;padding:.9rem 1rem;margin-top:1rem;display:flex;gap:.5rem;align-items:center;font-weight:800}.payment-balance-alert.pending{background:#fff7ed;color:#9a3412}.payment-balance-alert.ok{background:#ecfdf5;color:#047857}.payment-balance-alert.change{background:#eff6ff;color:#1d4ed8}
.searchable-dropdown{z-index:3000!important;}.modal .searchable-dropdown{z-index:4000!important;}.searchable-option span{line-height:1.25;}
.reserve-item-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:.9rem;max-height:560px;overflow:auto;padding:.2rem;}.reserve-choice-card{display:grid;grid-template-columns:auto minmax(0,1fr);gap:.75rem;padding:1rem;border:1px solid rgba(15,23,42,.08);border-radius:1.25rem;background:#fff;cursor:pointer;transition:.15s}.reserve-choice-card:hover{border-color:#fecaca;box-shadow:0 18px 45px rgba(15,23,42,.08);transform:translateY(-2px)}.reserve-choice-card input{margin-top:.25rem}.reserve-icon{width:48px;height:48px;border-radius:1rem;background:#fff1f2;color:#ef4444;display:grid;place-items:center;font-size:1.35rem}.reserve-choice-card strong,.reserve-choice-card span,.reserve-choice-card small{display:block}.reserve-choice-card span,.reserve-choice-card small{color:#64748b;font-size:.88rem}.reserve-choice-card:has(input:checked){border-color:#ef4444;background:#fff7f7;box-shadow:0 0 0 3px rgba(239,68,68,.12)}
.credit-customer-results-pro{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:.6rem;margin-top:.8rem}.credit-customer-results-pro .customer-result{border:1px solid rgba(15,23,42,.08)!important;border-radius:1rem!important;background:#fff!important;padding:.8rem!important;text-align:left!important}.credit-customer-results-pro .customer-result small{display:block;color:#64748b}.selected-customer{display:inline-flex;align-items:center;gap:.4rem;background:#ecfdf5;color:#047857;border-radius:999px;padding:.5rem .8rem;font-weight:800}
.credit-moto-grid-pro,.moto-select-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(245px,1fr));gap:.9rem;max-height:560px;overflow:auto;padding:.2rem}.moto-reserve-choice{min-height:145px}.moto-reserve-choice span,.moto-reserve-choice small{display:block;line-height:1.35;margin-top:.2rem}.moto-reserve-choice .badge{vertical-align:middle;margin:.15rem .25rem;}
.inventory-status-explain{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:.8rem;margin:.8rem 0 1rem}.inventory-status-explain div{background:#fff;border:1px solid rgba(15,23,42,.08);border-radius:1rem;padding:.8rem}.inventory-status-explain strong{display:block}.inventory-status-explain span{color:#64748b;font-size:.86rem}.cash-box-help{background:#eff6ff;border:1px solid #bfdbfe;color:#1e3a8a;border-radius:1rem;padding:.8rem;font-size:.92rem;margin-bottom:1rem}
.print-format-actions{display:flex;gap:.5rem;flex-wrap:wrap}.print-format-actions .btn{border-radius:999px}.template-preview-shell iframe{width:100%;height:330px;border:1px solid #e5e7eb;border-radius:1rem;background:white}
.supplier-form-grid .field-icon-input{min-height:50px}.cash-close-method-type{display:inline-flex;align-items:center;gap:.35rem;background:#f8fafc;border-radius:999px;padding:.22rem .55rem;color:#475569;font-size:.8rem;margin-top:.2rem}


/* Phase 18 extra client row and fixed menu/cart behavior */
.pos-customer-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.5rem;align-items:center;width:100%;}
.pos-customer-row .searchable-control{min-height:48px!important;border:1px solid #dbe3ee!important;border-radius:1rem!important;background:#fff!important;padding:.6rem .75rem!important;}
.pos-customer-row .searchable-dropdown{min-width:360px;max-width:min(520px,92vw);right:auto!important;}
.pos-customer-row .btn{min-height:48px;white-space:nowrap;font-weight:800;}
.pos-clean-grid{grid-template-columns:minmax(0,1fr) 420px!important;}
.pos-clean-left{grid-column:1!important;grid-row:1!important;}
.pos-clean-cart{grid-column:2!important;grid-row:1!important;}
@media(max-width:1199.98px){.pos-clean-grid{grid-template-columns:1fr!important}.pos-clean-left,.pos-clean-cart{grid-column:auto!important;grid-row:auto!important}.pos-clean-cart{position:static!important;max-height:none!important}}


/* Fase 20 QA: estabilización visual POS, selects y formularios */
.pos-customer-box .searchable-select-pro{display:block!important;min-width:190px;width:100%;}
.pos-customer-row{display:grid!important;grid-template-columns:minmax(180px,1fr) auto!important;gap:.65rem!important;align-items:center!important;}
.pos-customer-row .searchable-control{min-height:54px!important;border:1px solid #dbe3ee!important;border-radius:1.2rem!important;background:#fff!important;padding:.72rem .9rem!important;font-weight:800!important;}
.pos-customer-row .searchable-dropdown{min-width:420px!important;max-width:min(560px,92vw)!important;right:auto!important;z-index:1200!important;}
.pos-customer-row .pos-new-customer-btn{min-height:54px!important;border-radius:1.2rem!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:.45rem!important;white-space:nowrap!important;padding:.75rem 1rem!important;}
.pos-context-grid{grid-template-columns:repeat(4,minmax(190px,1fr))!important;}
.pos-mini-select{overflow:visible!important;}
.pos-clean-grid{grid-template-columns:minmax(0,1fr) minmax(390px,440px)!important;}
.pos-clean-left{min-width:0;}
.pos-clean-cart{min-width:0;}
@media(max-width:1199.98px){.pos-clean-grid{grid-template-columns:1fr!important}.pos-customer-row{grid-template-columns:1fr!important}.pos-customer-row .pos-new-customer-btn{width:100%!important}.pos-customer-row .searchable-dropdown{min-width:100%!important}}

.customer-form-icon .input-icon-group{position:relative}.customer-form-icon .input-icon-group>i{position:absolute;left:1rem;top:50%;transform:translateY(-50%);color:#94a3b8;z-index:2}.customer-form-icon .input-icon-group>.form-control{padding-left:2.7rem!important}.customer-form-icon textarea.form-control{min-height:74px;}

.reserve-filter-row{display:grid;grid-template-columns:minmax(0,1fr) 220px;gap:.75rem;align-items:end;margin-bottom:1rem}.reserve-choice-card{position:relative}.reserve-choice-card .branch-chip{display:inline-flex;align-items:center;gap:.25rem;background:#eff6ff;color:#2563eb;font-weight:800;border-radius:999px;padding:.18rem .55rem;font-size:.78rem;margin-top:.35rem}.reserve-choice-card .type-chip{display:inline-flex;align-items:center;gap:.25rem;background:#fff1f2;color:#ef4444;font-weight:900;border-radius:999px;padding:.18rem .55rem;font-size:.76rem;margin-top:.35rem;margin-right:.35rem}

.select-help-text{font-size:.82rem;color:#64748b;margin-top:.35rem}.searchable-option span{line-height:1.25}.searchable-dropdown{z-index:1200!important}.modal .searchable-dropdown{z-index:1600!important}.btn-icon-soft{width:42px;height:42px;display:inline-grid;place-items:center;border-radius:1rem;background:#f8fafc;border:1px solid #e5e7eb;color:#0f172a}.btn-icon-soft:hover{background:#eef2ff;color:#2563eb}

/* Devoluciones */
.return-sale-result{border:1px solid #e5e7eb;border-radius:1.25rem;padding:1rem;background:#fff;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:1rem;align-items:center;margin-bottom:.75rem}.return-sale-result .meta{display:flex;flex-wrap:wrap;gap:.45rem;color:#64748b;font-size:.9rem}.return-sale-result .meta span{background:#f8fafc;border-radius:999px;padding:.25rem .6rem}.return-sale-result strong{font-size:1.05rem}

/* Fase 20 - estabilizacion operativa */
body.ms-menu-hidden-final .app-sidebar{display:none!important;transform:translateX(-120%)!important;width:0!important;min-width:0!important;opacity:0!important;pointer-events:none!important;}
body.ms-menu-hidden-final .app-main{margin-left:0!important;}
body.ms-menu-hidden-final .topbar{left:0!important;}
body.ms-menu-hidden-final .sidebar-collapse-btn{left:1rem!important;}
@media (max-width: 991.98px){body.ms-menu-hidden-final .app-sidebar{display:none!important}.app-main{margin-left:0!important}}

.pos-grid-stable,.pos-clean-grid.pos-grid-left-catalog{display:grid!important;grid-template-columns:minmax(0,1.25fr) minmax(360px,.75fr)!important;gap:1.15rem!important;align-items:start!important;}
.pos-clean-left{order:1!important;min-width:0!important}.pos-clean-cart{order:2!important;min-width:0!important;position:sticky;top:1rem;max-height:calc(100vh - 8rem);overflow:auto;}
@media(max-width:1200px){.pos-grid-stable,.pos-clean-grid.pos-grid-left-catalog{grid-template-columns:1fr!important}.pos-clean-cart{position:static;max-height:none}}

.pos-customer-pro{position:relative;overflow:visible!important}.pos-customer-selected{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.45rem;align-items:center}.pos-customer-picker{min-width:0;width:100%;height:54px;border:1px solid #dbe3ee;background:#fff;border-radius:1rem;padding:.7rem .85rem;display:flex;align-items:center;justify-content:space-between;font-weight:800;color:#111827;gap:.5rem}.pos-customer-picker span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pos-customer-panel{display:none;position:absolute;z-index:2200;top:calc(100% + .5rem);left:0;right:0;background:#fff;border:1px solid rgba(15,23,42,.08);border-radius:1.25rem;box-shadow:0 28px 70px rgba(15,23,42,.22);padding:.7rem;min-width:360px}.pos-customer-panel.open{display:block}.pos-customer-searchbox{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:.5rem;background:#f8fafc;border-radius:1rem;padding:.6rem .8rem;margin-bottom:.55rem}.pos-customer-searchbox i{color:#64748b}.pos-customer-searchbox input{border:0;background:transparent;outline:0;width:100%;font-size:1rem}.pos-customer-results{max-height:320px;overflow:auto;display:grid;gap:.35rem}.pos-customer-result{border:0;background:#fff;border-radius:1rem;padding:.65rem .75rem;text-align:left;display:grid;grid-template-columns:auto minmax(0,1fr);grid-template-areas:'icon title' 'icon meta';column-gap:.65rem}.pos-customer-result:hover,.pos-customer-result:focus{background:#eef5ff;color:#0d6efd}.pos-customer-result i{grid-area:icon;color:#ef4444}.pos-customer-result span{grid-area:title;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pos-customer-result small{grid-area:meta;color:#64748b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pos-new-customer-btn{white-space:nowrap;height:54px;font-weight:800}.pos-customer-result.d-none{display:none!important}

.customer-modal-pro .field-icon-input,.user-modal-pro .field-icon-input{min-height:48px}.returns-sale-card{border:1px solid rgba(15,23,42,.08);border-radius:1rem;padding:1rem;background:#fff;box-shadow:0 15px 38px rgba(15,23,42,.05)}
.cash-method-code{display:none!important}.cash-method-name small{color:#64748b}.inventory-kpi-note{font-size:.82rem;color:#64748b;display:block;margin-top:.25rem}.reservation-item-card small{display:block;color:#64748b}.searchable-select-pro{z-index:1080}.searchable-select-pro.open{z-index:2300}

/* Fase 21 - POS cliente limpio y estable */
.pos-context-card .pos-context-grid{grid-template-columns:repeat(4,minmax(210px,1fr))!important;align-items:stretch;}
.pos-customer-pro{min-width:0!important;}
.pos-customer-pro .pos-customer-selected{display:grid!important;grid-template-columns:minmax(0,1fr) 54px!important;gap:.55rem!important;align-items:center!important;width:100%!important;}
.pos-customer-pro .pos-customer-picker{height:54px!important;min-width:0!important;width:100%!important;border:1px solid #dbe3ee!important;background:#fff!important;border-radius:1rem!important;padding:.72rem .85rem!important;overflow:hidden!important;}
.pos-customer-pro .pos-customer-picker [data-pos-customer-label]{display:block!important;min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;font-weight:800!important;}
.pos-customer-pro .pos-new-customer-btn{width:54px!important;min-width:54px!important;height:54px!important;padding:0!important;display:grid!important;place-items:center!important;border-radius:1rem!important;}
.pos-customer-pro .pos-new-customer-btn span{display:none!important;}
.pos-customer-pro .pos-customer-panel{min-width:min(520px,92vw)!important;left:0!important;right:auto!important;}
.pos-customer-pro .pos-customer-result small,.pos-customer-pro .pos-customer-result span{max-width:100%!important;}
@media(max-width:1300px){.pos-context-card .pos-context-grid{grid-template-columns:repeat(2,minmax(220px,1fr))!important;}}
@media(max-width:720px){.pos-context-card .pos-context-grid{grid-template-columns:1fr!important;}.pos-customer-pro .pos-customer-panel{min-width:100%!important;right:0!important;}}
/* Fase 22 - Apartados tipo POS */
.reservation-pos-layout{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(360px,.7fr);gap:1rem;align-items:start}.reservation-catalog-panel,.reservation-cart-panel{min-height:0}.reservation-cart-panel{position:sticky;top:1rem}.reserve-item-grid-pos{grid-template-columns:repeat(auto-fill,minmax(230px,1fr));max-height:640px}.reserve-product-card{position:relative;background:#fff;border:1px solid rgba(15,23,42,.08);border-radius:1.4rem;padding:1rem;box-shadow:0 18px 45px rgba(15,23,42,.06);min-height:235px;display:flex;flex-direction:column;gap:.8rem;transition:.16s}.reserve-product-card:hover{border-color:#fecaca;transform:translateY(-2px);box-shadow:0 22px 55px rgba(15,23,42,.09)}.reserve-product-art{height:92px;border-radius:1.1rem;background:linear-gradient(135deg,#fff1f2,#fff7ed);display:grid;place-items:center;position:relative;color:#ef4444;font-size:2.05rem}.reserve-product-art span{position:absolute;left:.75rem;bottom:.6rem;font-size:.75rem;font-weight:900;color:#fff;background:#ef4444;border-radius:999px;padding:.18rem .6rem}.reserve-product-body h5{font-weight:900;margin:0 0 .25rem}.reserve-product-body p{color:#64748b;margin:0 0 .35rem}.reserve-product-body small{display:block;color:#64748b}.reserve-add-btn{position:absolute;right:1rem;bottom:1rem;width:42px;height:42px;display:grid;place-items:center}.reservation-client-row{display:grid;grid-template-columns:minmax(0,1fr) 48px;gap:.5rem}.reservation-cart-list{min-height:120px;max-height:360px;overflow:auto}.reservation-cart-line{display:grid;grid-template-columns:minmax(0,1fr) 82px auto 40px;gap:.55rem;align-items:center;background:#fff;border:1px solid rgba(15,23,42,.08);border-radius:1.15rem;padding:.8rem;margin-bottom:.65rem}.reservation-cart-line strong{font-weight:900}.reservation-cart-line small{display:block;color:#64748b}.reservation-cart-line input{border:1px solid #e2e8f0;border-radius:.8rem;padding:.55rem .6rem;max-width:82px}.reservation-cart-total{display:grid;grid-template-columns:1fr auto;gap:.55rem;background:#fff7f7;border-radius:1.1rem;padding:1rem}.reservation-cart-total strong{font-weight:900}.branch-chip,.type-chip{white-space:nowrap}@media(max-width:1200px){.reservation-pos-layout{grid-template-columns:1fr}.reservation-cart-panel{position:static}.reserve-item-grid-pos{max-height:520px}}@media(max-width:575px){.reservation-cart-line{grid-template-columns:1fr 80px 40px}.reservation-cart-line>strong{grid-column:1 / -1}.reserve-filter-row{grid-template-columns:1fr!important}}

/* Fase 22 - apartados multi-item tipo POS */
.reservation-pos-layout{display:grid;grid-template-columns:360px minmax(0,1fr) 380px;gap:1.25rem;align-items:start}.reservation-cart-panel,.reservation-data-panel{position:sticky;top:1rem}.reservation-selected-list{display:grid;gap:.75rem;max-height:460px;overflow:auto;padding-right:.25rem}.reservation-cart-item{border:1px solid rgba(15,23,42,.08);border-radius:1.25rem;background:#fff;padding:.9rem;box-shadow:0 10px 28px rgba(15,23,42,.045)}.reservation-cart-item .cart-item-main strong{display:block;color:#0f172a}.reservation-cart-item .cart-item-main small{display:block;color:#64748b}.cart-item-controls{display:grid;grid-template-columns:72px 1fr 38px;gap:.5rem;align-items:center;margin-top:.65rem}.cart-item-controls strong{text-align:right}.reservation-cart-summary{border-radius:1.2rem;background:linear-gradient(135deg,#fff7f7,#f8fafc);padding:1rem;display:grid;gap:.55rem}.reservation-cart-summary>div{display:flex;justify-content:space-between;align-items:center}.reservation-cart-summary span{color:#64748b}.reservation-cart-summary strong{font-size:1.08rem}.reserve-item-grid-pos{max-height:680px;overflow:auto}.reserve-pos-card{border:1px solid rgba(15,23,42,.08);border-radius:1.35rem;background:#fff;padding:1rem;transition:.16s ease;box-shadow:0 12px 34px rgba(15,23,42,.045)}.reserve-pos-card:hover,.reserve-pos-card.selected{border-color:#fecaca;box-shadow:0 22px 55px rgba(15,23,42,.085);transform:translateY(-2px)}.reserve-card-image{width:100%;height:122px;border:0;border-radius:1.15rem;background:linear-gradient(135deg,#fff1f2,#fff7ed);display:grid;place-items:center;color:#ef4444;font-size:2.4rem;margin-bottom:.75rem}.reserve-card-body h5{font-weight:900;margin:0 0 .35rem;min-height:2.3rem}.reserve-add-btn{width:38px;height:38px;display:inline-grid;place-items:center}.stock-chip{display:inline-flex;align-items:center;gap:.25rem;background:#eef2ff;color:#2563eb;font-weight:800;border-radius:999px;padding:.18rem .55rem;font-size:.78rem}.reserve-preview-icon{width:78px;height:78px;border-radius:1.5rem;background:#fff1f2;color:#ef4444;display:grid;place-items:center;font-size:2.5rem;margin:auto}.mini-info{border:1px solid #e5e7eb;border-radius:1rem;padding:.8rem;background:#f8fafc}.mini-info span{display:block;color:#64748b;font-size:.78rem;text-transform:uppercase;font-weight:800}.mini-info strong{display:block;color:#0f172a}.reservation-catalog-panel{min-width:0}@media (max-width:1300px){.reservation-pos-layout{grid-template-columns:1fr}.reservation-cart-panel,.reservation-data-panel{position:static}.reservation-cart-panel{order:2}.reservation-catalog-panel{order:1}.reservation-data-panel{order:3}}

/* Fase 23 - estabilidad visual POS, apartados e inventario */
.pos-clean-shell{max-width:none!important;width:100%!important;}
.pos-clean-grid,.pos-grid-stable{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(360px,420px)!important;gap:1.25rem!important;align-items:start!important;}
.pos-clean-left{min-width:0!important;overflow:visible!important;}
.pos-clean-cart{min-width:0!important;position:sticky!important;top:90px!important;z-index:3;}
.pos-context-card{overflow:visible!important;}
.pos-context-card .pos-context-grid{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(190px,1fr))!important;gap:.85rem!important;align-items:stretch!important;}
.field-icon-wrap.pos-mini-select{min-width:0!important;overflow:visible!important;padding:1rem!important;}
.field-icon-wrap.pos-mini-select .form-select,.field-icon-wrap.pos-mini-select .pos-customer-picker{width:100%!important;min-width:0!important;max-width:100%!important;}
.pos-customer-pro .pos-customer-selected{display:grid!important;grid-template-columns:minmax(0,1fr) 48px!important;gap:.5rem!important;align-items:center!important;}
.pos-customer-pro .pos-new-customer-btn{width:48px!important;min-width:48px!important;height:48px!important;padding:0!important;border-radius:1rem!important;display:grid!important;place-items:center!important;}
.pos-customer-pro .pos-customer-picker{height:48px!important;}
.pos-customer-pro .pos-customer-panel{min-width:min(470px,92vw)!important;max-width:min(520px,92vw)!important;}
.pos-product-grid-clean{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(210px,1fr))!important;gap:1rem!important;}
@media(max-width:1280px){.pos-clean-grid,.pos-grid-stable{grid-template-columns:1fr!important}.pos-clean-cart{position:static!important;max-height:none!important;}.pos-context-card .pos-context-grid{grid-template-columns:repeat(2,minmax(190px,1fr))!important;}}
@media(max-width:720px){.pos-context-card .pos-context-grid{grid-template-columns:1fr!important}.pos-product-grid-clean{grid-template-columns:repeat(auto-fill,minmax(170px,1fr))!important}.pos-customer-pro .pos-customer-panel{min-width:100%!important;right:0!important}}

.reservation-customer-field{position:relative;overflow:visible!important;}
.reservation-customer-selector{display:grid;grid-template-columns:minmax(0,1fr) 48px;gap:.5rem;align-items:center;}
.reservation-customer-open{height:50px;border:1px solid #dbe3ee;border-radius:1rem;background:#fff;display:flex;align-items:center;justify-content:space-between;gap:.6rem;padding:.7rem .9rem;text-align:left;font-weight:800;color:#111827;min-width:0;}
.reservation-customer-open span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.reservation-customer-panel{display:none;position:absolute;z-index:2300;top:calc(100% + 6px);left:0;right:0;background:#fff;border:1px solid rgba(15,23,42,.10);border-radius:1.15rem;box-shadow:0 28px 72px rgba(15,23,42,.20);padding:.65rem;}
.reservation-customer-panel.open{display:block;}
.reservation-customer-options{max-height:290px;overflow:auto;display:grid;gap:.35rem;}
.reservation-customer-option{border:0;background:#fff;border-radius:.95rem;padding:.65rem .75rem;text-align:left;display:grid;grid-template-columns:auto minmax(0,1fr);grid-template-areas:'icon title' 'icon meta';column-gap:.65rem;align-items:center;}
.reservation-customer-option:hover,.reservation-customer-option:focus{background:#eef5ff;color:#0d6efd;}
.reservation-customer-option i{grid-area:icon;color:#ef4444;}
.reservation-customer-option span{grid-area:title;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.reservation-customer-option small{grid-area:meta;color:#64748b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.reservation-pos-layout{display:grid;grid-template-columns:minmax(300px,.9fr) minmax(0,1.3fr) minmax(300px,.8fr);gap:1rem;align-items:start;}
.reservation-cart-panel,.reservation-data-panel{position:sticky;top:90px;}
.reserve-item-grid-pos{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:1rem;}
@media(max-width:1320px){.reservation-pos-layout{grid-template-columns:1fr}.reservation-cart-panel,.reservation-data-panel{position:static}.reserve-filter-row{grid-template-columns:1fr!important}}


/* Fase 23 - estabilizacion visual POS, apartados e inventario */
.pos-clean-grid.pos-grid-stable{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(380px,440px)!important;gap:1.25rem!important;align-items:start!important;}
.pos-clean-left{grid-column:1!important;grid-row:1!important;order:1!important;min-width:0!important;}
.pos-clean-cart{grid-column:2!important;grid-row:1!important;order:2!important;position:sticky!important;top:1rem!important;max-height:calc(100vh - 7rem)!important;overflow:auto!important;min-width:0!important;}
.pos-context-card{overflow:visible!important;}
.pos-context-card .pos-context-grid{display:grid!important;grid-template-columns:repeat(4,minmax(155px,1fr))!important;gap:.85rem!important;align-items:stretch!important;}
.pos-context-card .field-icon-wrap{min-width:0!important;overflow:visible!important;}
.pos-context-card .field-icon-wrap label{font-size:.82rem!important;letter-spacing:.06em!important;}
.pos-context-card .field-icon-wrap .form-select,.pos-context-card .field-icon-wrap .searchable-control{height:52px!important;min-height:52px!important;border-radius:1rem!important;font-weight:800!important;}
.pos-customer-native .pos-customer-row-clean{display:grid!important;grid-template-columns:minmax(0,1fr) 52px!important;gap:.45rem!important;align-items:center!important;width:100%!important;}
.pos-customer-native .pos-new-customer-btn{width:52px!important;min-width:52px!important;height:52px!important;padding:0!important;display:grid!important;place-items:center!important;}
.pos-customer-native .searchable-select-pro{min-width:0!important;width:100%!important;}
.pos-customer-native .searchable-dropdown{min-width:min(420px,90vw)!important;right:auto!important;left:0!important;}
.pos-customer-native .searchable-option span{white-space:normal!important;word-break:normal!important;}
.pos-catalog-panel{overflow:visible!important;}
.pos-product-grid-clean{max-height:65vh!important;overflow:auto!important;}
@media(max-width:1500px){.pos-context-card .pos-context-grid{grid-template-columns:repeat(2,minmax(210px,1fr))!important;}.pos-clean-grid.pos-grid-stable{grid-template-columns:minmax(0,1fr) minmax(360px,420px)!important;}}
@media(max-width:1150px){.pos-clean-grid.pos-grid-stable{grid-template-columns:1fr!important}.pos-clean-left,.pos-clean-cart{grid-column:auto!important;grid-row:auto!important}.pos-clean-cart{position:static!important;max-height:none!important}.pos-context-card .pos-context-grid{grid-template-columns:1fr!important}}

.reservation-data-panel{overflow:visible!important;}
.reservation-data-panel .searchable-select-pro{z-index:2600!important;}
.reservation-data-panel .searchable-dropdown{min-width:min(440px,90vw)!important;max-height:360px!important;z-index:2700!important;}
.reservation-data-panel .searchable-option span{white-space:normal!important;word-break:normal!important;}
.reserve-pos-card{position:relative!important;z-index:1!important;}
.reserve-pos-card.selected{z-index:2!important;}

.inventory-kpi-note{display:block!important;margin-top:.25rem!important;color:#64748b!important;font-size:.82rem!important;}

/* Fase 23 - estabilización visual POS / Apartados / Inventario */
.phase23-pos-grid,
.pos-clean-grid.pos-grid-stable,
.pos-clean-grid {
  display:grid !important;
  grid-template-columns:minmax(0, 1fr) minmax(360px, 420px) !important;
  gap:1.35rem !important;
  align-items:start !important;
}
.pos-clean-left { min-width:0 !important; }
.pos-clean-cart { position:sticky !important; top:96px !important; align-self:start !important; max-height:calc(100vh - 115px) !important; overflow:auto !important; }
.phase23-context-grid,
.pos-context-grid {
  display:grid !important;
  grid-template-columns: minmax(160px,.9fr) minmax(245px,1.25fr) minmax(170px,.95fr) minmax(140px,.75fr) !important;
  gap:1rem !important;
  align-items:stretch !important;
}
.pos-mini-select { min-width:0 !important; overflow:visible !important; }
.pos-mini-select .form-select { min-width:0 !important; text-overflow:ellipsis !important; }
.pos-customer-pro { overflow:visible !important; position:relative !important; }
.pos-customer-pro .pos-customer-selected { display:grid !important; grid-template-columns:minmax(0,1fr) 54px !important; gap:.65rem !important; align-items:center !important; width:100% !important; }
.pos-customer-pro .pos-customer-picker { width:100% !important; height:54px !important; display:flex !important; align-items:center !important; justify-content:space-between !important; gap:.55rem !important; border:1px solid #dbe3ee !important; border-radius:1rem !important; background:#fff !important; color:#0f172a !important; font-weight:800 !important; padding:.65rem .85rem !important; min-width:0 !important; }
.pos-customer-pro .pos-customer-picker [data-pos-customer-label] { display:block !important; overflow:hidden !important; text-overflow:ellipsis !important; white-space:nowrap !important; min-width:0 !important; }
.pos-customer-pro .pos-new-customer-btn { width:54px !important; min-width:54px !important; max-width:54px !important; height:54px !important; padding:0 !important; display:grid !important; place-items:center !important; }
.pos-customer-pro .pos-new-customer-btn span { display:none !important; }
.pos-customer-pro .pos-customer-panel { display:none; position:absolute; z-index:2900; top:calc(100% + .55rem); left:0; width:min(520px,92vw); max-width:92vw; padding:.85rem; border-radius:1.15rem; background:#fff; border:1px solid rgba(15,23,42,.08); box-shadow:0 24px 70px rgba(15,23,42,.18); }
.pos-customer-pro .pos-customer-panel.open { display:block !important; }
.pos-customer-searchbox { display:flex; align-items:center; gap:.55rem; padding:.55rem .75rem; border-radius:.95rem; background:#f1f5f9; margin-bottom:.7rem; }
.pos-customer-searchbox input { border:0; outline:0; background:transparent; width:100%; }
.pos-customer-results { display:grid; gap:.35rem; max-height:320px; overflow:auto; }
.pos-customer-result { border:0; background:transparent; text-align:left; padding:.65rem .75rem; border-radius:.9rem; display:grid; grid-template-columns:26px minmax(0,1fr); grid-template-areas:'icon title' 'icon meta'; gap:.05rem .55rem; width:100%; color:#0f172a; }
.pos-customer-result:hover { background:#eff6ff; }
.pos-customer-result i { grid-area:icon; color:#ef4444; margin-top:.15rem; }
.pos-customer-result span { grid-area:title; font-weight:800; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.pos-customer-result small { grid-area:meta; color:#64748b; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }

.reservation-customer-widget { position:relative; overflow:visible; }
.reservation-customer-row { display:grid; grid-template-columns:minmax(0,1fr) 54px; gap:.55rem; align-items:center; }
.reservation-customer-display { width:100%; height:54px; border:1px solid #dbe3ee; background:#fff; border-radius:1rem; display:flex; align-items:center; justify-content:space-between; gap:.65rem; padding:.7rem .95rem; font-weight:800; color:#0f172a; }
.reservation-customer-display span { display:block; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.reservation-new-customer-btn { width:54px; height:54px; display:grid; place-items:center; padding:0; }
.reservation-customer-panel { display:none; position:absolute; z-index:2900; top:calc(100% + .55rem); left:0; width:min(520px,92vw); background:#fff; border:1px solid rgba(15,23,42,.08); box-shadow:0 24px 70px rgba(15,23,42,.18); border-radius:1.15rem; padding:.85rem; }
.reservation-customer-panel.open { display:block; }
.reservation-customer-results { display:grid; gap:.35rem; max-height:310px; overflow:auto; }
.reservation-customer-option { border:0; background:transparent; width:100%; text-align:left; padding:.65rem .75rem; border-radius:.9rem; display:grid; grid-template-columns:26px minmax(0,1fr); grid-template-areas:'icon title' 'icon meta'; gap:.05rem .55rem; }
.reservation-customer-option:hover { background:#eff6ff; }
.reservation-customer-option i { grid-area:icon; color:#ef4444; margin-top:.15rem; }
.reservation-customer-option span { grid-area:title; font-weight:800; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.reservation-customer-option small { grid-area:meta; color:#64748b; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

@media (max-width: 1280px){
  .phase23-pos-grid,.pos-clean-grid.pos-grid-stable,.pos-clean-grid { grid-template-columns:1fr !important; }
  .pos-clean-cart { position:static !important; max-height:none !important; order:2; }
  .pos-clean-left { order:1; }
  .phase23-context-grid,.pos-context-grid { grid-template-columns:repeat(2,minmax(220px,1fr)) !important; }
}
@media (max-width: 680px){
  .phase23-context-grid,.pos-context-grid { grid-template-columns:1fr !important; }
  .pos-customer-pro .pos-customer-panel,.reservation-customer-panel { width:100%; max-width:100%; }
}

/* Phase 29 - Gastos unificados y modales sin campos montados */
body.modal-open .searchable-select-pro.open:not(.modal .searchable-select-pro) .searchable-dropdown,
body.modal-open .smart-select.open:not(.modal .smart-select) .smart-select-options {
  display: none !important;
}
.searchable-dropdown,
.smart-select-options { z-index: 1040 !important; }
.modal .searchable-dropdown,
.modal .smart-select-options { z-index: 1085 !important; }
.expense-pro-modal { --bs-modal-zindex: 1065; }
.expense-pro-modal .modal-dialog { max-width: min(1020px, 94vw); }
.expense-modal-card {
  border: 0 !important;
  border-radius: 1.65rem !important;
  box-shadow: 0 32px 90px rgba(15,23,42,.22);
  overflow: hidden;
}
.expense-modal-header { padding: 1.65rem 1.65rem .9rem; }
.expense-modal-body { padding: 1rem 1.65rem; overflow: visible; }
.expense-modal-footer { padding: .9rem 1.65rem 1.5rem; }
.expense-close-btn {
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 1rem;
  background: #f8fafc;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  color: #0f172a;
}
.expense-close-btn:hover { background: #fee2e2; color: #ef4444; }
.expense-form-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
}
.expense-field { grid-column: span 6; min-width: 0; }
.expense-field-wide { grid-column: span 4; }
.expense-field-full { grid-column: 1 / -1; }
.expense-field label {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: .45rem;
}
.expense-field label i { color: #ef4444; }
.expense-field .form-control,
.expense-field .form-select {
  min-height: 52px;
  border-radius: 1rem;
  border: 1px solid #dbe3ee;
  box-shadow: 0 10px 28px rgba(15,23,42,.035);
  background-color: #fff;
}
.expense-field textarea.form-control { min-height: 96px; padding-top: .9rem; }
.expense-field small { display:block; margin-top:.35rem; color:#64748b; font-size:.82rem; }
.expense-context-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .8rem;
  margin-bottom: 1rem;
}
.expense-context-strip > div {
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  padding: .85rem 1rem;
  background: linear-gradient(135deg, #fff, #f8fafc);
}
.expense-context-strip span { display:block; color:#64748b; font-size:.82rem; margin-bottom:.2rem; }
.expense-context-strip strong { color:#0f172a; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; display:block; }
@media (max-width: 900px) {
  .expense-field, .expense-field-wide { grid-column: 1 / -1; }
  .expense-context-strip { grid-template-columns: 1fr; }
}

/* Fase 30 - estabilidad gastos/devoluciones */
body.modal-open .dashboard-filter-card .searchable-select-pro.open .searchable-dropdown,
body.modal-open .dashboard-filter-card .smart-select.open .smart-select-options,
body.modal-open .page-actions .searchable-select-pro.open .searchable-dropdown,
body.modal-open .page-actions .smart-select.open .smart-select-options{
  display:none!important;
}
body.modal-open .dashboard-filter-card .searchable-select-pro.open,
body.modal-open .page-actions .searchable-select-pro.open{z-index:auto!important;}
.expense-pro-modal{z-index:2100!important;}
.modal-backdrop{z-index:2050!important;}
.expense-pro-modal .modal-dialog{max-width:min(1040px,94vw)!important;}
.expense-modal-card{overflow:hidden!important;border-radius:1.65rem!important;}
.expense-modal-body{overflow:visible!important;}
.expense-native-select{appearance:auto!important;-webkit-appearance:auto!important;background-image:none!important;}
.expense-filter-card{overflow:hidden!important;}
.expense-filter-card .searchable-select-pro{display:none!important;}
.expense-kpi-row .expense-kpi{display:flex;align-items:center;justify-content:space-between;gap:.75rem;min-height:72px;}
.expense-kpi-row .expense-kpi strong{font-size:1.05rem;}
.return-search-input .form-control{min-height:54px;}
.return-sale-list{display:grid;gap:1rem;}
.return-sale-result{border:1px solid rgba(15,23,42,.08);border-radius:1.25rem;background:#fff;padding:1rem 1.2rem;display:flex;align-items:center;justify-content:space-between;gap:1rem;box-shadow:0 14px 40px rgba(15,23,42,.05);}
.return-sale-result .meta{display:flex;flex-wrap:wrap;gap:.55rem;}
.return-sale-result .meta span{display:inline-flex;align-items:center;background:#f8fafc;border-radius:999px;padding:.32rem .65rem;color:#64748b;font-size:.9rem;}
@media(max-width:900px){.return-sale-result{align-items:flex-start;flex-direction:column}.return-sale-result .btn{width:100%;justify-content:center}}

/* ==========================================================
   Fase 38 - Corrección global de modales y selects buscables
   Soluciona modales oscurecidos, campos montados y dropdowns
   flotantes que quedaban por encima del modal.
   ========================================================== */
:root {
  --ms-modal-backdrop-z: 5000;
  --ms-modal-z: 5010;
  --ms-modal-dropdown-z: 5060;
}

.modal-backdrop,
.modal-backdrop.show {
  z-index: var(--ms-modal-backdrop-z) !important;
  opacity: .62 !important;
  background: rgba(15, 23, 42, .78) !important;
  backdrop-filter: blur(2px);
}

.modal,
.modal.show,
.modal.fade.show {
  z-index: var(--ms-modal-z) !important;
}

.modal.show .modal-dialog,
.modal.fade.show .modal-dialog {
  transform: none !important;
  opacity: 1 !important;
  filter: none !important;
}

.modal .modal-dialog {
  pointer-events: auto !important;
}

.modal .modal-content {
  opacity: 1 !important;
  filter: none !important;
  background: #fff !important;
  color: #0f172a !important;
  border: 0 !important;
  border-radius: 1.65rem !important;
  box-shadow: 0 34px 110px rgba(15, 23, 42, .34) !important;
  overflow: visible !important;
}

.modal .modal-header {
  align-items: flex-start;
  gap: 1rem;
  padding: 1.35rem 1.45rem .75rem;
}

.modal .modal-body {
  padding: .9rem 1.45rem;
}

.modal .modal-footer {
  gap: .6rem;
  padding: .75rem 1.45rem 1.35rem;
}

.modal .btn-close,
.modal .modal-close,
.modal [data-bs-dismiss="modal"].btn-close {
  width: 42px;
  height: 42px;
  border-radius: 1rem;
  background-color: #f8fafc;
  opacity: 1;
  padding: .7rem;
  box-shadow: none;
}

.modal .btn-close:hover,
.modal .modal-close:hover {
  background-color: #fee2e2;
}

.modal .form-label {
  font-weight: 750;
  color: #334155;
}

.modal .form-label i {
  color: #ef4444;
  margin-right: .35rem;
}

.modal .form-control,
.modal .form-select,
.modal .searchable-control,
.modal .smart-select-control,
.modal .field-icon-input {
  min-height: 52px;
  border-radius: 1rem !important;
  border-color: #dbe3ee !important;
  background-color: #fff !important;
  color: #0f172a !important;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .035);
}

.modal textarea.form-control {
  min-height: 92px;
  padding-top: .9rem;
}

.modal .searchable-select-pro,
.modal .smart-select,
.modal .reservation-customer-widget,
.modal .pos-customer-pro {
  position: relative !important;
  z-index: 1;
}

.modal .searchable-select-pro.open,
.modal .smart-select.open,
.modal .reservation-customer-widget:has(.reservation-customer-panel.open),
.modal .pos-customer-pro:has(.pos-customer-panel.open) {
  z-index: var(--ms-modal-dropdown-z) !important;
}

.modal .searchable-dropdown,
.modal .smart-select-options,
.modal .reservation-customer-panel,
.modal .pos-customer-panel {
  z-index: var(--ms-modal-dropdown-z) !important;
  max-width: min(620px, calc(100vw - 48px)) !important;
}

/* Los dropdowns que no pertenecen al modal quedan detrás del backdrop.
   El JavaScript también los cierra al abrir cualquier modal. */
body.modal-open .app-shell > .searchable-select-pro.open .searchable-dropdown,
body.modal-open .app-shell > .smart-select.open .smart-select-options {
  display: none !important;
}

/* Modales grandes: mejor uso del espacio y sin scroll horizontal. */
.modal-xl .modal-content,
.modal-lg .modal-content,
.modal-md .modal-content {
  max-width: 100%;
}

.modal-dialog-scrollable .modal-content {
  overflow: hidden !important;
}

.modal-dialog-scrollable .modal-body {
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

/* Formularios largos usados en adelantos, gastos, sucursales y métodos. */
#advanceModal .modal-dialog,
#methodModal .modal-dialog,
#accountModal .modal-dialog,
#branchModal .modal-dialog,
#quickCustomerModal .modal-dialog {
  max-width: min(1080px, 94vw) !important;
}

#methodModal .modal-body,
#accountModal .modal-body,
#advanceModal .modal-body,
#branchModal .modal-body,
#quickCustomerModal .modal-body {
  overflow: visible !important;
}

#methodModal .modal-content,
#accountModal .modal-content,
#advanceModal .modal-content,
#branchModal .modal-content,
#quickCustomerModal .modal-content {
  max-height: 92vh;
}

#methodModal .modal-body,
#accountModal .modal-body,
#advanceModal .modal-body,
#branchModal .modal-body,
#quickCustomerModal .modal-body {
  max-height: calc(92vh - 160px);
  overflow-y: auto !important;
  overflow-x: visible !important;
}

/* Evita que un select buscable abierto quede cortado dentro de grids. */
.modal .row,
.modal .col,
.modal [class*="col-"],
.modal .expense-form-grid,
.modal .payment-form-grid {
  overflow: visible !important;
}

/* Garantías: selects buscables y pasos más limpios. */
.warranty-wizard-grid .searchable-select-pro {
  width: 100%;
}

.warranty-wizard-grid .searchable-dropdown {
  z-index: 1200 !important;
}

@media (max-width: 768px) {
  .modal .modal-dialog {
    margin: .75rem !important;
    width: calc(100% - 1.5rem) !important;
    max-width: calc(100% - 1.5rem) !important;
  }
  .modal .modal-content {
    border-radius: 1.25rem !important;
  }
  .modal .modal-header,
  .modal .modal-body,
  .modal .modal-footer {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Fase 39/40 - Ajustes operativos */
.credit-dues-list{display:grid;gap:.65rem;max-height:260px;overflow:auto;padding:.25rem}
.credit-due-item{display:flex;gap:.75rem;align-items:center;border:1px solid rgba(15,23,42,.08);border-radius:1rem;padding:.75rem;background:#fff;cursor:pointer}
.credit-due-item input{width:18px;height:18px}.credit-due-item strong{display:block}.credit-due-item small{display:block;color:#64748b}
.payment-row-clean input[type=file]{font-size:.9rem}.payment-row-clean{overflow:visible!important}.payment-summary.pro{grid-template-columns:repeat(4,minmax(160px,1fr));}
.help-tour-shade-pro{position:fixed;inset:0;background:rgba(15,23,42,.56);backdrop-filter:blur(3px);z-index:9000}.help-tour-card-pro{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);z-index:9010;width:min(560px,calc(100vw - 28px));background:#fff;border-radius:24px;padding:26px;box-shadow:0 40px 120px rgba(15,23,42,.32);border:1px solid rgba(15,23,42,.08)}.help-tour-card-pro .tour-count{display:inline-block;background:#fee2e2;color:#ef4444;border-radius:999px;padding:.32rem .7rem;font-weight:900;margin-bottom:1rem}.help-tour-card-pro h3{font-weight:900;margin-bottom:.7rem}.help-tour-card-pro p{font-size:1.08rem;color:#64748b}.help-tour-actions{display:flex;justify-content:space-between;gap:1rem;align-items:center;margin-top:1.5rem}.help-tour-actions .right{display:flex;gap:.6rem}
@media(max-width:700px){.payment-summary.pro{grid-template-columns:1fr}.payment-row-clean .row>[class*=col-]{margin-bottom:.35rem}.help-tour-actions{flex-direction:column;align-items:stretch}.help-tour-actions .right{justify-content:space-between}}
.help-tour-highlight-box{position:fixed;border:4px solid #facc15;border-radius:22px;box-shadow:0 0 0 9999px rgba(15,23,42,.45),0 20px 80px rgba(0,0,0,.28);z-index:9005;pointer-events:none;transition:all .18s ease}.help-tour-card-anchored{left:24px;top:24px;transform:none!important}.help-tour-shade-pro{background:rgba(15,23,42,.18)!important;backdrop-filter:blur(2px)}
@media(max-width:760px){.help-tour-card-anchored{left:14px!important;right:14px!important;top:auto!important;bottom:14px!important;width:auto!important}.help-tour-highlight-box{border-width:3px;border-radius:16px}}

/* Fase 42: cobro de cuotas y formularios más claros */
.credit-payment-card{border-radius:28px;background:#fff;box-shadow:0 20px 70px rgba(15,23,42,.06)}
.credit-payment-layout{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(320px,.65fr);gap:18px;align-items:start}
.credit-dues-list-pro{display:grid;gap:10px;max-height:410px;overflow:auto;padding-right:6px}
.credit-due-item-pro{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:14px;align-items:center;border:1px solid #e5e7eb;border-radius:20px;padding:14px 16px;background:#fff;cursor:pointer;transition:.18s ease}
.credit-due-item-pro:hover{border-color:#bfdbfe;box-shadow:0 12px 28px rgba(37,99,235,.08)}
.credit-due-item-pro.is-overdue{background:linear-gradient(135deg,#fff 0%,#fff7ed 100%);border-color:#fed7aa}
.credit-due-item-pro input{width:22px;height:22px}.credit-due-item-pro .due-main strong{display:block;font-size:1.02rem}.credit-due-item-pro .due-main small{display:block;color:#64748b;margin-top:2px}.credit-due-item-pro .due-total{text-align:right;white-space:nowrap}.credit-due-item-pro .due-total small{display:block;color:#64748b;font-size:.75rem}.credit-due-item-pro .due-total b{font-size:1.05rem;color:#0f172a}.credit-payment-box{border:1px solid #e5e7eb;border-radius:24px;padding:16px;background:linear-gradient(135deg,#fff,#f8fafc)}
@media(max-width:1200px){.credit-payment-layout{grid-template-columns:1fr}.credit-payment-box{position:static}}
@media(max-width:576px){.credit-due-item-pro{grid-template-columns:auto 1fr}.credit-due-item-pro .due-total{grid-column:2;text-align:left}.credit-payment-card .card-body{padding:16px!important}}
.supplier-payment-sticky .form-label i,.credit-payment-box .form-label i{font-size:1rem}.payment-readable-help{font-size:.82rem;color:#64748b;margin-top:4px}.btn-help-manual{border:1px solid #bfdbfe;background:#eff6ff;color:#1d4ed8}.btn-help-manual:hover{background:#dbeafe;color:#1e40af}

/* Fase 44: corrección de formularios de crédito y modales */
.credit-form-pro input,
.credit-form-pro select,
.credit-form-pro textarea,
.credit-form-pro button,
.credit-payment-box input,
.credit-payment-box select,
.credit-payment-box textarea,
.credit-pay-modal input,
.credit-pay-modal select,
.credit-pay-modal textarea{
  pointer-events:auto!important;
  opacity:1!important;
}
.credit-form-pro input:not([readonly]),
.credit-form-pro select,
.credit-form-pro textarea,
.credit-payment-box input:not([readonly]),
.credit-payment-box select,
.credit-payment-box textarea{
  background-color:#fff!important;
}
.credit-contract-card-pro{border-radius:1.75rem;background:rgba(255,255,255,.92);box-shadow:0 18px 48px rgba(15,23,42,.06)}
.credit-dues-list-pro{display:grid;gap:.85rem;max-height:55vh;overflow:auto;padding-right:.35rem}
.credit-due-item-pro{display:grid;grid-template-columns:auto 1fr auto;gap:1rem;align-items:center;border:1px solid #e5e7eb;border-radius:1.25rem;padding:1rem;background:#fff;cursor:pointer}
.credit-due-item-pro.is-overdue{border-color:#fdba74;background:#fff7ed}
.credit-due-item-pro input{width:1.25rem;height:1.25rem}.due-main small{display:block}.due-total{text-align:right}.due-total small{display:block;color:#64748b}.credit-payment-box{background:#fff;border:1px solid #e5e7eb;border-radius:1.5rem;padding:1.25rem;box-shadow:0 18px 45px rgba(15,23,42,.06)}

/* Fase 44 - creditos, cuotas, impresion y ayuda */
.credit-search-box .form-control{min-height:54px;font-weight:700;}
.customer-result-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:.75rem;}
.customer-result-card{border:1px solid #e5e7eb;background:#fff;border-radius:18px;padding:.9rem;text-align:left;display:flex;flex-direction:column;gap:.15rem;box-shadow:0 10px 28px rgba(15,23,42,.05);transition:.18s ease;}
.customer-result-card:hover{border-color:#ef4444;transform:translateY(-1px);box-shadow:0 14px 36px rgba(239,68,68,.12);}
.customer-result-card i{color:#ef4444;font-size:1.1rem;}
.customer-result-card strong{font-weight:900;color:#0f172a;}
.customer-result-card small{color:#64748b;}
.selected-customer-pill{display:inline-flex;align-items:center;gap:.45rem;background:#ecfdf5;border:1px solid #bbf7d0;color:#065f46;border-radius:999px;padding:.65rem 1rem;font-weight:800;}
.credit-unit-card{position:relative;}
.credit-unit-card input{position:absolute;top:16px;right:16px;transform:scale(1.2);}
.credit-unit-card input:checked ~ .credit-unit-card-body,.credit-unit-card:has(input:checked){border-color:#ef4444;background:#fff7f7;}
.credit-unit-card-body{display:flex;flex-direction:column;gap:.25rem;}
.credit-wizard-nav button.active{background:#fff1f2;border-color:#ef4444;color:#0f172a;box-shadow:0 12px 32px rgba(239,68,68,.10);}
.credit-wizard-nav button.active span{background:#ef4444;color:white;}
.credit-calc-box{background:linear-gradient(135deg,#f8fafc,#eef2ff);border-radius:22px;padding:1rem;display:grid;gap:.45rem;}
.credit-calc-box div{display:flex;justify-content:space-between;gap:1rem;align-items:center;}
.credit-calc-box span{color:#334155;}
.credit-calc-box strong{font-weight:900;color:#0f172a;}
.credit-calc-box .grand strong{font-size:1.15rem;color:#dc2626;}
.credit-internal-pill{border-radius:16px;background:#fff7ed;border:1px solid #fed7aa;padding:.85rem;color:#7c2d12;font-weight:800;}
.credit-payment-list{max-height:56vh;overflow:auto;padding-right:.35rem;}
.credit-payment-card{border:1px solid #e5e7eb;border-radius:20px;padding:1rem;background:#fff;box-shadow:0 12px 35px rgba(15,23,42,.05);}
.credit-payment-card.overdue{border-color:#fdba74;background:#fff7ed;}
.credit-payment-card .form-check-input{width:1.25rem;height:1.25rem;}
.credit-payment-modal .modal-dialog{max-width:1180px;}
.credit-payment-modal .modal-content{overflow:hidden;}
.credit-payment-panel{position:sticky;top:1rem;background:#fff;border:1px solid #e5e7eb;border-radius:22px;padding:1rem;box-shadow:0 20px 45px rgba(15,23,42,.08);}
.metric-mini{border:1px solid #e5e7eb;background:#fff;border-radius:18px;padding:.85rem;min-height:86px;}
.metric-mini span{display:block;color:#64748b;font-size:.85rem;}
.metric-mini strong{display:block;font-size:1.05rem;font-weight:900;color:#0f172a;}
.metric-mini small{display:block;color:#64748b;margin-top:.15rem;}
@media (max-width:991px){.credit-payment-panel{position:relative;top:auto}.credit-payment-modal .modal-dialog{max-width:96vw;margin:.75rem auto}.wizard-nav{grid-template-columns:1fr 1fr}.customer-result-grid{grid-template-columns:1fr}}
.credit-contract-card-pro{border-radius:26px;background:#fff;box-shadow:0 18px 45px rgba(15,23,42,.06);}
.credit-dues-list-pro{display:grid;gap:.75rem;max-height:58vh;overflow:auto;padding-right:.35rem;}
.credit-due-item-pro{display:grid;grid-template-columns:auto 1fr auto;gap:.8rem;align-items:center;border:1px solid #e5e7eb;border-radius:20px;background:#fff;padding:1rem;cursor:pointer;transition:.15s ease;}
.credit-due-item-pro:hover{border-color:#bfdbfe;background:#f8fbff;}
.credit-due-item-pro.is-overdue{border-color:#fed7aa;background:#fff7ed;}
.credit-due-item-pro input{width:1.25rem;height:1.25rem;}
.credit-due-item-pro .due-main{display:flex;flex-direction:column;gap:.2rem;}
.credit-due-item-pro .due-main strong{font-weight:900;color:#0f172a;}
.credit-due-item-pro .due-main small{color:#64748b;}
.credit-due-item-pro .due-total{text-align:right;white-space:nowrap;}
.credit-due-item-pro .due-total small{display:block;color:#64748b;font-size:.75rem;}
.credit-due-item-pro .due-total b{font-size:1.1rem;color:#0f172a;}
.credit-payment-box{background:#fff;border:1px solid #e5e7eb;border-radius:24px;padding:1rem;box-shadow:0 16px 40px rgba(15,23,42,.07);}
.credit-pay-modal{box-shadow:0 24px 80px rgba(15,23,42,.28);}
@media (max-width:767px){.credit-due-item-pro{grid-template-columns:auto 1fr}.credit-due-item-pro .due-total{grid-column:2;text-align:left}.credit-contract-card-pro .text-lg-end{text-align:left!important}}

/* Fase 45 - centro de ayuda, cobro de cuotas y reportes vencidos */
.help-center-modal .modal-footer{gap:.5rem;flex-wrap:wrap}.help-card{border:1px solid #e5e7eb;border-radius:22px;background:#fff;padding:1rem;cursor:pointer;transition:.18s ease;box-shadow:0 12px 35px rgba(15,23,42,.05)}.help-card:hover{border-color:#ef4444;transform:translateY(-1px);box-shadow:0 18px 45px rgba(239,68,68,.10)}.help-card i{font-size:1.4rem;color:#ef4444}.help-card strong{display:block;font-weight:900;margin-top:.4rem}.help-card small{display:block;color:#64748b;margin-top:.25rem}.credit-pay-filter-pro .input-group-pro{position:relative;z-index:1}.credit-payment-layout-clean{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(320px,.65fr);gap:1rem;align-items:start}.credit-payment-modal .modal-dialog{max-width:min(1220px,96vw)}.credit-payment-modal .modal-content{max-height:92vh}.credit-payment-modal .modal-body{overflow-y:auto;overflow-x:hidden}.credit-payment-modal .credit-payment-box{position:sticky;top:0}.credit-payment-modal .form-select,.credit-payment-modal .form-control{min-height:50px}.credit-payment-modal .form-label{font-weight:850;color:#334155}.credit-payment-modal .searchable-select-pro,.credit-payment-modal .searchable-dropdown{z-index:1090!important}.credit-contract-card-pro{overflow:hidden}.credit-contract-card-pro .btn{white-space:nowrap}.report-module-grid{overflow:visible;align-items:stretch}.report-module-card{min-height:92px}.report-card-pro .badge{font-weight:900}.topbar .dropdown-menu .dropdown-item{display:flex;align-items:center;gap:.25rem;padding:.72rem 1rem;font-weight:650}.topbar .dropdown-menu .dropdown-item i{min-width:18px}.help-tour-card-pro{z-index:10060!important}.help-tour-shade-pro{z-index:10040!important}.help-tour-highlight-box{z-index:10050!important}@media(max-width:991px){.credit-payment-layout-clean{grid-template-columns:1fr}.credit-payment-modal .credit-payment-box{position:static}.credit-payment-modal .modal-dialog{max-width:calc(100vw - 1rem);margin:.5rem}.credit-payment-modal .modal-body{padding-left:1rem;padding-right:1rem}.credit-payment-modal .modal-header,.credit-payment-modal .modal-footer{padding-left:1rem;padding-right:1rem}}@media(max-width:576px){.credit-pay-filter-pro .row>[class*=col-]{width:100%}.credit-payment-modal .modal-content{border-radius:1.25rem!important}.credit-due-item-pro{grid-template-columns:auto 1fr}.credit-due-item-pro .due-total{grid-column:2;text-align:left}.help-center-modal .modal-footer .btn{width:100%}}

/* =========================================================
   Fase 46 - Correcciones crédito, motos y taller
   ========================================================= */
.credit-create-phase46 .money-field{
  display:grid!important;
  grid-template-columns:42px minmax(0,1fr)!important;
  align-items:center!important;
  min-height:52px!important;
  border:1px solid #dbe3ee!important;
  border-radius:1rem!important;
  background:#fff!important;
  overflow:hidden!important;
  box-shadow:none!important;
}
.credit-create-phase46 .money-field span{
  height:100%;
  min-height:50px;
  display:grid;
  place-items:center;
  color:#94a3b8;
  font-weight:900;
  background:#f8fafc;
  border-right:1px solid #edf2f7;
}
.credit-create-phase46 .money-field input{
  width:100%!important;
  min-width:0!important;
  height:50px!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
  padding:.65rem .9rem!important;
  font-weight:700;
  color:#0f172a!important;
  opacity:1!important;
  pointer-events:auto!important;
}
.credit-create-phase46 .money-field.is-readonly input{background:#f8fafc!important;color:#334155!important;}
.credit-create-phase46 .field-icon-input{min-height:52px!important;}
.credit-create-phase46 .field-icon-input .form-control,
.credit-create-phase46 .field-icon-input input{
  min-height:48px!important;
  opacity:1!important;
  pointer-events:auto!important;
}
.credit-create-phase46 .credit-summary-panel{overflow:visible!important;}
.credit-create-phase46 .credit-finance-panel{overflow:visible!important;}
.credit-create-phase46 .form-control:disabled,
.credit-create-phase46 .form-select:disabled{opacity:.72!important;}
.credit-create-phase46 input[type="number"]::-webkit-inner-spin-button,
.credit-create-phase46 input[type="number"]::-webkit-outer-spin-button{opacity:.65;}
.credit-create-phase46 .customer-result-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:.7rem;}
.credit-create-phase46 .customer-result-card{border:1px solid #e5e7eb;border-radius:1rem;background:#fff;padding:.85rem;text-align:left;display:grid;grid-template-columns:32px 1fr;gap:.4rem .65rem;align-items:center;box-shadow:0 10px 24px rgba(15,23,42,.045);}
.credit-create-phase46 .customer-result-card:hover{border-color:#ef4444;box-shadow:0 18px 38px rgba(239,68,68,.12);}
.credit-create-phase46 .customer-result-card i{grid-row:span 2;color:#ef4444;font-size:1.25rem;}
.credit-create-phase46 .customer-result-card strong{font-weight:900;line-height:1.2;}
.credit-create-phase46 .customer-result-card small{color:#64748b;line-height:1.25;}
.selected-customer-pill{display:inline-flex;align-items:center;gap:.45rem;border-radius:999px;background:#ecfdf5;color:#047857;padding:.55rem .85rem;font-weight:800;}
.credit-unit-card{min-height:172px;}
.credit-unit-card .badge{width:max-content;}
@media(max-width:1199px){.credit-create-phase46 .supplier-payment-sticky{position:static!important;}.credit-create-phase46 .wizard-actions{position:sticky;bottom:0}}
@media(max-width:768px){.credit-create-phase46 .credit-wizard-nav{grid-template-columns:1fr!important}.credit-create-phase46 .customer-result-grid{grid-template-columns:1fr}.credit-create-phase46 .money-field{min-height:48px!important}.credit-create-phase46 .money-field input{height:46px!important}}

/* Taller: evita selects abiertos montados y líneas dinámicas desalineadas */
.service-order-form-pro .wizard-panel,
.service-order-form-pro .dynamic-row-pro{overflow:visible!important;}
.service-order-form-pro .searchable-dropdown{z-index:1500!important;}

/* Motos: lista de modelos y proveedor sin duplicados visuales */
.motorcycle-form-pro .searchable-dropdown{z-index:1200!important;max-width:min(760px,92vw);}
.motorcycle-form-pro .form-label i{color:#ef4444;}

/* Fase 49B - referencias directas de clientes */
.customer-reference-section{background:#f8fafc;border:1px solid #e5e7eb;border-radius:22px;padding:18px}.reference-card{background:#fff;border:1px solid #e5e7eb;border-radius:18px;padding:14px;box-shadow:0 8px 24px rgba(15,23,42,.04)}.reference-card.friendship{background:#fffdf8}@media(max-width:767px){.customer-reference-section{padding:12px}.reference-card{padding:12px}}

/* =========================================================
   Fase 50 - expediente, referencias, análisis de crédito y UX
   ========================================================= */
.customer-contact-cell{display:grid;gap:.25rem}.customer-contact-actions{display:flex;gap:.35rem;align-items:center}.customer-contact-actions .btn{width:30px;height:30px;padding:0;display:grid;place-items:center}.customer-ref-badge{display:inline-flex;align-items:center;gap:.3rem;border-radius:999px;padding:.25rem .55rem;font-size:.75rem;font-weight:850;margin-top:.25rem}.customer-ref-badge.ok{background:#ecfdf5;color:#047857}.customer-ref-badge.warn{background:#fff7ed;color:#c2410c}.customer-dossier-modal .modal-dialog{max-width:min(1180px,96vw)}.dossier-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.75rem}.dossier-summary-grid>div{border:1px solid #e5e7eb;background:#fff;border-radius:18px;padding:1rem;box-shadow:0 10px 28px rgba(15,23,42,.045)}.dossier-summary-grid span,.dossier-address span{display:block;color:#64748b;font-size:.8rem}.dossier-summary-grid strong{display:block;color:#0f172a;font-weight:900;margin-top:.2rem}.dossier-contact-actions,.credit-contact-actions{display:flex;gap:.4rem;flex-wrap:wrap;margin-top:.5rem}.dossier-credit-analysis{display:flex;justify-content:space-between;align-items:center;gap:1rem;border-radius:22px;padding:1rem 1.15rem;margin-top:1rem;border:1px solid}.dossier-credit-analysis.ready{background:#ecfdf5;border-color:#a7f3d0}.dossier-credit-analysis.pending{background:#fff7ed;border-color:#fed7aa}.dossier-credit-analysis h5{margin:.15rem 0;font-weight:900}.dossier-credit-analysis p{margin:0;color:#64748b}.dossier-score,.credit-reference-score{min-width:94px;border-radius:18px;padding:.65rem;text-align:center;background:#fff}.dossier-score strong,.credit-reference-score strong{display:block;font-size:1.35rem;font-weight:950}.dossier-score span,.credit-reference-score span{display:block;color:#64748b;font-size:.75rem}.dossier-ref-grid,.credit-reference-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem;margin-top:1rem}.dossier-ref-card,.credit-ref-row{border:1px solid #e5e7eb;border-radius:18px;padding:.9rem;background:#fff;display:flex;justify-content:space-between;gap:.8rem;align-items:center}.dossier-ref-card.ok,.credit-ref-row.is-ok{border-color:#bbf7d0;background:#f8fffb}.dossier-ref-card.missing,.credit-ref-row.is-missing{border-color:#fed7aa;background:#fffaf4}.dossier-ref-card small,.credit-ref-row small{display:block;color:#64748b}.dossier-ref-card strong,.credit-ref-row strong{display:block;font-weight:900}.dossier-ref-card span,.credit-ref-row span{display:block;color:#475569;font-size:.85rem}.dossier-ref-card em,.credit-ref-row em{font-style:normal;color:#c2410c;font-weight:800;font-size:.78rem}.dossier-address{display:flex;gap:.75rem;align-items:flex-start;border:1px dashed #cbd5e1;border-radius:18px;padding:1rem;margin-top:1rem}.dossier-address i{color:#ef4444;font-size:1.2rem}.credit-customer-analysis{border:1px solid #e5e7eb;border-radius:22px;padding:1rem;background:linear-gradient(135deg,#fff,#f8fafc)}.credit-analysis-head{display:flex;justify-content:space-between;gap:1rem;align-items:center}.credit-analysis-head h5{font-weight:900;margin:.15rem 0}.credit-analysis-head p{color:#64748b;margin:0}.credit-reference-score.ok{border:1px solid #a7f3d0;color:#047857}.credit-reference-score.warn{border:1px solid #fed7aa;color:#c2410c}.credit-analysis-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.65rem;margin-top:.85rem}.credit-analysis-metrics>div{border:1px solid #e5e7eb;border-radius:16px;padding:.75rem;background:#fff}.credit-analysis-metrics span{display:block;color:#64748b;font-size:.78rem}.credit-analysis-metrics strong{display:block;font-weight:900;margin-top:.15rem}
@media(max-width:991px){.dossier-summary-grid{grid-template-columns:1fr 1fr}.credit-analysis-metrics{grid-template-columns:1fr}.dossier-ref-grid,.credit-reference-grid{grid-template-columns:1fr}}@media(max-width:576px){.dossier-summary-grid{grid-template-columns:1fr}.dossier-credit-analysis,.credit-analysis-head{align-items:flex-start}.dossier-ref-card,.credit-ref-row{align-items:flex-start;flex-direction:column}.dossier-score,.credit-reference-score{min-width:82px}}

/* =========================================================
   Fase 51 - Cobranza, alertas y WhatsApp
   ========================================================= */
.collection-page-head{display:flex;justify-content:space-between;align-items:flex-end;gap:1rem}.collection-kpi-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:1rem}.collection-kpi{position:relative;min-height:120px;padding:1rem 1.05rem;border:1px solid #e5e7eb;border-radius:22px;background:#fff;color:#0f172a;text-decoration:none;box-shadow:0 14px 34px rgba(15,23,42,.055);overflow:hidden}.collection-kpi:hover{transform:translateY(-1px);color:#0f172a}.collection-kpi span{display:block;color:#64748b;font-size:.82rem;font-weight:750;max-width:80%}.collection-kpi strong{display:block;font-size:1.45rem;font-weight:950;margin-top:.35rem}.collection-kpi>i{position:absolute;right:1rem;top:1rem;width:38px;height:38px;border-radius:14px;display:grid;place-items:center;background:#f8fafc;font-size:1.05rem}.collection-kpi.is-today{border-color:#fde68a}.collection-kpi.is-today>i{background:#fffbeb;color:#b45309}.collection-kpi.is-overdue{border-color:#fed7aa}.collection-kpi.is-overdue>i{background:#fff7ed;color:#c2410c}.collection-kpi.is-late{border-color:#fecaca}.collection-kpi.is-late>i{background:#fef2f2;color:#dc2626}.collection-kpi.is-critical{border-color:#fda4af}.collection-kpi.is-critical>i{background:#fff1f2;color:#be123c}.collection-kpi.is-money{background:linear-gradient(135deg,#0f172a,#1f2937);border-color:#0f172a;color:#fff}.collection-kpi.is-money span{color:#cbd5e1}.collection-kpi.is-money>i{background:rgba(255,255,255,.12);color:#fff}.collection-filter{overflow:visible!important}.collection-list{position:relative}.collection-credit-card{position:relative;display:grid;grid-template-columns:6px minmax(225px,1.25fr) minmax(220px,1fr) minmax(200px,.9fr) minmax(270px,1.25fr);gap:1.1rem;align-items:center;background:#fff;border:1px solid #e5e7eb;border-radius:24px;padding:1.05rem 1.15rem 1.05rem .7rem;box-shadow:0 15px 38px rgba(15,23,42,.05);overflow:hidden}.collection-priority-rail{align-self:stretch;border-radius:999px;background:#cbd5e1;min-height:110px}.collection-credit-card.severity-upcoming .collection-priority-rail{background:#38bdf8}.collection-credit-card.severity-today .collection-priority-rail{background:#f59e0b}.collection-credit-card.severity-overdue .collection-priority-rail{background:#fb923c}.collection-credit-card.severity-late .collection-priority-rail{background:#ef4444}.collection-credit-card.severity-critical .collection-priority-rail{background:#be123c}.collection-client h4{font-size:1.12rem;line-height:1.18}.collection-contact-line{display:flex;align-items:center;gap:.4rem;margin-top:.45rem;color:#475569;font-weight:750}.collection-credit-meta{display:grid;gap:.16rem}.collection-credit-meta small,.collection-risk small,.collection-balance-actions>small{color:#64748b;font-size:.77rem}.collection-credit-meta strong{font-weight:900;line-height:1.18}.collection-credit-meta span{color:#64748b;font-size:.78rem;margin-bottom:.35rem}.collection-risk{display:grid;gap:.45rem}.collection-risk>div{display:flex;justify-content:space-between;gap:.6rem;align-items:baseline}.collection-risk>div strong{font-weight:950}.collection-risk-badge{display:inline-flex;width:max-content;max-width:100%;align-items:center;border-radius:999px;padding:.35rem .62rem;background:#fff1f2;color:#be123c;font-weight:850;font-size:.75rem}.collection-risk-badge.is-today{background:#fffbeb;color:#b45309}.collection-risk-badge.is-upcoming{background:#eff6ff;color:#1d4ed8}.collection-balance-actions{display:grid;justify-items:end;gap:.25rem}.collection-balance{font-size:1.42rem;font-weight:950;color:#ef4444;line-height:1.1}.collection-actions{display:flex;justify-content:flex-end;gap:.35rem;flex-wrap:wrap;margin-top:.35rem}.collection-actions .btn{display:inline-flex;align-items:center;gap:.3rem}.collection-last-action{display:flex;align-items:flex-start;justify-content:flex-end;gap:.35rem;color:#64748b;font-size:.72rem;text-align:right;margin-top:.3rem}.collection-history-card{border-radius:24px!important}.collection-history-card .table{min-width:820px}#collectionWhatsappModal .modal-content,#collectionActionModal .modal-content,#collectionTemplatesModal .modal-content{box-shadow:0 35px 90px rgba(15,23,42,.22)}#collectionWhatsappModal textarea,#collectionTemplatesModal textarea{line-height:1.45}#collectionWhatsappModal .modal-dialog,#collectionActionModal .modal-dialog{max-width:min(760px,94vw)}#collectionTemplatesModal .modal-dialog{max-width:min(1180px,96vw)}
@media(max-width:1399px){.collection-kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.collection-credit-card{grid-template-columns:6px minmax(220px,1.15fr) minmax(210px,1fr) minmax(220px,1fr)}.collection-risk{grid-column:3}.collection-balance-actions{grid-column:4}.collection-credit-meta{grid-column:2}}
@media(max-width:991px){.collection-page-head{align-items:flex-start;flex-direction:column}.collection-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.collection-credit-card{grid-template-columns:6px 1fr 1fr;align-items:start}.collection-client{grid-column:2}.collection-credit-meta{grid-column:3}.collection-risk{grid-column:2}.collection-balance-actions{grid-column:3;justify-items:start}.collection-actions,.collection-last-action{justify-content:flex-start;text-align:left}}
@media(max-width:640px){.collection-kpi-grid{grid-template-columns:1fr}.collection-kpi{min-height:100px}.collection-credit-card{grid-template-columns:5px minmax(0,1fr);padding:.9rem}.collection-priority-rail{grid-row:1/5}.collection-client,.collection-credit-meta,.collection-risk,.collection-balance-actions{grid-column:2}.collection-balance-actions{justify-items:start}.collection-actions{width:100%}.collection-actions .btn{flex:1 1 auto;justify-content:center}.collection-filter .btn{min-height:48px}#collectionWhatsappModal .modal-dialog,#collectionActionModal .modal-dialog{margin:.65rem;max-width:none}#collectionWhatsappModal .modal-body,#collectionActionModal .modal-body{padding:1rem!important}}
