/* SETAX DATA SEARCH · Navegación por categorías y páginas completas.
   Amplía los tokens de app.css. No contiene estilos específicos por tema. */
.brand { gap: 10px; }
.brand > span { font-size: 1.55rem; letter-spacing: -.055em; }
.brand small { font-size: .49rem; letter-spacing: .24em; margin-top: 6px; }
.brand .brand-symbol { width: 40px; height: 40px; object-fit: contain; }
.auth-identity { padding: 40px 10% 28px; justify-content: center; }
.auth-logo-lockup { display: flex; flex-direction: column; align-items: center; justify-content: center; margin: auto; padding: 50px 0; width: 100%; }
.auth-logo-lockup .brand-symbol { width: min(72%, 280px); height: auto; aspect-ratio: 1; object-fit: contain; margin-bottom: 28px; }
.auth-logo-lockup > strong { font-size: clamp(3rem, 5.5vw, 5.4rem); font-weight: 800; letter-spacing: -.055em; line-height: 1.05; }
.auth-logo-lockup > span { margin-top: 15px; font-size: clamp(.9rem, 1.5vw, 1.4rem); font-weight: 600; letter-spacing: .36em; padding-left: .36em; }
.auth-identity .auth-footer { width: 100%; }
.theme-dropdown { position: relative; z-index: 10; }
.theme-dropdown summary { list-style: none; cursor: pointer; }
.theme-dropdown summary::-webkit-details-marker, .service-group summary::-webkit-details-marker { display: none; }
.theme-dropdown summary > .icon:last-child { width: 15px; transition: transform .15s; }
.theme-dropdown[open] summary > .icon:last-child { transform: rotate(180deg); }
.theme-dropdown-panel { position: absolute; right: 0; top: calc(100% + 10px); padding: 19px; width: min(345px, calc(100vw - 40px)); background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 12px 35px #00000015; }
.theme-dropdown-panel h2 { font-size: .92rem; }
.theme-dropdown-panel p { font-size: .72rem; }
.theme-dropdown-panel .theme-picker { gap: 11px; justify-content: flex-start; margin: 20px 0 15px; }
.theme-dropdown-panel .theme-option { font-size: .65rem; }
.theme-dropdown-panel .swatch { width: 29px; height: 29px; }
/* Cabecera y pie fijos dentro del menú; las categorías tienen su propio scroll. */
.sidebar-v2 { padding: 22px 16px 0; overflow: hidden; width: 260px; }
.sidebar-v2 ~ .workspace { margin-left: 260px; }
.sidebar-v2 .sidebar-brand { padding: 0 7px 25px; flex-shrink: 0; }
.sidebar-scroll { overflow-y: auto; min-height: 90px; scrollbar-width: thin; padding-right: 3px; padding-bottom: 12px; }
.sidebar-v2 .nav-label { display: block; font-size: .66rem; margin: 0 12px 10px; }
.sidebar-v2 .nav-list { margin-bottom: 23px; gap: 3px; }
.sidebar-v2 .nav-link { font-size: .85rem; min-height: 42px; padding: 10px 12px; }
.nav-section-heading { display: flex; justify-content: space-between; align-items: center; padding-right: 9px; margin-bottom: 10px; }
.nav-section-heading .nav-label { margin-bottom: 0; }
.nav-section-heading .text-link { font-size: .68rem; }
.service-navigation { display: flex; flex-direction: column; gap: 7px; }
.service-group { background: var(--surface-soft); border: 1px solid var(--border); border-radius: 11px; overflow: hidden; }
.service-group summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px; cursor: pointer; list-style: none; font-size: .72rem; font-weight: 800; letter-spacing: .035em; }
.service-group summary > .icon { width: 15px; height: 15px; color: var(--muted); transition: transform .15s; }
.service-group[open] summary > .icon { transform: rotate(180deg); }
.service-group[open] summary { border-bottom: 1px solid var(--border); }
.service-group-links { display: flex; flex-direction: column; gap: 4px; padding: 7px; }
.service-nav-link { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 39px; padding: 9px 11px; border-radius: 7px; font-size: .72rem; font-weight: 700; color: var(--muted); line-height: 1.5; overflow-wrap: anywhere; }
.service-nav-link:hover { background: var(--tint); color: var(--text); }
.service-nav-link.active { background: var(--button); color: var(--on-button); }
.service-state-dot { height: 5px; width: 5px; border-radius: 50%; flex-shrink: 0; background: var(--muted); }
.service-state-dot.state-available { background: #65aa89; }
.service-state-dot.state-maintenance { background: #c49a44; }
.service-state-dot.state-suspended { background: #d36c7e; }
.nav-empty { padding: 12px; font-size: .78rem; }
.sidebar-v2 .sidebar-bottom { flex-shrink: 0; margin-top: auto; }
.sidebar-v2 .credit-promo { position: relative; padding: 15px 12px; margin: 10px 0; }
.promo-close { position: absolute; right: 5px; top: 5px; width: 29px; height: 29px; color: var(--muted); }
.promo-close .icon { width: 14px; height: 14px; }
.sidebar-v2 .credit-promo h3 { padding-right: 16px; }
.sidebar-v2 .credit-promo p { margin: 6px 0 11px; }
.sidebar-v2 .sidebar-user { padding: 13px 0; }
.dashboard-overview { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 22px; }
.dashboard-overview .activity-panel { display: flex; flex-direction: column; }
.dashboard-overview .activity-chart { height: 215px; margin-top: auto; }
.dashboard-overview .chart-track { height: 143px; }
.dashboard-overview .activity-chart { background-size: 100% 143px; }
/* Mi perfil reúne identidad, seguridad, sesiones, colores y contacto. */
.profile-hero { display: flex; align-items: center; gap: 22px; background: var(--banner); color: var(--banner-text); border-radius: 18px; padding: 28px; margin-bottom: 24px; }
.avatar-hero { width: 76px; height: 76px; font-size: 2rem; background: var(--surface); border-radius: 20px; }
.profile-hero h2 { font-size: 1.55rem; overflow-wrap: anywhere; }
.profile-hero p { margin: 5px 0 10px; font-size: .87rem; overflow-wrap: anywhere; color: var(--banner-text); }
.profile-hero > div { min-width: 0; }
.profile-membership { margin-left: auto; text-align: right; flex-shrink: 0; }
.profile-membership span { display: block; font-size: .62rem; font-weight: 700; letter-spacing: .1em; }
.profile-membership strong { display: block; font-size: 1.1rem; margin-top: 6px; }
.profile-layout { display: grid; grid-template-columns: minmax(0, 1fr) 285px; gap: 23px; align-items: start; }
.profile-editor { padding: 27px; }
.field small { font-size: .72rem; color: var(--muted); line-height: 1.6; }
.password-field { position: relative; }
.password-field input { padding-right: 48px; }
.form-section-title { display: flex; gap: 12px; align-items: flex-start; border-top: 1px solid var(--border); padding-top: 22px; margin-top: 5px; }
.form-section-title > .icon { color: var(--accent); margin-top: 2px; }
.form-section-title p { font-size: .77rem; margin-top: 7px; }
.form-section-title h3 { font-size: .95rem; }
.confirm-account { background: var(--surface-soft); border: 1px solid var(--border); border-radius: 12px; padding: 18px; margin-top: 5px; }
.profile-form-actions { display: flex; justify-content: flex-end; align-items: center; gap: 11px; margin-top: 5px; flex-wrap: wrap; }
.profile-summary .account-details { gap: 18px; }
.profile-summary dt { font-size: .76rem; }
.profile-summary dd { font-size: .9rem; }
.profile-summary .summary-number { font-size: 1.9rem; color: var(--accent); }
.profile-appearance .theme-picker { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 14px; margin: 15px 0 0; }
.profile-appearance .theme-option { padding: 19px 10px; gap: 13px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-soft); font-size: .76rem; font-weight: 700; }
.profile-appearance .theme-option:has(input:checked) { border-color: var(--accent); background: var(--tint); color: var(--accent); }
.profile-appearance .swatch { width: 43px; height: 43px; }
.profile-credits { display: flex; justify-content: space-between; align-items: center; gap: 25px; }
.profile-credits p { font-size: .83rem; margin: 8px 0 16px; }
.profile-credits .text-button { font-size: .72rem; }
/* Servicios: página completa con estados e instrucciones, sin overlays. */
.service-status { white-space: nowrap; }
.service-status.state-available { color: var(--success); background: var(--success-bg); }
.service-status.state-upcoming { color: var(--muted); background: var(--surface-soft); border: 1px solid var(--border); }
.service-status.state-maintenance { color: #825b1d; background: #fff0d3; }
.service-status.state-suspended { color: var(--danger); background: var(--danger-bg); }
html:is([data-theme=dark],[data-theme=red],[data-theme=yellow],[data-theme=cyan]) .service-status.state-maintenance { color: #ead29e; background: #3b3020; }
.consultation-panel { padding: 30px; }
.consultation-panel > .panel-heading { padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.consultation-panel > .panel-heading h2 { display: flex; align-items: center; gap: 10px; font-size: 1.02rem; }
.consultation-panel .query-form { gap: 18px; }
.consultation-panel .query-form button { min-width: 175px; min-height: 48px; }
.usage-instructions { background: var(--surface-soft); border: 1px solid var(--border); border-radius: 14px; padding: 25px; margin-top: 28px; }
.usage-instructions h3 { display: flex; align-items: center; gap: 10px; font-size: .93rem; }
.usage-instructions h3 > .icon { color: var(--accent); }
.usage-instructions ul { font-size: .84rem; color: var(--muted); padding-left: 21px; margin: 18px 0 23px; line-height: 1.9; }
.usage-instructions > p { margin-top: 15px; font-size: .85rem; }
.instruction-examples { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 15px; border-top: 1px solid var(--border); padding-top: 22px; }
.instruction-examples > div { background: var(--surface); border: 1px solid var(--border); padding: 17px; border-radius: 10px; }
.instruction-examples span { display: block; font-size: .62rem; letter-spacing: .05em; font-weight: 800; color: var(--muted); }
.instruction-examples strong { display: block; margin-top: 9px; font-size: .91rem; }
.instruction-examples small { display: block; margin-top: 7px; font-size: .65rem; color: var(--muted); }
.instruction-examples > div:last-child strong { color: var(--danger); }
.consultation-footer { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding-top: 23px; font-size: .79rem; color: var(--muted); }
.consultation-footer > span { display: flex; gap: 8px; align-items: center; }
.service-unavailable { display: flex; align-items: flex-start; gap: 15px; background: var(--surface-soft); border: 1px solid var(--border); border-radius: 13px; padding: 23px; }
.service-unavailable > .icon { color: var(--accent); }
.service-unavailable p { font-size: .85rem; margin: 8px 0 13px; }
.service-unavailable span { font-size: .75rem; color: var(--muted); }
/* Administración de servicios y comunicación interna. */
.admin-tabs { display: flex; gap: 7px; border-bottom: 1px solid var(--border); padding-bottom: 15px; margin-bottom: 23px; flex-wrap: wrap; }
.admin-tabs a { display: inline-flex; align-items: center; gap: 9px; padding: 11px 16px; border-radius: 9px; font-size: .82rem; font-weight: 700; color: var(--muted); }
.admin-tabs a:hover, .admin-tabs a[aria-current=page] { background: var(--tint); color: var(--accent); }
.admin-service-list { display: flex; flex-direction: column; gap: 22px; }
.service-admin-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(140px, 1fr) minmax(110px, .7fr) auto; align-items: end; gap: 18px; border-top: 1px solid var(--border); padding: 20px 0; }
.service-admin-row:last-child { padding-bottom: 0; }
.service-admin-info { align-self: center; }
.service-admin-info h3 { font-size: .85rem; margin-bottom: 9px; }
.service-admin-row label { font-size: .76rem; }
.service-admin-row button { min-height: 48px; }
textarea { width: 100%; resize: vertical; min-height: 130px; padding: 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font-size: .9rem; line-height: 1.7; }
.announcement-feed { max-height: 300px; overflow-y: auto; scrollbar-width: thin; }
.announcement { padding: 19px 0; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.announcement:first-child { padding-top: 0; }
.announcement:last-child { border-bottom: 0; }
.announcement h3 { font-size: .97rem; margin: 12px 0 9px; }
.announcement-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.announcement-meta time { font-size: .7rem; color: var(--muted); }
.announcement-body { white-space: pre-wrap; font-size: .84rem; line-height: 1.8; }
.announcement-important h3 { color: var(--danger); }
.announcement-maintenance h3 { color: var(--accent); }
.admin-announcement { padding: 20px 0; border-top: 1px solid var(--border); }
.admin-announcement .announcement { border: 0; padding: 0; }
.announcement-actions { display: flex; gap: 10px; align-items: center; margin-top: 18px; flex-wrap: wrap; }
.announcement-actions > .pill { margin-right: auto; }
@media (max-width: 1250px) {
  .sidebar-v2 { width: 238px; }
  .sidebar-v2 ~ .workspace { margin-left: 238px; }
  .profile-layout { grid-template-columns: minmax(0,1fr) 250px; gap: 18px; }
  .profile-editor .form-two { grid-template-columns: 1fr; }
  .profile-appearance .theme-picker { gap: 9px; }
  .service-admin-row { grid-template-columns: minmax(0,1fr) minmax(120px,1fr) minmax(90px,.7fr); }
  .service-admin-row button { grid-column: 3; }
}
@media (max-width: 1000px) {
  .dashboard-overview, .profile-layout { grid-template-columns: 1fr; }
  .profile-editor .form-two { grid-template-columns: 1fr 1fr; }
  .profile-summary .account-details { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .profile-appearance .theme-picker { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .instruction-examples { grid-template-columns: 1fr; }
  .profile-credits { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 760px) {
  .sidebar-v2 { width: min(290px, calc(100vw - 35px)); }
  .sidebar-v2 ~ .workspace { margin-left: 0; }
  .sidebar-v2 .sidebar-brand { padding-bottom: 18px; }
  .sidebar-v2 .brand > span { font-size: 1.5rem; }
  .auth-top .brand > span { font-size: 1.3rem; }
  .auth-top .brand small { font-size: .43rem; }
  .auth-identity { display: none; }
  .profile-hero { flex-wrap: wrap; padding: 23px; gap: 15px; }
  .profile-membership { margin-left: 0; text-align: left; width: 100%; border-top: 1px solid var(--border); padding-top: 15px; }
  .profile-editor { padding: 20px; }
  .profile-editor .form-two { grid-template-columns: 1fr; }
  .consultation-panel { padding: 21px; }
  .usage-instructions { padding: 20px; }
  .service-admin-row { grid-template-columns: 1fr 1fr; gap: 14px; }
  .service-admin-info { grid-column: 1 / -1; }
  .service-admin-row button { grid-column: 1 / -1; justify-self: end; }
  .topbar .breadcrumb strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
}
@media (max-width: 480px) {
  .auth-top { gap: 10px; }
  .auth-top .btn { font-size: .73rem; padding: 8px 10px; gap: 6px; }
  .auth-top .brand .brand-symbol { width: 30px; height: 30px; }
  .auth-top .brand > span { font-size: 1.12rem; }
  .auth-top .brand small { font-size: .38rem; }
  .theme-dropdown-panel .theme-picker { gap: 13px; }
  .theme-dropdown-panel { padding: 17px; }
  .theme-dropdown-panel .swatch { width: 27px; height: 27px; }
  .avatar-hero { width: 60px; height: 60px; font-size: 1.6rem; }
  .profile-hero h2 { font-size: 1.2rem; }
  .profile-hero > div:not(.profile-membership) { max-width: calc(100% - 76px); }
  .profile-hero p { font-size: .76rem; }
  .profile-appearance .theme-picker { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .profile-appearance .theme-option { font-size: .7rem; padding: 15px 8px; }
  .profile-appearance .swatch { width: 34px; height: 34px; }
  .profile-form-actions { align-items: stretch; flex-direction: column-reverse; }
  .profile-form-actions .btn { width: 100%; }
  .profile-summary .account-details { grid-template-columns: 1fr; }
  .consultation-panel > .panel-heading { align-items: flex-start; flex-direction: column; }
  .consultation-panel .query-form button { width: 100%; }
  .consultation-footer { align-items: flex-start; flex-direction: column; }
  .usage-instructions { padding: 16px; }
  .usage-instructions ul { font-size: .8rem; }
  .admin-tabs { gap: 5px; }
  .admin-tabs a { padding: 10px 12px; font-size: .74rem; }
  .admin-tabs .icon { width: 17px; }
  .service-admin-row { grid-template-columns: 1fr; }
  .service-admin-row .btn { width: 100%; }
  .service-admin-row select, .service-admin-row input { font-size: .85rem; }
  .announcement-editor .form-two { grid-template-columns: 1fr; }
  .topbar .breadcrumb strong { max-width: 170px; }
}

/* La seta de SETAX toma el acento del tema activo. */
.brand-symbol {
  display: inline-block;
  flex-shrink: 0;
  background-color: var(--accent);
  -webkit-mask: url('../img/setax-symbol-512.webp') center / contain no-repeat;
  mask: url('../img/setax-symbol-512.webp') center / contain no-repeat;
}
.auth-logo-lockup .brand-symbol {
  -webkit-mask-image: url('../img/setax-symbol-512.webp');
  mask-image: url('../img/setax-symbol-512.webp');
}

/* Las opciones de acceso expanden la fila sin un diálogo flotante. */
.restriction-options form { display: grid; gap: 8px; padding-top: 10px; min-width: 160px; }

#query-input[aria-invalid="true"] { border-color: var(--danger, #b54759); }
#dni-error { margin-top: 14px; }

/* Diez temas, filas estables en el menú y en las preferencias de cuenta. */
.theme-dropdown-panel .theme-picker { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:16px 9px; }
.profile-appearance .theme-picker { grid-template-columns:repeat(5,minmax(0,1fr)); }
@media (max-width:420px) { .profile-appearance .theme-picker { grid-template-columns:repeat(3,minmax(0,1fr)); } }
