/* =========================================================
   MEU PERFIL — VERSÃO PREMIUM (SaaS clean)
   ========================================================= */

:root {
  --bg:#f6f7fb;
  --card:#ffffff;
  --text:#1b1f23;
  --text-muted:#64748b;
  --primary:#1a73e8;
  --accent:#f97316;
  --accent-dark:#ea580c;
  --accent-blue:#002D62;
  --border:#e5e7eb;
}

/* =========================================================
   FUNDO
   ========================================================= */

.page.profile-page {
  padding: 40px 24px;
}

/* =========================================================
   CONTAINER
   ========================================================= */

.profile-page {
  max-width: 1000px;
  margin: 0 auto;
}

/* =========================================================
   TÍTULO
   ========================================================= */

.profile-page > h2 {
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  color: var(--text);
  margin-bottom: 30px;
}

/* =========================================================
   GRID
   ========================================================= */

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

@media (max-width: 1000px) {
  .profile-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   CARD
   ========================================================= */

.profile-card {
  background: #ffffff;
  border: 1px solid #e6eaf0;
  border-radius: 16px;
  padding: 28px;

  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
  transition: all .25s ease;

  display: flex;
  flex-direction: column;
}

.profile-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.10);
}

.profile-card h2 {
  font-size: 18px;
  margin-bottom: 16px;
}

/* =========================================================
   LABELS
   ========================================================= */

.profile-card label {
  font-weight: 600;
  margin-top: 16px;
  margin-bottom: 6px;
  color: #475569;
  font-size: 14px;
}

/* =========================================================
   INPUTS (PADRÃO LOGIN)
   ========================================================= */

.profile-card input {
  width: 100%;
  padding: 14px 16px;

  border-radius: 12px;
  border: 1px solid #dfe3ea;
  background: #f9fafb;

  font-size: 14px;
  transition: all .2s ease;
}

.profile-card input:hover {
  border-color: #cbd5e1;
}

.profile-card input:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 4px rgba(0,45,98,0.12);
  background: #ffffff;
}

/* Campo desabilitado */
.profile-card input[disabled] {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #64748b;
  cursor: not-allowed;
}

/* =========================================================
   LOGO PREVIEW
   ========================================================= */

.profile-page .logo-preview {
  width: 100%;
  max-width: 260px;
  height: 120px;

  background: #f8fafc;
  border: 1px dashed var(--border);
  border-radius: 12px;

  display: flex;
  align-items: center;
  justify-content: center;

  margin: 12px 0 16px;
  overflow: hidden;
}

.profile-page .logo-preview img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

.profile-page #logoPlaceholder {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

/* =========================================================
   BOTÕES
   ========================================================= */

.profile-card .actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}

.profile-card .actions button {
  border: none;
  border-radius: 12px;

  padding: 12px 22px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;

  cursor: pointer;

  background: linear-gradient(135deg, #002D62, #0a4ea3);
  box-shadow: 0 6px 18px rgba(0,45,98,0.25);

  transition: all .2s ease;
}

.profile-card .actions button:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #FF7F00, #ff9a2f);
  box-shadow: 0 10px 28px rgba(0,45,98,0.35);
}

.profile-card .actions button:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* =========================================================
   MENSAGENS
   ========================================================= */

.profile-page .msg {
  margin-top: 12px;
  font-size: 14px;
}

.profile-page .msg[data-type="success"] {
  color: #166534;
}

.profile-page .msg[data-type="error"] {
  color: #7f1d1d;
}

/* =========================================================
   INFO BOX
   ========================================================= */

.info-box {
  margin: 12px 0 18px;
  padding: 10px 12px;
  background: #f5f7fa;
  border-left: 4px solid #4c6ef5;
  font-size: 0.9rem;
  color: #333;
}

/* =========================================================
   HEADER CENTRALIZADO
   ========================================================= */

.header-centered {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

.header-title { 
  font-size: 18px; 
  font-weight: 700; 
  color: var(--accent-blue);
  white-space: nowrap;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 600px) {
  .row {
    grid-template-columns: 1fr;
  }
}


.header-left img {
  height: 40px;
  max-height: 40px;
}

/* =========================================================
   PROFILE — INPUTS E SELECTS NO PADRÃO DO LOGIN
   ========================================================= */

/* LABELS (alinhados ao login) */
.profile-card label {
  font-size: 14px;
  font-weight: 600;
  margin-top: 12px;
  margin-bottom: 2px;
  display: block;
  color: #222;
}

/* INPUTS — IGUAL AO LOGIN */
.profile-card input {
  width: 100%;
  padding: 16px 18px;
  font-size: 15px;
  border-radius: 12px;
  border: 1px solid #dfe3ea;
  background: #f9fafb;
  transition: all .2s ease;
  margin-bottom: 14px;
}

.profile-card input:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 4px rgba(0,45,98,0.12);
  background: #ffffff;
  outline: none;
}

/* INPUT DESABILITADO */
.profile-card input:disabled {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #64748b;
  cursor: not-allowed;
}

/* SELECT — IGUAL AO LOGIN */
.profile-card select {
  width: 100%;
  padding: 16px 18px;
  font-size: 15px;
  border-radius: 12px;
  border: 1px solid #dfe3ea;
  background: #f9fafb;
  transition: all .2s ease;
  margin-bottom: 14px;

  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24'%3E%3Cpath fill='%2364748b' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  background-size: 14px;
  cursor: pointer;
}

