:root {
  --m2-bg: #f3f6fb;
  --m2-surface: rgba(255, 255, 255, .92);
  --m2-surface-solid: #ffffff;
  --m2-surface-soft: #f8fafc;
  --m2-border: rgba(25, 39, 66, .10);
  --m2-text: #172033;
  --m2-muted: #70809a;
  --m2-primary: #315efb;
  --m2-primary-2: #683bff;
  --m2-accent: #13b6a4;
  --m2-gold: #e7a83d;
  --m2-danger: #e05261;
  --m2-shadow-sm: 0 8px 24px rgba(27, 39, 69, .06);
  --m2-shadow: 0 18px 55px rgba(27, 39, 69, .10);
  --m2-radius: 18px;
  --m2-radius-sm: 12px;
}

body.theme-dark {
  --m2-bg: #0b1020;
  --m2-surface: rgba(17, 25, 45, .92);
  --m2-surface-solid: #11192d;
  --m2-surface-soft: #151f37;
  --m2-border: rgba(255, 255, 255, .08);
  --m2-text: #edf2ff;
  --m2-muted: #9caac2;
  --m2-shadow-sm: 0 8px 24px rgba(0, 0, 0, .18);
  --m2-shadow: 0 18px 55px rgba(0, 0, 0, .28);
}

html { scroll-behavior: smooth; }

body {
  color: var(--m2-text);
  background:
    radial-gradient(circle at 8% -8%, rgba(49, 94, 251, .12), transparent 28rem),
    radial-gradient(circle at 92% 8%, rgba(104, 59, 255, .10), transparent 26rem),
    var(--m2-bg);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .34;
  background-image:
    linear-gradient(rgba(30, 47, 79, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 47, 79, .025) 1px, transparent 1px);
  background-size: 30px 30px;
  z-index: -1;
}

.theme-dark body::before,
body.theme-dark::before { opacity: .15; }

/* Top bar */
.admin-topbar {
  min-height: 72px;
  border: 0;
  border-bottom: 1px solid var(--m2-border);
  background: var(--m2-surface);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 4px 20px rgba(20, 34, 61, .035);
  position: sticky;
  top: 0;
  z-index: 1040;
}

.admin-topbar .container-xl { min-height: 72px; }

.admin-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 170px;
}

.admin-brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  height: 38px;
  padding: 4px 8px;
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(49, 94, 251, .08), rgba(104, 59, 255, .08));
  border: 1px solid rgba(49, 94, 251, .10);
}

.admin-brand-logo img { max-height: 28px; width: auto; }

.admin-brand-copy {
  line-height: 1.05;
  white-space: nowrap;
}

.admin-brand-copy strong {
  display: block;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.admin-brand-copy span {
  display: block;
  margin-top: 4px;
  color: var(--m2-muted);
  font-size: 10px;
  letter-spacing: .06em;
}

.admin-topbar .OyuncuAra {
  max-width: 470px;
  width: 100%;
  margin-left: 24px;
  padding: 5px;
  border: 1px solid var(--m2-border);
  border-radius: 14px;
  background: var(--m2-surface-soft);
}

.admin-topbar .OyuncuAra .form-select,
.admin-topbar .OyuncuAra .form-control {
  border: 0;
  box-shadow: none !important;
  background: transparent;
  min-height: 34px;
}

.admin-topbar .OyuncuAra .btn {
  min-width: 39px;
  border-radius: 10px !important;
}

.admin-topbar .nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 39px;
  min-height: 39px;
  border-radius: 11px;
  transition: .18s ease;
}

.admin-topbar .nav-link:hover { background: rgba(49, 94, 251, .08); }

.admin-topbar .avatar {
  box-shadow: 0 0 0 3px rgba(49, 94, 251, .10);
}

