/* Concepto V7: superficies estables, jerarquía por tareas y navegación adaptable. */
:root {
  --concept-bg: #f6f7fb;
  --concept-surface: #fff;
  --concept-border: #dedee8;
  --concept-text: #242235;
  --concept-muted: #626174;
  --concept-purple: #7828a8;
  --concept-gradient: #7828a8;
  --concept-gradient-hover: #64208d;
  --concept-shadow: 0 2px 8px rgb(36 34 53 / 3%);
  --concept-radius: 12px;
  --text-primary: #242235;
  --text-muted: #626174;
  --text-faint: #6b6578;
  --border-soft: #dedee8;
  --surface: #fff;
  --surface-raised: #f6f7fb;
  --purple: #7828a8;
}
html { background: var(--concept-bg); scroll-padding-top: 24px; }
body { background: var(--concept-bg); font-family: Inter, system-ui, sans-serif; font-size: 14px; line-height: 1.5; }
body::before, .panel-video-background { display: none !important; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 264px; height: 100dvh;
  padding: 22px 14px 16px; border: 0; border-right: 1px solid var(--concept-border);
  border-radius: 0; background: #fff; box-shadow: none; backdrop-filter: none;
  display: flex; flex-direction: column; overflow: auto;
}
.sidebar .logo { min-height: 68px; margin: 0 8px 14px; background-size: 190px auto; flex: 0 0 auto; }
.sidebar .logo::after { content: none; }
.panel-menu { min-height: 0; display: flex; flex-direction: column; flex: 1; }
.panel-menu-toggle { display: none; }
.sidebar nav { display: flex; flex-direction: column; gap: 20px; overflow: visible; flex: 1; padding: 0; }
.sidebar nav::before, .sidebar nav a::before { content: none !important; display: none !important; }
.sidebar nav .nav-group { margin: 0; padding: 0; min-width: 0; }
.sidebar nav .nav-group-title { margin: 0 12px 7px; color: #626174; font-size: 12px; line-height: 1.6; font-weight: 650; letter-spacing: .01em; }
.sidebar nav details.nav-group > summary { cursor: pointer; min-height: 36px; padding-top: 7px; }
.sidebar nav a, .sidebar nav a[href="negocio.html"], .sidebar nav a[href="activacion.html"] {
  display: flex; align-items: center; gap: 11px; width: 100%; min-width: 0;
  min-height: 44px; margin: 2px 0; padding: 10px 12px;
  border: 0; border-inline-start: 3px solid transparent; border-radius: 8px !important;
  background: transparent; color: #423e50; font-size: 13px; font-weight: 500;
  box-shadow: none; transform: none; white-space: normal; text-decoration: none;
}
.sidebar nav a svg { width: 20px; height: 20px; flex: 0 0 20px; opacity: 1; }
.sidebar nav a:hover { color: #64208d; background: #f7f2fb; transform: none; }
.sidebar nav a.active, .sidebar nav a[aria-current="page"] {
  color: #64208d; background: #f1e8fa; border-inline-start-color: #7828a8; box-shadow: none; font-weight: 700;
}
.sidebar-footer { margin: 20px 0 0; padding: 14px 12px 0; border: 0; border-top: 1px solid var(--concept-border); border-radius: 0; background: #fff; box-shadow: none; }
.sidebar-footer p { font-size: 12px; color: var(--concept-muted); }
.sidebar-footer a { display: inline-flex; align-items: center; min-height: 44px; color: #64208d; }
.main, .main.inbox-main { width: auto; min-width: 0; max-width: none; margin-left: 264px; padding: 24px 32px 48px; }
.panel-location { margin: 0 0 22px; color: #626174; font-size: 13px; }
.main > header, .main > .business-header { min-height: 0; padding: 0 0 20px !important; margin: 0 0 20px; border: 0; border-bottom: 1px solid var(--concept-border); border-radius: 0; background: transparent; box-shadow: none; backdrop-filter: none; gap: 20px; }
.main > header h1, .business-header h1, .qa-page-header h1 { font-size: clamp(25px, 2.4vw, 34px); line-height: 1.2; letter-spacing: -.035em; }
.main > header h1::before, .main > header h1::after { content: none; }
.main > header p { color: var(--concept-muted); font-size: 14px; max-width: 70ch; }
.business-eyebrow, .inbox-title > .inbox-eyebrow, .qa-page-header .onboarding-eyebrow { display: none; }
.header-actions { flex-wrap: wrap; gap: 10px; }
.client-filter select { max-width: 100%; }
.btn-refresh, .header-actions button { background: #fff; color: #64208d; border: 1px solid #d5c6e0; box-shadow: none; }
.btn-refresh:hover, .header-actions button:hover { background: #f1e8fa !important; color: #64208d !important; transform: none !important; box-shadow: none !important; }
.card,.section,.chart-container-wrapper,.business-card,.team-card,.schedule-card,.services-catalog,.service-editor,.group-sessions,[class$="-card"],[class*="-card "] {
  background: #fff !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; box-shadow: var(--concept-shadow) !important;
}
.cards { gap: 16px; margin-bottom: 24px; }
.card { min-height: 112px; }
.reports-grid { gap: 20px; margin-bottom: 24px; }
.section { margin-bottom: 24px; }
.section-header h2, .chart-container-wrapper h3 { font-size: 17px; }
table th { font-size: 12px; color: #626174; background: #f9f9fc; }
table td { font-size: 13px; }
.wizard-steps { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.wizard-steps a { flex: 1 1 130px; min-height: 48px; border-radius: 8px; font-size: 13px; background: #fff; }
.wizard-steps a.active { background: #f1e8fa; color: #64208d; border-color: #7828a8; }
.business-grid input,.business-grid select,.business-grid textarea { font-size: 14px; }
.panel-skip-link { position: fixed; left: 16px; top: -100px; z-index: 9999; padding: 12px 18px; background: #fff; color: #64208d; border: 2px solid #7828a8; border-radius: 8px; }
.panel-skip-link:focus { top: 12px; }
:where(a,button,input,select,textarea,summary):focus-visible { outline: 3px solid #7828a8 !important; outline-offset: 3px; }
.main:focus { outline: none; }
.panel-page-outline { margin: 0 0 24px; padding: 0 16px; border: 1px solid var(--concept-border); border-radius: 10px; background: #fff; }
.panel-page-outline > summary { padding: 14px 0; color: #64208d; font-weight: 600; cursor: pointer; }
.panel-page-outline nav { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 0 14px; }
.panel-page-outline a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 12px; border-radius: 8px; background: #f6f2fa; color: #64208d; text-decoration: none; }
.panel-page-outline a[hidden] { display: none; }
h2[id] { scroll-margin-top: 24px; }
.inbox-header { flex-wrap: wrap; }
.inbox-header .header-actions { flex-basis: 450px; }
.global-inbox-search { width: min(360px, 100%); }
.inbox-shell { grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); min-height: 540px; height: calc(100dvh - 310px); border-radius: 12px; box-shadow: none; }
.inbox-shell .contact-panel { display: none; }
.contact-options-button { display: grid; }
.inbox-shell.mobile-contact-sheet-open .contact-panel { display: flex; position: absolute; inset: 10% 0 0 auto; width: min(420px, 100%); max-height: 90%; z-index: 40; overflow: auto; padding: 20px; border-radius: 12px 0 0 0; background: #fff; }
.inbox-shell.mobile-contact-sheet-open .mobile-contact-scrim { display: block; position: absolute; inset: 0; width: 100%; height: 100%; background: rgb(36 34 53 / 35%); z-index: 30; border: 0; }
.inbox-shell.mobile-contact-sheet-open .close-contact-sheet { display: grid; min-width: 44px; height: 44px; }
.inbox-overview { flex-wrap: wrap; gap: 12px; }
.inbox-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.inbox-stats article { min-width: 0; }
.inbox-stats small { font-size: var(--dg-text-xs, 12px); }
.conversation-line strong { font-size: 14px; }
.conversation-preview, .conversation-line time, .thread-header p { font-size: 12px; }
.message-bubble p { font-size: 14px; line-height: 1.6; }
.message-bubble span { font-size: var(--dg-text-xs, 12px); }
.contact-card h4, .contact-card p, .contact-card label, .contact-card small { font-size: 12px; }
.channel-tab { font-size: 12px; min-height: 44px; }
.composer-row textarea { font-size: 14px; }
.composer-notice strong { font-size: 12px; }
.composer-notice small { font-size: var(--dg-text-xs, 12px); }
.contact-block-card textarea { font-size: 14px; }
.conversation-tools button { font-size: 12px; min-height: 44px; }
.panel-thread-empty { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; padding: 36px; text-align: center; color: #626174; }
.panel-thread-empty h2 { margin-bottom: 12px; color: #242235; font-size: 21px; }
.panel-thread-empty p { max-width: 45ch; font-size: 14px; line-height: 1.7; }
.thread-panel:has(#thread-content:not([hidden])) .panel-thread-empty { display: none; }
.preview-notice { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 18px; padding: 10px 14px; border: 1px dashed #c9bad7; border-radius: 8px; background: #fff; color: #626174; font-size: 12px; }
.preview-notice a { display: inline-flex; align-items: center; min-height: 32px; padding: 4px 8px; color: #64208d; border-radius: 5px; text-decoration: none; }
.preview-notice a[aria-current] { background: #f1e8fa; font-weight: 700; }
@media (max-width: 1080px) and (min-width: 769px) {
  .sidebar { width: 240px; }
  .main, .main.inbox-main { margin-left: 240px; padding: 22px; }
  .inbox-header .header-actions { flex-basis: 100%; justify-content: flex-start; }
}
@media (max-width: 900px) {
  .inbox-shell { grid-template-columns: 1fr; }
  .thread-panel { display: none; }
  .inbox-shell.mobile-thread-open .thread-panel { display: flex; }
}
@media (max-width: 768px) {
  .sidebar { position: relative; inset: auto; width: 100%; height: auto; margin: 0; padding: 12px 16px; border-radius: 0; border-right: 0; border-bottom: 1px solid var(--concept-border); display: block; overflow: visible; }
  .sidebar .logo { width: 165px; min-width: 0; max-width: 165px; min-height: 44px; margin: 0; background-size: 155px auto; background-position: left center; }
  .panel-menu { display: block; }
  .panel-menu-toggle { position: absolute; right: 16px; top: 12px; display: flex; align-items: center; min-height: 44px; padding: 8px 15px; border: 1px solid #d5c6e0; border-radius: 8px; color: #64208d; background: #fff; cursor: pointer; font-weight: 600; }
  .panel-menu[open] .panel-menu-toggle { background: #f1e8fa; }
  .panel-menu[open] .panel-menu-toggle::after { content: ' −'; margin-left: 8px; }
  .sidebar nav { flex-direction: column; overflow: visible; padding: 20px 0 0; gap: 16px; }
  .sidebar nav a { width: 100%; }
  .sidebar-footer { display: block; }
  .main, .main.inbox-main { margin: 0; width: 100%; padding: 20px 16px 40px; }
  .panel-location { margin-bottom: 16px; font-size: 12px; }
  .main > header { flex-direction: column; align-items: stretch; }
  .header-actions { width: 100%; justify-content: flex-start; }
  .inbox-header .header-actions { flex-basis: auto; }
  .global-inbox-search { width: 100%; }
  .client-filter-slot, .client-filter, .client-filter select { min-width: 0; max-width: 100%; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reports-grid { grid-template-columns: 1fr; }
  .wizard-steps { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); }
  .wizard-steps a { min-width: 0; }
  .inbox-stats { width: 100%; gap: 6px; }
  .inbox-stats article { padding: 10px 8px; grid-template-columns: 1fr; }
  .inbox-stats .stat-icon { display: none; }
  .inbox-shell { min-height: 460px; height: calc(100dvh - 100px); }
  input, select, textarea, .composer-row textarea { font-size: 16px; }
  .table-container { max-width: 100%; overflow: auto; }
  .panel-page-outline nav { flex-direction: column; }
}
@media (max-width: 400px) { .cards { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; scroll-behavior: auto !important; transition: none !important; } }
