:root {
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --primary-light: #e0f2fe;
  --secondary: #0f172a;
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --border: #e2e8f0;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --success: #10b981;
  --success-light: #d1fae5;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --info: #3b82f6;
  --info-light: #dbeafe;
  --radius: 10px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --sidebar-w: 260px;
  /* Controles operacionais Aconectar: a mesma linguagem visual usada na Agenda. */
  --acs-control-bg: rgba(159, 203, 238, .82);
  --acs-control-bg-hover: rgba(145, 194, 232, .94);
  --acs-control-panel: rgba(196, 222, 243, .92);
  --acs-control-text: #0b3b5b;
  --acs-control-shadow: 0 5px 14px rgba(30, 92, 133, .13), inset 0 1px 0 rgba(255, 255, 255, .58);
  --acs-control-shadow-hover: 0 7px 16px rgba(30, 92, 133, .18), inset 0 1px 0 rgba(255, 255, 255, .64);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

[hidden] {
  display: none !important;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-size: 14px;
  line-height: 1.5;
  overflow-x: hidden;
}

/* Layout */
.app-container {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

.sidebar {
  width: var(--sidebar-w);
  background: #0f172a;
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: width 0.2s;
  z-index: 100;
}

.sidebar-brand {
  padding: 20px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #1e293b;
}

.sidebar-brand img {
  height: 34px;
  width: auto;
  border-radius: 6px;
  background: white;
  padding: 2px;
}

.sidebar-brand h1 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: #ffffff;
}

.sidebar-brand span {
  font-size: 11px;
  color: #38bdf8;
  display: block;
  font-weight: 400;
}

.nav-menu {
  list-style: none;
  padding: 16px 10px;
  flex: 1;
  overflow-y: auto;
}

.nav-category {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  padding: 12px 12px 6px 12px;
  font-weight: 700;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  color: #94a3b8;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  margin-bottom: 3px;
}

.nav-item:hover {
  background: #1e293b;
  color: #ffffff;
}

.nav-item.active {
  background: var(--primary);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
}

.nav-item .icon {
  font-size: 18px;
  width: 22px;
  text-align: center;
}

.sidebar-footer {
  padding: 14px;
  border-top: 1px solid #1e293b;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Main Content Area */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.topbar {
  height: 64px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  flex-shrink: 0;
}

.topbar-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-title h2 {
  font-size: 19px;
  font-weight: 700;
  color: var(--secondary);
}

.topbar-badge {
  background: var(--primary-light);
  color: var(--primary);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  background: #f1f5f9;
  border-radius: 30px;
}

.user-avatar {
  width: 28px;
  height: 28px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
}

.user-info {
  line-height: 1.2;
}

.user-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-main);
}

.user-role {
  font-size: 11px;
  color: var(--text-muted);
}

.content-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px;
}

/* View Sections */
.view-section {
  display: none;
}

.view-section.active {
  display: block;
  animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Dashboard Cards Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.metric-card {
  background: var(--bg-card);
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  overflow: hidden;
}

.metric-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
}

.metric-card.primary::before { background: var(--primary); }
.metric-card.success::before { background: var(--success); }
.metric-card.warning::before { background: var(--warning); }
.metric-card.info::before { background: var(--info); }
.metric-card.danger::before { background: var(--danger); }

.metric-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.metric-card.primary .metric-icon { background: var(--primary-light); color: var(--primary); }
.metric-card.success .metric-icon { background: var(--success-light); color: var(--success); }
.metric-card.warning .metric-icon { background: var(--warning-light); color: var(--warning); }
.metric-card.info .metric-icon { background: var(--info-light); color: var(--info); }
.metric-card.danger .metric-icon { background: var(--danger-light); color: var(--danger); }

.metric-data h3 {
  font-size: 24px;
  font-weight: 700;
  color: var(--secondary);
}

.metric-data p {
  font-size: 13px;
  color: var(--text-muted);
}

/* Standard Card */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
  overflow: hidden;
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
}

.card-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-body {
  padding: 20px;
}

/* Data Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

table.data-table th {
  background: #f8fafc;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

table.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
  vertical-align: middle;
}

table.data-table tr:hover {
  background-color: #f8fafc;
}

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
}

.badge-success { background: var(--success-light); color: #065f46; }
.badge-warning { background: var(--warning-light); color: #92400e; }
.badge-danger { background: var(--danger-light); color: #991b1b; }
.badge-info { background: var(--info-light); color: #1e40af; }
.badge-muted { background: #e2e8f0; color: #475569; }

/* Buttons & Inputs */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  text-decoration: none;
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #059669; }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #dc2626; }
.btn-outline { background: white; border-color: var(--border); color: var(--text-main); }
.btn-outline:hover { background: #f8fafc; border-color: #cbd5e1; }
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 5px; }
.btn-lg { padding: 12px 24px; font-size: 15px; border-radius: 8px; }

