:root {
  --primary: #FF7A42;
  --primary-light: #FFA37D;
  --primary-dark: #E65920;
  --accent: #E91E63;
  --accent-light: #F48FB1;
  --accent-dark: #C2185B;
  --background: #F5F7FA;
  --card-bg: #FFFFFF;
  --border-color: #ECEFF1;
  --text-dark: #1A2142;
  --text-medium: #546E7A;
  --shadow-sm: 0 2px 5px rgba(0,0,0,0.05);
  --shadow-lg: 0 6px 16px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 10px rgba(0,0,0,0.15);
  --border-radius: 12px;
  --transition: all 0.3s ease;
  --header-height: 64px;

  /* Transition */
    --transition-fast: 150ms ease;
    --transition-normal: 200ms ease;
    --transition-slow: 300ms ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Source Sans Pro', sans-serif;
}

body {
  height: 100vh;
  width: 100%;
  overflow: hidden;
}

.theme-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    transition: background-color var(--transition-normal);
}

.login-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 400px;
  height: 90vh;
  max-height: 700px;
  position: relative;
  z-index: 1;
}

/* Header com gradiente */
.header {
  width: 100%;
  padding: 32px 0;
  background: linear-gradient(to right, var(--primary), var(--accent));
  border-radius: 20px 20px 0 0;
  text-align: center;
  color: white;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-content h1 {
  font-weight: 700;
  font-size: 24px;
  margin-bottom: 8px;
}

.header-content p {
  font-weight: 400;
  font-size: 14px;
  opacity: 0.9;
}

/* Card principal */
.card {
  width: 100%;
  background-color: var(--card-bg);
  border-radius: 0 0 20px 20px;
  box-shadow: var(--shadow-lg);
  padding: 32px;
  position: relative;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 24px;
  flex: 1;
  animation: cardFadeIn 0.6s ease-out;
}

@keyframes cardFadeIn {
  0% { 
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Toggle PF/PJ */
.toggle-container {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}

.toggle-track {
  background-color: rgba(240, 240, 240, 0.8);
  border-radius: 50px;
  display: flex;
  position: relative;
  width: 260px;
  height: 40px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.toggle-option {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-medium);
  z-index: 2;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.toggle-option.active {
  color: white;
  font-weight: 600;
}

.toggle-thumb {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 2px);
  height: calc(100% - 8px);
  background-color: var(--primary);
  border-radius: 40px;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.toggle-option.pf.active ~ .toggle-thumb {
  background: linear-gradient(to right, var(--primary), var(--primary-dark));
  transform: translateX(0);
}

.toggle-option.pj.active ~ .toggle-thumb {
  background: linear-gradient(to right, var(--accent), var(--accent-dark));
  transform: translateX(calc(100% - 8px));
}

/* Formulário */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  margin-bottom: 8px;
}

.input-container {
  position: relative;
  background-color: var(--background);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 0 16px;
  height: 56px;
  display: flex;
  align-items: center;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

.input-container:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 122, 66, 0.15);
  transform: translateY(-2px);
}

.input-container i {
  color: var(--text-medium);
  font-size: 18px;
  margin-right: 12px;
}

.input-container input {
  background: transparent;
  border: none;
  outline: none;
  flex: 1;
  height: 100%;
  color: var(--text-dark);
  font-size: 16px;
}

.input-container label {
  position: absolute;
  left: 46px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-medium);
  pointer-events: none;
  transition: var(--transition);
}

.input-container input:focus ~ label,
.input-container input:not(:placeholder-shown) ~ label {
  top: 12px;
  font-size: 12px;
  color: var(--primary);
  font-weight: 600;
}

.input-container input:focus,
.input-container input:not(:placeholder-shown) {
  padding-top: 16px;
}

/* Para evitar o placeholder nativo */
.input-container input::placeholder {
  color: transparent;
}

.forgot-password {
  text-align: right;
  font-size: 14px;
  color: var(--text-medium);
  text-decoration: none;
  transition: var(--transition);
  display: block;
  margin-top: 4px;
}

.forgot-password:hover {
  text-decoration: underline;
  color: var(--primary);
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}

.btn {
  height: 48px;
  border-radius: var(--border-radius);
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.btn-primary {
  background: linear-gradient(to right, var(--primary), var(--accent));
  color: white;
  border: none;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), 
              box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  background: linear-gradient(to right, var(--primary-dark), var(--accent-dark));
}

.btn-primary: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: 0.5s;
}

.btn-primary:hover:before {
  left: 100%;
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  z-index: 1;
}

.btn-outline:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 100%;
  background: rgba(255, 122, 66, 0.1);
  transition: all 0.3s ease;
  z-index: -1;
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
}

.btn-outline:hover:before {
  width: 100%;
}


/* Background Decorations */
.background-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
}

.circle-1 {
    background: radial-gradient(circle, var(--primary), transparent 70%);
    width: 50vw;
    height: 50vw;
    top: -10vw;
    right: -10vw;
}

.circle-2 {
    background: radial-gradient(circle, var(--accent), transparent 70%);
    width: 40vw;
    height: 40vw;
    bottom: -10vw;
    left: -10vw;
}
/* Responsividade */
@media (max-width: 1024px) {
  .login-container {
    max-width: 60%;
  }
  
  .card {
    padding: 28px;
  }
}

@media (max-width: 768px) {
  body {
    align-items: flex-end;
  }

  .login-container {
    max-width: 100%;
    height: 90vh;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.2);
  }
  
  .header {
    border-radius: 20px 20px 0 0;
  }
  
  .card {
    border-radius: 0 0 0 0;
    padding: 16px;
    height: 100%;
  }
  
  .toggle-track {
    width: 100%;
  }
  
  .btn {
    height: 56px;
    font-size: 14px;
  }
  
  .form-group {
    margin-bottom: 12px;
  }
}