﻿/*
  ==================================================
  DESIGN SYSTEM BASE
  ==================================================
  Esta secao define variaveis visuais reutilizaveis para manter
  consistencia de cor, espacamento e interacao em toda a interface.
*/
:root {
  --color-primary: #0e4f84;
  --color-primary-hover: #0a3a62;
  --color-surface: #ffffff;
  --color-bg-1: #f7fafe;
  --color-bg-2: #e9f1f9;
  --color-border: #d6e2ee;
  --color-text: #1f2d3a;
  --color-muted: #5f6f7f;
  --color-danger: #c73737;
  --color-success: #1f7a47;
  --color-warning: #8a6a22;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-soft: 0 14px 30px rgba(9, 35, 61, 0.12);
  --focus-ring: 0 0 0 4px rgba(14, 79, 132, 0.2);
}

/* Reset basico para reduzir variacoes entre navegadores */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/*
  Corpo da pagina com gradiente sutil para aspecto moderno.
  Mobile-first: comecamos com espacamentos menores.
*/
body {
  /*min-height: 100vh;*/
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--color-text);
  background: #ecf0f1;
  padding: 18px;
}

/* Container principal centralizado */
.app {
  max-width: 760px;
  margin: 0 auto;
  position: relative;
}

/*
  Estrutura das telas:
  - Invisivel por padrao
  - Classe .is-active torna a tela visivel com transicao
*/
.screen {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  position: absolute;
  width: 100%;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.screen.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  position: relative;
}

/* Card principal de cada tela */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 22px;
}

/* Logo da empresa */
.logo-area {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}



/* Titulos */
h1,
h2 {
  font-size: 1.4rem;
  margin-bottom: 6px;
}

.subtitle {
  color: var(--color-muted);
  margin-bottom: 18px;
  font-size: 0.95rem;
}

/* Agrupamento de campos */
.field {
  display: flex;
  flex-direction: column;
  margin-bottom: 14px;
}

/* Rotulo dos campos */
label {
  margin-bottom: 6px;
  font-size: 0.92rem;
  font-weight: 600;
}

/* Inputs/select com foco acessivel */
input,
select {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 12px;
  font-size: 1rem;
  color: var(--color-text);
  background: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: var(--focus-ring);
}

/* Mensagens por campo */
.feedback {
  min-height: 18px;
  margin-top: 5px;
  font-size: 0.82rem;
  color: var(--color-danger);
}

/* Loading do CPF */
.loading {
  margin: 4px 0 12px;
  color: #2b5f87;
  font-weight: 600;
}

/* Feedback global de cada tela */
.global-feedback {
  min-height: 22px;
  margin-bottom: 12px;
  font-size: 0.9rem;
  color: var(--color-muted);
}

.global-feedback.success {
  color: var(--color-success);
}

.global-feedback.error {
  color: var(--color-danger);
}

.global-feedback.warning {
  color: var(--color-warning);
}

/* Botoes com hover */
.btn {
  border: none;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-weight: 700;
  font-size: 0.96rem;
  cursor: pointer;
  transition: transform 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.btn-primary {
  width: 100%;
  background: #EA0356;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(14, 79, 132, 0.25);
}

.btn-primary:hover {
  background: #be0348;
  transform: translateY(-1px);
}

.btn-secondary {
  background: #dce6ef;
  color: #2c4860;
}

.btn-secondary:hover {
  background: #d0dce8;
  transform: translateY(-1px);
}

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

/* Bloco de resumo da confirmacao */
.summary {
  background: #f7fbff;
  border: 1px solid #d6e3ef;
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 14px;
}

.summary p {
  margin-bottom: 8px;
  line-height: 1.4;
}

.summary p:last-child {
  margin-bottom: 0;
}

/* Selects da Tela 2 com largura compacta */
#summary-released,
#summary-status {
  width: min(100%, 320px);
  min-width: 180px;
  margin-left: 8px;
  display: inline-block;
  vertical-align: middle;
}

@media (max-width: 480px) {
  #summary-released,
  #summary-status {
    width: 100%;
    min-width: 0;
    margin-left: 0;
    margin-top: 6px;
    display: block;
  }
}

/* Acoes empilhadas no mobile */
.actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Ajustes para telas maiores */
@media (min-width: 700px) {
  body {
    padding: 30px;
  }

  .card {
    padding: 30px;
  }

  h1,
  h2 {
    font-size: 1.55rem;
  }

  .actions {
    flex-direction: row;
  }

  .actions .btn {
    width: auto;
    min-width: 220px;
  }
}