/* Base compartilhada para ações e menus operacionais. A classe pode ser usada
   por qualquer módulo novo sem reproduzir o CSS da Agenda. */
.acs-control {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 14px;
  border: 0;
  border-radius: 999px;
  background: var(--acs-control-bg);
  box-shadow: var(--acs-control-shadow);
  color: var(--acs-control-text);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.acs-control:hover:not(:disabled),
.acs-control[aria-expanded="true"] {
  background: var(--acs-control-bg-hover);
  box-shadow: var(--acs-control-shadow-hover);
}
.acs-control:focus-visible { outline: 3px solid rgba(21, 114, 182, .28); outline-offset: 2px; }
.acs-control:disabled { cursor: not-allowed; opacity: .5; }
.acs-control--compact { min-height: 32px; padding: 5px 11px; font-size: 10.5px; }
.acs-control--icon { width: 34px; min-width: 34px; height: 34px; min-height: 34px; padding: 0; }
.acs-control svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.acs-combo { position: relative; min-width: 180px; }
.acs-combo > summary { list-style: none; }
.acs-combo > summary::-webkit-details-marker { display: none; }
.acs-combo-menu {
  position: absolute;
  z-index: 90;
  top: calc(100% + 7px);
  left: 50%;
  display: grid;
  width: max(100%, 210px);
  gap: 4px;
  padding: 7px;
  transform: translateX(-50%);
  border: 0;
  border-radius: 20px;
  background: var(--acs-control-panel);
  box-shadow: 0 16px 32px rgba(20, 69, 103, .2), inset 0 1px 0 rgba(255, 255, 255, .62);
}
.acs-combo-menu button {
  display: flex;
  width: 100%;
  min-height: 36px;
  align-items: center;
  justify-content: space-between;
  padding: 8px 11px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #123f5d;
  font-size: 11.5px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.acs-combo-menu button:hover { background: rgba(235, 247, 254, .74); }
.acs-combo-menu button[aria-selected="true"] { background: var(--acs-control-bg); color: #082f49; }
.acs-combo-menu button[aria-selected="true"]::after { content: '✓'; font-weight: 900; }
.acs-select-bridge { display: none !important; }

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-main);
}

.form-control {
  width: 100%;
  padding: 9px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text-main);
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.15s;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: white;
  width: 90%;
  max-width: 680px;
  max-height: 90vh;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.2s;
}

.modal-backdrop.open .modal-card {
  transform: scale(1);
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 700;
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
}

