/* =========================================================================
   GARENA365.VN — CLIENT STOREFRONT STYLES (FULL PC & MOBILE)
   ========================================================================= */
.layout-client {
  background: var(--bg, #f8fafc);
  color: var(--ink, #0f172a);
}

.topbar-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, #e11d48, #f97316);
  color: #fff;
  font-weight: 900;
  font-size: 11px;
  letter-spacing: 0.04em;
  margin-right: 6px;
}

.brand-domain {
  display: block;
  font-size: 19px;
  font-weight: 950;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #e11d48 0%, #f97316 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand small {
  display: block;
  font-size: 10px;
  font-weight: 800;
  color: #64748b;
  letter-spacing: 0.05em;
}

/* Nút 3 gạch Danh mục & Dịch vụ */
.menu-3bar-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 15px;
  border-radius: 12px;
  border: 1.5px solid rgba(225, 29, 72, 0.25);
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.08), rgba(249, 115, 22, 0.08));
  color: #be123c;
  font-weight: 800;
  font-size: 13.5px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.menu-3bar-btn:hover,
.menu-3bar-btn[aria-expanded="true"] {
  background: linear-gradient(135deg, #e11d48, #f97316);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 10px 22px -10px rgba(225, 29, 72, 0.55);
}

.bars-icon {
  width: 18px;
  height: 14px;
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
}

.bars-icon span {
  display: block;
  width: 100%;
  height: 2.2px;
  border-radius: 4px;
  background: currentColor;
  transition: transform 0.2s ease;
}

.wallet-pill,
.profile-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 13px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  font-weight: 800;
  font-size: 13.5px;
  color: #0f172a;
  text-decoration: none;
  transition: all 0.18s ease;
}

.wallet-pill {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
}

.profile-pill:hover,
.wallet-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px -10px rgba(15, 23, 42, 0.15);
}

.profile-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e11d48, #f97316);
  color: #ffffff;
  font-weight: 900;
  font-size: 13px;
  display: inline-grid;
  place-items: center;
}

/* Khay mở rộng Dịch vụ khi bấm nút 3 gạch (#service-drawer) */
.service-drawer {
  display: none;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  border-bottom: 2px solid #e11d48;
  padding: 20px 0 24px;
  box-shadow: 0 24px 48px -16px rgba(15, 23, 42, 0.18);
}

.service-drawer.open {
  display: block;
  animation: g365SlideDown 0.2s ease-out;
}

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

.service-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}

.service-drawer-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 900;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.service-drawer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.service-group-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 15px;
}

.service-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #e11d48;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px dashed #cbd5e1;
}

.service-group-links {
  display: grid;
  gap: 6px;
}

.service-group-links a {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 11px;
  color: #0f172a;
  text-decoration: none;
  font-weight: 700;
  font-size: 13.5px;
  transition: background 0.15s ease, color 0.15s ease;
}

.service-group-links a:hover {
  background: #ffffff;
  color: #e11d48;
  box-shadow: 0 4px 12px -4px rgba(15, 23, 42, 0.08);
}

.service-group-links a small {
  display: block;
  font-size: 11.5px;
  font-weight: 500;
  color: #64748b;
  margin-top: 2px;
}

/* Dải lối tắt 6 dịch vụ trang chủ */
.quick-services-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 22px;
}

.quick-service-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 14px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 8px 20px -12px rgba(15, 23, 42, 0.08);
  text-decoration: none;
  color: #0f172a;
  transition: all 0.18s ease;
}

.quick-service-item:hover {
  border-color: #e11d48;
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -12px rgba(225, 29, 72, 0.18);
}

.quick-service-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.12), rgba(249, 115, 22, 0.12));
  color: #e11d48;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.quick-service-item strong {
  display: block;
  font-size: 13.5px;
  font-weight: 800;
}

.quick-service-item small {
  display: block;
  font-size: 11.5px;
  color: #64748b;
}

