﻿:root {
  --ink: #181c32;
  --muted: #7e8299;
  --line: #e4e6ef;
  --soft: #f5f8fa;
  --panel: #ffffff;
  --sidebar: #1e1e2d;
  --sidebar-soft: #2b2b40;
  --primary: #009ef7;
  --primary-dark: #0b78b6;
  --success: #50cd89;
  --warning: #ffc700;
  --danger: #f1416c;
  --info: #7239ea;
  --shadow: 0 10px 30px rgba(82, 63, 105, 0.06);
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body { margin: 0; min-height: 100%; font-family: Inter, Arial, Helvetica, sans-serif; color: var(--ink); background: var(--soft); font-size: 14px; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 265px minmax(0, 1fr); }
.app-sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--sidebar); color: #f5f8fa; padding: 18px 14px; }
.app-brand { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 0 10px 18px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.app-brand strong { display: block; font-size: 18px; letter-spacing: 0; }
.app-brand small { display: block; color: #9d9da6; font-size: 12px; margin-top: 2px; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 8px; background: #009ef7; color: #fff; font-weight: 800; }
.side-nav { display: grid; gap: 4px; padding: 18px 0; }
.side-nav a { min-height: 44px; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 6px; color: #9d9da6; font-weight: 600; }
.side-nav a:hover, .side-nav a.is-active { color: #fff; background: var(--sidebar-soft); }
.sidebar-status { margin-top: auto; display: grid; gap: 8px; padding: 14px; border-radius: 8px; background: rgba(255,255,255,0.05); }
.sidebar-status strong { color: #fff; }
.sidebar-status small { color: #9d9da6; }
.app-main { min-width: 0; }
.topbar { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 28px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.topbar h1 { margin: 0; font-size: 22px; line-height: 1.2; }
.topbar-kicker { margin: 0 0 3px; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; }
.topbar-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.page { padding: 26px 28px 36px; display: grid; gap: 22px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); padding: 22px; min-width: 0; }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.card-header h2 { margin: 0; font-size: 17px; }
.card-header p { margin: 4px 0 0; color: var(--muted); }
.content-grid, .quote-page { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; align-items: start; }
.card-span-2 { grid-column: span 2; }
.metrics-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.metric-card { display: flex; align-items: center; gap: 15px; padding: 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); box-shadow: var(--shadow); }
.metric-card small, .metric-card span { color: var(--muted); }
.metric-card small { display: block; font-weight: 700; text-transform: uppercase; font-size: 11px; }
.metric-card strong { display: block; margin: 4px 0; font-size: 28px; line-height: 1; }
.metric-icon { width: 46px; height: 46px; border-radius: 8px; display: grid; place-items: center; background: #eef6ff; color: var(--primary); flex: 0 0 auto; }

.btn, .icon-button { border: 1px solid transparent; border-radius: 6px; background: #fff; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 9px 14px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.btn-light { background: #f5f8fa; color: #3f4254; border-color: #f1f1f4; }
.btn-primary, .icon-button.primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-light-danger { background: #fff5f8; color: var(--danger); border-color: #ffe2ea; }
.btn:hover, .icon-button:hover { filter: brightness(0.98); }
.icon-button { width: 38px; padding: 0; }
.w-100 { width: 100%; }
.counter { min-width: 22px; height: 22px; display: inline-grid; place-items: center; padding: 0 6px; border-radius: 999px; background: var(--primary); color: #fff; font-size: 12px; }
.counter.is-muted { background: #e4e6ef; color: #7e8299; }
.counter.has-items { background: var(--danger); color: #fff; }
.badge { display: inline-flex; align-items: center; justify-content: center; min-height: 24px; padding: 4px 9px; border-radius: 6px; font-size: 12px; font-weight: 800; line-height: 1; white-space: nowrap; }
.badge-light { background: #f5f8fa; color: #7e8299; }
.badge-primary { background: #eef6ff; color: var(--primary-dark); }
.badge-info { background: #f8f5ff; color: var(--info); }
.badge-success { background: #e8fff3; color: #0f8f57; }
.badge-warning { background: #fff8dd; color: #a97800; }

.icon { width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; color: currentColor; flex: 0 0 auto; }
.icon::before { content: ""; width: 18px; height: 18px; display: block; background: currentColor; -webkit-mask: var(--icon-url) center / contain no-repeat; mask: var(--icon-url) center / contain no-repeat; }
.metric-icon.icon { width: 46px; height: 46px; }
.metric-icon.icon::before { width: 22px; height: 22px; }
.icon-button .icon::before, .mobile-menu .icon::before { width: 19px; height: 19px; }
.icon-speedometer { --icon-url: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 14l4-4'/%3E%3Cpath d='M3.34 19a10 10 0 1 1 17.32 0'/%3E%3Cpath d='M12 20a2 2 0 0 0 2-2 2 2 0 1 0-4 0 2 2 0 0 0 2 2Z'/%3E%3C/svg%3E"); }
.icon-boxes { --icon-url: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z'/%3E%3Cpath d='m3.3 7 8.7 5 8.7-5'/%3E%3Cpath d='M12 22V12'/%3E%3C/svg%3E"); }
.icon-quote { --icon-url: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 2v4'/%3E%3Cpath d='M16 2v4'/%3E%3Crect x='4' y='4' width='16' height='18' rx='2'/%3E%3Cpath d='M8 10h8'/%3E%3Cpath d='M8 14h6'/%3E%3Cpath d='M8 18h4'/%3E%3C/svg%3E"); }
.icon-user { --icon-url: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M20 21a8 8 0 0 0-16 0'/%3E%3C/svg%3E"); }
.icon-menu { --icon-url: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 6h16'/%3E%3Cpath d='M4 12h16'/%3E%3Cpath d='M4 18h16'/%3E%3C/svg%3E"); }
.icon-logout { --icon-url: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4'/%3E%3Cpath d='M16 17l5-5-5-5'/%3E%3Cpath d='M21 12H9'/%3E%3C/svg%3E"); }
.icon-search { --icon-url: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E"); }
.icon-tag { --icon-url: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.6 13.1 13.1 20.6a2 2 0 0 1-2.8 0L3 13.3V3h10.3l7.3 7.3a2 2 0 0 1 0 2.8Z'/%3E%3Ccircle cx='7.5' cy='7.5' r='1.5'/%3E%3C/svg%3E"); }
.icon-shield { --icon-url: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10Z'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E"); }
.icon-arrow-right { --icon-url: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m13 6 6 6-6 6'/%3E%3C/svg%3E"); }
.icon-arrow-left { --icon-url: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12H5'/%3E%3Cpath d='m11 18-6-6 6-6'/%3E%3C/svg%3E"); }
.icon-eye { --icon-url: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E"); }
.icon-plus { --icon-url: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 5v14'/%3E%3Cpath d='M5 12h14'/%3E%3C/svg%3E"); }
.icon-minus { --icon-url: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M5 12h14'/%3E%3C/svg%3E"); }
.icon-filter { --icon-url: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 5h18'/%3E%3Cpath d='M6 12h12'/%3E%3Cpath d='M10 19h4'/%3E%3C/svg%3E"); }
.icon-refresh { --icon-url: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a9 9 0 0 1-15 6.7L3 16'/%3E%3Cpath d='M3 21v-5h5'/%3E%3Cpath d='M3 12A9 9 0 0 1 18 5.3L21 8'/%3E%3Cpath d='M21 3v5h-5'/%3E%3C/svg%3E"); }
.icon-send { --icon-url: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m22 2-7 20-4-9-9-4Z'/%3E%3Cpath d='M22 2 11 13'/%3E%3C/svg%3E"); }
.icon-login { --icon-url: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4'/%3E%3Cpath d='m10 17 5-5-5-5'/%3E%3Cpath d='M15 12H3'/%3E%3C/svg%3E"); }
.icon-star { --icon-url: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m12 2 3 6 6.5.9-4.7 4.6 1.1 6.5L12 17l-5.9 3 1.1-6.5L2.5 8.9 9 8Z'/%3E%3C/svg%3E"); }
.icon-bell { --icon-url: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.3 21a2 2 0 0 0 3.4 0'/%3E%3Cpath d='M18 8A6 6 0 0 0 6 8c0 7-3 7-3 9h18c0-2-3-2-3-9'/%3E%3C/svg%3E"); }

.toolbar-form { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(160px, 220px) minmax(150px, 200px) minmax(130px, 170px) auto; gap: 12px; align-items: center; }
.search-control { position: relative; }
.search-control .icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }
input, select, textarea { width: 100%; min-height: 42px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); padding: 10px 12px; outline: none; }
.search-control input { padding-left: 38px; }
textarea { resize: vertical; line-height: 1.4; }
.field-block { display: grid; gap: 7px; color: #3f4254; font-weight: 700; }
.form-grid { display: grid; gap: 14px; }
.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.full { grid-column: 1 / -1; }
.form-section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-top: 8px; border-top: 1px dashed var(--line); }
.form-section-title strong { font-size: 13px; text-transform: uppercase; color: #3f4254; }
.form-section-title span { color: var(--muted); font-size: 12px; font-weight: 700; }

.table-responsive { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; min-width: 820px; }
.data-table th { color: var(--muted); text-transform: uppercase; font-size: 11px; text-align: left; letter-spacing: 0; padding: 12px 10px; border-bottom: 1px dashed var(--line); }
.data-table td { padding: 14px 10px; border-bottom: 1px dashed var(--line); vertical-align: middle; }
.data-table tbody tr:hover { background: #fbfcfd; }
.text-end { text-align: right !important; }
.fw-bold { font-weight: 800; }
.muted { color: var(--muted); }
.empty-row { padding: 22px !important; text-align: center; color: var(--muted); }
.product-cell { display: flex; align-items: center; gap: 12px; min-width: 280px; }
.product-cell img, .thumb-placeholder { width: 50px; height: 50px; border-radius: 8px; border: 1px solid var(--line); object-fit: cover; background: #f5f8fa; flex: 0 0 auto; display: grid; place-items: center; color: var(--muted); }
.product-cell strong, .product-cell small { display: block; }
.product-cell small { color: var(--muted); margin-top: 3px; }
.table-actions { white-space: nowrap; }
.table-actions .icon-button + .icon-button { margin-left: 6px; }
.segmented { display: inline-flex; padding: 4px; border: 1px solid var(--line); border-radius: 8px; background: #f5f8fa; }
.segmented button { border: 0; border-radius: 6px; min-height: 30px; padding: 6px 12px; background: transparent; color: var(--muted); font-weight: 800; cursor: pointer; }
.segmented button.is-active { background: #fff; color: var(--primary-dark); box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.catalog-card-view { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.product-card { border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow: hidden; }
.product-image { width: 100%; aspect-ratio: 4 / 3; display: block; object-fit: cover; background: #f5f8fa; }
.product-image.placeholder { display: grid; place-items: center; color: var(--muted); }
.product-card-body { padding: 16px; }
.product-card h3 { margin: 12px 0 6px; font-size: 16px; }
.product-card p { min-height: 34px; margin: 0; color: var(--muted); }
.product-tags, .actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.price-line, .detail-price { margin: 14px 0; color: var(--primary-dark); font-weight: 900; font-size: 20px; }
.is-hidden { display: none !important; }

.product-detail-shell { display: grid; grid-template-columns: minmax(280px, 420px) minmax(0, 1fr); gap: 22px; align-items: start; }
.media-panel { padding: 16px; }
.product-detail-image { width: 100%; aspect-ratio: 4 / 3; border-radius: 8px; border: 1px solid var(--line); object-fit: cover; background: #f5f8fa; display: grid; place-items: center; color: var(--muted); }
.thumbnail-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 12px; }
.thumbnail-row img { width: 100%; aspect-ratio: 1; border: 1px solid var(--line); border-radius: 6px; object-fit: cover; }
.product-info-panel h2 { margin: 12px 0 4px; font-size: 26px; }
.info-strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.info-strip div { border: 1px dashed var(--line); border-radius: 8px; padding: 12px; }
.info-strip small, .key-value-list span { display: block; color: var(--muted); font-size: 12px; font-weight: 700; }
.info-strip strong, .key-value-list strong { display: block; margin-top: 4px; }
.key-value-list { display: grid; gap: 10px; }
.key-value-list div { display: flex; justify-content: space-between; gap: 14px; padding-bottom: 10px; border-bottom: 1px dashed var(--line); }

.action-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.action-tile { min-height: 128px; display: grid; align-content: start; gap: 8px; padding: 16px; border: 1px dashed var(--line); border-radius: 8px; background: #fbfcfd; }
.action-tile .icon { color: var(--primary); font-size: 20px; }
.action-tile small { color: var(--muted); }
.status-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.status-list li { display: flex; align-items: center; gap: 10px; color: #3f4254; }
.status-list.compact { margin-top: 16px; gap: 8px; }

.quote-page { grid-template-columns: minmax(0, 1fr) 320px; }
.quote-summary { position: sticky; top: 96px; }
.summary-list { display: grid; gap: 12px; margin: 0; }
.summary-list div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed var(--line); padding-bottom: 12px; }
.summary-list dt { color: var(--muted); }
.summary-list dd { margin: 0; font-weight: 900; }
.summary-actions { display: grid; gap: 10px; margin-top: 18px; }
.quote-table { min-width: 760px; }
.qty-stepper { display: inline-grid; grid-template-columns: 34px 64px 34px; align-items: center; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.qty-stepper button { height: 34px; border: 0; background: #f5f8fa; cursor: pointer; font-weight: 900; }
.qty-stepper input { min-height: 34px; height: 34px; padding: 0; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); border-radius: 0; text-align: center; font-weight: 800; }
.line-muted { display: block; color: var(--muted); margin-top: 3px; font-size: 12px; }

.auth-page { min-height: 100vh; background: #f5f8fa; }
.auth-root { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, 1fr) minmax(380px, 640px); }
.auth-brand-panel { min-height: 100vh; display: flex; flex-direction: column; justify-content: space-between; padding: 42px; color: #fff; background: linear-gradient(135deg, rgba(24, 28, 50, 0.92), rgba(0, 80, 125, 0.84)), url('../media/autenticacion/portal-distribucion.jpg'); background-size: cover; background-position: center; }
.auth-brand { display: inline-flex; align-items: center; gap: 12px; color: #fff; }
.auth-brand strong { display: block; font-size: 20px; }
.auth-brand small { display: block; color: rgba(255,255,255,0.72); margin-top: 2px; }
.auth-visual-copy { max-width: 520px; }
.auth-visual-copy h1 { margin: 18px 0 12px; font-size: 44px; line-height: 1.05; }
.auth-visual-copy p { margin: 0; color: rgba(255,255,255,0.78); font-size: 16px; line-height: 1.6; }
.auth-form-panel { min-height: 100vh; display: grid; place-items: center; padding: 32px; }
.auth-card-standalone { width: min(100%, 460px); box-shadow: 0 18px 45px rgba(82, 63, 105, 0.09); }
.auth-card-wide { width: min(100%, 620px); }
.auth-secondary-action { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); color: var(--muted); font-weight: 700; }
.auth-secondary-action a { color: var(--primary-dark); }
.auth-status-block { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); }
.auth-status-block h3 { margin: 0 0 12px; font-size: 14px; text-transform: uppercase; color: #3f4254; }
.registro-confirmacion { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; padding: 18px; border: 1px solid #c9f7df; border-radius: 8px; background: #f3fff8; }
.registro-confirmacion h3 { margin: 0 0 6px; font-size: 20px; }
.registro-confirmacion p { margin: 0; color: #3f4254; line-height: 1.55; }
.confirmation-folio { display: inline-grid; gap: 4px; margin: 14px 0 2px; padding: 10px 12px; border: 1px dashed #98e8bf; border-radius: 8px; background: #fff; }
.confirmation-folio span { color: var(--muted); font-size: 11px; font-weight: 900; text-transform: uppercase; }
.confirmation-folio strong { color: #0f6f46; font-size: 18px; }
.registro-secondary-link { display: inline-flex; margin-top: 12px; color: var(--primary-dark); font-weight: 800; }
.password-rule-list { display: grid; gap: 7px; padding: 12px; border: 1px dashed var(--line); border-radius: 8px; background: #fbfcfd; color: var(--muted); font-size: 12px; font-weight: 700; line-height: 1.4; }
.auth-shell { display: grid; grid-template-columns: minmax(320px, 560px) minmax(260px, 360px); justify-content: center; gap: 22px; align-items: start; }
.auth-card, .auth-side { width: 100%; }
.permission-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.alert { border: 1px solid #ffe2b8; border-radius: 8px; padding: 12px 14px; background: #fff8dd; color: #7a5200; margin-bottom: 14px; }
.alert-success { border-color: #c9f7df; background: #e8fff3; color: #0f6f46; }
.alert-warning { border-color: #ffe2b8; background: #fff8dd; color: #7a5200; }
.mobile-menu { display: none; }

.module-state-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.module-state { display: grid; gap: 8px; align-content: start; min-height: 128px; padding: 14px; border: 1px dashed var(--line); border-radius: 8px; background: #fbfcfd; }
.module-state strong { font-size: 15px; }
.module-state small { color: var(--muted); line-height: 1.4; }
.access-state { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border: 1px dashed var(--line); border-radius: 8px; background: #fbfcfd; margin-bottom: 14px; }
.access-state strong { display: block; margin-bottom: 4px; font-size: 16px; }
.access-state p { margin: 0; color: var(--muted); line-height: 1.5; }
.permission-note { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); margin-bottom: 14px; }
.permission-note span { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.permission-note strong { word-break: break-word; text-align: right; }
@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 1fr; }
  .app-sidebar { position: fixed; inset: 0 auto 0 0; width: 265px; z-index: 30; transform: translateX(-100%); transition: transform .2s ease; }
  body.sidebar-open .app-sidebar { transform: translateX(0); }
  .mobile-menu { display: inline-flex; }
  .content-grid, .metrics-grid, .quote-page, .product-detail-shell, .auth-shell, .auth-root, .module-state-grid { grid-template-columns: 1fr; }
  .auth-brand-panel { min-height: 320px; }
  .auth-form-panel { min-height: auto; }
  .card-span-2 { grid-column: auto; }
  .toolbar-form { grid-template-columns: 1fr 1fr; }
  .quote-summary { position: static; }
}

@media (max-width: 720px) {
  .topbar { align-items: flex-start; flex-wrap: wrap; gap: 10px; padding: 14px 16px; }
  .topbar > div:not(.topbar-actions) { flex: 1 1 0; min-width: 0; }
  .topbar h1 { font-size: 20px; word-break: break-word; }
  .topbar-actions { order: 3; width: 100%; flex-wrap: wrap; justify-content: flex-start; }
  .topbar-actions .btn { flex: 1 1 150px; }
  .page { padding: 18px 14px 28px; }
  .card { padding: 16px; }
  .card-header { align-items: flex-start; flex-direction: column; }
  .toolbar-form, .two-columns, .action-board, .info-strip, .registro-confirmacion { grid-template-columns: 1fr; }
  .auth-brand-panel { padding: 28px; }
  .auth-visual-copy h1 { font-size: 32px; }
  .auth-form-panel { padding: 18px; }
  .auth-secondary-action { align-items: flex-start; flex-direction: column; }
  .btn { white-space: normal; }
}

@media (max-width: 560px) {
  .auth-brand-panel { min-height: auto; padding: 18px; }
  .auth-visual-copy { display: none; }
  .auth-form-panel { padding: 14px; }
}
/* Catalogo visual modulo 03 */
.badge-danger { background: #fff5f8; color: var(--danger); }
.catalog-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 22px; align-items: start; }
.catalog-main { min-width: 0; display: grid; gap: 18px; }
.filter-panel { position: sticky; top: 96px; }
.card-header.compact { margin-bottom: 12px; }
.filter-form { display: grid; gap: 13px; }
.facet-block { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 16px; margin-top: 16px; border-top: 1px dashed var(--line); }
.facet-block h3 { width: 100%; margin: 0 0 2px; font-size: 13px; text-transform: uppercase; color: #3f4254; }
.facet-chip { display: inline-flex; align-items: center; min-height: 28px; padding: 5px 9px; border-radius: 6px; background: #eef6ff; color: var(--primary-dark); font-size: 12px; font-weight: 800; }
.muted-chip { background: #f5f8fa; color: #5e6278; }
.facet-note { display: block; width: 100%; color: var(--muted); line-height: 1.4; }
.header-tools { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.product-card-final { display: grid; grid-template-rows: auto 1fr; min-height: 100%; }
.product-media { display: grid; place-items: center; aspect-ratio: 4 / 3; background: #f5f8fa; color: var(--muted); border-bottom: 1px solid var(--line); }
.product-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-meta-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.product-meta-row span { min-height: 26px; display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 6px; background: #f5f8fa; color: #5e6278; font-size: 12px; font-weight: 700; }
.product-actions { margin-top: auto; }
.pagination-strip { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding-top: 16px; margin-top: 14px; border-top: 1px dashed var(--line); color: var(--muted); font-size: 12px; font-weight: 800; }
.pagination-strip span { min-height: 26px; display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 6px; background: #f5f8fa; }
.product-detail-final { grid-template-columns: minmax(300px, 440px) minmax(0, 1fr); }
.product-detail-image-wrap { background: #f5f8fa; border-radius: 8px; }
.thumbnail-empty { grid-column: 1 / -1; min-height: 42px; display: grid; place-items: center; border: 1px dashed var(--line); border-radius: 6px; color: var(--muted); font-size: 12px; font-weight: 800; }
.product-tabs { display: grid; gap: 16px; }
.tab-bar { display: flex; flex-wrap: wrap; gap: 8px; border-bottom: 1px dashed var(--line); padding-bottom: 12px; }
.tab-bar button { min-height: 34px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: #5e6278; font-weight: 800; cursor: pointer; }
.tab-bar button.is-active { background: #eef6ff; border-color: #b9e3ff; color: var(--primary-dark); }
.tab-panel { min-height: 96px; }


@media (max-width: 1100px) {
  .catalog-layout, .product-detail-final { grid-template-columns: 1fr; }
  .filter-panel { position: static; }
}

@media (max-width: 720px) {
  .header-tools { justify-content: flex-start; width: 100%; }
  .catalog-card-view { grid-template-columns: 1fr; }
  .pagination-strip { justify-content: flex-start; }
}

/* Catalogo tabla completa y filtros superiores */
.catalog-filter-bar { padding: 0; overflow: hidden; border-color: #b9e3ff; }
.filter-bar-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 22px; background: linear-gradient(90deg, #eef6ff, #f8f5ff); border-bottom: 1px solid #d8ecff; }
.filter-bar-heading h2 { margin: 8px 0 4px; font-size: 18px; }
.filter-bar-heading p { margin: 0; color: #5e6278; }
.filter-summary { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.filter-summary span { min-height: 28px; display: inline-flex; align-items: center; padding: 5px 9px; border-radius: 6px; background: #fff; color: #3f4254; font-size: 12px; font-weight: 800; border: 1px solid rgba(0, 158, 247, 0.16); }
.catalog-top-filters { display: grid; grid-template-columns: minmax(260px, 1.1fr) minmax(320px, 1.4fr) minmax(160px, 220px) auto; gap: 14px; align-items: end; padding: 18px 22px 20px; background: #fff; }
.filter-actions { display: flex; align-items: center; gap: 8px; }
.filter-inline-note { margin: 0 22px 20px; padding: 10px 12px; border: 1px dashed #f6c000; border-radius: 8px; background: #fff8dd; color: #7a5200; font-weight: 700; }
.searchable-select { display: grid; grid-template-columns: minmax(150px, 0.58fr) minmax(180px, 1fr); gap: 8px; }
.searchable-select input { background: #f5f8fa; }
.catalog-table-card { width: 100%; }
.catalog-wide-table { min-width: 1120px; }
.catalog-category-cell { max-width: 260px; color: #3f4254; font-weight: 700; }
.catalog-table-card .catalog-card-view { margin-top: 4px; }

@media (max-width: 1200px) {
  .catalog-top-filters { grid-template-columns: 1fr 1fr; }
  .filter-actions { align-self: stretch; }
  .filter-actions .btn { flex: 1; }
}

@media (max-width: 760px) {
  .filter-bar-heading { align-items: flex-start; flex-direction: column; }
  .filter-summary { justify-content: flex-start; }
  .catalog-top-filters, .searchable-select { grid-template-columns: 1fr; }
  .filter-actions { flex-direction: column; }
  .filter-actions .btn { width: 100%; }
}

/* Ajustes catalogo operativo */
.sidebar-logout { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; margin-top: 12px; border-radius: 6px; background: rgba(241, 65, 108, 0.12); color: #ff8aaa; font-weight: 800; }
.sidebar-logout:hover { background: rgba(241, 65, 108, 0.2); color: #fff; }
.catalog-top-filters { grid-template-columns: minmax(240px, 1fr) minmax(300px, 1.2fr) minmax(220px, 0.9fr) minmax(150px, 190px) auto; }
.price-filter-group { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.price-filter-group input:disabled { background: #f5f8fa; color: #a1a5b7; cursor: not-allowed; }
.category-combobox { position: relative; }
.category-combobox-button { width: 100%; min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; padding: 10px 12px; color: #3f4254; font-weight: 700; text-align: left; cursor: pointer; }
.category-combobox-button span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.category-combobox-menu { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; right: 0; display: grid; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 16px 40px rgba(82, 63, 105, 0.16); }
.category-option-list { display: grid; gap: 4px; max-height: 260px; overflow: auto; }
.category-option-list button { border: 0; border-radius: 6px; background: transparent; color: #3f4254; padding: 9px 10px; text-align: left; cursor: pointer; font-weight: 700; line-height: 1.35; }
.category-option-list button:hover, .category-option-list button.is-active { background: #eef6ff; color: var(--primary-dark); }
.btn-sm { min-height: 34px; padding: 7px 10px; font-size: 12px; }
.action-text-buttons { display: inline-flex; justify-content: flex-end; gap: 8px; min-width: 245px; }
.modal-backdrop { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 24px; background: rgba(24, 28, 50, 0.44); }
.product-modal { width: min(860px, 100%); max-height: calc(100vh - 48px); overflow: auto; position: relative; border-radius: 8px; background: #fff; box-shadow: 0 24px 70px rgba(24, 28, 50, 0.24); padding: 24px; }
.modal-close { position: absolute; top: 14px; right: 14px; min-height: 34px; border: 1px solid var(--line); border-radius: 6px; background: #f5f8fa; color: #3f4254; padding: 7px 10px; font-weight: 800; cursor: pointer; }
.product-modal-grid { display: grid; grid-template-columns: minmax(220px, 320px) minmax(0, 1fr); gap: 22px; align-items: start; }
.product-modal-media { min-height: 260px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: #f5f8fa; color: var(--muted); overflow: hidden; }
.product-modal-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-modal h2 { margin: 12px 0 6px; padding-right: 72px; font-size: 24px; }

@media (max-width: 1200px) {
  .catalog-top-filters { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .price-filter-group, .product-modal-grid { grid-template-columns: 1fr; }
  .action-text-buttons { min-width: 0; flex-direction: column; align-items: stretch; }
  .modal-backdrop { padding: 12px; }
  .product-modal { padding: 18px; }
  .product-modal h2 { padding-right: 0; }
  .modal-close { position: static; margin-left: auto; margin-bottom: 12px; display: flex; }
}

/* Buscador local de tabla y dropdown de categorias sobre tabla */
.catalog-filter-bar { overflow: visible !important; position: relative; z-index: 70; }
.catalog-top-filters { overflow: visible; position: relative; z-index: 75; }
.filter-category, .category-combobox { position: relative; z-index: 90; }
.category-combobox-menu { z-index: 5000 !important; max-height: min(420px, calc(100vh - 180px)); }
.category-option-list { max-height: min(320px, calc(100vh - 270px)); }
.catalog-table-card { position: relative; z-index: 1; }
.table-local-tools { display: grid; grid-template-columns: minmax(280px, 460px) auto; align-items: end; justify-content: space-between; gap: 14px; padding: 12px 0 18px; border-top: 1px dashed var(--line); }
.table-local-tools .field-block { margin: 0; }
.table-local-tools [data-local-filter-count] { min-height: 32px; display: inline-flex; align-items: center; justify-content: center; padding: 5px 10px; border-radius: 6px; background: #f5f8fa; color: #5e6278; font-size: 12px; font-weight: 800; }

@media (max-width: 760px) {
  .table-local-tools { grid-template-columns: 1fr; align-items: stretch; }
  .table-local-tools [data-local-filter-count] { justify-content: flex-start; }
}

/* Mi catalogo cliente */
.catalog-feedback { border: 1px solid #c9f7df; border-radius: 8px; padding: 12px 14px; background: #e8fff3; color: #0f6f46; font-weight: 700; }
.mi-catalogo-toggle.is-saved { background: #e8fff3; color: #0f8f57; border-color: #c9f7df; }
.mi-catalogo-hero { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.mi-catalogo-hero h2 { margin: 8px 0 6px; font-size: 22px; }
.mi-catalogo-hero p { margin: 0; color: var(--muted); max-width: 780px; line-height: 1.5; }
.mi-catalogo-summary { min-width: 170px; display: grid; justify-items: end; gap: 4px; padding: 14px; border: 1px dashed var(--line); border-radius: 8px; background: #fbfcfd; }
.mi-catalogo-summary strong { font-size: 32px; line-height: 1; color: var(--primary-dark); }
.mi-catalogo-summary span { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.mi-catalogo-toolbar { display: grid; grid-template-columns: minmax(260px, 480px) auto; align-items: end; gap: 12px; margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px dashed var(--line); }
.mi-catalogo-table { min-width: 980px; }

@media (max-width: 760px) {
  .mi-catalogo-hero { align-items: flex-start; flex-direction: column; }
  .mi-catalogo-summary { width: 100%; justify-items: start; }
  .mi-catalogo-toolbar { grid-template-columns: 1fr; }
}
/* Paginacion de catalogo */
.catalog-top-filters { grid-template-columns: minmax(220px, 1fr) minmax(280px, 1.2fr) minmax(220px, 0.9fr) minmax(130px, 160px) minmax(140px, 180px) auto; }
.catalog-pagination { align-items: center; justify-content: space-between; gap: 14px; }
.pagination-summary, .pagination-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pagination-controls { justify-content: flex-end; }
.pagination-controls .page-link { min-height: 32px; display: inline-flex; align-items: center; justify-content: center; padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: #3f4254; font-size: 12px; font-weight: 800; }
.pagination-controls .page-link.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }
.pagination-controls .page-link.is-disabled { pointer-events: none; opacity: 0.45; background: #f5f8fa; }

@media (max-width: 1200px) {
  .catalog-top-filters { grid-template-columns: 1fr 1fr; }
  .catalog-pagination { align-items: flex-start; flex-direction: column; }
  .pagination-controls { justify-content: flex-start; }
}

@media (max-width: 760px) {
  .catalog-top-filters { grid-template-columns: 1fr; }
  .pagination-controls .page-link { flex: 1 1 auto; }
}
/* Busqueda global dentro de tabla */
.table-global-search { grid-template-columns: minmax(280px, 520px) auto; }
.table-search-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.table-search-actions span { min-height: 32px; display: inline-flex; align-items: center; padding: 5px 10px; border-radius: 6px; background: #f5f8fa; color: #5e6278; font-size: 12px; font-weight: 800; }
@media (max-width: 760px) {
  .table-global-search { grid-template-columns: 1fr; }
  .table-search-actions { justify-content: flex-start; }
}
/* Mi catalogo detalle y filtros */
.mi-catalogo-toolbar { grid-template-columns: minmax(240px, 1.1fr) minmax(260px, 1.1fr) minmax(160px, 220px) minmax(140px, 180px) auto; }
.mi-catalogo-table { min-width: 880px; }
.mi-catalogo-table td:nth-child(6) { max-width: 240px; color: var(--muted); line-height: 1.4; }
.mi-catalogo-modal-data strong { text-align: right; max-width: 62%; word-break: break-word; }

@media (max-width: 760px) {
  .mi-catalogo-toolbar { grid-template-columns: 1fr; }
  .mi-catalogo-modal-data div { align-items: flex-start; flex-direction: column; }
  .mi-catalogo-modal-data strong { max-width: 100%; text-align: left; }
}
@media (max-width: 1200px) {
  .mi-catalogo-toolbar { grid-template-columns: 1fr 1fr; }
}
/* Cotizacion desde Mi catalogo */
.quote-inline-qty { width: 86px; min-height: 36px; text-align: center; font-weight: 800; }
.quote-inline-comment, .quote-line-comment { min-width: 220px; min-height: 36px; }
.quote-table { min-width: 980px; }
.mi-catalogo-table { min-width: 1120px; }
/* Dashboard resumen */
.dashboard-welcome { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.dashboard-welcome h2 { margin: 8px 0 6px; font-size: 24px; }
.dashboard-welcome p { margin: 0; max-width: 820px; color: var(--muted); line-height: 1.55; }
.dashboard-status-box { min-width: 210px; display: grid; gap: 4px; justify-items: end; padding: 14px; border: 1px dashed var(--line); border-radius: 8px; background: #fbfcfd; }
.dashboard-status-box small { color: var(--muted); font-weight: 800; text-transform: uppercase; font-size: 11px; }
.dashboard-status-box strong { font-size: 22px; color: var(--primary-dark); }
.dashboard-status-box span { color: var(--muted); font-weight: 700; }
.dashboard-actions .action-tile { min-height: 148px; }
.alerts-panel .status-list li { align-items: flex-start; }
.dashboard-empty-state .module-state { min-height: 138px; }

@media (max-width: 760px) {
  .dashboard-welcome { align-items: flex-start; flex-direction: column; }
  .dashboard-status-box { width: 100%; justify-items: start; }
}
.quote-form-section { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.quote-form-section .form-section-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.quote-form-section .form-section-title strong { color: #181c32; font-size: 14px; }
.quote-form-section .form-section-title span { color: #7e8299; font-size: 12px; font-weight: 700; text-align: right; }
.checkbox-row { display: inline-flex; align-items: center; gap: 9px; min-height: 36px; margin-bottom: 12px; color: #3f4254; font-weight: 800; }
.checkbox-row input { width: 16px; height: 16px; accent-color: var(--primary); }
.quote-form-section [data-facturacion-fields] { padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfd; }


.registro-fiscal-section { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfd; }
.registro-fiscal-section .form-section-title { padding-top: 0; border-top: 0; }
.form-inline-help { margin: 0; color: var(--muted); font-size: 12px; font-weight: 700; line-height: 1.45; }

/* Ajuste responsive de filtros de catalogo */
.catalog-filter-bar {
  position: relative;
  z-index: auto !important;
  overflow: visible;
  border-color: var(--line);
}
.filter-bar-heading {
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.catalog-top-filters {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)) !important;
  align-items: end;
  overflow: visible;
  position: relative;
  z-index: auto !important;
}
.catalog-top-filters .field-block,
.catalog-top-filters .search-control,
.catalog-top-filters input,
.catalog-top-filters select,
.catalog-top-filters button,
.price-filter-group,
.filter-actions {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.filter-search,
.filter-category {
  grid-column: span 2;
}
.price-filter-group {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.filter-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  align-self: end;
}
.filter-actions .btn {
  flex: 1 1 120px;
  min-width: 0;
}
.filter-category,
.category-combobox {
  position: relative;
  z-index: auto !important;
  min-width: 0;
}
.category-combobox-menu {
  z-index: 30 !important;
  max-width: 100%;
}
.catalog-table-card {
  position: relative;
  z-index: auto !important;
}

@media (max-width: 980px) {
  .filter-search,
  .filter-category {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .filter-bar-heading {
    padding: 16px;
  }
  .catalog-top-filters {
    padding: 16px;
    grid-template-columns: 1fr !important;
  }
  .filter-search,
  .filter-category {
    grid-column: auto;
  }
  .price-filter-group {
    grid-template-columns: 1fr;
  }
  .filter-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .filter-actions .btn {
    width: 100%;
    flex-basis: auto;
  }
}

/* Pedidos cliente */
.pedidos-card .card-header { align-items: flex-start; }
.pedidos-table { min-width: 1080px; }
.pedidos-detail-table { min-width: 820px; }
.pedido-modal-header { margin-bottom: 16px; }
.pedido-modal-header h2 { margin: 10px 0 4px; padding-right: 72px; }
.pedido-response-comment { margin-top: 16px; }
.pedido-modal-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.pedido-modal-actions .btn { flex: 1 1 160px; }
@media (max-width: 760px) {
  .pedido-modal-actions { flex-direction: column; }
  .pedido-modal-actions .btn { width: 100%; flex-basis: auto; }
}

/* Cotizaciones guardadas */
.quote-draft-tools { display: grid; grid-template-columns: minmax(220px, 1fr) auto; gap: 12px; align-items: end; }
.quote-draft-list { display: grid; gap: 8px; margin-top: 12px; }
.quote-draft-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfd; }
.quote-draft-item strong { display: block; color: #181c32; }
.quote-draft-item small { color: var(--muted); font-weight: 700; }
.quote-draft-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
@media (max-width: 760px) {
  .quote-draft-tools, .quote-draft-item { grid-template-columns: 1fr; }
  .quote-draft-actions { justify-content: stretch; }
  .quote-draft-actions .btn { flex: 1 1 auto; }
}

/* Historial de cotizaciones */
.cotizaciones-card .card-header { align-items: flex-start; }
.document-toolbar { display: grid; grid-template-columns: minmax(220px, 320px) auto; align-items: end; gap: 12px; margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px dashed var(--line); }
.cotizaciones-table { min-width: 1160px; }
.document-actions { min-width: 390px; flex-wrap: wrap; }
.document-modal .pedido-modal-actions .is-hidden { display: none !important; }
@media (max-width: 760px) {
  .document-toolbar { grid-template-columns: 1fr; }
  .document-actions { min-width: 0; }
}

/* Notificaciones */
.notifications-card .card-header { align-items: flex-start; }
.notifications-list { display: grid; gap: 12px; }
.notification-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.notification-item.is-unread { border-color: #cfe8ff; background: #fbfdff; box-shadow: 0 8px 20px rgba(0, 158, 247, 0.06); }
.notification-item.is-read { opacity: 0.78; }
.notification-main { min-width: 0; }
.notification-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--muted); font-size: 12px; font-weight: 800; }
.notification-item h3 { margin: 8px 0 4px; font-size: 16px; line-height: 1.25; }
.notification-item p { margin: 0; color: #3f4254; line-height: 1.45; }
.notification-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; max-width: 430px; }
.notification-topbar-link .counter { margin-left: -2px; }
@media (max-width: 760px) {
  .notification-item { grid-template-columns: 1fr; align-items: stretch; }
  .notification-actions { justify-content: stretch; max-width: none; }
  .notification-actions .btn { flex: 1 1 150px; }
}

/* Tester API Distribucion */
.tester-shell { display: grid; gap: 18px; }
.tester-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 420px); gap: 18px; align-items: start; padding: 22px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
.tester-hero h2 { margin: 10px 0 6px; font-size: 24px; }
.tester-hero p { margin: 0; color: var(--muted); line-height: 1.55; }
.tester-env { display: grid; gap: 12px; }
.tester-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 18px; align-items: start; }
.tester-nav { position: sticky; top: 96px; display: grid; gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
.tester-nav button { min-height: 38px; border: 0; border-radius: 6px; background: transparent; color: #5e6278; padding: 8px 10px; text-align: left; font-weight: 800; cursor: pointer; }
.tester-nav button:hover, .tester-nav button.is-active { background: #eef6ff; color: var(--primary-dark); }
.tester-content { min-width: 0; }
.tester-section { display: none; }
.tester-section.is-active { display: block; }
.tester-tests { display: grid; gap: 12px; }
.tester-result-card { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfd; }
.tester-result-card.is-idle { background: #fff; }
.tester-result-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tester-result-head strong, .tester-result-head small { display: block; }
.tester-result-head small, .tester-result-meta, .tester-result-summary p, .tester-observations p, .tester-observations li { color: var(--muted); }
.tester-result-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; font-weight: 800; }
.tester-result-summary p, .tester-observations p { margin: 5px 0 0; line-height: 1.45; }
.tester-result-card details { border: 1px dashed var(--line); border-radius: 8px; background: #fff; padding: 10px; }
.tester-result-card summary { cursor: pointer; font-weight: 800; color: #3f4254; }
.tester-result-card pre { max-height: 360px; overflow: auto; margin: 10px 0 0; padding: 12px; border-radius: 6px; background: #181c32; color: #f5f8fa; font-size: 12px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.tester-observations ul { margin: 7px 0 10px; padding-left: 18px; }
.tester-textarea-label { margin: 14px 0; }
.tester-textarea-label textarea { font-family: Consolas, Monaco, monospace; font-size: 12px; line-height: 1.45; }
.tester-post-note { margin: 0 0 14px; padding: 10px 12px; border: 1px dashed #f6c000; border-radius: 8px; background: #fff8dd; color: #7a5200; font-weight: 800; }
.tester-category-panel { display: grid; gap: 12px; margin-bottom: 12px; }
.tester-category-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.tester-category-tree { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px; max-height: 360px; overflow: auto; padding: 10px; border: 1px dashed var(--line); border-radius: 8px; background: #fbfcfd; }
.tester-category-option { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 8px; align-items: center; padding: 8px 10px 8px calc(10px + (var(--level, 0) * 14px)); border: 1px solid var(--line); border-radius: 8px; background: #fff; font-weight: 800; }
.tester-category-option input { width: 15px; height: 15px; accent-color: var(--primary); }
.tester-category-option small { grid-column: 2; color: var(--muted); font-size: 11px; }
.tester-checklist { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 10px; }
.tester-check-item { display: flex; align-items: flex-start; gap: 9px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfd; color: #3f4254; font-weight: 800; line-height: 1.35; }
.tester-check-item input { width: 16px; height: 16px; min-height: 16px; margin-top: 1px; accent-color: var(--primary); }
.tester-summary { display: grid; gap: 12px; }
.tester-summary-block { padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfd; }
.tester-summary-block h3 { margin: 0 0 8px; text-transform: capitalize; }
.tester-summary-block p { margin: 0 0 10px; color: #3f4254; }
.tester-summary-block ul { margin: 0; padding-left: 18px; display: grid; gap: 8px; color: var(--muted); }

@media (max-width: 980px) {
  .tester-hero, .tester-grid { grid-template-columns: 1fr; }
  .tester-nav { position: static; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
}

@media (max-width: 640px) {
  .tester-result-head { align-items: flex-start; flex-direction: column; }
  .tester-category-tree, .tester-checklist { grid-template-columns: 1fr; }
}

/* Mi cuenta */
.account-page .account-section-card .card-header { align-items: flex-start; }
.account-data-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.account-data-grid div { display: grid; gap: 4px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfd; }
.account-data-grid span, .account-edit-placeholder span:last-child { color: var(--muted); font-size: 12px; font-weight: 800; }
.account-data-grid strong { color: #181c32; font-size: 13px; word-break: break-word; }
.account-edit-placeholder { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 12px; border: 1px dashed var(--line); border-radius: 8px; background: #fff8dd; }
@media (max-width: 760px) {
  .account-data-grid { grid-template-columns: 1fr; }
  .account-edit-placeholder { align-items: flex-start; flex-direction: column; }
}

/* Registro intereses comerciales */
.category-interest-dropdown { position: relative; width: 100%; }
.category-interest-trigger { width: 100%; min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: #181c32; font-weight: 800; text-align: left; cursor: pointer; }
.category-interest-trigger:focus { outline: 2px solid rgba(0, 158, 247, 0.18); border-color: var(--primary); }
.category-interest-trigger-meta { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0; }
.category-interest-panel { display: none; position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 14px 35px rgba(82, 63, 105, 0.16); }
.category-interest-dropdown.is-open .category-interest-panel { display: block; }
.category-interest-search { display: block; margin-bottom: 10px; color: #7e8299; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.category-interest-search input { width: 100%; margin-top: 6px; min-height: 38px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; color: #181c32; font-size: 13px; font-weight: 700; text-transform: none; }
.category-interest-search input:focus { outline: 2px solid rgba(0, 158, 247, 0.18); border-color: var(--primary); }
.category-interest-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; max-height: 320px; overflow: auto; padding-right: 4px; }
.category-interest-option { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 8px 10px 8px calc(10px + (var(--category-level, 0) * 14px)); border: 1px solid var(--line); border-radius: 8px; background: #fff; color: #3f4254; font-weight: 800; font-size: 12px; }
.category-interest-option input { width: 15px; height: 15px; accent-color: var(--primary); flex: 0 0 auto; }
.category-interest-option span { line-height: 1.3; }
.category-interest-option.is-hidden, .category-interest-empty.is-hidden { display: none; }
.category-interest-empty { margin: 8px 0 0; color: var(--muted); font-size: 12px; font-weight: 800; }
@media (max-width: 640px) { .category-interest-panel { position: static; margin-top: 6px; } .category-interest-grid { grid-template-columns: 1fr; } }

/* Home publica */
.public-page { min-height: 100vh; overflow-x: hidden; background: #f5f8fa; color: var(--ink); }
.public-header { position: sticky; top: 0; z-index: 20; min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px clamp(18px, 4vw, 48px); background: rgba(255,255,255,0.96); border-bottom: 1px solid var(--line); }
.public-brand { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }
.public-brand img { width: clamp(150px, 18vw, 210px); height: auto; display: block; }
.public-brand-tag { min-height: 28px; display: inline-flex; align-items: center; padding: 5px 10px; border-left: 1px solid var(--line); color: var(--primary-dark); font-size: 13px; font-weight: 900; text-transform: uppercase; letter-spacing: 0; }
.public-nav { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.public-nav > a:not(.btn) { min-height: 38px; display: inline-flex; align-items: center; padding: 8px 10px; border-radius: 6px; color: #5e6278; font-weight: 800; }
.public-nav > a:not(.btn):hover, .public-nav > a.is-active { background: #eef6ff; color: var(--primary-dark); }
.public-main { width: 100%; margin: 0; padding: 0 0 42px; display: grid; gap: 22px; }
.public-main > :not(.public-banner) { width: min(1180px, calc(100% - 36px)); margin-left: auto; margin-right: auto; }
.public-banner { position: relative; width: 100%; min-height: 440px; display: grid; align-items: end; overflow: hidden; border-bottom: 1px solid var(--line); background: #00606a; box-shadow: var(--shadow); }
.public-banner-media { position: absolute; inset: 0; background-color: #00606a; background-image: linear-gradient(90deg, rgba(24,28,50,0.92), rgba(24,28,50,0.68) 42%, rgba(24,28,50,0.2)), url('../media/home/banner-distribucion-artiani.webp'); background-repeat: no-repeat; background-size: 100% auto, min(100vw, 2116px) auto; background-position: center top, center top; }
.public-banner-content { position: relative; z-index: 1; width: min(1180px, calc(100% - 36px)); margin: 0 auto; display: grid; gap: 16px; padding: clamp(34px, 6vw, 72px) 0; color: #fff; }
.public-banner-content > * { max-width: 720px; }
.public-banner-content h1 { margin: 0; font-size: clamp(34px, 4.6vw, 58px); line-height: 1.02; letter-spacing: 0; }
.public-banner-content p { margin: 0; color: rgba(255,255,255,0.82); font-size: 17px; line-height: 1.6; }
.public-banner .btn-light { background: rgba(255,255,255,0.92); border-color: rgba(255,255,255,0.55); }
.public-hero { min-height: calc(100vh - 210px); display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr); gap: 22px; align-items: center; }
.public-hero-copy, .public-access-panel, .public-section { background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.public-hero-copy { display: grid; gap: 16px; padding: clamp(28px, 5vw, 52px); }
.public-hero-copy h1 { max-width: 720px; margin: 0; font-size: clamp(34px, 4.4vw, 56px); line-height: 1.02; letter-spacing: 0; }
.public-hero-copy p { max-width: 760px; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.65; }
.public-hero-copy .public-lead { color: #3f4254; font-size: 20px; font-weight: 800; line-height: 1.35; }
.public-hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.public-access-panel { display: grid; align-content: start; gap: 12px; padding: 24px; }
.public-access-panel h2 { margin: 0; font-size: 21px; }
.public-access-panel p { margin: 0; color: var(--muted); line-height: 1.55; }
.public-access-panel ul { display: grid; gap: 9px; margin: 8px 0 0; padding-left: 18px; color: #3f4254; font-weight: 800; }
.public-section { padding: 24px; }
.public-section-heading { display: grid; justify-items: start; gap: 8px; margin-bottom: 16px; }
.public-section-heading h2 { margin: 0; font-size: 22px; }
.public-section-heading p { max-width: 780px; margin: 0; color: var(--muted); line-height: 1.55; }
.public-pet-section { background: #fff; }
.public-pet-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.public-pet-card { min-height: 330px; display: grid; align-content: start; gap: 9px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfd; transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease; }
.public-pet-card:hover { transform: translateY(-2px); border-color: #cfe8ff; box-shadow: 0 14px 30px rgba(82, 63, 105, 0.08); }
.public-pet-card img { width: 100%; aspect-ratio: 4 / 3; display: block; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); background: #eef6ff; }
.public-pet-card strong { color: #181c32; font-size: 15px; line-height: 1.25; }
.public-pet-card small { color: var(--muted); line-height: 1.45; }
.public-store-callout { display: grid; grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr); gap: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
.public-store-image { min-height: 390px; background: linear-gradient(180deg, rgba(0,158,247,0.08), rgba(24,28,50,0.22)), url('../media/home/linea-acuario-peces.webp'); background-size: cover; background-position: center; }
.public-store-copy { display: grid; align-content: center; justify-items: start; gap: 14px; padding: clamp(24px, 4vw, 42px); }
.public-store-copy h2 { margin: 0; font-size: clamp(24px, 3vw, 34px); line-height: 1.12; }
.public-store-copy p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.65; }
.public-store-copy .status-list { margin: 2px 0 4px; }
.public-store-copy .status-list li { align-items: flex-start; }
.public-conversion-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.public-conversion-card { display: grid; align-content: start; justify-items: start; gap: 12px; padding: 24px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
.public-conversion-card h2 { margin: 0; font-size: 24px; }
.public-conversion-card p { margin: 0; color: var(--muted); line-height: 1.55; }
.public-conversion-card.is-primary { background: #fbfcfd; border-color: #d9ebfb; }
.public-feature-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.public-feature { min-height: 180px; display: grid; align-content: start; gap: 10px; padding: 16px; border: 1px dashed var(--line); border-radius: 8px; background: #fbfcfd; }
.public-feature .icon { width: 34px; height: 34px; padding: 8px; border-radius: 8px; background: #eef6ff; color: var(--primary-dark); }
.public-feature h3, .public-steps h3 { margin: 0; font-size: 16px; }
.public-feature p, .public-steps p { margin: 0; color: var(--muted); line-height: 1.5; }
.public-process-section { background: #fff; }
.public-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.public-steps article { display: grid; gap: 9px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.public-steps article > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; background: #f8f5ff; color: var(--info); font-weight: 900; }
.public-split-section { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr); gap: 18px; background: transparent; border: 0; box-shadow: none; padding: 0; }
.public-note, .public-categories { padding: 24px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
.public-note .status-list li { align-items: flex-start; }
.public-category-list { display: flex; flex-wrap: wrap; gap: 8px; }
.public-category-list span { min-height: 32px; display: inline-flex; align-items: center; padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fbfcfd; color: #3f4254; font-weight: 800; }
.public-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px clamp(18px, 4vw, 48px); border-top: 1px solid var(--line); background: #fff; }
.public-footer strong, .public-footer span { display: block; }
.public-footer span { margin-top: 3px; color: var(--muted); font-size: 12px; font-weight: 800; }
.public-footer-actions { display: flex; flex-wrap: wrap; gap: 12px; color: var(--primary-dark); font-weight: 800; }

@media (max-width: 980px) {
  .public-header { align-items: flex-start; flex-direction: column; }
  .public-nav { justify-content: flex-start; }
  .public-hero, .public-store-callout, .public-conversion-grid, .public-split-section { grid-template-columns: 1fr; }
  .public-hero { min-height: auto; align-items: stretch; }
  .public-feature-grid, .public-pet-grid, .public-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .public-store-image { min-height: 260px; }
}

@media (max-width: 640px) {
  .public-main { width: 100%; padding-top: 0; }
  .public-main > :not(.public-banner) { width: min(100% - 24px, 1180px); }
  .public-header { position: static; padding: 14px 12px; }
  .public-brand { width: 100%; justify-content: space-between; }
  .public-brand img { width: min(58vw, 180px); }
  .public-nav, .public-nav .btn, .public-hero-actions .btn { width: 100%; }
  .public-nav > a:not(.btn) { flex: 1 1 auto; }
  .public-banner { min-height: 480px; }
  .public-banner-media { background: linear-gradient(180deg, rgba(24,28,50,0.92), rgba(24,28,50,0.64)), url('../media/home/banner-distribucion-artiani.webp'); background-size: cover; background-position: center; }
  .public-feature-grid, .public-pet-grid, .public-steps { grid-template-columns: 1fr; }
  .public-hero-copy, .public-access-panel, .public-section, .public-note, .public-categories, .public-store-copy { padding: 18px; }
  .public-hero-copy h1 { font-size: 34px; }
  .public-store-image { min-height: 210px; }
  .public-footer { align-items: flex-start; flex-direction: column; }
}


.dashboard-metric-link,
.dashboard-module-link,
.dashboard-action-item,
.dashboard-mini-item {
  color: inherit;
  text-decoration: none;
}
.dashboard-metric-link { transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.dashboard-metric-link:hover { border-color: #cfe8ff; box-shadow: 0 10px 24px rgba(0, 158, 247, .08); transform: translateY(-1px); }
.dashboard-activity-card .card-header { align-items: flex-start; }
.dashboard-action-list,
.dashboard-mini-list { display: grid; gap: 10px; }
.dashboard-action-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.dashboard-action-item:hover,
.dashboard-mini-item:hover,
.dashboard-module-link:hover { border-color: #cfe8ff; background: #fbfdff; }
.dashboard-action-item.is-empty { grid-template-columns: auto minmax(0, 1fr); background: #fbfcfd; }
.dashboard-action-item strong,
.dashboard-action-item small,
.dashboard-mini-item strong,
.dashboard-mini-item small { display: block; min-width: 0; }
.dashboard-action-item strong,
.dashboard-mini-item strong { color: #181c32; }
.dashboard-action-item small,
.dashboard-mini-item small { margin-top: 3px; color: var(--muted); font-weight: 700; line-height: 1.35; }
.dashboard-mini-item { display: grid; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.dashboard-mini-item .badge { justify-self: start; }
.dashboard-module-link { border: 1px solid var(--line); transition: border-color .16s ease, background .16s ease; }
@media (max-width: 760px) {
  .dashboard-action-item { grid-template-columns: 1fr; align-items: stretch; }
  .dashboard-action-item .btn { width: 100%; }
}
