/* ============================================================
   REUTER IT NETWORKS — Sistema de Facturación
   Hoja de estilos principal
   ============================================================

   PALETA DE COLORES:
   --teal-dark:    #0D3D3F  (cabeceras, botones primarios)
   --teal-mid:     #2096A6  (acentos, bordes)
   --teal-light:   #1AB7EE  (degradados, highlights)
   --naranja:      #F4A31C  (acentos secundarios)
   --bg-suave:     #E6F7FD  (fondos de paneles)
   --gris-filas:   #EAF6FB  (filas alternas de tablas)
   --texto-dark:   #0D2B2D  (texto principal)
   --texto-mid:    #507078  (texto secundario)

   ESTRUCTURA DE ARCHIVOS JS:
   utils.js → state.js → auth.js → empresa.js →
   clientes.js → tareas.js → reintegros.js →
   facturas.js → ui.js → presupuestos.js
   ============================================================ */

*{box-sizing:border-box;margin:0;padding:0}
body{font-family:Segoe UI,Tahoma,sans-serif;background:radial-gradient(circle at top,#31312d 0%,#242320 38%,#1b1a18 100%);color:#f1eee8;font-size:16px;line-height:1.45}

/* ── UTILIDADES ── */
.hidden{display:none!important}

/* ── LAYOUT PRINCIPAL ── */
.shell{max-width:1640px;margin:0 auto;padding:34px 28px 56px}

/* ── BARRA SUPERIOR ── */
.topbar{display:flex;align-items:center;justify-content:space-between;margin-bottom:22px;flex-wrap:wrap;gap:26px}

/* ── MARCA / LOGO ── */
.brand{display:flex;align-items:center;gap:10px;margin-right:auto}
.brand-mark{width:34px;height:34px;border-radius:10px;background:linear-gradient(180deg,#d9ede8,#bddbd2);display:flex;align-items:center;justify-content:center;box-shadow:0 10px 20px rgba(0,0,0,.2);overflow:hidden}
.brand-mark img{display:block;width:100%;height:100%;object-fit:contain;border-radius:10px}
.brand.has-logo{gap:0;margin-right:auto}
.brand.has-logo .brand-mark{width:auto;height:auto;max-height:75px;background:transparent;box-shadow:none;border-radius:0;overflow:visible}
.brand.has-logo .brand-mark img{width:388px;height:auto;max-width:100%;max-height:88px;object-fit:contain;border-radius:0}
.brand.has-logo .brand-title{display:none}

/* ── AUTENTICACIÓN ── */
.auth-hero .brand.has-logo .brand-mark{max-height:96px}
.auth-hero .brand.has-logo .brand-mark img{width:470px;max-width:100%;max-height:108px}

/* ── BARRA SUPERIOR ── */
.topbar h1{font-size:24px;font-weight:600}
.tabs{display:flex;gap:8px;flex-wrap:wrap}
.tab,.btn{padding:11px 18px;border:1px solid #5a5650;border-radius:14px;font-size:15px;cursor:pointer;background:#2e2c29;color:#efece6;transition:all .18s ease}
.tab:hover,.btn:hover{border-color:#7d776f;background:#35322f}
.tab.active{background:#393632;color:#ffffff;border-color:#7d776f;font-weight:600}
.netplanner-tab{border-color:#1c6a83;background:linear-gradient(135deg,#10222d,#1a302f)}
.netplanner-logo-text{font-family:Consolas,monospace;letter-spacing:.08em;font-weight:800;color:#93dbe5}
.netplanner-logo-text span{color:#f2a51c}

/* ── BOTONES ── */
.btn-main{background:#1d9e75;color:#fff;border-color:#1d9e75;font-weight:600}
.btn-main:hover{background:#168160;border-color:#168160}
.btn-edit{background:#35322f;color:#f5f1eb;border-color:#59544e;font-size:13px;padding:6px 12px}
.btn-danger{background:#352726;color:#ffd7d4;border-color:#6d4b48;font-size:13px;padding:6px 12px}
.btn-pdf{background:#4d3b21;color:#ffe4b8;border-color:#71542a;font-weight:600}
.btn-s1{background:#302b44;color:#d7d1ff;border-color:#5f57a2;font-size:13px;padding:6px 12px}
.btn-s2{background:#203830;color:#c9f3e4;border-color:#2d7b60;font-size:13px;padding:6px 12px}
.btn-ghost{background:transparent}
.btn-install{background:#d6efe7;color:#0f493a;border-color:#d6efe7;font-weight:700}
.btn-install:hover{background:#bfe3d8;border-color:#bfe3d8}
.stats-row{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px;margin-bottom:18px}
.stat,.card{background:rgba(49,47,43,.9);border:1px solid #4b4640;border-radius:20px;box-shadow:0 12px 28px rgba(0,0,0,.18)}
.stat{padding:24px 22px;text-align:center;min-width:0}

/* ── ESTADÍSTICAS ── */
.stat-n{display:block;font-size:clamp(24px,2.1vw,36px);font-weight:700;line-height:1.08;letter-spacing:-.02em;overflow-wrap:anywhere}
.stat-n span{font-size:inherit}
.stat-l{font-size:13px;color:#b8b0a5;margin-top:6px}

/* ── CARDS Y PANELES ── */
.card{padding:26px 28px;margin-bottom:18px}
.db-card{padding:17px 22px}
.db-row{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap}
.db-pill{display:inline-flex;align-items:center;padding:4px 10px;border-radius:999px;font-size:11px;font-weight:700}
.db-pill.sql{background:#e1f5ee;color:#085041}
.db-pill.local{background:#faeeda;color:#633806}
.db-pill.loading{background:#e6f1fb;color:#0c447c}
.db-title{font-size:17px;font-weight:700;margin-top:8px}
.db-msg{font-size:14px;color:#cdc5b9;margin-top:4px}
.db-meta{font-size:12px;color:#9d9589;margin-top:4px}
.panel{display:none}
.panel.active{display:block}

/* ── ENCABEZADOS DE SECCIÓN ── */
.sec-hdr{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;gap:10px}
.sec-hdr h2{font-size:21px;font-weight:700}
.form-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:14px;margin-bottom:14px}

/* ── FORMULARIOS ── */
.fg{display:flex;flex-direction:column;gap:6px}
.fg label{font-size:14px;color:#c5beb2}
.fg input,.fg select,.fg textarea{width:100%;font-size:16px;padding:13px 14px;border:1px solid #555049;border-radius:14px;background:#34312d;color:#f2eee9}
.fg input[type="date"]{
  color-scheme:dark;
  padding-right:44px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='17' rx='2' ry='2'/%3E%3Cline x1='16' y1='2.5' x2='16' y2='6'/%3E%3Cline x1='8' y1='2.5' x2='8' y2='6'/%3E%3Cline x1='3' y1='9' x2='21' y2='9'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 14px center;
  background-size:17px 17px;
}
.fg input[type="date"]::-webkit-calendar-picker-indicator{opacity:.01;cursor:pointer}
.fg input[type="date"]::-webkit-datetime-edit,.fg input[type="date"]::-webkit-datetime-edit-fields-wrapper,.fg input[type="date"]::-webkit-datetime-edit-text,.fg input[type="date"]::-webkit-datetime-edit-month-field,.fg input[type="date"]::-webkit-datetime-edit-day-field,.fg input[type="date"]::-webkit-datetime-edit-year-field{color:#f2eee9}
.fg input::placeholder,.fg textarea::placeholder{color:#8f877c}
.fg textarea{min-height:88px;resize:vertical}
.fg textarea.dictating{border-color:#2ab186;box-shadow:0 0 0 1px rgba(42,177,134,.24)}
.field-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.dictation-tools{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.mic-btn{display:inline-flex;align-items:center;gap:8px;padding:7px 12px}
.mic-btn svg{width:14px;height:14px;flex-shrink:0}
.mic-btn.listening{background:#1d9e75;border-color:#1d9e75;color:#fff}
.mic-status{font-size:11px;color:#b8b0a5}
.mic-status.error{color:#ffd7d4}
.row{display:flex;align-items:flex-start;gap:14px;padding:14px 0;border-bottom:1px solid #4a443e}
.row:last-child{border-bottom:none}

/* ── TAREAS ── */
.task-date{min-width:100px;padding:10px 12px;border-radius:16px;background:#2a2825;border:1px solid #4a443e;text-align:center;flex-shrink:0}
.task-date-day{font-size:26px;font-weight:700;line-height:1;color:#fff2df}
.task-date-month{font-size:10px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:#cbb690;margin-top:4px}
.task-date-year{font-size:10px;color:#9d9589;margin-top:2px}
.row-info{flex:1;min-width:0}
.row-title{font-size:17px;font-weight:700;color:#f3efe8}
#recent-tasks .row-title{font-size:18px;font-weight:500;line-height:1.42;letter-spacing:0;color:#fff7ec}
.text-preserve{white-space:pre-line}
.row-meta{font-size:13px;color:#b8b0a5;margin-top:5px;line-height:1.6}
.badge{display:inline-flex;align-items:center;font-size:12px;padding:4px 9px;border-radius:999px;font-weight:700;white-space:nowrap}
.b-pend{background:#faeeda;color:#633806}
.b-fact{background:#eaf3de;color:#27500a}
.b-s1{background:#eeedfe;color:#3c3489}
.b-s2{background:#e1f5ee;color:#085041}
.b-own{background:#fde8dc;color:#8b4318}
.b-share{background:#e7eff8;color:#224d78}
.av{width:38px;height:38px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:700;flex-shrink:0}
.empty{text-align:center;padding:32px 10px;font-size:14px;color:#b8b0a5}
.filter-row,.month-filter{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-bottom:12px}
.filter-row label,.month-filter label{font-size:14px;color:#c5beb2}
.filter-row select,.month-filter select{font-size:15px;padding:10px 13px;border-radius:13px;border:1px solid #555049;background:#34312d;color:#f2eee9}
.period-total-chip{display:inline-flex;align-items:center;gap:8px;padding:9px 14px;border-radius:14px;border:1px solid #575149;background:#2a2825;font-size:13px;color:#d8d1c5}
.period-total-chip strong{font-size:30px;line-height:1;color:#fff3df}

/* ── SOCIOS ── */
.socio-toggle{display:flex;gap:6px;margin-top:4px}
.s-btn{padding:8px 16px;border-radius:13px;border:1px solid #555049;font-size:13px;cursor:pointer;background:#2e2c29;color:#d4ccc0}
.s-btn.sel-1{background:#eeedfe;color:#3c3489;border-color:#afa9ec;font-weight:700}
.s-btn.sel-2{background:#e1f5ee;color:#085041;border-color:#5dcaa5;font-weight:700}
.check-row{display:flex;flex-direction:column;gap:6px;margin:-2px 0 12px}
.check-label{display:inline-flex;align-items:center;gap:8px;font-size:12px;color:#efece6;flex-wrap:wrap}
.check-label input{width:16px;height:16px;accent-color:#1d9e75}

/* ── BACKEND / SOCIOS ── */
.backend-hero{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-bottom:18px}

/* ── SOCIOS ── */
.socio-card{border-radius:20px;padding:22px;border:1px solid #4b4640}
.socio-card.s1{background:linear-gradient(180deg,#352f49,#2f2a40);border-color:#6f68b8}
.socio-card.s2{background:linear-gradient(180deg,#213a31,#1c3129);border-color:#3b8a70}
.sc-name{font-size:17px;font-weight:700;margin-bottom:5px}
.socio-card.s1 .sc-name,.socio-card.s1 .sc-total{color:#ece8ff}
.socio-card.s2 .sc-name,.socio-card.s2 .sc-total{color:#dbfff3}
.sc-cuit,.sc-sub{font-size:12px}
.socio-card.s1 .sc-cuit,.socio-card.s1 .sc-sub{color:#bdb7ff}
.socio-card.s2 .sc-cuit,.socio-card.s2 .sc-sub{color:#9ce2ca}
.sc-total{font-size:34px;font-weight:700;margin-top:12px}
.sc-label{font-size:12px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;opacity:.9;margin-top:12px}
.sc-total-net{font-size:30px;font-weight:700;margin-top:8px}
.sc-breakdown{font-size:13px;margin-top:7px}
.share-summary{border:1px solid #4b4640;border-radius:20px;padding:20px;margin:0 0 16px;background:linear-gradient(135deg,#282621,#20201d);display:grid;grid-template-columns:1.4fr 1fr 1fr;gap:16px;align-items:center}
.share-total{font-size:32px;font-weight:800;margin-top:8px;color:#f3efe8}
.share-box{border:1px solid #4b4640;border-radius:16px;padding:16px;background:#24221f}
.share-box .amount{font-size:26px;font-weight:800;margin-top:6px;color:#dff8ef}
.share-transfer{grid-column:1/-1;display:flex;justify-content:space-between;align-items:center;gap:16px;background:linear-gradient(135deg,#233126,#1d2820);border-color:#35694d}
.share-transfer .amount{color:#fff1c9}
.history-summary{border-bottom:1px solid #4a443e;padding-bottom:18px;margin-bottom:18px}
.history-summary:last-child{border-bottom:none;padding-bottom:0;margin-bottom:0}
.bar-wrap{height:10px;border-radius:999px;background:#403b36;overflow:hidden;margin:10px 0}
.bar-s1{height:100%;background:#7f77dd;border-radius:999px}
.bar-s2{height:100%;background:#1d9e75;border-radius:999px}
.month-table{width:100%;border-collapse:collapse;font-size:15px}
.month-table th{text-align:left;font-size:13px;color:#b8b0a5;font-weight:700;padding:10px 0;border-bottom:1px solid #4a443e}
.month-table td{padding:11px 0;border-bottom:1px solid #4a443e}
.month-table td:not(:first-child){text-align:right}
.inv-wrap{background:#f8fbff;border:1px solid #d8e4f0;border-radius:28px;box-shadow:0 20px 38px rgba(0,0,0,.18);overflow:hidden}
.inv-hdr{display:flex;justify-content:space-between;align-items:flex-start;gap:22px;padding:34px 34px 28px;background:linear-gradient(118deg,#0f2f5d 0 56%,#1974ca 56% 71%,#26b7ee 71% 100%);color:#fff}
.inv-body{padding:30px 34px 34px}
.inv-company{display:flex;align-items:center;gap:16px;max-width:62%}
.inv-company-copy{display:flex;flex-direction:column;gap:4px}
.inv-company-name{font-size:32px;font-weight:800;letter-spacing:.05em;text-transform:uppercase}
.inv-company-line{font-size:14px;line-height:1.6;color:rgba(255,255,255,.88)}
.inv-title-box{min-width:240px;text-align:right;padding-top:2px}
.inv-kicker{font-size:11px;font-weight:700;letter-spacing:.18em;text-transform:uppercase;color:rgba(255,255,255,.78)}
.inv-title{font-size:38px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;margin-top:6px}
.inv-number{font-size:20px;font-weight:700;margin-top:10px}
.inv-title-meta{font-size:12px;line-height:1.7;color:rgba(255,255,255,.86);margin-top:6px}
.inv-letter{
  font-size:56px;
  font-weight:900;
  color:#0f2f5d;
  background:#ffffff;
  border-radius:12px;
  padding:6px 14px;
  display:inline-block;
}
.inv-panel-grid{display:grid;grid-template-columns:1.05fr .95fr;gap:18px;margin-bottom:22px}
.inv-panel{background:#ffffff;border:1px solid #d8e4f0;border-radius:22px;padding:20px 22px}
.inv-panel-label{font-size:11px;font-weight:800;letter-spacing:.16em;text-transform:uppercase;color:#5a7798;margin-bottom:10px}
.inv-panel-title{font-size:22px;font-weight:800;color:#123256;margin-bottom:8px}
.inv-panel-line{font-size:14px;line-height:1.7;color:#39516f}
.inv-panel-line strong{color:#173960}
.inv-meta-strip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:18px}
.inv-meta-card{background:#eef5fb;border:1px solid #d3e2ef;border-radius:18px;padding:12px 14px}
.inv-meta-label{font-size:10px;font-weight:800;letter-spacing:.14em;text-transform:uppercase;color:#67819f}
.inv-meta-value{font-size:16px;font-weight:800;color:#123256;margin-top:6px}
.inv-meta-sub{font-size:12px;color:#5e7591;margin-top:4px;line-height:1.5}
.inv-table{width:100%;border-collapse:separate;border-spacing:0;font-size:15px;margin-bottom:14px;table-layout:fixed;min-width:680px;background:#fff;border:1px solid #d8e4f0;border-radius:22px;overflow:hidden}
.inv-table th,.inv-table td{padding:15px 16px;word-wrap:break-word}
.inv-desc{white-space:pre-line;line-height:1.45}
.inv-table thead th{text-align:left;font-size:13px;color:#fff;background:#0f2f5d;border-bottom:none;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.inv-table tbody td{border-bottom:1px solid #e2ecf5;color:#23405f;background:#fff}
.inv-table tbody tr:last-child td{border-bottom:none}
.inv-table th:last-child,.inv-table td:last-child{text-align:right;width:140px}
.inv-table th:first-child,.inv-table td:first-child{width:120px}
.table-scroll{width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
.month-table{min-width:620px}
.inv-table{min-width:680px}
.inv-summary{display:grid;grid-template-columns:1.15fr .85fr;gap:16px;align-items:start;margin-top:8px}
.inv-notes-card,.inv-total-card{background:#fff;border:1px solid #d8e4f0;border-radius:22px;padding:20px 22px}
.inv-total-card{padding:0;overflow:hidden}
.inv-notes-title{font-size:11px;font-weight:800;letter-spacing:.16em;text-transform:uppercase;color:#5a7798;margin-bottom:10px}
.inv-total-row{display:flex;justify-content:space-between;gap:12px;padding:16px 20px;font-size:14px;color:#39516f;border-bottom:1px solid #e2ecf5}
.inv-total-row:last-child{border-bottom:none}
.inv-total-row strong{color:#15365a}
.inv-total-row.main{background:#0f2f5d;color:#fff;font-size:21px;font-weight:800}
.inv-total-row.main strong{color:#fff}
.inv-footer{margin-top:16px;padding:16px 18px;border:1px solid #d8e4f0;border-radius:18px;background:#f2f7fc;font-size:12px;color:#5d7591;line-height:1.7}
.inv-wrap .fg label{color:#5a7798}
.inv-wrap .fg textarea{background:#fff;border-color:#c6d5e4;color:#123256}
.inv-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:18px;flex-wrap:wrap;padding-top:18px;border-top:1px solid #d8e4f0}
.bk-clients-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.reimburse-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-bottom:16px}
.reimburse-col{border:1px solid #4b4640;border-radius:20px;padding:18px;background:#2f2d2a}
.reimburse-col.s1{background:linear-gradient(180deg,rgba(53,47,73,.38),rgba(47,42,64,.22));border-color:#6f68b8}
.reimburse-col.s2{background:linear-gradient(180deg,rgba(33,58,49,.38),rgba(28,49,41,.22));border-color:#3b8a70}
.reimburse-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:10px}
.reimburse-name{font-size:16px;font-weight:700}
.reimburse-total{font-size:26px;font-weight:700}
.reimburse-list{display:flex;flex-direction:column;gap:8px;margin-top:12px}
.reimburse-item{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:12px 14px;border:1px solid #4a443e;border-radius:16px;background:#2b2926}
.reimburse-item-meta{font-size:12px;color:#b8b0a5;margin-top:4px;line-height:1.5}
.history-reimburse-title{font-size:22px;font-weight:600;line-height:1.45;letter-spacing:.01em;color:#fff7ec}
.history-reimburse-total{font-size:18px;font-weight:700;line-height:1.35;color:#fff3df}
.divider{height:1px;background:#4a443e;margin:16px 0}
.logo-upload{display:grid;grid-template-columns:110px 1fr;gap:14px;align-items:center;margin-bottom:14px}
.logo-box{width:110px;height:110px;border:1px dashed #666057;border-radius:18px;background:#2a2825;display:flex;align-items:center;justify-content:center;overflow:hidden}
.logo-box img{max-width:100%;max-height:100%;object-fit:contain}
.logo-empty{font-size:11px;color:#9e968a;text-align:center;padding:10px}
.logo-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}

/* ── FACTURAS ── */
.invoice-logo{width:auto;
  height:auto;
  border:none;
  background:none;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  overflow:visible;
  flex-shrink:0;
  backdrop-filter:none;}
.invoice-logo img{height:80px;
  width:auto;
  max-width:320px;
  object-fit:contain;}
.hint{font-size:12px;color:#9d9589;line-height:1.45}
.session-strip{display:flex;align-items:center;justify-content:flex-end;gap:10px;margin:-4px 0 14px}
.session-chip{display:inline-flex;align-items:center;gap:8px;padding:9px 14px;border-radius:999px;background:#2b2926;border:1px solid #4b4640;font-size:13px;color:#d9d2c6}

/* ── AUTENTICACIÓN ── */
.auth-screen{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px 16px}
.auth-card{width:min(960px,100%);background:rgba(49,47,43,.94);border:1px solid #4b4640;border-radius:26px;box-shadow:0 20px 40px rgba(0,0,0,.25);padding:34px}
.auth-grid{display:grid;grid-template-columns:1.1fr .9fr;gap:20px}
.auth-hero{padding:10px 8px 10px 2px}
.auth-hero h1{font-size:40px;line-height:1.05;margin-bottom:12px}
.auth-hero p{color:#c5beb2;font-size:16px;line-height:1.6;max-width:500px}
.auth-panel{background:#2b2926;border:1px solid #4b4640;border-radius:22px;padding:24px}
.auth-panel h2{font-size:20px;margin-bottom:12px}
.auth-panel p{font-size:13px;color:#b8b0a5;line-height:1.55;margin-bottom:14px}
.auth-form{display:flex;flex-direction:column;gap:10px}
.auth-message{min-height:18px;font-size:12px;color:#ffd7d4}
.auth-ok{color:#c9f3e4}
.setup-users{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.setup-user{border:1px solid #4b4640;border-radius:16px;padding:12px;background:#312f2b}
.setup-user h3{font-size:14px;margin-bottom:8px}
.access-list{display:flex;flex-direction:column;gap:8px}
.access-item{display:flex;justify-content:space-between;gap:10px;padding:10px 12px;border:1px solid #4a443e;border-radius:14px;background:#2b2926}
.access-meta{font-size:11px;color:#b8b0a5;margin-top:2px}
.modal-overlay{display:none;position:fixed;inset:0;background:rgba(0,0,0,.35);z-index:50;align-items:flex-start;justify-content:center;padding-top:42px}
.modal-overlay.open{display:flex}
.modal{background:#2f2d2a;border-radius:20px;border:1px solid #555049;padding:24px;width:min(540px,94vw)}
.modal h3{font-size:18px;font-weight:700;margin-bottom:16px}
.modal-btns{display:flex;gap:8px;justify-content:flex-end;margin-top:14px}

/* ── RESPONSIVE ── */
@media (min-width:1200px){

/* ── LAYOUT PRINCIPAL ── */
  .shell{max-width:1720px;padding:40px 42px 64px}

/* ── BARRA SUPERIOR ── */
  .topbar h1{font-size:28px}
  .tab,.btn{font-size:17px;padding:13px 20px}

/* ── ENCABEZADOS DE SECCIÓN ── */
  .sec-hdr h2{font-size:24px}

/* ── FORMULARIOS ── */
  .fg label,.filter-row label,.month-filter label{font-size:16px}
  .fg input,.fg select,.fg textarea,.filter-row select,.month-filter select{font-size:18px}
  .db-title{font-size:20px}
  .db-msg{font-size:16px}
  .db-meta,.hint,.row-meta,.reimburse-item-meta,.access-meta,.sc-cuit,.sc-sub,.period-total-chip,.session-chip,.auth-panel p{font-size:15px;line-height:1.55}
  .row-title{font-size:20px}
  #recent-tasks .row-title{font-size:19px}

/* ── TAREAS ── */
  .task-date-day{font-size:30px}
  .task-date-month,.task-date-year{font-size:11px}

/* ── ESTADÍSTICAS ── */
  .stat-n{font-size:clamp(30px,2.4vw,42px)}
  .stat-l{font-size:15px}
  .badge{font-size:13px;padding:5px 10px}
  .reimburse-name{font-size:18px}
  .reimburse-total{font-size:30px}
  .reimburse-item{padding:14px 16px}
  .reimburse-item div[style*="font-size:13px"]{font-size:17px !important;line-height:1.4 !important}
  .reimburse-item div[style*="font-size:12px"]{font-size:15px !important;line-height:1.45 !important}
  .history-reimburse-title{font-size:24px}
  .history-reimburse-total{font-size:20px}
  .month-table{font-size:17px}
  .month-table th{font-size:15px}
  .sc-name{font-size:20px}
  .sc-label{font-size:14px}
  .sc-total{font-size:40px}
  .sc-total-net{font-size:35px}
  .sc-breakdown{font-size:16px}
  .share-total{font-size:38px}
  .share-box .amount{font-size:30px}
  .period-total-chip{font-size:15px}
  .period-total-chip strong{font-size:38px}
  .empty{font-size:16px}
  .access-item{padding:12px 14px}
}

/* ── RESPONSIVE ── */
@media (max-width:900px){
  .stats-row,.backend-hero{grid-template-columns:1fr 1fr}
}
@media (max-width:680px){

/* ── LAYOUT PRINCIPAL ── */
  .shell{padding:18px 12px 28px}

/* ── CARDS Y PANELES ── */
  .card,.auth-card,.modal{padding:16px}

/* ── BARRA SUPERIOR ── */
  .topbar{align-items:flex-start;gap:14px}
  .tabs{width:100%;flex-wrap:nowrap;overflow-x:auto;padding-bottom:4px;scrollbar-width:thin}
  .tab{flex:0 0 auto;white-space:nowrap}

/* ── MARCA / LOGO ── */
  .brand,.brand.has-logo{margin-right:0}
  .brand.has-logo .brand-mark img{width:270px;max-width:100%;max-height:66px}

/* ── AUTENTICACIÓN ── */
  .auth-hero .brand.has-logo .brand-mark img{width:300px;max-width:100%;max-height:74px}
  .stats-row{display:flex;overflow-x:auto;gap:10px;padding-bottom:4px;scrollbar-width:thin}
  .stats-row .stat{flex:0 0 220px}

/* ── BACKEND / SOCIOS ── */
  .backend-hero{grid-template-columns:1fr}
  .share-summary{grid-template-columns:1fr}
  .share-transfer{flex-direction:column;align-items:flex-start}
  .form-row,.logo-upload{grid-template-columns:1fr}
  .db-row,.session-strip,.row,.access-item,.modal-btns,.sec-hdr{flex-direction:column;align-items:stretch}
  .row-info{width:100%}

/* ── TAREAS ── */
  .task-date{min-width:0;width:100%;display:flex;align-items:center;justify-content:center;gap:8px}
  .task-date-month,.task-date-year{margin-top:0}
  .session-chip{width:100%;justify-content:center}

/* ── AUTENTICACIÓN ── */
  .auth-card{border-radius:20px}
  .inv-hdr{flex-direction:column}
  .inv-body{padding:18px 16px 20px}
  .inv-company,.inv-title-box{max-width:none;min-width:0}
  .inv-company{flex-direction:column;align-items:flex-start}
  .inv-company-name{font-size:22px}
  .inv-title-box{text-align:left}
  .inv-title{font-size:28px}
  .inv-panel-grid,.inv-meta-strip,.inv-summary{grid-template-columns:1fr}
  .reimburse-grid,.bk-clients-grid{grid-template-columns:1fr}
  .inv-total-card{order:2}
  .inv-notes-card{order:1}
  .inv-actions{flex-direction:column}
  .inv-actions .btn{width:100%}
  .logo-box{margin:0 auto}
  .auth-hero{padding:0}
  .auth-hero h1{font-size:28px}
  .month-filter,.filter-row,.dictation-tools{align-items:stretch}
  .month-filter select,.filter-row select,.month-filter .btn,.filter-row .btn{width:100%}
  .bk-clients-grid{grid-template-columns:1fr}
  .auth-grid,.setup-users{grid-template-columns:1fr}
}

/* ── RESPONSIVE ── */
@media (max-width:520px){

/* ── LAYOUT PRINCIPAL ── */
  .shell{padding:14px 10px 22px}
  .stat{padding:14px 12px}

/* ── ESTADÍSTICAS ── */
  .stat-n{font-size:clamp(20px,5vw,22px)}
  .stats-row .stat{flex-basis:200px}
  .tab,.btn{padding:10px 12px}
  .field-head{align-items:stretch}
  .mic-btn{justify-content:center;width:100%}
  .mic-status{line-height:1.4}

/* ── FACTURAS ── */
  .invoice-logo img{height:60px;}

/* ── BARRA SUPERIOR ── */
  .topbar{margin-bottom:14px}
}

/* ── VALIDACIÓN DE FORMULARIOS ── */
.field-error {
  border-color: #e53e3e !important;
  background: #fff5f5 !important;
}
.error-msg {
  color: #e53e3e;
  font-size: 11px;
  margin-top: 3px;
}
.field-ok {
  border-color: #38a169 !important;
}
