select {
  font: inherit;
  color: var(--text);
  background: #001e2d;
  border: 1px solid #345360;
  border-radius: 9px;
  padding: 11px;
  max-width: 100%;
}
button,
input,
select,
textarea {
  font: inherit;
}
nav a > span:first-child {
  font: 12px Electrolize;
  color: var(--cyan);
}
nav a small {
  font-size: 10px;
  color: var(--amber);
  margin-left: auto;
}
nav a[aria-current="page"] {
  background: #073348;
  border-color: #17516a;
  color: white;
}
nav a:not([aria-current]) {
  background: none;
  border-color: transparent;
}
.section-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin: 24px 0;
}
.section-toolbar h2 {
  margin: 0 0 8px;
}
.section-toolbar p {
  font-size: 13px;
  margin-bottom: 0;
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}
.metric {
  background: #042b3e;
  border: 1px solid var(--line);
  padding: 19px;
  border-radius: 14px;
}
.metric strong {
  font: 29px Electrolize;
  display: block;
  color: var(--cyan);
}
.metric span {
  font-size: 13px;
  color: var(--muted);
}
.filter-bar {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
  padding: 17px;
  background: #022536;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 18px;
}
.filter-bar label {
  flex: 1;
  min-width: 130px;
  font-size: 13px;
  color: var(--muted);
}
.filter-bar input,
.filter-bar select {
  width: 100%;
  margin-top: 7px;
}
.filter-bar label:first-child {
  flex: 2;
}
.filter-bar .secondary {
  border-radius: 9px;
}
.record-list {
  display: grid;
  gap: 10px;
}
.record-item {
  background: #032536;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}
.record-item h3 {
  font: 16px DM;
  margin: 0 0 8px;
}
.record-item p {
  font-size: 14px;
  color: var(--muted);
  margin: 4px 0;
}
.record-item .badge {
  margin: 0 7px 5px 0;
}
.record-item button {
  flex-shrink: 0;
}
.detail-panel {
  margin: 24px 0;
  border: 1px solid #31637a;
  background: #032536;
  padding: 24px;
  border-radius: 16px;
}
.detail-panel h3 {
  margin: 0 0 15px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.form-grid label {
  font-size: 14px;
  color: #b5cdd9;
}
.form-grid input,
.form-grid select,
.form-grid textarea {
  width: 100%;
  margin-top: 6px;
}
.form-grid + .primary {
  margin-top: 20px;
}
.timeline {
  border-left: 2px solid #21526a;
  margin: 20px 0 0 8px;
  padding-left: 20px;
}
.timeline article {
  padding: 0 0 20px;
}
.timeline article p {
  font-size: 14px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.timeline time {
  font-size: 12px;
  color: var(--muted);
}
.timeline h4 {
  margin: 7px 0;
  font: 13px DM;
}
.record-details {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border-radius: 10px;
  padding: 15px;
  font: 11px/1.7 monospace;
  max-height: 360px;
  overflow: auto;
}
.review-explanation {
  padding: 16px 0;
  max-width: 900px;
  font-size: 14px;
}
.review-explanation h3 {
  font-size: 17px;
}
.proposal {
  border: 1px solid #716131;
  border-radius: 12px;
  padding: 20px;
  margin: 16px 0;
}
.proposal label {
  font-size: 13px;
  display: flex;
  gap: 10px;
  align-items: start;
  margin: 15px 0;
}
.proposal input[type="checkbox"] {
  width: 18px;
  height: 18px;
}
.proposal .primary {
  margin-top: 8px;
}
.form-error {
  font-size: 12px;
  margin-top: 15px;
  white-space: pre-wrap;
}
dialog {
  width: min(720px, calc(100% - 24px));
  max-height: 90vh;
  border: 1px solid #366175;
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 30px 80px #0009;
}
dialog::backdrop {
  backdrop-filter: blur(3px);
}
dialog .section-toolbar {
  margin: 0 0 20px;
}
dialog .primary {
  margin-top: 16px;
}
.chat-layout {
  display: grid;
}
.conversation-list {
  position: static;
  width: auto;
}
.conversation-list h3 {
  font-size: 15px;
  margin: 0 0 16px;
}
.conversation-list button {
  border-bottom: 1px solid var(--line);
  background: none;
}
.chat-message {
  margin-bottom: 15px;
}
.chat-message h3 {
  font: 11px DM;
  margin: 0 0 12px;
}
.chat-message .answer {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.chat-source {
  font-size: 12px;
  display: block;
  margin-top: 8px;
}
.suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 20px 0;
}
.suggestions button {
  font-size: 10px;
  border: 1px solid var(--line);
}
.team-person {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.team-person span {
  color: var(--muted);
  font-size: 13px;
  margin-left: 12px;
}
@media (max-width: 1100px) {
  .metrics {
    grid-template-columns: repeat(3, 1fr);
  }
  .chat-layout {
    grid-template-columns: 1fr;
  }
  .conversation-list {
    max-height: 180px;
    overflow: auto;
  }
  .conversation-list h3 {
    margin-bottom: 6px;
  }
  .conversation-list button {
    display: inline-block;
    width: auto;
    margin-right: 12px;
  }
}
@media (max-width: 850px) {
  .sidebar {
    flex-wrap: wrap;
  }
  .sidebar nav {
    justify-content: space-between;
  }
  .sidebar nav a > span {
    display: inline;
  }
  .sidebar > .quiet {
    margin-left: auto;
  }
}
@media (max-width: 620px) {
  .section-toolbar {
    align-items: start;
    flex-direction: column;
  }
  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .metric {
    padding: 14px;
  }
  .record-item {
    align-items: start;
    flex-direction: column;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .full {
    grid-column: auto;
  }
  .detail-panel {
    padding: 17px;
  }
  .filter-bar {
    padding: 12px;
  }
  .chat-message.user {
    margin-left: 12px;
  }
  .sidebar nav a > span:first-child {
    font-size: 10px;
  }
  .service-bottom > .actions {
    width: 100%;
  }
  .service-bottom > .actions .secondary {
    white-space: normal;
  }
  .topbar {
    font-size: 10px;
  }
}
.chat-message.assistant .answer {
  white-space: normal;
}
.chat-message .answer h4 {
  font-size: 18px;
  margin: 22px 0 12px;
}
.chat-message .answer p {
  margin: 0 0 12px;
}
.chat-message .answer .table-wrap {
  margin: 15px 0;
}
.chat-message .answer code {
  font-size: 12px;
  color: var(--cyan);
}
.record-description {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
@media (max-width: 620px) {
  .sidebar nav {
    min-width: 0;
    gap: 3px;
  }
  .sidebar nav a {
    justify-content: center;
    flex: 1;
    min-width: 0;
  }
  .sidebar nav a small {
    display: none;
  }
  .chat-message {
    min-width: 0;
  }
  .chat-message .table-wrap {
    max-width: 100%;
    overflow-x: auto;
  }
}
/* Data maintenance shares the portal's panels and form controls. */
#updates-page > .panel {
  margin-block: 20px;
}
#updates-page input[type="file"] {
  max-width: 100%;
}
#upload-result {
  overflow-wrap: anywhere;
}
/* Employee workspace: consistent navigation, focused records and personal chat. */
.sidebar {
  width: 240px;
  padding: 32px 18px;
  border-right: 1px solid #1b3947;
}
.workspace {
  margin-left: 240px;
}
.brand {
  padding-inline: 16px;
}
.nav-label {
  margin-top: 44px;
}
.sidebar nav {
  gap: 7px;
}
.sidebar nav a {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 14px;
  min-height: 50px;
  padding: 13px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  transition:
    background 0.15s,
    color 0.15s;
}
.sidebar nav a svg {
  width: 21px;
  height: 21px;
  color: #87a7b8;
}
.sidebar nav a .nav-text {
  margin: 0;
  font: inherit;
  color: inherit;
  letter-spacing: 0;
}
.sidebar nav a:hover {
  background: #0b3042;
  color: white;
}
.sidebar nav a[aria-current="page"] {
  background: #0c3b4e;
  border-color: #235167;
  box-shadow: inset 3px 0 #00dfff;
}
.sidebar nav a[aria-current="page"] svg {
  color: var(--cyan);
}
.sidebar nav a small {
  margin: 0;
  max-width: 40px;
  overflow: hidden;
  background: #274452;
  padding: 2px 6px;
  border-radius: 6px;
  color: #c1d9e4;
  font: 10px DM;
}
.sidebar nav a[hidden] {
  display: none !important;
}
.auth-locked .sidebar,
.auth-locked .topbar,
.auth-locked .intro {
  display: none;
}
.auth-locked .workspace {
  margin-left: 0;
}
.login-logo {
  filter: brightness(0);
  object-fit: contain;
  display: block;
  margin: 0 auto 18px;
}
.auth-locked .login form {
  text-align: left;
  border-top: 1px solid #eee;
  margin-top: 22px;
  padding-top: 7px;
}
.auth-locked #error {
  background: white;
  border: 1px solid #b70230;
}
.customer-choice {
  width: 100%;
  display: grid;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  margin-top: 7px;
  gap: 4px;
}
.customer-choice span {
  font-size: 12px;
}
.customer-choice:hover {
  border-color: var(--cyan);
}
#ticket-customer-results {
  max-height: 240px;
  overflow: auto;
  margin-top: 10px;
}
#ticket-customer-selected:not(:empty) {
  padding: 12px;
  background: #0c403b;
  color: #b6eedc;
  border-radius: 9px;
  margin-top: 10px;
  font-size: 13px;
}
.ticket-customer-picker .search-line input {
  font-size: 14px;
  padding: 12px;
  border: 1px solid #345360;
}
#clients-page .welcome {
  padding: 38px 12px;
}
#clients-page .welcome h2 {
  font: 22px DM;
}
#clients-page .search-box {
  background: #042b3e;
  padding: 16px 20px;
}
#clients-page .service {
  background: #032536;
}
#clients-page .service-bottom span {
  max-width: none;
}
.customer-header h2 {
  font-family: DM;
  font-size: 27px;
}
.service .fields {
  gap: 18px;
}
.service .number {
  font-family: DM;
  font-size: 23px;
}
.service .ot-block strong {
  font-family: DM;
  font-size: 24px;
}
.chat-layout {
  grid-template-columns: 235px minmax(0, 1fr);
  gap: 0;
  border: 1px solid #2b4755;
  border-radius: 18px;
  overflow: hidden;
  min-height: 610px;
}
.conversation-list {
  border: 0;
  border-right: 1px solid #2b4755;
  border-radius: 0;
  height: 100%;
  padding: 20px 12px;
  overflow: auto;
}
.conversation-list h3 {
  padding: 0 10px;
}
.conversation-list button {
  border-radius: 9px;
  border: 0;
  line-height: 1.5;
  margin-bottom: 4px;
}
.chat-main {
  background-size: 20px 20px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.chat-main #chat-messages {
  padding: 24px;
  overflow: auto;
  max-height: 530px;
  flex: 1;
}
.chat-message {
  width: fit-content;
  padding: 14px 18px;
  margin: 0 0 16px;
  border: 0;
  border-radius: 0 14px 14px 14px;
  box-shadow: 0 1px 2px #0002;
}
.chat-message.user {
  margin-left: auto;
  border-radius: 14px 0 14px 14px;
}
.chat-message h3 {
  margin-bottom: 6px;
  font-size: 10px;
  letter-spacing: 0.6px;
}
.chat-message .answer {
  font-size: 14px;
  line-height: 1.65;
}
.chat-message time {
  display: block;
  text-align: right;
  font-size: 10px;
  margin-top: 7px;
}
.chat-message details {
  padding: 9px;
  margin-bottom: 0;
}
.chat-message .answer p:last-child {
  margin-bottom: 0;
}
.chat-main .suggestions {
  margin: 0;
  padding: 10px 16px;
  background: #082633;
  gap: 4px;
}
.chat-main > .hint {
  background: #082633;
  margin: 0;
  padding: 10px 18px;
  font-size: 10px;
}
@media (max-width: 1150px) {
  .sidebar {
    width: 208px;
    padding-inline: 12px;
  }
  .workspace {
    margin-left: 208px;
  }
  .sidebar nav a {
    padding: 12px;
    gap: 10px;
  }
  .chat-layout {
    grid-template-columns: 190px minmax(0, 1fr);
  }
}
@media (max-width: 850px) {
  .sidebar {
    width: 100%;
    flex-direction: row;
    align-items: center;
  }
  .workspace {
    margin-left: 0;
  }
  .sidebar .brand {
    padding: 0;
  }
  .sidebar .brand > span,
  .sidebar-note,
  .nav-label {
    display: none;
  }
  .sidebar nav {
    order: 3;
  }
  .sidebar nav a {
    display: flex !important;
    justify-content: center;
    flex: 1;
  }
  .sidebar nav a[hidden] {
    display: none !important;
  }
  .sidebar nav a small {
    display: none;
  }
  .chat-layout {
    grid-template-columns: 180px minmax(0, 1fr);
  }
  .topbar {
    height: 50px;
  }
  .intro {
    margin-bottom: 18px;
  }
}
@media (max-width: 620px) {
  .sidebar nav a {
    font-size: 11px;
  }
  .chat-layout {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .conversation-list {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 12px;
  }
  .conversation-list button {
    display: inline-block;
    width: auto;
    max-width: 210px;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    margin: 0 5px 0 0;
    padding: 9px;
  }
  .conversation-list h3 {
    margin-bottom: 8px;
  }
  .chat-main #chat-messages {
    padding: 15px;
    max-height: 55dvh;
    min-height: 240px;
  }
  .chat-message {
    max-width: 96%;
  }
  .auth-locked main {
    padding-top: 36px;
  }
  .service-bottom {
    flex-wrap: wrap;
  }
}
.sidebar nav a small:empty {
  display: none;
}
body[data-view="assistant"] .intro,
body[data-view="assistant"] #sources {
  display: none;
}
body[data-view="assistant"] #assistant-page > .section-toolbar h2 {
  font-size: 22px;
}
body[data-view="assistant"] #chat-messages {
  min-height: 0;
  max-height: none;
}
body[data-view="assistant"] .chat-main {
  overflow: hidden;
}
@media (max-width: 620px) {
  body[data-view="assistant"] .chat-layout {
    height: auto;
    min-height: 0;
  }
  body[data-view="assistant"] #chat-messages {
    min-height: 220px;
    max-height: 45dvh;
  }
  .conversation-list {
    max-height: 140px;
  }
}
/* Avanss blue and white palette, including the employee sign-in. */
body {
  --surface: #fff;
  --text: #123248;
  --line: #d8e4ed;
  --cyan: #007caa;
  color: var(--text);
  color-scheme: light;
}
.sidebar {
  --text: #fff;
  --muted: #afc9d9;
  --cyan: #00dfff;
  --line: #20485d;
  background: linear-gradient(180deg, #002d44, #001a26);
  color: white;
}
.sidebar .brand img {
  filter: none;
}
.sidebar nav a {
  color: #c1d9e7;
}
.sidebar .quiet {
  color: #c1d9e7;
}
.sidebar-note {
  color: white;
}
.topbar {
  background: #fff;
  border-color: #dbe6ee;
  color: #567286;
}
.topbar strong {
  color: #123248;
}
.access-label {
  color: #007caa;
}
.panel,
.service,
.record-item,
.detail-panel,
.result,
.metric,
.filter-bar,
.search-box,
#clients-page .service,
#clients-page .search-box {
  background: #fff;
  border-color: #d8e4ed;
  box-shadow: 0 3px 16px #12324805;
  color: #123248;
}
input,
textarea,
select {
  background: #fff;
  border-color: #bbcedb;
  color: #123248;
}
input::placeholder,
textarea::placeholder {
  color: #668194;
}
.search-line input::placeholder {
  color: #668194;
}
.search-box label,
.form-grid label,
.symptoms,
.identity-line {
  color: #536f82;
}
.search-box p,
.result span,
.record-item p,
.fields dt,
.service-top p,
.section-note {
  color: #536f82;
}
.identity-line strong,
.topbar strong {
  color: #123248;
}
.primary {
  background: #007eae;
  border-color: #007eae;
  color: #fff;
}
.secondary,
.copy {
  background: #edf6fc;
  color: #00678f;
  border-color: #b5d1e2;
}
.secondary:hover,
.copy:hover,
.quiet:hover {
  background: #dceef9;
  color: #004d73;
}
.quiet {
  color: #466d84;
}
.result[aria-pressed="true"] {
  background: #edf8ff;
  border-color: #007eae;
}
.tab[aria-selected="true"] {
  color: #006b98;
  border-color: #007eae;
}
.ot-block {
  background: #edf7ff;
  border-color: #c4deef;
}
.ot-block small {
  color: #426b83;
}
.ot-block strong {
  color: #0076a5;
}
.service-bottom,
.service-top {
  border-color: #dae7ef;
}
.service-bottom span {
  color: #536f82;
}
.fields dd {
  color: #123248;
}
.badge {
  background: #eaf5ff;
  color: #12628b;
  border-color: #b9d5e7;
}
.badge.active {
  background: #e8f6ef;
  color: #197247;
  border-color: #b5dbc7;
}
.warning,
.badge.warn {
  background: #fff8e8;
  color: #765216;
  border-color: #ead5a6;
}
.empty {
  color: #536f82;
  border-color: #bdcfdb;
}
.record-details {
  background: #edf4f9;
  color: #264e68;
}
.review-explanation p {
  color: #345a72;
}
.proposal {
  background: #fff9ed;
  border-color: #e9d8ac;
  color: #123248;
}
.customer-choice {
  background: #f0f7fc;
  color: #123248;
}
.customer-choice span {
  color: #536f82;
}
dialog {
  background: #fff;
  color: #123248;
  border-color: #bad1df;
}
dialog::backdrop {
  background: #001a2699;
}
.form-error {
  color: #ab2943;
}
.status-open {
  color: #08759b;
}
.status-in_progress {
  color: #936300;
}
.status-resolved,
.status-closed {
  color: #197247;
}
.severity-alta {
  color: #b52c36;
}
.severity-media {
  color: #8b641b;
}
table th {
  background: #f2f7fb;
  color: #4e6e83;
}
table td {
  color: #183e55;
}
.support-source,
footer,
.hint {
  color: #5f7b8e;
}
.chat-layout {
  border-color: #c3d7e4;
}
.conversation-list {
  border-color: #d8e4ed;
}
.conversation-list button {
  color: #365e76;
}
.conversation-list button:hover,
.conversation-list button[aria-current="true"] {
  background: #e5f3fc;
  color: #00658c;
}
.chat-message {
  background: white;
  color: #123248;
}
.chat-message.user {
  background: #ccecfb;
  color: #123248;
}
.chat-message h3 {
  color: #00749f;
}
.chat-message time {
  color: #567489;
}
.chat-message .answer strong {
  color: #123248;
}
.chat-main .suggestions,
.chat-main > .hint {
  background: #f5f9fc;
}
.chat-source {
  color: #4e7086;
}
.auth-locked main {
  padding-top: 70px;
}
.auth-locked .login {
  border-top: 4px solid #00dfff;
}
.auth-locked .login-logo {
  filter: brightness(0) saturate(100%) invert(15%) sepia(34%) saturate(1980%)
    hue-rotate(161deg) brightness(90%);
}
.auth-locked .login input {
  border-color: #bed5e4;
}
.auth-locked #error {
  border-color: #b62642;
  color: #a32a42;
}
.provider-option {
  margin-block: 20px 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  border: 1px solid #bdd8ea;
  border-radius: 10px;
  background: #edf7ff;
}
.provider-option input {
  width: 18px;
  height: 18px;
  margin: 3px 0 0;
  flex: none;
}
.provider-option span {
  font-size: 13px;
}
.provider-option small {
  display: block;
  font-size: 12px;
  margin-top: 5px;
  color: #56768c;
}
.ticket-customer-picker .search-line input {
  background: #fff;
  border-color: #bbcedb;
  color: #123248;
}
.provider-panel {
  margin: 20px 0;
}
.provider-panel .actions {
  margin-bottom: 16px;
}
.provider-panel a {
  text-decoration: none;
}
.provider-panel form {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
}
.provider-panel label {
  flex: 1;
  font-size: 12px;
  min-width: 180px;
}
.provider-panel input {
  margin-top: 7px;
}
.provider-panel .form-error {
  width: 100%;
}
.service-top h3 {
  margin: 4px 0;
  color: #123248;
}
/* Focused workspace and a shared visual language with acceso.avanss.es. */
body {
  --bg: #a9c4d8;
  --muted: #34576e;
  background: var(--bg);
}
.sidebar nav {
  margin-top: 36px;
}
.sidebar #logout {
  margin-top: auto;
  text-align: left;
  padding: 12px 16px;
}
.workspace {
  min-width: 0;
}
.workspace > .topbar {
  display: none;
}
.login-shell {
  display: none;
}
body.auth-locked {
  background: #001a26;
  color: #fff;
  min-height: 100dvh;
  color-scheme: dark;
}
.auth-locked .workspace {
  min-height: 100dvh;
  display: flex;
  align-items: center;
}
.auth-locked main {
  width: min(1180px, 100%);
  max-width: 1180px;
  padding: 72px 32px;
  margin: auto;
}
.auth-locked .login-shell:not([hidden]) {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 80px;
  align-items: center;
}
.login-intro {
  position: relative;
  padding-block: 48px;
}
.login-intro:before {
  content: "";
  position: absolute;
  inset: -40px 0;
  background: radial-gradient(ellipse at center, #00dfff1f, transparent 65%);
  pointer-events: none;
}
.login-intro img {
  display: block;
  width: 170px;
  height: auto;
  margin-bottom: 60px;
  position: relative;
}
.login-intro .login-kicker {
  color: #00dfff;
  font-size: 13px;
  letter-spacing: 0.17em;
  font-weight: 700;
}
.login-intro h1 {
  font:
    400 clamp(36px, 4vw, 58px)/1.12 Electrolize,
    sans-serif;
  color: white;
  margin: 20px 0 26px;
  letter-spacing: 0;
}
.login-intro h1 span {
  color: #00dfff;
}
.login-intro p:not(.login-kicker) {
  font-size: 18px;
  line-height: 1.7;
  color: #b8cdd8;
  max-width: 440px;
}
.login-intro > a {
  display: inline-block;
  margin-top: 24px;
  color: #ccebf2;
  text-underline-offset: 5px;
}
.auth-locked .login {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 40px;
  border: 1px solid #285163;
  border-radius: 24px;
  background: linear-gradient(145deg, #073448, #022434);
  box-shadow: 0 24px 80px #0005;
  text-align: left;
  color: white;
}
.auth-locked .login h2 {
  font:
    400 30px Electrolize,
    sans-serif;
  color: white;
  margin: 0 0 12px;
}
.auth-locked .login .muted {
  color: #b8cdd8;
  font-size: 15px;
  line-height: 1.6;
}
.auth-locked .login form {
  border: 0;
  margin: 26px 0 0;
  padding: 0;
}
.auth-locked .login label {
  color: #e3f0f5;
  font-size: 15px;
  font-weight: 500;
  margin: 22px 0 8px;
}
.auth-locked .login input {
  height: 54px;
  border: 1px solid #426273;
  border-radius: 10px;
  background: #001a26;
  color: white;
  font-size: 17px;
  padding: 12px 15px;
}
.auth-locked .login .primary {
  min-height: 54px;
  border: 0;
  border-radius: 100px;
  background: #00dfff;
  color: #001a26;
  font-size: 17px;
  font-weight: 700;
  margin-top: 32px;
}
.auth-locked .login .primary:hover {
  background: #81efff;
}
.auth-locked input:focus-visible {
  outline-color: #00dfff;
}
.mobile-chat-title {
  display: none;
}
body[data-view="assistant"]:not(.auth-locked) .workspace {
  height: 100dvh;
}
body[data-view="assistant"]:not(.auth-locked) main {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 24px 28px;
}
body[data-view="assistant"] #app {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
body[data-view="assistant"] #assistant-page {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
body[data-view="assistant"] #assistant-page > .section-toolbar {
  flex: none;
  margin: 0 0 16px;
  min-height: 40px;
}
body[data-view="assistant"] #assistant-page > .section-toolbar h2 {
  margin: 0;
  color: #123248;
}
body[data-view="assistant"] .chat-layout {
  flex: 1;
  height: auto;
  min-height: 0;
  grid-template-columns: 230px minmax(0, 1fr);
  border-color: #7599b2;
}
.conversation-list {
  min-width: 0;
  max-height: none;
  align-self: stretch;
  background: #edf4f9;
  overflow-y: auto;
  overflow-x: hidden;
}
.conversation-list button {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 0 0 4px;
  padding: 12px;
  font-size: 12px;
  white-space: normal;
  text-align: left;
  overflow: hidden;
}
.conversation-summary {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
  line-height: 1.5;
  max-height: 3em;
  text-align: left;
}
.chat-main {
  min-height: 0;
  background-color: #b9cfdf;
  background-image: radial-gradient(#376b8d1a 1px, transparent 1px);
}
.chat-main #chat-messages {
  overscroll-behavior: contain;
  min-height: 0;
  scroll-behavior: smooth;
}
.chat-message {
  max-width: min(91%, 800px);
}
.chat-message .answer pre {
  overflow: auto;
  max-width: 100%;
}
.chat-message summary {
  color: #34576e;
}
@media (max-width: 760px) {
  .auth-locked main {
    padding: 32px 20px;
  }
  .auth-locked .login-shell:not([hidden]) {
    grid-template-columns: 1fr;
    gap: 26px;
  }
  .login-intro {
    padding: 0;
  }
  .login-intro img {
    width: 135px;
    margin-bottom: 26px;
  }
  .login-intro h1 {
    font-size: 36px;
    margin-bottom: 14px;
  }
  .login-intro p:not(.login-kicker) {
    font-size: 16px;
  }
  .login-intro > a {
    margin-top: 8px;
  }
  .auth-locked .login {
    padding: 26px;
  }
}
@media (max-width: 850px) {
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 15;
    gap: 4px;
    padding: 6px 12px;
  }
  .sidebar .brand img {
    width: 90px;
    height: 34px;
  }
  .sidebar #logout {
    margin: 0;
    padding: 8px;
    font-size: 10px;
  }
  .sidebar nav {
    margin: 0;
  }
  .sidebar nav a {
    min-height: 40px;
    padding: 5px 3px;
    gap: 4px;
    font-size: 11px;
    flex-direction: row;
  }
  .sidebar nav a svg {
    width: 17px;
    height: 17px;
  }
  body[data-view="assistant"]:not(.auth-locked) {
    position: fixed;
    inset: auto 0;
    top: var(--chat-top, 0px);
    height: var(--chat-height, 100dvh);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    width: 100%;
  }
  body[data-view="assistant"]:not(.auth-locked) .sidebar {
    position: relative;
    top: auto;
    flex: none;
  }
  body[data-view="assistant"]:not(.auth-locked) .workspace {
    flex: 1;
    min-height: 0;
    height: auto;
    margin: 0;
    display: flex;
    flex-direction: column;
  }
  body[data-view="assistant"]:not(.auth-locked) main {
    padding: 0;
    width: 100%;
    flex: 1;
    min-height: 0;
  }
  body[data-view="assistant"] #assistant-page > .section-toolbar {
    min-height: 38px;
    margin: 0;
    padding: 8px 14px;
    display: block;
  }
  body[data-view="assistant"] #assistant-page > .section-toolbar h2 {
    font:
      16px DM,
      sans-serif;
  }
  .desktop-chat-title {
    display: none;
  }
  .mobile-chat-title {
    display: inline;
  }
  body[data-view="assistant"] .conversation-list,
  body[data-view="assistant"] #new-conversation {
    display: none;
  }
  body[data-view="assistant"] .chat-layout {
    grid-template-columns: minmax(0, 1fr);
    border: 0;
    border-radius: 0;
    height: auto;
    min-height: 0;
  }
  body[data-view="assistant"] #chat-messages {
    min-height: 0;
    max-height: none;
    padding: 14px 10px;
  }
  .chat-message {
    max-width: 94%;
    padding: 11px 13px;
  }
  .chat-message .answer {
    font-size: 14px;
  }
  .chat-message .answer h4 {
    font-size: 16px;
  }
}
@media (max-width: 380px) {
  .sidebar nav a {
    font-size: 10px;
    gap: 3px;
  }
  .sidebar nav a svg {
    width: 15px;
    height: 15px;
  }
}
@media (max-width: 620px) {
  .sidebar nav a {
    flex-direction: column;
    gap: 2px;
    min-height: 47px;
    padding: 4px 2px;
  }
  .sidebar nav a svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
  }
  .sidebar nav a .nav-text {
    font-size: 10px;
    line-height: 1.3;
  }
}

