/* ============================================
   IN-HAUS INDUSTRIAL - LOGIN PAGE
   Modern, Clean & Professional Design
   
   Color Palette:
   - Primary Gray: #696B6A
   - Primary Gold: #CC8D00
   - Light Backgrounds: #F5F5F5, #E9ECEF
   - Accent Blue-Gray: #546E7A (subtle)
   ============================================ */

/* ============================================
   BASE & RESET
   ============================================ */

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

body.login-page {
  font-family: 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, #FFFFFF 0%, #F5F5F5 50%, #E9ECEF 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow-x: hidden;
}

/* Textura industrial sutil no background */
body.login-page::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  background-image: 
    linear-gradient(90deg, rgba(105, 107, 106, 0.02) 1px, transparent 1px),
    linear-gradient(rgba(105, 107, 106, 0.02) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: 0;
}

/* ============================================
   MAIN CONTAINER - Split Layout
   ============================================ */

.login-container {
  display: flex;
  max-width: 1200px;
  width: 100%;
  background: #FFFFFF;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  position: relative;
  z-index: 1;
}

/* ============================================
   LEFT PANEL - Branding
   ============================================ */

.login-branding {
  flex: 1;
  background: linear-gradient(135deg, #696B6A 0%, #4A4C4B 100%);
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #FFFFFF;
  position: relative;
}

/* Padrão industrial sutil */
.login-branding::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(204, 141, 0, 0.03) 35px, rgba(204, 141, 0, 0.03) 70px);
  pointer-events: none;
}

.login-branding__content {
  position: relative;
  z-index: 2;
  max-width: 400px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.login-branding__logo {
  height: 180px;
  width: auto;
  margin-bottom: 40px;
  filter: brightness(1.2) drop-shadow(0 4px 12px rgba(204, 141, 0, 0.3));
}

.login-branding__title {
  font-size: 2rem;
  font-weight: 700;
  color: #CC8D00;
  margin-bottom: 16px;
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.login-branding__subtitle {
  font-size: 1rem;
  color: #E9ECEF;
  line-height: 1.6;
  margin-bottom: 48px;
  font-weight: 400;
}

.login-branding__features {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: left;
}

.login-branding__features li {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 20px;
  font-size: 0.9375rem;
  color: #E9ECEF;
}

.login-branding__features i {
  color: #CC8D00;
  font-size: 1.25rem;
  margin-right: 14px;
  min-width: 24px;
}

/* ============================================
   RIGHT PANEL - Login Form
   ============================================ */

.login-form-panel {
  flex: 1;
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  background: #FFFFFF;
}

/* Barra dourada no topo */
.login-form-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #CC8D00 0%, #B37A00 100%);
}

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

.login-card {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

.login-card__header {
  margin-bottom: 40px;
}

.login-card__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #CC8D00;
  margin-bottom: 8px;
}

.login-card__title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #2D2D2D;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.login-card__description {
  font-size: 0.9375rem;
  color: #696B6A;
  line-height: 1.5;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */

.login-form {
  margin-bottom: 32px;
}

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

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #2D2D2D;
  margin-bottom: 8px;
  letter-spacing: 0.2px;
}

.form-control {
  width: 100%;
  padding: 14px 16px;
  font-size: 0.9375rem;
  font-family: inherit;
  color: #2D2D2D;
  background: #F5F5F5;
  border: 2px solid #E9ECEF;
  border-radius: 8px;
  outline: none;
  transition: all 0.25s ease;
}

.form-control::placeholder {
  color: #9E9E9E;
}

.form-control:hover {
  background: #FFFFFF;
  border-color: #D0D0D0;
}

.form-control:focus {
  background: #FFFFFF;
  border-color: #CC8D00;
  box-shadow: 0 0 0 4px rgba(204, 141, 0, 0.12);
}

/* Password field with toggle */
.form-group--password {
  position: relative;
}

.form-control--password {
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  right: 4px;
  bottom: 4px;
  height: 42px;
  width: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: #696B6A;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease;
  font-size: 1.125rem;
}

.password-toggle:hover {
  background: rgba(204, 141, 0, 0.1);
  color: #CC8D00;
}

