/* ==========================================================================
   PORTAL DO CLIENTE - CENTRAL DE CHAMADOS & SUPORTE TÉCNICO (TISUPORTEMS)
   Design Clean: Fundo Branco, Tipografia Preta, Acentos PontoSmart e Canais Oficiais
   ========================================================================== */

:root {
  /* Cores Características do PontoSmart (Verde Sálvia & Acentos Florestais) */
  --ps-sage-deep: #4a6b5d;
  --ps-sage-light: #6b8e7d;
  --ps-forest-dark: #354e43;
  --ps-emerald-glow: rgba(74, 107, 93, 0.35);

  /* Identidade Corporativa TISUPORTEMS */
  --brand-blue-500: #0284c7;
  --brand-blue-600: #0369a1;

  /* Superfícies & Textos Claros */
  --bg-page: #f8fafc;
  --card-bg: #ffffff;
  --text-main: #0f172a;       /* Preto Grafite Intenso */
  --text-body: #334155;       /* Cinza Escuro de Alta Legibilidade */
  --text-muted: #64748b;      /* Cinza Médio */
  --border: #e2e8f0;          /* Borda Suave */
  --border-focus: #4a6b5d;
  --input-focus-ring: rgba(74, 107, 93, 0.2);

  /* Alertas */
  --error-bg: #fef2f2;
  --error-text: #991b1b;
  --error-border: #fecaca;
  --success-bg: #f0fdf4;
  --success-text: #166534;
  --success-border: #bbf7d0;

  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 8px;
  --shadow-subtle: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
  --shadow-card: 0 16px 36px -10px rgba(15, 23, 42, 0.08), 0 0 1px 1px rgba(0, 0, 0, 0.04);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 1. Barra de Acento Superior no Topo (Identidade Característica PontoSmart) */
.top-accent-bar {
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, var(--ps-forest-dark) 0%, var(--ps-sage-deep) 40%, var(--ps-sage-light) 75%, var(--brand-blue-500) 100%);
  position: relative;
  z-index: 100;
  box-shadow: 0 2px 8px var(--ps-emerald-glow);
}

.login-wrapper {
  display: flex;
  flex: 1;
  width: 100%;
  min-height: calc(100vh - 6px);
}

/* 2. Painel Lateral Visual (Desktop) - Fundo Branco e Letras Pretas */
.login-branding {
  display: none;
  width: 52%;
  background-color: #ffffff;
  color: var(--text-main);
  padding: 56px 52px;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--border);
  position: relative;
  box-shadow: 2px 0 16px rgba(0, 0, 0, 0.02);
}

/* Logo Oficial TISUPORTEMS */
.logo-box {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
}

.brand-logo-img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
}

.logo-text-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.logo-text {
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text-main);
}

.logo-subbadge {
  font-size: 0.725rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ps-sage-deep);
  font-weight: 700;
  background: rgba(74, 107, 93, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  width: fit-content;
}

/* Header de Textos Universais */
.branding-header h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 2.15rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
  color: var(--text-main);
}

.branding-header p {
  font-size: 1.025rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 32px;
  max-width: 92%;
}

/* 3. Painel de Canais Oficiais de Contato & Suporte */
.support-channels-panel {
  background-color: #fbfbfc;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-subtle);
  margin-bottom: 24px;
}

.channels-header {
  margin-bottom: 18px;
}

.channels-header h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.channels-header p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.channels-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.channel-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background-color: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.channel-card:hover {
  border-color: var(--ps-sage-deep);
  box-shadow: 0 6px 16px rgba(74, 107, 93, 0.12);
  transform: translateY(-2px);
}

.channel-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-whatsapp {
  background-color: #dcfce7;
  color: #16a34a;
}

.icon-email {
  background-color: #e0f2fe;
  color: #0284c7;
}

.icon-schedule {
  background-color: #f1f5f9;
  color: var(--ps-sage-deep);
}

.channel-details {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.channel-name {
  font-size: 0.925rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}

.channel-value {
  font-size: 0.885rem;
  font-weight: 700;
  color: var(--ps-sage-deep);
  letter-spacing: 0.2px;
}

.channel-desc {
  font-size: 0.775rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.channel-arrow {
  color: #cbd5e1;
  font-size: 1.1rem;
  font-weight: 700;
  transition: all 0.2s ease;
  padding-left: 8px;
}

.channel-card:hover .channel-arrow {
  color: var(--ps-sage-deep);
  transform: translateX(4px);
}

.channel-schedule {
  cursor: default;
}
.channel-schedule:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--border);
}