.chat-customers {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.chat-customers a {
  font-size: 12px;
  text-decoration: none;
  white-space: normal;
}
.conversation-list #more-conversations {
  text-align: center;
  color: #00658c;
}
/* Dashboard, compact customer workspace and shared mobile navigation. */
.sidebar nav .nav-logout {
  display: flex !important;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 16px;
  margin: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  position: static;
}
.sidebar nav .nav-logout[hidden] {
  display: none !important;
}
.nav-logout svg {
  width: 22px;
  height: 22px;
  flex: none;
}
.nav-logout:hover {
  background: #ffffff14;
}
body[data-view="clients"] .intro .lead,
body[data-view="clients"] .intro .eyebrow,
body[data-view="clients"] #database-count,
body[data-view="clients"] #sources {
  display: none !important;
}
#initial {
  padding: 35px 20px;
  min-height: 0;
}
#initial h2 {
  font-size: 18px;
}
body[data-view="clients"] .search-help {
  display: none;
}
#chat-context {
  flex: none;
  padding: 6px 10px;
  border-bottom: 1px solid #adc3d4;
  background: #eaf3fa;
  max-height: 115px;
  overflow: auto;
}
#chat-context .chat-customers {
  margin: 0;
  gap: 6px;
}
#chat-context a,
#chat-context button {
  font-size: 12px;
  padding: 6px 9px;
}
#chat-context[hidden] {
  display: none;
}
.dash-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 0 0 20px;
}
.dash-metric {
  display: flex;
  flex-direction: column;
  padding: 20px;
  background: #f8fcff;
  border: 1px solid #c1d6e5;
  border-radius: 14px;
  text-decoration: none;
  color: #153e59;
}
.dash-metric strong {
  font-size: 30px;
  font-weight: 500;
}
.dash-metric span {
  font-size: 13px;
  line-height: 1.4;
  margin-top: 5px;
}
.dash-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.dash-columns h2,
.topology-panel h2 {
  font-size: 21px;
}
.dash-stats {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dash-columns p {
  margin: 10px 0;
  font-size: 14px;
}
#dashboard-content > .panel {
  margin-top: 20px;
}
.topology-layout {
  display: grid;
  gap: 20px;
  margin-top: 16px;
}
.network-map {
  border-radius: 12px;
}
.network-detail {
  min-width: 0;
  overflow-wrap: anywhere;
}
.network-detail small {
  display: block;
  font-size: 12px;
  color: #567186;
}
.network-detail h3 {
  font-size: 20px;
}
.network-detail p {
  font-size: 14px;
}
.map-search input {
  margin-top: 5px;
}
#map-matches {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
@media (max-width: 850px) {
  .sidebar nav {
    display: grid !important;
    overflow-x: auto;
    width: 100%;
    scrollbar-width: thin;
  }
  .sidebar nav a,
  .sidebar nav .nav-logout {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    width: auto;
    padding: 7px 4px !important;
    font-size: 10px !important;
  }
  .sidebar nav a[hidden],
  .sidebar nav .nav-logout[hidden] {
    display: none !important;
  }
  .sidebar nav svg,
  .sidebar nav .nav-logout svg {
    width: 17px;
    height: 17px;
  }
  .dash-columns,
  .topology-layout {
    grid-template-columns: 1fr;
  }
  .dash-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dash-metric {
    padding: 13px;
  }
  .network-map {
    max-height: 470px;
  }
  /* En móvil el saludo y las opciones viven dentro del propio chat. */
  #assistant-page > .section-toolbar > h2,
  #chat-context {
    display: none;
  }
  #assistant-page > .section-toolbar {
    justify-content: flex-end;
  }
  #chat-context .secondary {
    flex-shrink: 0;
    white-space: normal;
  }
}
body[data-view="clients"] .search-box > p {
  display: none;
}
body[data-view="dashboard"] .intro .eyebrow,
body[data-view="dashboard"] .intro .lead,
body[data-view="dashboard"] #sources {
  display: none;
}
body[data-view="clients"] .intro {
  margin-bottom: 16px;
}
@media (max-width: 850px) {
  .sidebar nav {
    gap: 6px;
    overflow: visible;
  }
  .sidebar nav a,
  .sidebar nav .nav-logout {
    flex: 1 1 0;
    min-width: 0;
    white-space: normal;
  }
  .sidebar nav .nav-text {
    font-size: 12px;
    text-align: center;
    line-height: 1.3;
  }
  .sidebar nav .nav-logout {
    padding: 7px 2px !important;
  }
  .sidebar nav svg {
    flex: none;
  }
  #chat-context .chat-customers {
    flex-wrap: wrap;
    gap: 4px;
  }
  #chat-context .secondary {
    flex: 1 1 45%;
    min-width: 0;
    max-width: 100%;
    font-size: 11px;
    padding: 5px 7px;
  }
}
.results-layout:has(#results:empty) {
  grid-template-columns: 1fr;
}
.results-layout:has(#results:empty) .results-panel {
  display: none;
}
.detail {
  scroll-margin-top: 115px;
}
.reboot-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 20px 0;
}
.reboot-details dt {
  font-size: 12px;
  color: #587387;
}
.reboot-details dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
}
#reboot-dialog {
  max-width: 680px;
}
#reboot-dialog .actions {
  justify-content: flex-end;
}
@media (max-width: 500px) {
  .reboot-details {
    grid-template-columns: 1fr;
  }
}
.customer-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.customer-info-grid .panel {
  margin: 0;
}
.customer-info-grid h3 {
  font-size: 18px;
}
.contact-person {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 10px 0;
}
.contact-phone {
  font-size: 18px;
}
.customer-header {
  position: relative;
}
.customer-header > [data-air-diagnose] {
  margin-top: 16px;
}
.air-diagnostic-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0;
}
.air-diagnostic-toolbar h3 {
  font-size: 20px;
}
.air-route,
#detail .air-diagnostic-result ol.air-route {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(155px, 100%), 1fr));
  list-style: none;
  gap: 12px;
  padding: 10px 0;
}
.air-route li {
  flex: 0 0 155px;
  padding: 12px;
  background: #eef6fc;
  border: 1px solid #c0d8e7;
  border-radius: 10px;
  font-size: 12px;
}
.air-route li + li:before {
  content: "→";
  display: block;
  color: #0086af;
}
.air-route small {
  display: block;
  margin-top: 6px;
}
.latency-row {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) 2fr 95px;
  gap: 10px;
  align-items: center;
  font-size: 12px;
  margin: 12px 0;
}
.latency-row > span {
  overflow-wrap: anywhere;
}
.latency-track {
  height: 14px;
  background: #e5eff5;
  border-radius: 10px;
  overflow: hidden;
}
.latency-track i {
  display: block;
  height: 100%;
  background: #0089b4;
  border-radius: 10px;
}
.air-report .table-wrap table {
  min-width: 560px;
}
.air-report h4 {
  font-size: 16px;
}
.air-report .section-toolbar {
  flex-wrap: wrap;
}
@media (max-width: 620px) {
  .air-route, #detail .air-diagnostic-result ol.air-route { grid-template-columns: 1fr; }
  .air-route li + li:before { content: "↓"; }
  .customer-info-grid {
    grid-template-columns: 1fr;
  }
  .latency-row {
    grid-template-columns: 95px 1fr 72px;
    font-size: 11px;
  }
  .air-diagnostic-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
}
progress.latency-track {
  display: block;
  width: 100%;
  appearance: none;
  border: 0;
  background: #e5eff5;
}
progress.latency-track::-webkit-progress-bar {
  background: #e5eff5;
  border-radius: 10px;
}
progress.latency-track::-webkit-progress-value {
  background: #0089b4;
  border-radius: 10px;
}
progress.latency-track::-moz-progress-bar {
  background: #0089b4;
  border-radius: 10px;
}
body[data-view="updates"] .intro {
  display: none;
}
.air-report details summary {
  color: #245572;
  cursor: pointer;
}
.air-report details {
  margin-top: 16px;
}