/* Main navigation */
.admin-menu-shell {
  position: sticky;
  top: 72px;
  z-index: 1030;
  border-bottom: 1px solid var(--m2-border);
  background: var(--m2-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.admin-menu-shell .navbar {
  min-height: 58px;
  border: 0 !important;
  background: transparent !important;
}

.admin-menu-shell .navbar-nav { gap: 5px; }

.admin-menu-shell .nav-item > .nav-link {
  min-height: 40px;
  padding: 9px 13px;
  border-radius: 11px;
  color: var(--m2-muted);
  font-weight: 600;
  transition: .18s ease;
}

.admin-menu-shell .nav-item > .nav-link:hover {
  color: var(--m2-primary);
  background: rgba(49, 94, 251, .075);
}

.admin-menu-shell .nav-item.active > .nav-link,
.admin-menu-shell .nav-item.show > .nav-link {
  color: #fff;
  background: linear-gradient(135deg, var(--m2-primary), var(--m2-primary-2));
  box-shadow: 0 8px 18px rgba(49, 94, 251, .22);
}

.admin-menu-shell .nav-link-icon { margin-right: 7px !important; }
.admin-menu-shell .nav-link-icon .icon { width: 19px; height: 19px; }

.dropdown-menu {
  border: 1px solid var(--m2-border);
  border-radius: 14px;
  background: var(--m2-surface-solid);
  box-shadow: var(--m2-shadow);
  padding: 7px;
}

.dropdown-item {
  border-radius: 9px;
  padding: 9px 11px;
  color: var(--m2-text);
}

.dropdown-item:hover,
.dropdown-item:focus {
  color: var(--m2-primary);
  background: rgba(49, 94, 251, .08);
}

.content { padding-top: 18px; min-height: calc(100vh - 168px); }
.container-xl { max-width: 1440px; }

/* Page headings */
.page-header { margin: 6px 0 18px; }
.page-title {
  font-weight: 800;
  letter-spacing: -.025em;
  color: var(--m2-text);
}

.page-pretitle {
  color: var(--m2-primary);
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}

/* Cards and tables */
.card {
  border: 1px solid var(--m2-border);
  border-radius: var(--m2-radius);
  background: var(--m2-surface-solid);
  box-shadow: var(--m2-shadow-sm);
  overflow: hidden;
}

.card-header {
  min-height: 62px;
  border-bottom: 1px solid var(--m2-border);
  background: linear-gradient(180deg, rgba(49, 94, 251, .025), transparent);
}

.card-title { font-weight: 750; letter-spacing: -.015em; }

.table { --tblr-table-border-color: var(--m2-border); }
.table > :not(caption) > * > * { padding: .78rem .8rem; }
.table thead th {
  color: var(--m2-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .055em;
  text-transform: uppercase;
  background: var(--m2-surface-soft);
}

.table-hover > tbody > tr:hover > * { background: rgba(49, 94, 251, .045); }

/* Forms */
.form-control,
.form-select,
.input-group-text,
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
  border-color: var(--m2-border) !important;
  border-radius: 11px;
  background-color: var(--m2-surface-soft);
  color: var(--m2-text);
  box-shadow: none;
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(49, 94, 251, .45) !important;
  box-shadow: 0 0 0 4px rgba(49, 94, 251, .09) !important;
}

.form-label { color: var(--m2-text); font-weight: 650; }

.btn {
  border-radius: 11px;
  font-weight: 700;
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}

.btn:hover { transform: translateY(-1px); }
.btn-primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--m2-primary), var(--m2-primary-2));
  box-shadow: 0 8px 18px rgba(49, 94, 251, .18);
}
.btn-primary:hover { opacity: .94; }

.badge { border-radius: 8px; }
.nav-tabs { border-bottom-color: var(--m2-border); }
.nav-tabs .nav-link { border-radius: 10px 10px 0 0; font-weight: 650; }

/* Dashboard hero */
.admin-hero {
  position: relative;
  overflow: hidden;
  min-height: 250px;
  margin-bottom: 22px;
  border-radius: 24px;
  color: #fff;
  background:
    radial-gradient(circle at 78% 18%, rgba(255, 255, 255, .18), transparent 18rem),
    radial-gradient(circle at 90% 115%, rgba(19, 182, 164, .45), transparent 21rem),
    linear-gradient(125deg, #17234c 0%, #315efb 50%, #683bff 100%);
  box-shadow: 0 24px 60px rgba(38, 67, 170, .25);
}

.admin-hero::before,
.admin-hero::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 50%;
}

