/* com_assistencia 2.0 — app (PWA) */

:root {
  --ast-primary: #0f4c81;
  --ast-primary-ink: #fff;
  --ast-accent: #f2a93b;
  --ast-bg: #f2f5f9;
  --ast-surface: #fff;
  --ast-surface-2: #f7f9fc;
  --ast-ink: #14212e;
  --ast-muted: #5f6e7d;
  --ast-line: #e1e7ee;
  --ast-ok: #1f8a4c;
  --ast-warn: #b26a00;
  --ast-danger: #c62828;
  --ast-mine: #dcebfa;
  --ast-note: #fff4d6;
  --ast-radius: 16px;
  --ast-tabbar-h: 64px;
  --ast-safe-top: env(safe-area-inset-top, 0px);
  --ast-safe-bottom: env(safe-area-inset-bottom, 0px);
  --ast-shadow: 0 1px 2px rgba(16, 32, 48, .06), 0 4px 16px rgba(16, 32, 48, .05);
  --ast-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ast-bg: #0f151c;
    --ast-surface: #18212b;
    --ast-surface-2: #1e2934;
    --ast-ink: #e7edf3;
    --ast-muted: #9aa9b8;
    --ast-line: #2a3744;
    --ast-mine: #1d3a57;
    --ast-note: #3d3320;
    --ast-shadow: none;
  }
}

/* --- Integração com o template (modo app usa component.php) --- */
html:has(.ast-app) { background: var(--ast-bg); }
html:has(.ast-app) body {
  margin: 0 !important;
  padding: 0 !important;
  background: var(--ast-bg) !important;
  color: var(--ast-ink);
  font-family: var(--ast-font);
  -webkit-text-size-adjust: 100%;
  overscroll-behavior-y: none;
}

#system-message-container:has(+ .ast-app),
html:has(.ast-app) #system-message-container {
  position: fixed;
  z-index: 60;
  left: 12px;
  right: 12px;
  top: calc(var(--ast-safe-top) + 64px);
  margin: 0;
  pointer-events: none;
}
html:has(.ast-app) #system-message-container joomla-alert,
html:has(.ast-app) #system-message-container .alert {
  pointer-events: auto;
  border-radius: 12px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .18);
  margin: 0 auto 8px;
  max-width: 640px;
  animation: ast-fade 4.5s forwards;
  cursor: pointer;
}
@keyframes ast-fade { 0%, 85% { opacity: 1 } 100% { opacity: 0; visibility: hidden } }

.ast-app, .ast-app * { box-sizing: border-box; }
.ast-app {
  font-family: var(--ast-font);
  font-size: 16px;
  line-height: 1.45;
  color: var(--ast-ink);
  background: var(--ast-bg);
  min-height: 100vh;
  min-height: 100dvh;
}
.ast-app a { color: var(--ast-primary); text-decoration: none; }
@media (prefers-color-scheme: dark) { .ast-app a { color: #8cc4ff; } }
.ast-app h1, .ast-app h2, .ast-app h3 { margin: 0; color: inherit; font-family: inherit; }
.ast-ico { width: 22px; height: 22px; flex: none; vertical-align: middle; }

/* --- Barra superior --- */
.ast-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(var(--ast-safe-top) + 10px) 12px 10px;
  background: var(--ast-primary);
  color: var(--ast-primary-ink);
  min-height: 56px;
}
.ast-topbar__title {
  flex: 1;
  font-size: 18px !important;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ast-app .ast-topbar__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: inherit;
}
.ast-app .ast-topbar__btn:active { background: rgba(255, 255, 255, .18); }
.ast-topbar__logo, .ast-topbar__who {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .16);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .02em;
}
.ast-topbar__who { border-radius: 50%; }

.ast-offline {
  background: #333;
  color: #fff;
  text-align: center;
  font-size: 13px;
  padding: 6px 12px;
}

