/* ================================================================
   MAMUN X CHEATS — Premium White · Blue · Red Theme
   Version: 3.0 FINAL
   Author: MAMUN | https://t.me/+G9DiZ6NznoQ2Yzc1
   Responsive: Mobile 320px → Tablet → Laptop → Desktop 2560px
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ================================================================
   1. CSS CUSTOM PROPERTIES
   ================================================================ */
:root {
  /* Brand Colors */
  --blue:        #2563eb;
  --blue-dark:   #1d4ed8;
  --blue-light:  #3b82f6;
  --blue-faint:  rgba(37,99,235,0.06);
  --blue-border: rgba(37,99,235,0.15);

  --red:         #e11d48;
  --red-dark:    #be123c;
  --red-light:   #fb7185;
  --red-faint:   rgba(225,29,72,0.06);
  --red-border:  rgba(225,29,72,0.15);

  --white:       #ffffff;
  --bg:          #f4f7ff;
  --bg-card:     #ffffff;
  --bg-dark:     #0f172a;

  /* Text */
  --text-900:  #0f172a;
  --text-600:  #475569;
  --text-400:  #94a3b8;

  /* Semantic */
  --success:  #10b981;
  --warning:  #f59e0b;
  --danger:   #ef4444;
  --info:     #0ea5e9;

  /* Shadows */
  --shadow-xs: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-sm: 0 2px 8px rgba(37,99,235,0.08);
  --shadow-md: 0 4px 20px rgba(37,99,235,0.12);
  --shadow-lg: 0 8px 40px rgba(37,99,235,0.16);

  /* Border Radius */
  --r-xs:  6px;
  --r-sm:  10px;
  --r-md:  14px;
  --r-lg:  18px;
  --r-xl:  24px;

  /* Spacing */
  --gap-xs: 0.375rem;
  --gap-sm: 0.625rem;
  --gap-md: 1rem;
  --gap-lg: 1.5rem;
  --gap-xl: 2rem;

  /* Transition */
  --ease: all 0.18s cubic-bezier(0.4,0,0.2,1);

  /* Navbar height */
  --nav-h: 64px;
}

/* ================================================================
   2. GLOBAL RESET
   ================================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text-900);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }
a { text-decoration: none; color: var(--blue); transition: var(--ease); }
a:hover { color: var(--blue-dark); }
p { margin-bottom: 0.75rem; }
p:last-child { margin-bottom: 0; }

/* ================================================================
   3. TYPOGRAPHY
   ================================================================ */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-900);
  margin-bottom: 0.5rem;
}

/* ── MAMUN Brand Name ── */
.navbar-brand,
.brand-name {
  font-weight: 900;
  font-size: clamp(0.95rem, 2.2vw, 1.3rem);
  letter-spacing: -0.5px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--blue) !important;
  text-decoration: none !important;
}

.navbar-brand span,
.brand-name span {
  background: linear-gradient(130deg, var(--blue) 0%, var(--red) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ================================================================
   4. NAVBAR
   ================================================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1060;
  background: var(--white) !important;
  height: var(--nav-h);
  border-bottom: 2px solid var(--blue-border);
  box-shadow: var(--shadow-sm);
  padding: 0 !important;
  display: flex;
  align-items: center;
}

/* Inner wrapper */
.navbar > .container,
.navbar > .container-fluid,
.navbar > .container-xxl {
  display: flex;
  align-items: center;
  height: 100%;
  width: 100%;
  padding-inline: 1rem;
  flex-wrap: nowrap;
  gap: 0.5rem;
}

/* Nav links */
.navbar-nav {
  display: flex;
  flex-direction: row;
  gap: 0.2rem;
  align-items: center;
  flex-wrap: nowrap;
}

.navbar .nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-600) !important;
  padding: 0.45rem 0.9rem !important;
  border-radius: var(--r-sm);
  transition: var(--ease);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
  color: var(--blue) !important;
  background: var(--blue-faint);
}

/* Hamburger */
.navbar-toggler {
  border: 1.5px solid var(--blue-border) !important;
  border-radius: var(--r-sm) !important;
  padding: 0.4rem 0.65rem !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  flex-shrink: 0;
  margin-left: auto;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='%232563eb' stroke-linecap='round' stroke-width='2.2' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E") !important;
  width: 1.3em;
  height: 1.3em;
}

