/* =========================================================
   ALPES — Área do Representante
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue-900: #0F172A;
  --blue-800: #1E3A5F;
  --blue-700: #1D4ED8;
  --blue-600: #2563EB;
  --blue-500: #3B82F6;
  --blue-50:  #EFF6FF;
  --green-600: #059669;
  --gray-900: #111827;
  --gray-700: #374151;
  --gray-500: #6B7280;
  --gray-200: #E5E7EB;
  --gray-100: #F3F4F6;
  --gray-50:  #F9FAFB;
  --white: #FFFFFF;
  --shadow-md: 0 4px 16px rgba(0,0,0,.12);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.18);
  --shadow-xl: 0 24px 60px rgba(0,0,0,.25);
  --shadow-blue: 0 8px 32px rgba(29,78,216,.30);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;
  --radius-full: 9999px;
  --transition: all .3s cubic-bezier(.4,0,.2,1);
  --font-body: 'Inter', system-ui, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;
}

html { font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--gray-50);
  color: var(--gray-700);
  line-height: 1.6;
  min-height: 100vh;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; font-family: inherit; }
img { max-width: 100%; display: block; }

/* ---- Header ---- */
.rep-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--gray-200);
  box-shadow: 0 2px 16px rgba(0,0,0,.06);
}
.rep-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.rep-logo img {
  height: 38px;
  background: var(--white);
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
}
.rep-back {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .875rem;
  font-weight: 600;
  color: var(--gray-500);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--gray-200);
  transition: var(--transition);
}
.rep-back:hover {
  background: var(--blue-50);
  color: var(--blue-700);
  border-color: var(--blue-700);
}

/* ---- Login ---- */
.rep-main {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 100px 24px 40px;
}
.rep-bg {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, var(--blue-900) 0%, #0D2856 50%, #0a1a3a 100%);
  z-index: 0;
}
.rep-bg-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 40%, rgba(29,78,216,.25) 0%, transparent 60%),
              radial-gradient(ellipse at 20% 80%, rgba(7,100,150,.15) 0%, transparent 50%);
}

.rep-login-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 460px;
}

.rep-login-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 48px 44px;
  box-shadow: var(--shadow-xl);
  text-align: center;
  animation: slideUp .5s ease;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.rep-card-icon {
  width: 72px;
  height: 72px;
  background: var(--blue-50);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--blue-700);
  margin: 0 auto 24px;
}
.rep-login-card h1 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--blue-900);
  margin-bottom: 8px;
}
.rep-login-card > p {
  font-size: .9rem;
  color: var(--gray-500);
  margin-bottom: 36px;
  line-height: 1.6;
}

.rep-form { text-align: left; }
.rep-form-group {
  margin-bottom: 20px;
}
.rep-form-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 8px;
}
.rep-form-group label i {
  color: var(--blue-700);
  font-size: .85rem;
}
.rep-form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: .95rem;
  color: var(--gray-900);
  background: var(--white);
  transition: var(--transition);
  outline: none;
}
.rep-form-group input:focus {
  border-color: var(--blue-700);
  box-shadow: 0 0 0 3px rgba(29,78,216,.1);
}
.rep-input-wrap {
  position: relative;
}
.rep-input-wrap input {
  padding-right: 48px;
}
.rep-toggle-pw {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--gray-400, #9CA3AF);
  font-size: .95rem;
  cursor: pointer;
  transition: var(--transition);
  padding: 4px;
}
.rep-toggle-pw:hover { color: var(--blue-700); }

.rep-error {
  display: none;
  align-items: center;
  gap: 10px;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #DC2626;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: .85rem;
  margin-bottom: 20px;
}
.rep-error.show { display: flex; }

.rep-btn-login {
  width: 100%;
  padding: 14px;
  background: var(--blue-700);
  color: var(--white);
  border-radius: var(--radius-full);
  font-size: 1rem;
  font-weight: 700;
  transition: var(--transition);
  box-shadow: var(--shadow-blue);
}
.rep-btn-login:hover {
  background: var(--blue-600);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(29,78,216,.4);
}
.rep-btn-login:disabled {
  opacity: .7;
  cursor: not-allowed;
  transform: none;
}

.rep-help {
  font-size: .82rem;
  color: var(--gray-500);
  margin-top: 24px;
}
.rep-help a {
  color: var(--blue-700);
  font-weight: 600;
}
.rep-help a:hover { text-decoration: underline; }

/* ---- Área protegida ---- */
.rep-content {
  padding-top: 72px;
  min-height: 100vh;
  background: var(--gray-50);
}