.admin-hero::before { width: 420px; height: 420px; right: -125px; top: -205px; }
.admin-hero::after { width: 270px; height: 270px; right: 72px; bottom: -205px; }

.admin-hero-grid {
  position: absolute;
  inset: 0;
  opacity: .13;
  background-image:
    linear-gradient(rgba(255, 255, 255, .3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .3) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 55%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 55%);
}

.admin-hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  min-height: 250px;
  padding: 34px 38px;
}

.admin-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  background: rgba(255, 255, 255, .10);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.admin-hero-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #42e7c9;
  box-shadow: 0 0 0 5px rgba(66, 231, 201, .14);
}

.admin-hero h1 {
  max-width: 720px;
  margin: 16px 0 10px;
  color: #fff;
  font-size: clamp(27px, 4vw, 44px);
  line-height: 1.05;
  letter-spacing: -.045em;
}

.admin-hero p {
  max-width: 650px;
  margin: 0;
  color: rgba(255, 255, 255, .78);
  font-size: 15px;
  line-height: 1.7;
}

.admin-hero-panel {
  flex: 0 0 300px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 18px;
  background: rgba(10, 17, 46, .24);
  backdrop-filter: blur(12px);
}

.admin-hero-panel-title {
  margin-bottom: 12px;
  color: rgba(255, 255, 255, .62);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.admin-hero-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .10);
}
.admin-hero-status:last-child { border-bottom: 0; }
.admin-hero-status span { color: rgba(255, 255, 255, .68); font-size: 12px; }
.admin-hero-status strong { color: #fff; font-size: 12px; }

.dashboard-mini-card {
  height: 100%;
  padding: 20px;
  border: 1px solid var(--m2-border);
  border-radius: 17px;
  background: var(--m2-surface-solid);
  box-shadow: var(--m2-shadow-sm);
}

.dashboard-mini-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 43px;
  height: 43px;
  margin-bottom: 15px;
  border-radius: 13px;
  color: var(--m2-primary);
  background: rgba(49, 94, 251, .09);
}
.dashboard-mini-icon.teal { color: var(--m2-accent); background: rgba(19, 182, 164, .10); }
.dashboard-mini-icon.gold { color: var(--m2-gold); background: rgba(231, 168, 61, .12); }
.dashboard-mini-card h3 { margin: 0 0 6px; font-size: 15px; font-weight: 750; }
.dashboard-mini-card p { margin: 0; color: var(--m2-muted); font-size: 12px; line-height: 1.6; }

.online-stat-card .card-body { padding: 0; }
.online-stat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px;
  border-bottom: 1px solid var(--m2-border);
}
.online-stat-head h3 { margin: 0; font-size: 17px; }
.online-stat-head p { margin: 4px 0 0; color: var(--m2-muted); font-size: 12px; }
.online-stat-total { padding: 18px 22px 4px; }
.online-stat-total h4 { margin: 0; font-size: 15px; }

/* Login */
.admin-login-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 5%, rgba(49, 94, 251, .22), transparent 30rem),
    radial-gradient(circle at 95% 80%, rgba(104, 59, 255, .22), transparent 31rem),
    #0b1020;
}

.admin-login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, .92fr);
  min-height: 100vh;
}

.admin-login-visual {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 54px 60px;
  color: #fff;
  background:
    linear-gradient(130deg, rgba(10, 16, 35, .10), rgba(10, 16, 35, .72)),
    radial-gradient(circle at 75% 30%, rgba(49, 94, 251, .76), transparent 23rem),
    linear-gradient(145deg, #17244b, #151d3b 55%, #0b1020);
}

.admin-login-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .18;
  background-image:
    linear-gradient(rgba(255, 255, 255, .18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .18) 1px, transparent 1px);
  background-size: 34px 34px;
}