/* Collapsed mobile menu */
.navbar-collapse {
  position: absolute;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: var(--white);
  border-bottom: 2px solid var(--blue-border);
  box-shadow: var(--shadow-md);
  padding: 0.75rem 1rem;
  z-index: 1055;
}

.navbar-collapse .navbar-nav {
  flex-direction: column;
  align-items: stretch;
  gap: 0.2rem;
}

.navbar-collapse .nav-link {
  padding: 0.65rem 0.9rem !important;
  font-size: 0.9rem;
}

/* User pill (dropdown trigger) */
.navbar .user-pill,
.navbar .dropdown-toggle.user-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--blue-faint);
  border: 1.5px solid var(--blue-border);
  border-radius: var(--r-md);
  padding: 0.38rem 0.85rem !important;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--blue) !important;
  white-space: nowrap;
  flex-shrink: 0;
}

.navbar .user-pill::after,
.navbar .dropdown-toggle.user-btn::after {
  content: '▾';
  font-size: 0.7rem;
  margin-left: 0.1rem;
}

/* ================================================================
   5. LAYOUT / CONTAINER
   ================================================================ */
.container,
.container-sm,
.container-md,
.container-lg,
.container-xl,
.container-xxl {
  width: 100%;
  margin-inline: auto;
  padding-inline: 1rem;
}

@media (min-width: 576px)  { .container { max-width: 540px;  } }
@media (min-width: 768px)  { .container { max-width: 720px;  } }
@media (min-width: 992px)  { .container { max-width: 960px;  padding-inline: 1.5rem; } }
@media (min-width: 1200px) { .container { max-width: 1140px; } }
@media (min-width: 1400px) { .container { max-width: 1320px; } }

.container-fluid { padding-inline: 1.25rem; }

/* Page body padding */
main,
.main-content,
.page-body,
[class*="page-wrap"],
[class*="content-wrap"] {
  padding-top: var(--gap-lg);
  padding-bottom: var(--gap-xl);
}

/* Row/Col helpers */
.row { --bs-gutter-x: 1.25rem; }

/* ================================================================
   6. CARDS
   ================================================================ */