/* --- Conteúdo --- */
.ast-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 14px calc(var(--ast-tabbar-h) + var(--ast-safe-bottom) + 24px);
}
.ast-hello { font-size: 22px; font-weight: 700; margin: 4px 2px 14px; }
.ast-h2 { font-size: 15px !important; text-transform: uppercase; letter-spacing: .04em; color: var(--ast-muted); margin: 24px 4px 10px !important; }
.ast-muted { color: var(--ast-muted); }
.ast-small { font-size: 13px; }
.ast-clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.ast-card {
  background: var(--ast-surface);
  border-radius: var(--ast-radius);
  box-shadow: var(--ast-shadow);
  padding: 16px;
  margin-bottom: 14px;
}
.ast-card--flat { box-shadow: none; border: 1px solid var(--ast-line); }

.ast-section { margin-top: 22px; }
.ast-section__head { display: flex; align-items: baseline; justify-content: space-between; margin: 0 4px 10px; }
.ast-section__head h2 { font-size: 17px !important; font-weight: 700; }
.ast-section__head a { font-size: 14px; font-weight: 600; }
.ast-count { background: var(--ast-line); border-radius: 999px; padding: 1px 9px; font-size: 13px; font-weight: 700; }
.ast-empty-line { color: var(--ast-muted); margin: 6px 4px; display: flex; align-items: center; gap: 6px; }

/* --- Saldo --- */
.ast-saldo { background: linear-gradient(135deg, var(--ast-primary), color-mix(in srgb, var(--ast-primary) 70%, #000)); color: #fff; }
.ast-saldo__label { font-size: 14px; opacity: .85; }
.ast-saldo__value { font-size: 44px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; margin: 4px 0 12px; }
.ast-saldo__meta { display: flex; justify-content: space-between; font-size: 13px; opacity: .85; margin-top: 8px; }
.ast-saldo .ast-meter { background: rgba(255, 255, 255, .22); }
.ast-saldo .ast-meter i { background: #fff; }
.ast-saldo--aviso .ast-meter i { background: var(--ast-accent); }
.ast-saldo--critico .ast-meter i, .ast-saldo--vazio .ast-meter i { background: #ff8a80; }

.ast-meter { height: 8px; border-radius: 999px; background: var(--ast-line); overflow: hidden; }
.ast-meter i { display: block; height: 100%; border-radius: inherit; background: var(--ast-ok); transition: width .4s; }
.ast-meter--sm { height: 5px; margin: 6px 0 4px; }

/* --- Botões --- */
.ast-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid var(--ast-line);
  background: var(--ast-surface);
  color: var(--ast-ink) !important;
  font: 600 15px/1.2 var(--ast-font);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  text-decoration: none !important;
}
.ast-btn:active { transform: scale(.98); }
.ast-btn[disabled] { opacity: .55; pointer-events: none; }
.ast-btn--primary { background: var(--ast-primary); border-color: var(--ast-primary); color: var(--ast-primary-ink) !important; }
.ast-btn--ghost { background: transparent; }
.ast-btn--block { width: 100%; }
.ast-btn--lg { min-height: 54px; font-size: 17px; border-radius: 14px; margin: 4px 0 14px; }
.ast-btn--sm { min-height: 36px; padding: 6px 12px; font-size: 14px; }

.ast-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--ast-line);
  background: var(--ast-surface-2);
  border-radius: 999px;
  padding: 6px 12px;
  font: 600 14px/1.2 var(--ast-font);
  color: var(--ast-ink);
  cursor: pointer;
}
.ast-chip .ast-ico { width: 16px; height: 16px; }
.ast-chip.is-active { background: var(--ast-primary); border-color: var(--ast-primary); color: #fff; }
.ast-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }

/* --- Listas --- */
.ast-list { display: flex; flex-direction: column; gap: 8px; }
.ast-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--ast-surface);
  border-radius: 14px;
  box-shadow: var(--ast-shadow);
  color: var(--ast-ink) !important;
}
.ast-item:not(.ast-item--static):active { background: var(--ast-surface-2); }
.ast-item__body { flex: 1; min-width: 0; }
.ast-item__top { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; flex-wrap: wrap; }
.ast-item__id { font-weight: 700; color: var(--ast-muted); font-size: 13px; }
.ast-item__time { margin-left: auto; font-size: 12px; color: var(--ast-muted); }
.ast-item__title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.ast-item__meta { color: var(--ast-muted); font-size: 13px; margin-top: 2px; }
.ast-item__aside { font-size: 15px; white-space: nowrap; }
.ast-item__aside.is-danger { color: var(--ast-danger); }
.ast-item__icon { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--ast-surface-2); color: var(--ast-primary); flex: none; }
.ast-item__icon--warn { color: var(--ast-warn); }
.ast-item__date { width: 44px; text-align: center; flex: none; }
.ast-item__date strong { display: block; font-size: 20px; line-height: 1; }
.ast-item__date span { font-size: 12px; color: var(--ast-muted); text-transform: uppercase; }
.ast-item.is-unread { box-shadow: inset 4px 0 0 var(--ast-primary), var(--ast-shadow); }
.ast-item.is-unread .ast-item__title { font-weight: 750; }
.ast-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #e53935; flex: none; }