.rep-content-header {
  background: var(--blue-900);
  padding: 0;
}
.rep-content-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.rep-welcome {
  display: flex;
  align-items: center;
  gap: 16px;
}
.rep-content-logo {
  height: 38px;
  background: var(--white);
  padding: 5px 8px;
  border-radius: var(--radius-sm);
}
.rep-welcome-label {
  display: block;
  font-size: .72rem;
  color: rgba(255,255,255,.5);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.rep-welcome-name {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
}
.rep-logout {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.1);
  color: rgba(255,255,255,.8);
  border: 1.5px solid rgba(255,255,255,.2);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: .875rem;
  font-weight: 600;
  transition: var(--transition);
}
.rep-logout:hover {
  background: rgba(255,255,255,.2);
  color: var(--white);
  border-color: rgba(255,255,255,.4);
}

.rep-dashboard {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 32px 80px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.rep-section {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 40px;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-md);
}
.rep-section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.rep-section-header i {
  width: 44px;
  height: 44px;
  background: var(--blue-50);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--blue-700);
}
.rep-section-header h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--blue-900);
}
.rep-section > p {
  font-size: .9rem;
  color: var(--gray-500);
  margin-bottom: 28px;
  line-height: 1.7;
}

/* Catálogo card */
.rep-catalogo-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 32px;
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  padding: 28px;
  border: 1px solid var(--gray-200);
}
.rep-catalogo-cover {
  background: linear-gradient(135deg, var(--blue-800), var(--blue-900));
  border-radius: var(--radius-md);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 220px;
}
.rep-catalogo-cover img {
  width: 100%;
  background: var(--white);
  padding: 6px 8px;
  border-radius: var(--radius-sm);
}
.rep-cover-info { margin-top: 16px; }
.rep-cover-info span {
  display: block;
  font-size: .65rem;
  color: rgba(255,255,255,.5);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.rep-cover-info strong {
  display: block;
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
}

.rep-catalogo-info h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--blue-900);
  margin-bottom: 16px;
}
.rep-catalogo-info ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 28px;
}
.rep-catalogo-info li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .875rem;
  color: var(--gray-700);
}
.rep-catalogo-info li i {
  color: var(--green-600);
  font-size: .9rem;
}
.rep-catalogo-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.rep-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-size: .9rem;
  font-weight: 700;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}
.rep-btn-primary {
  background: var(--blue-700);
  color: var(--white);
  box-shadow: var(--shadow-blue);
}
.rep-btn-primary:hover {
  background: var(--blue-600);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(29,78,216,.4);
}
.rep-btn-outline {
  background: transparent;
  color: var(--blue-700);
  border: 2px solid var(--blue-700);
}
.rep-btn-outline:hover {
  background: var(--blue-50);
  transform: translateY(-2px);
}

.rep-file-info {
  font-size: .78rem;
  color: var(--gray-400, #9CA3AF);
  display: flex;
  align-items: center;
  gap: 6px;
}
.rep-file-info i { color: #EF4444; }

/* Contatos */
.rep-contatos-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.rep-contato-card {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  transition: var(--transition);
}
.rep-contato-card:hover {
  background: var(--white);
  box-shadow: var(--shadow-md);
  border-color: var(--gray-300, #D1D5DB);
}
.rep-contato-icon {
  width: 44px;
  height: 44px;
  background: var(--blue-700);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.1rem;
  margin: 0 auto 12px;
}
.rep-contato-card strong {
  display: block;
  font-size: .8rem;
  font-weight: 700;
  color: var(--gray-700);
  margin-bottom: 6px;
}
.rep-contato-card a,
.rep-contato-card span {
  font-size: .875rem;
  color: var(--blue-700);
  font-weight: 600;
  line-height: 1.5;
}
.rep-contato-card a:hover { text-decoration: underline; }
.rep-contato-card span { color: var(--gray-500); }

/* Responsive */
@media (max-width: 768px) {
  .rep-login-card { padding: 36px 28px; }
  .rep-catalogo-card { grid-template-columns: 1fr; }
  .rep-contatos-grid { grid-template-columns: 1fr 1fr; }
  .rep-dashboard { padding: 32px 20px 60px; }
  .rep-section { padding: 28px 24px; }
}
@media (max-width: 480px) {
  .rep-contatos-grid { grid-template-columns: 1fr; }
  .rep-catalogo-actions { flex-direction: column; }
  .rep-header-inner { padding: 14px 20px; }
  .rep-content-header-inner { padding: 16px 20px; }
}
