/* ==========================================================================
   PREMIUM XIANXIA GAMING THEME FOR PHONG THẦN (id.fsthienmenh.org)
   Optimized with High CSS Specificity to Override Legacy Corona Admin Styles
   ========================================================================== */

:root {
  --font-main: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-heading: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  --bg-dark-base: #060911;
  --bg-card: rgba(13, 19, 33, 0.82);
  --bg-card-hover: rgba(20, 29, 50, 0.9);
  --bg-input: rgba(6, 10, 19, 0.8);
  --bg-input-focus: rgba(12, 18, 32, 0.95);
  
  --gold-primary: #f59e0b;
  --gold-light: #fbbf24;
  --gold-dark: #b45309;
  --gold-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #b45309 100%);
  --gold-gradient-hover: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
  --gold-glow: 0 0 25px rgba(245, 158, 11, 0.4);
  --gold-glow-soft: 0 0 15px rgba(245, 158, 11, 0.2);
  
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-gold: #fbbf24;
  
  --border-card: 1px solid rgba(245, 158, 11, 0.28);
  --border-input: 1px solid rgba(255, 255, 255, 0.12);
  --border-input-focus: 1px solid #f59e0b;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  
  --shadow-card: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 35px rgba(245, 158, 11, 0.12);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Reset & Background */
html, body {
  font-family: var(--font-main) !important;
  background-color: var(--bg-dark-base) !important;
  color: var(--text-main) !important;
  min-height: 100vh;
}

body {
  background: 
    radial-gradient(circle at 10% 15%, rgba(245, 158, 11, 0.09) 0%, transparent 35%),
    radial-gradient(circle at 90% 85%, rgba(139, 92, 246, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(13, 19, 33, 0.98) 0%, #060911 100%) !important;
  background-attachment: fixed !important;
}

/* Navbar */
.navbar {
  background: rgba(8, 13, 24, 0.9) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(245, 158, 11, 0.25) !important;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.6) !important;
}

.navbar .h_links .h_links_rt a {
  font-family: var(--font-main);
  font-weight: 600;
  color: #cbd5e1 !important;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.5px;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  text-decoration: none !important;
}

.navbar .h_links .h_links_rt a:hover {
  color: var(--gold-light) !important;
  background: rgba(245, 158, 11, 0.15);
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

/* Sidebar */
.sidebar {
  background: rgba(9, 14, 25, 0.9) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.06) !important;
}

.sidebar .nav .nav-item .nav-link {
  color: #94a3b8 !important;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.sidebar .nav .nav-item:hover .nav-link,
.sidebar .nav .nav-item.active .nav-link {
  color: var(--gold-light) !important;
  background: rgba(245, 158, 11, 0.1) !important;
}

.sidebar .nav .nav-item .menu-icon i {
  color: var(--gold-primary) !important;
}

/* Layout Containers & Adaptive Card Widths */
.main-panel {
  background: transparent !important;
}

.content-wrapper {
  background: transparent !important;
  padding: 2rem 1.5rem !important;
}

/* Login & Register (Single column centered) */
.login-section, .no-login .stretch-card {
  max-width: 540px !important;
  margin: 1.5rem auto !important;
  float: none !important;
}

/* Account Manager & Dashboard (Wide comfortable layout) */
.col-12.stretch-card {
  max-width: 960px !important;
  width: 100% !important;
  margin: 1rem auto !important;
  float: none !important;
}

/* The Glassmorphism Card */
.card {
  background: var(--bg-card) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: var(--border-card) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-card) !important;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #f59e0b, #fbbf24, #f59e0b, transparent);
}

.card .card-body {
  padding: 2.2rem 2.5rem !important;
}

@media (max-width: 768px) {
  .card .card-body {
    padding: 1.5rem 1.25rem !important;
  }
}

/* Fixed Modern Title (Resolves Overlapping Issue) */
#left_colm table {
  margin: 0 !important;
  border: none !important;
  width: 100% !important;
}

#left_colm table td {
  padding: 0 !important;
  border: none !important;
  text-align: center !important;
}