.ast-badge {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--ast-line);
  color: var(--ast-ink);
  white-space: nowrap;
}
.ast-badge--novo { background: #e3f0ff; color: #0b5cad; }
.ast-badge--em_curso { background: #fff1d6; color: #8a5300; }
.ast-badge--aguarda_cliente { background: #f1e5ff; color: #6a2fb3; }
.ast-badge--resolvido { background: #ddf5e6; color: #17693b; }
.ast-badge--fechado { background: #e8ecf0; color: #4b5866; }
.ast-badge--urgente { background: #c62828; color: #fff; }
.ast-badge--alta { background: #ffe0dc; color: #b3261e; }
.ast-badge--normal, .ast-badge--baixa { background: var(--ast-surface-2); color: var(--ast-muted); }

/* --- Técnico --- */
.ast-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.ast-stat { background: var(--ast-surface); border-radius: 14px; padding: 14px 10px; text-align: center; box-shadow: var(--ast-shadow); color: var(--ast-ink) !important; }
.ast-stat strong { display: block; font-size: 28px; line-height: 1.1; }
.ast-stat span { font-size: 12.5px; color: var(--ast-muted); }
.ast-stat--novo strong { color: var(--ast-primary); }
.ast-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 20px; }
.ast-quick__item { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 14px; background: var(--ast-surface); box-shadow: var(--ast-shadow); color: var(--ast-ink) !important; font-weight: 600; font-size: 14px; }
.ast-quick__item .ast-ico { color: var(--ast-primary); }

/* --- Pesquisa e segmentos --- */
.ast-search { display: flex; align-items: center; gap: 8px; background: var(--ast-surface); border-radius: 12px; padding: 0 12px; margin-bottom: 10px; box-shadow: var(--ast-shadow); }
.ast-search .ast-ico { color: var(--ast-muted); width: 18px; }
.ast-search input { flex: 1; border: 0 !important; background: transparent !important; padding: 12px 0 !important; font-size: 16px; color: var(--ast-ink); outline: none; box-shadow: none !important; }
.ast-segments { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 10px; scrollbar-width: none; }
.ast-segments::-webkit-scrollbar { display: none; }
.ast-segments__item { flex: none; padding: 8px 14px; border-radius: 999px; background: var(--ast-surface); color: var(--ast-ink) !important; font-weight: 600; font-size: 14px; box-shadow: var(--ast-shadow); cursor: pointer; }
.ast-segments__item b { color: var(--ast-muted); font-weight: 700; margin-left: 2px; }
.ast-segments__item.is-active, .ast-segments__item:has(input:checked) { background: var(--ast-primary); color: #fff !important; }
.ast-segments__item.is-active b { color: rgba(255, 255, 255, .8); }
.ast-segments--toggle input { position: absolute; opacity: 0; pointer-events: none; }
.ast-pager { display: flex; justify-content: center; gap: 10px; margin-top: 16px; }

.ast-empty { text-align: center; padding: 48px 16px; color: var(--ast-muted); }
.ast-empty__icon { display: inline-flex; width: 64px; height: 64px; border-radius: 20px; align-items: center; justify-content: center; background: var(--ast-surface); margin-bottom: 12px; box-shadow: var(--ast-shadow); }
.ast-empty__icon .ast-ico { width: 30px; height: 30px; color: var(--ast-primary); }

/* --- Pedido / conversa --- */
.ast-ticket__badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; }
.ast-ticket__badges .ast-muted { margin-left: auto; }
.ast-ticket__title { font-size: 19px !important; font-weight: 700; line-height: 1.3; }
.ast-ticket__client { margin-top: 10px; font-size: 14px; }
.ast-ticket__contacts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.ast-chip--link { color: var(--ast-ink) !important; }
.ast-ticket__tools { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; border-top: 1px solid var(--ast-line); margin-top: 12px; padding-top: 12px; }
.ast-inline { display: flex; align-items: center; gap: 6px; margin: 0; }
.ast-inline select, .ast-composer__opts select {
  border: 1px solid var(--ast-line);
  border-radius: 10px;
  padding: 7px 10px;
  background: var(--ast-surface-2);
  color: var(--ast-ink);
  font: 500 14px var(--ast-font);
  max-width: 190px;
}
.ast-ticket__time { margin-top: 12px; font-size: 14px; }
.ast-ticket__time summary { cursor: pointer; color: var(--ast-muted); display: flex; align-items: center; gap: 6px; }
.ast-ticket__time ul { margin: 8px 0 0; padding-left: 22px; color: var(--ast-muted); }

.ast-thread { list-style: none; margin: 18px 0 8px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ast-msg { max-width: 86%; padding: 10px 13px; border-radius: 18px; background: var(--ast-surface); box-shadow: var(--ast-shadow); align-self: flex-start; border-bottom-left-radius: 6px; }
.ast-msg--mine { align-self: flex-end; background: var(--ast-mine); border-bottom-left-radius: 18px; border-bottom-right-radius: 6px; }
.ast-msg--interno { background: var(--ast-note); border: 1px dashed #d9a200; }
.ast-msg--sistema { align-self: center; background: none; box-shadow: none; padding: 0; max-width: 92%; text-align: center; }
.ast-msg--sistema span { display: inline-block; font-size: 12.5px; color: var(--ast-muted); background: var(--ast-surface-2); border-radius: 999px; padding: 4px 12px; }
.ast-msg__head { display: flex; gap: 10px; justify-content: space-between; font-size: 12px; color: var(--ast-muted); margin-bottom: 3px; }
.ast-msg__who { font-weight: 700; }
.ast-msg__text { word-wrap: break-word; overflow-wrap: anywhere; }
.ast-msg__files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ast-thumb img { display: block; width: 120px; height: 120px; object-fit: cover; border-radius: 12px; background: var(--ast-line); }
.ast-file { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 10px; background: rgba(0, 0, 0, .05); color: var(--ast-ink) !important; font-size: 13px; max-width: 100%; }
.ast-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
.ast-file small { color: var(--ast-muted); }

.ast-newmsg { position: sticky; top: 70px; text-align: center; z-index: 5; }

.ast-composer {
  position: sticky;
  bottom: calc(var(--ast-tabbar-h) + var(--ast-safe-bottom) + 8px);
  background: var(--ast-surface);
  border-radius: 20px;
  box-shadow: 0 4px 24px rgba(16, 32, 48, .14);
  padding: 8px;
  margin-top: 14px;
  z-index: 10;
}
.ast-composer__row { display: flex; align-items: flex-end; gap: 6px; }
.ast-composer textarea {
  flex: 1;
  min-height: 42px;
  max-height: 40vh;
  resize: none;
  border: 0 !important;
  background: var(--ast-surface-2) !important;
  border-radius: 14px !important;
  padding: 10px 12px !important;
  font: 16px/1.35 var(--ast-font);
  color: var(--ast-ink);
  outline: none;
  box-shadow: none !important;
  margin: 0;
}
.ast-composer.is-interno textarea { background: var(--ast-note) !important; }
.ast-composer__attach, .ast-composer__send {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  position: relative;
  color: var(--ast-muted);
  background: transparent;
}
.ast-composer__send { background: var(--ast-primary); color: #fff; }
.ast-composer__attach input, .ast-dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.ast-composer__opts { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 12px; padding: 8px 4px 2px; }
.ast-composer__files { display: flex; flex-wrap: wrap; gap: 6px; }
.ast-composer__files:not(:empty) { padding: 4px 4px 8px; }
.ast-composer__files span { font-size: 12.5px; background: var(--ast-surface-2); border-radius: 8px; padding: 4px 8px; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ast-resolve { margin-top: 18px; }

/* --- Formulários --- */
.ast-form { display: flex; flex-direction: column; gap: 14px; }
.ast-field { display: flex; flex-direction: column; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.ast-field > span, .ast-field legend { font-weight: 650; font-size: 14px; padding: 0; margin-bottom: 4px; }
.ast-field input[type=text], .ast-field input[type=password], .ast-field input[type=number], .ast-field input[type=datetime-local],
.ast-field input[type=date], .ast-field input[type=email], .ast-field input[type=tel],
.ast-field select, .ast-field textarea {
  width: 100%;
  border: 1px solid var(--ast-line) !important;
  border-radius: 12px !important;
  padding: 12px !important;
  font: 16px/1.35 var(--ast-font) !important;
  background: var(--ast-surface) !important;
  color: var(--ast-ink) !important;
  box-shadow: none !important;
  min-height: 48px;
  margin: 0;
  max-width: none;
}
.ast-field textarea { min-height: 120px; }
.ast-field input:focus, .ast-field select:focus, .ast-field textarea:focus { outline: 2px solid color-mix(in srgb, var(--ast-primary) 50%, transparent); border-color: var(--ast-primary) !important; }
.ast-field--inline { flex-direction: row; align-items: center; gap: 10px; }
.ast-field--inline input { width: 110px !important; }
.ast-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ast-radios { display: flex; flex-wrap: wrap; gap: 8px; }
.ast-radio { position: relative; }
.ast-radio input { position: absolute; opacity: 0; }
.ast-radio span { display: inline-block; padding: 10px 16px; border-radius: 12px; border: 1px solid var(--ast-line); background: var(--ast-surface); font-weight: 600; cursor: pointer; }
.ast-radio input:checked + span { background: var(--ast-primary); border-color: var(--ast-primary); color: #fff; }
.ast-radio--urgente input:checked + span { background: var(--ast-danger); border-color: var(--ast-danger); }
.ast-radio input:focus-visible + span { outline: 2px solid var(--ast-primary); outline-offset: 2px; }
.ast-check { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; cursor: pointer; }
.ast-check input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--ast-primary); }
.ast-check--sm { font-size: 13px; align-items: center; }
.ast-check--sm input { width: 17px; height: 17px; margin: 0; }
.ast-dropzone { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; border: 2px dashed var(--ast-line); border-radius: 14px; padding: 18px; color: var(--ast-muted); font-weight: 600; background: var(--ast-surface); }

/* --- Push / instalar / conta --- */
.ast-push { display: flex; gap: 14px; align-items: flex-start; }
.ast-push__icon { width: 42px; height: 42px; border-radius: 12px; background: color-mix(in srgb, var(--ast-accent) 20%, transparent); color: var(--ast-warn); display: flex; align-items: center; justify-content: center; flex: none; }
.ast-push.is-on .ast-push__icon { background: color-mix(in srgb, var(--ast-ok) 15%, transparent); color: var(--ast-ok); }
.ast-push__body { flex: 1; }
.ast-push__body p { margin: 4px 0 10px; font-size: 14px; }
.ast-push__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ast-install p { margin: 6px 0 10px; font-size: 14px; }
.ast-install ol { margin: 8px 0 0; padding-left: 20px; font-size: 14px; }
.ast-kbd { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 8px; border: 1px solid var(--ast-line); background: var(--ast-surface-2); font-weight: 600; font-size: 13px; }
.ast-kbd .ast-ico { width: 15px; height: 15px; color: #0a84ff; }
.ast-profile { display: flex; align-items: center; gap: 14px; }
.ast-avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--ast-primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; flex: none; }
.ast-help__item + .ast-help__item { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--ast-line); }
.ast-help ol { margin: 8px 0; padding-left: 20px; font-size: 14px; }
.ast-help li { margin-bottom: 4px; }
.ast-logout { margin-top: 24px; }

/* --- Login --- */
.ast-app--login { display: flex; align-items: center; justify-content: center; padding: calc(var(--ast-safe-top) + 24px) 18px calc(var(--ast-safe-bottom) + 24px); }
.ast-login { width: 100%; max-width: 400px; text-align: center; }
.ast-login h1 { font-size: 24px !important; margin: 14px 0 4px !important; }
.ast-login > p { margin: 0 0 20px; }
.ast-login__icon { border-radius: 22px; box-shadow: var(--ast-shadow); }
.ast-login .ast-form { text-align: left; }
.ast-login__links { margin-top: 16px; font-size: 14px; }
.ast-login .ast-install { text-align: left; margin-top: 20px; }

/* --- Clientes / packs --- */
.ast-avatar--sm { width: 40px; height: 40px; font-size: 14px; }
.ast-profile { align-items: flex-start; }
.ast-profile__body { flex: 1; min-width: 0; }
.ast-quick--3 { grid-template-columns: repeat(3, 1fr); margin-top: 0; margin-bottom: 8px; }
.ast-quick--3 .ast-quick__item { align-items: center; text-align: center; font-size: 13px; padding: 12px 6px; }
.ast-item__actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ast-item.is-dim { opacity: .6; }
.ast-chip--file { position: relative; overflow: hidden; }
.ast-chip--file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.ast-radios--cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.ast-radio--card span { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; width: 100%; padding: 12px 8px; }
.ast-radio--card strong { font-size: 20px; }
.ast-radio--card small { font-size: 12px; font-weight: 500; opacity: .85; line-height: 1.3; }
.ast-card--flat legend { font-size: 13px; }
fieldset.ast-card { margin: 0; }

/* --- Barra de separadores --- */
.ast-tabbar {
  position: fixed;
  z-index: 50;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-around;
  height: calc(var(--ast-tabbar-h) + var(--ast-safe-bottom));
  padding-bottom: var(--ast-safe-bottom);
  background: color-mix(in srgb, var(--ast-surface) 92%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-top: 1px solid var(--ast-line);
}
.ast-tabbar__item {
  position: relative;
  flex: 1;
  max-width: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ast-muted) !important;
  -webkit-tap-highlight-color: transparent;
}
.ast-tabbar__item.is-active { color: var(--ast-primary) !important; }
@media (prefers-color-scheme: dark) { .ast-tabbar__item.is-active { color: #8cc4ff !important; } }
.ast-tabbar__item--primary .ast-ico { background: var(--ast-primary); color: #fff; border-radius: 12px; padding: 6px; width: 36px; height: 36px; margin-top: -4px; }
.ast-tabbar__item .ast-dot { position: absolute; top: 8px; left: calc(50% + 6px); }

@media (min-width: 900px) {
  .ast-main { padding-top: 24px; }
  .ast-msg { max-width: 72%; }
}

@media print {
  .ast-tabbar, .ast-composer, .ast-topbar { display: none !important; }
}
