/*
  login.css
  ---------
  Purpose
  - Provide a clean, professional hosted login page UI for CasaBuena.
  - Match the look and feel of the main site (dark theme, typography, spacing).

  Notes
  - This file intentionally duplicates a small subset of variables and styles
    from the main site CSS so the auth domain stays self-contained.
  - Authentication behavior is handled by login.js (unchanged).
*/

:root{
  --bg:#0e141b;
  --panel:#121923;
  --panel-2:#0f1720;
  --border:#1f2a37;
  --elev:0 6px 20px rgba(0,0,0,.25);

  --text:#e7edf5;
  --text-2:#c7d1dc;
  --muted:#98a6b7;
  --link:#8ab4f8;

  --input-bg:#0b121a;
  --input-br:#223046;
  --focus:0 0 0 3px rgba(99, 102, 241, .35);

  --accent:#8ab4f8;
  --accent-2:#22c55e;
}

*{ box-sizing:border-box; }
html, body{ height:100%; }

body.theme-pro{
  margin:0;
  color:var(--text);
  font:16px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;

  /* Subtle grid like the marketing asset background */
  background:
    linear-gradient(to right, rgba(148,163,184,0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148,163,184,0.07) 1px, transparent 1px),
    radial-gradient(900px 500px at 20% 10%, rgba(138,180,248,0.10), transparent 60%),
    radial-gradient(800px 500px at 80% 20%, rgba(34,197,94,0.08), transparent 55%),
    var(--bg);
  background-size: 64px 64px, 64px 64px, auto, auto, auto;
  background-attachment: fixed;
}

/* Layout shell */
.login-shell{
  min-height:100vh;
  display:flex;
  flex-direction:column;
}

.login-header,
.login-footer,
.login-main{
  width:100%;
  max-width:1100px;
  margin:0 auto;
  padding:0 16px;
}

.login-header{
  display:flex;
  align-items:baseline;
  gap:12px;
  padding-top:18px;
  padding-bottom:14px;
}

.brand{
  font-size:18px;
  font-weight:700;
  margin:0;
  letter-spacing:.2px;
  color:var(--text);
  text-decoration:none;
}

.brand:focus-visible{
  outline:none;
  box-shadow:var(--focus);
  border-radius:10px;
}

.brand-tagline{
  font-size:13px;
  color:var(--muted);
}

.login-main{
  flex:1;
  display:grid;
  grid-template-columns: minmax(0, 520px) minmax(0, 1fr);
  gap:18px;
  align-items:start;
  padding-top:10px;
  padding-bottom:18px;
}

/* Card */
.login-card{
  background:rgba(18,25,35,0.92);
  border:1px solid var(--border);
  border-radius:16px;
  box-shadow:var(--elev);
  padding:18px;
}

.login-top{
  display:flex;
  gap:12px;
  align-items:flex-start;
}

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

.login-subtitle{
  margin:6px 0 0;
  color:var(--text-2);
  font-size:13px;
}

.continue{
  margin:14px 0 14px;
  padding:10px 12px;
  border-radius:12px;
  background:rgba(15,23,32,0.85);
  border:1px solid rgba(31,42,55,0.85);
  color:var(--muted);
  font-size:13px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

#cb-continue-target{
  color:var(--text-2);
}

.login-footnote{
  margin:12px 0 0;
  font-size:12px;
  color:var(--muted);
}

/* Right-side info */
.login-side{
  background:rgba(15,23,32,0.65);
  border:1px solid rgba(31,42,55,0.75);
  border-radius:16px;
  box-shadow:var(--elev);
  padding:16px;
}

.side-title{
  margin:0 0 10px;
  font-size:14px;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--muted);
}

.side-list{
  margin:0;
  padding:0;
  list-style:none;
  display:grid;
  gap:8px;
  color:var(--text-2);
  font-size:13px;
}

.side-list li{
  position:relative;
  padding-left:18px;
}

.side-list li::before{
  content:"";
  position:absolute;
  left:4px;
  top:0.72em;
  width:6px;
  height:6px;
  border-radius:999px;
  background:var(--accent);
  box-shadow: 0 0 0 4px rgba(138,180,248,0.12);
}

.side-note{
  margin:12px 0 0;
  font-size:12px;
  color:var(--muted);
}

/* Spinner */
.spinner{
  width:18px;
  height:18px;
  border-radius:999px;
  border:2px solid rgba(152,166,183,0.35);
  border-top-color: rgba(138,180,248,0.95);
  margin-top:2px;
  animation: cbSpin 0.9s linear infinite;
}