/* Interactive topology: all assets and rendering stay inside the private portal. */
.topology-layout {
  align-items: start;
}
.network-map {
  max-height: none;
  padding: 0;
  border: 1px solid #c5d9e7;
  background: radial-gradient(circle, #cbdde9 1px, transparent 1px) 0 0/22px
    22px #f7fbfe;
  overflow: hidden;
}
.map-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px;
  background: #ffffffed;
  border-bottom: 1px solid #d7e5ee;
}
.map-controls .secondary {
  padding: 7px 13px;
  min-height: 36px;
}
.map-controls span {
  margin-left: auto;
  font-size: 12px;
  color: #567186;
}
.topology-canvas {
  display: block;
  width: 100%;
  touch-action: none;
  cursor: grab;
}
.topology-canvas:active {
  cursor: grabbing;
}
.topology-device {
  cursor: pointer;
  outline: none;
}
.device-tile {
  fill: #edf5fb;
  stroke: #90aabd;
}
.topology-device.online .device-tile {
  fill: #e5f5ef;
  stroke: #60ae91;
}
.topology-device.offline .device-tile {
  fill: #ffeded;
  stroke: #da6b73;
}
.device-state {
  fill: #92a6b5;
  stroke: white;
  stroke-width: 2;
}
.online .device-state {
  fill: #36a47d;
}
.offline .device-state {
  fill: #d95060;
}
.topology-device.selected .device-tile,
.topology-device:focus .device-tile,
.topology-device:hover .device-tile {
  stroke: #0085b0;
  stroke-width: 4;
}
.device-icon {
  fill: none;
  stroke: #31556d;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.device-name,
.device-address,
.device-core {
  text-anchor: middle;
  fill: #24475e;
  font-family: inherit;
  font-size: 12px;
  paint-order: stroke;
  stroke: #f7fbfe;
  stroke-width: 3px;
}
.device-address {
  fill: #617e91;
}
.device-core {
  font-size: 10px;
  fill: #0085ad;
  letter-spacing: 1px;
}
.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px;
  background: #ffffffed;
  font-size: 11px;
  color: #738896;
}
.map-legend .online {
  color: #268362;
}
.map-legend .offline {
  color: #bc4053;
}
.network-detail {
  background: #f8fcff;
  border: 1px solid #c5d9e7;
  border-radius: 14px;
  padding: 18px;
  overflow: auto;
}
.network-detail h3 {
  margin-top: 0;
}
.network-detail h4 {
  font-size: 14px;
  margin-top: 22px;
}
@media (max-width: 1100px) {
  .network-detail {
    max-height: 400px;
  }
}
@media (max-width: 600px) {
  .map-controls {
    padding: 8px;
  }
  .map-controls span {
    font-size: 10px;
  }
  .map-legend {
    gap: 8px;
  }
}
/* Keep a readable scale when expanding dense branches; overview is explicit. */
.map-links path {
  fill: none;
  stroke: #abc7d9;
  stroke-width: 1.2;
  opacity: 0.45;
}
.map-links .active-link {
  stroke: #0085b0;
  stroke-width: 2;
}
.device-name {
  font-size: 13px;
  stroke-width: 5px;
}
.device-address {
  font-size: 11px;
  stroke-width: 4px;
}
.device-tile {
  stroke-width: 2.5;
}
@media (max-width: 1100px) {
  .topology-layout {
    grid-template-columns: 1fr;
  }
  .topology-canvas {
    height: 560px;
  }
}
@media (max-width: 600px) {
  .topology-canvas {
    height: 440px;
  }
}
/* Star with paged equipment lists: fixed spacing and no crowded labels. */
.topology-layout {
  grid-template-columns: 1fr;
}
.topology-canvas {
  height: auto;
  aspect-ratio: 1120/820;
  min-height: 500px;
}
.network-detail {
  max-height: 380px;
}
.device-list-card {
  fill: #fff;
  stroke: #c5d9e7;
  stroke-width: 1.5;
}
.device-name.list-label,
.device-address.list-label {
  text-anchor: start;
  stroke: none;
}
.map-controls span {
  display: flex;
  align-items: center;
  gap: 7px;
}
.map-links .active-link {
  opacity: 0.5;
}
.cdr-downloads {
  display: grid;
  gap: 16px;
}
.cdr-download-row {
  display: grid;
  grid-template-columns: 166px minmax(0, 1fr);
  align-items: center;
  gap: 20px;
}
.cdr-download-row .secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  text-decoration: none;
}
.cdr-source-date {
  font-size: 14px;
  line-height: 1.5;
}
.cdr-source-date span {
  display: block;
  color: #486b80;
  font-size: 12px;
}
#activity-content {
  display: grid;
  gap: 24px;
}
#activity-content > .hint,
#activity-content > .dash-metrics {
  margin: 0;
}
#activity-content .panel > h2 {
  margin: 0 0 20px;
  font-size: 24px;
  line-height: 1.3;
}
#activity-content .panel > p {
  margin: 0;
  line-height: 1.6;
}
#activity-content .dash-metric strong {
  font-size: 22px;
  overflow-wrap: anywhere;
}
.activity-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.activity-pagination span {
  font-size: 14px;
  white-space: nowrap;
}
.activity-conversation-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
}
.activity-conversation-row + .activity-conversation-row {
  border-top: 1px solid var(--line);
}
.activity-conversation-row button {
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  text-align: left;
  justify-self: start;
  overflow-wrap: anywhere;
}
.activity-conversation-row small {
  font-size: 13px;
  color: #486b80;
}
#activity-conversation:not(:empty) {
  margin-top: 24px;
}
@media (max-width: 600px) {
  .cdr-download-row {
    grid-template-columns: 130px minmax(0, 1fr);
    gap: 12px;
  }
  .cdr-download-row .secondary {
    padding-inline: 10px;
  }
  .cdr-source-date { font-size: 13px; }
  .activity-pagination { justify-content: center; gap: 10px; }
  .activity-conversation-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}
