/* ============================================================
   Radiante v2 — Componentes
   Botoes, badges, cifras, metricas, modal
   ============================================================ */

/* --- Botoes --- */
.btn {
  font-family: 'Google Sans Text', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  min-height: 2.5rem;
  padding: 0.5625rem 0.875rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text-primary);
  box-shadow: none;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn:hover:not(:disabled) {
  background: var(--bg-surface-variant);
  border-color: rgba(0, 0, 0, 0.12);
}

.btn:active:not(:disabled) {
  background: #e8eef8;
}

.btn:focus-visible {
  outline: 2px solid rgba(11, 87, 208, 0.35);
  outline-offset: 2px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.actions .btn {
  font-size: 0.8125rem;
  padding: 0.5rem 0.75rem;
}

.actions .btn svg {
  width: 1.125rem;
  height: 1.125rem;
}

.btn-primary {
  background: var(--accent-blue);
  color: white;
  border-color: var(--accent-blue);
}

.btn-primary:hover:not(:disabled) {
  background: #1557b0;
  border-color: #1557b0;
}

.btn-upload {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: #fff;
}

.btn-upload:hover {
  background: #1557b0;
  border-color: #1557b0;
}

.btn-clear {
  background: var(--bg-surface, #fff);
  border: 1px solid var(--border-subtle, #e3e3e3);
  padding: 0.5rem;
  min-width: 2.5rem;
  min-height: 2.5rem;
  color: var(--text-secondary, #474747);
}

.btn-clear:hover:not(:disabled) {
  background: var(--bg-surface-variant);
  border-color: var(--danger);
  color: var(--danger);
}

.btn-icon {
  width: 2rem;
  height: 2rem;
  min-width: 2rem;
  min-height: 2rem;
  padding: 0;
  justify-content: center;
  margin-left: auto;
  color: var(--text-secondary);
}

.btn-icon.is-spinning svg {
  animation: spin 0.75s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .btn-icon.is-spinning svg {
    animation: none;
  }
}

.btn-download {
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  border-color: rgba(22, 163, 74, 0.3);
  color: var(--success);
  font-weight: 500;
  gap: 0.5rem;
}

.btn-danger {
  background: transparent;
  color: black;
  font-weight: bold;
  border: 1px solid var(--danger);
}

.btn-danger:hover:not(:disabled) {
  background: #9c1f19;
  border-color: #9c1f19;
  color: white;
  box-shadow: 0 4px 12px rgba(179, 38, 30, 0.2);
}

.modal-actions .btn {
  color: black;
  font-weight: 500;
  background: transparent;
}

/* --- Pastas (033) --- */
.folder-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.folder-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--outline-variant, #c4c7c5);
}
.folder-row:last-child {
  border-bottom: none;
}
.folder-row-title {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}
.folder-label {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.folder-meta {
  font-size: 0.8rem;
  color: var(--on-surface-variant, #444746);
}
.folder-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

/* --- Arquivos salvos --- */
.saved-files-status {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 0.625rem;
}

.saved-files-list,
.analysis-history-list {
  min-width: 0;
}

.file-list,
.history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 22rem;
  overflow-x: hidden;
  overflow-y: auto;
}

.file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0.75rem 0.875rem;
  border: 1px solid var(--border-subtle);
  border-radius: 0.5rem;
  background: var(--bg-surface);
  min-width: 0;
}

.file-row-main {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-width: 0;
  flex: 1;
}

.file-row-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.file-row-actions .btn {
  min-height: 2rem;
  padding: 0.375rem 0.625rem;
  font-size: 0.75rem;
  white-space: nowrap;
}

.file-row-actions .btn.btn-primary {
  background: #0b57d0;
  border-color: #0b57d0;
  color: #fff;
}

.file-row-actions .btn.btn-primary:hover:not(:disabled) {
  background: #1557b0;
  border-color: #1557b0;
  color: #fff;
}

.saved-file-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-blue);
  flex-shrink: 0;
}

.saved-file-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.saved-files-empty {
  padding: 1rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.875rem;
  background: var(--bg-surface);
}

.saved-files-empty.is-error {
  border-color: rgba(179, 38, 30, 0.3);
  color: var(--danger);
}

.history-list {
  gap: 0.75rem;
}

.history-row {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  padding: 1rem 1.125rem;
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

.history-row-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.history-row-heading {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
  flex: 1;
}

.history-row-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.625rem;
  margin-top: 0.875rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e8edf3;
}

.history-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: #5e6e82;
  background: transparent;
  border: 0;
  border-radius: 0.375rem;
  padding: 0;
  white-space: nowrap;
}

