/* 
   VARIÁVEIS
    */
:root {
  --brand:       #3dab24;
  --brand-dark:  #2e8a1b;
  --brand-ring:  rgba(61,171,36,0.2);
  --brand-dim:   rgba(61,171,36,0.1);

  --bg:          #111211;
  --left-bg:     #151715;
  --right-bg:    #0e0f0e;

  --border:      rgba(255,255,255,0.07);
  --border-md:   rgba(255,255,255,0.11);

  --text:        #efefef;
  --muted:       #6b6e6b;
  --muted-lt:    #9a9d9a;

  --error:       #e05252;
  --success:     #3dab24;
  --info:        #4a9eff;
  --radius:      10px;
  --ease:        0.22s ease;
}

/* 
   RESET
    */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* 
   PAGE — SPLIT LAYOUT
    */
.page {
  display: flex;
  min-height: 100vh;
}

/* 
   ESQUERDA
    */
.left {
  flex: 1;
  background: var(--left-bg);
  border-right: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 4rem 4rem 5vw;
  position: relative;
  overflow: hidden;
}

/* Detalhe decorativo canto */
.left::before {
  content: '';
  position: absolute;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(61,171,36,0.07) 0%, transparent 70%);
  bottom: -80px;
  right: -80px;
  pointer-events: none;
}

.left-content {
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

/* 
   BRAND
    */
.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand img {
  max-height: 44px;
  max-width: 180px;
  object-fit: contain;
  filter: brightness(1.1);
  border-radius: 8px;
}

.pill {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  color: var(--brand);
  background: var(--brand-dim);
  border: 1px solid rgba(61,171,36,0.25);
  border-radius: 50px;
  padding: 0.2rem 0.7rem;
  font-weight: 500;
}

.pill i {
  font-size: 6px;
  animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

/* 
   HEADLINE
    */
.left-content h1 {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.5px;
  color: #fff;
}

.left-content h1 span {
  color: var(--brand);
}

.left-content > p {
  font-size: 0.95rem;
  color: var(--muted-lt);
  line-height: 1.7;
}

/* 
   SISTEMAS PREVIEW
    */
.systems-preview {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.sys-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  transition: border-color var(--ease), background var(--ease);
}

.sys-card:hover {
  border-color: var(--border-md);
  background: rgba(255,255,255,0.05);
}

.sys-card.locked {
  opacity: 0.45;
}

.sys-icon {
  width: 36px;
  height: 36px;
  background: var(--brand-dim);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  font-size: 0.9rem;
  flex-shrink: 0;
}

.sys-card.locked .sys-icon {
  background: rgba(255,255,255,0.05);
  color: var(--muted);
}

.sys-card > div:nth-child(2) {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sys-card strong {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.sys-card span {
  font-size: 0.76rem;
  color: var(--muted-lt);
}

.sys-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sys-status.on {
  background: var(--brand);
  box-shadow: 0 0 6px rgba(61,171,36,0.6);
}

.sys-status.off {
  background: var(--muted);
}

/* 
   DIREITA
    */
.right {
  width: 480px;
  flex-shrink: 0;
  background: var(--right-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2.5rem;
  overflow-y: auto;
}

.form-wrap {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* 
   FORM HEADER
    */
.form-header {
  position: relative;
  padding-top: 0;
  margin-bottom: 10px;
}

.form-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}

.form-header p {
  font-size: 0.86rem;
  color: var(--muted-lt);
  line-height: 1.6;
}

.back-btn {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-lt);
  cursor: pointer;
  transition: all var(--ease);
  margin-bottom: 1rem;
}

.back-btn:hover {
  background: rgba(255,255,255,0.08);
  color: var(--brand);
  border-color: var(--brand);
}

.back-btn i {
  font-size: 0.9rem;
}

/* 
   CAMPOS
    */
.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field label {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--muted-lt);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  display: flex;
  align-items: center;
  gap: 0.38rem;
}

.field label i {
  color: var(--brand);
  font-size: 0.68rem;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.field input,
.pw-wrap input,
textarea {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-md);
  border-radius: var(--radius);
  padding: 0.78rem 1rem;
  font-size: 0.93rem;
  color: var(--text);
  outline: none;
  transition: border-color var(--ease), box-shadow var(--ease), background var(--ease);
  font-family: 'Segoe UI', system-ui, sans-serif;
}

textarea {
  resize: vertical;
  min-height: 80px;
}

.field input::placeholder,
.pw-wrap input::placeholder,
textarea::placeholder {
  color: var(--muted);
}

.field input:focus,
.pw-wrap input:focus,
textarea:focus {
  border-color: var(--brand);
  background: rgba(61,171,36,0.05);
  box-shadow: 0 0 0 3px var(--brand-ring);
}

.field input.err,
.pw-wrap input.err {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(224,82,82,0.12);
}

/* 
   TOGGLE SENHA
    */
.pw-wrap {
  position: relative;
}

.pw-wrap input { padding-right: 2.5rem; }

.pw-wrap button {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 0.82rem;
  padding: 3px;
  transition: color var(--ease);
}

.pw-wrap button:hover { color: var(--brand); }

/* 
   MENSAGENS
    */
.error-msg,
.success-msg,
.info-msg {
  font-size: 0.82rem;
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  display: none;
  align-items: center;
  gap: 0.4rem;
}

.error-msg {
  color: var(--error);
  background: rgba(224,82,82,0.07);
  border: 1px solid rgba(224,82,82,0.18);
}

.success-msg {
  color: var(--success);
  background: rgba(61,171,36,0.07);
  border: 1px solid rgba(61,171,36,0.18);
}

.info-msg {
  color: var(--info);
  background: rgba(74,158,255,0.07);
  border: 1px solid rgba(74,158,255,0.18);
}

.error-msg.show,
.success-msg.show,
.info-msg.show {
  display: flex;
}

/* 
   BOTÃO
    */
.btn {
  width: 100%;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 0.85rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: background var(--ease), transform var(--ease), box-shadow var(--ease);
  box-shadow: 0 4px 16px rgba(61,171,36,0.25);
  margin-top: 0.25rem;
}

.btn:hover:not(:disabled) {
  background: var(--brand-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(61,171,36,0.32);
}

.btn:active:not(:disabled) { transform: translateY(0); }

.btn:disabled { opacity: 0.65; cursor: not-allowed; }

/* 
   FOOTER
    */
.form-footer {
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem; 
  margin-top: 10px;
}

.form-footer i { color: var(--brand); }

.link-btn {
  background: none;
  border: none;
  color: var(--brand);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: color var(--ease);
  padding: 0;
}

.link-btn:hover {
  color: var(--brand-dark);
  text-decoration: underline;
}

/* 
   RESPONSIVO
    */
@media (max-width: 900px) {
  .page  { flex-direction: column; }
  .left  { 
    padding: 3rem 2rem; 
    border-right: none; 
    border-bottom: 1px solid var(--border); 
  }
  .right { 
    width: 100%; 
    padding: 2.5rem 1.5rem; 
  }
  .left-content h1 { font-size: 1.9rem; }
}

@media (max-height: 700px) {
  .right {
    padding: 2rem 2.5rem;
  }
  
  .form-wrap {
    gap: 1.25rem;
  }
  
  form {
    gap: 0.8rem;
  }
}