.password-toggle:focus {
  outline: 2px solid #CC8D00;
  outline-offset: 2px;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn-primary {
  width: 100%;
  padding: 16px 24px;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  color: #FFFFFF;
  background: #CC8D00;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(204, 141, 0, 0.25);
  letter-spacing: 0.3px;
}

.btn-primary:hover {
  background: #B37A00;
  box-shadow: 0 6px 20px rgba(204, 141, 0, 0.35);
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(204, 141, 0, 0.3);
}

.btn-primary:focus {
  outline: 3px solid rgba(204, 141, 0, 0.4);
  outline-offset: 2px;
}

.btn-primary i {
  font-size: 1.125rem;
}

/* ============================================
   LINKS & HELPERS
   ============================================ */

.form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  gap: 16px;
  flex-wrap: wrap;
}

.forgot-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  color: #696B6A;
  text-decoration: none;
  transition: color 0.2s ease;
}

.forgot-link:hover {
  color: #CC8D00;
}

.forgot-link i {
  font-size: 1rem;
}

/* ============================================
   DIVIDER
   ============================================ */

.divider {
  display: flex;
  align-items: center;
  margin: 40px 0;
  color: #9E9E9E;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #E9ECEF;
}

.divider::before {
  margin-right: 16px;
}

.divider::after {
  margin-left: 16px;
}

/* ============================================
   ACCESS OPTIONS (Usuário Interno / Cliente)
   ============================================ */

.access-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 32px;
}

.access-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 16px;
  background: #F5F5F5;
  border: 2px solid #E9ECEF;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: default;
}

.access-option:hover {
  background: #FFF9F0;
  border-color: #CC8D00;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(204, 141, 0, 0.12);
}

.access-option__icon {
  font-size: 1.75rem;
  color: #CC8D00;
  margin-bottom: 10px;
}

.access-option__label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #2D2D2D;
  margin-bottom: 4px;
}

.access-option__desc {
  font-size: 0.75rem;
  color: #696B6A;
  text-align: center;
}

/* ============================================
   SIGNUP FOOTER
   ============================================ */

.signup-footer {
  text-align: center;
  padding-top: 28px;
  border-top: 1px solid #E9ECEF;
  color: #696B6A;
  font-size: 0.875rem;
}

.signup-footer__text {
  margin-bottom: 8px;
}

.signup-footer__link {
  color: #CC8D00;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
  padding-bottom: 2px;
}

.signup-footer__link:hover {
  color: #B37A00;
  border-bottom-color: #CC8D00;
}

/* ============================================
   ERROR MESSAGES
   ============================================ */

.form-error {
  display: block;
  margin-top: 8px;
  font-size: 0.8125rem;
  color: #D32F2F;
  display: flex;
  align-items: center;
  gap: 6px;
}

.form-error i {
  font-size: 1rem;
}

.form-control--error {
  border-color: #D32F2F;
  background: #FFF5F5;
}

.form-control--error:focus {
  border-color: #D32F2F;
  box-shadow: 0 0 0 4px rgba(211, 47, 47, 0.12);
}

/* ============================================
   ANIMATIONS
   ============================================ */

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

.login-container {
  animation: fadeInUp 0.5s ease-out;
}

/* ============================================
   RESPONSIVE DESIGN - Mobile First
   ============================================ */

/* Tablets e menores */
@media (max-width: 1024px) {
  .login-branding {
    display: none;
  }

  .login-form-panel {
    flex: 1;
    padding: 40px 32px;
  }

  .login-container {
    max-width: 500px;
  }
}

/* Mobile */
@media (max-width: 640px) {
  body.login-page {
    padding: 16px;
  }

  .login-container {
    border-radius: 12px;
  }

  .login-form-panel {
    padding: 32px 24px;
  }

  .login-card__title {
    font-size: 1.5rem;
  }

  .access-options {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .form-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .forgot-link {
    justify-content: center;
  }
}

/* Telas muito pequenas */
@media (max-width: 375px) {
  .login-form-panel {
    padding: 24px 16px;
  }

  .login-card__title {
    font-size: 1.375rem;
  }

  .btn-primary {
    padding: 14px 20px;
    font-size: 0.9375rem;
  }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

/* Movimento reduzido */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus visível para navegação por teclado */
:focus-visible {
  outline: 3px solid #CC8D00;
  outline-offset: 3px;
}

/* Skip to main content */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
  body.login-page::before,
  .login-branding,
  .access-options,
  .signup-footer {
    display: none;
  }

  .login-container {
    box-shadow: none;
    border: 1px solid #E9ECEF;
  }
}