.title_page, #left_colm .title_page {
  font-family: var(--font-heading) !important;
  font-size: clamp(17px, 2.2vw, 22px) !important;
  font-weight: 800 !important;
  text-align: center !important;
  text-transform: uppercase !important;
  letter-spacing: 1.2px !important;
  color: var(--gold-light) !important;
  background: linear-gradient(135deg, #ffffff 15%, #fbbf24 65%, #f59e0b 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  
  /* Hard reset legacy style.css conflicting styles */
  height: auto !important;
  min-height: auto !important;
  line-height: 1.4 !important;
  padding: 0 0 12px 0 !important;
  margin: 0 0 20px 0 !important;
  border-bottom: none !important;
  border: none !important;
  width: 100% !important;
  display: block !important;
  position: relative !important;
}

.title_page::after, #left_colm .title_page::after {
  content: '';
  display: block;
  width: 90px;
  height: 3px;
  background: linear-gradient(90deg, transparent, #f59e0b, #fbbf24, transparent);
  border-radius: 2px;
  margin: 12px auto 0;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

/* ==========================================================================
   SHORTCUTS CARDS (ACCOUNT MANAGER) - Full Override of Legacy #left_colm styles
   ========================================================================== */
#left_colm .shortcuts {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 18px !important;
  list-style: none !important;
  padding: 0 !important;
  margin: 15px 0 25px 0 !important;
  float: none !important;
  width: 100% !important;
}

@media (max-width: 768px) {
  #left_colm .shortcuts {
    grid-template-columns: 1fr !important;
  }
}

#left_colm .shortcuts > li:last-child:nth-child(odd) {
  grid-column: 1 / -1 !important;
  max-width: 480px !important;
  margin: 0 auto !important;
  width: 100% !important;
}

#left_colm .shortcuts li {
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: none !important;
  line-height: normal !important;
}

#left_colm .shortcuts li a {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  width: 100% !important;
  height: auto !important;
  min-height: 80px !important;
  padding: 16px 20px !important;
  box-sizing: border-box !important;
  
  background: rgba(18, 25, 42, 0.85) !important;
  border: 1px solid rgba(245, 158, 11, 0.25) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4) !important;
  
  position: relative !important;
  overflow: hidden !important;
  text-decoration: none !important;
  text-shadow: none !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

#left_colm .shortcuts li a::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, #f59e0b, #fbbf24);
  opacity: 0.6;
  transition: opacity 0.25s ease;
}

#left_colm .shortcuts li a:hover {
  background: rgba(26, 38, 64, 0.95) !important;
  border-color: rgba(245, 158, 11, 0.65) !important;
  transform: translateY(-3px) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.6), 0 0 20px rgba(245, 158, 11, 0.25) !important;
}

#left_colm .shortcuts li a:hover::before {
  opacity: 1;
}

#left_colm .shortcuts li a span.image {
  position: static !important;
  flex-shrink: 0 !important;
  width: 48px !important;
  height: 48px !important;
  margin-right: 16px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(245, 158, 11, 0.08) !important;
  border: 1px solid rgba(245, 158, 11, 0.2) !important;
  border-radius: 10px !important;
  box-shadow: inset 0 0 10px rgba(245, 158, 11, 0.05) !important;
}

#left_colm .shortcuts li a span.image img {
  width: 36px !important;
  height: 36px !important;
  object-fit: contain !important;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4)) !important;
}

#left_colm .shortcuts li a .shortcut-info {
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

#left_colm .shortcuts li a span.title {
  position: static !important;
  display: block !important;
  font-family: var(--font-main) !important;
  font-size: 15.5px !important;
  font-weight: 700 !important;
  color: #f8fafc !important;
  margin: 0 0 3px 0 !important;
  line-height: 1.3 !important;
  transition: color 0.2s ease !important;
}