.card {
  background: var(--bg-card);
  border: 1.5px solid var(--blue-border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
  margin-bottom: var(--gap-md);
  overflow: hidden;
  width: 100%;
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* Card Header */
.card-header {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
  padding: 0.9rem 1.25rem;
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  min-height: 52px;
}

.card-header h1,
.card-header h2,
.card-header h3,
.card-header h4,
.card-header h5,
.card-header h6,
.card-header .card-title,
.card-header p {
  color: #fff !important;
  font-size: clamp(0.82rem, 2vw, 0.95rem);
  font-weight: 700;
  letter-spacing: 0.2px;
  margin: 0;
  flex: 1;
  min-width: 0;
}

/* Card with Red header variant */
.card-header.bg-danger,
.card-header.header-red {
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
}

/* Card body */
.card-body {
  padding: 1.25rem;
}

/* Card footer */
.card-footer {
  background: var(--blue-faint);
  border-top: 1px solid var(--blue-border);
  padding: 0.8rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* ── Dashboard Stat Card ── */
.stat-card {
  background: var(--bg-card);
  border: 1.5px solid var(--blue-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  text-align: center;
  transition: var(--ease);
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.stat-card .stat-head {
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 0.6rem 1rem;
  text-align: center;
}

.stat-card .stat-body {
  padding: 1rem 0.75rem 1.1rem;
}

.stat-number {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 900;
  color: var(--blue);
  line-height: 1.1;
  display: block;
}

.stat-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-400);
  margin-top: 0.25rem;
  display: block;
}

/* ================================================================
   7. BUTTONS  — clean, no fake 3-D
   ================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  line-height: 1.4;
  padding: 0.58rem 1.2rem;
  border-radius: var(--r-md);
  border: 1.5px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none !important;
  transition: var(--ease);
  vertical-align: middle;
  user-select: none;
}

.btn:active { transform: scale(0.97); }
.btn:focus  { outline: none; }

/* Primary — Blue */
.btn-primary {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}
.btn-primary:hover {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
  color: #fff;
  box-shadow: 0 4px 14px rgba(37,99,235,0.28);
  transform: translateY(-1px);
}

/* Danger / Red */
.btn-danger {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
.btn-danger:hover {
  background: var(--red-dark);
  border-color: var(--red-dark);
  color: #fff;
  box-shadow: 0 4px 14px rgba(225,29,72,0.28);
  transform: translateY(-1px);
}

/* Success */
.btn-success {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}
.btn-success:hover {
  background: #059669;
  border-color: #059669;
  color: #fff;
  box-shadow: 0 4px 14px rgba(16,185,129,0.28);
  transform: translateY(-1px);
}

/* Warning */
.btn-warning {
  background: var(--warning);
  border-color: var(--warning);
  color: #fff;
}
.btn-warning:hover {
  background: #d97706;
  border-color: #d97706;
  color: #fff;
  transform: translateY(-1px);
}

/* Secondary */
.btn-secondary {
  background: var(--text-400);
  border-color: var(--text-400);
  color: #fff;
}
.btn-secondary:hover {
  background: var(--text-600);
  border-color: var(--text-600);
  color: #fff;
}

/* Outline Blue */
.btn-outline-primary {
  background: transparent;
  border-color: var(--blue);
  color: var(--blue);
}
.btn-outline-primary:hover {
  background: var(--blue);
  color: #fff;
}

/* Outline Red */
.btn-outline-danger {
  background: transparent;
  border-color: var(--red);
  color: var(--red);
}
.btn-outline-danger:hover {
  background: var(--red);
  color: #fff;
}

/* Light / Ghost */
.btn-light {
  background: var(--blue-faint);
  border-color: var(--blue-border);
  color: var(--blue);
}
.btn-light:hover {
  background: var(--blue);
  color: #fff;
}

/* Sizes */
.btn-sm {
  font-size: 0.75rem;
  padding: 0.38rem 0.8rem;
  border-radius: var(--r-sm);
}
.btn-lg {
  font-size: 0.95rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--r-lg);
}
.btn-xs {
  font-size: 0.68rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--r-xs);
}
.btn-block, .btn.w-100 { width: 100%; }

/* Card-header inner buttons (always auto width) */
.card-header .btn {
  background: rgba(255,255,255,0.18) !important;
  border-color: rgba(255,255,255,0.35) !important;
  color: #fff !important;
  font-size: 0.75rem;
  padding: 0.35rem 0.8rem;
  width: auto !important;
  flex-shrink: 0;
}
.card-header .btn:hover {
  background: rgba(255,255,255,0.32) !important;
  color: #fff !important;
  transform: translateY(-1px);
}

/* Telegram button */
.btn-telegram {
  background: #0ea5e9;
  border-color: #0ea5e9;
  color: #fff !important;
}
.btn-telegram:hover {
  background: #0284c7;
  border-color: #0284c7;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(14,165,233,0.3);
  transform: translateY(-1px);
}

/* Copy button */
.btn-copy, .copy-btn {
  background: var(--blue-faint);
  border-color: var(--blue-border);
  color: var(--blue);
  font-size: 0.72rem;
  padding: 0.28rem 0.7rem;
  border-radius: var(--r-xs);
  font-weight: 600;
}
.btn-copy:hover, .copy-btn:hover {
  background: var(--blue);
  color: #fff;
}

/* ================================================================
   8. FORMS
   ================================================================ */
.form-group,
.mb-3 { margin-bottom: 1rem; }

/* Label */
label,
.form-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--blue-dark);
  margin-bottom: 0.35rem;
}

/* All inputs, selects, textareas */
.form-control,
.form-select,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="tel"],
input[type="url"],
textarea,
select {
  display: block;
  width: 100%;
  background: var(--white);
  border: 1.5px solid var(--blue-border);
  border-radius: var(--r-md);
  padding: 0.6rem 1rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  color: var(--text-900);
  transition: var(--ease);
  appearance: none;
  -webkit-appearance: none;
  line-height: 1.5;
}

.form-control::placeholder,
input::placeholder,
textarea::placeholder {
  color: var(--text-400);
  font-size: 0.82rem;
  font-weight: 400;
}