#updates-upload {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
}
#updates-upload label {
  flex: 1;
  min-width: 240px;
}
#upload-result {
  flex-basis: 100%;
  margin: 0;
}
@media (max-width: 600px) {
  .topology-canvas {
    min-height: 440px;
  }
  .map-controls span {
    gap: 3px;
  }
  .map-controls .secondary {
    padding: 6px 9px;
  }
}
.device-name.list-label {
  font-size: 16px;
}
.device-address.list-label {
  font-size: 12px;
}

.chat-message h3 {
  text-transform: none;
}
#password-change {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
#password-change label {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
#password-change input {
  width: 100%;
  padding: 14px;
  border: 1px solid #b7d0e0;
  border-radius: 10px;
  background: white;
  color: #123248;
}
#password-change h2 {
  font-size: 24px;
}
#password-change p {
  font-size: 14px;
}
.activity-table {
  overflow: auto;
}
.activity-table td {
  font-size: 13px;
}
.activity-message {
  padding: 18px 0;
  border-bottom: 1px solid #d4e2ec;
}
.activity-message p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.activity-message small {
  font-size: 12px;
}
/* Ritmo compartido: controles utilizables y datos legibles en las vistas activas. */
.panel,
.detail-panel,
.record-item > div,
.section-toolbar > div {
  min-width: 0;
}
.primary,
.secondary,
.quiet,
.copy {
  min-height: 44px;
  font-size: 14px;
  line-height: 1.4;
}
.actions {
  gap: 12px;
}
.actions :is(button, a) {
  white-space: normal;
  text-align: center;
}
.section-toolbar {
  flex-wrap: wrap;
}
.section-toolbar h2 {
  font-size: 24px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.detail-panel > form {
  margin-block: 24px;
}
.detail-panel > form .actions {
  margin-top: 20px;
}
.form-grid + button,
.form-grid + .hint {
  margin-top: 20px;
}
.filter-bar input,
.filter-bar select,
.form-grid input,
.form-grid select,
.form-grid textarea {
  font-size: 16px;
  min-height: 44px;
}
.fields dt,
.hint,
.section-note,
.service-top .eyebrow {
  font-size: 12px;
  line-height: 1.5;
}
.fields dd,
.contact,
.service-top p {
  font-size: 14px;
  line-height: 1.6;
}
.badge {
  font-size: 12px;
  white-space: normal;
}
.dash-columns .panel h2 {
  margin-top: 0;
}
.dash-columns .panel h3 {
  margin-block: 24px 12px;
  font-size: 18px;
}
#updates-upload label {
  display: grid;
  gap: 10px;
  min-width: min(240px, 100%);
}
#updates-upload {
  align-items: flex-end;
}
#updates-upload input[type="file"] {
  font-size: 14px;
}
#updates-page .panel > h3 {
  margin-top: 0;
  margin-bottom: 20px;
}
.map-controls {
  flex-wrap: wrap;
  gap: 8px;
}
.map-controls span {
  flex-wrap: wrap;
}
.map-controls .secondary {
  min-width: 44px;
  min-height: 44px;
}
.record-item h3,
.record-item p,
.team-person {
  overflow-wrap: anywhere;
}
@media (max-width: 850px) {
  .sidebar nav {
    grid-template-columns: repeat(8, minmax(0, 1fr));
    align-items: stretch;
  }
  .sidebar nav a,
  .sidebar nav .nav-logout {
    min-height: 52px;
    padding: 8px 4px !important;
    font-size: 12px !important;
    gap: 6px;
  }
  .sidebar nav a .nav-text {
    font-size: 12px;
    line-height: 1.3;
  }
  .sidebar nav .nav-logout {
    margin: 0;
    width: 100%;
  }
  .sidebar nav a svg,
  .sidebar nav .nav-logout svg {
    width: 20px;
    height: 20px;
  }
  .detail,
  .detail-panel {
    scroll-margin-top: 190px;
  }
}
@media (max-width: 600px) {
  .sidebar nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .sidebar nav a,
  .sidebar nav .nav-logout {
    min-height: 50px;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    font-size: 12px !important;
    padding: 8px 5px !important;
  }
  .sidebar nav a .nav-text {
    font-size: 12px;
    text-align: center;
  }
  .sidebar nav a svg,
  .sidebar nav .nav-logout svg {
    width: 16px;
    height: 16px;
  }
  .section-toolbar h2 {
    font-size: 22px;
  }
  .section-toolbar > .actions {
    width: 100%;
  }
  .section-toolbar > .actions > * {
    flex: 1;
  }
  .panel,
  .detail-panel {
    padding: 20px 16px;
  }
  .record-item {
    gap: 18px;
  }
  .record-item > button {
    align-self: flex-start;
  }
  .pagination {
    gap: 12px;
    margin-top: 16px;
  }
  .pagination > span {
    text-align: center;
  }
  dialog {
    padding: 20px 16px;
  }
}