#left_colm .shortcuts li a:hover span.title {
  color: var(--gold-light) !important;
  text-shadow: 0 0 8px rgba(251, 191, 36, 0.4) !important;
}

#left_colm .shortcuts li a small {
  position: static !important;
  display: block !important;
  font-family: var(--font-main) !important;
  font-size: 12.5px !important;
  color: #94a3b8 !important;
  line-height: 1.35 !important;
}

#left_colm .shortcuts li a .shortcut-arrow {
  margin-left: 12px !important;
  font-size: 22px !important;
  color: rgba(245, 158, 11, 0.4) !important;
  transition: all 0.25s ease !important;
  flex-shrink: 0 !important;
}

#left_colm .shortcuts li a:hover .shortcut-arrow {
  color: #fbbf24 !important;
  transform: translateX(4px) !important;
}

/* ==========================================================================
   FORM CONTROLS (CLEAN VERTICAL STACKED LAYOUT)
   ========================================================================== */
.form-group.row {
  margin-left: 0 !important;
  margin-right: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  margin-bottom: 1.35rem !important;
}

.form-group.row label.col-form-label,
.form-group.row label[class*="col-sm-"] {
  max-width: 100% !important;
  width: 100% !important;
  flex: 0 0 100% !important;
  text-align: left !important;
  padding: 0 0 6px 2px !important;
  font-family: var(--font-main) !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  color: #cbd5e1 !important;
  letter-spacing: 0.3px !important;
}

.form-group.row div[class*="col-sm-"] {
  max-width: 100% !important;
  width: 100% !important;
  flex: 0 0 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.form-control {
  font-family: var(--font-main) !important;
  background: var(--bg-input) !important;
  border: var(--border-input) !important;
  border-radius: var(--radius-sm) !important;
  color: #f8fafc !important;
  padding: 12px 16px !important;
  height: 48px !important;
  font-size: 14px !important;
  transition: var(--transition) !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4) !important;
}

.form-control:focus {
  background: var(--bg-input-focus) !important;
  border-color: var(--gold-primary) !important;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.35), inset 0 2px 4px rgba(0, 0, 0, 0.3) !important;
  color: #ffffff !important;
  outline: none !important;
}

.form-control[readonly] {
  background: rgba(15, 23, 42, 0.5) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #fbbf24 !important;
  font-weight: 600 !important;
}

.form-control::placeholder {
  color: #64748b !important;
}

/* WebKit / Chromium Autofill Dark Override */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px #182235 inset !important;
  -webkit-text-fill-color: #f8fafc !important;
  transition: background-color 5000s ease-in-out 0s !important;
  caret-color: #f8fafc !important;
}

/* Prevent duplicate nested labels inside input containers */
.form-group.row div[class*="col-sm-"] > label:not(.msg) {
  display: none !important;
}

/* Captcha alignment & styling */
.captcha-img, img[src*="getCaptcha"] {
  height: 48px !important;
  width: auto !important;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
  display: block;
  cursor: pointer;
  transition: var(--transition);
}

img[src*="getCaptcha"]:hover {
  border-color: var(--gold-light);
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.45);
}

/* Buttons */
.btn-inverse-success, .btn-green, button[type="submit"] {
  width: 100%;
  font-family: var(--font-main) !important;
  font-weight: 700 !important;
  font-size: 15px !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
  padding: 13px 24px !important;
  border-radius: var(--radius-sm) !important;
  background: var(--gold-gradient) !important;
  border: none !important;
  color: #0c0f17 !important;
  box-shadow: var(--gold-glow) !important;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 15px;
  display: block;
}

.btn-inverse-success:hover, .btn-green:hover, button[type="submit"]:hover {
  background: var(--gold-gradient-hover) !important;
  box-shadow: 0 0 35px rgba(245, 158, 11, 0.65) !important;
  transform: translateY(-2px);
  color: #000000 !important;
}