.form-control:focus,
.form-select:focus,
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

textarea.form-control { resize: vertical; min-height: 90px; }

/* Select chevron */
select,
.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%232563eb' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  background-size: 13px;
  padding-right: 2.5rem;
  cursor: pointer;
}

/* Checkbox / Radio */
.form-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-left: 0;
  margin-bottom: 0.45rem;
}
.form-check-input {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  border: 1.5px solid var(--blue-border);
  border-radius: 4px;
  accent-color: var(--blue);
  cursor: pointer;
  margin: 0;
}
.form-check-input[type="radio"] { border-radius: 50%; }
.form-check-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-600);
  text-transform: none;
  letter-spacing: 0;
  margin: 0;
  cursor: pointer;
}

/* Toggle switch */
.form-switch {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.form-switch .form-check-input {
  width: 2.2rem;
  height: 1.15rem;
  border-radius: 30px;
  background-color: #cbd5e1;
  border: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3E%3Ccircle r='3' fill='white'/%3E%3C/svg%3E");
  background-position: left center;
  transition: background-color 0.2s ease, background-position 0.2s ease;
}
.form-switch .form-check-input:checked {
  background-color: var(--blue);
  background-position: right center;
}

/* Input group */
.input-group { display: flex; align-items: stretch; width: 100%; }
.input-group .input-group-text {
  background: var(--blue-faint);
  border: 1.5px solid var(--blue-border);
  border-right: none;
  border-radius: var(--r-md) 0 0 var(--r-md);
  color: var(--blue);
  font-size: 0.85rem;
  padding: 0.6rem 0.9rem;
  white-space: nowrap;
  display: flex;
  align-items: center;
}
.input-group .form-control {
  border-radius: 0 var(--r-md) var(--r-md) 0;
}

/* Form helper text */
.form-text { font-size: 0.72rem; color: var(--text-400); margin-top: 0.25rem; }

/* ================================================================
   9. TABLES
   ================================================================ */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--r-md);
  border: 1px solid var(--blue-border);
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
}

.table thead tr {
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
}

.table thead th {
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.75rem 1rem;
  border: none;
  white-space: nowrap;
}

.table tbody td {
  font-size: 0.84rem;
  color: var(--text-600);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(37,99,235,0.07);
  vertical-align: middle;
}

.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--blue-faint); }

/* ================================================================
   10. DATATABLES OVERRIDE
   ================================================================ */
