/* ==========================================================================
   auth.css — màn đăng nhập + trang quản trị.
   Dùng lại tông xanh nỉ / vàng kim của bàn chơi.
   ========================================================================== */

.auth-body {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px 16px;
  background:
    radial-gradient(ellipse at 50% 0%, #1d6b4a 0%, #0d3d2a 55%, #06231a 100%);
}

.auth-wrap { width: 100%; max-width: 430px; }

.auth-card {
  background: linear-gradient(180deg, rgba(18,42,32,0.96) 0%, rgba(10,28,21,0.98) 100%);
  border: 1px solid rgba(212,175,55,0.35);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.06);
  padding: 26px 26px 22px;
}

.auth-brand { text-align: center; margin-bottom: 20px; }
.auth-suits { font-size: 26px; letter-spacing: 6px; margin-bottom: 6px; }
.auth-suits .s-red { color: #e74c3c; }
.auth-suits .s-black { color: #ecf0f1; }
.auth-brand h1 {
  margin: 0; font-family: 'Cinzel', Georgia, serif;
  font-size: 21px; font-weight: 800; letter-spacing: 2px;
  color: #d4af37; text-shadow: 0 2px 10px rgba(212,175,55,0.3);
}

/* ------------------------------------------------------------------ tabs -- */
.auth-tabs { display: flex; gap: 4px; margin-bottom: 18px; background: rgba(0,0,0,0.28); padding: 4px; border-radius: 10px; }
.auth-tab {
  flex: 1; padding: 9px 4px; border: 0; border-radius: 7px; cursor: pointer;
  background: transparent; color: #9fb3a9;
  font-family: inherit; font-size: 12.5px; font-weight: 700; letter-spacing: .3px;
  transition: background .15s, color .15s;
}
.auth-tab:hover { color: #ecf0f1; }
.auth-tab.active { background: linear-gradient(180deg, #d4af37 0%, #a9871f 100%); color: #1a1a1a; }

/* ------------------------------------------------------------------ form -- */
.auth-pane { display: none; }
.auth-pane.active { display: block; }

.auth-pane label {
  display: block; margin: 12px 0 5px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase;
  color: #8fa89c;
}
.auth-pane input {
  width: 100%; box-sizing: border-box;
  padding: 11px 13px;
  background: rgba(0,0,0,0.34);
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 8px;
  color: #ecf0f1; font-family: inherit; font-size: 14.5px;
  transition: border-color .15s, box-shadow .15s;
}
.auth-pane input:focus {
  outline: none;
  border-color: rgba(212,175,55,0.65);
  box-shadow: 0 0 0 3px rgba(212,175,55,0.14);
}
#fg-code { font-family: 'Roboto Mono', monospace; letter-spacing: 2px; text-transform: uppercase; }

.auth-hint { font-size: 11.5px; color: #7d938a; margin-top: 5px; line-height: 1.5; }
.auth-hint b { color: #a8bdb2; }

.auth-note {
  font-size: 12.5px; line-height: 1.6; color: #bcd0c6;
  background: rgba(52,152,219,0.10);
  border: 1px solid rgba(52,152,219,0.30);
  border-radius: 8px; padding: 10px 12px; margin-bottom: 4px;
}
.auth-note b { color: #eaf4ff; }

.auth-primary, .auth-secondary {
  width: 100%; margin-top: 18px; padding: 12px;
  border: 0; border-radius: 9px; cursor: pointer;
  font-family: inherit; font-size: 13.5px; font-weight: 800; letter-spacing: 1px;
  transition: filter .15s, transform .06s;
}
.auth-primary { background: linear-gradient(180deg, #d4af37 0%, #a9871f 100%); color: #1a1a1a; }
.auth-secondary { background: linear-gradient(180deg, #34495e 0%, #22303d 100%); color: #ecf0f1; }
.auth-primary:hover, .auth-secondary:hover { filter: brightness(1.1); }
.auth-primary:active, .auth-secondary:active { transform: translateY(1px); }
.auth-primary:disabled { opacity: .55; cursor: default; filter: none; }

/* ------------------------------------------------------------- thông báo -- */
.auth-msg { display: none; }
.auth-msg.show {
  display: block; margin-bottom: 14px; padding: 10px 12px;
  border-radius: 8px; font-size: 13px; line-height: 1.5;
}
.auth-msg.err { background: rgba(231,76,60,0.14); border: 1px solid rgba(231,76,60,0.45); color: #ffb3aa; }
.auth-msg.ok  { background: rgba(46,204,113,0.13); border: 1px solid rgba(46,204,113,0.42); color: #a9edc6; }

/* ------------------------------------------------------ thanh đo mật khẩu -- */
.pw-meter { height: 4px; background: rgba(255,255,255,0.10); border-radius: 3px; margin-top: 7px; overflow: hidden; }
.pw-meter span { display: block; height: 100%; width: 0; border-radius: 3px; transition: width .2s, background .2s; }
.pw-meter span.weak { background: #e74c3c; }
.pw-meter span.ok   { background: #f1c40f; }
.pw-meter span.good { background: #2ecc71; }

.auth-foot { text-align: center; margin-top: 16px; font-size: 11.5px; color: #6f857b; letter-spacing: .3px; }

/* -------------------------------------------------------- hộp mã khôi phục -- */
.auth-modal {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.78); padding: 20px;
}
.auth-modal[hidden] { display: none; }
.auth-modal-card {
  width: 100%; max-width: 440px;
  background: linear-gradient(180deg, #163024 0%, #0c2019 100%);
  border: 1px solid rgba(212,175,55,0.45);
  border-radius: 14px; padding: 24px;
  box-shadow: 0 26px 70px rgba(0,0,0,0.6);
}
.auth-modal-card h2 {
  margin: 0 0 10px; font-family: 'Cinzel', Georgia, serif;
  font-size: 17px; color: #d4af37; letter-spacing: 1px; text-align: center;
}
.auth-modal-card .warn {
  margin: 0 0 14px; font-size: 12.5px; line-height: 1.6; color: #ffd9a0;
  background: rgba(230,126,34,0.13); border: 1px solid rgba(230,126,34,0.40);
  border-radius: 8px; padding: 9px 11px;
}
.code-box {
  font-family: 'Roboto Mono', monospace; font-size: 18px; font-weight: 700;
  letter-spacing: 2.5px; text-align: center; color: #2ecc71;
  background: rgba(0,0,0,0.45); border: 1px dashed rgba(46,204,113,0.5);
  border-radius: 9px; padding: 16px 8px; word-break: break-all; user-select: all;
}
.auth-modal-btns { display: flex; gap: 10px; }
.auth-modal-btns button { flex: 1; }

@media (max-width: 460px) {
  .auth-card { padding: 20px 18px 18px; }
  .auth-tab { font-size: 11.5px; }
  .code-box { font-size: 15px; letter-spacing: 1.5px; }
}

/* --------------------------------------------- biến thể KHU VỰC QUẢN TRỊ -- */
/* Tông đỏ sẫm để không nhầm với cửa đăng nhập của người chơi */
.auth-admin {
  background: radial-gradient(ellipse at 50% 0%, #4a1d1d 0%, #2b0f0f 55%, #180909 100%);
}
.auth-admin .auth-card { border-color: rgba(231,76,60,0.40); }
.auth-admin .auth-brand h1 { color: #ff8f80; text-shadow: 0 2px 10px rgba(231,76,60,0.28); font-size: 18px; }
.auth-admin .auth-tab.active { background: linear-gradient(180deg, #e74c3c 0%, #a5281a 100%); color: #fff; }
.auth-admin .auth-primary { background: linear-gradient(180deg, #e74c3c 0%, #a5281a 100%); color: #fff; }
.auth-admin .auth-pane input:focus {
  border-color: rgba(231,76,60,0.65);
  box-shadow: 0 0 0 3px rgba(231,76,60,0.14);
}
.auth-lock { font-size: 30px; margin-bottom: 4px; }
.auth-sub { margin-top: 7px; font-size: 11.5px; color: #c99; line-height: 1.5; }
.auth-foot-link { color: #8a9a92; text-decoration: none; }
.auth-foot-link:hover { color: #ecf0f1; text-decoration: underline; }