.btn-inverse-success:active, button[type="submit"]:active {
  transform: translateY(0);
}

.btn-outline-secondary {
  font-family: var(--font-main) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  color: #cbd5e1 !important;
  padding: 7px 16px !important;
  border-radius: var(--radius-sm) !important;
  transition: var(--transition);
  text-decoration: none !important;
  display: inline-block;
  margin-left: 6px;
}

.btn-outline-secondary:hover {
  background: rgba(245, 158, 11, 0.15) !important;
  border-color: var(--gold-primary) !important;
  color: var(--gold-light) !important;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.3) !important;
}

.btn-outline-warning {
  font-family: var(--font-main) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(245, 158, 11, 0.45) !important;
  background: rgba(245, 158, 11, 0.08) !important;
  border-radius: var(--radius-sm) !important;
  padding: 6px 14px !important;
  transition: all 0.25s ease !important;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
}

.btn-outline-warning:hover {
  background: rgba(245, 158, 11, 0.22) !important;
  border-color: #fbbf24 !important;
  color: #ffffff !important;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.35) !important;
}

/* Auth Links */
.auth-footer-links {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 20px;
  margin-top: 22px;
}

.text-gold-link {
  color: #fbbf24 !important;
  text-decoration: none !important;
  font-size: 13.5px;
  font-weight: 600;
  transition: var(--transition);
}

.text-gold-link:hover {
  color: #f59e0b !important;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.6);
  text-decoration: underline !important;
}

/* Custom Alerts */
.custom-alert {
  padding: 14px 20px !important;
  border-radius: var(--radius-md) !important;
  margin-bottom: 22px !important;
  font-family: var(--font-main) !important;
  font-size: 14px !important;
  font-weight: 500;
  display: flex;
  align-items: center;
  backdrop-filter: blur(14px);
  animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.custom-alert-error {
  background: rgba(220, 38, 38, 0.16) !important;
  border: 1px solid rgba(239, 68, 68, 0.45) !important;
  color: #fca5a5 !important;
  box-shadow: 0 4px 25px rgba(220, 38, 38, 0.25) !important;
}

.custom-alert-error i {
  color: #ef4444;
  font-size: 20px;
  margin-right: 12px;
}

.custom-alert-success {
  background: rgba(16, 185, 129, 0.16) !important;
  border: 1px solid rgba(16, 185, 129, 0.45) !important;
  color: #6ee7b7 !important;
  box-shadow: 0 4px 25px rgba(16, 185, 129, 0.25) !important;
}

.custom-alert-success i {
  color: #10b981;
  font-size: 20px;
  margin-right: 12px;
}

.custom-alert .close {
  margin-left: auto;
  cursor: pointer;
  opacity: 0.7;
  transition: var(--transition);
  font-size: 18px;
}

.custom-alert .close:hover {
  opacity: 1;
  color: #ffffff;
}

/* Footer */
footer.footer {
  background: rgba(6, 9, 17, 0.95) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
  color: #64748b !important;
  padding: 22px 0 !important;
  font-size: 13px;
}

footer.footer a {
  color: var(--gold-primary) !important;
  text-decoration: none;
}

/* ==========================================================================
   CHỐNG TREO MÀN HÌNH ĐEN & BACKDROP OVERLAY KHÔNG BẤM ĐƯỢC
   ========================================================================== */
body:not(.modal-open) .modal-backdrop {
  display: none !important;
  pointer-events: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

.modal-backdrop:not(.show) {
  display: none !important;
  pointer-events: none !important;
}

.loading:not(.active) {
  display: none !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

.dark-bar:not(.show) {
  display: none !important;
  pointer-events: none !important;
}

.sweet-overlay:empty:not(.show) {
  display: none !important;
  pointer-events: none !important;
}

