:root {
  --bg-1: #f6f2e9;
  --bg-2: #dfd2bb;
  --card: #ffffff;
  --text: #1b1b1b;
  --accent: #1b5e20;
  --accent-2: #2e7d32;
  --border: #d7d7d7;
  --danger: #b71c1c;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Tahoma, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top right, var(--bg-2), var(--bg-1));
}

/* ── Layout principal ── */
.login-layout {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

/* ── Card externo ── */
.login-card {
  display: flex;
  flex-direction: row;
  width: 100%;
  max-width: 820px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

/* ── Painel esquerdo: marca ── */
.brand-panel {
  flex: 0 0 42%;
  background: var(--accent);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
  text-align: center;
  gap: 10px;
}

.brand-logo {
  width: 100px;
  height: auto;
  margin-bottom: 4px;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.25));
}

.brand-panel h1 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0.02em;
}

.brand-tagline {
  margin: 0;
  font-size: 13px;
  opacity: 0.85;
}

.brand-support {
  margin-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.3);
  padding-top: 16px;
  font-size: 13px;
  opacity: 0.9;
  line-height: 1.7;
}

.brand-support p {
  margin: 0;
}

.support-title {
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.7;
  margin-bottom: 8px !important;
}

.support-logo {
  display: block;
  width: 44px;
  height: auto;
  margin: 0 auto 8px;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.2));
}

/* ── Divisor vertical ── */
.panel-divider {
  width: 1px;
  background: var(--border);
  align-self: stretch;
}

/* ── Painel direito: formulário ── */
.form-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 36px;
}

.form-panel h2 {
  margin: 0 0 20px 0;
  text-align: center;
  font-size: 19px;
}

/* ── Responsivo: empilha em telas pequenas ── */
@media (max-width: 620px) {
  .login-card {
    flex-direction: column;
  }

  .brand-panel {
    flex: none;
    padding: 28px 24px;
  }

  .brand-logo { width: 72px; }

  .support-logo { width: 36px; }

  .panel-divider {
    width: auto;
    height: 1px;
    align-self: auto;
  }

  .form-panel {
    padding: 28px 24px;
  }
}

form {
  display: grid;
  gap: 10px;
}

label {
  font-weight: 600;
  font-size: 14px;
}

input {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 15px;
}

.password-wrapper {
  position: relative;
  display: flex;
}

.password-wrapper input {
  width: 100%;
  padding-right: 40px; /* Space for the eye icon */
}

.toggle-password {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  padding: 4px;
  margin: 0;
  color: #666;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toggle-password:hover {
  background: transparent;
  color: var(--accent);
}

.toggle-password span {
  font-size: 18px;
}

button[type="submit"] {
  margin-top: 8px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  padding: 11px 14px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

button:hover {
  background: var(--accent-2);
}

.status {
  min-height: 24px;
  margin: 12px 0 6px;
  font-weight: 600;
}

.status.error {
  color: var(--danger);
}

.status.success {
  color: var(--accent);
}

.novo-cliente-link {
  text-align: center;
  margin-top: 4px;
}

.novo-cliente-link a {
  font-size: 13px;
  color: #888;
  text-decoration: none;
}

.novo-cliente-link a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.app-version {
  text-align: center;
  font-size: 11px;
  color: #bbb;
  margin: 8px 0 0;
  letter-spacing: 0.03em;
}

dialog {
  border: none;
  border-radius: 12px;
  padding: 32px 40px;
  width: min(600px, 90vw);
  max-width: none;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  overflow: visible;
}

dialog h3 {
  margin: 0 0 4px 0;
  font-size: 20px;
}

.dialog-subtitle {
  margin: 0 0 16px 0;
  font-size: 13px;
  color: #888;
}

dialog label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-top: 12px;
  margin-bottom: 4px;
}

dialog input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  box-sizing: border-box;
}

dialog .password-wrapper input {
  padding-right: 40px;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.dialog-actions button {
  padding: 9px 20px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
}

#btn-nc-cancelar {
  background: #e0e0e0;
  color: #333;
}

#btn-nc-cancelar:hover {
  background: #ccc;
}

#btn-nc-criar {
  background: var(--accent);
  color: #fff;
}

#btn-nc-criar:hover {
  background: var(--accent-2);
}

dialog::backdrop {
  background: rgba(0,0,0,0.4);
}
