/* Forboze dashboard, visual layer.
   Loaded after style.css: it only restyles what admin.bundle.js already renders (same classes, same ids).
   Brand family of the landing: pearl canvas, navy, one orange signal, Sora for headings, Inter for text. */
@font-face{font-family:"Sora Variable";font-style:normal;font-display:swap;font-weight:100 800;src:url(../fonts/sora-latin-wght-normal.woff2) format("woff2-variations")}
@font-face{font-family:"Inter Variable";font-style:normal;font-display:swap;font-weight:100 900;src:url(../fonts/inter-latin-wght-normal.woff2) format("woff2-variations")}

:root{
  --bg:#f4f4f0;--panel:#fff;--panel2:#eff0eb;--ink:#0b1836;--muted:#566079;--line:#dfe0da;
  --accent:#ff6a13;--accent2:#ff8438;--accent-text:#b4430a;
  --navy:#0a1738;--navy-mid:#10245a;--navy-light:#1c4196;--focus:#1c4196;
  --on-navy:#fff;--on-navy-muted:rgba(255,255,255,.7);--on-navy-line:rgba(255,255,255,.16);
  --chip:#e6eaf5;--chip-ink:#10245a;--bar:#1c4196;
  --display:"Sora Variable",Sora,"Segoe UI",system-ui,sans-serif;
  --font:"Inter Variable",Inter,"Segoe UI",system-ui,sans-serif;
  --shadow:0 24px 70px rgba(10,23,56,.16);--radius:18px;color-scheme:light;
}
[data-theme=dark]{
  --bg:#060b1a;--panel:#0d1630;--panel2:#141f41;--ink:#eef2fb;--muted:#a3aecb;--line:#22305a;
  --accent-text:#ff9d61;--focus:#8fb0ff;--chip:#1b2a55;--chip-ink:#dfe7fb;--bar:#6f95f0;
  --shadow:0 24px 70px rgba(0,0,0,.5);color-scheme:dark;
}

/* ---------- Base ---------- */
.admin-body{background:var(--bg);color:var(--ink);font-family:var(--font);font-size:15px;line-height:1.55}
.admin-body h1,.admin-body h2,.admin-body h3{font-family:var(--display);font-weight:600;letter-spacing:-.022em;color:var(--ink)}
.admin-body button:focus-visible,.admin-body a:focus-visible,.admin-body input:focus-visible,.admin-body textarea:focus-visible,.admin-body select:focus-visible,.admin-body summary:focus-visible{outline:3px solid var(--focus);outline-offset:2px}
.admin-body .muted{color:var(--muted)}
.admin-logo{display:block;width:auto;height:44px}