.history-chip-time svg {
  flex-shrink: 0;
}

.history-chip-mode {
  font-weight: 600;
  color: #3d4f63;
  background: #e8edf3;
  padding: 0.2rem 0.5rem;
}

.analysis-history-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #1f1f1f;
  overflow-wrap: anywhere;
  line-height: 1.3;
}

.analysis-history-meta {
  font-size: 0.8125rem;
  font-weight: 400;
  color: #5e6e82;
  overflow-wrap: anywhere;
}

.analysis-history-value {
  margin-left: auto;
  font-size: 0.8125rem;
  color: #146c2e;
  font-weight: 700;
  white-space: nowrap;
  background: #eef2f6;
  border-radius: 0.375rem;
  padding: 0.25rem 0.625rem;
}

.analysis-history-open {
  flex-shrink: 0;
  min-height: 2.25rem;
  padding: 0.5rem 1rem;
  white-space: nowrap;
  background: #1f1f1f;
  border-color: #1f1f1f;
  color: #fff;
  font-weight: 600;
  border-radius: 0.5rem;
}

.analysis-history-open:hover:not(:disabled) {
  background: #111;
  border-color: #111;
  color: #fff;
}

/* Legacy table helpers (kept for non-workspace tables if any) */
.data-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: 0.5rem;
  background: var(--bg-surface);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.875rem;
}

.data-table th,
.data-table td {
  padding: 0.625rem 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

.data-table th {
  color: var(--text-muted);
  font-size: 0.6875rem;
  font-weight: 600;
  text-align: left;
  background: var(--bg-surface-variant);
  text-transform: uppercase;
  letter-spacing: 0;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

/* --- Badges --- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.2;
}

.badge-certa {
  background: var(--success-subtle);
  color: var(--success);
}

.badge-provavel {
  background: var(--info-subtle);
  color: var(--info);
}

.badge-possivel {
  background: var(--warning-subtle);
  color: var(--warning);
}

.badge-improvavel {
  background: #f3e8ff;
  color: #6b21a8;
}

.badge-remota {
  background: var(--bg-surface-variant);
  color: var(--text-secondary);
}

/* --- Cifras --- */
.cifras-list {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin-top: 0.75rem;
}

.cifra-row-item {
  display: flex;
  flex-direction: column;
  padding: 0.875rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 0.5rem;
}

.cifra-row-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.cifra-info-block {
  flex: 1;
  min-width: 200px;
}

.cifra-name-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
}

.cifra-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

.cifra-values-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 1.25rem;
}

.cifra-value-pill {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.125rem;
}

.cifra-value-label {
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}

.cifra-value-amount {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 500;
}

.cifra-value-amount.allocated {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--success);
  letter-spacing: -0.02em;
}

