:root {
  --color-bg:           #181826;
  --color-surface:      #212134;
  --color-border:       #32324d;
  --color-border-light: #2a2a40;

  --color-text:         #ffffff;
  --color-text-muted:   #a0a0c0;

  --color-accent:       #4945ff;
  --color-accent-hover: #32324d;

  --color-success:      #8ac36c;

  --space-sm:  8px;
  --space-md:  12px;
  --space-lg:  16px;
  --space-xl:  20px;

  --radius-sm: 8px;
  --radius-md: 10px;

  --font-base: Arial, Helvetica, sans-serif;
  --font-size-xs: 12px;
  --font-size-sm: 13px;
  --font-size-md: 15px;

  --icon-size-lg: 22px;
  --icon-size-xl: 50px;

  --overlay-bg: rgba(0, 0, 0, 0.55);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: var(--color-accent) var(--color-border);
}

*::-webkit-scrollbar-track {
  background: var(--color-border);
  border-radius: var(--radius-sm);
}

*::-webkit-scrollbar-thumb {
  background-color: var(--color-accent);
  border-radius: var(--radius-sm);
  border: 3px solid var(--color-border);
}

*::-webkit-scrollbar-thumb:hover {
  background-color: #6c63ff;
}

body {
  margin: 0;
  font-family: var(--font-base);
  background-color: var(--color-bg);
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.form-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: var(--space-xl);
}

.form-box {
  background: var(--color-surface);
  padding: 2rem;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 500px;
}

.form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: var(--space-xl);
  margin-bottom: var(--space-xl);
  border-bottom: 1px solid var(--color-border);
}

.form-title {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.form-title .material-symbols-outlined {
  font-size: var(--icon-size-xl);
  color: var(--color-accent);
}

.form-title h1 {
  margin: 0;
  font-size: 18px;
}

.form-subtitle {
  display: block;
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  margin-top: 10px;
}

.form-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-form label {
  font-weight: bold;
  font-size: 0.9rem;
}

.form-form input[type="text"],
.form-form input[type="password"],
.form-form input[type="email"] {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  background: var(--color-bg);
  color: var(--color-text);
}

.form-form input[type="text"]:focus,
.form-form input[type="email"]:focus {
  border-color: var(--color-accent);
  outline: none;
  box-shadow: 0 0 5px var(--color-accent);
}

button {
  background-color: var(--color-accent);
  color: white;
  border: none;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
}

button:hover {
  background-color: var(--color-border);
}

button[type="submit"] {
  background-color: var(--color-border);
  color: var(--color-text-muted);
  cursor: not-allowed;
  transition: all 0.3s ease;
}

button[type="submit"].enabled {
  background-color: var(--color-accent);
  color: white;
  cursor: pointer;
}

button[type="submit"].enabled:hover {
  background-color: var(--color-border);
}

.password-wrapper {
  position: relative;
  width: 100%;
}

.password-wrapper input {
  width: 100%;
  padding-right: 50px;
}

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

.toggle-password:hover {
  background: transparent;
}

.toggle-password .material-symbols-outlined {
  color: var(--color-text-muted);
  font-size: var(--icon-size-lg);
}

.legal-container {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #1b1b2d;
}

.legal-toggle {
  width: 100%;
  background: var(--color-surface);
  border: none;
  color: var(--color-text);
  padding: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-size: var(--font-size-md);
}

.legal-toggle:hover {
  background: var(--color-border-light);
}

.legal-toggle span:first-child {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

#toggleIcon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  color: var(--color-text);
  transition: transform 0.2s ease;
}

.legal-content {
  display: none;
  padding: 15px;
  border-top: 1px solid var(--color-border);
}

.legal-content.open {
  display: block;
}

.textolegal {
  height: 220px;
  overflow-y: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 15px;
  background: var(--color-bg);
  line-height: 1.6;
  margin-bottom: 15px;
}

.scroll-warning {
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  margin-bottom: 10px;
}

.checkbox-line {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-text);
  font-size: 14px;
}

.checkbox-line input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.material-symbols-outlined {
  color: var(--color-accent);
}

.textoaviso {
  color: var(--color-success);
  text-align: center;
}

.popupContent {
  text-align: justify;
}