/* ============================================
   REDE G - Login Page Modern Styles
   Cores da empresa mantidas (#e55010)
   ============================================ */

/* === CSS Variables === */
:root {
  --primary: #e55010;
  --primary-light: #ff8c42;
  --primary-dark: #c44009;
  --bg-page: #f0f2f5;
  --bg-card: #ffffff;
  --text-dark: #2d2d2d;
  --text-muted: #6c757d;
  --border-light: #e0e0e0;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 8px 24px rgba(229, 80, 16, 0.12), 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 32px rgba(229, 80, 16, 0.12), 0 6px 16px rgba(0, 0, 0, 0.08);
  --transition: all 0.3s ease;
  --border-radius: 12px;
}

/* === Base Styles === */
html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  margin: 0;
  padding: 0;
  background: var(--bg-page);
  background-image: 
    radial-gradient(circle at 20% 80%, rgba(229, 80, 16, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 140, 66, 0.05) 0%, transparent 50%);
  min-height: 100vh;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* === Focus States === */
.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 3px rgba(229, 80, 16, 0.25);
  border-color: var(--primary);
  outline: none;
}

/* === Main Layout === */
.divgrande {
  display: flex;
  min-height: calc(100vh - 40px);
  padding: 1rem 2rem;
  gap: 2rem;
  max-width: 100%;
  margin: 0 auto;
  align-items: stretch;
  justify-content: center;
}

/* === Indices Section === */
.indices {
  background: var(--bg-card);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem;
  animation: fadeInLeft 0.5s ease-out;
  flex: 1;
  max-width: 550px;
  display: flex;
  flex-direction: column;
}

.indices-heading {
  color: var(--primary);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.indices-heading::before {
  content: "📊";
}

.indices iframe {
  border-radius: 6px;
  margin-bottom: 1rem;
  width: 100%;
  flex: 1;
  min-height: 200px;
}

/* === Login Card === */
.cleitin {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: none;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: fadeInUp 0.5s ease-out;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

/* === Login Header (Logo Area) === */
.login-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  padding: 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.login-header::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
  pointer-events: none;
}

.login-header img {
  max-width: 180px;
  height: auto;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
  transition: var(--transition);
}

.login-header img:hover {
  transform: scale(1.02);
}

/* === Login Body === */
.login-body {
  padding: 2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-dark);
  text-align: center;
  margin-bottom: 1.75rem;
}

/* === Form Styles === */
.form-group {
  margin-bottom: 1.5rem;
  position: relative;
}

.form-group label,
.control-label {
  font-weight: 600;
  color: var(--text-dark);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  display: block;
}

.lblbold {
  font-weight: 600;
}

/* === Input Group with Icon === */
.input-icon-wrapper {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
  z-index: 2;
}

.input-icon-wrapper .form-control {
  padding-left: 2.75rem;
}

/* === Modern Input Styles === */
.form-control,
.form-control-sm {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  border: 2px solid var(--border-light);
  border-radius: 10px;
  background: #fafafa;
  color: var(--text-dark);
  transition: var(--transition);
}

.form-control:hover {
  border-color: #ccc;
  background: #fff;
}

.form-control:focus {
  background: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(229, 80, 16, 0.1);
}

.form-control::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

/* === Password Toggle === */
.icon-pass {
  position: absolute;
  top: 50%;
  right: 1rem;
  transform: translateY(-50%);
  cursor: pointer;
  width: 20px;
  height: 20px;
  opacity: 0.6;
  transition: var(--transition);
  z-index: 2;
}

.icon-pass:hover {
  opacity: 1;
}

.eye-open {
  background-image: url("../images/eye-fill.svg");
  background-repeat: no-repeat;
  background-size: contain;
}

.eye-close {
  background-image: url("../images/eye-slash-fill.svg");
  background-repeat: no-repeat;
  background-size: contain;
}

/* === Submit Button === */
.btn-login {
  width: 100%;
  padding: 0.95rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-login::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(229, 80, 16, 0.35);
}

.btn-login:hover::before {
  left: 100%;
}

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

/* Fallback for existing btn-secondary */
.btn-secondary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border: none;
  color: #fff;
  font-weight: 600;
  padding: 0.85rem 1.75rem;
  border-radius: 10px;
  transition: var(--transition);
}

.btn-secondary:hover {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(229, 80, 16, 0.35);
}

/* === Alert Styles === */
.alert-danger {
  background: linear-gradient(135deg, #fff5f5 0%, #ffe0e0 100%);
  border: 1px solid #ffcdd2;
  border-radius: 10px;
  color: #c62828;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

/* === Footer === */
.footer {
  position: fixed;
  bottom: 0;
  width: 100%;
  background: var(--bg-card);
  border-top: 1px solid var(--border-light);
  padding: 0.5rem 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* === Animations === */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* === Responsive Design === */
@media screen and (max-width: 992px) {
  .divgrande {
    flex-direction: column;
    padding: 1rem;
    align-items: center;
  }
  
  .indices {
    width: 100%;
    max-width: 100%;
    margin: 0 0 1rem 0;
    order: 2;
  }
  
  .cleitin {
    max-width: 100%;
    order: 1;
  }
}

@media screen and (max-width: 500px) {
  .divgrande {
    padding: 0.5rem;
    gap: 1rem;
  }
  
  .indices {
    padding: 1rem;
  }
  
  .indices iframe {
    min-height: 160px;
  }
  
  .cleitin {
    border-radius: 10px;
  }
  
  .login-header {
    padding: 1.5rem;
  }
  
  .login-header img {
    max-width: 150px;
  }
  
  .login-body {
    padding: 1.5rem;
  }
  
  .form-control {
    padding: 0.75rem 0.875rem;
  }
  
  .btn-login,
  .btn-secondary {
    padding: 0.8rem 1.5rem;
  }
  
  .footer {
    position: relative;
    margin-top: 1rem;
  }
}

/* === Utility Classes === */
.fonte-form {
  font-size: 14px;
}

.text-danger {
  color: #dc3545;
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

.icon-file-person {
  position: absolute;
  background-image: url("../images/file-person.svg");
  background-repeat: no-repeat;
  width: 1rem;
  height: 1rem;
}