.branding-footer {
  font-size: 0.825rem;
  color: #94a3b8;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* 4. Painel do Formulário de Acesso (Direita) */
.login-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background-color: var(--bg-page);
}

.login-card {
  width: 100%;
  max-width: 430px;
  background: var(--card-bg);
  padding: 42px 36px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
  position: relative;
}

/* Acento elegante no topo do card */
.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
  background: linear-gradient(90deg, var(--ps-forest-dark), var(--ps-sage-deep), var(--ps-sage-light));
}

.card-header {
  margin-bottom: 26px;
}

.mobile-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.brand-logo-img-mobile {
  width: 38px;
  height: 38px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.mobile-logo-text {
  display: flex;
  flex-direction: column;
}

.mobile-subbadge {
  font-size: 0.7rem;
  color: var(--ps-sage-deep);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.card-header h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}

.card-header p {
  color: var(--text-muted);
  font-size: 0.925rem;
  line-height: 1.45;
}

.alert-box {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.885rem;
  margin-bottom: 20px;
  line-height: 1.4;
}

.alert-box.error {
  background-color: var(--error-bg);
  color: var(--error-text);
  border: 1px solid var(--error-border);
}

.alert-box.success {
  background-color: var(--success-bg);
  color: var(--success-text);
  border: 1px solid var(--success-border);
}

.hidden {
  display: none !important;
}

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

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

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrapper input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  color: var(--text-main);
  outline: none;
  transition: all 0.2s ease;
  background: #ffffff;
}

.input-wrapper input:focus {
  border-color: var(--ps-sage-deep);
  box-shadow: 0 0 0 3px var(--input-focus-ring);
}

.btn-toggle-eye {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  color: var(--text-muted);
  transition: color 0.15s ease, transform 0.15s ease;
}

.btn-toggle-eye:hover {
  color: var(--ps-sage-deep);
  transform: scale(1.08);
}

.eye-icon {
  width: 19px;
  height: 19px;
  stroke: currentColor;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  font-size: 0.85rem;
}

.remember-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  cursor: pointer;
}

.remember-label input[type="checkbox"] {
  accent-color: var(--ps-sage-deep);
  cursor: pointer;
}

.forgot-link {
  color: var(--ps-sage-deep);
  text-decoration: none;
  font-weight: 600;
}

.forgot-link:hover {
  text-decoration: underline;
  color: var(--ps-forest-dark);
}

/* Botão Principal com Sálvia e Floresta do PontoSmart */
.btn-submit {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, var(--ps-sage-deep) 0%, var(--ps-forest-dark) 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(74, 107, 93, 0.25);
}

.btn-submit:hover {
  background: linear-gradient(135deg, var(--ps-sage-light) 0%, var(--ps-sage-deep) 100%);
  box-shadow: 0 6px 16px rgba(74, 107, 93, 0.35);
  transform: translateY(-1px);
}

.btn-submit:active {
  transform: translateY(0);
}

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

.btn-loader {
  width: 18px;
  height: 18px;
  border: 2px solid #ffffff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.card-footer {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.825rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Responsividade */
@media (min-width: 960px) {
  .login-branding {
    display: flex;
  }
  .mobile-logo {
    display: none;
  }
}

/* Botão Link sem estilo padrão de botão */
.btn-link-text {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  text-align: left;
}

/* Modal 100% Full Screen Real e Responsivo */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  z-index: 1000;
  padding: 0;
  margin: 0;
}

.modal-backdrop.hidden {
  display: none !important;
}

.modal-card {
  background: #ffffff;
  border-radius: 0;
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  box-shadow: none;
  border: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

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

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 4px 0;
}

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

.modal-close {
  background: transparent;
  border: none;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.modal-body {
  padding: 2rem;
  overflow-y: auto;
  flex: 1;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.modal-body form,
#modal-recuperar-senha form {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
}

.modal-form-grid {
  width: 100%;
  max-width: 680px;
  background: #ffffff;
  padding: 2.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin: 0 auto;
}

.modal-form-grid .form-group {
  margin-bottom: 0;
}

.form-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
  display: block;
}

.modal-footer {
  padding: 1.25rem 2rem;
  border-top: 1px solid var(--border);
  background: #ffffff;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.btn-modal-secondary {
  padding: 12px 20px;
  background: #f1f5f9;
  color: var(--text-main);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.925rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-modal-secondary:hover {
  background: #e2e8f0;
}

.btn-modal-primary {
  width: auto;
  min-width: 220px;
  padding: 12px 24px;
}