/* Subnav & Breadcrumb cho các trang con Client */
.breadcrumb {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 10px;
}
.breadcrumb a {
  color: #e11d48;
  font-weight: 700;
  text-decoration: none;
}

.page-heading {
  margin-bottom: 18px;
}
.page-heading h1 {
  margin: 0 0 6px;
  font-size: 26px;
  font-weight: 900;
}
.page-heading p {
  margin: 0;
  color: #64748b;
  font-size: 14.5px;
}

.mp-subnav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 20px;
}
.mp-subnav a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 15px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  font-weight: 700;
  font-size: 13.5px;
  color: #334155;
  white-space: nowrap;
  text-decoration: none;
}
.mp-subnav a.active,
.mp-subnav a:hover {
  background: linear-gradient(135deg, #e11d48, #f97316);
  color: #ffffff;
  border-color: transparent;
}

/* Live Ticker, Hero Metrics & Transparency Grid */
.home-live-ticker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 16px;
  margin-bottom: 18px;
  border-radius: 14px;
  background: linear-gradient(90deg, #0f172a 0%, #1e293b 100%);
  color: #f8fafc;
  font-size: 13px;
  box-shadow: 0 10px 25px -10px rgba(15, 23, 42, 0.25);
}
.ticker-badge {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  font-weight: 800;
  font-size: 11.5px;
  white-space: nowrap;
}
.ticker-text { flex: 1; color: #e2e8f0; }
.ticker-cta { color: #fb7185; font-weight: 800; text-decoration: none; white-space: nowrap; }

.hero-metrics-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}
.hero-metric-box {
  background: rgba(15, 23, 42, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 10px 12px;
}
.hero-metric-box strong { display: block; font-size: 17px; color: #ffffff; }
.hero-metric-box span { font-size: 11.5px; color: rgba(255, 255, 255, 0.78); }

.home-transparency-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
}

.alert-banner {
  padding: 13px 16px;
  border-radius: 12px;
  margin-bottom: 16px;
  font-weight: 600;
  font-size: 14px;
}
.alert-banner.success { background: #ecfdf5; border: 1px solid #10b981; color: #065f46; }
.alert-banner.error { background: #fef2f2; border: 1px solid #ef4444; color: #991b1b; }

@media (max-width: 1080px) {
  .quick-services-strip { grid-template-columns: repeat(3, 1fr); }
  .service-drawer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .quick-services-strip { grid-template-columns: repeat(2, 1fr); }
  .service-drawer-grid { grid-template-columns: 1fr; }
  .hero-metrics-bar { grid-template-columns: repeat(2, 1fr); }
  .home-transparency-grid { grid-template-columns: 1fr; }
  .home-live-ticker { flex-direction: column; align-items: flex-start; }
  .menu-3bar-btn .menu-label { display: none; }
}

/* =========================================================================
   GARENA365.VN — GLOBAL POPUP MODAL & TOAST NOTIFICATION (PC & MOBILE)
   ========================================================================= */
.g365-popup-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
.g365-popup-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}
.g365-popup-modal {
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  color: #0f172a;
  border-radius: 22px;
  padding: 28px 24px 24px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.45);
  border: 1px solid #e2e8f0;
  text-align: center;
  transform: translateY(16px) scale(0.96);
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
.g365-popup-backdrop.show .g365-popup-modal {
  transform: translateY(0) scale(1);
}
.g365-popup-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 900;
}
.g365-popup-icon.success {
  background: #ecfdf5;
  color: #059669;
  box-shadow: 0 0 0 8px rgba(16, 185, 129, 0.12);
}
.g365-popup-icon.error {
  background: #fef2f2;
  color: #e11d48;
  box-shadow: 0 0 0 8px rgba(225, 29, 72, 0.12);
}
.g365-popup-icon.warning {
  background: #fffbeb;
  color: #d97706;
  box-shadow: 0 0 0 8px rgba(245, 158, 11, 0.12);
}
.g365-popup-icon.info {
  background: #eef2ff;
  color: #4f46e5;
  box-shadow: 0 0 0 8px rgba(79, 70, 229, 0.12);
}
.g365-popup-title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 900;
  color: #0f172a;
}
.g365-popup-msg {
  margin: 0 0 22px;
  font-size: 14.5px;
  line-height: 1.6;
  color: #475569;
}
.g365-popup-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.g365-popup-btn {
  flex: 1;
  padding: 13px 18px;
  border-radius: 13px;
  border: none;
  font-weight: 800;
  font-size: 14.5px;
  cursor: pointer;
  background: linear-gradient(135deg, #e11d48, #f97316);
  color: #ffffff;
  box-shadow: 0 10px 20px -8px rgba(225, 29, 72, 0.5);
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.g365-popup-btn:hover {
  transform: translateY(-1px);
}
.g365-toast-stack {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9998;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
  width: calc(100% - 32px);
  pointer-events: none;
}
.g365-toast-item {
  pointer-events: auto;
  background: #0f172a;
  color: #f8fafc;
  padding: 13px 16px;
  border-radius: 14px;
  box-shadow: 0 16px 32px -10px rgba(0, 0, 0, 0.4);
  border-left: 4px solid #10b981;
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.g365-toast-item.error { border-left-color: #ef4444; }
.g365-toast-item.warning { border-left-color: #f59e0b; }

/* Upgraded Auth Split Layout & Responsive Mobile/PC */
.auth-wrapper {
  max-width: 1080px;
  margin: 22px auto 44px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 24px;
  align-items: stretch;
}
.auth-showcase {
  background: linear-gradient(145deg, #0f172a 0%, #1e1b4b 52%, #881337 100%);
  color: #ffffff;
  border-radius: 24px;
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 24px 48px -18px rgba(15, 23, 42, 0.35);
}
.auth-showcase h2 {
  font-size: 28px;
  line-height: 1.25;
  margin: 14px 0 10px;
  color: #ffffff;
}
.auth-showcase p {
  color: #cbd5e1;
  font-size: 14.5px;
  line-height: 1.65;
  margin: 0 0 24px;
}
.auth-perks {
  display: grid;
  gap: 14px;
}
.auth-perk {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 15px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.auth-perk strong {
  display: block;
  font-size: 14px;
  color: #ffffff;
  margin-bottom: 2px;
}
.auth-perk small {
  font-size: 12.5px;
  color: #cbd5e1;
}
.auth-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  padding: 34px 30px;
  box-shadow: 0 20px 45px -18px rgba(15, 23, 42, 0.1);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  border-radius: 14px;
  background: #f1f5f9;
  margin-bottom: 22px;
}
.auth-tabs a {
  text-align: center;
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 13.5px;
  color: #475569;
  text-decoration: none;
  transition: all 0.18s ease;
}
.auth-tabs a.active {
  background: #ffffff;
  color: #e11d48;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}
.auth-success-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #ecfdf5;
  border: 1.5px solid #10b981;
  color: #065f46;
  margin-bottom: 18px;
  font-size: 13.5px;
  line-height: 1.5;
}
.pass-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.pass-wrap input {
  width: 100%;
  padding-right: 68px !important;
}
.pass-toggle {
  position: absolute;
  right: 8px;
  padding: 6px 11px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.auth-footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 700;
}
.auth-footer a {
  color: #e11d48;
  text-decoration: none;
}
@media (max-width: 900px) {
  .auth-wrapper {
    grid-template-columns: 1fr;
    margin: 12px auto 32px;
  }
  .auth-card {
    order: -1;
    padding: 24px 18px;
  }
  .auth-showcase {
    padding: 26px 20px;
  }
  .g365-toast-stack {
    top: auto;
    bottom: 18px;
    right: 16px;
    left: 16px;
    width: auto;
    max-width: none;
  }
}
