:root{color-scheme:light;--green:#176b50;--green-2:#2e9e72;--green-dark:#0f3d2e;--ink:#1f2937;--muted:#687280;--line:#dfe7e3;--soft:#f3f6f5;--white:#fff;--error:#b42318;--success:#087443;--shadow:0 18px 55px rgba(15,61,46,.08)}
*{box-sizing:border-box}html{min-height:100%;scroll-behavior:smooth;background:var(--soft)}body{margin:0;min-height:100vh;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);background:radial-gradient(ellipse at 95% 0%,rgba(46,158,114,.10),transparent 30%),linear-gradient(135deg,#f8faf9 0%,#edf2f1 100%);font-size:14px;line-height:1.5}.app-shell{width:min(100% - 36px,1400px);margin:0 auto;padding:25px 0 22px}.site-header{display:flex;align-items:center;justify-content:space-between;gap:24px;margin:0 auto 22px;max-width:1320px}.brand-lockup{display:flex;align-items:center;gap:14px;color:inherit;text-decoration:none;min-width:0}.brand-monogram{font-size:34px;font-weight:800;letter-spacing:-2.4px;line-height:1;color:var(--green-dark);white-space:nowrap}.brand-monogram span{color:var(--green-2)}.brand-divider{width:1px;height:44px;background:#cbd7d1}.brand-copy{display:flex;flex-direction:column;gap:2px}.brand-name{font-size:16px;line-height:1.2;font-weight:800;letter-spacing:.01em;color:#142d2a}.brand-name strong{font-size:10px;letter-spacing:.14em;margin-left:3px}.brand-tagline-en{font-size:8px;letter-spacing:.12em;font-weight:700;color:#4b5e59}.brand-tagline-es{font-size:8px;letter-spacing:.055em;color:var(--muted)}.header-pill{display:flex;align-items:center;gap:8px;padding:9px 13px;border:1px solid #dce7e1;border-radius:999px;background:#fff;color:#4f665d;font-size:11px;font-weight:600}.header-pill-dot{width:7px;height:7px;border-radius:50%;background:var(--green-2)}.panel{width:100%;margin:0 auto;background:var(--white);border:1px solid rgba(207,220,213,.85);border-radius:22px;padding:clamp(22px,3vw,34px);box-shadow:var(--shadow);position:relative;overflow:hidden}.panel:before{content:"";position:absolute;inset:0 0 auto;height:5px;background:linear-gradient(90deg,var(--green-dark),var(--green),var(--green-2))}.panel-topline{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:13px}.eyebrow{font-size:10px;font-weight:800;letter-spacing:.16em;color:var(--green);text-transform:uppercase}.secure-label{font-size:10px;color:#557168;display:flex;align-items:center;gap:6px}.secure-dot{width:7px;height:7px;border-radius:50%;background:var(--green-2);box-shadow:0 0 0 3px #e5f4ec}h1{margin:0;font-size:clamp(28px,4vw,35px);line-height:1.18;letter-spacing:-.045em;font-weight:800;color:#172a2c}.intro{margin:10px 0 22px;color:var(--muted);font-size:13px;line-height:1.65}.auth-panel:not(:has(#dashboard:not(.hidden))){max-width:640px;margin:4vh auto}.auth-intro{max-width:480px}.auth-kicker{display:inline-block;margin:2px 0 9px;color:var(--green-2);font-size:10px;letter-spacing:.18em;font-weight:800}.auth-form{display:flex;flex-direction:column;gap:10px;max-width:480px}.auth-form label{display:block;font-size:12px;font-weight:700;color:#243a34;margin:0 0 6px}.input-wrap{display:flex;align-items:center;gap:10px;width:100%;height:49px;border:1px solid #d3dfd9;border-radius:10px;background:#fff;padding:0 13px;transition:border-color .18s,box-shadow .18s,background .18s}.input-wrap:focus-within{border-color:var(--green-2);box-shadow:0 0 0 4px rgba(46,158,114,.12);background:#fcfffd}.input-wrap svg{flex:0 0 18px;width:18px;height:18px;stroke:#73857d;fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.input-wrap input{border:0;outline:0;background:transparent;min-width:0;width:100%;font:inherit;color:var(--ink);height:100%;font-size:13px}.input-wrap input::placeholder{color:#9aa7a1}.primary-button,.secondary-button{width:100%;min-height:46px;border-radius:10px;font:inherit;font-size:13px;font-weight:700;cursor:pointer;transition:transform .15s,background .15s,box-shadow .15s}.primary-button{margin-top:7px;border:1px solid var(--green);background:linear-gradient(120deg,var(--green-dark),var(--green));color:white;box-shadow:0 7px 16px rgba(23,107,80,.14);display:flex;align-items:center;justify-content:center;gap:10px}.primary-button span{font-size:18px;line-height:1}.primary-button:hover{background:var(--green);box-shadow:0 9px 20px rgba(23,107,80,.2);transform:translateY(-1px)}.primary-button:disabled{opacity:.65;cursor:wait;transform:none}.actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:15px;max-width:480px}.text-button{appearance:none;border:0;background:transparent;padding:4px 0;color:var(--green);font:inherit;font-size:12px;font-weight:700;cursor:pointer;text-decoration:none}.text-button:hover{text-decoration:underline;color:var(--green-dark)}.notice{position:fixed;top:22px;right:22px;z-index:9999;width:min(420px,calc(100vw - 32px));margin:0;padding:15px 18px;border:1px solid #b6dfca;border-left:4px solid var(--green-2);border-radius:12px;background:#fff;color:#176b50;font-size:13px;line-height:1.55;overflow-wrap:anywhere;box-shadow:0 14px 40px rgba(15,61,46,.18);opacity:0;transform:translateY(-12px);pointer-events:none;transition:opacity .25s ease,transform .25s ease}.notice.notice-visible{opacity:1;transform:translateY(0);pointer-events:auto}.notice.notice-leaving{opacity:0;transform:translateY(-8px);pointer-events:none}.notice.error{border-color:#f0c4bf;border-left-color:var(--error);background:#fff4f2;color:var(--error)}.hidden{display:none!important}.auth-benefits{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;max-width:480px;margin:26px 0 0;padding-top:20px;border-top:1px solid #edf1ef}.auth-benefits>div{display:flex;align-items:center;gap:10px}.benefit-icon{display:grid;place-items:center;flex:0 0 34px;width:34px;height:34px;border-radius:10px;background:#e8f4ee;color:var(--green);font-weight:800}.auth-benefits b,.auth-benefits small{display:block}.auth-benefits b{font-size:11px;color:#243a34}.auth-benefits small{font-size:10px;color:var(--muted);line-height:1.45;margin-top:2px}.panel-footer{display:flex;align-items:center;gap:11px;border-top:1px solid #e7eeea;margin-top:25px;padding-top:16px}.footer-mark{flex:0 0 27px;width:27px;height:27px;display:grid;place-items:center;border-radius:8px;background:var(--green);color:#fff;font-size:15px;font-weight:800}.panel-footer p{margin:0;font-size:10px;line-height:1.7;color:#7a8882}.panel-footer b{color:#53665e;font-weight:700}.dashboard{margin-top:5px}.dashboard-divider{height:1px;background:var(--line);margin:15px 0 20px}.dashboard-layout{display:grid;grid-template-columns:218px minmax(0,1fr);gap:24px;align-items:stretch}.dashboard-sidebar{display:flex;flex-direction:column;min-height:700px;background:linear-gradient(180deg,#102d2d 0%,#0b2028 100%);border-radius:16px;padding:18px 12px;color:#fff}.sidebar-brand{display:flex;align-items:center;gap:10px;padding:6px 8px 22px;border-bottom:1px solid rgba(255,255,255,.12)}.sidebar-logo{display:grid;place-items:center;width:38px;height:38px;border-radius:11px;background:var(--green-2);font-size:22px;font-weight:800}.sidebar-brand b,.sidebar-brand small{display:block}.sidebar-brand b{font-size:16px;letter-spacing:.08em}.sidebar-brand small{font-size:8px;letter-spacing:.16em;color:#c4d7d1}.sidebar-nav{display:grid;gap:6px;margin-top:20px}.nav-item{display:flex;align-items:center;gap:12px;padding:11px 12px;border-radius:9px;color:#d7e2df;text-decoration:none;font-size:12px;font-weight:600;transition:background .15s,color .15s}.nav-item>span{width:20px;text-align:center;font-size:18px;line-height:1}.nav-item:hover,.nav-item.active{background:linear-gradient(100deg,#176b50,#218661);color:#fff}.sidebar-signout{display:flex;align-items:center;gap:10px;margin-top:auto;padding:12px 10px;border:0;border-top:1px solid rgba(255,255,255,.12);background:transparent;color:#d7e2df;text-align:left;font:inherit;font-size:12px;cursor:pointer}.sidebar-signout span{font-size:18px}.dashboard-main{min-width:0}.dashboard-topbar{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:2px 0 20px;border-bottom:1px solid #e8eeeb}.dashboard-topbar h2{margin:4px 0 3px;font-size:25px;letter-spacing:-.04em;color:#182b2c}.dashboard-topbar p,.section-title-row p{margin:0;color:var(--muted);font-size:12px}.profile-chip{display:flex;align-items:center;gap:9px;max-width:290px;padding:7px 10px 7px 7px;border:1px solid #e4ebe7;border-radius:999px;background:#fff;font-size:11px;color:#44574f}.profile-chip #userEmail{margin:0;overflow-wrap:anywhere}.profile-avatar{display:grid;place-items:center;flex:0 0 32px;width:32px;height:32px;border-radius:50%;background:var(--green);color:#fff;font-weight:800}.dashboard-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:18px 0 25px}.summary-card{position:relative;display:flex;flex-direction:column;gap:3px;padding:15px;border:1px solid #e3ebe6;border-radius:12px;background:#fff;box-shadow:0 3px 10px rgba(15,61,46,.025)}.summary-icon{display:grid;place-items:center;width:30px;height:30px;border-radius:9px;background:#e7f4ed;color:var(--green);font-size:17px;margin-bottom:5px}.summary-card small{font-size:10px;color:var(--muted)}.summary-card>b{font-size:24px;line-height:1.3;color:#172d2a;letter-spacing:-.04em}.summary-card>span:last-child{font-size:10px;color:#7a8882}.workspace-section{margin:0 0 26px;scroll-margin-top:20px}.section-title-row{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:13px}.section-title-row h3{margin:4px 0 4px;font-size:18px;letter-spacing:-.025em;color:#1d312c}.catalog-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.catalog-card{display:flex;flex-direction:column;min-width:0;padding:17px;border:1px solid #e0e9e4;border-radius:13px;background:#fff;box-shadow:0 3px 12px rgba(18,54,42,.025)}.catalog-card-top{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:14px}.catalog-app-icon{display:grid;place-items:center;width:48px;height:48px;border-radius:12px;overflow:hidden}.catalog-app-icon img{width:40px;height:40px;object-fit:contain}.gmail-icon{background:#fff1ef;color:#c63b32}.outlook-icon{background:#eaf3ff;color:#1769aa}.catalog-tag{font-size:9px;font-weight:700;color:#537168;background:#eef6f1;border-radius:999px;padding:5px 8px}.catalog-card h4{font-size:14px;line-height:1.45;margin:0 0 6px;color:#19362e}.catalog-card>p{font-size:11px;color:var(--muted);line-height:1.6;margin:0 0 18px;min-height:36px}.catalog-card-footer{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:auto;padding-top:12px;border-top:1px solid #edf1ef}.catalog-availability{display:flex;align-items:center;gap:6px;color:#277454;font-size:10px;font-weight:700}.catalog-availability i{width:6px;height:6px;border-radius:50%;background:#2e9e72}.catalog-action{font-size:10px;font-weight:700;color:var(--green);text-decoration:none}.catalog-action span{font-size:15px;margin-left:4px}.catalog-action:hover{text-decoration:underline}.products-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:0 0 14px}.product-license{display:flex;align-items:flex-start;gap:11px;padding:13px;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:0 3px 12px rgba(18,54,42,.025);min-width:0}.product-license-icon{display:grid;place-items:center;flex:0 0 40px;width:40px;height:40px;border-radius:10px;font-weight:800;font-size:19px;overflow:hidden}.product-license-icon img{display:block;width:100%;height:100%;max-width:40px;max-height:40px;object-fit:contain}.product-license-copy{flex:1;min-width:0}.product-license-copy h4{margin:0 0 4px;font-size:12px;line-height:1.4;color:#18332c}.product-license-copy p{margin:0 0 8px;color:var(--muted);font-size:10px;line-height:1.5}.product-status{display:inline-flex;align-items:center;gap:6px;border-radius:999px;padding:4px 8px;font-size:9px;font-weight:700}.product-status:before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}.status-not-purchased{background:#f0f2f1;color:#67736d}.status-pending{background:#fff5df;color:#956200}.status-active{background:#e3f7eb;color:#087443}.status-blocked{background:#fff0ee;color:#b42318}.stat{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:46px;padding:11px 13px;background:#f5f8f6;border:1px solid #edf2ef;border-radius:10px;margin:8px 0}.stat span{display:flex;align-items:center;gap:9px;color:#5e6e67;font-size:11px}.stat b{font-size:11px;text-align:right;color:#243a34;overflow-wrap:anywhere}.stat-icon{display:inline-block;width:8px;height:8px;border-radius:3px;background:#2e9e72;box-shadow:0 0 0 3px #e2f2ea}.hint{margin:12px 0 15px;font-size:11px;color:#687a72;line-height:1.65}.purchase-box{margin:22px 0 25px;padding:18px;border:1px solid #dfe9e3;border-radius:13px;background:#f9fcfa;scroll-margin-top:20px}.purchase-box>.hint{margin:0 0 13px}.purchase-form{display:flex;flex-direction:column;gap:10px}.purchase-form>label:not(.purchase-option){font-size:11px;font-weight:700;color:#243a34;margin-top:3px}.purchase-option{display:flex;align-items:flex-start;gap:10px;padding:11px;border:1px solid #dce7e0;border-radius:10px;background:#fff;cursor:pointer}.purchase-option input{margin:3px 0 0;accent-color:var(--green);width:16px;height:16px;flex:0 0 16px}.purchase-option span{display:flex;flex-direction:column;gap:3px}.purchase-option b{font-size:11px;color:#20372f}.purchase-option small{font-size:10px;color:var(--muted)}.purchase-form textarea{width:100%;resize:vertical;min-height:64px;border:1px solid #d3dfd9;border-radius:9px;padding:10px 12px;font:inherit;font-size:11px;color:var(--ink);background:white}.purchase-form textarea:focus{outline:2px solid rgba(46,158,114,.22);border-color:var(--green-2)}.requests-list{display:grid;gap:9px;margin-top:12px}.request-card{padding:12px;border:1px solid var(--line);border-radius:10px;background:white}.request-card-head{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}.request-card b{font-size:11px;color:#20372f}.request-card p{margin:5px 0;font-size:10px;color:var(--muted);overflow-wrap:anywhere}.request-state{font-size:9px;font-weight:800;border-radius:20px;padding:4px 8px;background:#fff3d8;color:#885a00;white-space:nowrap}.request-state.status-approved,.request-state.status-activated{background:#e7f7ed;color:#176b50}.request-state.status-rejected{background:#fff0ef;color:#b42318}.request-controls{display:flex;gap:8px;flex-wrap:wrap;margin-top:9px}.request-controls select,.request-controls button{font:inherit;font-size:10px;border:1px solid #d3dfd9;border-radius:8px;padding:7px 9px;background:white;color:#243a34}.request-controls button{cursor:pointer;background:#edf5f0;font-weight:700}.admin-panel{margin-top:22px}.admin-panel .section-heading{margin-bottom:6px}.help-card{display:flex;align-items:center;gap:13px;padding:16px;border:1px solid #dfe9e3;border-radius:12px;background:linear-gradient(110deg,#f6fbf8,#fff);scroll-margin-top:20px}.help-icon{display:grid;place-items:center;flex:0 0 36px;width:36px;height:36px;border-radius:10px;background:#e4f2e9;color:var(--green);font-weight:800;font-size:18px}.help-card h3{margin:0 0 3px;font-size:12px;color:#20372f}.help-card p{margin:0;font-size:10px;color:var(--muted)}.help-card>a{margin-left:auto;white-space:nowrap;font-size:10px;font-weight:700;color:var(--green);text-decoration:none}.help-card>a span{font-size:14px}.workspace-footer{display:flex;justify-content:space-between;gap:12px;padding-top:16px;margin-top:22px;border-top:1px solid #e8eeeb;color:#89958f;font-size:10px}.page-footer{display:flex;justify-content:space-between;gap:12px;width:100%;margin:14px auto 0;padding:0 4px;color:#84928c;font-size:10px;letter-spacing:.015em}
@media(max-width:1000px){.dashboard-layout{grid-template-columns:185px minmax(0,1fr);gap:17px}.dashboard-summary{gap:8px}.summary-card{padding:12px}.catalog-grid,.products-list{grid-template-columns:1fr}.catalog-card>p{min-height:0}}
@media(max-width:700px){.app-shell{width:min(100% - 22px,1400px);padding-top:15px}.site-header{align-items:flex-start;gap:12px;margin-bottom:15px}.brand-monogram{font-size:28px}.brand-divider{height:36px}.brand-name{font-size:13px}.brand-tagline-en,.brand-tagline-es{font-size:6px}.header-pill{font-size:9px;padding:7px 9px}.panel{border-radius:17px;padding:20px 16px}.panel-topline{align-items:flex-start}.secure-label{font-size:9px}.auth-panel:not(:has(#dashboard:not(.hidden))){margin:2vh auto}.auth-benefits{grid-template-columns:1fr}.dashboard-layout{grid-template-columns:1fr;gap:14px}.dashboard-sidebar{min-height:0;padding:10px;border-radius:12px}.sidebar-brand{padding:3px 5px 11px}.sidebar-logo{width:32px;height:32px}.sidebar-nav{display:flex;gap:5px;overflow-x:auto;margin-top:10px;padding-bottom:3px}.nav-item{flex:0 0 auto;padding:9px 10px;font-size:10px}.nav-item>span{width:auto}.sidebar-signout{margin-top:8px;padding:8px 5px 2px;border-top:0;font-size:10px}.dashboard-topbar{align-items:flex-start;flex-direction:column}.dashboard-topbar h2{font-size:22px}.profile-chip{max-width:100%}.dashboard-summary{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:13px 0 21px}.summary-card{padding:9px}.summary-card small{font-size:9px}.summary-card>b{font-size:20px}.summary-card>span:last-child{font-size:9px}.summary-icon{width:26px;height:26px}.catalog-grid,.products-list{grid-template-columns:1fr}.catalog-card{padding:14px}.catalog-card-footer{align-items:flex-start;flex-direction:column}.help-card{align-items:flex-start;flex-wrap:wrap}.help-card>a{margin-left:49px}.workspace-footer,.page-footer{font-size:9px}.stat{align-items:flex-start}.stat span{max-width:65%}.request-card-head{flex-wrap:wrap}}
@media(max-width:420px){.site-header{flex-direction:column}.header-pill{align-self:flex-start}.dashboard-summary{grid-template-columns:1fr}.summary-card{display:grid;grid-template-columns:32px 1fr;column-gap:8px;align-items:center}.summary-icon{grid-row:span 2;margin:0}.summary-card>b{font-size:18px}.summary-card>span:last-child{grid-column:2}.actions{align-items:flex-start}.page-footer{flex-direction:column}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important;scroll-behavior:auto!important}}
/* En sesión iniciada, el pie de autenticación no se duplica sobre el panel. */
.auth-panel:has(#dashboard:not(.hidden)) > .panel-footer{display:none}


/* TADS_LOGIN_DESIGN_V1 */
:root {
  --tads-green: #176B50;
  --tads-light-green: #2E9E72;
  --tads-dark-green: #0F3D2E;
  --tads-charcoal: #1F2937;
  --tads-gray: #6B7280;
  --tads-light-gray: #E5E7EB;
  --tads-white: #FFFFFF;
}
body {
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--tads-charcoal);
  background: #F7FAF9;
}
.app-shell {
  width: min(100% - 48px, 1440px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 38px 0;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(420px, .96fr);
  align-items: center;
  column-gap: clamp(30px, 5vw, 90px);
}
.site-header {
  display: block;
  min-width: 0;
  align-self: center;
  border: 0;
  padding: 0;
  background: transparent;
}
.brand-lockup {
  display: inline-flex;
  max-width: 100%;
  flex-wrap: wrap;
  align-items: center;
}
.brand-monogram {
  color: var(--tads-charcoal);
  font-size: clamp(54px, 6vw, 92px);
  font-weight: 850;
  letter-spacing: -0.075em;
  line-height: .95;
}
.brand-monogram span {
  background: linear-gradient(135deg, var(--tads-green) 0 48%, var(--tads-light-green) 49% 100%);
  color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
}
.brand-copy { gap: 6px; }
.brand-name {
  color: var(--tads-charcoal);
  letter-spacing: .14em;
}
.brand-tagline-en {
  color: var(--tads-charcoal);
  letter-spacing: .12em;
}
.brand-tagline-es { display: none; }
.brand-divider { background: var(--tads-light-gray); }
.header-pill { display: none !important; }
.tads-login-story {
  margin-top: 54px;
  max-width: 610px;
}
.tads-hero-title {
  margin: 0 0 14px;
  color: var(--tads-charcoal);
  font-size: clamp(32px, 3.4vw, 48px);
  line-height: 1.13;
  letter-spacing: -.035em;
}
.tads-hero-copy {
  margin: 0 0 30px;
  color: #526071;
  font-size: 19px;
  line-height: 1.55;
}
.tads-feature {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 20px 0;
}
.tads-feature-icon {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #E6F3EE;
  color: var(--tads-green);
  font-size: 26px;
  font-weight: 700;
}
.tads-feature strong { color: var(--tads-charcoal); font-size: 17px; }
.tads-feature p { margin: 4px 0 0; color: var(--tads-gray); font-size: 14px; }
.auth-panel {
  width: 100%;
  max-width: 590px;
  justify-self: center;
  align-self: center;
  margin: 0;
  padding: clamp(26px, 3vw, 48px);
  border: 1px solid #E7ECE9;
  border-radius: 18px;
  background: var(--tads-white);
  box-shadow: 0 18px 55px rgba(15, 61, 46, .12);
}
.panel-topline { margin-bottom: 22px; }
.auth-intro h1 {
  color: var(--tads-charcoal);
  font-size: clamp(28px, 3vw, 38px);
  letter-spacing: -.035em;
}
.auth-intro .intro { color: #526071; line-height: 1.5; }
.auth-form label { color: var(--tads-charcoal); }
.input-wrap {
  border-color: #D9E0E5;
  border-radius: 8px;
  min-height: 52px;
}
.input-wrap:focus-within {
  border-color: var(--tads-light-green);
  box-shadow: 0 0 0 3px rgba(46, 158, 114, .12);
}
.primary-button {
  min-height: 52px;
  border-radius: 8px;
  background: var(--tads-green);
  color: #FFFFFF;
  font-size: 16px;
}
.primary-button:hover { background: var(--tads-dark-green); }
.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}
.text-button { color: var(--tads-green); font-weight: 600; }
.panel-footer { margin-top: 24px; }
.panel-footer p { color: var(--tads-gray); }
@media (max-width: 900px) {
  .app-shell {
    width: min(100% - 32px, 650px);
    padding: 28px 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 28px;
  }
  .site-header { width: 100%; }
  .brand-monogram { font-size: 56px; }
  .tads-login-story { margin-top: 28px; }
  .tads-hero-title { font-size: 32px; }
  .tads-feature { margin: 14px 0; }
  .auth-panel { max-width: none; }
}
@media (max-width: 480px) {
  .app-shell { width: calc(100% - 24px); padding: 18px 0; gap: 20px; }
  .brand-lockup { align-items: flex-start; }
  .brand-divider { display: none; }
  .brand-copy { margin-left: 12px; }
  .brand-monogram { font-size: 48px; }
  .brand-name { font-size: 12px; }
  .brand-tagline-en { font-size: 8px; letter-spacing: .06em; }
  .tads-login-story { margin-top: 22px; }
  .tads-hero-title { font-size: 28px; }
  .tads-hero-copy { font-size: 16px; }
  .auth-panel { padding: 22px 18px; border-radius: 14px; }
  .actions { align-items: flex-start; }
}

/* TADS_LOGIN_BACKGROUND_V1 */
body {
  background-color: #F7FAF9;
  background-image: url("/tads-login-background.png");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}
.app-shell {
  background: transparent;
}
.site-header,
.auth-panel {
  position: relative;
  z-index: 1;
}
.brand-lockup {
  cursor: default !important;
  text-decoration: none !important;
  outline: none !important;
  box-shadow: none !important;
}
.brand-lockup:hover,
.brand-lockup:focus,
.brand-lockup:active {
  outline: none !important;
  box-shadow: none !important;
  filter: none !important;
  transform: none !important;
}
.brand-monogram {
  color: #1F2937;
  text-decoration: none;
  text-shadow: none;
}
.brand-monogram span {
  background: linear-gradient(135deg, #176B50 0%, #176B50 48%, #2E9E72 49%, #2E9E72 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.auth-panel {
  background: rgba(255, 255, 255, .97);
}
@media (max-width: 900px) {
  body {
    background-attachment: scroll;
    background-position: center top;
  }
}

/* TADS_LOGIN_SCOPE_FIX_V1 */
/* El fondo corporativo solo corresponde a la pantalla de acceso. */
body:has(.auth-panel:not(:has(#dashboard:not(.hidden)))) {
  background-image: url("/tads-login-background.png");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* Cuando el dashboard está visible, el fondo y la distribución
   del inicio de sesión no deben interferir con el portal. */
body:has(#dashboard:not(.hidden)) {
  background: #F4F7F6 !important;
  background-image: none !important;
  background-attachment: scroll !important;
}
body:has(#dashboard:not(.hidden)) .app-shell {
  display: block;
  width: min(100% - 48px, 1400px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px 0;
}
body:has(#dashboard:not(.hidden)) .site-header {
  display: none;
}
body:has(#dashboard:not(.hidden)) .auth-panel {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 24px;
  box-shadow: none;
  background: transparent;
  border: 0;
}
body:has(#dashboard:not(.hidden)) .tads-login-story {
  display: none;
}
body:has(#dashboard:not(.hidden)) .panel-topline,
body:has(#dashboard:not(.hidden)) .auth-intro,
body:has(#dashboard:not(.hidden)) #authForm,
body:has(#dashboard:not(.hidden)) #authActions,
body:has(#dashboard:not(.hidden)) .panel-footer {
  display: none !important;
}
body:has(#dashboard:not(.hidden)) #dashboard {
  display: block;
}
@media (max-width: 700px) {
  body:has(#dashboard:not(.hidden)) .app-shell {
    width: calc(100% - 24px);
    padding: 12px 0;
  }
  body:has(#dashboard:not(.hidden)) .auth-panel {
    padding: 12px;
  }
}

/* Distribución estable de Carga de documentos. Cada control ocupa únicamente
   su columna y los tres tipos de carga conservan una lectura uniforme. */
#accountingDteForm {
  grid-template-columns: minmax(170px, 180px) repeat(2, minmax(0, 1fr));
  width: min(100%, 820px);
  gap: 14px;
}

#accountingDteForm .accounting-date-control input {
  min-width: 170px;
}

#accountingCatalogImportForm,
#accountingOpeningBalancesForm {
  display: grid;
  align-items: end;
  width: min(100%, 920px);
  max-width: 100%;
  gap: 14px;
}

#accountingCatalogImportForm {
  grid-template-columns: minmax(235px, 300px) minmax(260px, 1fr);
}

#accountingOpeningBalancesForm {
  grid-template-columns: minmax(235px, 300px) minmax(155px, 170px) minmax(240px, 1fr);
}

#accountingCatalogImportForm > *,
#accountingOpeningBalancesForm > * {
  min-width: 0;
}

#accountingOpeningBalancesForm .accounting-date-control {
  width: 100%;
}

#accountingOpeningBalancesForm .accounting-date-control input,
#accountingCatalogImportForm .secondary-button,
#accountingOpeningBalancesForm .secondary-button {
  box-sizing: border-box;
  width: 100%;
  min-height: 48px;
}

#accountingCatalogImportForm .secondary-button,
#accountingOpeningBalancesForm .secondary-button {
  white-space: normal;
  font-weight: 800;
}

.accounting-document-panel summary:focus-visible {
  outline: 2px solid #238861;
  outline-offset: -2px;
}

@media (max-width: 760px) {
  #accountingDteForm,
  #accountingCatalogImportForm,
  #accountingOpeningBalancesForm {
    grid-template-columns: 1fr;
    width: 100%;
  }

  #accountingDteForm .accounting-date-control input {
    min-width: 0;
  }
}

.accounting-vat-month { display: grid; gap: 5px; min-width: 190px; color: #456158; font-size: 12px; font-weight: 800; }
.accounting-vat-month select { min-height: 42px; padding: 8px 10px; border: 1px solid #c8d9d0; border-radius: 8px; color: #173b32; background: #fff; }
.accounting-vat-books { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.accounting-vat-books article { display: grid; align-content: start; gap: 9px; min-height: 220px; padding: 18px; border: 1px solid #d8e9df; border-radius: 12px; background: #f8fcf9; }
.accounting-vat-books span { color: #147152; font-size: 11px; font-weight: 900; letter-spacing: .08em; }
.accounting-vat-books h5 { margin: 0; color: #173b32; font-size: 17px; }
.accounting-vat-books p { margin: 0 0 7px; color: #5c756c; font-size: 13px; line-height: 1.45; }
.accounting-vat-books .secondary-button { align-self: end; width: 100%; min-height: 44px; }
.accounting-vat-empty { margin: 15px 0 0; }
.accounting-vat-signature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 420px); gap: 18px; align-items: end; margin-top: 16px; padding: 17px; border: 1px solid #d8e9df; border-radius: 12px; background: #f8fcf9; }
.accounting-vat-signature h5 { margin: 5px 0; color: #173b32; font-size: 16px; }
.accounting-vat-signature p { margin: 0; color: #5c756c; font-size: 13px; line-height: 1.45; }
.accounting-vat-signature form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.accounting-vat-signature label { display: grid; gap: 5px; color: #456158; font-size: 12px; font-weight: 800; }
.accounting-vat-signature input { width: 100%; min-height: 42px; box-sizing: border-box; padding: 8px 10px; border: 1px solid #c8d9d0; border-radius: 8px; color: #173b32; background: #fff; }
.accounting-vat-signature .secondary-button { min-height: 42px; white-space: nowrap; }
@media (max-width: 760px) { .accounting-vat-signature, .accounting-vat-signature form { grid-template-columns: 1fr; } }
@media (max-width: 850px) { .accounting-vat-books { grid-template-columns: 1fr; } }

/* TADS_DASHBOARD_FOOTER_FIX_V1 */
/* El pie exterior solo se usa en la pantalla de acceso. */
body:has(#dashboard:not(.hidden)) .page-footer {
  display: none !important;
}

/* Marca lateral limpia, sin apariencia de botón. */
.dashboard-sidebar .sidebar-brand {
  min-height: 66px;
  align-items: center;
  padding: 6px 8px 18px;
}
.dashboard-sidebar .sidebar-logo {
  flex: 0 0 38px;
  border-radius: 9px;
  background: #2E9E72;
  color: #FFFFFF;
  display: grid;
  place-items: center;
}
.dashboard-sidebar .sidebar-brand b {
  color: #FFFFFF;
  letter-spacing: .08em;
}
.dashboard-sidebar .sidebar-brand small {
  color: #D4E4DE;
  letter-spacing: .14em;
}
.dashboard-sidebar .sidebar-signout {
  margin-top: auto;
}

/* TADS_SIDEBAR_WORDMARK_V1 */
.dashboard-sidebar .sidebar-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  padding: 8px 8px 18px;
  min-width: 0;
  overflow: visible;
}
.dashboard-sidebar .sidebar-wordmark {
  display: inline-block;
  white-space: nowrap;
  color: #1F2937;
  font-size: 36px;
  font-weight: 850;
  line-height: 1.08;
  letter-spacing: -1.7px;
  padding: 0 3px 2px;
  cursor: default;
  border: 0;
  outline: 0;
  box-shadow: none;
  text-decoration: none;
}
.dashboard-sidebar .sidebar-wordmark span {
  display: inline-block;
  background: linear-gradient(135deg, #176B50 0%, #176B50 48%, #2E9E72 49%, #2E9E72 100%);
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  letter-spacing: -1px;
}
.dashboard-sidebar .sidebar-brand-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-width: 100%;
  min-width: 0;
}
.dashboard-sidebar .sidebar-brand-copy b {
  color: #FFFFFF;
  font-size: 10px;
  letter-spacing: .20em;
}
.dashboard-sidebar .sidebar-brand-copy small {
  color: #C4D7D1;
  font-size: 6px;
  line-height: 1.5;
  letter-spacing: .045em;
  overflow-wrap: anywhere;
}

/* TADS_IMAGE_LOGOS_V1 */
.brand-lockup {
  display: inline-flex;
  width: min(100%, 510px);
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  text-decoration: none !important;
  cursor: default;
}
.brand-lockup:hover,
.brand-lockup:focus,
.brand-lockup:active {
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  transform: none !important;
  filter: none !important;
}
.tads-logo-main-image {
  display: block;
  width: 100%;
  max-width: 510px;
  height: auto;
  object-fit: contain;
}
.dashboard-sidebar .sidebar-brand {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  justify-content: center;
  padding: 8px 0 18px;
  margin: 0 0 12px;
  border-bottom: 1px solid rgba(255,255,255,.15);
}
.tads-logo-panel-image {
  display: block;
  width: 100%;
  max-width: 210px;
  height: auto;
  object-fit: contain;
}
.dashboard-sidebar .sidebar-wordmark,
.dashboard-sidebar .sidebar-brand-copy {
  display: none !important;
}
@media (max-width: 900px) {
  .tads-logo-main-image { max-width: 430px; }
  .tads-logo-panel-image { max-width: 190px; }
}
@media (max-width: 480px) {
  .tads-logo-main-image { max-width: 100%; }
  .tads-logo-panel-image { max-width: 170px; }
}

/* TADS_SIDEBAR_LOGO_BLEND_V1 */
.dashboard-sidebar {
  background-color: #10332F;
}
.dashboard-sidebar .sidebar-brand {
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 8px 0 18px !important;
}
.dashboard-sidebar .tads-logo-panel-image {
  display: block;
  width: 100%;
  max-width: 230px;
  height: auto;
  object-fit: contain;
  mix-blend-mode: lighten;
  filter: none;
  image-rendering: auto;
}


/* TADS: ocupar la altura disponible y mantener el pie abajo */
#dashboard {
  min-height: 100vh;
}

#dashboard .dashboard-layout {
  min-height: calc(100vh - 56px);
  align-items: stretch;
}

#dashboard .dashboard-main {
  min-width: 0;
  min-height: calc(100vh - 56px);
  display: flex;
  flex-direction: column;
  padding-top: 12px;
  box-sizing: border-box;
}

#dashboard .dashboard-topbar,
#dashboard .dashboard-summary {
  flex-shrink: 0;
}

#dashboard .workspace-section {
  flex-shrink: 0;
}

/* El pie se mantiene abajo incluso con pocas licencias */
#dashboard .workspace-footer {
  margin-top: auto;
  padding-top: 20px;
}

/* Pie de portal: firma de marca y enlaces legales con una jerarquía más clara. */
.workspace-footer {
  align-items: center;
  margin-top: 34px;
  padding: 18px 2px 2px;
  border-top: 1px solid #dce8e2;
  color: #647b71;
}
.workspace-footer-brand { display: grid; gap: 2px; }
.workspace-footer-brand strong { color: #29483c; font-size: var(--tads-font-sm); font-weight: 700; letter-spacing: -.01em; }
.workspace-footer-brand span { color: #81958c; font-size: var(--tads-font-xs); letter-spacing: .05em; text-transform: uppercase; }
.workspace-footer-links { display: flex; align-items: center; gap: 8px; }
.workspace-footer-links a { padding: 7px 10px; border: 1px solid transparent; border-radius: 999px; color: #176b50; font-size: var(--tads-font-xs); font-weight: 700; text-decoration: none; transition: background .16s, border-color .16s, color .16s; }
.workspace-footer-links a:hover, .workspace-footer-links a:focus-visible { border-color: #bddacb; background: #f2faf5; color: #0f4d38; outline: none; }
@media (max-width: 700px) { .workspace-footer { align-items: flex-start; margin-top: 26px; padding-top: 16px; }.workspace-footer-links { width: 100%; }.workspace-footer-links a { padding-left: 0; padding-right: 12px; } }

/* Evitar espacio superior excesivo en las secciones */
#dashboard .section-title-row {
  margin-top: 0;
}


/* TADS: reducir el espacio blanco superior del panel */
#dashboard .dashboard-divider {
  margin-top: 0 !important;
  margin-bottom: 8px !important;
}

#dashboard .dashboard-layout {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

#dashboard .dashboard-main {
  padding-top: 0 !important;
}

#dashboard .section-title-row {
  padding-top: 0 !important;
}

/* TADS PROFILE FORM ALIGNMENT FIX */
.profile-gate{padding:clamp(22px,2.6vw,34px);border:1px solid #e0ebe5;border-radius:18px;background:linear-gradient(135deg,#fff 0%,#fbfdfc 100%);box-shadow:0 12px 34px rgba(15,61,46,.07)}
.profile-gate .section-title-row{margin-bottom:20px}
.profile-gate .section-title-row h3{font-size:clamp(23px,2.5vw,30px);letter-spacing:-.04em;margin:5px 0 6px}
.profile-gate .section-title-row .hint{font-size:13px;margin:0;max-width:720px}
#clientProfileForm.profile-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:24px;row-gap:18px;align-items:start;padding:0;border:0;background:transparent}
#clientProfileForm .profile-field{display:flex;flex-direction:column;align-items:stretch;gap:6px;min-width:0}
#clientProfileForm .profile-field label{display:block;margin:0;color:#20372f;font-size:12px;font-weight:700;line-height:1.45;min-height:18px}
#clientProfileForm .profile-field input,#clientProfileForm .profile-field select{display:block;width:100%;min-width:0;height:46px;min-height:46px;margin:0;padding:0 13px;border:1px solid #cfdbd5;border-radius:9px;background:#fff;color:#243a34;font:inherit;font-size:13px;line-height:normal;box-shadow:0 1px 2px rgba(15,61,46,.025);transition:border-color .18s,box-shadow .18s}
#clientProfileForm .profile-field input:focus,#clientProfileForm .profile-field select:focus{outline:0;border-color:#2e9e72;box-shadow:0 0 0 4px rgba(46,158,114,.12)}
#clientProfileForm .profile-field input::placeholder{color:#83928b}
#clientProfileForm .field-help{display:block;margin:0;color:#718179;font-size:11px;line-height:1.45;min-height:16px}
#clientProfileForm .required-mark{color:#c24136}#clientProfileForm .optional-mark{font-size:10px;font-weight:500;color:#78877f}
#clientProfileForm #nrcHint{grid-column:auto}
#clientProfileForm .profile-form-actions{grid-column:1/-1;display:flex;justify-content:flex-end;align-items:center;margin-top:2px;padding-top:16px;border-top:1px solid #e5ede8}
#clientProfileForm #saveClientProfileBtn{width:auto;min-width:164px;min-height:44px;height:44px;margin:0;padding:0 20px;border-radius:9px;font-size:13px;box-shadow:0 5px 12px rgba(23,107,80,.13)}
#clientProfileForm #saveClientProfileBtn span{font-size:15px}
.profile-security-note{display:flex;gap:12px;align-items:flex-start;padding:14px 16px;margin:0 0 22px;border:1px solid #cfe8db;border-radius:10px;background:#f2faf6;color:#176b50;font-size:12px;line-height:1.55}
.profile-security-note strong{display:block;margin-bottom:2px}
@media(max-width:760px){#clientProfileForm.profile-form{grid-template-columns:minmax(0,1fr);column-gap:0;row-gap:15px}#clientProfileForm .profile-form-actions{grid-column:1}#clientProfileForm #saveClientProfileBtn{width:100%;min-width:0}.profile-gate{padding:18px}.profile-security-note{padding:12px}}


/* TADS V5 — controles administrativos coherentes con la identidad visual */
.admin-search-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 12px 0 14px;
}
.admin-search-wrap label {
  display: block;
  margin: 0;
  color: #243a34;
  font-size: 12px;
  font-weight: 700;
}
.admin-search-wrap input {
  flex: 1 1 280px;
  width: min(100%, 420px);
  min-width: 220px;
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid #d3dfd9;
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  transition: border-color .18s, box-shadow .18s;
}
.admin-search-wrap input:focus {
  outline: none;
  border-color: var(--green-2);
  box-shadow: 0 0 0 3px rgba(46,158,114,.13);
}
.client-history-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  margin-top: 8px;
  padding: 8px 13px;
  border: 1px solid #cfe1d7;
  border-radius: 9px;
  background: #edf6f0;
  color: #176b50;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: background .18s, border-color .18s, color .18s, transform .18s, box-shadow .18s;
}
.client-history-button:hover {
  border-color: #176b50;
  background: #176b50;
  color: #fff;
  box-shadow: 0 4px 10px rgba(15,61,46,.12);
  transform: translateY(-1px);
}
.client-history-button:focus-visible,
.order-events summary:focus-visible {
  outline: 3px solid rgba(46,158,114,.28);
  outline-offset: 2px;
}
.order-events {
  margin-top: 8px;
  border: 1px solid #dfe9e3;
  border-radius: 9px;
  background: #f9fcfa;
  overflow: hidden;
}
.order-events summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 11px;
  color: #176b50;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  cursor: pointer;
  list-style: none;
  transition: background .18s, color .18s;
}
.order-events summary::-webkit-details-marker { display: none; }
.order-events summary::before {
  content: "›";
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border-radius: 5px;
  background: #e4f2e9;
  color: #176b50;
  font-size: 17px;
  line-height: 1;
  transition: transform .18s;
}
.order-events[open] summary {
  background: #edf6f0;
  border-bottom: 1px solid #dfe9e3;
}
.order-events[open] summary::before { transform: rotate(90deg); }
.event-list { display: grid; gap: 0; padding: 4px 12px; }
.event-row {
  display: grid;
  grid-template-columns: minmax(120px, .8fr) minmax(120px, 1fr);
  gap: 4px 12px;
  padding: 10px 0;
  border-bottom: 1px solid #e9f0ec;
}
.event-row:last-child { border-bottom: 0; }
.event-row b { color: #20372f; font-size: 11px; }
.event-row span { color: #53665e; font-size: 10px; overflow-wrap: anywhere; }
.event-row small { grid-column: 1 / -1; color: #687a72; font-size: 10px; line-height: 1.5; }
@media (max-width: 560px) {
  .admin-search-wrap { align-items: stretch; flex-direction: column; }
  .admin-search-wrap input { width: 100%; min-width: 0; flex-basis: auto; }
  .client-history-button { max-width: 100%; }
  .event-row { grid-template-columns: 1fr; gap: 3px; }
  .event-row small { grid-column: auto; }
}

/* TADS GLOBAL DESIGN SYSTEM V2 — escala coherente en portal cliente y administración */
:root {
  --tads-font-xs: 12px;
  --tads-font-sm: 13px;
  --tads-font-base: 14px;
  --tads-font-md: 15px;
  --tads-font-lg: 18px;
  --tads-font-xl: 24px;
  --tads-control-height: 44px;
  --tads-control-radius: 10px;
  --tads-card-padding: 16px;
  --tads-section-gap: 24px;
}
body { font-size: var(--tads-font-base); line-height: 1.5; }
/* Jerarquía tipográfica única para todas las vistas */
.section-title-row h3,
.workspace-section h3,
.admin-panel h3 { font-size: var(--tads-font-lg); line-height: 1.3; }
.dashboard-topbar h2 { font-size: var(--tads-font-xl); line-height: 1.3; }
.section-title-row p,
.dashboard-topbar p,
.hint { font-size: var(--tads-font-sm); line-height: 1.55; }
.eyebrow { font-size: var(--tads-font-xs); line-height: 1.4; }
/* Los campos de formularios y búsquedas comparten altura, fuente y radio */
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea,
.request-controls select,
.admin-search-wrap input {
  font-family: inherit;
  font-size: var(--tads-font-base);
  line-height: 1.4;
  border-radius: var(--tads-control-radius);
}
input:not([type="checkbox"]):not([type="radio"]),
select,
.admin-search-wrap input { min-height: var(--tads-control-height); }
.purchase-form input:not([type="checkbox"]):not([type="radio"]),
.purchase-form select,
.profile-form input,
.profile-form select { min-height: var(--tads-control-height); padding: 10px 12px; }
.purchase-form textarea { min-height: 88px; padding: 11px 12px; font-size: var(--tads-font-base); }
.purchase-form > label:not(.purchase-option),
.profile-field label,
.auth-form label,
.admin-search-wrap label { font-size: var(--tads-font-sm); line-height: 1.4; }
.field-help,
.profile-field small,
.purchase-option small { font-size: var(--tads-font-xs); line-height: 1.5; }
/* Botones uniformes; los botones de navegación conservan su formato compacto */
button,
.primary-button,
.secondary-button,
.request-controls button,
.client-history-button,
.client-back-button,
.admin-search-wrap button {
  font-family: inherit;
  font-size: var(--tads-font-sm);
  line-height: 1.35;
  border-radius: var(--tads-control-radius);
}
.primary-button,
.secondary-button { min-height: 46px; padding: 11px 16px; }
.request-controls button,
.client-history-button,
.client-back-button,
.admin-search-wrap button { min-height: 40px; padding: 9px 12px; }
/* Tarjetas con el mismo lenguaje visual y densidad de contenido */
.catalog-card,
.product-license,
.summary-card,
.request-card,
.client-record,
.client-detail-card,
.order-record,
.profile-security-note,
.purchase-box,
.help-card { border-radius: 12px; }
.request-card,
.order-record,
.client-record { padding: var(--tads-card-padding); }
.request-card b,
.request-card-head b,
.order-record > b { font-size: var(--tads-font-sm); line-height: 1.45; }
.request-card p,
.order-record p,
.client-record p,
.event-row span,
.event-row small { font-size: var(--tads-font-xs); line-height: 1.5; }
.request-state,
.product-status,
.catalog-tag { font-size: var(--tads-font-xs); line-height: 1.3; padding: 5px 9px; }
.stat span,
.stat b { font-size: var(--tads-font-sm); }
/* Ficha comercial y pedidos: una escala común de títulos, campos y valores */
.client-detail-card h4,
.client-detail-card h3,
.client-orders-title { font-size: var(--tads-font-lg); line-height: 1.3; }
.client-detail-card label,
.client-detail-card dt,
.client-detail-card .field-label { font-size: var(--tads-font-sm); line-height: 1.4; }
.client-detail-card input,
.client-detail-card select,
.client-detail-card dd,
.client-detail-card .field-value { font-size: var(--tads-font-base); line-height: 1.5; }
/* Resumen y espacios consistentes */
.dashboard-summary { gap: 12px; }
.summary-card { min-height: 98px; padding: 16px; }
.workspace-section { margin-bottom: var(--tads-section-gap); }
.requests-list { gap: 12px; }
@media (max-width: 700px) {
  :root { --tads-card-padding: 13px; --tads-section-gap: 20px; }
  .dashboard-topbar h2 { font-size: 22px; }
  .section-title-row h3, .workspace-section h3, .admin-panel h3,
  .client-detail-card h4, .client-detail-card h3, .client-orders-title { font-size: 17px; }
  .summary-card { min-height: 88px; padding: 11px; }
  input:not([type="checkbox"]):not([type="radio"]), select, .admin-search-wrap input { min-height: 42px; }
}


/* ==========================================================
   TADS GLOBAL DESIGN SYSTEM V3
   Reglas compartidas para portal cliente y panel administrativo.
   Los tamaños equivalentes se controlan desde estos tokens.
   ========================================================== */
:root {
  --tads-font-xs: 12px;
  --tads-font-sm: 13px;
  --tads-font-base: 14px;
  --tads-font-md: 15px;
  --tads-font-lg: 18px;
  --tads-font-xl: 24px;
  --tads-control-height: 44px;
  --tads-control-radius: 10px;
  --tads-card-padding: 16px;
  --tads-section-gap: 24px;
  --tads-line-height: 1.5;
}

/* Tipografía base y jerarquía común en ambas áreas */
body, button, input, select, textarea {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
body { font-size: var(--tads-font-base); line-height: var(--tads-line-height); }
.dashboard-topbar h2 { font-size: var(--tads-font-xl); line-height: 1.3; }
.section-title-row h3, .workspace-section h3, .admin-panel h3,
.tads-client-profile-heading h4, .client-orders-title, .section-heading {
  font-size: var(--tads-font-lg);
  line-height: 1.35;
}
.section-title-row p, .dashboard-topbar p, .hint,
.tads-client-profile-heading .hint { font-size: var(--tads-font-sm); line-height: 1.5; }
.eyebrow { font-size: var(--tads-font-xs); line-height: 1.4; }
.auth-form label, .purchase-form > label:not(.purchase-option),
.profile-field label, .admin-search-wrap label,
.tads-client-label, .client-detail-card label, .client-detail-card dt {
  font-size: var(--tads-font-sm);
  line-height: 1.4;
}
.field-help, .profile-field small, .purchase-option small { font-size: var(--tads-font-xs); line-height: 1.5; }

/* Campos de formulario, perfil y búsquedas: altura y tipografía comunes */
input:not([type="checkbox"]):not([type="radio"]),
select, textarea, .admin-search-wrap input, .request-controls select {
  font-family: inherit;
  font-size: var(--tads-font-base);
  line-height: 1.4;
  border-radius: var(--tads-control-radius);
}
input:not([type="checkbox"]):not([type="radio"]),
select, .admin-search-wrap input,
.purchase-form input:not([type="checkbox"]):not([type="radio"]),
.purchase-form select, .profile-form input, .profile-form select {
  min-height: var(--tads-control-height);
}
.purchase-form input:not([type="checkbox"]):not([type="radio"]),
.purchase-form select, .profile-form input, .profile-form select,
.admin-search-wrap input {
  padding: 10px 12px;
}
textarea, .purchase-form textarea {
  font: inherit;
  font-size: var(--tads-font-base);
  line-height: 1.5;
  min-height: 88px;
  padding: 11px 12px;
}

/* Botones equivalentes comparten tamaño de texto, altura y radio.
   Los controles pequeños de estado conservan una altura compacta común. */
button, .primary-button, .secondary-button, .request-controls button,
.client-history-button, .client-back-button, .admin-search-wrap button,
.catalog-action, .text-button, .sidebar-signout {
  font-family: inherit;
}
.primary-button, .secondary-button {
  font-size: var(--tads-font-sm);
  line-height: 1.35;
  min-height: 46px;
  border-radius: var(--tads-control-radius);
  padding: 11px 16px;
}
.request-controls button, .client-history-button, .client-back-button,
.admin-search-wrap button {
  font-size: var(--tads-font-sm);
  line-height: 1.35;
  min-height: 40px;
  border-radius: var(--tads-control-radius);
  padding: 9px 12px;
}
.nav-item, .sidebar-signout { font-size: var(--tads-font-sm); line-height: 1.4; }
.text-button, .catalog-action, .help-card>a { font-size: var(--tads-font-sm); }

/* Tarjetas y textos de datos: densidad común para cartera, solicitudes e historial */
.catalog-card, .product-license, .summary-card, .request-card, .client-record,
.client-detail-card, .order-record, .profile-security-note, .purchase-box, .help-card,
.tads-client-profile, .tads-client-metric {
  border-radius: 12px;
}
.request-card, .order-record, .client-record { padding: var(--tads-card-padding); }
.request-card b, .request-card-head b, .order-record .request-card-head b,
.client-record .request-card-head b { font-size: var(--tads-font-sm); line-height: 1.45; }
.request-card p, .order-record p, .client-record p,
.event-row span, .event-row small { font-size: var(--tads-font-sm); line-height: 1.5; }
.request-state, .product-status, .catalog-tag, .tads-client-profile-status {
  font-size: var(--tads-font-xs);
  line-height: 1.3;
  padding: 5px 9px;
}
.stat span, .stat b { font-size: var(--tads-font-sm); }
.summary-card { min-height: 98px; padding: 16px; }
.summary-card small, .summary-card>span:last-child { font-size: var(--tads-font-xs); line-height: 1.45; }
.summary-card>b { font-size: 24px; line-height: 1.3; }
.workspace-section { margin-bottom: var(--tads-section-gap); }
.requests-list { gap: 12px; }

/* Ficha comercial: mismos campos y tipografía que el resto del portal */
.tads-client-profile {
  background: #fff;
  border: 1px solid var(--line);
  padding: var(--tads-card-padding);
  margin: 16px 0 18px;
  box-shadow: 0 3px 12px rgba(15,61,46,.035);
}
.tads-client-profile-heading {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 20px; flex-wrap: wrap;
}
.tads-client-profile-heading h4 { margin: 4px 0 5px; color: #203b32; }
.tads-client-profile-heading .hint { margin: 0; }
.tads-client-field-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px 20px; }
.tads-client-field.wide { grid-column: 1 / -1; }
.tads-client-label { display: block; font-weight: 700; color: #2d4b40; margin-bottom: 6px; }
.tads-client-value {
  min-height: var(--tads-control-height); display: flex; align-items: center;
  background: #f8faf9; border: 1px solid var(--line); border-radius: var(--tads-control-radius);
  padding: 10px 12px; color: #31443e; font-size: var(--tads-font-base);
  overflow-wrap: anywhere; line-height: 1.5;
}
.tads-client-field.technical .tads-client-value {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: var(--tads-font-sm);
}
.tads-client-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin: 0 0 24px; }
.tads-client-metric {
  border: 1px solid var(--line); background: #f8fbf9; padding: 16px; min-height: 98px;
}
.tads-client-metric span { display: block; font-size: var(--tads-font-sm); line-height: 1.4; color: #587065; margin-bottom: 8px; }
.tads-client-metric strong { display: block; font-size: 24px; line-height: 1.25; color: #154f3b; }
.tads-client-profile-status { font-weight: 700; border-radius: 999px; background: #f4f1e8; color: #83652b; white-space: nowrap; }
.tads-client-profile-status.is-complete { background: #e8f5ee; color: #176443; }

/* El expediente y la sección Pedidos del cliente comparten escala */
.tads-client-expediente { font-size: var(--tads-font-base); line-height: var(--tads-line-height); color: #294239; }
.tads-client-expediente .section-title-row { margin: 24px 0 14px; }
.tads-client-expediente .section-heading { font-size: var(--tads-font-lg); line-height: 1.35; margin: 0 0 6px; font-weight: 700; letter-spacing: -.02em; }
.tads-client-expediente .hint { font-size: var(--tads-font-sm); line-height: 1.5; margin: 0; color: var(--muted); }
.tads-client-expediente .client-history-button { width: 100%; margin: 0 0 8px; }
.tads-client-expediente .order-record { padding: var(--tads-card-padding); margin: 0 0 12px; font-size: var(--tads-font-base); line-height: 1.5; }
.tads-client-expediente .order-record .request-card-head { gap: 12px; margin-bottom: 8px; align-items: flex-start; }
.tads-client-expediente .order-record .request-card-head b { font-size: var(--tads-font-sm); line-height: 1.45; font-weight: 700; }
.tads-client-expediente .order-record p { font-size: var(--tads-font-sm); line-height: 1.5; margin: 7px 0; }
.tads-client-expediente .order-record .request-state { font-size: var(--tads-font-xs); line-height: 1.3; padding: 5px 9px; }
.tads-client-expediente .order-record .order-events { margin-top: 10px; }
.tads-client-expediente .order-record .order-events summary { font-size: var(--tads-font-sm); line-height: 1.45; padding: 10px 12px; border-radius: var(--tads-control-radius); }
.tads-client-expediente .order-record .event-row { font-size: var(--tads-font-sm); line-height: 1.45; padding: 10px 12px; gap: 6px; }
.client-detail-card input, .client-detail-card select, .client-detail-card dd,
.client-detail-card .field-value { font-size: var(--tads-font-base); line-height: 1.5; }

/* Responsive: conserva proporciones y reduce espacios, no cambia la escala tipográfica base */
@media (max-width: 700px) {
  :root { --tads-card-padding: 13px; --tads-section-gap: 20px; }
  .dashboard-topbar h2 { font-size: 22px; }
  .section-title-row h3, .workspace-section h3, .admin-panel h3,
  .tads-client-profile-heading h4, .tads-client-expediente .section-heading { font-size: 17px; }
  .summary-card { min-height: 88px; padding: 11px; }
  .tads-client-field-grid { grid-template-columns: 1fr; gap: 14px; }
  .tads-client-field.wide { grid-column: auto; }
  .tads-client-summary { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .tads-client-profile { padding: var(--tads-card-padding); }
  .tads-client-metric { padding: 13px; min-height: 90px; }
  .tads-client-expediente .order-record .request-card-head { flex-wrap: wrap; }
  input:not([type="checkbox"]):not([type="radio"]), select, .admin-search-wrap input { min-height: 42px; }
}


/* Bandeja administrativa: acordeones por estado con la escala global TADS */
.admin-request-status-group { margin: 0 0 12px; border:1px solid var(--line); border-radius:var(--tads-control-radius); background:rgba(255,255,255,.68); overflow:hidden; }
.admin-status-group-heading { appearance:none; width:100%; display:flex; align-items:center; text-align:left; gap:12px; padding:13px 15px; margin:0; border:0; border-radius:0; background:#fff; color:var(--ink); cursor:pointer; font:inherit; }
.admin-status-group-heading:hover { background:#f8fbf9; }
.admin-status-group-heading:focus-visible { outline:2px solid var(--green-2); outline-offset:-3px; }
.admin-status-heading-copy { display:flex; flex:1; min-width:0; flex-direction:column; gap:3px; }
.admin-status-title { display:block; color:var(--ink); font-size:var(--tads-font-md); line-height:1.4; font-weight:700; }
.admin-status-description { display:block; color:var(--muted); font-size:var(--tads-font-sm); line-height:1.45; font-weight:400; }
.admin-status-chevron { display:inline-flex; align-items:center; justify-content:center; flex:0 0 24px; width:24px; height:24px; border-radius:7px; background:#e8f4ed; color:var(--green); font-size:18px; line-height:1; }
.admin-status-count { display:inline-flex; align-items:center; justify-content:center; min-width:32px; min-height:32px; padding:4px 10px; border:1px solid var(--line); border-radius:999px; background:#fff; color:var(--green-dark); font-size:var(--tads-font-sm); font-weight:800; }
.admin-status-group-list { display:grid; gap:10px; padding:0 12px 12px; }
.admin-status-group-list[hidden] { display:none !important; }
.admin-status-group-list .request-card { margin:0; }
.admin-status-empty { margin:0; padding:13px 15px; border:1px dashed var(--line); border-radius:var(--tads-control-radius); color:var(--muted); background:rgba(255,255,255,.55); font-size:var(--tads-font-sm); }
.admin-request-status-group.is-expanded > .admin-status-group-heading { border-bottom:1px solid var(--line); }
.status-group-pending_review .admin-status-count { background:#fff5df; border-color:#f1dfb5; color:#885a00; }
.status-group-pending_payment .admin-status-count { background:#fff5df; border-color:#f1dfb5; color:#885a00; }
.status-group-approved .admin-status-count, .status-group-activated .admin-status-count { background:#e7f7ed; border-color:#c9ead6; color:#176b50; }
.status-group-rejected .admin-status-count { background:#fff0ef; border-color:#f1d2cf; color:#b42318; }

/* Expediente de cliente: secciones desplegables independientes */
.tads-client-expediente .client-accordion {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  margin: 14px 0;
  overflow: hidden;
}
.tads-client-expediente .client-accordion > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px;
  color: #203b32;
  font-weight: 750;
  background: #f8fbf9;
}
.tads-client-expediente .client-accordion > summary::-webkit-details-marker { display: none; }
.tads-client-expediente .client-accordion > summary::before {
  content: "›";
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border-radius: 7px;
  background: #e8f5ee;
  color: #08734f;
  transform: rotate(0deg);
}
.tads-client-expediente .client-accordion[open] > summary::before { content: "⌄"; }
.tads-client-expediente .client-accordion > summary span { flex: 1; }
.tads-client-expediente .client-accordion > summary small {
  color: var(--muted);
  font-weight: 500;
  text-align: right;
}
.tads-client-expediente .client-accordion-content { padding: 14px; }
.tads-client-expediente .client-accordion .tads-client-profile {
  border: 0;
  box-shadow: none;
  margin: 0;
  padding: 16px;
}
.tads-client-expediente .client-orders-accordion .order-record:last-child { margin-bottom: 0; }
.client-license-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 10px;
}
.client-license-row:last-child { margin-bottom: 0; }
.client-license-row p { margin: 6px 0; font-size: var(--tads-font-sm); }
.client-license-row small { color: var(--muted); }
.client-empty-note { padding: 4px 2px; }
@media (max-width: 700px) {
  .tads-client-expediente .client-accordion > summary { align-items: flex-start; flex-wrap: wrap; padding: 13px; }
  .tads-client-expediente .client-accordion > summary small { width: 100%; text-align: left; margin-left: 34px; }
  .client-license-row { flex-direction: column; }
}

/* Controles cómodos de usar con el dedo en teléfonos. */
@media (max-width: 700px) {
  #authActions .text-button,
  .sidebar-nav .nav-item,
  .sidebar-signout,
  .catalog-action,
  .help-card > a {
    min-height: 44px;
  }

  #authActions .text-button,
  .catalog-action,
  .help-card > a {
    display: inline-flex;
    align-items: center;
  }

  .sidebar-nav .nav-item,
  .sidebar-signout {
    justify-content: center;
  }
}


/* Vigencia y renovación de licencias en el portal del cliente */
.license-period {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin: 9px 0 10px;
}
.license-period p {
  margin: 0;
  font-size: 11px;
}
.license-period p span { color: var(--muted); }
.license-period p b { color: #243a34; font-weight: 700; }
.status-expired { background: #fff0ee; color: #b42318; }
.license-renew-button {
  margin-top: 3px;
  min-height: 34px;
  padding: 8px 12px;
  font-size: 11px;
}
.license-renew-hint { margin: 8px 0 0 !important; }
.license-back-button {
  display: inline-flex;
  width: auto;
  margin: 0 0 14px;
  color: #176b50;
  font-weight: 700;
  /* Es hijo directo del grid de licencias: sin estas reglas su celda se
     estira y convierte el espacio vacío en una zona clicable. */
  grid-column: 1 / -1;
  justify-self: start;
}


/* Bandejas de licencias: suspendidas y pendientes de reactivación */
.license-status-tray { margin: 10px 0; }
.license-status-tray > summary { cursor: pointer; }
.license-status-tray .client-license-row { background: #fff; }
.license-status-tray .license-admin-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.license-status-tray .license-admin-actions button { min-height: 34px; }

/* Evita mostrar datos de plantilla mientras se termina de cargar la cuenta. */
.tads-booting {
  background: #F4F7F6 !important;
  background-image: none !important;
}
.tads-booting .app-shell {
  visibility: hidden;
}
.tads-booting::before {
  content: "Cargando TADS…";
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  color: #176B50;
  font: 600 14px/1.4 Inter, ui-sans-serif, system-ui, sans-serif;
}
.dashboard:not(.dashboard-ready) {
  position: relative;
  min-height: 420px;
}
.dashboard:not(.dashboard-ready) > * {
  visibility: hidden;
}
.dashboard:not(.dashboard-ready)::before {
  content: "Cargando tu espacio TADS…";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #557168;
  font-size: 14px;
  font-weight: 600;
}
@media (max-width: 700px) {
  .dashboard:not(.dashboard-ready) { min-height: 280px; }
}

/* Contacto de soporte informativo: no abre el cliente de correo. */
.help-card { align-items: flex-start; }
.help-content { min-width: 0; flex: 1; }
.help-contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 13px;
}
.help-contact-item {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #dce9e2;
  border-radius: 9px;
  background: #fff;
}
.help-contact-item span,
.help-contact-item strong { display: block; }
.help-contact-item span { color: var(--muted); font-size: 10px; }
.help-contact-item strong { margin-top: 2px; color: #203b32; font-size: 12px; overflow-wrap: anywhere; }
.help-note { margin-top: 12px !important; }
@media (max-width: 560px) {
  .help-contact-grid { grid-template-columns: 1fr; }
}

.gmail-download-panel { display: grid; gap: 9px; margin-top: 12px; padding: 13px; border: 1px solid #a9d8bf; border-radius: 10px; background: #f4fbf7; }
.gmail-download-panel > b { font-size: 11px; color: #176b50; }
.gmail-download-panel > p { margin: 0; font-size: 10px; }
.gmail-download-panel > label, .gmail-format-options { display: flex; align-items: center; gap: 8px; font-size: 10px; font-weight: 700; color: #243a34; }
.gmail-download-panel input[type="month"] { min-height: 34px; border: 1px solid #cbdcd3; border-radius: 7px; padding: 5px 8px; font: inherit; background: #fff; }
.gmail-format-options { flex-wrap: wrap; font-weight: 600; }
.gmail-format-options label { display: flex; align-items: center; gap: 4px; }
.gmail-support-choice { display: flex; align-items: flex-start; gap: 6px; font-size: 10px; font-weight: 600; color: #315246; cursor: pointer; }
.gmail-support-choice input { margin-top: 2px; accent-color: var(--green); }
.gmail-download-panel .secondary-button { width: auto; min-height: 36px; margin: 0; padding: 7px 11px; font-size: 10px; background: #fff; color: #176b50; border-color: #b9d8c8; }
.gmail-download-panel .text-button { width: max-content; }
.gmail-download-panel .hint { margin: 0; }

.iva-consolidado-section { max-width: 760px; }
.fiscal-calendar-section { max-width: 1040px; }
.fiscal-calendar-controls { display: flex; flex-wrap: wrap; gap: 14px; align-items: end; margin: 20px 0 14px; }
.fiscal-calendar-controls label { display: grid; gap: 6px; min-width: 210px; color: #27443a; font-size: var(--tads-font-sm); font-weight: 700; }
.fiscal-calendar-controls select { min-height: var(--tads-control-height); border: 1px solid #bed6c9; border-radius: 9px; padding: 8px 12px; background: #fff; color: #203b32; font: inherit; }
.fiscal-calendar-controls .secondary-button { min-height: var(--tads-control-height); margin: 0; }
.fiscal-calendar-next { display: grid; gap: 3px; margin-bottom: 16px; padding: 16px 18px; border: 1px solid #b9dfcb; border-left: 4px solid #218861; border-radius: 12px; background: #f4fbf7; color: #26483b; }
.fiscal-calendar-next span { color: #167252; font-size: var(--tads-font-xs); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }.fiscal-calendar-next b { font-size: var(--tads-font-md); }.fiscal-calendar-next small { font-size: var(--tads-font-sm); }
.fiscal-calendar-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .9fr); gap: 16px; align-items: start; }
.fiscal-calendar-grid, .fiscal-calendar-agenda { border: 1px solid #d9e8df; border-radius: 14px; background: #fff; overflow: hidden; }.fiscal-weekdays, .fiscal-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }.fiscal-weekdays { background: #0f3d2e; color: #fff; }.fiscal-weekdays span { padding: 10px 4px; text-align: center; font-size: var(--tads-font-xs); font-weight: 700; }.fiscal-day { min-height: 71px; border: 0; border-right: 1px solid #eef3ef; border-bottom: 1px solid #eef3ef; padding: 8px; background: #fff; color: #28453b; text-align: left; cursor: pointer; font: inherit; }.fiscal-day:hover, .fiscal-day:focus-visible { background: #f0f8f3; outline: 2px solid #218861; outline-offset: -2px; }.fiscal-day > span { font-weight: 700; }.fiscal-day i { display: grid; place-items: center; width: 21px; height: 21px; margin-top: 8px; border-radius: 50%; background: #177555; color: #fff; font-size: 12px; font-style: normal; font-weight: 800; }.fiscal-day.report i { background: #255b9f; }.fiscal-day.special i { background: #a65a13; }.fiscal-day.holiday { background: #f2faf5; color: #598172; }.fiscal-day.holiday i { background: #749d87; }.fiscal-day--empty { pointer-events: none; background: #fafcfb; }
.fiscal-calendar-agenda h4 { margin: 0; padding: 15px 17px; border-bottom: 1px solid #d9e8df; color: #1d4d3d; font-size: var(--tads-font-md); }.fiscal-calendar-agenda ul { margin: 0; padding: 8px 14px 14px; list-style: none; }.fiscal-agenda-day { display: grid; grid-template-columns: 38px 1fr; gap: 10px; padding: 11px 0; border-bottom: 1px solid #edf3ef; }.fiscal-agenda-day:last-child { border-bottom: 0; }.fiscal-agenda-day time { display: grid; place-items: center; height: 30px; border-radius: 8px; background: #e7f4ec; color: #176b50; font-size: var(--tads-font-sm); font-weight: 800; }.fiscal-event { display: grid; gap: 3px; color: #315246; font-size: var(--tads-font-xs); line-height: 1.45; }.fiscal-event b { color: #243e34; font-size: var(--tads-font-sm); }.fiscal-event span { color: #62776e; }.fiscal-calendar-disclaimer { margin: 16px 0 0; color: #61766c; font-size: var(--tads-font-sm); line-height: 1.55; }
.fiscal-event-group { border-bottom: 1px solid #dfeae4; }.fiscal-event-group:last-child { border-bottom: 0; }.fiscal-event-group summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 16px; color: #21463a; cursor: pointer; font-size: var(--tads-font-sm); font-weight: 800; list-style: none; }.fiscal-event-group summary::-webkit-details-marker { display: none; }.fiscal-event-group summary::before { content: "›"; margin-right: 6px; color: #187454; font-size: 22px; line-height: .8; transform: rotate(0deg); transition: transform .16s ease; }.fiscal-event-group[open] summary::before { transform: rotate(90deg); }.fiscal-event-group summary span { margin-right: auto; }.fiscal-event-group summary b { display: grid; place-items: center; min-width: 24px; height: 24px; border-radius: 999px; background: #e8f5ed; color: #176b50; font-size: var(--tads-font-xs); }.fiscal-event-group > ul { padding-top: 0; }.fiscal-event em { width: max-content; padding: 3px 7px; border-radius: 999px; background: #edf8f1; color: #477a61; font-size: 11px; font-style: normal; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }

/* Cartera administrativa agrupada por condición tributaria del cliente. */
.client-type-group { margin: 0 0 14px; border: 1px solid #d9e8df; border-radius: 13px; background: #fff; overflow: hidden; }.client-type-group > summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 14px; padding: 16px 18px; color: #1d4739; cursor: pointer; list-style: none; }.client-type-group > summary::-webkit-details-marker { display: none; }.client-type-group > summary::before { content: "›"; position: absolute; margin-left: -12px; color: #177555; font-size: 21px; line-height: .85; transform: rotate(0deg); transition: transform .16s ease; }.client-type-group[open] > summary::before { transform: rotate(90deg); }.client-type-group > summary span { font-size: var(--tads-font-md); font-weight: 800; }.client-type-group > summary small { grid-column: 1; color: #71857c; font-size: var(--tads-font-xs); }.client-type-group > summary::after { content: ""; grid-column: 2; grid-row: 1 / span 2; align-self: center; width: 10px; height: 10px; border-radius: 50%; background: #2c9a70; box-shadow: 0 0 0 5px #e7f5ed; }.client-type-group-content { display: grid; gap: 10px; padding: 4px 14px 14px; border-top: 1px solid #e5eee9; }.client-type-group-content .client-record { margin: 0; }.client-type-group-content .client-empty-note { margin: 10px 4px 2px; }
@media (max-width: 700px) { .client-type-group > summary { padding: 14px 16px; }.client-type-group-content { padding: 4px 10px 10px; } }
@media (max-width: 780px) { .fiscal-calendar-layout { grid-template-columns: 1fr; }.fiscal-calendar-controls label { min-width: min(100%, 250px); }.fiscal-calendar-controls .secondary-button { width: 100%; }.fiscal-day { min-height: 58px; padding: 6px; }.fiscal-day i { width: 18px; height: 18px; margin-top: 5px; font-size: 11px; } }
.nav-item[data-nav="iva"] { display: none !important; }
body.iva-license-active .nav-item[data-nav="iva"] { display: flex !important; }
 .nav-item[data-nav="reports"] { display:none !important; } body.reports-license-active .nav-item[data-nav="reports"] { display:flex !important; }
.nav-item[data-nav="laboral"] { display:none !important; } body.labor-license-active .nav-item[data-nav="laboral"] { display:flex !important; }
.iva-icon { display: grid; place-items: center; color: #176b50; font-size: 28px; font-weight: 800; background: #e8f5ed; }
.iva-consolidado-form { max-width: 620px; }
.iva-consolidado-panel { max-width: 720px; border: 1px solid #dce9e2; border-radius: 12px; background: #fbfdfc; overflow: hidden; }
.iva-consolidado-panel > summary { padding: 14px 18px; color: #1d4d3d; font-size: var(--tads-font-md); font-weight: 700; cursor: pointer; }
.iva-consolidado-panel > summary::marker { color: var(--green); }
.iva-consolidado-panel-content { padding: 4px 18px 18px; }
.iva-consolidado-panel-content .iva-consolidado-note { margin-bottom: 0; }
.iva-consolidado-reset { margin-top: 16px; background: #fff; color: var(--green); border-color: #a9cbb9; }
.iva-consolidado-form input[type="file"] { padding: 10px; background: #fff; border: 1px dashed #9bbdaf; border-radius: 8px; color: #315246; }
.iva-consolidado-note { margin: 16px 0 0; padding: 11px 13px; border: 1px solid #dce9e2; border-radius: 9px; background: #f7fbf8; color: #315246; font-size: 11px; line-height: 1.5; }
.iva-summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.iva-summary-card { padding: 14px; border: 1px solid #dce9e2; border-radius: 10px; background: #fff; }
.iva-summary-card h4 { margin: 0 0 10px; color: #176b50; font-size: 13px; }
.iva-summary-card dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 0; }
.iva-summary-card dt { color: #698077; font-size: 10px; }
.iva-summary-card dd { margin: 2px 0 0; color: #243a34; font-size: 12px; font-weight: 700; }
@media (max-width: 560px) { .iva-summary-grid { grid-template-columns: 1fr; } }

/* Verificación que no bloquea el navegador: el cliente puede consultar el código en su correo y volver. */
.verification-modal { position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center; padding: 20px; background: rgba(8, 36, 31, .52); }
.verification-modal-card { width: min(100%, 440px); padding: 25px; border-radius: 17px; background: #fff; box-shadow: 0 22px 58px rgba(8, 36, 31, .3); }
.verification-modal-card h2 { margin: 5px 0 7px; color: #17342b; font-size: 23px; letter-spacing: -.03em; }
.verification-modal-card > p { color: #557168; font-size: 12px; line-height: 1.55; }
#verificationCodeForm { margin-top: 18px; }
#verificationCodeForm label { display: block; margin-bottom: 7px; color: #243a34; font-size: 12px; font-weight: 700; }
#verificationCode { width: 100%; min-height: 48px; border: 1px solid #bcd4c8; border-radius: 9px; padding: 8px 12px; background: #fff; color: #17342b; font: 700 20px/1.2 Inter, ui-sans-serif, system-ui, sans-serif; letter-spacing: .18em; text-align: center; }
#verificationCode:focus { outline: 3px solid rgba(46, 158, 114, .18); border-color: #218661; }
.verification-code-error { margin: 9px 0 0 !important; color: #b42318 !important; }
.verification-modal-note { margin: 16px 0 2px !important; }
.verification-cancel { margin-top: 8px; color: #557168; }
.tads-confirm-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:22px; }
.tads-confirm-actions .primary-button, .tads-confirm-actions .secondary-button { width:auto; min-width:120px; margin:0; font:inherit; }
@media (max-width: 480px) { .tads-confirm-actions { flex-direction:column-reverse; } .tads-confirm-actions .primary-button, .tads-confirm-actions .secondary-button { width:100%; } }

/* Estándar tipográfico TADS V4: lectura cómoda y consistente en todo el portal. */
:root {
  --tads-font-xs: 13px;
  --tads-font-sm: 15px;
  --tads-font-base: 16px;
  --tads-font-md: 17px;
  --tads-font-lg: 22px;
  --tads-font-xl: 28px;
  --tads-control-height: 48px;
  --tads-line-height: 1.55;
}

body { font-size: var(--tads-font-base); line-height: var(--tads-line-height); }
.dashboard-topbar h2 { font-size: var(--tads-font-xl); }
.section-title-row h3, .workspace-section h3, .admin-panel h3,
.tads-client-profile-heading h4, .client-orders-title, .section-heading { font-size: var(--tads-font-lg); }
.section-title-row p, .dashboard-topbar p, .hint, .intro { font-size: var(--tads-font-sm); line-height: 1.6; }
.eyebrow { font-size: var(--tads-font-xs); }

/* Formularios y botones: el texto se lee igual en cada módulo. */
.auth-form label, .purchase-form > label:not(.purchase-option), .profile-field label,
.admin-search-wrap label, .client-detail-card label, .client-detail-card dt { font-size: var(--tads-font-sm); }
.field-help, .profile-field small, .purchase-option small, .catalog-tag,
.request-state, .product-status { font-size: var(--tads-font-xs); }
.primary-button, .secondary-button, .request-controls button, .client-history-button,
.client-back-button, .admin-search-wrap button, .nav-item, .sidebar-signout,
.text-button, .catalog-action, .help-card > a { font-size: var(--tads-font-sm); }

/* Tarjetas, resultados, ayudas y áreas históricamente compactas. */
.catalog-card h4 { font-size: var(--tads-font-md); line-height: 1.4; }
.catalog-card > p, .product-license-copy p, .request-card p, .help-card p,
.workspace-footer, .page-footer, .license-period p { font-size: var(--tads-font-sm); line-height: 1.55; }
.product-license-copy h4, .request-card b, .request-card-head b, .help-card h3,
.event-row b, .gmail-download-panel > b { font-size: var(--tads-font-sm); }
.stat span, .stat b, .summary-card small, .summary-card > span:last-child { font-size: var(--tads-font-sm); }

.iva-consolidado-note { font-size: var(--tads-font-base); line-height: 1.65; padding: 16px 18px; }
.iva-consolidado-note h4 { margin: 0 0 12px; font-size: var(--tads-font-md); line-height: 1.4; }
.iva-consolidado-note p, .iva-consolidado-note li { font-size: var(--tads-font-sm); line-height: 1.6; }
.iva-summary-card h4 { font-size: var(--tads-font-md); }
.iva-summary-card dt, .iva-summary-card dd { font-size: var(--tads-font-sm); }

.gmail-download-panel { gap: 12px; padding: 16px; }
.gmail-download-panel > p, .gmail-download-panel > label, .gmail-format-options,
.gmail-support-choice, .gmail-download-panel .secondary-button { font-size: var(--tads-font-sm); line-height: 1.5; }
.gmail-download-panel input[type="month"] { min-height: var(--tads-control-height); }
.help-contact-item span { font-size: var(--tads-font-xs); }
.help-contact-item strong { font-size: var(--tads-font-sm); }
.verification-modal-card > p, #verificationCodeForm label { font-size: var(--tads-font-sm); }

/* Datos secundarios siguen siendo visibles; ninguna pantalla queda en 9–12 px. */
.header-pill, .secure-label, .brand-name, .brand-name strong,
.brand-tagline-en, .brand-tagline-es, .sidebar-brand small,
.profile-chip, .catalog-availability, .auth-benefits b, .auth-benefits small,
.panel-footer p, .summary-card small, .summary-card > span:last-child,
.purchase-option b, .request-state, .request-controls select,
.event-row span, .event-row small, .help-contact-item span,
.license-period, .license-period p, .field-help, .profile-field .optional-mark,
.verification-modal-card > p { font-size: var(--tads-font-xs); line-height: 1.5; }

.input-wrap input, .purchase-form textarea, .client-detail-card input,
.client-detail-card select, .client-detail-card textarea, .iva-consolidado-form input,
.iva-consolidado-form select, .iva-consolidado-form textarea { font-size: var(--tads-font-base); }

.nav-item, .sidebar-signout { line-height: 1.35; }
.summary-card > b { font-size: var(--tads-font-xl); }
.catalog-tag, .product-status, .request-state { padding: 5px 9px; }

@media (max-width: 700px) {
  :root {
    --tads-font-xs: 13px;
    --tads-font-sm: 14px;
    --tads-font-base: 15px;
    --tads-font-md: 16px;
    --tads-font-lg: 20px;
    --tads-font-xl: 25px;
    --tads-control-height: 46px;
  }
  .dashboard-topbar h2 { font-size: var(--tads-font-xl); }
  .section-title-row h3, .workspace-section h3, .admin-panel h3,
  .tads-client-profile-heading h4, .client-orders-title, .section-heading { font-size: var(--tads-font-lg); }
  .brand-name { font-size: var(--tads-font-xs); }
  .brand-name strong, .brand-tagline-en, .brand-tagline-es, .sidebar-brand small,
  .header-pill, .secure-label, .summary-card small, .summary-card > span:last-child,
  .workspace-footer, .page-footer { font-size: var(--tads-font-xs); }
  .nav-item, .sidebar-signout { font-size: var(--tads-font-sm); }
}

/* Formularios V5: campos equivalentes, etiquetas verticales y una retícula legible. */
:where(.purchase-form, .profile-form, .auth-form, .admin-search-wrap) input:not([type="checkbox"]):not([type="radio"]),
:where(.purchase-form, .profile-form, .auth-form, .admin-search-wrap) select,
:where(.purchase-form, .profile-form, .auth-form, .admin-search-wrap) textarea {
  width: 100%;
  min-height: var(--tads-control-height);
  margin: 0;
  padding: 10px 14px;
  border: 1px solid #cbdcd3;
  border-radius: var(--tads-control-radius);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: var(--tads-font-base);
  line-height: 1.4;
  box-shadow: 0 1px 2px rgba(15, 61, 46, .025);
  transition: border-color .18s, box-shadow .18s, background .18s;
}

:where(.purchase-form, .profile-form, .auth-form, .admin-search-wrap) input:not([type="checkbox"]):not([type="radio"]):focus,
:where(.purchase-form, .profile-form, .auth-form, .admin-search-wrap) select:focus,
:where(.purchase-form, .profile-form, .auth-form, .admin-search-wrap) textarea:focus {
  outline: 0;
  border-color: var(--green-2);
  box-shadow: 0 0 0 4px rgba(46, 158, 114, .12);
  background: #fcfffd;
}

:where(.purchase-form, .profile-form, .auth-form) > label:not(.purchase-option),
.laboral-form > label,
.profile-field,
.admin-search-wrap label {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 7px;
  margin: 0;
}

.laboral-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
  max-width: 900px;
}

.laboral-form > label {
  min-width: 0;
  color: #243a34;
  font-size: var(--tads-font-sm);
  font-weight: 700;
  line-height: 1.4;
}

.laboral-form > [hidden] { display: none !important; }

.laboral-form > label:first-child,
.laboral-form > label:nth-child(2),
.laboral-form > .laboral-form-actions {
  grid-column: 1 / -1;
}

.laboral-form-actions { display: flex; gap: 12px; margin-top: 2px; }
.laboral-form-actions .primary-button, .laboral-form-actions .secondary-button { margin: 0; }
.laboral-form-actions .secondary-button { background: #fff; color: var(--green); border-color: #a9cbb9; }
.laboral-calculator { max-width: 900px; border: 1px solid #dce9e2; border-radius: 12px; background: #fbfdfc; overflow: hidden; }
.laboral-calculator > summary { padding: 14px 18px; color: #1d4d3d; font-size: var(--tads-font-md); font-weight: 700; cursor: pointer; }
.laboral-calculator > summary::marker { color: var(--green); }
.laboral-calculator > .laboral-form { padding: 4px 18px 18px; }
.iva-consolidado-form, .purchase-box .purchase-form, .content-editor-form { max-width: 720px; }
.content-editor-form { max-width: 900px; }
.content-editor-group { margin: 0 0 12px; border: 1px solid #dce9e2; border-radius: 12px; overflow: hidden; background: #fff; }
.content-editor-group > summary { padding: 14px 16px; color: #203b32; background: #f7fbf8; font-size: var(--tads-font-md); font-weight: 700; cursor: pointer; }
.content-editor-fields { display: grid; gap: 12px; padding: 16px; }
.content-editor-fields > label { display: grid; gap: 7px; color: #294238; font-size: var(--tads-font-sm); font-weight: 650; }
.content-editor-fields input, .content-editor-fields textarea { width: 100%; }
.content-editor-fields textarea { min-height: 84px; resize: vertical; }
.content-editor-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.iva-consolidado-form input[type="file"] {
  min-height: var(--tads-control-height);
  padding: 10px 14px;
  border-radius: var(--tads-control-radius);
}

@media (max-width: 700px) {
  .laboral-form { grid-template-columns: minmax(0, 1fr); gap: 15px; }
  .laboral-form > label:first-child,
  .laboral-form > label:nth-child(2),
  .laboral-form > .laboral-form-actions { grid-column: auto; }
  .laboral-form-actions { flex-direction: column; }
  .laboral-calculator > .laboral-form { padding: 4px 14px 16px; }
  .iva-consolidado-panel > summary { min-height: 48px; display: flex; align-items: center; padding: 12px 14px; }
  .iva-consolidado-panel-content { padding: 4px 14px 16px; }
}

/* Tono tipográfico más cercano: peso moderado, buena legibilidad y contraste. */
:root {
  --tads-font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}
body, button, input, select, textarea {
  font-family: var(--tads-font-family);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, .dashboard-topbar h2, .section-title-row h3,
.workspace-section h3, .admin-panel h3 { font-weight: 700; letter-spacing: -0.025em; }
.eyebrow, .auth-kicker { font-weight: 700; letter-spacing: .12em; }
.laboral-form > label, .profile-field label, .auth-form label,
.purchase-form > label:not(.purchase-option), .admin-search-wrap label { font-weight: 600; }
.primary-button, .secondary-button, .catalog-action, .help-card > a,
.nav-item, .sidebar-signout { font-weight: 600; }

/* Experiencia móvil: lectura amplia, controles táctiles y navegación sin desplazamiento lateral. */
@media (max-width: 700px) {
  html, body { max-width: 100%; overflow-x: hidden; }
  .app-shell { width: min(100% - 24px, 1400px); padding: 12px 0 18px; }
  .panel { padding: 20px 15px; border-radius: 16px; }
  .dashboard-layout { gap: 16px; }
  .dashboard-sidebar { padding: 12px; border-radius: 14px; }
  .dashboard-sidebar .sidebar-brand { justify-content: center; padding: 4px 0 13px !important; }
  .dashboard-sidebar .tads-logo-panel-image { max-width: 180px; }
  .sidebar-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; overflow: visible; margin-top: 12px; padding: 0; }
  .sidebar-nav .nav-item { min-width: 0; min-height: 46px; padding: 10px; justify-content: flex-start; font-size: var(--tads-font-sm); line-height: 1.2; }
  .sidebar-nav .nav-item > span { flex: 0 0 20px; width: 20px; }
  .sidebar-signout { width: 100%; min-height: 46px; margin-top: 12px; padding: 10px; justify-content: flex-start; }

  #dashboard, #dashboard .dashboard-layout, #dashboard .dashboard-main { min-height: auto; }
  .dashboard-topbar { gap: 12px; padding-bottom: 16px; }
  .profile-chip { width: 100%; max-width: none; min-height: 46px; }
  .dashboard-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 15px 0 22px; }
  .summary-card { min-height: 104px; padding: 14px; }
  .summary-card > b { font-size: var(--tads-font-lg); }
  .section-title-row { margin-bottom: 16px; }
  .section-title-row p, .dashboard-topbar p { max-width: 100%; }

  .catalog-card, .product-license, .request-card, .purchase-box, .profile-gate { padding: 15px; }
  .product-license { gap: 12px; }
  .catalog-card-footer { gap: 12px; }
  .catalog-action { width: 100%; justify-content: space-between; padding: 8px 0; }
  .purchase-option { padding: 13px; }
  .purchase-option input { width: 20px; height: 20px; flex-basis: 20px; }
  .workspace-footer, .page-footer { flex-direction: column; align-items: flex-start; gap: 8px; }
  .notice { top: 12px; right: 12px; width: calc(100vw - 24px); }
  .iva-consolidado-note { padding: 14px; }
  .laboral-calculator > summary { min-height: 48px; display: flex; align-items: center; padding: 12px 14px; }
}

@media (max-width: 430px) {
  .site-header { flex-direction: column; }
  .header-pill { align-self: flex-start; }
  .dashboard-summary { grid-template-columns: 1fr; }
  .summary-card { min-height: 88px; display: grid; grid-template-columns: 36px 1fr; column-gap: 10px; align-items: center; }
  .summary-icon { grid-row: span 2; margin: 0; }
  .summary-card > span:last-child { grid-column: 2; }
  .sidebar-nav { grid-template-columns: 1fr; }
  .sidebar-nav .nav-item { justify-content: flex-start; }
  .profile-security-note { align-items: flex-start; }
  .auth-benefits { gap: 14px; }
}

/* Móvil integral V2: cada vista se comporta como una aplicación de teléfono. */
@media (min-width: 701px) {
  .mobile-nav-toggle { display: block; }
  .mobile-nav-toggle > summary { display: none; }
}

@media (max-width: 700px) {
  /* Acceso: se prioriza iniciar sesión en vez de reproducir la composición de escritorio. */
  body:not(:has(#dashboard:not(.hidden))) .site-header { display: block; margin: 0 0 14px; }
  body:not(:has(#dashboard:not(.hidden))) .brand-lockup { display: flex; justify-content: center; }
  body:not(:has(#dashboard:not(.hidden))) .tads-logo-main-image { width: min(230px, 72vw); }
  body:not(:has(#dashboard:not(.hidden))) .tads-login-story { display: none; }
  body:not(:has(#dashboard:not(.hidden))) .auth-panel { padding: 20px 16px; }
  body:not(:has(#dashboard:not(.hidden))) .panel-topline { align-items: flex-start; }
  body:not(:has(#dashboard:not(.hidden))) .actions { display: grid; grid-template-columns: 1fr; gap: 6px; }
  body:not(:has(#dashboard:not(.hidden))) .text-button { min-height: 44px; justify-content: center; }

  /* Portal: menú compacto, abierto solo cuando el cliente lo necesita. */
  body:has(#dashboard:not(.hidden)) .auth-panel { padding: 8px; }
  .dashboard-sidebar { padding: 12px; }
  .dashboard-sidebar .sidebar-brand { min-height: auto; padding-bottom: 10px !important; }
  .mobile-nav-toggle { display: block; margin-top: 10px; border: 1px solid rgba(255,255,255,.18); border-radius: 12px; overflow: hidden; }
  .mobile-nav-toggle > summary { display: flex; align-items: center; justify-content: space-between; min-height: 50px; padding: 0 14px; color: #fff; cursor: pointer; font-size: var(--tads-font-sm); font-weight: 700; list-style: none; }
  .mobile-nav-toggle > summary::-webkit-details-marker { display: none; }
  .mobile-nav-toggle > summary::after { content: "⌄"; font-size: 20px; transition: transform .18s ease; }
  .mobile-nav-toggle[open] > summary::after { transform: rotate(180deg); }
  .mobile-nav-toggle .sidebar-nav { display: grid; grid-template-columns: 1fr; gap: 6px; margin: 0; padding: 0 8px 8px; }
  .mobile-nav-toggle .nav-item { min-height: 48px; padding: 11px 12px; border-radius: 9px; }
  .sidebar-signout { margin-top: 10px; border-top: 0; }

  /* Inicio, catálogo, licencias y solicitudes. */
  .dashboard-topbar { padding: 8px 2px 16px; }
  .dashboard-topbar h2 { font-size: 25px; }
  .dashboard-summary { grid-template-columns: 1fr; gap: 10px; }
  .summary-card { min-height: 88px; display: grid; grid-template-columns: 40px 1fr; column-gap: 12px; align-items: center; }
  .summary-icon { grid-row: span 2; width: 40px; height: 40px; margin: 0; }
  .summary-card > span:last-child { grid-column: 2; }
  .catalog-grid, .products-list { grid-template-columns: 1fr; gap: 12px; }
  .catalog-card { min-height: 0; }
  .catalog-card-footer { flex-direction: column; align-items: stretch; }
  .catalog-availability { min-height: 30px; }
  .catalog-action { min-height: 46px; padding: 10px 2px; }
  .product-license { flex-direction: column; }
  .product-license-icon { width: 44px; height: 44px; }
  .license-period { display: grid; gap: 8px; }
  .license-renew-button, .client-history-button, .client-back-button { width: 100%; min-height: 46px; }

  /* Formularios, resultados, carga de JSON y perfiles. */
  .workspace-section, .purchase-box { scroll-margin-top: 10px; }
  .section-title-row { display: block; }
  .section-title-row h3 { font-size: 21px; }
  .profile-gate, .purchase-box { border-radius: 14px; }
  .profile-security-note { display: grid; grid-template-columns: 22px 1fr; }
  .purchase-form, .iva-consolidado-form, .content-editor-form, .laboral-form { max-width: none; }
  .purchase-form > label:not(.purchase-option), .profile-field, .admin-search-wrap { gap: 8px; }
  .purchase-form input:not([type="checkbox"]):not([type="radio"]),
  .purchase-form select, .purchase-form textarea, .profile-form input,
  .profile-form select, .admin-search-wrap input { min-height: 50px; font-size: 16px; }
  .purchase-form textarea { min-height: 110px; }
  .iva-summary-grid { grid-template-columns: 1fr; }
  .iva-summary-card dl { grid-template-columns: 1fr; gap: 6px; }
  .iva-summary-card dd { margin: 0 0 8px; }
  .iva-consolidado-note { border-radius: 12px; }
  .laboral-form-actions { gap: 10px; }
  .laboral-form-actions .primary-button, .laboral-form-actions .secondary-button { min-height: 50px; }

  /* Consultas, administración, ayuda y ventanas de verificación. */
  .request-card-head, .client-license-row { gap: 10px; }
  .request-state { white-space: normal; }
  .request-controls { display: grid; grid-template-columns: 1fr; }
  .request-controls select, .request-controls button { width: 100%; min-height: 44px; font-size: 15px; }
  .admin-search-wrap { display: grid; grid-template-columns: 1fr; }
  .admin-search-wrap input { width: 100%; min-width: 0; }
  .admin-status-group-heading { padding: 14px; }
  .admin-status-group-list { padding: 0 10px 10px; }
  .event-list { padding: 4px 0; }
  .event-row { grid-template-columns: 1fr; padding: 12px 4px; }
  .event-row small { grid-column: auto; }
  .help-card { display: grid; grid-template-columns: 38px 1fr; padding: 16px; }
  .help-content { min-width: 0; }
  .help-contact-grid { grid-template-columns: 1fr; }
  .help-card > a { grid-column: 2; margin: 0; min-height: 44px; }
  .verification-modal { align-items: end; padding: 0; }
  .verification-modal-card { width: 100%; border-radius: 20px 20px 0 0; padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); }
}

/* Iconografía TADS: trazos consistentes y reconocibles en toda la interfaz. */
.nav-icon, .summary-icon svg, .catalog-app-icon svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tads-feature-icon svg {
  display: block;
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav-icon { flex: 0 0 20px; color: currentColor; }
.nav-item > span { display: none; }
.sidebar-signout .nav-icon { width: 21px; height: 21px; }
.summary-icon { display: grid; place-items: center; }
.summary-icon svg { width: 18px; height: 18px; }
.catalog-app-icon svg { width: 27px; height: 27px; }
.iva-icon, .laboral-icon { background: #e8f5ee; color: #176b50; }
.laboral-icon { background: #edf8f2; color: #1b7f5a; }
.accounting-icon { background: #e7f4ed; color: #176b50; }
.product-license-icon.accounting-icon svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* TADS Contabilidad: despacho multiempresa. */
#accountingApp { container-type: inline-size; }
.accounting-header, .accounting-toolbar, .accounting-company-card, .accounting-report-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.accounting-header { margin-bottom: 20px; }
.accounting-header h3 { margin: 5px 0; color: #173b32; font-size: 28px; }
.accounting-header p { margin: 0; color: #5d726c; max-width: 690px; }
.accounting-access, .accounting-status { display: inline-flex; align-items: center; white-space: nowrap; border-radius: 999px; padding: 7px 11px; font-weight: 800; font-size: 12px; color: #087b55; background: #e3f5eb; }
.accounting-toolbar { display: grid; grid-template-columns: minmax(280px, 1.55fr) auto minmax(135px, .68fr) minmax(165px, .86fr) max-content max-content; align-items: end; gap: 12px; padding: 14px; margin-bottom: 16px; border: 1px solid #d9e8df; border-radius: 13px; background: #f8fbf9; }
.accounting-toolbar label { display: grid; gap: 5px; min-width: 0; color: #456158; font-size: 13px; font-weight: 700; }
.accounting-toolbar select, .accounting-form input, .accounting-form select { min-height: 40px; width: 100%; padding: 8px 10px; border: 1px solid #c8d9d0; border-radius: 8px; color: #173b32; background: #fff; }
.accounting-toolbar .accounting-company-data-button { width: auto; align-self: end; min-height: 40px; padding: 8px 10px; border: 1px solid #c8d9d0; border-radius: 8px; background: #fff; color: #176b50; font-weight: 800; white-space: nowrap; }
.accounting-toolbar .accounting-company-data-button:hover { border-color: #176b50; background: #edf8f2; }
.accounting-toolbar > .secondary-button { width: auto; min-height: 40px; margin: 0; padding: 8px 14px; white-space: nowrap; }
.accounting-empty { padding: 35px; border: 1px dashed #a9c9b8; border-radius: 14px; text-align: center; color: #4d665e; background: #f8fbf9; }
.accounting-empty strong { display: block; font-size: 18px; color: #173b32; }
.accounting-company-card { padding: 17px 18px; margin-bottom: 14px; border-radius: 14px; color: #f5fffa; background: linear-gradient(130deg, #0c332b, #176b50); }
.accounting-company-card span:first-child { font-size: 11px; letter-spacing: .1em; font-weight: 800; opacity: .76; }
.accounting-company-card h4 { margin: 3px 0; font-size: 19px; }
.accounting-company-card p { margin: 0; opacity: .85; font-size: 13px; }
.accounting-company-card .accounting-status { background: rgba(255,255,255,.15); color: #fff; }
.accounting-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.accounting-metrics article { border: 1px solid #d9e8df; border-radius: 12px; padding: 13px; background: #fff; }
.accounting-metrics small { display: block; color: #647a72; font-weight: 700; }
.accounting-metrics strong { display: block; margin-top: 5px; color: #146548; font-size: 22px; }
.accounting-mode-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 18px 0 14px; padding: 6px; border-radius: 12px; background: #eaf3ed; }
.accounting-mode-tabs-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.accounting-mode-tabs button { min-height: 48px; border: 0; border-radius: 9px; color: #315b4d; background: transparent; font-weight: 800; cursor: pointer; }
.accounting-mode-tabs button.active { color: #fff; background: #146548; box-shadow: 0 4px 10px rgba(12,76,54,.18); }
.accounting-operation-intro { display: flex; justify-content: space-between; gap: 18px; align-items: center; padding: 16px; margin-bottom: 14px; border-radius: 13px; background: #f0f8f3; color: #4e6c61; }
.accounting-operation-intro h4 { margin: 4px 0; color: #173b32; font-size: 19px; }.accounting-operation-intro p { margin: 0; }.accounting-operation-intro > span { white-space: nowrap; font-weight: 800; color: #176b50; }
.accounting-action-card { padding: 17px; border-bottom: 1px solid #e1ece5; }.accounting-action-card:last-of-type { border-bottom: 0; }.accounting-action-card h4 { margin: 4px 0; color: #173b32; font-size: 18px; }.accounting-action-card p { margin: 0 0 13px; color: #5d746b; font-size: 13px; }
.accounting-inline-form { display: flex; align-items: center; gap: 10px; }.accounting-inline-form input[type="file"] { min-width: 0; flex: 1; padding: 8px; border: 1px dashed #a7c7b5; border-radius: 8px; background: #fbfdfc; }
#accountingDteForm { display: grid; grid-template-columns: minmax(132px, 150px) repeat(2, minmax(0, 1fr)); align-items: start; gap: 12px; width: min(100%, 780px); max-width: 100%; }.accounting-date-control select { min-height: 42px; padding: 8px; border: 1px solid #c8d9d0; border-radius: 8px; background: #fff; } #accountingDteForm > label { display: grid; grid-template-rows: auto minmax(42px, auto) auto; min-width: 0; width: 100%; } #accountingDteForm input, #accountingDteForm select { box-sizing: border-box; width: 100%; max-width: 100%; min-width: 0; } .accounting-dte-actions { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, 220px); gap: 12px; align-items: stretch; } #accountingDteForm .primary-button { min-height: 48px; white-space: nowrap; }
.accounting-operation-grid { grid-template-columns: minmax(0, 1fr); }.accounting-operation-grid .accounting-side { grid-template-columns: repeat(3, minmax(0, 1fr)); }.accounting-manual-card { margin-top: 16px; }.accounting-manual-card .accounting-panel { width: 100%; }.accounting-manual-card .accounting-form { max-width: none; }
.accounting-file-picker { position: relative; display: grid; gap: 1px; min-height: 48px; flex: 1; padding: 7px 12px 7px 39px; border: 1px dashed #6eaa8c; border-radius: 9px; color: #15553e; background: #f5fbf7; cursor: pointer; }.accounting-file-picker::before { content: "↑"; position: absolute; left: 12px; top: 13px; display: grid; width: 20px; height: 20px; place-items: center; border-radius: 50%; color: #fff; background: #177854; font-weight: 900; }.accounting-file-picker input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }.accounting-file-picker span { font-size: 13px; font-weight: 800; }.accounting-file-picker small { color: #658177; font-size: 11px; }.accounting-date-control { display: grid; gap: 5px; color: #456158; font-size: 12px; font-weight: 800; white-space: nowrap; }.accounting-date-control input { min-height: 42px; padding: 8px; border: 1px solid #c8d9d0; border-radius: 8px; }
.accounting-suggestions { margin: 16px 0 0; padding-top: 16px; border-top: 2px solid #d9e9df; }
.accounting-document-stack { padding: 0; overflow: hidden; }.accounting-document-panel { border-bottom: 1px solid #dce9e1; background: #fff; }.accounting-document-panel:last-of-type { border-bottom: 0; }.accounting-document-panel summary { display: flex; align-items: center; min-height: 56px; padding: 0 20px; cursor: pointer; list-style: none; color: #173b32; }.accounting-document-panel summary::-webkit-details-marker { display: none; }.accounting-document-panel summary::before { content: "›"; margin-right: 12px; color: #177854; font-size: 22px; font-weight: 800; transition: transform .16s ease; }.accounting-document-panel[open] summary::before { transform: rotate(90deg); }.accounting-document-panel summary span { display: grid; gap: 2px; }.accounting-document-panel summary b { font-size: 15px; }.accounting-document-panel summary small { color: #6a8178; font-size: 11px; }.accounting-document-body { padding: 0 20px 16px 38px; }.accounting-document-body > p { max-width: 850px; margin: 0 0 10px; color: #5d746b; font-size: 12px; line-height: 1.35; }.accounting-document-hint b { color: #315b4d; }
.accounting-tabs { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.accounting-report-tabs { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.accounting-report-tabs .accounting-tabs { margin-bottom: 14px; }
.accounting-export-button { white-space: nowrap; }
.accounting-tabs button { border: 1px solid #cfe0d7; background: #fff; color: #315b4d; padding: 8px 11px; border-radius: 8px; font-weight: 700; cursor: pointer; }
.accounting-tabs button.active { border-color: #177854; background: #177854; color: #fff; }
.accounting-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, .85fr); gap: 16px; align-items: start; }
.accounting-grid-full { display: block; }
.accounting-grid-full .accounting-work-card { width: 100%; }
.accounting-workspace-nav { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; padding: 10px 12px; border: 1px solid #dce9e1; border-radius: 11px; background: #fff; }
.accounting-workspace-nav .accounting-mode-tabs { flex: 1; margin: 0; }
.accounting-workspace-nav-compact { justify-content: space-between; min-height: 58px; padding: 10px 16px; }
.accounting-workspace-nav-compact .text-button { min-height: 38px; padding: 8px 4px; }
.accounting-workspace-current { display: inline-flex; align-items: center; min-height: 38px; padding: 8px 14px; border-radius: 9px; background: #176b50; color: #fff; font-size: 14px; font-weight: 800; }
.accounting-workspace-note { color: #5d726c; font-size: 13px; }
.accounting-summary-actions { margin-top: 18px; padding: 20px; border: 1px solid #dce9e1; border-radius: 13px; background: #fff; }
.accounting-summary-actions h4 { margin: 5px 0; color: #173b32; }
.accounting-summary-actions p { margin: 0; color: #5d766c; }
.accounting-summary-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin-top: 17px; }
.accounting-summary-cards button { display: grid; gap: 6px; min-height: 116px; padding: 17px; border: 1px solid #cfe0d7; border-radius: 11px; background: #f8fcf9; color: #184b39; text-align: left; cursor: pointer; }
.accounting-summary-cards button:hover { border-color: #18805b; background: #edf8f1; }
.accounting-summary-cards b { font-size: 15px; }
.accounting-summary-cards span { color: #597269; font-size: 13px; line-height: 1.4; }
.accounting-work-card, .accounting-panel { border: 1px solid #dce9e1; border-radius: 13px; background: #fff; box-shadow: 0 5px 15px rgba(18,54,45,.04); }
.accounting-work-card { padding: 17px; min-width: 0; }
.accounting-side { display: grid; gap: 10px; }
.accounting-panel summary { cursor: pointer; padding: 13px 14px; color: #173b32; font-weight: 800; }
.accounting-panel[open] summary { border-bottom: 1px solid #e4eee8; }
.accounting-panel-body, .accounting-form { padding: 13px 14px; }
.accounting-form { display: grid; gap: 10px; }
.accounting-form label { display: grid; gap: 5px; color: #49645b; font-size: 13px; font-weight: 700; }
.accounting-form .accounting-check { display: flex; align-items: center; gap: 8px; }
.accounting-form .accounting-check input { width: auto; min-height: auto; }
.accounting-entry-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.accounting-line-head, .accounting-line { display: grid; grid-template-columns: 1.55fr 1.2fr .7fr .7fr auto; gap: 6px; align-items: center; }
.accounting-line-head { color: #60796f; font-size: 11px; font-weight: 800; padding: 0 2px; }
.accounting-line-head span:nth-child(3), .accounting-line-head span:nth-child(4) { text-align: right; }
.accounting-line input { min-width: 0; }
.accounting-table-wrap { overflow: auto; }
.accounting-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.accounting-table th { color: #547066; background: #f3f8f5; text-align: left; font-size: 11px; letter-spacing: .03em; text-transform: uppercase; }
.accounting-table th, .accounting-table td { padding: 10px 9px; border-bottom: 1px solid #e5eee9; vertical-align: top; }
.accounting-table td small { display: block; margin-top: 3px; color: #6b8178; }
.accounting-table .number { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.accounting-table tr[hidden], .financial-tree[hidden], .financial-tree-node[hidden] { display: none !important; }
.accounting-type-select { min-width: 132px; border: 1px solid #cfe0d7; border-radius: 7px; padding: 6px 8px; color: #214c3d; background: #fff; }
.accounting-empty-row { padding: 28px !important; text-align: center; color: #6c8279; }
.accounting-total td { border-top: 2px solid #8abca5; color: #124c38; font-weight: 800; }
.accounting-group-row td { background: #e9f5ee; color: #126344; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.accounting-subtotal td { background: #f6fbf8; border-top: 1px solid #b9dac7; color: #14513c; font-weight: 750; }
.accounting-actions { white-space: nowrap; }
.accounting-actions .text-button { margin-right: 7px; }
.danger-button { color: #a02d2d; }
.financial-rubro { border-top: 1px solid #dbe8e0; }
.financial-rubro h5, .financial-mayor h6 { margin: 0; padding: 9px 12px; color: #175942; font-size: 12px; background: #f7fbf8; }
.financial-mayor { border-top: 1px solid #e5eee9; }
.financial-mayor h6 { padding-left: 25px; background: #fff; color: #3b6757; }
.financial-account { padding-left: 38px !important; }
.financial-rubro > footer, .financial-mayor > footer { display: flex; justify-content: space-between; gap: 15px; padding: 8px 12px; color: #17513c; font-size: 12px; font-weight: 750; border-top: 1px solid #d5e6db; }
.accounting-report-head { padding-bottom: 14px; margin-bottom: 5px; border-bottom: 1px solid #e4eee8; color: #547066; font-size: 13px; }
.accounting-report-head h4 { margin: 3px 0 0; color: #173b32; font-size: 20px; }
.financial-group { margin: 12px 0; border: 1px solid #e3ede7; border-radius: 10px; overflow: hidden; }
.financial-group h4, .financial-group > footer { display: flex; justify-content: space-between; gap: 15px; padding: 10px 12px; margin: 0; }
.financial-group h4 { background: #f1f8f4; color: #176b50; font-size: 13px; }
.financial-group h4 { align-items: center; }
.financial-group h4 button { flex: 1; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; font: inherit; font-weight: 800; cursor: pointer; }
.financial-group h4 button i, .financial-tree-node button i { display: inline-block; width: 18px; font-style: normal; }
.financial-group > footer { border-top: 1px solid #c9ded1; color: #123e2f; font-weight: 800; }
.financial-tree { padding: 5px 0; }
.financial-tree-node { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 9px 14px; border-top: 1px solid #edf3ef; color: #274b3e; font-size: 13px; }
.financial-tree-node span { min-width: 0; }
.financial-tree-node small { display: block; margin-bottom: 2px; color: #698479; font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.financial-tree-node b { white-space: nowrap; color: #173d30; font-variant-numeric: tabular-nums; }
.financial-tree-node button { padding: 0; border: 0; background: transparent; color: inherit; text-align: left; font: inherit; cursor: pointer; }
.financial-tree-level-0 { background: #f7fbf8; padding-left: 18px; color: #126044; font-weight: 800; }
.financial-tree-level-1 { padding-left: 42px; font-weight: 700; }
.financial-tree-level-2 { padding-left: 66px; }
.financial-tree-level-3, .financial-tree-level-4 { padding-left: 90px; color: #425f55; }
.financial-statement-summary { margin: 16px 0 4px; border: 1px solid #b9dac7; border-radius: 10px; overflow: hidden; }
.financial-statement-summary div { display: flex; justify-content: space-between; gap: 20px; padding: 12px 14px; border-top: 1px solid #dce9e1; color: #123e2f; font-weight: 800; }
.financial-statement-summary div:first-child { border-top: 0; }
.financial-statement-summary div:last-child { background: #eaf5ee; font-size: 15px; }
.trial-hierarchy-head,
.trial-financial-group h4,
.trial-financial-group > footer,
.trial-tree-node,
.trial-statement-summary div { display:grid !important; grid-template-columns:minmax(260px, 1fr) repeat(4, minmax(90px, auto)); gap:14px; align-items:center; }
.trial-hierarchy-head { margin-top:12px; padding:10px 14px; border:1px solid #dce9e1; border-bottom:0; border-radius:10px 10px 0 0; background:#f1f8f4; color:#557367; font-size:11px; font-weight:800; letter-spacing:.02em; text-transform:uppercase; }
.trial-hierarchy-wrap { max-width:100%; overflow-x:auto; padding-bottom:2px; }
.trial-hierarchy-head span:not(:first-child),
.trial-financial-group h4 > b,
.trial-financial-group > footer > b,
.trial-tree-node > b,
.trial-statement-summary b { text-align:right; white-space:nowrap; }
.trial-financial-group { margin:0; border-radius:0; border-top:0; }
.trial-financial-group:last-of-type { border-radius:0 0 10px 10px; }
.trial-financial-group h4 > button { min-width:0; }
.trial-tree-node { grid-template-columns:minmax(260px, 1fr) repeat(4, minmax(90px, auto)); }
.trial-statement-summary { margin-top:14px; }
.trial-statement-summary div { grid-template-columns:minmax(260px, 1fr) repeat(4, minmax(90px, auto)); }
@media (max-width:760px) { .trial-hierarchy-head, .trial-financial-group h4, .trial-financial-group > footer, .trial-tree-node, .trial-statement-summary div { min-width:720px; } .trial-hierarchy-head, .trial-financial-group, .trial-statement-summary { width:max-content; min-width:100%; } .trial-financial-group { overflow:visible; } }
.ledger-hierarchy-wrap { max-width:100%; overflow-x:auto; padding-bottom:2px; }
.ledger-hierarchy-head,
.ledger-financial-group h4,
.ledger-financial-group > footer,
.ledger-tree-node,
.ledger-movement-row { display:grid !important; grid-template-columns:minmax(230px, 1.45fr) minmax(94px, .6fr) minmax(92px, .6fr) minmax(210px, 1.1fr) repeat(3, minmax(88px, auto)); gap:12px; align-items:center; }
.ledger-hierarchy-head { margin-top:12px; padding:10px 14px; border:1px solid #dce9e1; border-bottom:0; border-radius:10px 10px 0 0; background:#f1f8f4; color:#557367; font-size:11px; font-weight:800; letter-spacing:.02em; text-transform:uppercase; }
.ledger-financial-group { margin:0; border-radius:0; border-top:0; }
.ledger-financial-group:last-child { border-radius:0 0 10px 10px; }
.ledger-financial-group h4 > button { min-width:0; }
.ledger-tree-node { grid-template-columns:minmax(230px, 1.45fr) minmax(94px, .6fr) minmax(92px, .6fr) minmax(210px, 1.1fr) repeat(3, minmax(88px, auto)); }
.ledger-hierarchy-head span:nth-last-child(-n+3),
.ledger-financial-group h4 > b,
.ledger-financial-group > footer > b,
.ledger-tree-node > b,
.ledger-movement-row > b { text-align:right; white-space:nowrap; }
.ledger-movement-row { padding:8px 14px; border-top:1px solid #edf3ef; background:#fff; color:#4e695e; font-size:12px; }
.ledger-movement-row span:nth-child(4) { min-width:0; overflow-wrap:anywhere; }
@media (max-width:900px) { .ledger-hierarchy-head, .ledger-financial-group h4, .ledger-financial-group > footer, .ledger-tree-node, .ledger-movement-row { min-width:990px; } .ledger-hierarchy-head, .ledger-financial-group { width:max-content; min-width:100%; } .ledger-financial-group { overflow:visible; } }
.accounting-signatures { margin-top: 18px; }
.accounting-group-row button { width: 100%; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; font: inherit; cursor: pointer; }
.accounting-group-row button span { display: inline-block; width: 18px; }
.accounting-entry-summary { background: #f7fbf8; font-weight: 700; }
.accounting-entry-summary .text-button { color: #145f45; font-weight: 800; }
.accounting-entry-summary .text-button span { display: inline-block; width: 17px; }
.accounting-entry-detail td { background: #fff; }
.accounting-bulk-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 12px; color: #315b4d; font-size: 13px; font-weight: 700; }
.accounting-bulk-actions label { display: inline-flex; align-items: center; gap: 7px; }
.accounting-report-period { display: flex; align-items: center; gap: 13px; color: #597269; font-size: 12px; white-space: nowrap; }
.accounting-report-period label { display: inline-flex; align-items: center; gap: 6px; color: #315b4d; font-weight: 700; }
.accounting-report-period select { border: 1px solid #cfe0d7; border-radius: 7px; padding: 6px 8px; color: #214c3d; background: #fff; }
.accounting-modal-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: rgba(9, 38, 29, .5); overflow: auto; }
.accounting-modal { width: min(820px, 100%); max-height: calc(100vh - 40px); overflow: auto; border-radius: 16px; background: #fff; box-shadow: 0 24px 70px rgba(3, 28, 20, .35); }
.accounting-modal-head { display: flex; justify-content: space-between; align-items: start; gap: 18px; padding: 22px 24px 16px; border-bottom: 1px solid #e3eee8; }
.accounting-modal-head h3 { margin: 4px 0; color: #173b32; font-size: 24px; }
.accounting-modal-head p { margin: 0; color: #5c746b; }
.accounting-tenant-form { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; padding: 22px 24px; }
.accounting-tenant-form label { display: grid; gap: 6px; color: #456158; font-size: 13px; font-weight: 800; }
.accounting-tenant-form input, .accounting-tenant-form select { width: 100%; min-height: 42px; padding: 9px 10px; border: 1px solid #c8d9d0; border-radius: 8px; color: #173b32; background: #fff; }
.accounting-tenant-form label.wide, .accounting-modal-actions { grid-column: 1 / -1; }
.accounting-tenant-form small { color: #668078; font-weight: 500; }
.accounting-modal-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 4px; }
.accounting-dialog { width: min(510px, 100%); padding: 0; overflow: hidden; border: 1px solid #b8d9c6; }
.accounting-dialog-mark { padding: 13px 24px; color: #fff; background: linear-gradient(115deg, #0d5c44, #159364); font-weight: 900; letter-spacing: .18em; font-size: 13px; }
.accounting-dialog-content { padding: 22px 24px 4px; }
.accounting-dialog-content h3 { margin: 5px 0 9px; color: #173b32; font-size: 22px; }
.accounting-dialog-content p { margin: 0; color: #466559; line-height: 1.55; }
.accounting-dialog .accounting-modal-actions { padding: 18px 24px 22px; }
@media (max-width: 1000px) { .accounting-grid { grid-template-columns: 1fr; } .accounting-side, .accounting-operation-grid .accounting-side { grid-template-columns: repeat(2, minmax(0, 1fr)); } .accounting-side .accounting-panel:last-child { grid-column: 1 / -1; } }
@media (max-width: 1180px) and (min-width: 701px) { .accounting-toolbar { grid-template-columns: minmax(260px, 1.35fr) auto minmax(130px, .62fr) minmax(155px, .78fr); } .accounting-toolbar > .secondary-button { grid-column: span 2; width: 100%; } }
@container (max-width: 1100px) { .accounting-toolbar { grid-template-columns: minmax(260px, 1.35fr) auto minmax(130px, .62fr) minmax(155px, .78fr); } .accounting-toolbar > .secondary-button { grid-column: span 2; width: 100%; } }
@media (max-width: 800px) { #accountingDteForm { grid-template-columns: minmax(132px, 150px) repeat(2, minmax(0, 1fr)); width: 100%; } }
@media (max-width: 700px) { .accounting-header, .accounting-toolbar, .accounting-company-card, .accounting-report-head, .accounting-operation-intro, .accounting-inline-form, .accounting-report-tabs, .accounting-bulk-actions, .accounting-workspace-nav { align-items: stretch; flex-direction: column; } #accountingDteForm { grid-template-columns: 1fr; } .accounting-dte-actions { grid-column: 1; grid-template-columns: 1fr; } #accountingDteForm .primary-button { grid-column: auto; } .accounting-mode-tabs-three { grid-template-columns: 1fr; } .accounting-toolbar label { min-width: 0; } .accounting-toolbar .accounting-company-data-button { align-self: stretch; } .accounting-workspace-note { text-align: left; } .accounting-metrics, .accounting-summary-cards { grid-template-columns: 1fr; } .accounting-side { grid-template-columns: 1fr; } .accounting-side .accounting-panel:last-child { grid-column: auto; } .accounting-line-head { display: none; } .accounting-line { grid-template-columns: 1fr 1fr; padding: 10px 0; border-bottom: 1px solid #e4eee8; } .accounting-line button { grid-column: 1 / -1; justify-self: start; } .accounting-document-body { padding: 0 14px 16px; }.accounting-document-panel summary { padding: 0 14px;}.accounting-document-panel summary::before { margin-right: 8px; } .accounting-modal-backdrop { padding: 0; align-items: end; } .accounting-modal { max-height: 94vh; border-radius: 17px 17px 0 0; } .accounting-modal-head, .accounting-tenant-form { padding-left: 17px; padding-right: 17px; } .accounting-tenant-form { grid-template-columns: 1fr; } .accounting-tenant-form label.wide, .accounting-modal-actions { grid-column: auto; } }
@media (max-width: 700px) {
  .accounting-toolbar { grid-template-columns: 1fr; align-items: stretch; }
  .accounting-toolbar .accounting-company-data-button, .accounting-toolbar > .secondary-button { width: 100%; align-self: stretch; }
  .sidebar-nav .nav-item > .nav-icon { width: 21px; height: 21px; }
  .summary-icon svg { width: 21px; height: 21px; }
  .catalog-app-icon svg { width: 29px; height: 29px; }
}


/* TADS CONTABILIDAD — SALDOS INICIALES */

.tads-saldos-iniciales {
  width: 100%;
  max-width: 650px;
  padding: 16px;
  border: 1px solid #dce8e2;
  border-radius: 12px;
  background: #fff;
  box-sizing: border-box;
}

.tads-saldos-iniciales .saldos-descripcion {
  max-width: 590px;
  margin: 6px 0 14px;
  color: #687a72;
  font-size: 12px;
  line-height: 1.5;
}

.tads-saldos-iniciales .saldos-controles {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
}

.tads-saldos-iniciales .saldos-archivo {
  flex: 0 1 220px;
  min-width: 0;
}

.tads-saldos-iniciales .saldos-fecha {
  flex: 0 0 155px;
  min-width: 0;
}

.tads-saldos-iniciales .saldos-fecha input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  box-sizing: border-box;
}

.tads-saldos-iniciales .saldos-validar {
  flex: 0 1 auto;
  width: auto;
  min-width: 190px;
  min-height: 44px;
  margin: 0;
  padding: 10px 16px;
  white-space: normal;
  border-radius: 9px;
  font-size: 12px;
}

/* Adaptación a tabletas y móviles */
@media (max-width: 600px) {
  .tads-saldos-iniciales {
    max-width: 100%;
    padding: 13px;
  }

  .tads-saldos-iniciales .saldos-controles {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .tads-saldos-iniciales .saldos-archivo,
  .tads-saldos-iniciales .saldos-fecha,
  .tads-saldos-iniciales .saldos-validar {
    width: 100%;
    min-width: 0;
  }

  .tads-saldos-iniciales .saldos-validar {
    white-space: normal;
  }
}


/* ==============================================
   TADS CONTABILIDAD
   IMPORTACIÓN DE SALDOS INICIALES
   Diseño compacto y adaptable
   ============================================== */

.accounting-opening-balances {
  width: 100%;
  box-sizing: border-box;
}

.accounting-opening-balances .accounting-document-body {
  padding: 14px 16px;
}

.accounting-opening-balances .opening-balances-description {
  max-width: 680px;
  margin: 0 0 16px;
  font-size: 12px;
  line-height: 1.55;
  color: #64786e;
}

/* Controles compactos */
.accounting-opening-balances .opening-balances-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 12px;
  width: 100%;
  max-width: 650px;
  margin: 0;
}

/* Selector de archivo */
.accounting-opening-balances .opening-balances-file {
  flex: 0 0 210px;
  width: 210px;
  max-width: 100%;
  min-width: 0;
  min-height: 68px;
  box-sizing: border-box;
  padding: 10px 12px;
  text-align: left;
  overflow-wrap: break-word;
}

.accounting-opening-balances .opening-balances-file span {
  display: block;
  font-size: 12px;
  line-height: 1.4;
}

.accounting-opening-balances .opening-balances-file small {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  color: #64786e;
}

/* Fecha */
.accounting-opening-balances .opening-balances-date {
  flex: 0 0 155px;
  width: 155px;
  min-width: 0;
  font-size: 12px;
}

.accounting-opening-balances .opening-balances-date input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  box-sizing: border-box;
}

/* Botón de validación */
.accounting-opening-balances .opening-balances-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: auto !important;
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  white-space: normal;
  cursor: pointer;
}

/* ==============================================
   VERSIÓN MÓVIL
   ============================================== */

@media (max-width: 600px) {
  .accounting-opening-balances {
    width: 100%;
    max-width: 100%;
  }

  .accounting-opening-balances .accounting-document-body {
    padding: 12px;
  }

  .accounting-opening-balances .opening-balances-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    max-width: 100%;
  }

  .accounting-opening-balances .opening-balances-file,
  .accounting-opening-balances .opening-balances-date,
  .accounting-opening-balances .opening-balances-submit {
    width: 100% !important;
    max-width: 100%;
    min-width: 0;
  }

  .accounting-opening-balances .opening-balances-file {
    min-height: 64px;
  }

  .accounting-opening-balances .opening-balances-submit {
    min-height: 44px;
  }
}


/* ==========================================
   TADS CONTABILIDAD
   CARGA DE DOCUMENTOS — DISEÑO PROFESIONAL
   ========================================== */

.accounting-document-stack {
  display: grid;
  gap: 14px;
  padding: 16px;
  background: #f8faf9;
  border: 1px solid #e1eae5;
  border-radius: 14px;
  overflow: visible;
}

/* Tarjetas independientes */
.accounting-document-stack > .accounting-document-panel {
  min-width: 0;
  margin: 0;
  border: 1px solid #dce7e0;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(15,61,46,.025);
}

.accounting-document-stack > .accounting-document-panel[open] {
  border-color: #b8d5c5;
}

/* Encabezados */
.accounting-document-stack .accounting-document-panel summary {
  display: flex;
  align-items: center;
  min-height: 70px;
  padding: 14px 18px;
  background: #fff;
  border: 0;
  cursor: pointer;
}

.accounting-document-stack .accounting-document-panel[open] summary {
  border-bottom: 1px solid #edf2ef;
}

.accounting-document-stack .accounting-document-panel summary::before {
  flex: 0 0 25px;
  width: 25px;
  height: 25px;
  margin-right: 12px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #eaf5ee;
  color: #176b50;
  font-size: 20px;
}

.accounting-document-stack .accounting-document-panel summary b {
  font-size: 14px;
  line-height: 1.4;
  font-weight: 750;
  color: #173b32;
}

.accounting-document-stack .accounting-document-panel summary small {
  margin-top: 3px;
  font-size: 11px;
  line-height: 1.5;
  color: #71847a;
}

/* Contenido */
.accounting-document-stack .accounting-document-body {
  padding: 18px 20px 20px;
}

.accounting-document-stack .accounting-document-body > p {
  max-width: 720px;
  margin: 0 0 18px;
  font-size: 12px;
  line-height: 1.65;
  color: #61766b;
}

/* Campos generales */
.accounting-document-stack .accounting-inline-form {
  min-width: 0;
  margin: 0;
  gap: 14px;
}

.accounting-document-stack .accounting-inline-form > label {
  min-width: 0;
  color: #344d42;
  font-size: 12px;
  font-weight: 650;
}

.accounting-document-stack input[type="date"],
.accounting-document-stack input[type="month"],
.accounting-document-stack select {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid #d1ded6;
  border-radius: 9px;
  background: #fff;
  color: #233a30;
  font-size: 13px;
  font-weight: 450;
  box-sizing: border-box;
}

.accounting-document-stack input:focus-visible,
.accounting-document-stack select:focus-visible,
.accounting-document-stack button:focus-visible,
.accounting-document-stack summary:focus-visible {
  outline: 2px solid #2e9e72;
  outline-offset: 2px;
}

.accounting-document-stack label > small {
  font-size: 11px;
  line-height: 1.5;
  color: #75877e;
}

/* Selector de archivos */
.accounting-document-stack .accounting-file-picker {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: initial;
  min-width: 0;
  min-height: 60px;
  padding: 11px 14px 11px 46px;
  border: 1px dashed #91bea5;
  border-radius: 10px;
  background: #f7fbf8;
  cursor: pointer;
  white-space: normal;
}

.accounting-document-stack .accounting-file-picker::before {
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 23px;
  height: 23px;
  font-size: 15px;
}

.accounting-document-stack .accounting-file-picker span {
  display: block;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.accounting-document-stack .accounting-file-picker small {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  line-height: 1.4;
}

.accounting-document-stack .accounting-file-picker:hover {
  background: #edf8f1;
  border-color: #176b50;
}

.accounting-document-stack .accounting-file-picker:focus-within {
  outline: 2px solid #2e9e72;
  outline-offset: 2px;
}

/* Botones consistentes */
.accounting-document-stack .primary-button,
.accounting-document-stack .secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: auto !important;
  max-width: 100%;
  min-width: 0;
  min-height: 44px;
  margin: 0;
  padding: 10px 20px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  white-space: normal;
  text-align: center;
}

.accounting-document-stack .secondary-button {
  background: #fff;
  border: 1px solid #b9cfc2;
  color: #176b50;
}

.accounting-document-stack .secondary-button:hover {
  background: #eef7f1;
}

/* ==========================================
   1. COMPRAS Y VENTAS
   ========================================== */

.accounting-document-stack #accountingDteForm {
  display: grid;
  grid-template-columns:
    minmax(150px, 190px)
    minmax(180px, 260px)
    minmax(180px, 260px);
  gap: 14px;
  align-items: start;
  width: 100%;
  max-width: 750px;
}

.accounting-document-stack #accountingDteForm > label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  min-width: 0;
}

.accounting-document-stack .accounting-dte-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
}

.accounting-document-stack .accounting-dte-actions
.accounting-file-picker {
  flex: 1 1 280px;
  max-width: 440px;
}

.accounting-document-stack #accountingDteForm
.primary-button {
  flex: 0 0 auto;
  min-width: 165px;
  align-self: stretch;
  background: #176b50;
  color: #fff;
  border: 1px solid #176b50;
}

.accounting-document-stack #accountingDteForm
.primary-button:hover {
  background: #0f3d2e;
}

/* ==========================================
   2. CATÁLOGO DE CUENTAS
   ========================================== */

.accounting-document-stack #accountingCatalogImportForm {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 12px;
  max-width: 650px;
}

.accounting-document-stack #accountingCatalogImportForm
.accounting-file-picker {
  flex: 1 1 250px;
  max-width: 350px;
}

.accounting-document-stack #accountingCatalogImportForm
.secondary-button {
  align-self: stretch;
  min-width: 155px;
}

/* ==========================================
   3. SALDOS INICIALES
   ========================================== */

.accounting-document-stack .accounting-opening-balances
.opening-balances-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 12px;
  width: 100%;
  max-width: 760px;
}

.accounting-document-stack .accounting-opening-balances
.opening-balances-file {
  flex: 0 1 270px;
  width: 270px;
  min-width: 190px;
  min-height: 60px;
  padding-left: 46px;
}

.accounting-document-stack .accounting-opening-balances
.opening-balances-date {
  flex: 0 0 160px;
  width: 160px;
  min-width: 0;
}

.accounting-document-stack .accounting-opening-balances
.opening-balances-submit {
  flex: 0 0 auto;
  width: auto !important;
  min-width: 195px;
  min-height: 44px;
}

/* ==========================================
   TABLETAS
   ========================================== */

@media (max-width: 900px) {
  .accounting-document-stack #accountingDteForm {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
    max-width: 100%;
  }

  .accounting-document-stack #accountingDteForm
  > label:first-child {
    grid-column: 1 / -1;
    max-width: 240px;
  }

  .accounting-document-stack .accounting-dte-actions {
    grid-column: 1 / -1;
  }
}

/* ==========================================
   TELÉFONOS
   ========================================== */

@media (max-width: 600px) {
  .accounting-document-stack {
    gap: 12px;
    padding: 10px;
  }

  .accounting-document-stack
  .accounting-document-panel summary {
    min-height: 64px;
    padding: 12px;
  }

  .accounting-document-stack
  .accounting-document-body {
    padding: 14px 12px 16px;
  }

  .accounting-document-stack #accountingDteForm {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .accounting-document-stack #accountingDteForm
  > label:first-child {
    grid-column: auto;
    max-width: 100%;
  }

  .accounting-document-stack .accounting-dte-actions,
  .accounting-document-stack #accountingCatalogImportForm,
  .accounting-document-stack .accounting-opening-balances
  .opening-balances-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    width: 100%;
    max-width: 100%;
  }

  .accounting-document-stack .accounting-file-picker,
  .accounting-document-stack .accounting-dte-actions
  .accounting-file-picker,
  .accounting-document-stack #accountingCatalogImportForm
  .accounting-file-picker,
  .accounting-document-stack .accounting-opening-balances
  .opening-balances-file,
  .accounting-document-stack .accounting-opening-balances
  .opening-balances-date {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .accounting-document-stack .primary-button,
  .accounting-document-stack .secondary-button {
    width: 100% !important;
    min-width: 0;
    max-width: 100%;
    min-height: 46px;
  }
}


/* ==========================================
   TADS CONTABILIDAD
   TIPOGRAFÍA UNIFICADA
   ========================================== */

/* Fuente base del módulo */
#accountingApp {
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

/* Encabezado de carga de documentos */
#accountingApp .accounting-operation-intro h4 {
  font-size: 19px;
  font-weight: 750;
  line-height: 1.35;
}

#accountingApp .accounting-operation-intro p {
  font-size: 14px;
  line-height: 1.6;
}

#accountingApp .accounting-operation-intro .eyebrow {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
}

/* Títulos de tarjetas */
#accountingApp .accounting-document-stack
.accounting-document-panel summary b {
  font-size: 15px;
  font-weight: 750;
  line-height: 1.4;
}

/* Subtítulos */
#accountingApp .accounting-document-stack
.accounting-document-panel summary small {
  font-size: 12px;
  line-height: 1.5;
}

/* Descripciones */
#accountingApp .accounting-document-stack
.accounting-document-body > p {
  font-size: 13px;
  line-height: 1.65;
}

/* Etiquetas */
#accountingApp .accounting-document-stack
.accounting-inline-form > label {
  font-size: 13px;
  font-weight: 650;
}

/* Campos */
#accountingApp .accounting-document-stack
input[type="date"],
#accountingApp .accounting-document-stack
input[type="month"],
#accountingApp .accounting-document-stack select {
  font-family: inherit;
  font-size: 14px;
}

/* Textos auxiliares */
#accountingApp .accounting-document-stack
label > small {
  font-size: 12px;
  line-height: 1.5;
}

/* Selector de archivos */
#accountingApp .accounting-document-stack
.accounting-file-picker span {
  font-size: 13px;
  font-weight: 700;
}

#accountingApp .accounting-document-stack
.accounting-file-picker small {
  font-size: 12px;
}

/* Botones */
#accountingApp .accounting-document-stack
.primary-button,
#accountingApp .accounting-document-stack
.secondary-button {
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
}

/* Móviles */
@media (max-width: 600px) {
  #accountingApp .accounting-operation-intro h4 {
    font-size: 17px;
  }

  #accountingApp .accounting-document-stack
  .accounting-document-panel summary b {
    font-size: 14px;
  }

  #accountingApp .accounting-document-stack
  input[type="date"],
  #accountingApp .accounting-document-stack
  input[type="month"],
  #accountingApp .accounting-document-stack select {
    font-size: 16px;
  }
}


/* TADS UI — INGRESOS, GASTOS Y LIBROS IVA | 2026-11-16
   Ajuste visual: acciones compactas, alineadas y adaptables.
   No modifica la lógica de carga ni la generación de libros. */

/* Formularios con selector de DTE: evita que el botón ocupe el ancho sobrante */
#accountingApp form:has(.accounting-file-picker):not(#accountingDteForm):not(#accountingCatalogImportForm):not(#accountingOpeningBalancesForm) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  max-width: 760px;
  min-width: 0;
}
#accountingApp form:has(.accounting-file-picker):not(#accountingDteForm):not(#accountingCatalogImportForm):not(#accountingOpeningBalancesForm) > .accounting-file-picker {
  flex: 0 1 310px;
  width: min(100%, 310px);
  min-width: 210px;
  max-width: 310px;
  min-height: 56px;
}
#accountingApp form:has(.accounting-file-picker):not(#accountingDteForm):not(#accountingCatalogImportForm):not(#accountingOpeningBalancesForm) > button {
  flex: 0 0 auto;
  width: auto !important;
  min-width: 160px;
  max-width: 230px;
  min-height: 44px;
  margin: 0;
  padding: 10px 18px;
  background: #176b50;
  border: 1px solid #176b50;
  color: #fff;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
}
#accountingApp form:has(.accounting-file-picker):not(#accountingDteForm):not(#accountingCatalogImportForm):not(#accountingOpeningBalancesForm) > button:hover {
  background: #0f3d2e;
  border-color: #0f3d2e;
}

/* Firma del contador: un campo legible y una acción de tamaño natural */
#accountingApp .accounting-vat-signature {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}
#accountingApp .accounting-vat-signature form {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 12px;
  width: 100%;
  max-width: 680px;
}
#accountingApp .accounting-vat-signature form label {
  flex: 1 1 280px;
  min-width: 220px;
  max-width: 430px;
  font-size: 13px;
}
#accountingApp .accounting-vat-signature form input {
  width: 100%;
  min-height: 44px;
  font-size: 14px;
}
#accountingApp .accounting-vat-signature form button {
  flex: 0 0 auto;
  width: auto !important;
  min-width: 145px;
  min-height: 44px;
  margin: 0;
  padding: 10px 18px;
  background: #176b50;
  border: 1px solid #176b50;
  color: #fff;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
}
#accountingApp .accounting-vat-signature form button:hover {
  background: #0f3d2e;
}

/* Acciones de libros: botones compactos, nunca columnas gigantes */
#accountingApp .accounting-vat-books {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
#accountingApp .accounting-vat-books .secondary-button {
  width: auto !important;
  min-width: 150px;
  max-width: 100%;
  min-height: 44px;
  padding: 10px 16px;
  background: #176b50;
  color: #fff;
  border: 1px solid #176b50;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
}
#accountingApp .accounting-vat-books .secondary-button:hover {
  background: #0f3d2e;
}
#accountingApp .accounting-vat-books article {
  min-width: 0;
  min-height: 0;
}
@media (max-width: 850px) {
  #accountingApp .accounting-vat-books { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  #accountingApp form:has(.accounting-file-picker):not(#accountingDteForm):not(#accountingCatalogImportForm):not(#accountingOpeningBalancesForm) {
    display: grid;
    grid-template-columns: minmax(0,1fr);
    max-width: 100%;
  }
  #accountingApp form:has(.accounting-file-picker):not(#accountingDteForm):not(#accountingCatalogImportForm):not(#accountingOpeningBalancesForm) > .accounting-file-picker,
  #accountingApp form:has(.accounting-file-picker):not(#accountingDteForm):not(#accountingCatalogImportForm):not(#accountingOpeningBalancesForm) > button {
    width: 100% !important;
    min-width: 0;
    max-width: 100%;
  }
  #accountingApp .accounting-vat-signature form { display: grid; grid-template-columns: minmax(0,1fr); }
  #accountingApp .accounting-vat-signature form label,
  #accountingApp .accounting-vat-signature form button { width: 100% !important; min-width: 0; max-width: 100%; }
  #accountingApp .accounting-vat-books .secondary-button { width: 100% !important; }
}


/* TADS | Ficha de empresa: modal contenido y responsive */
#accountingApp .accounting-modal-backdrop:has(.tads-tenant-detail) {
  padding: 16px;
  box-sizing: border-box;
  overflow-y: auto;
  align-items: center;
  justify-items: center;
}
#accountingApp .tads-tenant-detail {
  box-sizing: border-box;
  width: min(620px, 100%);
  max-width: 100%;
  max-height: calc(100dvh - 32px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 14px;
}
#accountingApp .tads-tenant-detail .accounting-modal-head {
  flex: 0 0 auto;
  padding: 16px 18px 12px;
}
#accountingApp .tads-tenant-detail .accounting-modal-head h3 {
  font-size: 19px;
  line-height: 1.25;
}
#accountingApp .tads-tenant-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px 18px;
}
#accountingApp .tads-tenant-detail-grid > div {
  box-sizing: border-box;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #dce7e0;
  border-radius: 8px;
  background: #f7faf8;
}
#accountingApp .tads-tenant-detail-grid small {
  display: block;
  font-size: 11px;
  color: #60766c;
  margin-bottom: 4px;
}
#accountingApp .tads-tenant-detail-grid strong {
  display: block;
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
#accountingApp .tads-tenant-detail .accounting-modal-actions {
  flex: 0 0 auto;
  display: flex;
  gap: 10px;
  padding: 12px 18px 16px;
  border-top: 1px solid #e3eee8;
}
#accountingApp .tads-tenant-detail .accounting-modal-actions button {
  flex: 1 1 0;
  width: auto !important;
  min-width: 0;
  min-height: 42px;
  padding: 9px 12px;
  font-size: 13px;
}
@media (max-width: 600px) {
  #accountingApp .accounting-modal-backdrop:has(.tads-tenant-detail) {
    padding: 8px;
    align-items: center;
  }
  #accountingApp .tads-tenant-detail {
    max-height: calc(100dvh - 16px);
    border-radius: 12px;
  }
  #accountingApp .tads-tenant-detail-grid {
    grid-template-columns: minmax(0, 1fr);
    padding: 10px 12px;
    gap: 7px;
  }
  #accountingApp .tads-tenant-detail .accounting-modal-head {
    padding: 12px;
  }
  #accountingApp .tads-tenant-detail .accounting-modal-actions {
    padding: 10px 12px;
  }
}


/* Filtros de tablas contables: registros manuales y DTE */
#accountingApp .tads-filter-panel .tads-table-search-label {
  display:block; max-width:440px; padding:12px 14px 8px;
  color:#3c5b4c; font-size:13px; font-weight:650;
}
#accountingApp .tads-filter-panel .tads-table-search {
  display:block; width:100%; box-sizing:border-box; min-height:42px;
  margin-top:6px; padding:9px 12px; font-size:14px;
  border:1px solid #c9ddd0; border-radius:9px; background:#fff;
}
#accountingApp .tads-filter-panel tbody tr[hidden] { display:none !important; }
@media(max-width:600px) {
 #accountingApp .tads-filter-panel .tads-table-search-label { max-width:100%; padding:10px; }
}


/* Filtros por columna de Ingresos y Gastos */
#accountingApp .tads-column-filters th { padding:5px 6px 9px; background:#f4f8f5; }
#accountingApp .tads-column-filter {
 box-sizing:border-box; display:block; width:100%; min-width:75px; max-width:100%;
 padding:7px 8px; min-height:35px; border:1px solid #cadcd0; border-radius:7px;
 background:white; color:#173b32; font-size:12px; font-weight:400;
}
#accountingApp .tads-column-filter:focus {outline:2px solid #b5d7c7;border-color:#176b50}
#accountingApp .tads-filter-panel tbody tr[hidden] {display:none!important}
#accountingApp .tads-manual-edit-modal {max-height:calc(100dvh - 30px);overflow:auto;width:min(550px,100%)}
#accountingApp .tads-filter-panel .accounting-table-wrap {overflow-x:auto}
@media(max-width:650px) {
 #accountingApp .tads-filter-panel table {min-width:730px}
 #accountingApp .tads-manual-edit-modal {max-height:calc(100dvh - 16px)}
}


/* TADS — normalización de tablas filtrables (ingresos, gastos y DTE) */
#accountingApp .tads-filter-panel .tads-filtered-table {
  width:100% !important;
  min-width:0 !important;
  table-layout:fixed !important;
  border-collapse:collapse;
  font-size:12.5px;
}
#accountingApp .tads-filter-panel .tads-filtered-table thead,
#accountingApp .tads-filter-panel .tads-filtered-table thead tr,
#accountingApp .tads-filter-panel .tads-filtered-table thead th {
  height:auto !important;
  min-height:0 !important;
  max-height:none !important;
  vertical-align:middle !important;
}
#accountingApp .tads-filter-panel .tads-filtered-table thead tr:first-child th {
  padding:9px 6px 5px !important;
  font-size:11px !important;
  line-height:1.35 !important;
  font-weight:700;
  letter-spacing:0;
  white-space:normal;
}
#accountingApp .tads-filter-panel .tads-filtered-table .tads-column-filters th {
  padding:4px 5px 9px !important;
  height:auto !important;
}
#accountingApp .tads-filter-panel .tads-filtered-table .tads-column-filter {
  display:block;
  box-sizing:border-box;
  width:100% !important;
  min-width:0 !important;
  max-width:100% !important;
  min-height:34px !important;
  height:34px !important;
  padding:6px 7px !important;
  border:1px solid #c9dbd1;
  border-radius:7px;
  background:#fff;
  font-size:12px !important;
  font-weight:400;
}
#accountingApp .tads-filter-panel .tads-filtered-table tbody td {
  padding:10px 6px !important;
  font-size:12.5px !important;
  line-height:1.45 !important;
  vertical-align:middle !important;
  overflow-wrap:anywhere;
  white-space:normal !important;
  min-width:0 !important;
  max-width:none !important;
}
#accountingApp .tads-filter-panel .tads-filtered-table tbody tr {
  height:auto !important;
  min-height:0 !important;
}
#accountingApp .tads-filter-panel .tads-filtered-table td select {
  box-sizing:border-box;
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  min-height:38px;
  padding:6px 4px;
  font-size:12px !important;
}
#accountingApp .tads-filter-panel .tads-filtered-table td button {
  box-sizing:border-box;
  width:auto !important;
  max-width:100%;
  min-width:0 !important;
  min-height:32px;
  padding:6px 9px;
  font-size:12px !important;
  white-space:normal;
}
#accountingApp .tads-filter-panel .tads-filtered-table td .danger-button {
  color:#b42318;
}
/* Tablas DTE: cada estructura recibe su propia distribución.
   Antes, la regla de ocho columnas también coincidía con gastos (nueve columnas),
   ensanchando Fecha y dejando Documento/Proveedor sin espacio útil. */
@media(min-width:801px) {
  /* Ingresos DTE: exactamente ocho columnas. */
  #accountingApp .tads-filter-panel .tads-filtered-table:has(thead th:nth-child(8)):not(:has(thead th:nth-child(9))) th:nth-child(1) {width:6% !important}
  #accountingApp .tads-filter-panel .tads-filtered-table:has(thead th:nth-child(8)):not(:has(thead th:nth-child(9))) th:nth-child(2) {width:8% !important}
  #accountingApp .tads-filter-panel .tads-filtered-table:has(thead th:nth-child(8)):not(:has(thead th:nth-child(9))) th:nth-child(3) {width:19% !important}
  #accountingApp .tads-filter-panel .tads-filtered-table:has(thead th:nth-child(8)):not(:has(thead th:nth-child(9))) th:nth-child(4) {width:14% !important}
  #accountingApp .tads-filter-panel .tads-filtered-table:has(thead th:nth-child(8)):not(:has(thead th:nth-child(9))) th:nth-child(5) {width:20% !important}
  #accountingApp .tads-filter-panel .tads-filtered-table:has(thead th:nth-child(8)):not(:has(thead th:nth-child(9))) th:nth-child(6) {width:10% !important}
  #accountingApp .tads-filter-panel .tads-filtered-table:has(thead th:nth-child(8)):not(:has(thead th:nth-child(9))) th:nth-child(7) {width:8% !important}
  #accountingApp .tads-filter-panel .tads-filtered-table:has(thead th:nth-child(8)):not(:has(thead th:nth-child(9))) th:nth-child(8) {width:15% !important}
  /* Gastos DTE: exactamente nueve columnas. */
  #accountingApp .tads-filter-panel .tads-filtered-table:has(thead th:nth-child(9)):not(:has(thead th:nth-child(10))) th:nth-child(1) {width:5% !important}
  #accountingApp .tads-filter-panel .tads-filtered-table:has(thead th:nth-child(9)):not(:has(thead th:nth-child(10))) th:nth-child(2) {width:7% !important}
  #accountingApp .tads-filter-panel .tads-filtered-table:has(thead th:nth-child(9)):not(:has(thead th:nth-child(10))) th:nth-child(3) {width:17% !important}
  #accountingApp .tads-filter-panel .tads-filtered-table:has(thead th:nth-child(9)):not(:has(thead th:nth-child(10))) th:nth-child(4) {width:16% !important}
  #accountingApp .tads-filter-panel .tads-filtered-table:has(thead th:nth-child(9)):not(:has(thead th:nth-child(10))) th:nth-child(5) {width:9% !important}
  #accountingApp .tads-filter-panel .tads-filtered-table:has(thead th:nth-child(9)):not(:has(thead th:nth-child(10))) th:nth-child(6) {width:8% !important}
  #accountingApp .tads-filter-panel .tads-filtered-table:has(thead th:nth-child(9)):not(:has(thead th:nth-child(10))) th:nth-child(7) {width:9% !important}
  #accountingApp .tads-filter-panel .tads-filtered-table:has(thead th:nth-child(9)):not(:has(thead th:nth-child(10))) th:nth-child(8) {width:15% !important}
  #accountingApp .tads-filter-panel .tads-filtered-table:has(thead th:nth-child(9)):not(:has(thead th:nth-child(10))) th:nth-child(9) {width:14% !important}
  /* Gastos DTE: seis columnas */
  #accountingApp .tads-filter-panel .tads-filtered-table:has(thead th:nth-child(6)):not(:has(thead th:nth-child(7))) th:nth-child(1) {width:9% !important}
  #accountingApp .tads-filter-panel .tads-filtered-table:has(thead th:nth-child(6)):not(:has(thead th:nth-child(7))) th:nth-child(2) {width:24% !important}
  #accountingApp .tads-filter-panel .tads-filtered-table:has(thead th:nth-child(6)):not(:has(thead th:nth-child(7))) th:nth-child(3) {width:23% !important}
  #accountingApp .tads-filter-panel .tads-filtered-table:has(thead th:nth-child(6)):not(:has(thead th:nth-child(7))) th:nth-child(4) {width:11% !important}
  #accountingApp .tads-filter-panel .tads-filtered-table:has(thead th:nth-child(6)):not(:has(thead th:nth-child(7))) th:nth-child(5) {width:18% !important}
  #accountingApp .tads-filter-panel .tads-filtered-table:has(thead th:nth-child(6)):not(:has(thead th:nth-child(7))) th:nth-child(6) {width:15% !important}
  /* Manuales: cinco columnas */
  #accountingApp .tads-filter-panel .tads-filtered-table:has(thead th:nth-child(5)):not(:has(thead th:nth-child(6))) th:nth-child(1) {width:11% !important}
  #accountingApp .tads-filter-panel .tads-filtered-table:has(thead th:nth-child(5)):not(:has(thead th:nth-child(6))) th:nth-child(2) {width:37% !important}
  #accountingApp .tads-filter-panel .tads-filtered-table:has(thead th:nth-child(5)):not(:has(thead th:nth-child(6))) th:nth-child(3) {width:15% !important}
  #accountingApp .tads-filter-panel .tads-filtered-table:has(thead th:nth-child(5)):not(:has(thead th:nth-child(6))) th:nth-child(4) {width:17% !important}
  #accountingApp .tads-filter-panel .tads-filtered-table:has(thead th:nth-child(5)):not(:has(thead th:nth-child(6))) th:nth-child(5) {width:20% !important}
}
@media(max-width:800px) {
  #accountingApp .tads-filter-panel .tads-filtered-table {min-width:720px !important}
  #accountingApp .tads-filter-panel .tads-responsive-table {overflow-x:auto;max-width:100%}
}

/* TADS Anexos IVA - acciones adaptables */
.tads-annex-draft-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:16px 0}
.tads-annex-draft-actions .primary-button{min-width:0;margin:0;padding:9px;font-size:12px}
@media(max-width:720px){.tads-annex-draft-actions{grid-template-columns:1fr}}

/* TADS Contabilidad · legibilidad y controles que respetan el ancho disponible */
#accountingApp .accounting-form,
#accountingApp .accounting-inline-form,
#accountingApp .accounting-document-body,
#accountingApp .accounting-modal {
  font-size:14px;
  line-height:1.5;
}
#accountingApp .accounting-form label,
#accountingApp .accounting-inline-form > label,
#accountingApp .accounting-tenant-form label,
#accountingApp .tads-isr-fields label {
  min-width:0;
  color:#365b4d;
  font-size:14px;
  font-weight:700;
  line-height:1.35;
}
#accountingApp .accounting-form input,
#accountingApp .accounting-form select,
#accountingApp .accounting-inline-form input:not([type="file"]),
#accountingApp .accounting-inline-form select,
#accountingApp .accounting-tenant-form input,
#accountingApp .accounting-tenant-form select {
  min-width:0;
  min-height:44px;
  font:inherit;
  font-size:16px;
  line-height:1.35;
}
#accountingApp .hint,
#accountingApp .accounting-document-body > p,
#accountingApp label > small {
  font-size:13px;
  line-height:1.5;
}
#accountingApp .accounting-inline-form,
#accountingApp .accounting-report-actions,
#accountingApp .accounting-report-head > div:last-child,
#accountingApp .accounting-modal-actions {
  min-width:0;
  max-width:100%;
  flex-wrap:wrap;
}
#accountingApp .accounting-inline-form > *,
#accountingApp .accounting-report-actions > *,
#accountingApp .accounting-report-head > div:last-child > *,
#accountingApp .accounting-modal-actions > * {
  min-width:0;
  max-width:100%;
}
#accountingApp .accounting-modal > .accounting-form {
  padding:18px 24px 22px;
}
#accountingApp .accounting-modal .accounting-modal-actions {
  display:flex;
  gap:10px;
  padding-top:8px;
}
#accountingApp .accounting-modal .accounting-modal-actions > button {
  flex:1 1 160px;
  width:auto;
  min-width:0;
  max-width:100%;
  margin:0;
  padding:10px 14px;
  font-size:14px;
}
#accountingApp .tads-isr-fields {
  display:grid;
  gap:12px;
  min-width:0;
  margin:4px 0;
  padding:16px;
  border:1px solid #c9ded2;
  border-radius:10px;
  background:#f8fcf9;
}
#accountingApp .tads-isr-fields legend {
  padding:0 6px;
  color:#176b50;
  font-size:15px;
  font-weight:800;
}
#accountingApp .tads-isr-fields .hint { margin:0; }
#accountingApp .tads-isr-fields input[readonly] {
  color:#12543d;
  font-weight:800;
  background:#eaf6ef;
}
#accountingApp .tads-dte14-isr-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  min-width:0;
}
@media (max-width:700px) {
  #accountingApp .accounting-modal > .accounting-form { padding:16px; }
  #accountingApp .tads-dte14-isr-grid { grid-template-columns:minmax(0,1fr); }
  #accountingApp .accounting-modal .accounting-modal-actions > button { flex-basis:100%; width:100%; }
  #accountingApp .accounting-report-head > div:last-child { width:100%; }
}

/* Acciones secundarias de diálogos: tamaño natural, sin competir con la acción principal. */
#accountingApp .accounting-modal .accounting-modal-actions {
  justify-content:flex-end;
}
#accountingApp .accounting-modal .accounting-modal-actions > .secondary-button,
#accountingApp .accounting-dialog .accounting-modal-actions > .secondary-button {
  flex:0 1 auto;
  width:auto;
  min-width:112px;
  padding-inline:18px;
}
#accountingApp .accounting-modal .accounting-modal-actions > .primary-button,
#accountingApp .accounting-dialog .accounting-modal-actions > .primary-button {
  flex:0 1 auto;
  width:auto;
  min-width:150px;
  padding-inline:18px;
}
@media (max-width:440px) {
  #accountingApp .accounting-modal .accounting-modal-actions > .secondary-button,
  #accountingApp .accounting-modal .accounting-modal-actions > .primary-button,
  #accountingApp .accounting-dialog .accounting-modal-actions > .secondary-button,
  #accountingApp .accounting-dialog .accounting-modal-actions > .primary-button {
    flex:1 1 100%;
    width:100%;
  }
}

/* Controles opcionales: la captura principal permanece compacta hasta que aplique IVA o ISR. */
#accountingApp .tads-optional-section {
  min-width:0;
  margin:2px 0;
  border:1px solid #d4e5db;
  border-radius:10px;
  background:#fbfdfc;
}
#accountingApp .tads-optional-section > summary {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  min-height:46px;
  padding:10px 13px;
  color:#1b5944;
  font-size:14px;
  font-weight:800;
  cursor:pointer;
}
#accountingApp .tads-optional-section > summary small {
  color:#638277;
  font-size:12px;
  font-weight:600;
}
#accountingApp .tads-optional-body,
#accountingApp .tads-isr-optional .tads-isr-fields {
  display:grid;
  gap:12px;
  padding:0 13px 14px;
}
#accountingApp .tads-isr-optional .tads-isr-fields {
  margin:0;
  border:0;
  border-top:1px solid #e1ece5;
  border-radius:0;
  background:transparent;
}

/* Libros IVA: firma y descargas compactas; los detalles permanecen en Ingresos y Gastos. */
#accountingApp .accounting-vat-downloads {
  display:grid;
  gap:14px;
  max-width:100%;
}
#accountingApp .accounting-vat-signature {
  display:flex;
  align-items:flex-end;
  flex-wrap:wrap;
  gap:10px;
  min-width:0;
  padding:14px;
  border:1px solid #dce9e1;
  border-radius:11px;
  background:#f8fbf9;
}
#accountingApp .accounting-vat-signature label {
  display:grid;
  flex:1 1 300px;
  min-width:0;
  gap:5px;
  color:#365b4d;
  font-size:14px;
  font-weight:700;
}
#accountingApp .accounting-vat-signature input {
  width:100%;
  min-width:0;
  min-height:44px;
  padding:9px 11px;
  border:1px solid #c8d9d0;
  border-radius:8px;
  color:#173b32;
  background:#fff;
  font:inherit;
  font-size:16px;
}
#accountingApp .accounting-vat-signature .secondary-button,
#accountingApp .accounting-vat-books .secondary-button {
  flex:0 1 auto;
  width:auto !important;
  min-width:0;
  max-width:100%;
  min-height:44px;
  margin:0;
  padding:10px 16px;
  font-size:13px;
}
#accountingApp .accounting-vat-books {
  display:grid;
  grid-template-columns:minmax(160px,1.15fr) repeat(3,minmax(150px,1fr));
  gap:10px;
  align-items:stretch;
}
#accountingApp .accounting-vat-books article {
  display:grid;
  align-content:center;
  gap:2px;
  min-width:0;
  padding:11px 13px;
  border:1px solid #dce9e1;
  border-radius:10px;
  color:#45685a;
  background:#f8fbf9;
}
#accountingApp .accounting-vat-books article strong { color:#176b50; font-size:20px; line-height:1; }
#accountingApp .accounting-vat-books article span { font-size:12px; line-height:1.35; }
@media (max-width:900px) {
  #accountingApp .accounting-vat-books { grid-template-columns:repeat(2,minmax(0,1fr)); }
  #accountingApp .accounting-vat-books article { grid-column:1/-1; }
}
@media (max-width:600px) {
  #accountingApp .accounting-vat-signature,
  #accountingApp .accounting-vat-books { grid-template-columns:minmax(0,1fr); }
  #accountingApp .accounting-vat-signature { display:grid; }
  #accountingApp .accounting-vat-signature .secondary-button,
  #accountingApp .accounting-vat-books .secondary-button { width:100% !important; }
  #accountingApp .accounting-vat-books article { grid-column:auto; }
}

/* Alta administrativa de TADS Reportes desde el expediente del cliente. */
.reports-license-grant {
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:14px;
  margin:0 0 14px;
  padding:14px;
  border:1px solid #cbe1d3;
  border-radius:10px;
  background:#f3faf6;
}
.reports-license-grant > div { min-width:0; flex:1 1 260px; }
.reports-license-grant b { color:#174d3b; }
.reports-license-grant p { margin:4px 0 0; color:#597269; font-size:13px; line-height:1.45; }
.reports-license-grant .secondary-button { width:auto; min-width:190px; margin:0; padding:10px 15px; }
@media(max-width:600px) { .reports-license-grant .secondary-button { width:100%; min-width:0; } }

/* TADS Reportes: consulta tributaria compacta, sin acceso a libros ni partidas. */
.reports-head, .reports-block-head { display:flex; align-items:end; justify-content:space-between; gap:16px; flex-wrap:wrap; }
.reports-head { padding-bottom:18px; border-bottom:1px solid #dce9e1; }
.reports-head h3, .reports-block h4 { margin:4px 0; color:#173d31; }
.reports-head p { margin:0; color:#60786e; }
.reports-head label { display:grid; gap:5px; min-width:180px; color:#45685a; font-size:13px; font-weight:800; }
.reports-head select { min-height:42px; padding:8px 10px; border:1px solid #bed7ca; border-radius:8px; background:#fff; color:#173d31; font:inherit; }
.reports-block { margin-top:16px; padding:16px; border:1px solid #d8e8de; border-radius:12px; background:#fff; }
.reports-metrics { display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:10px; margin-top:14px; }
.reports-metrics article { display:grid; gap:6px; min-width:0; padding:13px; border-radius:9px; background:#f3faf6; }
.reports-metrics small { color:#5c766a; font-size:12px; font-weight:700; }
.reports-metrics strong { color:#146044; font-size:20px; }
.reports-declaration { display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap; padding:12px 0; border-top:1px solid #e3eee7; }
.reports-declaration:first-of-type { margin-top:12px; }
.reports-declaration div { display:grid; gap:3px; }.reports-declaration small { color:#6a8177; }
.reports-declaration .secondary-button { width:auto; min-width:130px; margin:0; }
.reports-disclaimer { margin:14px 2px 0; color:#60786e; font-size:13px; line-height:1.5; }
@media(max-width:600px) { .reports-head label { width:100%; }.reports-declaration .secondary-button { width:100%; } }

/* Espaciado y adaptación uniforme del área de trabajo contable. */
#accountingApp .accounting-work-card { min-width: 0; padding: clamp(16px, 2vw, 24px); }
#accountingApp .accounting-report-head { align-items: end; flex-wrap: wrap; gap: 12px 18px; margin-bottom: 16px; padding-bottom: 16px; }
#accountingApp .accounting-report-head > label { display: grid; gap: 6px; min-width: min(100%, 170px); }
#accountingApp .accounting-report-head select { width: 100%; min-height: 42px; }
#accountingApp .accounting-inline-form { width: 100%; min-width: 0; flex-wrap: wrap; align-items: end; gap: 12px; margin: 0 0 16px; }
#accountingApp .accounting-inline-form > label { flex: 1 1 240px; min-width: 0; }
#accountingApp .accounting-inline-form input,
#accountingApp .accounting-inline-form select { width: 100%; min-width: 0; }
#accountingApp .accounting-inline-form > .primary-button,
#accountingApp .accounting-inline-form > .secondary-button { flex: 0 1 210px; width: auto; min-width: 160px; margin: 0; }
#accountingApp .tads-vat-summary { margin: 0; }
#accountingApp .tads-dte-bulk-tools { gap: 10px; padding: 12px 14px; }
#accountingApp .tads-dte-bulk-tools label { min-width: 0; }
#accountingApp .tads-dte-bulk-tools span { margin-left: auto; white-space: nowrap; }
#accountingApp .tads-dte-bulk-tools button { min-width: 0; max-width: 100%; }
#accountingApp .tads-responsive-table { width: 100%; max-width: 100%; overflow-x: auto; }
#accountingApp .tads-dte-list-table .accounting-table-wrap { width: 100% !important; min-width: 100% !important; }
#accountingApp .tads-dte-list-table table.tads-filtered-table { width: 100% !important; min-width: 780px !important; }
#accountingApp .tads-dte-list-table th,
#accountingApp .tads-dte-list-table td { padding: 10px 9px; }
#accountingApp .tads-dte-list-table input,
#accountingApp .tads-dte-list-table select { max-width: 100%; min-width: 0; }

/* Filtros de columna tipo Excel: opciones múltiples sin consumir una segunda fila. */
#accountingApp .tads-filtered-table thead th { position:relative; }
#accountingApp .tads-column-label { display:block; min-height:2.6em; }
#accountingApp .tads-filter-trigger,
#accountingApp .tads-financial-filter-trigger {
  display:inline-flex; align-items:center; justify-content:center; min-height:28px;
  margin-top:6px; padding:4px 7px; border:1px solid #c4d9cd; border-radius:6px;
  background:#fff; color:#245b47; font:700 11px/1.15 inherit; white-space:nowrap; cursor:pointer;
}
#accountingApp .tads-filter-trigger:hover,
#accountingApp .tads-filter-trigger:focus-visible,
#accountingApp .tads-financial-filter-trigger:hover,
#accountingApp .tads-financial-filter-trigger:focus-visible { border-color:#176b50; background:#edf8f2; outline:2px solid transparent; }
#accountingApp .tads-filter-trigger.is-filtered,
#accountingApp .tads-financial-filter-trigger.is-filtered { color:#fff; border-color:#176b50; background:#176b50; }
#accountingApp .tads-column-popover,
#accountingApp .tads-financial-popover {
  position:absolute; z-index:30; top:calc(100% + 4px); left:0; width:min(286px, calc(100vw - 36px));
  padding:12px; border:1px solid #bad7c8; border-radius:10px; box-shadow:0 12px 28px rgba(15,61,46,.18);
  color:#183d31; background:#fff; text-align:left;
}
#accountingApp .tads-column-popover[hidden],
#accountingApp .tads-financial-popover[hidden] { display:none !important; }
#accountingApp .tads-column-popover-head { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:9px; }
#accountingApp .tads-column-popover-head strong { font-size:13px; line-height:1.25; }
#accountingApp .tads-column-popover-actions { display:flex; align-items:center; gap:4px; flex:0 0 auto; }
#accountingApp .tads-column-popover-head .text-button { min-height:28px; padding:3px 6px; font-size:12px; }
#accountingApp .tads-filter-search { display:grid; gap:4px; margin-bottom:8px; color:#42675a; font-size:12px; font-weight:700; }
#accountingApp .tads-filter-search input { width:100%; min-height:36px; padding:7px 9px; border:1px solid #c4d9cd; border-radius:7px; font:inherit; }
#accountingApp .tads-filter-select-all { display:flex; align-items:center; gap:7px; padding:7px 0; border-bottom:1px solid #e2eee7; color:#245b47; font-size:12px; font-weight:800; }
#accountingApp .tads-filter-options { display:grid; max-height:205px; margin:6px -3px; overflow:auto; }
#accountingApp .tads-filter-options label { display:flex; align-items:flex-start; gap:7px; padding:7px 5px; border-radius:5px; color:#294b40; font-size:12px; font-weight:500; line-height:1.35; cursor:pointer; }
#accountingApp .tads-filter-options label:hover { background:#eef8f2; }
#accountingApp .tads-filter-options input { flex:0 0 auto; margin-top:2px; }
#accountingApp .tads-filter-options p { margin:10px 4px; color:#658075; font-size:12px; }
#accountingApp .tads-filter-actions { display:flex; justify-content:flex-end; padding:10px 12px; border-bottom:1px solid #dce9e1; background:#fbfdfc; }
#accountingApp .tads-filter-actions .text-button { min-height:32px; padding:5px 9px; color:#176b50; font-size:12px; font-weight:800; }
#accountingApp .tads-financial-filter-bar { display:flex; align-items:end; gap:10px; flex-wrap:wrap; margin:0 0 14px; padding:10px 12px; border:1px solid #d8e8df; border-radius:10px; background:#fbfdfc; }
#accountingApp .tads-financial-filter-title { align-self:center; color:#245b47; font-size:13px; font-weight:800; }
#accountingApp .tads-financial-filter { position:relative; display:grid; gap:4px; min-width:126px; }
#accountingApp .tads-financial-filter > span { color:#557367; font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.02em; }
#accountingApp .tads-financial-filter-trigger { margin-top:0; width:max-content; max-width:100%; }
#accountingApp .tads-financial-filter-bar > .text-button { min-height:28px; margin-left:auto; padding:4px 7px; color:#176b50; font-size:12px; font-weight:800; }
@media (max-width:650px) { #accountingApp .tads-financial-filter-bar > .text-button { margin-left:0; } }

/* Declaraciones mensuales publicadas para el portal de consulta TADS Reportes. */
#accountingApp .tads-declarations-panel { margin-top:16px; }
#accountingApp .tads-declaration-list { display:grid; gap:8px; margin-top:14px; }
#accountingApp .tads-declaration-list article { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; padding:11px 12px; border:1px solid #dbe9e1; border-radius:9px; background:#fbfdfc; }
#accountingApp .tads-declaration-list article > div { display:grid; gap:3px; min-width:0; }
#accountingApp .tads-declaration-list article b { color:#174d3b; font-size:14px; }
#accountingApp .tads-declaration-list article small { color:#617c70; font-size:12px; }
#accountingApp .tads-declaration-list .secondary-button { width:auto; min-width:92px; margin:0; padding:8px 12px; font-size:13px; }
@media (max-width: 700px) {
  #accountingApp .accounting-work-card { padding: 14px; }
  #accountingApp .accounting-inline-form > label,
  #accountingApp .accounting-inline-form > .primary-button,
  #accountingApp .accounting-inline-form > .secondary-button { flex: 1 1 100%; width: 100%; min-width: 0; }
  #accountingApp .tads-dte-bulk-tools span { margin-left: 0; }
  #accountingApp .tads-dte-bulk-tools button { flex: 1 1 100%; }
  #accountingApp .tads-declaration-list .secondary-button { width:100%; }
}


/* ================================================================
 TADS DESIGN SYSTEM 1.0 — TIPOGRAFÍA CONSOLIDADA
 Solo propiedades tipográficas. NO altera anchos, columnas, display,
 grid, flex, padding, overflow, table-layout ni nth-child.
 ================================================================ */
:root {
  --tads-type-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --tads-type-caption: 12px;
  --tads-type-table-head: 12px;
  --tads-type-table: 13px;
  --tads-type-body: 14px;
  --tads-type-control: 14px;
  --tads-type-subtitle: 16px;
  --tads-type-section: 18px;
  --tads-type-module: 21px;
  --tads-type-page: 26px;
}
body, input, select, textarea, button { font-family: var(--tads-type-family); }
body { font-size: var(--tads-type-body); line-height: 1.5; }

/* Jerarquía semántica del portal, sin afectar las dimensiones de los paneles. */
.dashboard-topbar h2 { font-size: var(--tads-type-page); line-height: 1.22; }
.section-title-row h3 { font-size: var(--tads-type-section); line-height: 1.3; }
.catalog-card h4, .product-license-copy h4 { font-size: var(--tads-type-subtitle); line-height: 1.4; }
.intro, .dashboard-topbar p, .section-title-row p,
.catalog-card > p, .product-license-copy p, .hint {
  font-size: var(--tads-type-body); line-height: 1.55;
}
.eyebrow, .auth-kicker, .catalog-tag, .catalog-availability,
.summary-card small, .summary-card > span:last-child,
.product-license-copy .product-status, .profile-field small,
.field-help, .secure-label, .header-pill {
  font-size: var(--tads-type-caption); line-height: 1.45;
}
.nav-item, .sidebar-signout, .text-button, .catalog-action,
.primary-button, .secondary-button,
.auth-form label, .purchase-form > label:not(.purchase-option),
.input-wrap input, .purchase-form textarea {
  font-size: var(--tads-type-control); line-height: 1.45;
}

/* Contabilidad: selectores acotados para no tocar tablas ajenas.
   Solo tamaño de letras, no anchura ni geometría de columnas. */
#accountingApp { font-family: var(--tads-type-family); font-size: var(--tads-type-body); }
#accountingApp .accounting-report-head h4,
#accountingApp .accounting-work-card h3 { font-size: var(--tads-type-section); line-height: 1.3; }
#accountingApp .accounting-report-head .eyebrow,
#accountingApp .accounting-work-card .eyebrow { font-size: var(--tads-type-caption); }
#accountingApp .primary-button,
#accountingApp .secondary-button,
#accountingApp .text-button,
#accountingApp button,
#accountingApp input,
#accountingApp select,
#accountingApp textarea,
#accountingApp label {
  font-family: var(--tads-type-family);
  font-size: var(--tads-type-control);
}
#accountingApp table th,
#accountingApp .tads-filtered-table th,
#accountingApp .tads-dte-list-table th {
  font-size: var(--tads-type-table-head);
  line-height: 1.35;
}
#accountingApp table td,
#accountingApp .tads-filtered-table td,
#accountingApp .tads-dte-list-table td {
  font-size: var(--tads-type-table);
  line-height: 1.4;
}
#accountingApp .hint, #accountingApp .field-help,
#accountingApp small { font-size: var(--tads-type-caption); line-height: 1.45; }

/* Móvil: no reducimos el texto para encajar columnas.
   Las tablas conservan su distribución previa y su desplazamiento. */
@media (max-width: 700px) {
  :root { --tads-type-page: 23px; --tads-type-module: 20px; --tads-type-section: 17px; }
  .dashboard-topbar h2 { font-size: var(--tads-type-page); }
  .section-title-row h3 { font-size: var(--tads-type-section); }
  .nav-item, .sidebar-signout { font-size: var(--tads-type-control); }
  #accountingApp table th, #accountingApp table td { line-height: 1.4; }
}


/* TADS_LOGIN_VIEWPORT_FIT_V2 — exclusivo para pantalla de autenticación */
@media (min-width: 901px) {
  body:not(:has(#dashboard:not(.hidden))) .app-shell {
    width: min(calc(100% - 48px), 1440px);
    min-height: 100vh;
    min-height: 100dvh;
    padding: clamp(12px, 2.1vh, 22px) 0;
    grid-template-columns: minmax(0, 1fr) minmax(410px, .96fr);
    grid-template-rows: minmax(0, 1fr) auto;
    column-gap: clamp(28px, 4.4vw, 72px);
    row-gap: 8px;
    align-items: center;
  }
  body:not(:has(#dashboard:not(.hidden))) .site-header {
    grid-column: 1;
    grid-row: 1;
    margin: 0;
    align-self: center;
  }
  body:not(:has(#dashboard:not(.hidden))) .brand-lockup { width: min(100%, 440px); }
  body:not(:has(#dashboard:not(.hidden))) .tads-logo-main-image { max-width: 440px; max-height: clamp(95px, 20vh, 170px); object-fit: contain; object-position: left center; }
  body:not(:has(#dashboard:not(.hidden))) .tads-login-story { margin-top: clamp(12px, 2.5vh, 26px); max-width: 590px; }
  body:not(:has(#dashboard:not(.hidden))) .tads-hero-title { font-size: clamp(27px, 2.65vw, 39px); line-height: 1.12; margin-bottom: 9px; }
  body:not(:has(#dashboard:not(.hidden))) .tads-hero-copy { font-size: clamp(14px, 1.15vw, 17px); line-height: 1.45; margin-bottom: 12px; }
  body:not(:has(#dashboard:not(.hidden))) .tads-feature { gap: 12px; margin: 9px 0; }
  body:not(:has(#dashboard:not(.hidden))) .tads-feature-icon { width: 42px; height: 42px; flex-basis: 42px; }
  body:not(:has(#dashboard:not(.hidden))) .tads-feature strong { font-size: 14px; }
  body:not(:has(#dashboard:not(.hidden))) .tads-feature p { font-size: 12px; margin-top: 1px; }
  body:not(:has(#dashboard:not(.hidden))) .auth-panel { grid-column: 2; grid-row: 1; width: 100%; max-width: 590px; margin: 0 !important; padding: clamp(19px, 2.5vh, 30px); align-self: center; }
  body:not(:has(#dashboard:not(.hidden))) .panel-topline { margin-bottom: 9px; }
  body:not(:has(#dashboard:not(.hidden))) .auth-kicker { margin: 0 0 5px; }
  body:not(:has(#dashboard:not(.hidden))) .auth-intro h1 { font-size: clamp(27px, 2.5vw, 34px); }
  body:not(:has(#dashboard:not(.hidden))) .auth-intro .intro { margin: 6px 0 12px; }
  body:not(:has(#dashboard:not(.hidden))) .auth-form { gap: 7px; }
  body:not(:has(#dashboard:not(.hidden))) .auth-form label { margin-bottom: 4px; }
  body:not(:has(#dashboard:not(.hidden))) .input-wrap { height: 43px; min-height: 43px; }
  body:not(:has(#dashboard:not(.hidden))) #submitBtn { min-height: 43px; margin-top: 5px; padding: 9px 14px; }
  body:not(:has(#dashboard:not(.hidden))) .actions { margin-top: 10px; }
  body:not(:has(#dashboard:not(.hidden))) .panel-footer { margin-top: 14px; padding-top: 11px; }
  body:not(:has(#dashboard:not(.hidden))) .page-footer { grid-column: 1 / -1; grid-row: 2; margin: 0; padding: 0 4px; align-self: end; }
}

/* TADS_LOGIN_RESPONSIVE_STABILIZATION_V1
   En pantallas estrechas se prioriza un acceso completo y estable sobre la
   composición editorial de escritorio. */
@media (max-width: 900px) {
  html,
  body:not(:has(#dashboard:not(.hidden))) {
    width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }
  body:not(:has(#dashboard:not(.hidden))) {
    min-height: 100dvh;
    background-size: cover;
    background-position: 64% center;
    background-attachment: scroll;
  }
  body:not(:has(#dashboard:not(.hidden))) .app-shell {
    display: flex;
    flex-direction: column;
    width: min(calc(100% - 32px), 650px);
    min-height: 100dvh;
    padding: 24px 0 18px;
    gap: 16px;
  }
  body:not(:has(#dashboard:not(.hidden))) .site-header {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 0;
  }
  body:not(:has(#dashboard:not(.hidden))) .brand-lockup {
    justify-content: center;
    width: min(100%, 300px);
  }
  body:not(:has(#dashboard:not(.hidden))) .tads-logo-main-image {
    width: 100%;
    max-width: 300px;
    height: auto;
  }
  body:not(:has(#dashboard:not(.hidden))) .tads-login-story {
    display: none;
  }
  body:not(:has(#dashboard:not(.hidden))) .auth-panel {
    width: 100%;
    max-width: 620px;
    margin: 0 auto !important;
  }
  body:not(:has(#dashboard:not(.hidden))) .page-footer {
    width: 100%;
    margin-top: auto;
  }
}
@media (max-width: 480px) {
  body:not(:has(#dashboard:not(.hidden))) .app-shell {
    width: calc(100% - 24px);
    padding: 16px 0;
    gap: 12px;
  }
  body:not(:has(#dashboard:not(.hidden))) .brand-lockup,
  body:not(:has(#dashboard:not(.hidden))) .tads-logo-main-image {
    max-width: 230px;
  }
  body:not(:has(#dashboard:not(.hidden))) .auth-panel {
    padding: 20px 16px;
  }
}
@media (min-width: 901px) and (max-height: 660px) {
  body:not(:has(#dashboard:not(.hidden))) .app-shell { padding: 10px 0; }
  body:not(:has(#dashboard:not(.hidden))) .tads-logo-main-image { max-height: 100px; }
  body:not(:has(#dashboard:not(.hidden))) .tads-login-story { margin-top: 8px; }
  body:not(:has(#dashboard:not(.hidden))) .tads-feature { margin: 5px 0; }
  body:not(:has(#dashboard:not(.hidden))) .tads-feature-icon { width: 34px; height: 34px; flex-basis: 34px; }
  body:not(:has(#dashboard:not(.hidden))) .auth-panel { padding: 15px 22px; }
  body:not(:has(#dashboard:not(.hidden))) .panel-footer { margin-top: 8px; padding-top: 7px; }
}
@media (max-width: 900px) {
  body:not(:has(#dashboard:not(.hidden))) .app-shell { min-height: 100dvh; height: auto; }
  body:not(:has(#dashboard:not(.hidden))) .auth-panel { margin: 0 !important; }
  body:not(:has(#dashboard:not(.hidden))) .page-footer { margin-top: auto; }
}

/* TADS_LOGIN_CENTERED_COMPACT_V1 — composición equilibrada en escritorio. */
@media (min-width: 901px) {
  body:not(:has(#dashboard:not(.hidden))) .app-shell {
    width: min(calc(100% - 64px), 1240px);
    grid-template-columns: minmax(0, .96fr) minmax(480px, .92fr);
    column-gap: clamp(38px, 4.8vw, 68px);
  }
  body:not(:has(#dashboard:not(.hidden))) .site-header {
    width:100%;
    max-width:540px;
    justify-self:end;
  }
  body:not(:has(#dashboard:not(.hidden))) .brand-lockup { width:min(100%, 360px); }
  body:not(:has(#dashboard:not(.hidden))) .tads-logo-main-image { max-width:360px; max-height:132px; }
  body:not(:has(#dashboard:not(.hidden))) .tads-login-story { max-width:520px; margin-top:18px; }
  body:not(:has(#dashboard:not(.hidden))) .tads-hero-title { font-size:clamp(28px, 2.45vw, 36px); }
  body:not(:has(#dashboard:not(.hidden))) .tads-hero-copy { max-width:500px; }
  body:not(:has(#dashboard:not(.hidden))) .auth-panel { max-width:560px; justify-self:start; padding:clamp(20px, 2.35vh, 28px); }
  body:not(:has(#dashboard:not(.hidden))) .auth-form,
  body:not(:has(#dashboard:not(.hidden))) .actions { max-width:none; }
}

/* Enlaces legales visibles sobre el fondo de la pantalla de acceso. */
body:not(:has(#dashboard:not(.hidden))) .page-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid rgba(15, 61, 46, .24);
  border-radius: 8px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 3px 10px rgba(15, 61, 46, .12);
  color: #0f4d38;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
}
body:not(:has(#dashboard:not(.hidden))) .page-footer a:hover,
body:not(:has(#dashboard:not(.hidden))) .page-footer a:focus-visible {
  border-color: #176b50;
  background: #fff;
  color: #0a392a;
  outline: 3px solid rgba(46, 158, 114, .22);
  outline-offset: 2px;
}

/* Documentos legales públicos. */
.legal-body { min-height: 100dvh; background: #f3f7f5; }
.legal-page { width: min(calc(100% - 40px), 900px); margin: 40px auto; padding: clamp(26px, 4vw, 48px); border: 1px solid #d9e7df; border-radius: 18px; background: #fff; box-shadow: 0 16px 48px rgba(15, 61, 46, .08); }
.legal-page h1 { margin: 6px 0 8px; color: #17362e; font-size: clamp(30px, 5vw, 42px); line-height: 1.14; }
.legal-page h2 { margin: 32px 0 9px; color: #14563f; font-size: 20px; line-height: 1.3; }
.legal-page p, .legal-page li { color: #40584d; font-size: 16px; line-height: 1.7; }
.legal-page ul { padding-left: 22px; }
.legal-page li + li { margin-top: 7px; }
.legal-page a { color: #106446; font-weight: 750; }
.legal-back { display: inline-flex; align-items: center; min-height: 38px; padding: 8px 12px; border: 1px solid #c5ddd0; border-radius: 8px; background: #f6fbf8; text-decoration: none; }
.legal-kicker { margin: 28px 0 0; color: #177050 !important; font-size: 13px !important; font-weight: 800; letter-spacing: .13em; }
.legal-page .updated { color: #6b8176; font-size: 13px; }
@media (max-width: 600px) { .legal-page { width: calc(100% - 24px); margin: 12px auto; padding: 24px 19px; border-radius: 14px; }.legal-page h2 { margin-top: 26px; }.legal-page p, .legal-page li { font-size: 15px; } }

/* Panel lateral colapsable: navegación de escritorio compacta con favicon TADS. */
.tads-logo-favicon { display: none; }
@media (min-width: 901px) {
  #dashboard .dashboard-layout {
    grid-template-columns: 218px minmax(0, 1fr);
    transition: grid-template-columns .22s ease;
  }
  #dashboard .dashboard-sidebar {
    position: relative;
    min-width: 0;
    overflow: visible;
    transition: padding .22s ease;
  }
  .sidebar-toggle {
    position: absolute;
    top: 50%;
    right: -18px;
    z-index: 12;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 38px;
    padding: 7px 10px;
    border: 1px solid #2a8766;
    border-radius: 0 9px 9px 0;
    background: #176b50;
    box-shadow: 0 5px 14px rgba(8, 43, 32, .22);
    color: #fff;
    font: 700 12px/1 Inter, ui-sans-serif, system-ui, sans-serif;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background .16s, right .22s ease;
  }
  .sidebar-toggle:hover,
  .sidebar-toggle:focus-visible { background: #0f513b; outline: 3px solid rgba(46, 158, 114, .28); outline-offset: 2px; }
  .sidebar-toggle-glyph { font-size: 22px; line-height: .7; }
  #dashboardLayout.sidebar-collapsed { grid-template-columns: 76px minmax(0, 1fr); }
  #dashboardLayout.sidebar-collapsed .dashboard-sidebar { padding: 14px 10px; }
  #dashboardLayout.sidebar-collapsed .dashboard-sidebar .sidebar-brand { min-height: 56px; margin-bottom: 10px; padding: 4px 0 12px !important; }
  #dashboardLayout.sidebar-collapsed .tads-logo-panel-image { display: none; }
  #dashboardLayout.sidebar-collapsed .tads-logo-favicon { display: block; width: 42px; height: 42px; border-radius: 11px; object-fit: contain; }
  #dashboardLayout.sidebar-collapsed .sidebar-nav { margin-top: 12px; }
  #dashboardLayout.sidebar-collapsed .sidebar-nav .nav-item,
  #dashboardLayout.sidebar-collapsed .sidebar-signout { justify-content: center; gap: 0; padding-right: 8px; padding-left: 8px; font-size: 0; }
  #dashboardLayout.sidebar-collapsed .sidebar-nav .nav-item .nav-icon,
  #dashboardLayout.sidebar-collapsed .sidebar-signout .nav-icon { width: 21px; height: 21px; flex: 0 0 21px; }
  #dashboardLayout.sidebar-collapsed .sidebar-toggle { right: -18px; }
}
@media (max-width: 900px) { .sidebar-toggle { display: none; } }

/* Control lateral discreto: solo la dirección, alineada bajo la marca. */
@media (min-width: 901px) {
  .sidebar-toggle {
    top: 142px;
    right: -14px;
    width: 28px;
    min-height: 46px;
    padding: 0;
    border: 0;
    border-radius: 0 8px 8px 0;
    background: transparent;
    box-shadow: none;
    color: #83919a;
  }
  .sidebar-toggle-label { display: none; }
  .sidebar-toggle-glyph { font-size: 28px; line-height: 1; }
  .sidebar-toggle:hover,
  .sidebar-toggle:focus-visible { background: #f2f6f4; color: #176b50; outline-color: rgba(46, 158, 114, .2); }
  #dashboardLayout.sidebar-collapsed .sidebar-toggle { right: -14px; }
}

/* TADS Kardex · panel inicial de inventario */
.kardex-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:14px 0}.kardex-workspace .accounting-panel{padding:16px}.kardex-workspace .accounting-panel h4{margin:0 0 12px;color:var(--green-dark);font-size:15px}.kardex-workspace .notice{position:static;display:block;width:auto;margin:0 0 12px;opacity:1;transform:none;pointer-events:auto}.kardex-workspace .notice-error{border-color:#f0c4bf;border-left-color:var(--error);background:#fff4f2;color:var(--error)}
@media(max-width:760px){.kardex-grid{grid-template-columns:1fr}.kardex-workspace .accounting-toolbar{align-items:stretch}.kardex-workspace .accounting-tenant-control{min-width:0;width:100%}}