.profile-card select:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 4px rgba(0,45,98,0.12);
  background: #ffffff;
  outline: none;
}

/* SELECT DESABILITADO (Cidade antes da UF) */
.profile-card select:disabled {
  background-color: #f1f5f9;
  border-color: #e2e8f0;
  color: #64748b;
  cursor: not-allowed;
  background-image: none;
}

/* INPUT MANUAL DE CIDADE (fallback) */
#profileCityManual {
  width: 100%;
  padding: 16px 18px;
  font-size: 15px;
  border-radius: 12px;
  border: 1px solid #dfe3ea;
  background: #f9fafb;
  transition: all .2s ease;
  margin-bottom: 14px;
}

#profileCityManual:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 4px rgba(0,45,98,0.12);
  background: #ffffff;
  outline: none;
}

/* AVISO DE FALLBACK (não erro) */
#profileLocMsg {
  margin-top: 6px;
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;

  background: #fef3c7;
  border: 1px solid #fde68a;
  color: #92400e;
}
/* ==========================================================================
   Modal de exclusao de conta
   Vive nesta folha, e nao na do dashboard, porque so esta pagina o usa.
   O vermelho e o mesmo do .profile-setting-danger, para o aviso ter a
   mesma voz do botao que abriu o modal.
   ========================================================================== */

.conta-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(8, 20, 38, .55);
}

.conta-modal[hidden] { display: none; }

.conta-modal__box {
  width: 100%;
  max-width: 460px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: #fff;
  color: #172033;
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 24px 60px rgba(0, 22, 49, .28);
}

.conta-modal__box h3 {
  margin: 0 0 12px;
  font-size: 1.15rem;
  color: #c33b32;
}

.conta-modal__lead { margin: 0 0 8px; font-size: .92rem; }

.conta-modal__list {
  margin: 0 0 16px;
  padding-left: 20px;
  font-size: .92rem;
  line-height: 1.55;
}

/* Nota de rodape do resumo: informa a retencao fiscal sem competir com a
   lista, que e o que de fato se perde. */
.conta-modal__note {
  margin: -8px 0 16px;
  font-size: .82rem;
  line-height: 1.5;
  color: #697386;
}

.theme-dark .conta-modal__note { color: #9fb0c9; }

.conta-modal__warn {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-left: 4px solid #c33b32;
  border-radius: 6px;
  background: rgba(195, 59, 50, .07);
  font-size: .88rem;
}

.conta-modal__label {
  display: block;
  margin-bottom: 6px;
  font-size: .85rem;
  font-weight: 600;
}

.conta-modal__input {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid #d6dbe4;
  border-radius: 8px;
  font-size: .95rem;
  font-family: inherit;
}

.conta-modal__input:focus {
  outline: 2px solid rgba(195, 59, 50, .35);
  outline-offset: 1px;
  border-color: #c33b32;
}

.conta-modal__error {
  min-height: 1.2em;
  margin: 0 0 12px;
  font-size: .85rem;
  color: #b42318;
}

/* Aceite: precisa ser lido, entao nao vai para o cinza da nota de rodape,
   mas tambem nao disputa com a faixa vermelha do prazo. */
.conta-modal__consent {
  margin: 0 0 16px;
  padding-top: 14px;
  border-top: 1px solid #e6eaf0;
  font-size: .84rem;
  line-height: 1.55;
  color: #48536b;
}

.theme-dark .conta-modal__consent {
  border-top-color: #2a3a55;
  color: #c3cfe2;
}

.conta-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.conta-modal__btn {
  padding: 10px 18px;
  border: 1px solid #d6dbe4;
  border-radius: 8px;
  background: #fff;
  color: #172033;
  font-family: inherit;
  font-size: .92rem;
  font-weight: 600;
  cursor: pointer;
}

.conta-modal__btn:hover { background: #f5f7fb; }

.conta-modal__btn--danger {
  border-color: #c33b32;
  background: #c33b32;
  color: #fff;
}

.conta-modal__btn--danger:hover { background: #a82f27; border-color: #a82f27; }

/* Desabilitado precisa parecer desabilitado: o botao so libera quando a senha
   e a frase estao preenchidas. */
.conta-modal__btn--danger:disabled {
  background: #e3c6c4;
  border-color: #e3c6c4;
  color: #fff;
  cursor: not-allowed;
}

/* Tema escuro: a pagina inteira nao muda, mas o modal flutua sobre ela e
   ficaria branco no meio do escuro. */
.theme-dark .conta-modal__box {
  background: #16233a;
  color: #e8edf6;
}

.theme-dark .conta-modal__input {
  background: #0f1a2c;
  border-color: #2a3a55;
  color: #e8edf6;
}

.theme-dark .conta-modal__btn {
  background: #1d2c47;
  border-color: #2a3a55;
  color: #e8edf6;
}

.theme-dark .conta-modal__btn:hover { background: #24344f; }

.theme-dark /* Nota de rodape do resumo: informa a retencao fiscal sem competir com a
   lista, que e o que de fato se perde. */
.conta-modal__note {
  margin: -8px 0 16px;
  font-size: .82rem;
  line-height: 1.5;
  color: #697386;
}

.theme-dark .conta-modal__note { color: #9fb0c9; }

.conta-modal__warn { background: rgba(195, 59, 50, .16); }