.modal-footer {
  padding: 14px 20px;
  background: #f8fafc;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Webcam Preview Box */
.camera-box {
  width: 100%;
  height: 240px;
  background: #0f172a;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  margin-bottom: 14px;
}

.camera-box video, .camera-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Live Chat Widget */
.chat-window {
  display: flex;
  flex-direction: column;
  height: 480px;
  background: #ffffff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}

.chat-header {
  padding: 14px 18px;
  background: #0f172a;
  color: white;
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #f8fafc;
}

.chat-bubble {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.4;
}

.chat-bubble.bot {
  background: #ffffff;
  border: 1px solid var(--border);
  align-self: flex-start;
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

.chat-bubble.user {
  background: var(--primary);
  color: white;
  align-self: flex-end;
}

.chat-input-bar {
  padding: 12px 16px;
  background: white;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
}

/* Toast notifications — slot no fluxo do shell (não sobrepõe CTA/toolbar/sheet) */
.toast-container,
.acs-toast-slot {
  position: relative;
  display: none;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
  width: 100%;
  padding: 8px 16px 0;
  z-index: 40;
  pointer-events: none;
  box-sizing: border-box;
}

.acs-toast-slot:not(:empty) {
  display: flex;
}

.toast {
  background: #1e293b;
  color: white;
  padding: 10px 16px;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  font-size: 13.5px;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  animation: acsToastIn 0.2s ease;
}

.toast.success { background: #065f46; color: #ecfdf5; }
.toast.error { background: #991b1b; color: #fef2f2; }
.toast.warning { background: #92400e; color: #fffbeb; }
.toast.info { background: #1e3a5f; color: #e0f2fe; }

@keyframes acsToastIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}
@keyframes slideIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

@media (min-width: 768px) {
  .acs-toast-slot:not(:empty) {
    align-items: flex-end;
    padding: 8px 20px 0;
  }
  .acs-toast-slot .toast {
    width: min(360px, 100%);
    max-width: 360px;
  }
}

@media (max-width: 767px) {
  .acs-toast-slot:not(:empty) {
    align-items: stretch;
    padding: 8px 12px 0;
  }
  .acs-toast-slot .toast {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
  }
}

/* Com modal aberto, faixa acima do card — nunca sobre o footer/CTA do modal */
body.acs-modal-aberto.acs-toast-visivel .acs-toast-slot {
  position: fixed;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: min(400px, calc(100vw - 16px));
  padding: 0;
  z-index: 1105;
  align-items: stretch;
}
body.acs-modal-aberto.acs-toast-visivel .acs-toast-slot .toast {
  width: 100%;
  max-width: none;
}
body.acs-modal-aberto.acs-toast-visivel .modal-backdrop.open {
  align-items: flex-start;
  padding-top: calc(var(--acs-toast-reserva, 0px) + 16px);
  box-sizing: border-box;
}
body.acs-modal-aberto.acs-toast-visivel .modal-backdrop.open .modal-card {
  max-height: calc(90vh - var(--acs-toast-reserva, 0px) - 24px);
}

/* Login institucional reconstruído a partir da referência aprovada. */
.login-overlay {
  --login-ink: #06365f;
  --login-muted: #3f6d89;
  --login-cyan: #079bd2;
  position: fixed;
  inset: 0;
  isolation: isolate;
  display: block;
  overflow: hidden auto;
  z-index: 3000;
  color: var(--login-ink);
  background:
    linear-gradient(90deg, rgba(246, 253, 255, .94) 0%, rgba(244, 252, 255, .52) 30%, rgba(244, 252, 255, .08) 54%, rgba(235, 248, 255, .22) 100%),
    url('/assets/login-clinica-profissional.png') center center / cover no-repeat;
}

.login-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(220, 244, 254, .13));
}

.login-brand {
  position: absolute;
  top: clamp(22px, 3.1vh, 42px);
  left: clamp(22px, 3.5vw, 68px);
  width: clamp(178px, 15vw, 254px);
}

.login-brand img { display: block; width: 100%; height: auto; }

.login-language {
  position: absolute;
  top: clamp(30px, 4.6vh, 64px);
  right: clamp(34px, 5.7vw, 108px);
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 8px 10px;
  border: 0;
  background: transparent;
  color: #456e8c;
  font: 800 14px/1 inherit;
  cursor: default;
}

.login-language svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }

.login-story {
  position: absolute;
  left: clamp(24px, 3.7vw, 72px);
  bottom: clamp(24px, 5.3vh, 62px);
  width: min(360px, 30vw);
  text-shadow: 0 1px 12px rgba(255,255,255,.92);
}

.login-story h1 {
  margin: 0 0 14px;
  color: #06345e;
  font-size: clamp(30px, 2.25vw, 44px);
  line-height: .99;
  letter-spacing: -.035em;
  font-weight: 850;
}

.login-story > p:not(.login-signature) {
  margin: 0 0 18px;
  color: #315f79;
  font-size: clamp(12px, .92vw, 16px);
  line-height: 1.45;
}

.login-benefits { display: grid; gap: 11px; margin: 0; padding: 0; list-style: none; }
.login-benefits li { display: grid; grid-template-columns: 36px 1fr; align-items: center; gap: 10px; }
.login-benefit-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  color: #0ba5d2;
  background: rgba(235, 250, 255, .75);
  box-shadow: inset 0 0 0 1px rgba(48, 175, 214, .08);
  font-size: 20px;
}
.login-benefits li > span:last-child { display: grid; gap: 2px; }
.login-benefits strong { color: #0b3e64; font-size: 13px; line-height: 1.1; }
.login-benefits small { color: #55798f; font-size: 10.5px; line-height: 1.25; }
.login-signature { margin: 20px 0 0 88px; color: #0b4168; font-size: 14px; line-height: 1.1; font-weight: 800; text-align: center; }

.login-access {
  position: absolute;
  top: 50%;
  right: clamp(52px, 6.2vw, 120px);
  width: clamp(330px, 27vw, 440px);
  transform: translateY(-44%);
}

.login-card {
  width: 100%;
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.login-field { margin-bottom: 20px; }
.login-field > label {
  display: block;
  margin: 0 0 9px;
  color: #0b3b63;
  font-size: 14px;
  line-height: 1.1;
  font-weight: 800;
}

.login-input-wrap { position: relative; }
.login-input-wrap > svg {
  position: absolute;
  top: 50%;
  left: 18px;
  width: 20px;
  height: 20px;
  transform: translateY(-50%);
  fill: none;
  stroke: #6685a3;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

#loginOverlay .login-input-wrap .form-control {
  width: 100%;
  height: 58px;
  padding: 0 52px;
  border: 1px solid rgba(255,255,255,.84);
  border-radius: 13px;
  outline: none;
  background: rgba(255,255,255,.94);
  color: #123d5f;
  box-shadow: 0 11px 27px rgba(25, 81, 117, .12), inset 0 0 0 1px rgba(111, 157, 187, .08);
  font: 650 14px/1 inherit;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

#loginOverlay .login-input-wrap .form-control::placeholder { color: #798c9c; opacity: 1; }
#loginOverlay .login-input-wrap .form-control:focus {
  border-color: rgba(0, 154, 211, .72);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(8, 157, 211, .13), 0 14px 30px rgba(25, 81, 117, .14);
}

.login-password-toggle {
  position: absolute;
  top: 50%;
  right: 12px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  transform: translateY(-50%);
  background: transparent;
  color: #5d84a2;
  cursor: pointer;
}
.login-password-toggle:hover,
.login-password-toggle:focus-visible { background: rgba(4, 148, 205, .1); outline: none; }
.login-password-toggle svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; }

.login-forgot {
  display: block;
  margin: -8px 0 18px auto;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: #4aa8cf;
  font: 750 13px/1.2 inherit;
  cursor: pointer;
}
.login-forgot:hover,
.login-forgot:focus-visible { color: #057eaf; text-decoration: underline; outline: none; }

.login-feedback { min-height: 0; margin: 0; color: #a42020; font-size: 12px; line-height: 1.35; font-weight: 700; }
.login-feedback:not(:empty) { min-height: 18px; margin: -8px 0 11px; }

.login-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 46px;
  width: 100%;
  min-height: 58px;
  padding: 0 30px;
  border: 1px solid rgba(0, 131, 187, .24);
  border-radius: 13px;
  background: linear-gradient(180deg, #13a9d6 0%, #0789c6 100%);
  color: #fff;
  box-shadow: 0 15px 28px rgba(0, 119, 176, .27), inset 0 1px 0 rgba(255,255,255,.25);
  font: 850 17px/1 inherit;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}
.login-submit:hover { transform: translateY(-1px); filter: saturate(1.08); box-shadow: 0 18px 32px rgba(0, 119, 176, .32), inset 0 1px 0 rgba(255,255,255,.25); }
.login-submit:focus-visible { outline: 3px solid rgba(5, 136, 194, .28); outline-offset: 3px; }
.login-submit:disabled { cursor: wait; opacity: .72; transform: none; }

.login-version { position: absolute; right: 24px; bottom: 18px; color: rgba(69, 106, 127, .85); font-size: 10px; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }

@media (max-width: 980px) {
  .login-overlay { background-position: 45% center; }
  .login-story { width: min(320px, 34vw); }
  .login-benefits, .login-signature { display: none; }
  .login-access { right: 4vw; width: min(390px, 42vw); }
}

@media (max-width: 720px) {
  .login-overlay {
    min-height: 100%;
    overflow-y: auto;
    background-position: 42% center;
  }
  .login-overlay::after { background: rgba(236, 249, 255, .68); backdrop-filter: blur(2px); }
  .login-brand { position: relative; top: auto; left: auto; width: 190px; margin: 26px auto 0 24px; }
  .login-language { top: 29px; right: 18px; }
  .login-story { position: relative; left: auto; bottom: auto; width: auto; margin: 48px 24px 24px; }
  .login-story h1 { font-size: clamp(32px, 10vw, 44px); }
  .login-story > p:not(.login-signature) { font-size: 14px; }
  .login-access { position: relative; top: auto; right: auto; width: auto; margin: 0 18px 58px; transform: none; }
  .login-card { padding: 24px; border: 1px solid rgba(255,255,255,.65); border-radius: 22px; background: rgba(243, 252, 255, .62); box-shadow: 0 24px 60px rgba(18, 73, 105, .14); backdrop-filter: blur(13px); }
  .login-version { position: fixed; }
}

@media (prefers-reduced-motion: reduce) {
  .login-submit, #loginOverlay .form-control { transition: none; }
}

.fat-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 16px; }
.fat-tab.ativa { background: var(--primary, #0f766e); color: #fff; }
.fat-graficos { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 16px 0; }
.fat-barra { background: #e2e8f0; height: 14px; border-radius: 8px; overflow: hidden; }
.fat-barra > span { display: block; height: 100%; background: #0f766e; }
.fat-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-bottom: 16px; }
.fat-relatorio { white-space: pre-wrap; font-size: 12px; max-height: 480px; overflow: auto; }
.fat-selo { font-weight: 700; letter-spacing: .04em; color: #0f766e; }
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
