/* Styles for Landing / Dual Gateway & Login Portal */
.gateway-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: radial-gradient(circle at 50% 20%, #111827 0%, #060911 70%, #020408 100%);
  position: relative;
  overflow: hidden;
}

/* Subtle background grid pattern */
.gateway-container::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

/* Header branding */
.gateway-header {
  position: relative;
  z-index: 10;
  padding: 32px 24px 16px;
  text-align: center;
}

.brand-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.brand-logo-img {
  width: 50px;
  height: 50px;
  filter: drop-shadow(0 0 16px rgba(134, 59, 255, 0.6));
  animation: logoFloat 4s ease-in-out infinite alternate;
}

@keyframes logoFloat {
  0% { transform: translateY(0px) rotate(0deg); }
  100% { transform: translateY(-4px) rotate(2deg); }
}

.brand-title {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #ffffff 30%, #a5b4fc 70%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-tagline {
  margin-top: 6px;
  color: #94a3b8;
  font-size: 0.95rem;
  font-weight: 400;
}

/* Dual Portal Cards Container */
.portal-selection {
  position: relative;
  z-index: 10;
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 24px;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 32px;
}

/* Portal Card Common */
.portal-card {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-smooth);
  backdrop-filter: blur(16px);
  overflow: hidden;
}

/* CLIENTE - METALLIC BLUE THEME */
.portal-client {
  background: linear-gradient(145deg, rgba(10, 25, 47, 0.85) 0%, rgba(13, 37, 74, 0.75) 50%, rgba(7, 18, 36, 0.95) 100%);
  border: 1px solid rgba(56, 189, 248, 0.3);
  box-shadow: 
    0 20px 40px -15px rgba(2, 132, 199, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    inset 0 0 24px rgba(56, 189, 248, 0.15);
}

.portal-client::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 50% 30%, rgba(56, 189, 248, 0.15) 0%, transparent 60%);
  pointer-events: none;
}

.portal-client:hover {
  transform: translateY(-6px);
  border-color: rgba(56, 189, 248, 0.6);
  box-shadow: 
    0 25px 50px -12px rgba(2, 132, 199, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 0 32px rgba(56, 189, 248, 0.25);
}

.client-badge {
  background: rgba(14, 165, 233, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
  width: fit-content;
}

.client-badge .pulse-dot {
  background: #38bdf8;
}
.client-badge .pulse-dot::after {
  background: #38bdf8;
}

.client-heading {
  font-size: 1.8rem;
  font-weight: 800;
  margin-top: 16px;
  background: linear-gradient(135deg, #f0f9ff 0%, #bae6fd 50%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
}

.client-desc {
  color: #94a3b8;
  font-size: 0.9rem;
  line-height: 1.5;
  margin-top: 8px;
  margin-bottom: 24px;
}

/* OPERADOR - RED THEME & ATENDIMENTO */
.portal-operator {
  background: linear-gradient(145deg, rgba(38, 9, 13, 0.9) 0%, rgba(61, 14, 20, 0.8) 50%, rgba(20, 4, 7, 0.95) 100%);
  border: 1px solid rgba(239, 68, 68, 0.35);
  box-shadow: 
    0 20px 40px -15px rgba(220, 38, 38, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 0 24px rgba(239, 68, 68, 0.15);
}

.portal-operator::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 50% 30%, rgba(239, 68, 68, 0.18) 0%, transparent 60%);
  pointer-events: none;
}

.portal-operator:hover {
  transform: translateY(-6px);
  border-color: rgba(239, 68, 68, 0.7);
  box-shadow: 
    0 25px 50px -12px rgba(220, 38, 38, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 0 32px rgba(239, 68, 68, 0.25);
}

.operator-badge {
  background: rgba(239, 68, 68, 0.22);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.5);
  width: fit-content;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
}

.operator-badge .pulse-dot {
  background: #ef4444;
}
.operator-badge .pulse-dot::after {
  background: #ef4444;
}

.operator-heading {
  font-size: 1.8rem;
  font-weight: 800;
  margin-top: 16px;
  background: linear-gradient(135deg, #fff1f2 0%, #fecdd3 40%, #ef4444 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
}

.operator-desc {
  color: #fca5a5;
  opacity: 0.85;
  font-size: 0.9rem;
  line-height: 1.5;
  margin-top: 8px;
  margin-bottom: 24px;
}

/* Form Controls Inside Cards */
.portal-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: auto;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #cbd5e1;
}

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

.form-input {
  width: 100%;
  padding: 12px 16px;
  padding-right: 44px;
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-family: var(--font-main);
  font-size: 0.95rem;
  outline: none;
  transition: all var(--transition-fast);
}

.portal-client .form-input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25);
  background: rgba(15, 23, 42, 0.85);
}

.portal-operator .form-input:focus {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25);
  background: rgba(26, 6, 9, 0.85);
}

.toggle-password {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.toggle-password:hover {
  color: #ffffff;
}

/* Submit Buttons */
.btn-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  border: none;
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all var(--transition-smooth);
}

.btn-client {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 50%, #075985 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4);
  border: 1px solid rgba(56, 189, 248, 0.4);
}
.btn-client:hover {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.6);
  transform: translateY(-2px);
}

.btn-operator {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 50%, #991b1b 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.4);
  border: 1px solid rgba(239, 68, 68, 0.4);
}
.btn-operator:hover {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.6);
  transform: translateY(-2px);
}

.portal-hint {
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 10px;
  text-align: center;
}

.error-msg {
  font-size: 0.82rem;
  color: #f87171;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  display: none;
}
.error-msg.visible {
  display: block;
}

/* Footer */
.gateway-footer {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 24px;
  color: #64748b;
  font-size: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