/* Listados operativos y cabeceras de sección. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
body:is([data-view="tickets"], [data-view="review"], [data-view="updates"]) .intro :is(.eyebrow, .lead),
body:is([data-view="tickets"], [data-view="review"], [data-view="updates"]) #sources {
  display: none;
}
body[data-view="updates"] .intro { display: flex; }
body:not(.auth-locked) main .intro #page-title,
body[data-view="assistant"] #assistant-page > .section-toolbar h2 {
  font: 40px/1.2 Electrolize, sans-serif;
  margin: 0;
}
#chat-messages:has(> .chat-greeting) {
  display: grid;
  place-items: center;
}
.chat-greeting {
  width: 100%;
  padding: 24px;
  text-align: center;
  overflow-wrap: anywhere;
}
.chat-greeting h3 {
  margin: 0;
  font: 36px/1.4 Electrolize, sans-serif;
  color: #315b73;
}
.chat-greeting span { color: #007fa6; }
#results-layout { display: block; }
#results-layout[hidden] { display: none; }
#results-layout .results-panel { width: 100%; }
#results-layout.show-customer .results-panel { display: none; }
#back-to-clients { margin-bottom: 20px; }
.client-list-head,
.client-row {
  display: grid;
  grid-template-columns: 1.15fr .9fr 1.25fr 1.2fr;
  gap: 20px;
  align-items: start;
  width: 100%;
  text-align: left;
}
.client-list-head {
  padding: 12px 18px;
  font-size: 12px;
  color: #486b80;
  background: #f1f7fb;
}
.client-row {
  padding: 18px;
  border: 0;
  border-bottom: 1px solid #d4e2ec;
  border-radius: 0;
  background: white;
  color: #173e56;
  font-size: 14px;
  line-height: 1.5;
  white-space: normal;
}
.client-row:hover, .client-row:focus-visible { background: #edf8fc; }
.client-row > span { min-width: 0; overflow-wrap: anywhere; }
.client-row strong { font-size: 15px; font-weight: 600; }
.client-row small { display: block; color: #527386; font-size: 12px; }
#results-layout .pagination { padding: 16px 18px; margin: 0; }
.review-rows {
  background: white;
  border: 1px solid #d4e2ec;
  border-radius: 16px;
  overflow: hidden;
}
.review-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr) minmax(100px, .6fr) auto;
  align-items: center;
  gap: 18px;
  padding: 16px 20px;
}
.review-row + .review-row { border-top: 1px solid #d4e2ec; }
.review-row > div { min-width: 0; overflow-wrap: anywhere; }
.review-row-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.review-row h3 { margin: 0; font: 15px/1.4 DM, sans-serif; font-weight: 600; }
.review-row p { margin: 6px 0 0; font-size: 14px; }
.review-meta, .review-state { display: grid; gap: 4px; font-size: 14px; }
.review-row small { color: #527386; font-size: 12px; line-height: 1.5; }
@media (max-width: 1100px) {
  .review-row { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
  .review-row > button { justify-self: end; }
}
@media (max-width: 850px) {
  body:not(.auth-locked) main .intro #page-title,
  body[data-view="assistant"] #assistant-page > .section-toolbar h2 { font-size: 30px; }
  .chat-greeting h3 { font-size: 30px; }
  body[data-view="assistant"] #assistant-page > .section-toolbar { padding-block: 14px; }
  .client-list-head { display: none; }
  .client-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px 20px; }
  .client-name { grid-column: 1 / -1; }
  .client-row [data-label]::before { content: attr(data-label); display: block; font-size: 12px; color: #527386; margin-bottom: 3px; }
  .client-row [data-label="Servicios contratados"] { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .review-row { gap: 12px; padding: 14px; }
  .review-main { grid-column: 1 / -1; }
  .review-meta { grid-column: 1 / -1; }
  .review-row > button { font-size: 13px; padding-inline: 12px; }
  .chat-greeting { padding: 16px; }
}
body[data-view="services"] .intro :is(.eyebrow, .lead),
body[data-view="services"] #sources { display: none; }
.services-back { display: inline-block; margin-bottom: 20px; color: #174b68; }
.service-directory-head,.service-directory-row {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1.3fr .8fr;
  gap: 20px;
  align-items: start;
  text-align: left;
  width: 100%;
}
.service-directory-head { padding: 14px 18px; background: #f1f7fb; color: #486b80; font-size: 12px; }
.service-directory-row {
  padding: 18px;
  border: 0;
  border-bottom: 1px solid #d4e2ec;
  border-radius: 0;
  background: white;
  color: #173e56;
  white-space: normal;
  font-size: 14px;
  line-height: 1.5;
}
.service-directory-row:hover,.service-directory-row:focus-visible { background: #edf8fc; }
.service-directory-row span { min-width: 0; overflow-wrap: anywhere; }
.service-directory-row small { display: block; font-size: 12px; color: #527386; margin-top: 4px; }
.service-directory-detail { margin-top: 20px; }
.service-directory-detail .fields { margin-block: 20px; }
.service-directory-detail > h3 { margin-top: 24px; }
.service-review-link { display: flex; gap: 16px; justify-content: space-between; align-items: center; padding-block: 12px; border-bottom: 1px solid var(--line); }
.service-review-link span { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 850px) {
  .service-directory-head { display: none; }
  .service-directory-row { grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 16px; }
  .service-directory-row > span:first-child { grid-column: 1/-1; }
  .service-directory-row [data-label]::before { content: attr(data-label); display: block; color: #527386; font-size: 12px; margin-bottom: 4px; }
  .service-review-link { flex-wrap: wrap; }
}
#services-search { margin-bottom: 24px; }
#services-list-shell .results-title { margin-bottom: 14px; gap: 12px; }
.service-directory-detail :is(p, dd) { overflow-wrap: anywhere; }
/* Customer record: identity first, consistent labels and clear sections. */
@media (min-width: 851px) {
  .sidebar nav { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow-y: auto; padding-bottom: 2px; }
  .sidebar nav > a { flex-shrink: 0; }
  .sidebar nav #logout { margin-top: auto; flex-shrink: 0; position: relative; }
  .sidebar nav #logout::before { content: ''; position: absolute; top: -13px; left: 0; right: 0; border-top: 1px solid #315165; }
  .sidebar nav > a:last-of-type { margin-bottom: 32px; }
}
.sidebar nav :is(a,#logout):hover,
.sidebar nav #logout:focus-visible { background: #16485f; color: #fff; box-shadow: inset 3px 0 #00dfff; }
#detail .customer-header { background: #fff; border: 1px solid #d4e2ec; border-radius: 18px; padding: 28px; margin: 0 0 20px; box-shadow: 0 4px 18px #173e5606; }
.customer-heading { display: grid; grid-template-columns: max-content minmax(0,1fr); align-items: center; text-align: left; gap: 16px; }
.customer-avatar { width: 60px; height: 60px; display: grid; place-items: center; border-radius: 50%; color: #476175; background: #eef4f8; border: 1px solid #d8e4ed; font-size: 18px; font-weight: 650; white-space: nowrap; padding: 6px; }
.customer-avatar[data-size="medium"] { width: 76px; border-radius: 16px; font-size: 14px; }
.customer-avatar[data-size="wide"] { width: 112px; border-radius: 16px; font-size: 12px; }
.customer-avatar-active { background: #e1f3e8; color: #245b3b; border-color: #c4e3d1; }
.customer-avatar-inactive { background: #f9e4e5; color: #823b43; border-color: #edced1; }
.customer-name { min-width: 0; width: 100%; }
.customer-section-label { color: #58758a; font-size: 11px; font-weight: 650; letter-spacing: .7px; text-transform: uppercase; margin: 0 0 8px; }
#detail .customer-header h2 { font: 600 clamp(16px,2.2vw,30px)/1.3 DM,sans-serif; letter-spacing: -.5px; color: #123248; margin: 0; }
.customer-identity { display: grid; grid-template-columns: minmax(120px,1fr) minmax(0,3fr); align-items: center; gap: 24px; padding-top: 22px; margin: 24px 0 0; border-top: 1px solid #e1eaf0; }
.customer-identity > div { min-width: 0; }
.customer-identity dt, .customer-contact-list dt, #detail .fields dt { font-size: 12px; color: #58758a; margin-bottom: 6px; }
.customer-identity dd { margin: 0; font-size: 15px; font-weight: 550; color: #173e56; overflow-wrap: anywhere; }
.customer-postal dd { line-height: 1.6; }
#detail .service-postal { margin: 0 0 22px; font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; }
#detail .customer-fiber .service-top { align-items: flex-start; flex-wrap: wrap; }
#detail .customer-fiber .service-top > div { min-width: 0; flex: 1 1 140px; }
#detail .customer-fiber .number { white-space: nowrap; font-size: clamp(21px,3.5vw,25px); letter-spacing: 0; }
#detail .fiber-ot { display: inline-flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; max-width: 100%; min-height: 44px; margin: 0; padding: 10px 12px; border: 1px solid #b9d9ea; border-radius: 10px; background: #e5f3fc; color: #00658c; font: 600 13px/1.4 DM,sans-serif; text-align: left; white-space: normal; flex: 0 1 auto; }
#detail .fiber-ot { margin-left: auto; }
#detail .fiber-ot[data-copy-confirmed] { background: #e1f3e8; color: #245b3b; border-color: #c4e3d1; }
.customer-postal dt, .customer-copy-status { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
#detail .fiber-ot span { min-width: 0; overflow-wrap: anywhere; }
#detail .fiber-ot svg { width: 18px; height: 18px; flex: none; }
:is(#detail,#service-detail,#services-list) .customer-mobile-services { display: grid; gap: 20px; }
:is(#detail,#service-detail,#services-list) .mobile-line { min-width: 0; padding: 20px; border: 1px solid #d4e2ec; background: #fff; border-radius: 14px; }
:is(#detail,#service-detail,#services-list) .mobile-line header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 18px; }
:is(#detail,#service-detail,#services-list) .mobile-number { font: 600 20px/1.4 DM,sans-serif; white-space: nowrap; letter-spacing: 0; }
:is(#detail,#service-detail,#services-list) .mobile-line time, :is(#detail,#service-detail,#services-list) .mobile-bundle time { font-size: 13px; white-space: nowrap; color: #58758a; }
:is(#detail,#service-detail,#services-list) .mobile-product { margin: 12px 0 0; overflow-wrap: anywhere; }
:is(#detail,#service-detail,#services-list) .mobile-quota { margin: 12px 0 0; }
:is(#detail,#service-detail,#services-list) .mobile-line .hint:last-child { margin-bottom: 0; }
:is(#detail,#service-detail,#services-list) .mobile-bundle { margin-bottom: 0; }
:is(#detail,#service-detail,#services-list) .mobile-bundle .service-top { flex-wrap: wrap; gap: 16px; }
:is(#detail,#service-detail,#services-list) .mobile-bundle h3 { margin: 0 0 10px; font-size: 18px; overflow-wrap: anywhere; }
:is(#detail,#service-detail,#services-list) .mobile-bundle .service-top > div { min-width: 0; flex: 1 1 140px; }
:is(#detail,#service-detail,#services-list) .bundle-price { font-size: 16px; color: #00658c; }
:is(#detail,#service-detail,#services-list) .bundle-price small { display: block; font-size: 11px; font-weight: 400; margin-top: 6px; color: #58758a; }
:is(#detail,#service-detail,#services-list) .mobile-bundle .service-body { display: grid; gap: 16px; }
:is(#detail,#service-detail,#services-list) .mobile-bundle .mobile-line { padding: 16px; }
#detail .customer-air-product { margin-bottom: 24px; }
#detail .customer-air-product h3 { margin: 0 0 18px; font-size: 19px; }
#detail .air-diagnostic-toolbar { margin-bottom: 24px; }

#detail .tabs { background: #e5eff6; border: 1px solid #ccdce7; border-radius: 12px; padding: 5px; gap: 5px; margin: 0 0 24px; }
#detail .tab { min-height: 44px; padding: 10px 20px; border: 0; border-radius: 8px; color: #42637a; font: 550 14px DM,sans-serif; }
#detail .tab:hover { background: #f3f8fb; color: #005e86; }
#detail .tab[aria-selected=true] { background: #fff; color: #00658c; box-shadow: 0 2px 6px #12324812; }
#detail .customer-info-grid { gap: 20px; }
#detail .customer-info-card { padding: 24px; border-radius: 14px; }
#detail .customer-info-card h3 { font: 600 18px/1.4 DM,sans-serif; margin: 0 0 24px; color: #173e56; }
#detail .fields { gap: 22px 24px; }
#detail .fields dd { font-size: 14px; line-height: 1.6; }
.customer-contact-list { margin: 0; display: grid; gap: 20px; }
.customer-contact-list dd { margin: 0; font-size: 15px; overflow-wrap: anywhere; }
.customer-contact-list a, .customer-contacts-grid a { color: #00658c; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.customer-other-contacts { grid-column: 1/-1; }
.customer-contacts-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px 24px; }
#detail .contact-person { border-top: 1px solid #e1eaf0; padding: 16px 0 0; font-size: 14px; overflow-wrap: anywhere; }
#detail .support-source { margin: 20px 4px 0; color: #58758a; font-size: 12px; }
@media (max-width: 850px) {
  .sidebar nav #logout { border-left: 1px solid #315165; border-radius: 0 10px 10px 0; }
  #detail .customer-header { padding: 20px; }
  .customer-heading { gap: 12px; }
  .customer-heading > button { margin-top: 4px; }
  .customer-identity { gap: 18px; }
}
@media (max-width: 500px) {
  .customer-avatar { width: 52px; height: 52px; font-size: 16px; }
  .customer-identity { grid-template-columns: minmax(0,1fr); }
  .customer-identity > div:last-child { grid-column: 1/-1; }
  #detail .mobile-line { padding: 16px; }
  #detail .mobile-bundle .service-body { padding: 14px; }
  #detail .mobile-bundle .mobile-line { padding: 12px; }
  #detail .customer-info-grid, .customer-contacts-grid { grid-template-columns: minmax(0,1fr); }
  #detail .customer-info-card { padding: 20px; }
  #detail .tab { padding-inline: 10px; font-size: 13px; }
}

body[data-view="activity"] #sources { display: none; }

/* App installation and remembered access. */
.login label.remember-device {display:flex;align-items:center;gap:10px;font-size:13px;font-weight:400;line-height:1.5;margin:16px 0;}
.login .remember-device input {width:18px;height:18px;margin:0;flex:0 0 18px;accent-color:#167c83;}
.sidebar .nav-install {color:#c6e3e8;background:transparent;border:1px solid #365362;border-radius:8px;padding:12px;text-align:left;cursor:pointer;font:inherit;}
.sidebar .nav-install:hover,.sidebar .nav-install:focus-visible {background:#16485f;color:white;}
@media (display-mode: fullscreen) {
 body {padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom);}
}
#passkey-login-box {margin-top:24px;padding-top:20px;border-top:1px solid #365362;}
#passkey-login-box button {width:100%;}
#security-dialog {width:min(560px,calc(100vw - 24px));max-height:90dvh;overflow:auto;padding:24px;border:1px solid #365362;border-radius:18px;background:#002d44;color:#eef7fa;}
#security-dialog::backdrop {background:#00121cbb;}
.security-heading,.passkey-row {display:flex;align-items:center;justify-content:space-between;gap:16px;}
.passkey-row {padding:10px 0;border-bottom:1px solid #365362;overflow-wrap:anywhere;}
#passkey-register {display:grid;gap:14px;margin:24px 0;}
#passkey-register label {display:grid;gap:6px;}
#passkey-register input {width:100%;min-width:0;padding:12px;background:#001a26;color:white;border:1px solid #365362;border-radius:8px;}
#security-message {margin:12px 0;}
#security-dialog .quiet {color:#75dded;}
#security-dialog .quiet:hover {color:white;background:#16485f;}
/* Personal profile, shared by installed and browser versions. */
#profile-nav .nav-text {display:block;min-width:0;}
#profile-nav #profile-nav-name {display:block;margin:3px 0 0;padding:0;border:0;background:none;color:#9cbcc9;font-size:11px;max-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
body[data-view="profile"] #sources {display:none;}
.profile-heading {display:flex;align-items:center;gap:18px;margin:12px 0 28px;}
#profile-avatar {width:clamp(78px,9vw,92px);height:clamp(78px,9vw,92px);border-radius:22px;display:grid;place-items:center;background:#dff1fa;color:#00658c;font-size:24px;font-weight:700;flex:none;}
.profile-heading h2 {margin:0 0 6px;font-size:28px;overflow-wrap:anywhere;}
.profile-heading p {margin:0;}
.profile-heading .eyebrow {color:#00658c;margin-bottom:6px;}
.profile-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px;align-items:start;}
.profile-card {background:white;border:1px solid #d4e2ec;border-radius:16px;padding:26px;min-width:0;}
.profile-card h2 {font-size:20px;margin-top:0;}
.profile-card p {color:#506a7b;}
.profile-card form {display:grid;gap:16px;margin-top:22px;}
.profile-card label {display:grid;gap:7px;color:#254558;font-size:14px;font-weight:600;}
.profile-card input {width:100%;min-width:0;border:1px solid #bbcfdc;border-radius:9px;padding:12px;background:#f8fbfd;color:#183b50;}
.profile-card button {justify-self:start;}
.profile-card .profile-hint {font-size:12px;margin:0;}
.profile-facts {display:grid;grid-template-columns:1fr 1fr;gap:16px;}
.profile-facts dt {font-size:12px;color:#617a8b;}
.profile-facts dd {margin:4px 0 0;overflow-wrap:anywhere;}
.profile-access {grid-column:1 / -1;}
.profile-access details {padding:16px 0;}
.profile-access summary {font-weight:600;color:#00658c;cursor:pointer;}
.profile-access details>p {margin-top:14px;}
.profile-access hr {border:0;border-top:1px solid #d4e2ec;margin:20px 0;}
.profile-card #passkey-register input {background:#f8fbfd;border-color:#bbcfdc;color:#183b50;}
.profile-card .passkey-row {border-color:#d4e2ec;}
@media(max-width:700px){.profile-grid {grid-template-columns:1fr;}.profile-card{padding:20px;}.profile-heading h2{font-size:23px;}}
@media(display-mode:standalone),(display-mode:fullscreen),(display-mode:minimal-ui){#install-app{display:none!important;}}
.sidebar nav .mobile-brand {display:none!important;}
#profile-nav #profile-nav-name {display:block;color:inherit;font-size:inherit;margin:0;max-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
#profile-nav-photo {object-fit:cover;border-radius:50%;width:22px;height:22px;}
#profile-avatar img {width:100%;height:100%;border-radius:inherit;object-fit:cover;}
.profile-photo-actions {display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:20px 0;}
.profile-photo-actions p {flex-basis:100%;font-size:13px;}
.profile-photo-actions label {cursor:pointer;}
.forgot-password {display:inline-block;margin-top:16px;font-size:13px;}
/* Clip native scrollbar tracks to the modal outline as well as its content. */
dialog {
  clip-path: inset(0 round 18px);
}

/* Shared spacing for the operational portal, including the mobile composer. */
.section-toolbar{gap:16px;align-items:center}
.panel h3,.detail-panel h3{margin-top:24px;margin-bottom:12px}
.panel p,.detail-panel p{line-height:1.55}
.form-grid{column-gap:20px;row-gap:12px}
.export-toolbar{display:flex;justify-content:flex-end;margin-bottom:16px}
.export-toolbar a[hidden]{display:none}
#chat-file-preview:empty{display:none}
#chat-file-preview{width:100%;display:flex;gap:8px;flex-wrap:wrap}
.chat-file-chip{display:flex;align-items:center;gap:8px;background:#edf6fc;border-radius:12px;padding:6px 10px;max-width:100%;min-width:0}
.chat-file-chip span{overflow-wrap:anywhere;min-width:0}
.chat-file-chip img{width:44px;height:44px;object-fit:cover;border-radius:6px}
@media(max-width:600px){
 .section-toolbar{gap:12px}.form-grid{gap:12px}
 .export-toolbar{justify-content:stretch}.export-toolbar a{width:100%;text-align:center}
 .panel,.detail-panel{overflow-wrap:anywhere}
 .record-item,.form-grid>*{min-width:0}
}

/* Continue the installed app's native launch screen during authentication. */
.app-splash{display:none;position:fixed;inset:0;z-index:10000;background:#001a26;align-items:center;justify-content:center;flex-direction:column;padding:24px;box-sizing:border-box;color:#fff}
.app-splash>img{width:min(68vw,300px);height:auto;animation:avanss-launch-zoom 650ms ease-out both}
.app-splash [hidden]{display:none!important}
#splash-actions{position:absolute;bottom:max(36px,env(safe-area-inset-bottom));left:24px;right:24px;display:flex;align-items:center;flex-direction:column;gap:12px;text-align:center}
#splash-message{max-width:320px;font-size:14px;line-height:1.5}
.app-splash-active #login-panel,.app-splash-active #error,.app-splash-active .sidebar,.app-splash-active #app{visibility:hidden}
.app-splash-active .app-splash:not([hidden]){display:flex}
@media(display-mode:standalone),(display-mode:fullscreen),(display-mode:minimal-ui){.app-splash:not([hidden]){display:flex}}
@keyframes avanss-launch-zoom{from{transform:scale(.82);opacity:.75}to{transform:scale(1);opacity:1}}
@media(prefers-reduced-motion:reduce){.app-splash>img{animation:none}}
.app-splash:focus{outline:none}
@media(max-height:500px){
 .app-splash:has(#splash-actions:not([hidden])){justify-content:flex-start;padding-top:12px}
 .app-splash:has(#splash-actions:not([hidden]))>img{width:110px}
 #splash-actions{bottom:12px;gap:8px}
 #splash-message{margin:0;font-size:13px}
}
/* Actions reserve their own line height, including links styled as buttons. */
a.secondary,a.primary{display:inline-flex;align-items:center;justify-content:center;text-decoration:none}
.primary,.secondary,.quiet,.copy{max-width:100%;box-sizing:border-box;white-space:normal;overflow-wrap:anywhere;line-height:1.4;height:auto}
.actions,.provider-actions{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin-block:16px}
.actions>*{min-width:0;max-width:100%;margin:0}
.provider-panel{min-width:0}.provider-panel>form{margin-top:24px}
.provider-panel h3,.provider-panel h4{overflow-wrap:anywhere}
#ticket-metrics button.metric{font:inherit;text-align:left;cursor:pointer;min-width:0}
#ticket-metrics button.metric[aria-pressed=true]{outline:2px solid #0083a8;outline-offset:-2px;background:#e6f6fc}
html.detail-modal-open{overflow:hidden}
dialog.record-dialog{width:min(1040px,calc(100vw - 32px));max-width:none;max-height:calc(100dvh - 32px);padding:0;border:1px solid #cadce7;border-radius:18px;background:#fff;color:#15384c;overflow:hidden;box-sizing:border-box}
dialog.record-dialog[open]{display:flex;flex-direction:column}
.record-dialog-header{display:flex;align-items:center;justify-content:space-between;gap:16px;flex:none;padding:16px 22px;border-bottom:1px solid #dce8ef;background:#fff}
.record-dialog-header h2{margin:0;font-size:22px;min-width:0;overflow-wrap:anywhere}
.record-dialog-header button{flex:none;min-height:44px}
.record-dialog-body{min-height:0;overflow:auto;overscroll-behavior:contain;padding:22px;scrollbar-gutter:stable;overflow-wrap:anywhere}
.record-dialog-body>div,.record-dialog-body>section{min-width:0}
.record-dialog-body .detail-panel{margin:0;padding:0;border:0;box-shadow:none}
.record-dialog-body .section-toolbar{flex-wrap:wrap}
.record-dialog-body .panel{margin-block:20px}
.record-dialog-body .fields{min-width:0}
.record-dialog-body .badge{white-space:normal}
.record-dialog-body .provider-actions>*{flex:1 1 240px;min-height:44px}
.dialog-error{background:#fff0ed;color:#852e21;padding:14px;border-radius:12px}
@media(max-width:600px){
 dialog.record-dialog{width:calc(100vw - 16px);max-height:calc(100dvh - 16px)}
 .record-dialog-header{padding:12px;gap:8px}.record-dialog-header h2{font-size:19px}
 .record-dialog-body{padding:16px}.record-dialog-body .panel{padding:16px}
 .record-dialog-body .fields,.record-dialog-body .form-grid{grid-template-columns:minmax(0,1fr)}
 .record-dialog-body .actions>*{flex:1 1 100%}
 .record-dialog-body .service-top,.record-dialog-body .service-bottom{flex-wrap:wrap;padding:16px}
 .record-dialog-body .service-bottom>span{max-width:100%}
 .record-dialog-body .ot-block{flex-wrap:wrap}
}

/* Employee activity filters */
#activity-content .activity-employee { text-align: left; font: inherit; color: inherit; cursor: pointer; }
#activity-content .activity-employee:hover { border-color: #007f91; }
#activity-content .activity-employee[aria-pressed="true"] { border-color: #007f91; background: #eaf7f8; box-shadow: inset 0 0 0 1px #007f91; }
#activity-content .activity-employee:focus-visible { outline: 3px solid #007f91; outline-offset: 3px; }
/* Desktop navigation fits the viewport; all entries including logout stay visible. */
@media(min-width:851px){
 .sidebar{height:100dvh;padding:clamp(10px,2.4vh,28px) 18px;overflow:hidden}
 .sidebar .brand{flex:none}.sidebar .brand img{height:clamp(32px,6.5vh,60px);width:auto;max-width:100%}
 .sidebar .brand>span,.sidebar .nav-label{margin-top:clamp(6px,1.8vh,16px);margin-bottom:clamp(4px,1vh,10px)}
 .sidebar nav{gap:clamp(2px,.65vh,7px);overflow:visible;padding:0;justify-content:flex-start}
 .sidebar nav>a,.sidebar nav #logout{min-height:0;height:clamp(26px,5.1vh,50px);padding:clamp(3px,.8vh,11px) 12px;flex-shrink:1;font-size:clamp(11px,1.6vh,14px)}
 .sidebar nav>a:last-of-type{margin-bottom:clamp(8px,2vh,20px)}
 .sidebar nav #logout{margin-top:auto}.sidebar nav #logout::before{top:-5px}
 .sidebar nav a svg,.sidebar nav #logout svg{width:18px;height:18px}
}

/* Ayuda shares the dashboard shortcuts on mobile and the sidebar on desktop. */
.help-dashboard-link{display:none}
.dashboard-shortcut strong{display:flex;align-items:center;gap:8px;min-width:0;font-size:18px}
.dashboard-shortcut svg{width:22px;height:22px;flex:none}
button.dashboard-shortcut{font:inherit;text-align:left;cursor:pointer;min-width:0}
.review-count-row{display:flex;justify-content:flex-end;margin:0 0 12px}
.review-count{font-size:14px;font-weight:600;color:#31566b}
#chat-attach,#chat-take-photo{display:grid;place-items:center;min-width:44px;min-height:44px;padding:10px}
#chat-attach svg,#chat-take-photo svg{width:23px;height:23px;display:block}
@media(max-width:850px){
 .help-dashboard-link{display:flex}
 .dashboard-shortcut strong{font-size:clamp(18px,5vw,24px);gap:6px}
 .dashboard-shortcut svg{width:24px;height:24px}
 .dashboard-shortcut{justify-content:center;min-height:106px}
}

.priority-loss-dates{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:20px 0}.priority-loss-dates dt{font-size:14px;color:var(--muted)}.priority-loss-dates dd{margin:6px 0 0;font-weight:600}.priority-loss-panel{overflow-wrap:anywhere}.priority-loss-panel details{margin-top:16px}.priority-loss-panel button{margin-top:16px}@media(max-width:600px){.priority-loss-dates{grid-template-columns:1fr;gap:12px}}

.priority-loss-panel details>summary{color:#00557b;font-weight:600}

/* Consultas composer: WhatsApp Android geometry, Avanss theme, without emojis. */
.chat-main #ask-form{flex:none;display:flex;flex-direction:column;gap:8px;min-width:0;margin:0;padding:6px 6px max(6px,env(safe-area-inset-bottom));border:0;border-radius:0;background:#eaf2f8}
#ask-form .chat-question-label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
#ask-form .chat-model{align-self:flex-end;display:flex;align-items:center;gap:8px;margin:0;font-size:11px;color:#526b79}
#ask-form .chat-model select{max-width:160px;margin:0;padding:6px 10px;border-radius:12px;background:#fff;font-size:11px}
.chat-composer-row{display:flex;align-items:flex-end;gap:6px;width:100%;min-width:0}
.chat-input-shell{display:flex;align-items:flex-end;flex:1;min-width:0;min-height:48px;background:#fff;border-radius:26px;box-shadow:0 1px 2px #0002;padding-right:4px}
.chat-input-shell:focus-within{box-shadow:0 0 0 2px #007caa30,0 1px 2px #0002}
.chat-main #ask-form #question{flex:1;min-width:0;width:0;min-height:48px;max-height:110px;margin:0;padding:12px 4px 12px 16px;border:0;border-radius:26px;background:transparent;color:#1f2c34;resize:none;font:16px/24px DM,system-ui,sans-serif;overflow-y:auto;box-shadow:none}
.chat-main #ask-form #question:focus-visible{outline:0}
.chat-main #ask-form #question::placeholder{color:#667781;opacity:1}
#ask-form .chat-attachments{display:flex;align-items:center;flex:none;gap:0;padding:2px 0}
#ask-form .chat-attachments button{display:flex;align-items:center;justify-content:center;flex:none;width:44px;height:44px;min-height:44px;margin:0;padding:0;border:0;border-radius:50%;background:transparent;color:#667781}
#ask-form .chat-attachments button:hover{background:#edf2f5;color:#1f2c34}
#ask-form .chat-attachments svg{display:block;width:24px;height:24px}
#ask-form .chat-round-action{display:flex;align-items:center;justify-content:center;flex:none;width:48px;height:48px;min-height:48px;margin:0;padding:0;border:0;border-radius:50%;background:var(--cyan);color:#fff;box-shadow:none}
#ask-form .chat-round-action svg{display:block;width:24px;height:24px}
#ask-form .chat-round-action:hover{filter:brightness(.94)}
#ask-form #chat-microphone .chat-stop-icon,#ask-form #chat-microphone[aria-pressed="true"] .chat-mic-icon{display:none}
#ask-form #chat-microphone[aria-pressed="true"] .chat-stop-icon{display:block}
#chat-microphone[aria-pressed="true"]{box-shadow:0 0 0 3px #007caa30}
#chat-voice-status{margin:0 8px;font-size:12px;line-height:1.5;color:#34576e}
@media(max-width:850px){#ask-form .chat-model{display:none}.chat-main #ask-form{padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right));}.chat-main #ask-form #question:placeholder-shown{white-space:nowrap;}}

/* Explicit new chat and mobile history. Messages/files never enter offline caches. */
body[data-view="assistant"] #assistant-page>.chat-toolbar{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;gap:4px;min-height:44px;padding:0 8px;margin:0;flex:none}
body[data-view="assistant"] #new-conversation,.chat-tool{display:inline-flex;align-items:center;justify-content:center;flex:none;width:44px;height:44px;min-height:44px;margin:0;padding:10px;border:0;border-radius:12px;background:transparent;color:#00658c;cursor:pointer}
.chat-tool svg{width:20px;height:20px;flex:none}.chat-tool:hover{background:#dcecf5}.chat-tool:focus-visible{outline:2px solid #00658c;outline-offset:-3px}.chat-tool:disabled{opacity:.45}
#chat-history-dialog{position:fixed;inset:0 auto 0 0;margin:0;width:min(300px,88vw);height:100dvh;max-height:100dvh;max-width:88vw;padding:0;border:0;border-radius:0 18px 18px 0;background:#edf4f9;overflow:hidden;box-sizing:border-box}
#chat-history-dialog[open]{display:flex;flex-direction:column}#chat-history-dialog::backdrop{background:#001d2e70}
#chat-history-dialog>header{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:max(10px,env(safe-area-inset-top)) 12px 8px;border-bottom:1px solid #bfd0da;flex:none}
#chat-history-dialog h2{margin:0;font:18px DM,system-ui,sans-serif}#chat-history-dialog .conversation-list{display:block;flex:1;min-height:0;width:100%;padding:12px;box-sizing:border-box;border:0;overflow-y:auto;overscroll-behavior:contain;padding-bottom:max(12px,env(safe-area-inset-bottom))}
#chat-history-dialog .conversation-list>h3{display:none}#chat-history-dialog .conversation-list button{min-height:44px}
@media(min-width:851px){#chat-history-toggle{display:none}}

/* Consistent operational form spacing. The chat composer keeps its own geometry. */
:root{--portal-control-gap:12px;--portal-section-gap:20px}
#app :is(.panel,.detail-panel,.profile-card) > form:not(#ask-form):not(.filter-bar),
.record-dialog-body > form:not(.filter-bar){display:grid;gap:var(--portal-control-gap);min-width:0;margin-block:var(--portal-section-gap)}
#app form:not(#ask-form) label:not(:has(input[type=checkbox],input[type=radio])),
dialog form label:not(:has(input[type=checkbox],input[type=radio])){display:grid;gap:8px;min-width:0;line-height:1.4}
#app form:not(#ask-form) :is(input,select,textarea):not([type=checkbox]):not([type=radio]):not([type=hidden]),
dialog form :is(input,select,textarea):not([type=checkbox]):not([type=radio]):not([type=hidden]){box-sizing:border-box;min-width:0;max-width:100%;min-height:44px}
#app :is(.filter-bar,.form-grid) label > :is(input,select,textarea){margin-top:0}
#app :is(.panel,.detail-panel,.profile-card) > form:not(#ask-form) > :is(h3,h4,p,.actions),
.record-dialog-body > form > :is(h3,h4,p,.actions){margin-block:0}
#app :is(.panel,.detail-panel,.profile-card) > form > p:empty{display:none}
#app :is(.panel,.detail-panel) > :is(h3,h4){line-height:1.35;overflow-wrap:anywhere}
#app :is(.panel,.detail-panel) > :is(p,ul,ol){line-height:1.6;margin-block:12px}
#app .filter-bar{column-gap:16px;row-gap:12px}
#app .form-grid{column-gap:20px;row-gap:16px}
#app .section-toolbar:not(.chat-toolbar){row-gap:12px}
#updates-upload{display:grid;gap:12px;margin-top:16px}
#updates-upload label{display:grid;gap:8px}
#profile-page .profile-photo-actions{gap:12px;flex-wrap:wrap;align-items:center}
#profile-page .profile-photo-actions :is(label,button){min-height:44px;box-sizing:border-box}
#profile-page .profile-photo-actions label{display:flex;align-items:center;justify-content:center}
@media(max-width:600px){
 #app .form-grid{gap:12px}
 #app :is(.filter-bar,.form-grid)>*{min-width:0;max-width:100%}
 #app .filter-bar>button{min-height:44px}
 #app :is(.panel,.detail-panel,.profile-card)>form:not(#ask-form)>.primary{width:100%}
}
#finance-page :is(.fin-tabs,.fin-actions){gap:12px}
#finance-page :is(.fin-tabs,.fin-actions) button{min-height:44px}
#help-page .help-filters{gap:16px}

/* Required email uses the existing profile form, with a compact access shell. */
.auth-locked .login-shell.email-enrolment:not([hidden]) {
  grid-template-columns: minmax(0, 1fr);
  max-width: 620px;
  margin-inline: auto;
  gap: 20px;
}
.email-enrolment .login-intro { padding-block: 0; }
.email-enrolment .login-intro::before,
.email-enrolment .login-intro > :not(img),
.email-enrolment .login > h2,
.email-enrolment .login > p { display: none; }
.email-enrolment .login-intro img { margin-bottom: 0; }
#email-required { min-width: 0; }
#email-required > p { margin: 0 0 24px; line-height: 1.5; }
#email-required > .quiet { margin-top: 16px; }
#email-required [role="status"]:empty { display: none; }
#email-required > .quiet { color: #beeaff; min-height: 44px; }
#email-required > .quiet:hover { color: #fff; }

/* Shared bundle cards: real provider IDs remain complete on narrow screens. */
:is(#detail,#service-detail,#services-list) .mobile-provider-id{display:grid;gap:4px;margin:12px 0 0;color:#58758a;font-size:12px;line-height:1.5;min-width:0;overflow-wrap:anywhere;word-break:break-word}
:is(#detail,#service-detail,#services-list) .mobile-provider-id>span:first-child{font-weight:600}
:is(#detail,#service-detail,#services-list) .bundle-prices{display:grid;gap:12px;flex:0 1 auto;min-width:0}
:is(#detail,#service-detail,#services-list) .mobile-bundle-pending{margin:12px 0 0}

:is(#detail,#service-detail,#services-list) .mobile-bundle .service-top>.mobile-provider-id{flex:1 0 100%;width:100%;margin-top:0}

:is(#detail,#service-detail,#services-list) .mobile-bundle .service-top>.mobile-bundle-pending{flex:1 0 100%;margin:0;font-size:12px}

:is(#detail,#service-detail,#services-list) .mobile-bundle .service-top>.mobile-reference-date{flex:1 0 100%;margin:0;font-size:12px}

:is(#detail,#service-detail,#services-list) .mobile-billing-service h3{margin:0;font-size:18px;overflow-wrap:anywhere}

.service-directory-reference{min-width:0;margin:0 0 18px;padding:14px;border:1px solid #ccdee9;border-radius:18px;background:#fff}
.service-directory-reference>header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px;flex-wrap:wrap}
.service-directory-reference>header strong{min-width:0;overflow-wrap:anywhere}
.service-order-history{margin-top:14px}.service-order-history .fields{margin:12px 0}

.service-directory-detail>.secondary{margin-bottom:18px}

:is(#detail,#service-detail,#services-list) .mobile-cost-allocation,:is(#detail,#service-detail,#services-list) .mobile-rate-conflict{flex:1 0 100%;width:100%;margin:0;font-size:12px;overflow-wrap:anywhere}
.mobile-rate-conflict p{margin:8px 0}

/* Chat resizes with the viewport; mobile actions remain inside the history drawer. */
body[data-view=assistant] .chat-layout{width:100%;max-width:100%;min-width:0}
body[data-view=assistant] #assistant-page .conversation-list{min-width:0}
#chat-history-dialog>.chat-history-new{flex:none;align-self:stretch;margin:10px 12px max(12px,env(safe-area-inset-bottom));min-height:44px}
@media(max-width:850px){body[data-view=assistant] #new-conversation{display:none}}

/* Mobile navigation: one visible row, remaining rows revealed from the handle. */
.mobile-menu-handle{display:none}
@media(max-width:850px){
 .sidebar{display:block;flex:none;width:100%;height:auto;min-height:0;padding:4px max(6px,env(safe-area-inset-right)) 0 max(6px,env(safe-area-inset-left));overflow:hidden;box-shadow:0 2px 8px #001a2620}
 .sidebar>.brand{display:none}
 .sidebar nav{display:grid!important;grid-template-columns:repeat(var(--mobile-nav-columns,4),minmax(0,1fr))!important;grid-auto-rows:52px;grid-template-rows:none;grid-auto-flow:row;gap:4px;margin:0;width:100%;height:52px;overflow:hidden;transition:height 240ms ease;overscroll-behavior:contain;align-content:start}
 .sidebar[data-menu-open=true] nav{overflow-y:auto;overflow-x:hidden;scrollbar-width:thin}
 .sidebar nav .mobile-brand{display:flex!important;align-items:center;justify-content:center;padding:2px!important}
 .sidebar nav .mobile-brand img{width:100%;max-width:84px;height:32px;object-fit:contain}
 .sidebar nav :is(a,.nav-logout){display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:0;min-height:44px;height:52px;margin:0!important;padding:4px 3px!important;border-radius:8px;gap:4px;font-size:11px!important;line-height:1.1}
 .sidebar nav :is(a,button)[hidden]{display:none!important}
 .sidebar nav :is(a,.nav-logout) .nav-text{font-size:11px;line-height:1.1;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .sidebar nav :is(a,.nav-logout) svg{width:20px;height:20px;flex:none}
 .sidebar nav #logout{border-top:0;border-left:1px solid #315165;border-radius:8px}
 .sidebar nav #profile-nav-photo{width:20px;height:20px}
 .mobile-menu-handle{display:flex;align-items:center;justify-content:center;width:100%;height:44px;padding:0;margin:0;border:0;background:transparent;color:#bed6e0;cursor:pointer;touch-action:pan-x pinch-zoom;user-select:none;border-radius:8px}
 .mobile-menu-handle span{width:38px;height:4px;border-radius:4px;background:currentColor;pointer-events:none}
 .mobile-menu-handle:hover,.mobile-menu-handle:focus-visible{background:#0c3b4e;color:#00dfff}
 .mobile-menu-handle:focus-visible{outline:2px solid #00dfff;outline-offset:-3px}
 .sidebar[data-menu-dragging=true] nav{transition:none}
}
@media(prefers-reduced-motion:reduce){.sidebar nav{transition:none}}

/* Compact dashboard counters; activity and network retain their own layouts. */
#dashboard-content>.dash-metrics{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:12px;}
#dashboard-content>.dash-metrics>.dash-metric{flex:1 1 calc((100% - 40px)/6);min-width:0;box-sizing:border-box;display:grid;grid-template-columns:20px minmax(0,1fr);grid-template-rows:26px 24px 16px;column-gap:7px;row-gap:0;padding:9px 11px;min-height:84px;align-items:center;border-radius:10px;text-align:left;font-family:inherit;cursor:pointer;}
#dashboard-content .dash-metric strong{grid-column:2;font-size:24px;line-height:1.05;margin:0;white-space:nowrap;font-variant-numeric:tabular-nums;}
#dashboard-content .dash-metric .dash-icon{grid-column:1;grid-row:1;margin:0;line-height:0;}
#dashboard-content .dash-icon svg{width:18px;height:18px;}
#dashboard-content .dash-metric .dash-label{grid-column:1/-1;font-size:12px;line-height:1.15;margin:0;align-self:center;}
#dashboard-content .dash-metric .dash-change{grid-column:1/-1;display:flex;align-items:center;gap:3px;font-size:11px;line-height:1;margin:0;color:#617786;font-variant-numeric:tabular-nums;}
#dashboard-content .dash-change svg{width:12px;height:12px;fill:none;stroke:currentColor;stroke-width:1.8;}
#dashboard-content .dash-change.favorable{color:#187240;}
#dashboard-content .dash-change.unfavorable{color:#b92d31;}
#dashboard-content .dash-severity-zero{background:#fff;}
#dashboard-content .dash-severity-good{background:#edf8f1;border-color:#a4cfb5;}
#dashboard-content .dash-severity-amber{background:#fff6e0;border-color:#dab45c;}
#dashboard-content .dash-severity-bad{background:#fff0f0;border-color:#d58487;}
#dashboard-content>.dash-metrics>.dash-metric:hover,#dashboard-content>.dash-metrics>.dash-metric:focus-visible{box-shadow:0 0 0 2px #00cfee;outline:none;}
@media(max-width:1100px) and (min-width:851px){#dashboard-content>.dash-metrics>.dash-metric{flex-basis:calc((100% - 24px)/4);}}
@media(max-width:850px){#dashboard-content>.dash-metrics{gap:6px;margin-bottom:10px;}#dashboard-content>.dash-metrics>.dash-metric{flex-basis:calc((100% - 12px)/3);grid-template-columns:15px minmax(0,1fr);grid-template-rows:22px 23px 12px;column-gap:4px;padding:6px 7px;min-height:69px;}#dashboard-content .dash-metric strong{font-size:21px;}#dashboard-content .dash-icon svg{width:14px;height:14px;}#dashboard-content .dash-metric .dash-label{font-size:10.5px;line-height:1.1;}#dashboard-content .dash-metric .dash-change{font-size:10px;}#dashboard-content .dash-change svg{width:10px;height:10px;}}
@media(max-width:360px){#dashboard-content>.dash-metrics>.dash-metric{grid-template-rows:19px 20px 12px;padding:5px 6px;min-height:63px;}#dashboard-content .dash-metric strong{font-size:19px;}#dashboard-content .dash-metric .dash-label{font-size:10px;}}

/* Lucas: exact observed Aire count; unknown keeps neutral and original coverage. */
#dashboard-content [data-metric="air_down"].dash-severity-zero{background:#16835b;border-color:#16835b;color:#fff}
#dashboard-content [data-metric="air_down"].dash-severity-low{background:#fff0f0;border-color:#d58487;color:#662323}
#dashboard-content [data-metric="air_down"].dash-severity-medium{background:#e8a0a3;border-color:#bc6269;color:#4c1115}
#dashboard-content [data-metric="air_down"].dash-severity-high{background:#8b1e28;border-color:#8b1e28;color:#fff}
#dashboard-content [data-metric="air_down"].dash-severity-zero .dash-change,#dashboard-content [data-metric="air_down"].dash-severity-high .dash-change{color:#fff}

/* Compact client service sheets; preserve the composer and all other panels. */
:is(#detail,#service-detail,#services-list) .client-service-toolbar{display:flex;justify-content:flex-end;margin:0 0 12px;}
:is(#detail,#service-detail,#services-list) .client-service-toolbar label{display:flex;align-items:center;gap:8px;margin:0;font-size:13px;}
:is(#detail,#service-detail,#services-list) .client-service-toolbar select{width:auto;min-height:36px;margin:0;padding:6px 28px 6px 10px;}
:is(#detail,#service-detail,#services-list) .client-compact-bundle .service-top{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:12px;padding:12px 14px;}
:is(#detail,#service-detail,#services-list) .client-compact-bundle .service-body{display:block;padding:0 14px 12px;}
:is(#detail,#service-detail,#services-list) .client-bundle-heading{min-width:0;}
:is(#detail,#service-detail,#services-list) .client-compact-bundle h3{margin:0;font-size:17px;line-height:1.35;overflow-wrap:anywhere;}
:is(#detail,#service-detail,#services-list) .client-compact-bundle .mobile-provider-id{margin:6px 0 0;font-size:11px;line-height:1.35;overflow-wrap:anywhere;}
:is(#detail,#service-detail,#services-list) .client-price-pair{display:flex;align-items:flex-start;justify-content:flex-end;gap:14px;min-width:0;}
:is(#detail,#service-detail,#services-list) .client-price{display:flex;flex-direction:column;align-items:flex-end;gap:2px;white-space:nowrap;}
:is(#detail,#service-detail,#services-list) .client-price small{margin:0;font-size:11px;line-height:1.35;}
:is(#detail,#service-detail,#services-list) .client-price strong{font-size:16px;line-height:1.4;}
:is(#detail,#service-detail,#services-list) .client-price strong span{font-size:11px;font-weight:400;margin-left:3px;}
:is(#detail,#service-detail,#services-list) .client-compact-line{padding:10px 12px;min-width:0;}
:is(#detail,#service-detail,#services-list) .client-compact-line header{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:6px 12px;}
:is(#detail,#service-detail,#services-list) .client-compact-line header>div{min-width:0;}
:is(#detail,#service-detail,#services-list) .client-compact-line .mobile-number{font-size:17px;line-height:1.35;overflow-wrap:anywhere;}
:is(#detail,#service-detail,#services-list) .client-compact-line .mobile-product{margin:3px 0 0;font-size:13px;line-height:1.4;overflow-wrap:anywhere;}
:is(#detail,#service-detail,#services-list) .client-compact-line time{grid-column:1/-1;font-size:11px;line-height:1.35;}
:is(#detail,#service-detail,#services-list) .client-compact-line.mobile-line-shared{border:0;border-bottom:1px solid #dce7ed;border-radius:0;padding:9px 0;margin:0;background:transparent;}
:is(#detail,#service-detail,#services-list) .client-compact-line.mobile-line-shared header{grid-template-columns:minmax(0,1fr) auto;align-items:center;}
:is(#detail,#service-detail,#services-list) .client-compact-line.mobile-line-shared time{grid-column:auto;}
:is(#detail,#service-detail,#services-list) .client-service-details{margin:10px 0 0;font-size:12px;line-height:1.5;}
:is(#detail,#service-detail,#services-list) .client-service-details summary{font-size:12px;cursor:pointer;}
:is(#detail,#service-detail,#services-list) .client-service-details .fields{gap:8px 16px;margin:10px 0;}
#detail .customer-fiber .service-top{padding:12px 14px;gap:10px;}
#detail .customer-fiber .service-body{padding:0 14px 12px;gap:10px;}
#detail .customer-fiber .service-body .fields{gap:8px 14px;margin:0;}
#detail .customer-fiber .service-top .eyebrow{margin:0 0 3px;font-size:11px;}
#detail .customer-fiber .service-top p:not(.eyebrow){margin:4px 0 0;}
#detail .customer-fiber .service-postal{margin:0;font-size:13px;line-height:1.45;}
#detail .customer-fiber .service-bottom{padding:10px 14px;gap:10px;}
#detail .customer-fiber .service-order-history{margin:0;}
@media(max-width:450px){:is(#detail,#service-detail,#services-list) .client-compact-bundle .service-top{gap:8px;padding:12px;} :is(#detail,#service-detail,#services-list) .client-compact-bundle .service-body{padding:0 12px 12px;} :is(#detail,#service-detail,#services-list) .client-price-pair{gap:8px;} :is(#detail,#service-detail,#services-list) .client-price strong{font-size:14px;} :is(#detail,#service-detail,#services-list) .client-price strong span{font-size:10px;} :is(#detail,#service-detail,#services-list) .client-compact-bundle h3{font-size:15px;} :is(#detail,#service-detail,#services-list) .client-compact-line .mobile-number{font-size:16px;} }
:is(#detail,#service-detail,#services-list) .client-service-details{border:0;padding:0;background:transparent;box-shadow:none;}
:is(#detail,#service-detail,#services-list) .client-service-details>summary,#detail .customer-fiber .service-order-history>summary{color:#00658c;line-height:1.5;padding:6px 0;}
#detail .customer-fiber .service-order-history{border:0;padding:0;background:transparent;}

/* Three incident work queues, with exact unfiltered pending counts. */
#incidents-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:0 0 18px;}
#incidents-tabs[hidden]{display:none;}
#incidents-tabs a{display:grid;grid-template-columns:20px minmax(0,1fr) auto;align-items:center;gap:10px;padding:12px 16px;min-width:0;min-height:54px;box-sizing:border-box;border:1px solid #c5d7e1;border-radius:14px;background:#fff;color:#365b70;text-decoration:none;font-size:14px;font-weight:600;line-height:1.25;transition:border-color .15s,box-shadow .15s;}
#incidents-tabs a>svg{width:20px;height:20px;}
.incident-tab-label{display:block;min-width:0;white-space:nowrap;}
#incidents-tabs a:hover{border-color:#007795;box-shadow:0 2px 6px #1232480c;}
#incidents-tabs a:focus-visible{outline:3px solid #007795;outline-offset:3px;}
#incidents-tabs a[aria-current=page]{border-color:#007795;color:#004866;box-shadow:inset 0 -3px #00cfea;}
.incident-tab-count{display:inline-flex;align-items:center;justify-content:center;min-width:27px;min-height:23px;padding:3px 7px;box-sizing:border-box;border-radius:8px;background:#edf3f7;color:#365b70;font-size:12px;font-weight:700;line-height:1;font-variant-numeric:tabular-nums;white-space:nowrap;}
#incidents-tabs a[aria-current=page] .incident-tab-count[data-state=available]{background:#00658c;color:#fff;}
.incident-tab-count[data-state=loading],.incident-tab-count[data-state=error]{background:#f0f2f4;color:#637684;}
.sidebar nav .incidents-nav>.nav-count{max-width:none;overflow:visible;font-variant-numeric:tabular-nums;}
.sidebar nav .incidents-nav>.nav-count[data-state=error]{background:#677e8a;}
@media(max-width:850px){.sidebar nav .incidents-nav{position:relative;}.sidebar nav .incidents-nav>.nav-count:not([hidden]){display:inline-flex!important;position:absolute;top:1px;right:2px;min-width:18px;height:17px;padding:2px 5px;font-size:10px;line-height:1;}}
.dashboard-placeholder{min-height:420px;}
.dashboard-skeleton-metrics{height:176px;border-radius:12px;background:#dce9ee;margin-bottom:12px;}
.dashboard-skeleton-network{height:230px;background:#e6eff3;}
#dashboard-content>.dash-metrics,#dashboard-content>#network-health.dashboard-arrived{animation:dashboard-arrive .22s ease-out both;}
@keyframes dashboard-arrive{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@media(max-width:600px){#incidents-tabs{gap:7px;margin-bottom:12px}#incidents-tabs a{grid-template-columns:minmax(0,1fr) auto;gap:6px;padding:8px 10px;border-radius:12px;min-height:66px;font-size:12px;}#incidents-tabs a>svg{width:17px;height:17px;grid-column:1;grid-row:1;}.incident-tab-count{grid-column:2;grid-row:1;font-size:11px;min-width:24px;min-height:21px;padding:3px 5px;}.incident-tab-label{grid-column:1/-1;grid-row:2;text-align:center;}.dashboard-skeleton-metrics{height:294px;}}
@media(prefers-reduced-motion:reduce){#dashboard-content>.dash-metrics,#dashboard-content>#network-health.dashboard-arrived{animation:none;}}

#network-health{min-height:230px}
@media(min-width:601px) and (max-width:850px){.dashboard-skeleton-metrics{height:294px;}}
@media(min-width:851px) and (max-width:1100px){.dashboard-skeleton-metrics{height:268px;}}
@media(max-width:360px){.dashboard-skeleton-metrics{height:270px;}}

/* Shared incident workflow: five aligned, wrapping status counters. */
:is(#ticket-metrics,#review-metrics,#internal-state-metrics){display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:.65rem;margin-block:1rem}
:is(#ticket-metrics,#review-metrics,#internal-state-metrics) .metric{min-width:0;min-height:64px;padding:.65rem .35rem;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.25rem;text-align:center;overflow-wrap:anywhere}
:is(#ticket-metrics,#review-metrics,#internal-state-metrics) .metric[aria-pressed="true"]{outline:2px solid var(--accent,#00cee6);outline-offset:1px}
@media(max-width:540px){:is(#ticket-metrics,#review-metrics,#internal-state-metrics){grid-template-columns:repeat(3,minmax(0,1fr));gap:.5rem}}

#app :is(#ticket-filters,#review-filters,#internal-filter){display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,150px),1fr));align-items:end}
#app :is(#ticket-filters,#review-filters,#internal-filter)>label{min-width:0}
@media(max-width:600px){
 #app :is(#ticket-filters,#review-filters,#internal-filter){grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
 #app :is(#ticket-filters,#review-filters,#internal-filter)>label:first-child,#app :is(#ticket-filters,#review-filters,#internal-filter)>button,#app #review-filters>.review-result-filter{grid-column:1/-1}
}

/* Dated incident source, folded to keep the mobile dashboard compact. */
.dashboard-count-source{margin:0 0 14px;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;color:#34576e;font-size:.875rem;line-height:1.5}
.dashboard-count-source summary{cursor:pointer;margin:0;padding:4px 0;min-height:0;color:#34576e;opacity:1;overflow-wrap:anywhere}
.dashboard-count-source summary:focus-visible{outline:2px solid #006b8b;outline-offset:3px;border-radius:4px}
.dashboard-count-source p{margin:8px 0;max-width:80ch;color:#34576e}

/* Ten indicators: equal widths in both complete rows, also in the app. */
#dashboard-content>.dash-metrics{display:grid;grid-template-columns:repeat(5,minmax(0,1fr))}
@media(max-width:1100px){#dashboard-content>.dash-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Root authorization stays within the message, with no default acceptance. */
.root-confirm-card{min-width:0;max-width:100%;margin-top:16px;padding:16px;border:1px solid #b5cfdc;border-radius:12px;background:#fff;color:#173e50;overflow-wrap:anywhere}.root-confirm-card header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap}.root-confirm-card h4{font-size:1rem;margin:0}.root-confirm-card p{margin:10px 0;line-height:1.5}.root-confirm-card pre{max-width:100%;white-space:pre-wrap;overflow-wrap:anywhere;font-size:.78rem;line-height:1.5}.root-action-warning{padding:10px;border-radius:8px;background:#fff3d6}.root-action-buttons{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.root-action-buttons button{max-width:100%;white-space:normal}.root-confirm-card summary{cursor:pointer;font-weight:600}.root-action-result:empty{display:none}@media(max-width:600px){.root-confirm-card{padding:12px}.root-action-buttons button{flex:1 1 160px}}