.dataTables_wrapper {
  width: 100%;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
  margin-bottom: 0.75rem;
  font-size: 0.82rem;
  color: var(--text-600);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.dataTables_wrapper .dataTables_length select {
  width: auto;
  padding: 0.35rem 2rem 0.35rem 0.65rem;
  font-size: 0.82rem;
  display: inline-flex;
}

.dataTables_wrapper .dataTables_filter input {
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
  width: auto;
  min-width: 160px;
}

.dataTables_wrapper .dataTables_info {
  font-size: 0.75rem;
  color: var(--text-400);
}

.dataTables_wrapper .dataTables_paginate {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

/* ================================================================
   11. MODAL
   ================================================================ */
.modal-dialog {
  margin: 1.5rem auto;
  max-width: 520px;
  width: calc(100% - 2rem);
}

.modal-content {
  border: none;
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--white);
}

.modal-header {
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  padding: 1rem 1.25rem;
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.modal-title {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
  flex: 1;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  background: var(--blue-faint);
  border-top: 1px solid var(--blue-border);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.modal-footer .btn { width: auto !important; }

.btn-close {
  filter: brightness(0) invert(1);
  opacity: 0.8;
  background-size: 12px;
  flex-shrink: 0;
}
.btn-close:hover { opacity: 1; }

/* ================================================================
   12. ALERTS
   ================================================================ */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  border-radius: var(--r-md);
  padding: 0.85rem 1rem;
  font-size: 0.855rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
  border-left-width: 4px;
}

.alert-success {
  background: #ecfdf5;
  border-color: #a7f3d0;
  border-left-color: var(--success);
  color: #065f46;
}
.alert-danger, .alert-error {
  background: #fef2f2;
  border-color: #fecaca;
  border-left-color: var(--danger);
  color: #991b1b;
}
.alert-warning {
  background: #fffbeb;
  border-color: #fde68a;
  border-left-color: var(--warning);
  color: #78350f;
}
.alert-info {
  background: #eff6ff;
  border-color: #bfdbfe;
  border-left-color: var(--blue);
  color: #1e40af;
}

.alert .btn-close {
  filter: none;
  opacity: 0.4;
  margin-left: auto;
  flex-shrink: 0;
}

/* ================================================================
   13. BADGES
   ================================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.28rem 0.65rem;
  border-radius: 30px;
  letter-spacing: 0.2px;
  white-space: nowrap;
  line-height: 1.4;
}

.badge.bg-primary,
.badge-primary   { background: var(--blue)    !important; color: #fff !important; }
.badge.bg-danger,
.badge-danger    { background: var(--red)     !important; color: #fff !important; }
.badge.bg-success,
.badge-success   { background: var(--success) !important; color: #fff !important; }
.badge.bg-warning,
.badge-warning   { background: var(--warning) !important; color: #fff !important; }
.badge.bg-secondary,
.badge-secondary { background: var(--text-400)!important; color: #fff !important; }
.badge.bg-info,
.badge-info      { background: var(--info)    !important; color: #fff !important; }

/* Role / status badges */
.badge-owner    { background: #7c3aed; color: #fff; }
.badge-active   { background: var(--success); color: #fff; }
.badge-inactive { background: var(--text-400); color: #fff; }
.badge-expired  { background: var(--danger); color: #fff; }
.badge-pause    { background: var(--warning); color: #fff; }

/* ================================================================
   14. PAGINATION
   ================================================================ */
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--blue);
  background: var(--white);
  border: 1.5px solid var(--blue-border);
  border-radius: var(--r-sm) !important;
  transition: var(--ease);
  cursor: pointer;
  text-decoration: none;
}

.page-link:hover {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

.page-item.active .page-link {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.page-item.disabled .page-link {
  background: var(--blue-faint);
  color: var(--text-400);
  pointer-events: none;
}

/* ================================================================
   15. DROPDOWN
   ================================================================ */
.dropdown-menu {
  background: var(--white);
  border: 1.5px solid var(--blue-border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  padding: 0.4rem;
  min-width: 170px;
  z-index: 1060;
}

.dropdown-item {
  font-size: 0.84rem;
  padding: 0.5rem 1rem;
  border-radius: var(--r-sm);
  color: var(--text-600);
  transition: var(--ease);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.dropdown-item:hover, .dropdown-item:focus {
  background: var(--blue-faint);
  color: var(--blue);
}

.dropdown-item.text-danger:hover { background: var(--red-faint); color: var(--red-dark); }
.dropdown-divider { border-color: var(--blue-border); margin: 0.3rem 0; }

/* ================================================================
   16. KEY / LICENSE BOX
   ================================================================ */
.key-box, .license-box {
  background: var(--blue-faint);
  border: 1.5px solid var(--blue-border);
  border-radius: var(--r-md);
  padding: 0.75rem 1rem;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.84rem;
  word-break: break-all;
  color: var(--blue-dark);
  letter-spacing: 0.4px;
}

.key-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--blue);
  margin-bottom: 0.3rem;
}

/* ================================================================
   17. TELEGRAM LINK
   ================================================================ */
.telegram-link,
a.telegram-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: #0ea5e9;
  color: #fff !important;
  padding: 0.5rem 1.1rem;
  border-radius: var(--r-md);
  font-size: 0.82rem;
  font-weight: 600;
  transition: var(--ease);
  text-decoration: none !important;
  white-space: nowrap;
}

.telegram-link:hover {
  background: #0284c7;
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(14,165,233,0.3);
}

/* ================================================================
   18. FOOTER
   ================================================================ */
footer,
.site-footer {
  background: var(--bg-dark);
  border-top: 2px solid var(--blue-border);
  padding: 1.75rem 1rem 1.25rem;
  margin-top: 2.5rem;
  text-align: center;
}

footer p,
footer span,
footer small,
footer a,
.site-footer * {
  color: rgba(255,255,255,0.6);
  font-size: 0.8rem;
}

footer a:hover { color: var(--blue-light) !important; }

.footer-brand {
  font-size: 1.1rem;
  font-weight: 900;
  color: #fff !important;
  display: inline-block;
  margin-bottom: 0.6rem;
  letter-spacing: -0.4px;
}

.footer-copyright {
  font-size: 0.7rem;
  opacity: 0.4;
  margin-top: 0.5rem;
}

footer .telegram-link { margin: 0.75rem auto 0; }

/* ================================================================
   19. SWEETALERT2 OVERRIDES
   ================================================================ */
.swal2-popup {
  border-radius: var(--r-xl) !important;
  font-family: 'Inter', sans-serif !important;
  padding: 1.75rem 2rem !important;
  max-width: 420px !important;
  width: 92% !important;
}

.swal2-title {
  font-size: 1.05rem !important;
  font-weight: 800 !important;
  color: var(--text-900) !important;
  padding: 0 !important;
  margin-bottom: 0.5rem !important;
}

.swal2-html-container {
  font-size: 0.875rem !important;
  color: var(--text-600) !important;
  margin: 0.25rem 0 1rem !important;
}

.swal2-actions { gap: 0.6rem !important; }

.swal2-confirm {
  background: var(--blue) !important;
  border-radius: var(--r-md) !important;
  font-weight: 600 !important;
  font-size: 0.875rem !important;
  padding: 0.6rem 1.5rem !important;
  box-shadow: none !important;
}

.swal2-cancel {
  background: #ef4444 !important;
  border-radius: var(--r-md) !important;
  font-weight: 600 !important;
  font-size: 0.875rem !important;
  padding: 0.6rem 1.5rem !important;
  box-shadow: none !important;
}

.swal2-icon { margin: 0 auto 1rem !important; }

/* ================================================================
   20. SCROLLBAR
   ================================================================ */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--blue-border); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--blue); }

/* ================================================================
   21. TEXT SELECTION
   ================================================================ */
::selection { background: var(--blue); color: #fff; }

/* ================================================================
   22. UTILITIES
   ================================================================ */
.text-primary   { color: var(--blue)    !important; }
.text-danger    { color: var(--red)     !important; }
.text-success   { color: var(--success) !important; }
.text-warning   { color: var(--warning) !important; }
.text-muted     { color: var(--text-400)!important; }
.text-dark      { color: var(--text-900)!important; }

.bg-primary-faint { background: var(--blue-faint) !important; }
.border-primary   { border-color: var(--blue) !important; }
.border-danger    { border-color: var(--red)  !important; }

.rounded-custom { border-radius: var(--r-md); }
.shadow-custom  { box-shadow: var(--shadow-md); }
.cursor-pointer { cursor: pointer; }
.overflow-hidden { overflow: hidden; }
.w-100   { width: 100%; }
.h-100   { height: 100%; }
.m-0     { margin: 0 !important; }
.p-0     { padding: 0 !important; }
.gap-1   { gap: 0.25rem; }
.gap-2   { gap: 0.5rem;  }
.gap-3   { gap: 0.75rem; }
.gap-4   { gap: 1rem;    }
.fw-bold { font-weight: 700; }
.fw-600  { font-weight: 600; }

/* ================================================================
   23. DIVIDER
   ================================================================ */
.divider {
  height: 1px;
  background: var(--blue-border);
  margin: 1rem 0;
  border: none;
}

/* ================================================================
   24. FADE-IN ANIMATION
   ================================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0);    }
}

.fade-in,
.card,
.alert,
.modal-content {
  animation: fadeUp 0.22s ease both;
}

/* ================================================================
   25. RESPONSIVE — DESKTOP (≥1200px)
   ================================================================ */
@media (min-width: 1200px) {
  :root { --nav-h: 68px; }
  .stat-number { font-size: 2.5rem; }
  .card-body   { padding: 1.5rem; }
  .container   { padding-inline: 1.5rem; }
}

/* ================================================================
   26. RESPONSIVE — LAPTOP (992–1199px)
   ================================================================ */
@media (min-width: 992px) and (max-width: 1199px) {
  .stat-number { font-size: 2rem; }
  .card-body   { padding: 1.25rem; }
}

/* ================================================================
   27. RESPONSIVE — TABLET (768–991px)
   ================================================================ */
@media (min-width: 768px) and (max-width: 991px) {
  :root { --nav-h: 60px; }

  .stat-number { font-size: 1.75rem; }
  .card-body   { padding: 1rem; }
  .modal-dialog { max-width: 480px; }

  .table thead th,
  .table tbody td { padding: 0.65rem 0.8rem; }
}

/* ================================================================
   28. RESPONSIVE — MOBILE (≤767px)
   ================================================================ */
@media (max-width: 767px) {
  :root { --nav-h: 56px; }

  /* ─ Navbar ─ */
  .navbar-brand { font-size: 1rem; }

  /* Prevent fixed-height on mobile to allow collapse */
  .navbar {
    height: auto;
    min-height: var(--nav-h);
    flex-wrap: wrap;
  }

  .navbar > .container,
  .navbar > .container-fluid {
    flex-wrap: nowrap;
    padding-block: 0.7rem;
  }

  .navbar-collapse {
    top: auto;
    position: static;
    border-radius: 0;
    border-bottom: none;
    border-top: 1px solid var(--blue-border);
    box-shadow: none;
    padding: 0.6rem 0.75rem;
  }

  /* ─ Buttons ─ */
  /* Full-width by default on mobile, except small/header/modal btns */
  .btn:not(.btn-sm):not(.btn-xs):not(.card-header .btn):not(.modal-footer .btn):not(.btn-copy):not(.copy-btn) {
    width: 100%;
    justify-content: center;
    margin-bottom: 0.4rem;
  }

  /* ─ Cards ─ */
  .card-body   { padding: 1rem; }
  .card-header { padding: 0.8rem 1rem; min-height: 48px; }
  .card-footer { padding: 0.7rem 1rem; }

  /* ─ Stat numbers ─ */
  .stat-number { font-size: 1.5rem; }
  .stat-label  { font-size: 0.65rem; }

  /* ─ Tables ─ */
  .table thead th { font-size: 0.65rem; padding: 0.6rem 0.65rem; }
  .table tbody td { font-size: 0.78rem; padding: 0.6rem 0.65rem; }

  /* ─ Forms ─ */
  .form-control,
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="search"],
  textarea,
  select {
    padding: 0.55rem 0.9rem;
    font-size: 0.82rem;
  }

  /* ─ Modal ─ */
  .modal-dialog {
    margin: 0.5rem auto;
    width: calc(100% - 1rem);
    max-width: 100%;
  }
  .modal-body   { padding: 1rem; }
  .modal-footer { padding: 0.85rem 1rem; }
  .modal-footer .btn { width: auto !important; margin-bottom: 0; }

  /* ─ Footer ─ */
  footer { padding: 1.25rem 0.75rem 1rem; margin-top: 1.75rem; }

  /* ─ Pagination ─ */
  .page-link { min-width: 30px; padding: 0.35rem 0.6rem; font-size: 0.72rem; }

  /* ─ DataTable controls ─ */
  .dataTables_wrapper .dataTables_length,
  .dataTables_wrapper .dataTables_filter {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }
  .dataTables_wrapper .dataTables_filter input { width: 100%; }
}

/* ================================================================
   29. RESPONSIVE — SMALL MOBILE (≤480px)
   ================================================================ */
@media (max-width: 480px) {
  .navbar-brand { font-size: 0.92rem; }

  h1 { font-size: 1.3rem; }
  h2 { font-size: 1.15rem; }
  h3 { font-size: 1rem; }
  h4 { font-size: 0.9rem; }

  .stat-number { font-size: 1.35rem; }

  .card-header h3,
  .card-header h4,
  .card-header h5 { font-size: 0.8rem; }

  .modal-content { border-radius: var(--r-lg); }

  .swal2-popup { padding: 1.25rem 1rem !important; }
}

/* ================================================================
   30. PRINT
   ================================================================ */
@media print {
  .navbar,
  footer,
  .btn,
  .modal { display: none !important; }

  body { background: #fff; color: #000; font-size: 12px; }
  .card { box-shadow: none !important; border: 1px solid #ccc; }
}