.cifra-row-body {
  margin-top: 0.625rem;
  padding-top: 0.625rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.cifra-row-body.is-clamped {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.cifra-row-body.is-expanded {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}

.cifra-desc-toggle {
  align-self: flex-start;
  margin-top: 0.375rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent-blue);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.cifra-desc-toggle:hover {
  text-decoration: underline;
}

.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 2.5rem 1.5rem;
  font-size: 0.875rem;
}

/* --- Skeleton loading (nao usar durante polling) --- */
.skeleton {
  display: block;
  background: linear-gradient(90deg, #e8edf3 0%, #f7fafc 40%, #e8edf3 80%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.15s ease-in-out infinite;
  border-radius: 0.375rem;
}

.skeleton-line {
  height: 0.75rem;
}

.skeleton-line.w-40 { width: 40%; }
.skeleton-line.w-55 { width: 55%; }
.skeleton-line.w-70 { width: 70%; }
.skeleton-line.w-90 { width: 90%; }

.skeleton-file-row,
.skeleton-history-card,
.skeleton-cifra-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.875rem 1rem;
  border-radius: 0.75rem;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.skeleton-file-row {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  border-radius: 0.5rem;
  box-shadow: none;
  border: 1px solid var(--border-subtle, #e3e3e3);
}

.skeleton-file-main {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  flex: 1;
  min-width: 0;
}

.skeleton-file-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.skeleton-btn {
  width: 5.5rem;
  height: 2rem;
  border-radius: 0.375rem;
}

.skeleton-history-card {
  padding: 1rem 1.125rem;
}

.skeleton-history-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.skeleton-history-heading {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  flex: 1;
}

.skeleton-open {
  width: 4.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  flex-shrink: 0;
}

.skeleton-history-footer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e8edf3;
}

.skeleton-chip {
  width: 5.5rem;
  height: 1.25rem;
  border-radius: 0.375rem;
}

.skeleton-chip.wide {
  width: 7rem;
  margin-left: auto;
}

.skeleton-cifra-row {
  border: 1px solid var(--border-subtle, #e3e3e3);
  border-radius: 0.5rem;
  box-shadow: none;
}

.skeleton-cifra-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.meta-value.is-skeleton,
.kpi-value.is-skeleton {
  color: transparent !important;
  min-height: 1rem;
  min-width: 7rem;
  display: inline-block;
  background: linear-gradient(90deg, #e8edf3 0%, #f7fafc 40%, #e8edf3 80%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.15s ease-in-out infinite;
  border-radius: 0.25rem;
}

.skeleton-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* --- KPI Footer --- */
.kpi-footer {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 1rem 1.125rem;
  margin-top: 1.25rem;
  border: 1px solid rgba(20, 108, 46, 0.2);
  border-radius: 0.5rem;
  background: var(--success-subtle);
}

.kpi-label {
  font-size: 0.875rem;
  color: var(--success);
  font-weight: 600;
}

.kpi-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--success);
  letter-spacing: -0.02em;
}

/* --- Metricas --- */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.metric-card {
  background: var(--bg-surface-variant);
  border-radius: var(--radius-md);
  padding: 1rem;
  border: 1px solid var(--border-subtle);
}

.metric-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.metric-label {
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

.metric-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--info);
  letter-spacing: -0.01em;
}

.metric-value.highlight {
  font-size: 1rem;
  color: var(--accent);
}


/* --- Modal --- */
.modal-content.alert-dialog {
  background: var(--bg-surface);
  max-width: 400px;
  width: 100%;
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-lg);
  transform: scale(0.95);
  animation: modalScaleUp 0.25s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  box-sizing: border-box;
}

.clear-modal-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.modal-body {
  margin-bottom: 1.75rem;
}

.modal-body p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.modal-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

.pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* --- Help Modal --- */
.help-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1.5rem;
  animation: helpFadeIn 0.2s ease;
}

.help-modal {
  background: #ffffff;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
  animation: helpSlideUp 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  overflow: hidden;
}

.help-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
  background: #ffffff;
}

.help-modal-header-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.help-modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.help-modal-subtitle {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0.125rem 0 0;
}

.btn-help-close {
  background: transparent;
  border: none;
  border-radius: var(--radius-pill);
  padding: 0.5rem;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-help-close:hover {
  background: var(--bg-surface-variant);
  color: var(--text-primary);
}

.help-modal-body {
  padding: 2rem;
  overflow-y: auto;
  flex: 1;
  line-height: 1.7;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  background: #ffffff;
}

.help-loading {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

/* Botao de ajuda no header */
.btn-help {
  background: transparent;
  border: 1px solid var(--border-subtle);
  padding: 0.625rem;
  min-width: auto;
  color: var(--text-secondary);
}

.btn-help:hover:not(:disabled) {
  background: var(--bg-surface-variant);
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

/* Markdown styles dentro do modal */
.help-modal-body h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 2rem 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.help-modal-body h1:first-child {
  margin-top: 0;
}

.help-modal-body h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 1.75rem 0 0.5rem;
}

.help-modal-body h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 1.5rem 0 0.5rem;
}

.help-modal-body p {
  margin: 0.5rem 0;
  color: var(--text-secondary);
  line-height: 1.7;
}

.help-modal-body strong {
  font-weight: 600;
  color: var(--text-primary);
}

.help-modal-body ul,
.help-modal-body ol {
  margin: 0.5rem 0;
  padding-left: 1.5rem;
}

.help-modal-body li {
  margin: 0.375rem 0;
}

.help-modal-body hr {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: 1.5rem 0;
}

.help-modal-body blockquote {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  background: var(--info-subtle);
  border-left: 4px solid var(--accent-blue);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.help-modal-body blockquote p {
  margin: 0;
}

.help-modal-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.8125rem;
}

.help-modal-body th {
  background: var(--bg-surface-variant);
  font-weight: 600;
  color: var(--text-primary);
  text-align: left;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--border-subtle);
}