.admin-login-visual::after {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  right: -150px;
  bottom: -260px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 50%;
  box-shadow: 0 0 0 60px rgba(255, 255, 255, .025), 0 0 0 120px rgba(255, 255, 255, .018);
}

.admin-login-visual > * { position: relative; z-index: 2; }
.admin-login-logo { max-width: 160px; max-height: 48px; object-fit: contain; object-position: left center; }
.admin-login-kicker { color: #78e6d5; font-size: 11px; font-weight: 800; letter-spacing: .10em; text-transform: uppercase; }
.admin-login-visual h1 { max-width: 720px; margin: 18px 0 16px; color: #fff; font-size: clamp(38px, 5vw, 68px); line-height: .98; letter-spacing: -.055em; }
.admin-login-visual p { max-width: 650px; color: rgba(255, 255, 255, .66); font-size: 15px; line-height: 1.8; }
.admin-login-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.admin-login-badge { padding: 8px 12px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 999px; color: rgba(255, 255, 255, .78); background: rgba(255, 255, 255, .06); font-size: 11px; }
.admin-login-foot { color: rgba(255, 255, 255, .38); font-size: 11px; }

.admin-login-form-side {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: rgba(11, 16, 32, .78);
  backdrop-filter: blur(12px);
}

.admin-login-card { width: min(100%, 455px); }
.admin-login-card .card {
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 22px;
  background: rgba(20, 29, 52, .92);
  box-shadow: 0 34px 80px rgba(0, 0, 0, .35);
}
.admin-login-card .card-body { padding: 34px; }
.admin-login-card h2 { margin: 0 0 8px; color: #fff; font-size: 27px; letter-spacing: -.035em; }
.admin-login-card .login-subtitle { margin: 0 0 28px; color: #94a3bd; font-size: 13px; line-height: 1.6; }
.admin-login-card .form-label { color: #dfe7f6; }
.admin-login-card .form-control,
.admin-login-card .input-group-text {
  min-height: 47px;
  border-color: rgba(255, 255, 255, .09) !important;
  background: rgba(255, 255, 255, .045);
  color: #fff;
}
.admin-login-card .form-control::placeholder { color: #71809a; }
.admin-login-card .input-group-text a { color: #aab8ce !important; }
.admin-login-card .form-check-label { color: #aab8ce; }
.admin-login-card .btn-primary { min-height: 48px; font-size: 14px; }
.admin-login-security { display: flex; align-items: center; gap: 8px; margin-top: 18px; color: #71809a; font-size: 11px; }
.admin-login-security::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #39d5b7; box-shadow: 0 0 0 5px rgba(57, 213, 183, .10); }

.footer { color: var(--m2-muted); }
.footer .list-inline-item { font-size: 12px; }

.site_loading {
  background: rgba(8, 13, 26, .55) !important;
  backdrop-filter: blur(4px);
}

@media (max-width: 1199.98px) {
  .admin-brand-copy { display: none; }
  .admin-topbar .OyuncuAra { margin-left: 12px; max-width: 390px; }
  .admin-hero-panel { flex-basis: 265px; }
}

@media (max-width: 991.98px) {
  .admin-topbar { position: relative; top: auto; }
  .admin-menu-shell { position: relative; top: auto; }
  .admin-topbar .OyuncuAra { order: 3; max-width: none; width: 100%; margin: 10px 0 0; }
  .admin-topbar .container-xl { flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
  .admin-hero-content { align-items: flex-start; flex-direction: column; }
  .admin-hero-panel { width: 100%; flex-basis: auto; }
  .admin-login-shell { grid-template-columns: 1fr; }
  .admin-login-visual { display: none; }
}

@media (max-width: 767.98px) {
  .content { padding-top: 8px; }
  .admin-hero { min-height: auto; border-radius: 18px; }
  .admin-hero-content { min-height: auto; padding: 26px 22px; }
  .admin-hero h1 { font-size: 30px; }
  .admin-login-form-side { padding: 22px; }
  .admin-login-card .card-body { padding: 26px 22px; }
  .card { border-radius: 15px; }
}