@keyframes cbSpin{
  to{ transform:rotate(360deg); }
}

/* Buttons (mirrors main-site action buttons) */
.action-btn{
  border-radius:999px;
  border:1px solid rgba(75,85,99,0.85);
  background:rgba(17,24,39,0.92);
  padding:10px 14px;
  font-size:14px;
  color:var(--text-2);
  cursor:pointer;
  transition: background-color 0.15s ease, transform 0.1s ease, box-shadow 0.1s ease;
}

.action-btn-accent{
  border-color: rgba(59,130,246,0.65);
  background: rgba(17,24,39,0.92);
}

.action-btn:hover:not(:disabled){
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.35);
  background: rgba(31,41,55,0.92);
}

.action-btn:active:not(:disabled){
  transform: translateY(0);
  box-shadow: none;
}

.action-btn:focus-visible{
  outline:none;
  box-shadow: var(--focus);
}

.action-btn:disabled{
  opacity:0.6;
  cursor:not-allowed;
  box-shadow:none;
}

/* Footer */
.login-footer{
  padding:14px 16px 18px;
  font-size:12px;
  color:var(--muted);
}

/* Responsive */
@media (max-width: 920px){
  .login-main{
    grid-template-columns: 1fr;
  }
  .brand-tagline{ display:none; }
}

@media (max-width: 420px){
  .continue{ font-size:12px; }
  .action-btn{ width:100%; }
}

/* Small JS hooks */
.cb-is-busy .spinner{ border-top-color: rgba(34,197,94,0.95); }

/* -------------------------------------------------------------------------- */
/* CasaBuena: Language Redirect Page (index.html + redirect.js)
/* -------------------------------------------------------------------------- */

body.theme-pro.cb-redirect{
  min-height:100vh;
  /* Subtle grid background similar to other CasaBuena pages */
  background:
    linear-gradient(rgba(255,255,255,.03), rgba(255,255,255,.03)),
    radial-gradient(900px 500px at 20% 10%, rgba(138,180,248,.09), transparent 60%),
    radial-gradient(900px 500px at 80% 30%, rgba(59,130,246,.08), transparent 55%),
    repeating-linear-gradient(
      0deg,
      rgba(255,255,255,.04) 0px,
      rgba(255,255,255,.04) 1px,
      transparent 1px,
      transparent 44px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(255,255,255,.03) 0px,
      rgba(255,255,255,.03) 1px,
      transparent 1px,
      transparent 44px
    ),
    var(--bg);
}

.cb-redirect-shell{
  min-height:100vh;
  display:flex;
  flex-direction:column;
  padding: 18px 16px;
}

.cb-redirect-header{
  display:flex;
  align-items:baseline;
  gap: 12px;
  padding: 6px 2px 16px;
}

.cb-redirect-tagline{
  color: var(--muted);
  font-size: 12px;
}

.cb-redirect-main{
  flex:1;
  display:flex;
  align-items:flex-start;
  justify-content:center;
  padding-top: 10px;
  padding-bottom: 18px;
}

.cb-redirect-card{
  width: min(720px, 100%);
  background: rgba(18,25,35,0.92);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--elev);
  padding: 18px;
}

.cb-redirect-top{
  display:flex;
  gap: 12px;
  align-items:flex-start;
}

.cb-redirect-title{
  margin:0;
  font-size:18px;
}

.cb-redirect-subtitle{
  margin:6px 0 0;
  color: var(--text-2);
  font-size: 13px;
}

.cb-redirect-hint{
  margin: 14px 0 14px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(15,23,32,0.85);
  border: 1px solid rgba(31,42,55,0.85);
  color: var(--muted);
  font-size: 13px;
}

.cb-redirect-links{
  display:flex;
  flex-wrap:wrap;
  gap: 10px;
}

.cb-redirect-footnote{
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.cb-redirect-footer{
  padding: 14px 16px 18px;
  font-size: 12px;
  color: var(--muted);
}

/* Spinner */
.cb-spinner{
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid rgba(152,166,183,0.35);
  border-top-color: rgba(138,180,248,0.95);
  margin-top: 2px;
  animation: cbSpin 0.9s linear infinite;
}

@keyframes cbSpin{ to{ transform: rotate(360deg); } }

@media (max-width: 520px){
  .cb-redirect-tagline{ display:none; }
  .cb-redirect-links .action-btn{ width:100%; }
}