.help-modal-body td {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.help-modal-body code {
  font-family: 'Google Sans Mono', 'Courier New', monospace;
  font-size: 0.8125rem;
  background: var(--bg-surface-variant);
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  color: var(--text-primary);
}

.help-modal-body pre {
  background: var(--bg-surface-variant);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 1rem;
  overflow-x: auto;
  margin: 1rem 0;
  font-size: 0.8125rem;
  line-height: 1.5;
}

.help-modal-body pre code {
  background: none;
  padding: 0;
  border-radius: 0;
}

@keyframes helpFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes helpSlideUp {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* --- Login --- */
.hidden {
  display: none !important;
}

.login-screen {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(120deg, rgba(8, 27, 54, 0.04), rgba(11, 87, 208, 0.05) 42%, rgba(20, 108, 46, 0.05)),
    #f6f8fb;
  overflow: hidden;
}

.login-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(8, 27, 54, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(8, 27, 54, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(90deg, #000 0%, rgba(0,0,0,0.45) 55%, transparent 100%);
  opacity: 0.7;
  pointer-events: none;
}

.login-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 980px;
  min-height: 560px;
  padding: 1.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  align-items: stretch;
  gap: 0;
}

.login-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 2rem;
  color: #ffffff;
  background:
    linear-gradient(145deg, rgba(11, 87, 208, 0.35), rgba(20, 108, 46, 0.18)),
    #07182f;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-right: 0;
  border-radius: 8px 0 0 8px;
  box-shadow: 0 24px 60px rgba(7, 24, 47, 0.18);
}

.login-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.07) 1px, transparent 1px);
  background-size: 36px 36px;
  opacity: 0.28;
}

.login-visual-header,
.login-visual-main,
.login-visual-footer {
  position: relative;
  z-index: 1;
}

.login-visual-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
}

.login-visual-status,
.login-visual-footer span {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0;
  color: rgba(255, 255, 255, 0.78);
}

.login-visual-status {
  padding: 0.375rem 0.625rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.login-visual-main {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 340px;
}

.login-secure-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(72vw, 260px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(255,255,255,0.2), transparent 58%),
    rgba(255,255,255,0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.login-secure-ring {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 116px;
  height: 116px;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
}

.login-secure-ring svg {
  width: 3.75rem;
  height: 3.75rem;
}

.login-visual-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.login-visual-footer span {
  padding: 0.375rem 0.625rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.login-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--bg-surface);
  border: 1px solid rgba(8, 27, 54, 0.08);
  border-left: 0;
  border-radius: 0 8px 8px 0;
  padding: 2.5rem;
  box-shadow: 0 24px 60px rgba(7, 24, 47, 0.12);
}

.login-brand {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

.login-brand-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  flex-shrink: 0;
  border-radius: 8px;
  background: #07182f;
  color: var(--accent-blue);
}

.login-brand-icon svg {
  color: #ffffff;
}

.login-brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.login-title {
  font-size: 1.875rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
  letter-spacing: 0;
  line-height: 1.1;
}

.login-separator {
  color: var(--border-subtle);
  font-size: 0.75rem;
}

.login-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
}

.login-copy {
  margin-bottom: 1.25rem;
}

.login-heading {
  margin: 0 0 0.375rem;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
}

.login-lead {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.login-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.login-input {
  width: 100%;
  min-height: 46px;
  padding: 0.75rem 0.875rem;
  border: 1px solid #ccd6e3;
  border-radius: 8px;
  font: inherit;
  color: var(--text-primary);
  background: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.login-input::placeholder {
  color: var(--input-placeholder);
}

.login-input:focus-visible {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(11, 87, 208, 0.14);
}

.login-error {
  display: none;
  margin: 0;
  padding: 0.75rem 1rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--danger);
  background: var(--danger-subtle);
  border: 1px solid rgba(179, 38, 30, 0.15);
  border-radius: 8px;
}

.login-error:not(:empty) {
  display: block;
}

.login-submit {
  width: 100%;
  min-height: 48px;
  justify-content: center;
  margin-top: 0.25rem;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(11, 87, 208, 0.22);
}

.login-footer {
  margin: 1.25rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

.app-root.hidden {
  display: none;
}

