/* OpenCut login — tema escuro, cartão centralizado. Sem dependências externas. */

:root {
  --bg: #0a0a0c;
  --card: #151519;
  --card-border: rgba(255, 255, 255, 0.08);
  --input-bg: #0e0e11;
  --input-border: rgba(255, 255, 255, 0.10);
  --text: #f4f4f5;
  --text-sub: #a7a7af;
  --text-dim: #8e8e96;
  --accent: #6366f1;
  --accent-strong: #4f46e5;
  --error: #f87171;
  --error-border: rgba(248, 113, 113, 0.35);
  --error-bg: rgba(248, 113, 113, 0.08);
  --info: #93c5fd;
  --info-border: rgba(147, 197, 253, 0.3);
  --info-bg: rgba(147, 197, 253, 0.07);
  --ring: rgba(99, 102, 241, 0.35);
  --radius: 12px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background-color: var(--bg);
  background-image:
    radial-gradient(60rem 40rem at 15% -10%, rgba(99, 102, 241, 0.10), transparent 60%),
    radial-gradient(50rem 34rem at 110% 110%, rgba(14, 165, 233, 0.07), transparent 60%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter,
    "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.scene {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.card {
  width: 100%;
  max-width: 400px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 36px 32px 24px;
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.55),
    0 2px 8px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  animation: card-in 0.35s ease-out both;
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .card { animation: none; }
  * { transition: none !important; }
}

.brand {
  display: block;
  margin: 0 auto 22px;
  width: 148px;
  height: auto;
}

h1 {
  margin: 0 0 6px;
  font-size: 21px;
  font-weight: 650;
  letter-spacing: -0.01em;
  text-align: center;
  color: var(--text);
}

.sub {
  margin: 0 0 22px;
  font-size: 13.5px;
  line-height: 1.5;
  text-align: center;
  color: var(--text-sub);
}

/* Alertas ------------------------------------------------------------- */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.45;
  margin-bottom: 16px;
}
.alert[hidden] { display: none; }
.alert svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.alert.error { color: var(--error); background: var(--error-bg); border: 1px solid var(--error-border); }
.alert.info { color: var(--info); background: var(--info-bg); border: 1px solid var(--info-border); }

/* Formulário ---------------------------------------------------------- */
.field { margin-bottom: 14px; }

label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #d6d6dc;
  margin-bottom: 6px;
}

.control { position: relative; }

.ficon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #74747e;
  pointer-events: none;
  display: flex;
}
.ficon svg { width: 16px; height: 16px; }

input[type="text"],
input[type="password"] {
  width: 100%;
  height: 46px;
  padding: 0 12px 0 38px;
  font-size: 14.5px;
  color: var(--text);
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input#pass { padding-right: 44px; }

input::placeholder { color: #6b6b74; }

input:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--ring);
}

.toggle {
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: #8a8a93;
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.toggle svg { width: 17px; height: 17px; }
.toggle:hover { color: #c8c8cf; background: rgba(255, 255, 255, 0.05); }
.toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--ring);
}
.toggle[aria-pressed="true"] { color: #c8c8cf; }

/* Botão principal ------------------------------------------------------ */
.submit {
  position: relative;
  width: 100%;
  height: 46px;
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 14.5px;
  font-weight: 600;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.submit:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); }
.submit:active:not(:disabled) { transform: translateY(0); }
.submit:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--ring), 0 8px 24px rgba(79, 70, 229, 0.28);
}
.submit:disabled { opacity: 0.65; cursor: not-allowed; }

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Rodapé / notas ------------------------------------------------------- */
.foot {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 12px;
  text-align: center;
  color: var(--text-dim);
}

.note {
  margin: 12px 0 0;
  font-size: 12px;
  text-align: center;
  color: var(--text-dim);
}

/* Responsivo ----------------------------------------------------------- */
@media (max-width: 380px) {
  .card { padding: 28px 20px 18px; }
  h1 { font-size: 19px; }
  .brand { width: 132px; }
}
