/* TitiGaming — Login, lenguaje visual Notion */

:root {
  --bg-page:    #ffffff;
  --bg-left:    #f7f7f5;
  --bg-input:   #ffffff;
  --bg-tab:     #f1f1ef;
  --text:       #37352f;
  --text-secondary: rgba(55,53,47,0.75);
  --text-muted: rgba(55,53,47,0.5);
  --border:     rgba(55,53,47,0.09);
  --border-strong: rgba(55,53,47,0.18);
  --brand:      #2383e2;
  --brand-2:    #0b6fcb;
  --danger:     #e03e3e;
  --danger-bg:  #fdf3f1;
  --danger-border:#f2c4bb;
  --danger-text:#8f2f22;
  --focus-ring: 0 0 0 2px rgba(35,131,226,0.35);
}

body.dark {
  --bg-page:    #191919;
  --bg-left:    #202020;
  --bg-input:   #252525;
  --bg-tab:     #252525;
  --text:       rgba(255,255,255,0.9);
  --text-secondary: rgba(255,255,255,0.65);
  --text-muted: rgba(255,255,255,0.45);
  --border:     rgba(255,255,255,0.09);
  --border-strong: rgba(255,255,255,0.18);
  --brand:      #5fadf2;
  --brand-2:    #8cc4f5;
  --focus-ring: 0 0 0 2px rgba(95,173,242,0.4);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  background: var(--bg-page);
  color: var(--text);
  transition: background .2s, color .2s;
}

*:focus { outline: none; }
*:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 4px; }

/* ── LEFT PANEL ─────────────────────────────────────────────────────── */
.left {
  width: 44%; min-height: 100vh; background: var(--bg-left);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 40px 48px;
}
.left-mark { display: flex; align-items: center; gap: 9px; margin-bottom: 48px; }
.left-mark-icon { width: 26px; height: 26px; border-radius: 6px; }
.left-mark-word { font-size: 15px; font-weight: 600; color: var(--text); }

.left-copy h1 {
  font-size: 27px; font-weight: 700; line-height: 1.3;
  color: var(--text); margin-bottom: 12px;
}
.left-copy p { font-size: 14px; color: var(--text-secondary); max-width: 34ch; }

.page-list { display: flex; flex-direction: column; gap: 2px; }
.page-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px; border-radius: 5px;
  font-size: 13.5px; color: var(--text-secondary);
}
.page-row .ic { font-size: 15px; }

/* ── RIGHT PANEL ────────────────────────────────────────────────────── */
.right {
  width: 56%; min-height: 100vh; background: var(--bg-page);
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 48px 56px; position: relative;
}
.top-controls { position: absolute; top: 20px; right: 20px; display: flex; gap: 4px; }
.ctrl-btn {
  display: flex; align-items: center; gap: 6px;
  border: none; border-radius: 6px;
  padding: 6px 10px; font-size: 13px; font-weight: 500;
  background: transparent; cursor: pointer; color: var(--text-secondary);
}
.ctrl-btn:hover { background: var(--bg-tab); }
.theme-emoji { font-size: 14px; line-height: 1; }

.form-wrap { width: 100%; max-width: 320px; }

.form-title { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.form-sub   { font-size: 13px; color: var(--text-secondary); margin-bottom: 24px; }

.tab-toggle {
  display: flex; background: var(--bg-tab); border-radius: 8px;
  padding: 3px; margin-bottom: 24px;
}
.tab-btn {
  flex: 1; padding: 7px; font-size: 13.5px; font-weight: 500;
  border: none; background: transparent; cursor: pointer;
  color: var(--text-muted); border-radius: 6px; transition: all .15s;
}
.tab-btn.active { background: var(--bg-page); color: var(--text); font-weight: 600; }

.form-panel { animation: fadeIn .15s ease; }
@keyframes fadeIn { from { opacity:0; transform: translateY(4px); } to { opacity:1; transform: translateY(0); } }

.form-group { margin-bottom: 14px; }
.form-group label {
  display: block; font-size: 12.5px; font-weight: 600;
  color: var(--text-secondary); margin-bottom: 6px;
}
.input-wrap { position: relative; }
.input-wrap input {
  width: 100%; padding: 8px 10px; border: 1px solid var(--border-strong);
  border-radius: 6px; font-size: 14px; color: var(--text);
  background: var(--bg-input); outline: none;
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.input-wrap input:focus  { border-color: var(--brand); box-shadow: var(--focus-ring); }
.input-wrap input.error  { border-color: var(--danger); }
.input-wrap input.error:focus { box-shadow: 0 0 0 2px rgba(224,62,62,0.2); }
.input-wrap input::placeholder { color: var(--text-muted); }
.input-wrap .eye-btn {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; color: var(--text-muted);
  display: flex; align-items: center; padding: 4px; border-radius: 4px;
}
.input-wrap .eye-btn:hover { background: var(--bg-tab); color: var(--text-secondary); }
.input-wrap input[type="password"] { padding-right: 36px; }
.field-error { font-size: 12px; color: var(--danger); margin-top: 5px; display: none; }
.field-error.show { display: block; }

.forgot-link {
  display: block; text-align: right; font-size: 12px;
  color: var(--brand); text-decoration: none;
  margin-top: -8px; margin-bottom: 18px;
}
.forgot-link:hover { text-decoration: underline; }

.btn-primary {
  width: 100%; padding: 9px; border: none; border-radius: 6px;
  background: var(--text); color: var(--bg-page);
  font-size: 13.5px; font-weight: 600; cursor: pointer; font-family: inherit;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: opacity .15s;
}
.btn-primary:hover    { opacity: 0.85; }
.btn-primary:active   { opacity: 0.75; }
.btn-primary:disabled { background: var(--border-strong); color: var(--text-muted); cursor: not-allowed; opacity: 1; }
.btn-primary .spinner {
  width: 14px; height: 14px; border: 2px solid rgba(255,255,255,0.35);
  border-top-color: currentColor; border-radius: 50%;
  animation: spin .6s linear infinite; display: none;
}
.btn-primary.loading .spinner  { display: block; }
.btn-primary.loading .btn-text { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.error-banner {
  display: flex; align-items: center; gap: 8px;
  background: var(--danger-bg); border: 1px solid var(--danger-border); border-radius: 6px;
  padding: 9px 12px; font-size: 13px; color: var(--danger-text);
  margin-bottom: 16px; font-weight: 500;
}

.is-hidden { display: none; }

@media (max-width: 768px) {
  body { flex-direction: column; }
  .left {
    width: 100%; min-height: auto; padding: 28px 24px;
    border-right: none; border-bottom: 1px solid var(--border);
  }
  .left-copy h1 { font-size: 21px; }
  .page-list { display: none; }
  .right { width: 100%; min-height: auto; padding: 32px 24px 48px; justify-content: flex-start; }
  .top-controls { top: 12px; right: 12px; }
  .form-wrap { max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