/* ---------- Buttons ---------- */
.admin-body .button{gap:8px;min-height:44px;padding:0 22px;border-radius:999px;font-family:var(--display);font-weight:600;font-size:14px;letter-spacing:0;transition:background-color .16s,border-color .16s,color .16s}
.admin-body .button:hover{transform:none}
.admin-body .button.dark{background:var(--navy);color:#fff}
.admin-body .button.dark:hover{background:var(--navy-light)}
/* The one orange control on a screen is the action that saves or signs in. */
.admin-body .button.dark[type=submit],.admin-body .button.primary{background:var(--accent);color:#0b1836}
.admin-body .button.dark[type=submit]:hover,.admin-body .button.primary:hover{background:var(--accent2)}
.admin-body .button.outline{background:transparent;border:1px solid var(--line);color:var(--ink)}
.admin-body .button.outline:hover{background:var(--panel2)}
.admin-body .button.small{min-height:38px;padding:0 16px;font-size:13px}
.admin-body .button.danger{background:#fde7e3;color:#a8321f}
/* Second save on the same screen (follow-up notes, password) stays navy so only one control is orange. */
.admin-body #notes-form .button.dark[type=submit],.admin-body #password-form .button.dark[type=submit]{background:var(--navy);color:#fff}
.admin-body #notes-form .button.dark[type=submit]:hover,.admin-body #password-form .button.dark[type=submit]:hover{background:var(--navy-light)}
[data-theme=dark] .admin-body #notes-form .button.dark[type=submit],[data-theme=dark] .admin-body #password-form .button.dark[type=submit]{background:#eef2fb;color:#0a1738}
[data-theme=dark] .admin-body .button.dark:not([type=submit]){background:#eef2fb;color:#0a1738}
[data-theme=dark] .admin-body .button.dark:not([type=submit]):hover{background:#fff}
[data-theme=dark] .admin-body .button.danger{background:rgba(240,90,70,.18);color:#ff9d8f}
.admin-body .text-button{font-size:13.5px;color:var(--muted);text-decoration:underline;text-decoration-color:var(--line);text-underline-offset:4px}
.admin-body .text-button:hover{color:var(--ink);text-decoration-color:currentColor}

/* ---------- Forms ---------- */
.admin-body label{gap:7px;font-size:13px;font-weight:500;color:var(--muted);margin-bottom:16px}
.admin-body input,.admin-body textarea,.admin-body select{padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:var(--panel);color:var(--ink);font-size:15px;min-height:46px;transition:border-color .16s}
.admin-body textarea{line-height:1.6;min-height:0}
.admin-body input:hover,.admin-body textarea:hover,.admin-body select:hover{border-color:var(--muted)}
.admin-body input[type=checkbox]{width:17px;height:17px;min-height:17px;padding:0;accent-color:var(--accent)}
.admin-body input[type=file]{min-height:0;padding:10px 12px;font-size:13.5px}
.admin-body .check-label{font-size:13.5px;gap:10px;color:var(--ink);align-items:center}
.admin-body .form-grid{gap:16px}
.admin-body .form-error{font-size:13.5px;color:#a8321f}
[data-theme=dark] .admin-body .form-error{color:#ff9d8f}

/* ---------- Sidebar: the navy control side ---------- */
.admin-sidebar{width:252px;padding:26px 18px 22px;border-right:0;background:linear-gradient(185deg,#0a1738 0%,#0c1c47 62%,#10245a 100%);color:var(--on-navy)}
[data-theme=dark] .admin-sidebar{border-right:1px solid var(--line);background:#0a1738}
.admin-sidebar .brand{margin:0 6px 26px;letter-spacing:0;font-size:0;line-height:0}
.admin-sidebar .admin-logo{height:46px}
.workspace-badge{gap:11px;padding:12px;margin-bottom:22px;border:1px solid var(--on-navy-line);border-radius:14px}
.workspace-avatar{width:34px;height:34px;border-radius:10px;background:rgba(255,255,255,.1);color:#fff;font-family:var(--display);font-size:15px;font-weight:600}
.workspace-badge strong{font-size:13.5px;font-weight:600;color:#fff}
.workspace-badge small{font-size:12px;color:var(--on-navy-muted)}
.nav-eyebrow{display:none}
#admin-nav{gap:2px}
#admin-nav button{position:relative;gap:0;padding:11px 14px 11px 18px;border-radius:10px;font-size:14.5px;font-weight:500;color:var(--on-navy-muted);transition:background-color .14s,color .14s}
#admin-nav button svg{display:none}
#admin-nav button:hover{background:rgba(255,255,255,.07);color:#fff}
#admin-nav button.active,[data-theme=dark] #admin-nav button.active{background:rgba(255,255,255,.1);color:#fff;font-weight:600}
#admin-nav button.active::before{content:"";position:absolute;left:6px;top:11px;bottom:11px;width:3px;border-radius:3px;background:var(--accent)}
.sidebar-bottom{gap:10px;padding:20px 8px 0;font-size:13.5px;color:var(--on-navy-muted)}
.sidebar-bottom a:hover,.sidebar-bottom button:hover{color:#fff}
.sidebar-bottom button{min-height:0;font-size:13.5px}
.sidebar-bottom span{margin-top:10px;font-size:11.5px;letter-spacing:0;color:rgba(255,255,255,.45)}

/* ---------- Header ---------- */
.admin-main{margin-left:252px}
.admin-header{height:68px;padding:0 40px;background:var(--bg);border-bottom:1px solid var(--line);font-size:13.5px}
.admin-header>div{gap:10px}
#admin-breadcrumb{font-weight:600;color:var(--ink)}
.header-slash{color:var(--muted);opacity:.5}
.admin-header-actions{gap:10px!important}
.admin-body .lang-switch{padding:3px;border:1px solid var(--line);background:var(--panel)}
.admin-body .lang-switch button{min-height:30px;padding:0 12px;font-family:var(--display);font-size:12.5px;font-weight:600;color:var(--muted)}
.admin-body .lang-switch button.active{background:var(--navy);color:#fff}
[data-theme=dark] .admin-body .lang-switch button.active{background:#eef2fb;color:#0a1738}
/* Text controls instead of glyphs. The script only needs the buttons and their ids. */
#admin-theme,#mobile-menu{width:auto;height:36px;min-height:36px;padding:0 14px;border:1px solid var(--line);border-radius:999px;background:var(--panel);font-family:var(--display);font-size:12.5px;font-weight:600;color:var(--ink)}
#admin-theme:hover,#mobile-menu:hover{background:var(--panel2)}
#admin-theme::after{content:"Oscuro"}
:lang(en) #admin-theme::after{content:"Dark"}
[data-theme=dark] #admin-theme::after{content:"Claro"}
[data-theme=dark]:lang(en) #admin-theme::after{content:"Light"}
#mobile-menu::after{content:"Menú"}
:lang(en) #mobile-menu::after{content:"Menu"}
.owner-avatar{width:36px;height:36px;background:var(--navy);color:#fff;font-family:var(--display);font-size:12px;font-weight:600}
[data-theme=dark] .owner-avatar{background:var(--chip);color:var(--chip-ink)}

/* ---------- Page ---------- */
#admin-content{max-width:1340px;padding:36px 40px 64px}
.admin-title-row{align-items:flex-end;gap:24px;margin-bottom:28px}
.admin-title-row .eyebrow{display:none}
.admin-title-row h1{margin:0 0 8px;font-size:clamp(26px,2.5vw,34px);line-height:1.12}
.admin-title-row p{max-width:62ch;font-size:15px;color:var(--muted)}
.admin-title-row .button{font-size:14px}

/* ---------- Overview: one ledger instead of four separate cards ---------- */
.stat-grid{gap:0;margin-bottom:24px;border:1px solid var(--line);border-radius:var(--radius);background:var(--panel);overflow:hidden}
.stat-card,.stat-card.featured,[data-theme=dark] .stat-card.featured{padding:24px 26px 22px;border:0;border-left:1px solid var(--line);border-radius:0;background:none;color:var(--ink)}
.stat-card:first-child{border-left:0}
.stat-card .stat-top{margin-bottom:12px;font-size:13.5px;font-weight:500;color:var(--muted)}
.stat-icon{display:none}
.stat-number{font-family:var(--display);font-size:46px;font-weight:600;line-height:1;letter-spacing:-.035em;font-variant-numeric:tabular-nums}
.stat-foot{margin-top:10px;font-size:13px;color:var(--muted)}
/* "Por contactar" is the number that asks for action. */
.stat-card.featured{box-shadow:inset 0 3px 0 var(--accent)}
.stat-card.featured .stat-number{color:var(--accent-text)}

.dashboard-grid{gap:24px;margin-bottom:24px}
.overview-bottom{gap:24px}
.admin-body .panel{border:1px solid var(--line);border-radius:var(--radius);background:var(--panel)}
.panel-head{padding:20px 24px;gap:16px}
.panel-head h2{font-size:17px;letter-spacing:-.015em}
.panel-head p{margin-top:3px;font-size:13px;color:var(--muted)}
.panel-head .text-button{font-size:13.5px;white-space:nowrap}
.panel-head>.muted{font-size:13.5px}
.panel-content{padding:24px}

/* ORBY's corner keeps the navy of its panel on the landing. */
.overview-agent,[data-theme=dark] .overview-agent{padding:24px;border:0;border-radius:var(--radius);background:radial-gradient(120% 70% at 50% 34%,#1c4196 0%,#10245a 48%,#0a1738 100%);color:#fff}
[data-theme=dark] .overview-agent{box-shadow:inset 0 0 0 1px var(--line)}
.overview-agent .eyebrow{display:none}
.overview-agent h2,[data-theme=dark] .overview-agent h2{margin:0 0 6px;font-size:24px;color:#fff}
.overview-agent p{max-width:26ch;font-size:14px;color:var(--on-navy-muted)}
.overview-agent{display:flex;flex-direction:column}
.overview-agent .robot-stage{flex:1 1 auto;height:auto;min-height:210px;margin:-8px -24px -10px}
.overview-agent .robot-stage:after{border-color:rgba(255,255,255,.22)}
.overview-agent-footer{padding-top:14px;border-top:1px solid var(--on-navy-line);font-size:13.5px;color:var(--on-navy-muted)}
.overview-agent-footer strong{color:#fff}
.overview-agent-footer .text-button{color:#fff;text-decoration-color:rgba(255,255,255,.4)}

.service-bars{gap:16px}
.bar-row{grid-template-columns:minmax(120px,170px) 1fr 28px;gap:14px;font-size:14px;color:var(--ink)}
.bar-row>span:last-child{text-align:right;font-variant-numeric:tabular-nums;color:var(--muted)}
.bar-track{height:8px;background:var(--panel2)}
.bar-track i{background:var(--bar)}
.connection-row{gap:12px;padding:14px 0}
.connection-icon{display:none}
.connection-row strong{font-size:14.5px}
.connection-row small{font-size:13px;color:var(--muted)}

/* ---------- Tables ---------- */
.lead-table{font-size:14px}
.lead-table th{padding:13px 24px;background:var(--panel2);font-size:11.5px;font-weight:600;letter-spacing:.06em;color:var(--muted)}
.lead-table td{padding:15px 24px;font-variant-numeric:tabular-nums}
.lead-table tbody tr:hover{background:var(--bg)}
.person-cell{gap:12px}
.person-avatar{width:38px;height:38px;background:var(--chip);color:var(--chip-ink);font-family:var(--display);font-size:12.5px;font-weight:600}
.person-cell strong{font-size:14.5px}
.person-cell small{margin-top:1px;font-size:13px;color:var(--muted)}
.table-link{font-size:14px;font-weight:600;color:var(--accent-text);text-decoration-color:rgba(180,67,10,.3);text-underline-offset:4px}
.table-link:hover{text-decoration-color:currentColor}
.badge{padding:4px 11px;font-size:12.5px;font-weight:600;background:var(--panel2);color:var(--muted)}
.badge.new{background:#ffe7d8;color:#a33c08}
.badge.contacted,.badge.sent,.badge.ok{background:#e0f2e8;color:#17633f}
.badge.failed{background:#fde7e3;color:#a8321f}
.badge.pending,.badge.sending{background:#faeecb;color:#77560a}
[data-theme=dark] .badge.new{background:rgba(255,106,19,.18);color:#ffab7a}
[data-theme=dark] .badge.contacted,[data-theme=dark] .badge.sent,[data-theme=dark] .badge.ok{background:rgba(60,190,130,.16);color:#7fdcae}
[data-theme=dark] .badge.failed{background:rgba(240,90,70,.18);color:#ff9d8f}
[data-theme=dark] .badge.pending,[data-theme=dark] .badge.sending{background:rgba(240,190,60,.16);color:#f1cf74}
.empty-state{padding:52px 24px;font-size:15px;color:var(--ink)}
.empty-state .empty-icon{display:none}
.empty-state p{margin-top:6px;font-size:13.5px;color:var(--muted)}

.filter-row{gap:12px;margin-bottom:20px}
.search-field{max-width:380px}
.search-field svg{display:none}
.search-field input,.filter-row select{font-size:15px}
.search-field input{padding-left:14px}
.filter-row select{max-width:240px}

/* ---------- Settings screens ---------- */
.settings-layout{gap:24px}
.settings-layout .panel{margin-bottom:24px}
.settings-card{padding:28px}
.settings-card h2{margin:0 0 6px;font-size:19px}
.settings-card>p{margin-bottom:22px;font-size:13.5px;color:var(--muted)}
.settings-card .form-grid{gap:16px}
.settings-card textarea{font-size:14.5px;line-height:1.65}
.help-box{margin:14px 0 20px;padding:18px 20px;border:1px solid var(--line);border-radius:14px;background:var(--panel2);font-size:13.5px;color:var(--muted)}
.help-box strong{margin-bottom:5px;font-family:var(--display);font-size:14.5px;font-weight:600;color:var(--ink)}
.status-callout{padding:14px 18px;border-radius:14px;font-size:13.5px}
.settings-actions{gap:10px}
.settings-actions .button{min-height:42px;padding:0 18px;font-size:13.5px}
.model-list{gap:8px;max-height:230px}
.model-chip{padding:7px 12px;border-radius:999px;font-size:13px}
.preview-tag{padding:5px 11px;border-radius:999px;font-size:12.5px;font-weight:600;background:#faeecb;color:#77560a}
[data-theme=dark] .preview-tag{background:rgba(240,190,60,.16);color:#f1cf74}

.voice-grid{gap:24px}
.voice-card{padding:28px;border-radius:var(--radius)}
.voice-card .voice-heading{gap:14px;margin-bottom:24px}
.voice-flag{width:46px;height:46px;border-radius:12px;background:var(--navy);color:#fff;font-family:var(--display);font-size:13px;font-weight:600;letter-spacing:.04em}
[data-theme=dark] .voice-flag{background:var(--chip);color:var(--chip-ink)}
.voice-card h2{font-size:20px}
.voice-card .voice-heading p{font-size:13.5px}

.catalog-item{margin-bottom:12px;border-radius:16px}
.catalog-item>summary{gap:14px;padding:18px 22px}
.catalog-item>summary:hover{background:var(--bg)}
.catalog-item>summary svg{display:none}
.catalog-item>summary strong{font-family:var(--display);font-size:15.5px;font-weight:600}
.catalog-edit{padding:22px 24px 24px}
.catalog-lang-heading{margin-bottom:16px;font-size:12px;font-weight:600;letter-spacing:.06em;color:var(--accent-text)}

.file-drop{padding:26px;border:1px dashed var(--muted);border-radius:16px;background:var(--panel2)}
.file-drop input{font-size:13.5px}
.file-drop p{font-size:13.5px}
/* The robot is shown on its own stage, as on the landing. */
.admin-body .panel:has(#admin-robot-stage){border:0;background:radial-gradient(120% 62% at 50% 44%,#1c4196 0%,#10245a 48%,#0a1738 100%)}
[data-theme=dark] .admin-body .panel:has(#admin-robot-stage){box-shadow:inset 0 0 0 1px var(--line)}
.panel:has(#admin-robot-stage) .panel-head{border-bottom-color:var(--on-navy-line)}
.panel:has(#admin-robot-stage) .panel-head h2{color:#fff}
.panel:has(#admin-robot-stage) .panel-head p{color:var(--on-navy-muted)}
#admin-robot-stage{height:350px;min-height:280px}
#admin-robot-stage:after{border-color:rgba(255,255,255,.22)}
.gesture-buttons{gap:8px;padding:4px 0 0}
.gesture-buttons button{min-height:34px;padding:0 13px;border:1px solid var(--on-navy-line);border-radius:999px;background:rgba(255,255,255,.08);font-size:13px;color:#fff}
.gesture-buttons button:hover{background:rgba(255,255,255,.16)}

/* ---------- Contact detail ---------- */
.admin-body .contact-dialog{padding:32px;border:1px solid var(--line);border-radius:22px;background:var(--panel);color:var(--ink);box-shadow:var(--shadow)}
.admin-body .contact-dialog::backdrop{background:rgba(6,11,26,.6);backdrop-filter:blur(4px)}
.admin-body .dialog-header h2{margin:0 0 10px;font-size:26px}
.admin-body .dialog-header .eyebrow{display:none}
.admin-body .contact-dialog p{font-size:14px}
.lead-meta{gap:18px;margin:22px 0}
.lead-meta small{margin-bottom:4px;font-size:12.5px}
.lead-meta strong,.lead-meta a{font-size:14.5px;font-weight:500}
.lead-meta a{color:var(--accent-text);text-decoration:underline;text-underline-offset:3px}
.lead-details{padding:16px 18px;border-radius:12px;font-size:14px;line-height:1.6}
.lead-actions{gap:10px;margin:20px 0}
.danger-note{font-size:13px;color:var(--muted)}
.detail-history{max-height:320px}
.admin-body .history-message{padding:11px 15px;border-radius:14px;font-size:14px}
.admin-body .history-message small{font-size:11.5px}
.admin-body .history-message.user,[data-theme=dark] .admin-body .history-message.user{background:var(--navy-mid);color:#fff}
.admin-body .history-message.user small{color:rgba(255,255,255,.7)}
.admin-body #toast{padding:14px 22px;border-radius:14px;background:var(--navy);color:#fff;font-size:14px;box-shadow:var(--shadow)}
[data-theme=dark] .admin-body #toast{background:#eef2fb;color:#0a1738}

/* ---------- Sign in ---------- */
.login-story{padding:44px 60px;background:radial-gradient(90% 70% at 78% 46%,#1c4196 0%,#10245a 40%,#0a1738 80%);color:#fff}
.login-story .brand{font-size:0;line-height:0;letter-spacing:0}
.login-story .admin-logo{height:58px}
.login-story .eyebrow{display:none}
.login-story h1{margin:0 0 22px;font-family:var(--display);font-weight:600;font-size:clamp(38px,4.4vw,66px);line-height:1.06;letter-spacing:-.035em;color:#fff}
.login-story h1 span{color:inherit}
.login-story p{font-size:16px;line-height:1.6;color:var(--on-navy-muted)}
.login-bottom{font-size:13px;letter-spacing:0;color:rgba(255,255,255,.5)}
.login-card{max-width:420px;padding:32px}
.login-card>.eyebrow{display:none}
.login-card h2{margin:0 0 10px;font-size:34px}
.login-card .muted{margin-bottom:26px;font-size:14.5px}
.login-card .button{margin-top:6px;min-height:50px;font-size:15px}
.login-card .text-button{margin-top:24px;font-size:13.5px}

/* ---------- Narrower screens (same breakpoints as the original layout) ---------- */
@media(max-width:1150px){
  .admin-sidebar{width:220px;padding:24px 14px 20px}
  .admin-main{margin-left:220px}
  .admin-header{padding:0 26px}
  #admin-content{padding:30px 26px 56px}
  .stat-card,.stat-card.featured{padding:20px 20px 18px}
  .stat-number{font-size:40px}
}
@media(max-width:960px){
  .admin-sidebar{width:204px;padding:22px 12px 18px}
  .admin-sidebar .admin-logo{height:40px}
  .admin-main{margin-left:204px}
  .admin-header{padding:0 20px}
  #admin-content{padding:26px 20px 52px}
  .stat-grid{grid-template-columns:repeat(2,1fr)}
  .stat-card:nth-child(odd){border-left:0}
  .stat-card:nth-child(n+3){border-top:1px solid var(--line)}
  .panel-content{padding:20px}
  .voice-card{padding:22px}
  .bar-row{grid-template-columns:minmax(96px,130px) 1fr 26px;gap:10px}
}
@media(max-width:700px){
  .admin-body{font-size:15px}
  /* The menu opens below the header so the Menu button stays reachable to close it again. */
  .admin-sidebar{top:60px;width:264px;padding:22px 16px 20px;box-shadow:20px 30px 60px rgba(6,11,26,.35)}
  .admin-header{position:sticky;top:0;z-index:30}
  .admin-sidebar .admin-logo{height:44px}
  .admin-main{margin-left:0}
  .admin-header{height:60px;padding:0 14px}
  .admin-header>div{gap:8px}
  .admin-header>div:first-child>.muted,.header-slash{display:none}
  .admin-header-actions{gap:8px!important}
  #admin-content{padding:24px 16px 48px}
  .admin-title-row{align-items:flex-start;flex-wrap:wrap;gap:14px}
  .admin-title-row h1{font-size:26px}
  .admin-title-row p{max-width:none;font-size:14.5px}
  .admin-title-row .button{min-height:40px;padding:0 16px;font-size:13.5px}
  .stat-card,.stat-card.featured{padding:18px 16px 16px}
  .stat-number{font-size:34px}
  .stat-card .stat-top{font-size:13px}
  .settings-card{padding:20px}
  .panel-head{padding:16px 18px}
  .lead-table th,.lead-table td{padding-left:18px;padding-right:18px}
  .filter-row select{max-width:none;flex:1}
  .search-field{max-width:none;flex-basis:100%}
  .admin-body input,.admin-body textarea,.admin-body select{font-size:16px}
  .admin-body .contact-dialog{padding:22px}
  .login-card{padding:28px 22px}
}
