/* Shared application layout and organization workspace. */
.app-main { min-width: 0; }
a.gradient-bg { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; text-align: center; }
:where(a, button, input, select, textarea, summary):focus-visible { outline: 3px solid #3182ce; outline-offset: 3px; }
.organizations-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 8px 0 28px; }
.organizations-eyebrow { color: #527084; font-size: 10px; font-weight: 700; letter-spacing: .16em; margin-bottom: 10px; }
.organizations-heading h1 { font-size: 32px; line-height: 1.15; font-weight: 700; letter-spacing: -.035em; color: #122b45; }
.organizations-heading > div > p:last-child { font-size: 14px; line-height: 1.6; color: #64748b; margin-top: 10px; }
.org-primary, .org-secondary { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 48px; padding: 12px 20px; border-radius: 12px; font-size: 14px; line-height: 1.4; font-weight: 600; text-align: center; text-decoration: none; }
.org-primary { background: #1a365d; color: white; box-shadow: 0 4px 10px #1a365d15; transition: background .2s; }
.org-primary:hover { background: #244b7c; }
.org-secondary { color: #334d69; border: 1px solid #dce4ec; background: white; }
.organizations-empty { background: white; border: 1px solid #e4eaf0; border-radius: 24px; padding: 48px 24px 36px; text-align: center; box-shadow: 0 8px 32px #1a365d04; }
.organizations-illustration { position: relative; display: flex; align-items: center; justify-content: center; width: 108px; height: 108px; border-radius: 32px; margin: 0 auto 28px; color: #2b6cb0; background: #edf5fb; transform: rotate(-5deg); }
.organizations-illustration svg { transform: rotate(5deg); }
.organizations-illustration > span { position: absolute; right: -4px; bottom: -4px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 11px; background: #dcf4e8; color: #238557; border: 3px solid white; font-size: 22px; }
.organizations-empty h2 { font-size: 28px; line-height: 1.2; font-weight: 600; letter-spacing: -.025em; color: #122b45; }
.organizations-empty > p:not(.organizations-eyebrow) { max-width: 360px; margin: 16px auto 26px; color: #64748b; font-size: 14px; line-height: 1.7; }
.organizations-empty .org-primary { min-width: 240px; }
.organizations-empty-note { display: block; margin-top: 16px; font-size: 11px; line-height: 1.6; color: #64748b; }
.organizations-next { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 28px 8px; }
.organizations-next > div { display: flex; align-items: flex-start; gap: 12px; }
.organizations-next > div > span { font-size: 11px; color: #527084; background: #eaf0f6; padding: 6px; border-radius: 8px; font-weight: 600; }
.organizations-next p { font-size: 12px; line-height: 1.7; color: #64748b; }
.organizations-next strong { display: block; font-weight: 600; color: #334d69; }
.organizations-hint { color: #64748b; font-size: 14px; margin: 0 0 16px; }
.organizations-grid { display: grid; gap: 16px; }
.organization-card { padding: 24px; background: white; border: 1px solid #e4eaf0; border-radius: 20px; }
.organization-card.is-active { border-color: #70b595; box-shadow: 0 0 0 1px #70b595; }
.organization-identity { display: flex; gap: 12px; align-items: center; }
.organization-avatar { display: grid; place-items: center; background: #edf5fb; color: #2b6cb0; width: 48px; height: 48px; border-radius: 14px; flex-shrink: 0; font-size: 22px; font-weight: 600; }
.organization-name { min-width: 0; flex: 1; }
.organization-name h2 { font-size: 18px; font-weight: 600; overflow-wrap: anywhere; }
.organization-role { font-size: 12px; color: #64748b; }
.organization-active { font-size: 11px; font-weight: 600; color: #21744e; background: #e8f5ee; padding: 5px 10px; border-radius: 20px; }
.organization-description, .organization-rfc { font-size: 13px; color: #64748b; line-height: 1.6; margin-top: 16px; overflow-wrap: anywhere; }
.organization-rfc { margin-top: 4px; }
.organization-actions { display: flex; gap: 10px; margin-top: 20px; }
.organization-actions .org-primary { flex: 1; }
@media (min-width: 768px) { .mobile-header, .mobile-workspace, .mobile-tabs { display: none; } }
@media (max-width: 767px) {
    .app-shell { display: block; }
    .app-content { padding: 24px 20px calc(100px + env(safe-area-inset-bottom)); }
    .mobile-header { position: sticky; top: 0; z-index: 35; display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; background: #fff; border-bottom: 1px solid #e4eaf0; }
    .mobile-brand { display: flex; align-items: center; gap: 10px; min-width: 0; color: #122b45; }
    .mobile-brand img { flex-shrink: 0; }
    .mobile-brand > span { font-family: 'Outfit', sans-serif; font-size: 18px; font-weight: 600; line-height: 1.2; }
    .mobile-brand small { display: block; font-family: 'Inter', sans-serif; font-size: 10px; font-weight: 400; color: #64748b; margin-top: 3px; }
    .mobile-menu summary { display: grid; place-items: center; width: 44px; height: 44px; list-style: none; cursor: pointer; border: 1px solid #e4eaf0; border-radius: 12px; color: #334d69; }
    .mobile-menu summary::-webkit-details-marker { display: none; }
    .mobile-menu[open] summary { background: #edf5fb; }
    .mobile-menu nav { position: absolute; right: 20px; top: calc(100% + 8px); width: min(280px, calc(100vw - 40px)); padding: 8px; background: white; border: 1px solid #e4eaf0; border-radius: 16px; box-shadow: 0 16px 48px #122b4526; }
    .mobile-menu nav p { padding: 12px; font-size: 12px; font-weight: 600; overflow-wrap: anywhere; color: #64748b; border-bottom: 1px solid #edf1f5; }
    .mobile-menu nav a { display: flex; align-items: center; min-height: 48px; padding: 12px; font-size: 14px; color: #334d69; border-radius: 8px; }
    .mobile-menu nav a:hover { background: #edf5fb; }
    .mobile-workspace { display: flex; align-items: center; gap: 8px; padding: 10px 20px; background: #edf5fb; font-size: 12px; color: #334d69; }
    .mobile-workspace > span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .workspace-dot { width: 6px; height: 6px; border-radius: 50%; background: #38a169; flex-shrink: 0; }
    .workspace-change { margin-left: auto; white-space: nowrap; font-weight: 600; }
    .mobile-tabs { position: fixed; z-index: 40; bottom: 0; left: 0; right: 0; display: flex; justify-content: space-around; padding: 7px 8px calc(7px + env(safe-area-inset-bottom)); background: #fffffff5; border-top: 1px solid #e4eaf0; backdrop-filter: blur(16px); }
    .mobile-tab { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 52px; font-size: 10px; font-weight: 500; color: #64748b; border-radius: 12px; }
    .mobile-tab[aria-current] { color: #1a365d; background: #edf5fb; font-weight: 700; }
    .organizations-heading { flex-direction: column; align-items: stretch; gap: 20px; margin: 4px 0 24px; }
    .organizations-heading h1 { font-size: 28px; }
    .organizations-empty { padding: 32px 22px 28px; border-radius: 20px; }
    .organizations-empty h2 { font-size: 26px; }
    .organizations-empty .org-primary { width: 100%; min-width: 0; }
    .organizations-next { grid-template-columns: 1fr; gap: 18px; padding: 24px 8px 0; }
    .organization-card { padding: 20px; }
    .app-content h1 { overflow-wrap: anywhere; line-height: 1.2; }
    .app-content :where(input:not([type=checkbox]):not([type=radio]):not([type=hidden]), select, textarea) { font-size: 16px; max-width: 100%; }
    .app-content :where(input:not([type=checkbox]):not([type=radio]):not([type=hidden]), select) { min-height: 48px; }
    .app-content :where(button[type=submit], a.gradient-bg) { min-height: 48px; }
    .app-content .p-12 { padding: 28px 20px; }
    .app-content .overflow-x-auto { max-width: 100%; overscroll-behavior-x: contain; }
    .app-content .flex > :where(div, section) { min-width: 0; }
    .app-content .flex > :where(div.w-12, div.w-14) { flex-shrink: 0; }
}
@media (prefers-reduced-motion: reduce) { .org-primary { transition: none; } }
@media (max-width: 767px) {
    .accounts-table, .accounts-table tbody { display: block; }
    .accounts-table thead { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    .accounts-table tr { display: block; padding: 16px; }
    .accounts-table td { display: block; padding: 8px 0; text-align: left; overflow-wrap: anywhere; }
    .accounts-table td::before { content: attr(data-label); display: block; color: #64748b; font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 600; margin-bottom: 4px; }
    .accounts-table .sat-cell { width: auto; min-width: 0; }
    .accounts-table .sat-link-form { width: 100%; min-width: 0; }
    .accounts-table .sat-save { width: 100%; }
    .accounts-table td:last-child { border-top: 1px solid #edf1f5; margin-top: 8px; }
    .accounts-table td:last-child form { display: block; }
    .accounts-table td:last-child button { padding: 10px 14px; border: 1px solid #fee2e2; border-radius: 10px; }
}

@media (max-width: 399px) {
    .public-navigation .text-sm { font-size: 12px; }
    .public-navigation img { width: 32px; height: 32px; }
}
@media (max-width: 767px) {
    .public-navigation a { min-height: 44px; display: inline-flex; align-items: center; }
    form :where(input:not([type=checkbox]):not([type=radio]):not([type=hidden]), select, textarea) { font-size: 16px; }
    .accounts-table .sat-search-wrap { min-width: 0; }
}
/* Usage reports remain outside the exported client document. */
.ia-report, .ia-summary { border: 1px solid #dce5ef; border-radius: 14px; padding: 14px 18px; margin-bottom: 14px; background: white; }
.ia-report { border-color: #b6d9c8; scroll-margin-top: 100px; }
.ia-report-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 0; }
.ia-eyebrow { font-size: 10px; font-weight: 700; letter-spacing: .12em; color: #21744e; margin-bottom: 6px; }
.ia-report h2, .ia-summary h2 { font-size: 15px; line-height: 1.3; font-weight: 600; color: #122b45; }
.ia-report-heading > div > p:last-child, .ia-summary-heading p { margin-top: 4px; font-size: 11px; color: #64748b; overflow-wrap: anywhere; }
.ia-report-link { display: inline-flex; min-height: 36px; align-items: center; justify-content: center; padding: 8px 12px; border-radius: 9px; background: #1a365d; color: white; font-size: 12px; font-weight: 600; flex-shrink: 0; }
.ia-consumption-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 12px; }
.ia-consumption-grid > div { padding: 16px; background: #f7fafc; border-radius: 12px; min-width: 0; }
.ia-consumption-grid span { display: block; font-size: 12px; color: #64748b; line-height: 1.5; }
.ia-consumption-grid strong { display: block; margin-top: 6px; font-size: 22px; color: #122b45; overflow-wrap: anywhere; }
.ia-consumption-grid small { font-size: 12px; font-weight: 400; }
.ia-consumption-grid .ia-consumption-total { background: #edf7f1; }
.ia-explanation { margin-top: 16px; font-size: 13px; line-height: 1.75; color: #52657a; }
.ia-data-note { margin-top: 12px; font-size: 11px; line-height: 1.7; color: #64748b; }
.ia-summary-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 20px; }
.ia-summary-stats > div { min-width: 0; }
.ia-summary-stats strong { display: block; font-size: 26px; color: #1a365d; line-height: 1.2; overflow-wrap: anywhere; }
.ia-summary-stats span { display: block; margin-top: 6px; font-size: 12px; color: #64748b; }
.ia-value-note { margin-top: 16px; padding: 16px; border-radius: 12px; background: #edf5fb; font-size: 12px; line-height: 1.7; color: #52657a; }
.ia-value-note strong { color: #1a365d; }
.ia-value-note p { margin-top: 4px; }
.ia-support { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid #edf1f5; padding-top: 16px; margin-top: 16px; font-size: 11px; line-height: 1.7; color: #64748b; }
.ia-support a { color: #6444a0; font-weight: 600; flex-shrink: 0; display: inline-flex; align-items: center; min-height: 44px; }
@media (max-width: 767px) {
    .ia-report, .ia-summary { padding: 12px 14px; border-radius: 12px; }
    .ia-report-heading { flex-direction: column; align-items: stretch; gap: 10px; }
    .ia-consumption-grid { grid-template-columns: 1fr 1fr; }
    .ia-consumption-total { grid-column: 1 / -1; }
    .ia-consumption-grid > div { padding: 12px; }
    .ia-consumption-grid strong { font-size: 20px; }
    .ia-summary-stats { grid-template-columns: 1fr 1fr; gap: 20px 12px; }
    .ia-summary-stats > div:first-child { grid-column: 1 / -1; }
    .ia-summary-stats > div:first-child strong { font-size: 32px; }
    .ia-summary-stats strong { font-size: 24px; }
    .ia-support { flex-direction: column; align-items: flex-start; gap: 4px; }
}

.ia-summary > summary { cursor: pointer; padding-right: 20px; position: relative; list-style: none; }
.ia-summary > summary::-webkit-details-marker { display: none; }
.ia-summary > summary::after { content: '+'; position: absolute; top: 0; right: 0; font-size: 24px; color: #527084; }
.ia-summary[open] > summary::after { content: '−'; }
/* Bright brand artwork keeps the original mark legible on dark backgrounds. */
.public-navigation { background: #102b49; border-bottom: 1px solid #8fd8ff35; position: relative; }
.public-navigation::after { content: ''; position: absolute; bottom: -1px; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, transparent, #70c7ff80, #71e6b480, transparent); }
.public-brand { display: inline-flex; align-items: center; flex-shrink: 0; }
.public-brand .public-brand-logo { width: 280px; height: auto; max-width: 100%; filter: drop-shadow(0 0 12px #70c7ff30); }
.brand-hero { background: radial-gradient(ellipse at 12% 5%, #163e6270, transparent 58%), radial-gradient(ellipse at 90% 90%, #0c574535, transparent 55%), #020817; }
.hero-brand { margin-bottom: 28px; }
.hero-brand img { width: 440px; height: auto; max-width: 100%; filter: drop-shadow(0 0 22px #70c7ff45); }
.hero-brand > p { font-size: 14px; color: #c3e6f5; line-height: 1.6; margin-top: 8px; letter-spacing: .01em; }
.hero-value { color: #9bdef8; background: linear-gradient(110deg, #acdfff 10%, #a1eccf 95%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
@media (max-width: 767px) {
    .hero-brand img { width: 340px; }
    .hero-brand > p { font-size: 13px; }
}
@media (max-width: 639px) {
    .public-nav-inner { flex-direction: column; gap: 10px; padding-top: 10px; padding-bottom: 10px; }
    .public-brand .public-brand-logo { width: 240px; height: auto; }
    .public-nav-actions { width: 100%; justify-content: center; gap: 18px; }
    .public-nav-actions a { font-size: 13px; }
    .hero-brand { margin-bottom: 24px; }
}
@media (max-width: 639px) {
    .organization-actions { flex-wrap: wrap; }
    .organization-actions .org-primary { flex-basis: 100%; }
    .organization-actions .org-secondary { flex: 1; }
}
/* El menú permanece al alcance mientras se desplazan listas o documentos largos. */
@media screen and (min-width: 768px) {
    .app-sidebar { position: sticky; top: 0; height: 100vh; height: 100dvh; align-self: flex-start; overflow: hidden; }
    .sidebar-brand, .sidebar-workspace, .sidebar-footer { flex-shrink: 0; }
    .sidebar-navigation { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #ffffff50 transparent; }
    .sidebar-support { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; margin-bottom: 14px; padding: 10px 8px; border: 1px solid #ffffff45; border-radius: 10px; background: #ffffff15; color: white; font-size: 13px; font-weight: 600; transition: background .15s; }
    .sidebar-support:hover { background: #ffffff28; }
}
@media screen and (min-width: 768px) and (max-height: 640px) {
    .sidebar-brand { padding: 16px; }
    .sidebar-brand > p { display: none; }
    .sidebar-workspace { margin-top: 8px; padding: 8px 12px; }
    .sidebar-navigation { padding-top: 8px; padding-bottom: 8px; }
    .sidebar-footer { padding: 12px; }
    .sidebar-support { margin-bottom: 10px; }
}
@media screen and (min-width: 768px) and (max-height: 420px) {
    .sidebar-user { display: none; }
    .sidebar-support { margin-bottom: 0; }
}
@media screen and (max-width: 767px) {
    .mobile-menu nav { max-height: calc(100dvh - 96px); overflow-y: auto; overscroll-behavior: contain; }
}
/* Marca legible en la aplicación: versión clara, sin la microtipografía del logo anterior. */
.sidebar-brand { padding: 20px 16px; background: linear-gradient(145deg, #0b2340, #153e75); }
.sidebar-brand-logo { display: block; width: 100%; max-width: 224px; height: auto; filter: drop-shadow(0 0 12px #80d4ff40); }
.sidebar-brand .sidebar-tagline { margin: 12px 0 0; font-size: 14px; line-height: 1.5; font-weight: 500; color: #f0f7ff; }
.sidebar-tagline span { display: block; }
.sidebar-tagline span:first-child { color: #bde7ff; }
@media screen and (min-width: 768px) and (max-height: 640px) {
    .sidebar-brand { padding: 14px 16px; }
}

.ia-report-heading>div:first-child{min-width:0}.ia-report-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-shrink:0;flex-wrap:wrap}.ia-report-total{font-size:12px;color:#42705a;background:#edf7f1;padding:6px 10px;border-radius:8px}.ia-report-total strong{font-weight:700;font-variant-numeric:tabular-nums}.ia-report-details{margin-top:6px}.ia-report-details>summary{font-size:11px;color:#547085;cursor:pointer;width:fit-content;min-height:28px;display:list-item;align-content:center;margin-left:14px}.ia-report-details[open]>summary{margin-bottom:10px}.ia-report-details .ia-consumption-grid>div{padding:10px 12px}.ia-report-details .ia-consumption-grid strong{font-size:18px;margin-top:2px}.ia-report-details .ia-explanation{font-size:11px;margin-top:10px;line-height:1.6}.ia-summary>summary::after{font-size:20px}.ia-summary-heading h2{font-size:14px}.ia-summary-heading p{font-size:11px}
