/* ==========================================================================
   AdsFinal — Modern Dashboard Theme
   Styling-only override layer. Loaded last in <head>; every rule is scoped
   to body[data-af] so it never leaks into index.php or other pages.
   Many rules use !important because the PHP templates carry inline styles.
   ========================================================================== */

:root {
  --af-ink: #060a1a;
  --af-ink-2: #0b1230;
  --af-ink-3: #121b42;
  --af-bg: #f4f6fb;
  --af-surface: #ffffff;
  --af-surface-2: #f8f9fd;
  --af-line: #e5e8f1;
  --af-line-2: #d5dae8;
  --af-text: #111633;
  --af-text-2: #3b4263;
  --af-muted: #6a7192;
  --af-primary: #4353ff;
  --af-primary-600: #3341e6;
  --af-primary-700: #2a35bf;
  --af-primary-50: #eef0ff;
  --af-primary-100: #dfe3ff;
  --af-peri: #8a96ff;
  --af-aqua: #5ce1ff;
  --af-gold: #ffc94d;
  --af-success: #0f9d58;
  --af-success-50: #e7f6ee;
  --af-warning: #b87400;
  --af-warning-50: #fff6e0;
  --af-danger: #d93025;
  --af-danger-50: #fdecea;
  --af-radius: 16px;
  --af-radius-sm: 10px;
  --af-shadow: 0 1px 2px rgba(17, 22, 51, .04), 0 1px 3px rgba(17, 22, 51, .06);
  --af-shadow-lg: 0 12px 32px -12px rgba(17, 22, 51, .18);
  --af-ring: 0 0 0 4px rgba(67, 83, 255, .14);
  --af-body: 'Geist', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --af-display: 'Unbounded', 'Geist', system-ui, sans-serif;
  --af-ease: cubic-bezier(.2, .8, .2, 1);
}

/* --------------------------------------------------------------------------
   1. Base
   -------------------------------------------------------------------------- */
body[data-af] {
  font-family: var(--af-body) !important;
  background: var(--af-bg) !important;
  color: var(--af-text);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body[data-af] h1, body[data-af] h2, body[data-af] h3,
body[data-af] h4, body[data-af] h5, body[data-af] h6 {
  font-family: var(--af-body) !important;
  color: var(--af-text);
  letter-spacing: -.01em;
}
body[data-af] ::selection { background: var(--af-primary-100); }
body[data-af]::-webkit-scrollbar,
body[data-af] .sidebar::-webkit-scrollbar { width: 8px; background: transparent; }
body[data-af]::-webkit-scrollbar-track,
body[data-af] .sidebar::-webkit-scrollbar-track { background: transparent; }
body[data-af]::-webkit-scrollbar-thumb,
body[data-af] .sidebar::-webkit-scrollbar-thumb { background: #cfd4e4; border-radius: 8px; }

/* --------------------------------------------------------------------------
   2. Sidebar
   -------------------------------------------------------------------------- */
body[data-af] .sidebar {
  background: var(--af-surface) !important;
  border-right: 1px solid var(--af-line);
  width: 256px;
  padding-bottom: 32px;
}
body[data-af] .sidebar .logo {
  margin: 0 !important;
  padding: 22px 24px 18px !important;
  background: transparent !important;
  border-radius: 0 !important;
  align-items: center;
}
body[data-af] .sidebar .logo img {
  width: auto !important;
  max-width: none;
  height: 96px;
  margin: -24px 0 -24px -14px;
  object-fit: contain;
}
body[data-af] .sidebar .logo img[src$="logo.png"] { height: 48px; margin: 0; }
body[data-af] .sidebar_close_icon i {
  position: static !important;
  width: 36px; height: 36px; line-height: 36px;
  border-radius: 10px;
  font-size: 18px;
  color: var(--af-text-2);
  background: var(--af-surface-2);
}
body[data-af] #sidebar_menu { padding: 6px 12px 0 !important; margin: 0; }
body[data-af] #sidebar_menu li { list-style: none; }
body[data-af] .sidebar #sidebar_menu li a {
  display: flex !important;
  align-items: center;
  gap: 14px;
  margin: 2px 0;
  padding: 11px 14px !important;
  border-radius: 12px;
  background: transparent !important;
  color: var(--af-text-2) !important;
  font-size: 14px;
  font-weight: 500;
  transition: background .2s var(--af-ease), color .2s var(--af-ease);
}
body[data-af] .sidebar #sidebar_menu li a::before,
body[data-af] .sidebar #sidebar_menu li a::after { display: none !important; }
body[data-af] .sidebar #sidebar_menu li a i {
  width: 20px;
  margin: 0 !important;
  text-align: center;
  font-size: 15px;
  color: var(--af-muted) !important;
  transition: color .2s;
}
body[data-af] .sidebar #sidebar_menu li a img { width: 18px; height: 18px; opacity: .7; }
body[data-af] .sidebar #sidebar_menu li a:hover {
  background: var(--af-surface-2) !important;
  color: var(--af-text) !important;
  text-decoration: none;
}
body[data-af] .sidebar #sidebar_menu li a:hover i { color: var(--af-primary) !important; }
body[data-af] .sidebar #sidebar_menu li ul.mm-collapse { display: none !important; }

/* "Admin Access" entry gets a subtle highlighted chip */
body[data-af] .sidebar #sidebar_menu a[href="admin"],
body[data-af] .sidebar #sidebar_menu a[href="../admin"] {
  background: linear-gradient(135deg, var(--af-ink-2), var(--af-ink-3)) !important;
  color: #fff !important;
  margin-bottom: 8px !important;
}
body[data-af] .sidebar #sidebar_menu a[href="admin"] i,
body[data-af] .sidebar #sidebar_menu a[href="../admin"] i { color: var(--af-gold) !important; }

/* Active page indicator (AdSense style pill) */
body[data-af="dashboard"] .sidebar #sidebar_menu li a[href$="dashboard.php"],
body[data-af="link"] .sidebar #sidebar_menu li a[href$="link.php"],
body[data-af="addfund"] .sidebar #sidebar_menu li a[href$="addfund.php"],
body[data-af="paymenthistory"] .sidebar #sidebar_menu li a[href$="paymenthistory.php"],
body[data-af="refferals"] .sidebar #sidebar_menu li a[href$="refferals.php"],
body[data-af="about"] .sidebar #sidebar_menu li a[href$="about.php"],
body[data-af="contact"] .sidebar #sidebar_menu > li:last-child > a,
body[data-af="admin-index"] .sidebar #sidebar_menu li a[href="index.php"],
body[data-af="admin-rates"] .sidebar #sidebar_menu li a[href="rates.php"],
body[data-af="admin-warnings"] .sidebar #sidebar_menu li a[href="warnings.php"],
body[data-af="admin-proxywarnings"] .sidebar #sidebar_menu li a[href="proxywarnings.php"],
body[data-af="admin-earningcontrol"] .sidebar #sidebar_menu li a[href="earningcontrol.php"],
body[data-af="admin-users"] .sidebar #sidebar_menu li a[href="users.php"],
body[data-af="admin-links"] .sidebar #sidebar_menu li a[href="links.php"],
body[data-af="admin-linkstats"] .sidebar #sidebar_menu li a[href="links.php"],
body[data-af="admin-payment_methods"] .sidebar #sidebar_menu li a[href="payment_methods.php"],
body[data-af="admin-paymenthistory"] .sidebar #sidebar_menu li a[href="paymenthistory.php"],
body[data-af="admin-mail"] .sidebar #sidebar_menu li a[href="mail.php"] {
  background: var(--af-primary-50) !important;
  color: var(--af-primary-700) !important;
  font-weight: 600;
}
body[data-af="dashboard"] .sidebar #sidebar_menu li a[href$="dashboard.php"] i,
body[data-af="link"] .sidebar #sidebar_menu li a[href$="link.php"] i,
body[data-af="addfund"] .sidebar #sidebar_menu li a[href$="addfund.php"] i,
body[data-af="paymenthistory"] .sidebar #sidebar_menu li a[href$="paymenthistory.php"] i,
body[data-af="refferals"] .sidebar #sidebar_menu li a[href$="refferals.php"] i,
body[data-af="about"] .sidebar #sidebar_menu li a[href$="about.php"] i,
body[data-af="contact"] .sidebar #sidebar_menu > li:last-child > a i,
body[data-af^="admin-"] .sidebar #sidebar_menu li a[style] i { color: var(--af-primary) !important; }
body[data-af="admin-rates"] .sidebar #sidebar_menu li a[href="rates.php"] i,
body[data-af="admin-warnings"] .sidebar #sidebar_menu li a[href="warnings.php"] i,
body[data-af="admin-proxywarnings"] .sidebar #sidebar_menu li a[href="proxywarnings.php"] i,
body[data-af="admin-earningcontrol"] .sidebar #sidebar_menu li a[href="earningcontrol.php"] i,
body[data-af="admin-users"] .sidebar #sidebar_menu li a[href="users.php"] i,
body[data-af="admin-links"] .sidebar #sidebar_menu li a[href="links.php"] i,
body[data-af="admin-payment_methods"] .sidebar #sidebar_menu li a[href="payment_methods.php"] i,
body[data-af="admin-paymenthistory"] .sidebar #sidebar_menu li a[href="paymenthistory.php"] i,
body[data-af="admin-mail"] .sidebar #sidebar_menu li a[href="mail.php"] i { color: var(--af-primary) !important; }

@media (min-width: 992px) {
  body[data-af] .main_content { padding-left: 256px !important; }
  body[data-af] .footer_part { padding-left: 256px !important; }
}
@media (min-width: 992px) and (max-width: 1200px) {
  body[data-af] .sidebar { width: 232px !important; }
  body[data-af] .main_content,
  body[data-af] .footer_part { padding-left: 232px !important; }
}
@media (max-width: 991px) {
  body[data-af] .sidebar { width: 272px !important; left: -290px; }
  body[data-af] .sidebar.active_sidebar { left: 0; box-shadow: var(--af-shadow-lg); }
}

/* --------------------------------------------------------------------------
   3. Top header bar
   -------------------------------------------------------------------------- */
body[data-af] .main_content { background: transparent; padding-bottom: 80px; }
body[data-af] .header_iner {
  position: sticky !important;
  top: 0;
  z-index: 90;
  height: 68px !important;
  margin: 0 !important;
  padding: 0 28px !important;
  border-radius: 0 !important;
  background: rgba(255, 255, 255, .86) !important;
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--af-line);
  justify-content: space-between !important;
}
body[data-af] .header_iner .serach_field-area {
  display: block !important;
  margin: 0 !important;
  width: auto !important;
  flex: 1 1 auto;
  min-width: 0;
}
body[data-af] .header_iner .search_inner #headata {
  margin: 0;
  font-family: var(--af-display) !important;
  font-size: 18px;
  font-weight: 600;
  color: var(--af-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* pages whose header has no title text: show one, hide the dummy search box */
body[data-af="profile"] .header_iner .search_inner::before,
body[data-af="paymenthistory"] .header_iner .search_inner::before,
body[data-af="buy"] .header_iner .search_inner::before,
body[data-af^="admin-"] .header_iner .search_inner::before {
  font-family: var(--af-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--af-text);
  white-space: nowrap;
}
body[data-af="profile"] .header_iner .search_inner::before { content: "Profile Settings"; }
body[data-af="paymenthistory"] .header_iner .search_inner::before { content: "Payment History"; }
body[data-af^="admin-"] .header_iner .search_inner::before { content: "Admin Panel"; }
body[data-af="paymenthistory"] .header_iner .search_inner form,
body[data-af^="admin-"] .header_iner .search_inner form { display: none !important; }
/* admin header has a dummy search form */
body[data-af] .header_iner .search_field input {
  height: 40px;
  border: 1px solid var(--af-line) !important;
  background: var(--af-surface-2) !important;
  border-radius: 999px !important;
  padding: 0 18px 0 42px !important;
  font-size: 13px;
  width: 260px;
}
body[data-af] .header_iner .search_inner form { position: relative; }
body[data-af] .header_iner .search_inner button {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  border: 0; background: none; padding: 0;
}
body[data-af] .header_iner .search_inner button img { width: 15px; opacity: .55; }
body[data-af] .header_iner .header_right .header_notification_warp {
  margin: 0 18px 0 12px !important;
  list-style: none;
}
body[data-af] .header_iner .header_notification_warp li { list-style: none; }
body[data-af] .header_iner .header_notification_warp li a { margin: 0 !important; font-size: inherit !important; }
body[data-af] .header_iner #btn1 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px !important;
  border-radius: 999px !important;
  border: 0 !important;
  background: var(--af-primary) !important;
  color: #fff !important;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 6px 16px -6px rgba(67, 83, 255, .6);
  transition: background .2s, transform .2s var(--af-ease);
}
body[data-af] .header_iner #btn1:hover { background: var(--af-primary-600) !important; transform: translateY(-1px); }
body[data-af] .header_iner #btn1 i { font-size: 12px; }
body[data-af] .main_content > .container-fluid > .row { margin-left: 0; margin-right: 0; }
body[data-af] .header_iner .sidebar_icon { position: static !important; flex: none; }
body[data-af] .sidebar_icon i {
  width: 40px; height: 40px; line-height: 40px;
  text-align: center;
  border-radius: 12px;
  background: var(--af-surface-2);
  border: 1px solid var(--af-line);
  color: var(--af-text);
  margin-right: 12px;
  cursor: pointer;
}

/* profile avatar + dropdown */
body[data-af] .profile_info img {
  width: 40px !important; height: 40px !important;
  max-width: 40px !important; max-height: 40px !important;
  border: 2px solid var(--af-surface) !important;
  box-shadow: 0 0 0 2px var(--af-primary-100);
  object-fit: cover;
}
body[data-af] .profile_info .profile_info_iner {
  top: 56px !important;
  width: 248px;
  padding: 18px !important;
  text-align: left !important;
  background: var(--af-surface) !important;
  border: 1px solid var(--af-line);
  border-radius: 14px !important;
  box-shadow: var(--af-shadow-lg);
}
body[data-af] .profile_info .profile_info_iner::before { display: none !important; }
body[data-af] .profile_info:hover .profile_info_iner { top: 52px !important; }
body[data-af] .profile_info .profile_info_iner p {
  margin: 0 0 2px; color: var(--af-text) !important; font-size: 14px !important; font-weight: 600 !important;
}
body[data-af] .profile_info .profile_info_iner h5 {
  margin: 0; color: var(--af-muted) !important; font-size: 12.5px !important; font-weight: 400;
  overflow: hidden; text-overflow: ellipsis;
}
body[data-af] .profile_info .profile_info_details {
  margin-top: 14px !important; padding-top: 8px !important; border-top: 1px solid var(--af-line) !important;
}
body[data-af] .profile_info .profile_info_details a {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  padding: 9px 10px !important;
  margin: 0 -10px;
  border-radius: 8px;
  color: var(--af-text-2) !important;
  font-size: 13.5px !important;
}
body[data-af] .profile_info .profile_info_details a:hover { background: var(--af-surface-2); color: var(--af-primary) !important; text-decoration: none; }
body[data-af] .profile_info .profile_info_details a i { color: var(--af-muted) !important; margin: 0 !important; }

@media (max-width: 991px) {
  body[data-af] .header_iner { padding: 0 16px !important; height: 62px !important; }
  body[data-af] .header_iner .search_inner #headata { font-size: 15px; }
  body[data-af] .header_iner .search_field input { width: 160px; }
}
@media (max-width: 575px) {
  body[data-af] .header_iner .header_right .header_notification_warp { margin: 0 10px 0 6px !important; }
  body[data-af] .header_iner #btn1 { width: 40px; padding: 0 !important; justify-content: center; font-size: 0 !important; gap: 0; }
  body[data-af] .header_iner #btn1 i { font-size: 15px; }
  body[data-af] .header_iner #btn1 i.fa-arrow-right { display: none; }
  body[data-af] .header_iner .search_field { display: none; }
  /* admin header button has text only */
  body[data-af^="admin-"] .header_iner #btn1,
  body[data-af="paymenthistory"] .header_iner #btn1 { width: auto; padding: 0 14px !important; font-size: 12px !important; }
}

/* --------------------------------------------------------------------------
   4. Content shell
   -------------------------------------------------------------------------- */
body[data-af] .main_content .main_content_iner { margin: 0 !important; min-height: 70vh; }
body[data-af] .main_content_iner > .container-fluid,
body[data-af] .body_white_bg {
  background: transparent !important;
}
body[data-af] .plr_30 { padding: 28px 28px 0 !important; }
body[data-af] .pt_30 { padding-top: 28px !important; }
@media (max-width: 767px) {
  body[data-af] .plr_30 { padding: 18px 14px 0 !important; }
}
body[data-af] .main_content_iner h3,
body[data-af] .main_content_iner h4 { font-weight: 600; }

/* footer */
body[data-af] .footer_part { padding-bottom: 22px; }
body[data-af] .footer_part p { color: var(--af-muted) !important; font-size: 13px !important; font-weight: 400 !important; margin: 0; }
body[data-af] .footer_part p a { color: var(--af-text-2) !important; font-weight: 600; margin-left: 4px; }

/* --------------------------------------------------------------------------
   5. Shared components (buttons, inputs, tables, badges, pagination)
   -------------------------------------------------------------------------- */
body[data-af] .btn {
  border-radius: 999px !important;
  font-weight: 600;
  font-size: 13.5px;
  padding: 9px 18px;
  border-width: 1px;
  transition: background .2s, box-shadow .2s, transform .2s var(--af-ease), color .2s;
  box-shadow: none;
}
body[data-af] .btn:focus { box-shadow: var(--af-ring) !important; }
body[data-af] .btn-primary,
body[data-af] input[type=submit].btn-primary {
  background: var(--af-primary) !important; border-color: var(--af-primary) !important; color: #fff !important;
}
body[data-af] .btn-primary:hover { background: var(--af-primary-600) !important; border-color: var(--af-primary-600) !important; }
body[data-af] .btn-primary:disabled { background: #b8bdd6 !important; border-color: #b8bdd6 !important; cursor: not-allowed; }
body[data-af] .btn-success { background: var(--af-success-50) !important; border-color: transparent !important; color: var(--af-success) !important; }
body[data-af] .btn-success:hover { background: var(--af-success) !important; color: #fff !important; }
body[data-af] .btn-danger { background: var(--af-danger-50) !important; border-color: transparent !important; color: var(--af-danger) !important; }
body[data-af] .btn-danger:hover { background: var(--af-danger) !important; color: #fff !important; }
body[data-af] .btn-warning { background: var(--af-warning-50) !important; border-color: transparent !important; color: var(--af-warning) !important; }
body[data-af] .btn-outline-dark,
body[data-af] .btn-outline-primary {
  background: var(--af-surface) !important; border: 1px solid var(--af-line-2) !important; color: var(--af-text) !important;
}
body[data-af] .btn-outline-dark:hover,
body[data-af] .btn-outline-primary:hover { border-color: var(--af-primary) !important; color: var(--af-primary) !important; }

body[data-af] .main_content_iner input[type=text],
body[data-af] .main_content_iner input[type=email],
body[data-af] .main_content_iner input[type=number],
body[data-af] .main_content_iner input[type=password],
body[data-af] .main_content_iner input[type=date],
body[data-af] .main_content_iner input:not([type]),
body[data-af] .main_content_iner select,
body[data-af] .main_content_iner textarea {
  font-family: var(--af-body) !important;
  border: 1px solid var(--af-line-2) !important;
  border-radius: var(--af-radius-sm) !important;
  background-color: var(--af-surface) !important;
  color: var(--af-text) !important;
  font-size: 14px;
  min-height: 42px;
  padding: 9px 14px;
  box-shadow: none !important;
  transition: border-color .2s, box-shadow .2s;
}
body[data-af] .main_content_iner input:focus,
body[data-af] .main_content_iner select:focus,
body[data-af] .main_content_iner textarea:focus {
  border-color: var(--af-primary) !important;
  box-shadow: var(--af-ring) !important;
  outline: none !important;
}
body[data-af] .main_content_iner input[readonly] { background: var(--af-surface-2) !important; color: var(--af-muted) !important; }
body[data-af] .main_content_iner input[type=checkbox] {
  width: 18px; height: 18px; min-height: 0; vertical-align: middle; margin-right: 8px; accent-color: var(--af-primary);
}
body[data-af] .main_content_iner label { color: var(--af-text-2); font-weight: 500; font-size: 13px; }

/* generic data tables (admin uses bootstrap .table) */
body[data-af] .main_content_iner .table,
body[data-af] .links-table,
body[data-af] .referral-table,
body[data-af] .payment-table {
  width: 100%;
  border-collapse: separate !important;
  border-spacing: 0;
  background: var(--af-surface) !important;
  border: 1px solid var(--af-line) !important;
  border-radius: var(--af-radius) !important;
  overflow: hidden;
  box-shadow: var(--af-shadow) !important;
  margin: 16px 0 !important;
}
body[data-af] .main_content_iner .table thead th,
body[data-af] .links-table thead th,
body[data-af] .referral-table thead th,
body[data-af] .payment-table thead th {
  background: var(--af-surface-2) !important;
  color: var(--af-muted) !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  text-transform: uppercase;
  letter-spacing: .06em !important;
  padding: 13px 16px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--af-line) !important;
  white-space: nowrap;
}
body[data-af] .main_content_iner .table td,
body[data-af] .main_content_iner .table tbody th,
body[data-af] .links-table tbody td,
body[data-af] .referral-table tbody td,
body[data-af] .payment-table tbody td {
  background: var(--af-surface) !important;
  color: var(--af-text) !important;
  font-size: 14px !important;
  padding: 13px 16px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--af-line) !important;
  vertical-align: middle !important;
}
body[data-af] .main_content_iner .table tbody tr:last-child td,
body[data-af] .main_content_iner .table tbody tr:last-child th,
body[data-af] .links-table tbody tr:last-child td,
body[data-af] .referral-table tbody tr:last-child td,
body[data-af] .payment-table tbody tr:last-child td { border-bottom: 0 !important; }
body[data-af] .main_content_iner .table tbody tr:hover td,
body[data-af] .main_content_iner .table tbody tr:hover th,
body[data-af] .links-table tbody tr:hover td,
body[data-af] .referral-table tbody tr:hover td,
body[data-af] .payment-table tbody tr:hover td { background: #fafbff !important; }
body[data-af] .main_content_iner .table h7 { font-size: 14px; }
body[data-af] .main_content_iner .table .btn { padding: 6px 14px; font-size: 12.5px; margin: 2px; }

/* section headings used on several pages */
body[data-af] .page-header { text-align: left !important; margin: 4px 0 18px !important; }
body[data-af] .page-header h3,
body[data-af] .page-header h4 {
  font-family: var(--af-display) !important;
  font-size: 20px !important;
  font-weight: 600 !important;
  color: var(--af-text) !important;
  padding: 0 !important;
  margin: 0;
}
body[data-af] .page-header h3::after,
body[data-af] .page-header h4::after { display: none !important; }

/* pagination */
body[data-af] .pagination-wrapper { gap: 10px !important; margin: 22px 0 !important; }
body[data-af] .pagination-wrapper .btn-page,
body[data-af] .empty-state .btn-page {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--af-surface) !important;
  color: var(--af-text) !important;
  border: 1px solid var(--af-line-2) !important;
  padding: 9px 18px !important;
  border-radius: 999px !important;
  font-size: 13.5px !important;
  font-weight: 600;
  box-shadow: none !important;
}
body[data-af] .pagination-wrapper .btn-page:hover,
body[data-af] .empty-state .btn-page:hover {
  border-color: var(--af-primary) !important; color: var(--af-primary) !important; background: var(--af-primary-50) !important;
}
body[data-af] .pagination-wrapper .page-info {
  background: transparent !important; color: var(--af-muted) !important; font-weight: 500 !important; padding: 9px 6px !important;
}
body[data-af] .main_content_iner .pagination { display: flex; gap: 10px; justify-content: center; margin: 18px 0; }

/* empty states */
body[data-af] .empty-state {
  background: var(--af-surface);
  border: 1px dashed var(--af-line-2);
  border-radius: var(--af-radius);
  padding: 48px 20px !important;
  color: var(--af-muted) !important;
}
body[data-af] .empty-state h5 { color: var(--af-text) !important; font-weight: 600 !important; }

/* --------------------------------------------------------------------------
   6. Dashboard (dashboard.php) + Admin overview (admin/index.php)
   -------------------------------------------------------------------------- */
body[data-af="dashboard"] .main_content_iner center,
body[data-af="admin-index"] .main_content_iner center { text-align: left; }

body[data-af="dashboard"] .main_content_iner .container,
body[data-af="admin-index"] .main_content_iner .container {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 20px !important;
  max-width: none !important;
  width: 100%;
  padding: 0 !important;
  margin: 0 !important;
}
body[data-af="dashboard"] .main_content_iner .box,
body[data-af="admin-index"] .main_content_iner .box {
  position: relative;
  height: auto !important;
  min-height: 168px;
  margin: 0 !important;
  padding: 24px 26px !important;
  border-radius: 20px !important;
  overflow: hidden;
  isolation: isolate;
}
/* hero earnings — dark ink card echoing the homepage */
body[data-af="dashboard"] .main_content_iner .box-large,
body[data-af="admin-index"] .main_content_iner .box-large {
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(92, 225, 255, .22) 0%, rgba(92, 225, 255, 0) 45%),
    radial-gradient(90% 120% at 0% 100%, rgba(138, 150, 255, .30) 0%, rgba(138, 150, 255, 0) 55%),
    linear-gradient(135deg, var(--af-ink-2) 0%, var(--af-ink-3) 100%) !important;
  box-shadow: 0 18px 40px -20px rgba(6, 10, 26, .6);
  flex: none !important;
  display: flex !important;
  flex-direction: column;
  justify-content: space-between;
}
body[data-af="dashboard"] .main_content_iner .box-large::after,
body[data-af="admin-index"] .main_content_iner .box-large::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(138, 150, 255, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(138, 150, 255, .07) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: linear-gradient(120deg, transparent 30%, #000 100%);
  mask-image: linear-gradient(120deg, transparent 30%, #000 100%);
  z-index: -1;
  pointer-events: none;
}
/* balance card — light surface with gold accent */
body[data-af="dashboard"] .main_content_iner .box-small,
body[data-af="admin-index"] .main_content_iner .box-small {
  background:
    radial-gradient(110% 90% at 100% 0%, rgba(255, 201, 77, .28) 0%, rgba(255, 201, 77, 0) 60%),
    var(--af-surface) !important;
  border: 1px solid var(--af-line);
  box-shadow: var(--af-shadow);
  flex: none !important;
}
body[data-af="dashboard"] .main_content_iner .box .header,
body[data-af="admin-index"] .main_content_iner .box .header { margin: 0 0 18px !important; }
body[data-af="dashboard"] .main_content_iner .box .header-text,
body[data-af="admin-index"] .main_content_iner .box .header-text {
  margin: 0 !important;
  font-size: 13px !important;
  font-weight: 500;
  letter-spacing: .02em;
  color: rgba(234, 240, 255, .72) !important;
  text-align: left !important;
  display: flex; align-items: center; gap: 8px;
}
body[data-af="dashboard"] .main_content_iner .box-large .header-text::before,
body[data-af="admin-index"] .main_content_iner .box-large .header-text::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--af-aqua); box-shadow: 0 0 0 4px rgba(92, 225, 255, .18);
}
body[data-af="dashboard"] .main_content_iner .box-small .header-text,
body[data-af="admin-index"] .main_content_iner .box-small .header-text { color: var(--af-muted) !important; }
body[data-af="dashboard"] .main_content_iner .columns,
body[data-af="admin-index"] .main_content_iner .columns {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 !important;
}
body[data-af="dashboard"] .main_content_iner .column,
body[data-af="admin-index"] .main_content_iner .column {
  text-align: left !important;
  padding: 2px 18px;
  border-left: 1px solid rgba(138, 150, 255, .18);
}
body[data-af="dashboard"] .main_content_iner .column:first-child,
body[data-af="admin-index"] .main_content_iner .column:first-child { padding-left: 0; border-left: 0; }
body[data-af="dashboard"] .main_content_iner .small-text,
body[data-af="admin-index"] .main_content_iner .small-text {
  margin: 0 0 8px !important;
  font-size: 12.5px !important;
  font-weight: 500;
  color: rgba(234, 240, 255, .62) !important;
  white-space: nowrap;
}
body[data-af="dashboard"] .main_content_iner .large-text,
body[data-af="admin-index"] .main_content_iner .large-text {
  margin: 0 !important;
  font-family: var(--af-display) !important;
  font-size: clamp(18px, 1.9vw, 26px) !important;
  font-weight: 600;
  letter-spacing: -.02em;
  color: #fff !important;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
body[data-af="dashboard"] .main_content_iner .column:first-child .large-text { color: var(--af-aqua) !important; }
body[data-af="dashboard"] .main_content_iner .box-small .small-text,
body[data-af="admin-index"] .main_content_iner .box-small .small-text { color: var(--af-muted) !important; }
body[data-af="dashboard"] .main_content_iner .box-small .large-text,
body[data-af="admin-index"] .main_content_iner .box-small .large-text {
  color: var(--af-text) !important;
  font-size: clamp(24px, 2.4vw, 32px) !important;
  margin-bottom: 14px !important;
}
body[data-af="dashboard"] .main_content_iner .box-small .large-text + .small-text {
  display: inline-block;
  margin: 0 !important;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--af-danger-50);
  color: var(--af-danger) !important;
  font-size: 12px !important;
  font-weight: 600;
}

/* card grid */
body[data-af="dashboard"] .card-container {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 20px !important;
  padding: 0 !important;
  max-width: none !important;
  margin: 0 !important;
}
body[data-af="dashboard"] .card-container .card {
  max-width: none !important;
  width: auto !important;
  margin: 0 !important;
  padding: 24px !important;
  background: var(--af-surface) !important;
  border: 1px solid var(--af-line) !important;
  border-radius: var(--af-radius) !important;
  box-shadow: var(--af-shadow) !important;
  color: var(--af-text) !important;
  transform: none !important;
  text-align: left;
}
body[data-af="dashboard"] .card-container .card:hover { box-shadow: var(--af-shadow-lg) !important; border-color: var(--af-line-2) !important; }
body[data-af="dashboard"] .card-content { text-align: left !important; }
body[data-af="dashboard"] .card-content > p:first-child {
  display: flex; align-items: center; gap: 10px;
  font-size: 16px !important;
  font-weight: 600 !important;
  color: var(--af-text) !important;
  padding: 0 0 14px !important;
  margin: 0 0 18px !important;
  border-bottom: 1px solid var(--af-line);
}
body[data-af="dashboard"] .card-content > p:first-child::before {
  content: "" !important;
  position: static !important;
  transform: none !important;
  width: 8px !important; height: 8px !important;
  border-radius: 50% !important;
  background: var(--af-primary) !important;
  box-shadow: 0 0 0 4px var(--af-primary-50);
  flex: none;
}
body[data-af="dashboard"] .card-content h5 {
  font-size: 18px !important; font-weight: 600 !important; color: var(--af-text) !important; margin: 0 0 6px !important;
}
body[data-af="dashboard"] .card-content h5 + p { color: var(--af-muted) !important; font-size: 13.5px !important; }

/* shorten link input */
body[data-af] .input-container {
  display: flex !important;
  max-width: none !important;
  margin: 16px 0 !important;
  padding: 5px !important;
  border: 1px solid var(--af-line-2) !important;
  border-radius: 999px !important;
  background: var(--af-surface) !important;
  box-shadow: none !important;
  overflow: visible !important;
  transition: border-color .2s, box-shadow .2s;
}
body[data-af] .input-container:focus-within { border-color: var(--af-primary) !important; box-shadow: var(--af-ring) !important; }
body[data-af] .input-container input.textbox {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 10px 16px !important;
  font-size: 14.5px !important;
  border-radius: 999px !important;
  margin: 0 !important;
  text-align: left !important;
}
body[data-af] .input-container input.textbox:focus { box-shadow: none !important; }
body[data-af] .shorten-button {
  flex: none;
  border: 0 !important;
  border-radius: 999px !important;
  padding: 11px 24px !important;
  background: var(--af-primary) !important;
  color: #fff !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  margin: 0 !important;
  width: auto !important;
  cursor: pointer;
  transition: background .2s;
}
body[data-af] .shorten-button:hover { background: var(--af-primary-600) !important; }
body[data-af] .shorten-button[disabled] { background: #9aa2d8 !important; }
body[data-af="dashboard"] .card-content a[href="dashboard.php"] {
  background: var(--af-ink-2) !important; border-radius: 999px !important; padding: 11px 22px !important;
}

/* date filters */
body[data-af="dashboard"] .stats-form-row { justify-content: flex-start !important; gap: 10px !important; margin: 0 0 16px !important; }
body[data-af="dashboard"] .stats-form-row .form-col { align-items: flex-start !important; }
body[data-af="dashboard"] .stats-form-row label[style*="transparent"] { color: transparent !important; }
body[data-af="dashboard"] .stats-form-row label {
  color: var(--af-muted) !important; font-size: 11px !important; letter-spacing: .06em; font-weight: 600 !important;
}
body[data-af="dashboard"] .stats-form-row input[type="date"] {
  width: 150px !important; min-height: 40px !important; padding: 7px 12px !important;
  border: 1px solid var(--af-line-2) !important; border-radius: var(--af-radius-sm) !important; font-size: 13px !important;
}
body[data-af="dashboard"] .stats-form-row .btn-search {
  height: 40px; padding: 0 18px !important; border-radius: 999px !important;
  background: var(--af-primary-50) !important; color: var(--af-primary-700) !important; border: 0 !important;
}
body[data-af="dashboard"] .stats-form-row .btn-search:hover { background: var(--af-primary) !important; color: #fff !important; }

/* performance mini-table → stat tiles */
body[data-af="dashboard"] .data-table {
  border-collapse: separate !important;
  border-spacing: 0 !important;
  border: 1px solid var(--af-line) !important;
  border-radius: 14px !important;
  overflow: hidden;
  margin-top: 6px !important;
}
body[data-af="dashboard"] .data-table thead th {
  background: var(--af-surface-2) !important;
  color: var(--af-muted) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  padding: 11px 12px !important;
  border-bottom: 1px solid var(--af-line) !important;
}
body[data-af="dashboard"] .data-table tbody td {
  font-family: var(--af-display) !important;
  font-size: 19px !important;
  font-weight: 600 !important;
  color: var(--af-text) !important;
  padding: 18px 12px !important;
  border: 0 !important;
  background: var(--af-surface) !important;
  font-variant-numeric: tabular-nums;
}
body[data-af="dashboard"] .data-table tbody td + td,
body[data-af="dashboard"] .data-table thead th + th { border-left: 1px solid var(--af-line) !important; }
body[data-af="dashboard"] .data-table tbody td:last-child { color: var(--af-success) !important; }
body[data-af="dashboard"] .card-content p[style*="italic"] { font-style: normal !important; color: var(--af-muted) !important; font-size: 12px !important; }

/* notice card */
body[data-af="dashboard"] .card-container .card[style*="f59e0b"] {
  border: 1px solid #f6e3b4 !important;
  border-left: 1px solid #f6e3b4 !important;
  background: linear-gradient(180deg, #fffaf0 0%, #ffffff 60%) !important;
}
body[data-af="dashboard"] .card[style*="f59e0b"] .card-content > p:first-child { color: #8a5a00 !important; border-bottom-color: #f6e3b4; }
body[data-af="dashboard"] .card[style*="f59e0b"] .card-content > p:first-child::before { background: var(--af-gold) !important; box-shadow: 0 0 0 4px #fff1cc; }
body[data-af="dashboard"] .card[style*="f59e0b"] .card-content > p + p { color: var(--af-text-2) !important; font-size: 13.5px !important; line-height: 1.75 !important; }
body[data-af="dashboard"] .card[style*="f59e0b"] strong { color: #8a5a00 !important; }

/* success modal */
body[data-af] .overlay { background: rgba(6, 10, 26, .55) !important; }
body[data-af] .cardee {
  border-radius: 20px !important; padding: 32px 28px 26px !important;
  border: 1px solid var(--af-line); box-shadow: 0 30px 60px -20px rgba(6, 10, 26, .45) !important;
}
body[data-af] .cardee-close {
  width: 34px; height: 34px; line-height: 32px; border-radius: 50%;
  background: var(--af-surface-2); font-size: 20px !important; top: 14px !important; right: 14px !important;
}

/* admin overview extras */
body[data-af="admin-index"] .main_content_iner form.form-group {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: flex-start;
  margin: 22px 0 6px; padding: 16px; background: var(--af-surface);
  border: 1px solid var(--af-line); border-radius: var(--af-radius);
}
body[data-af="admin-index"] .main_content_iner form.form-group br { display: none; }
body[data-af="admin-index"] .main_content_iner form.form-group input.form-group { margin: 0 !important; }
body[data-af="admin-index"] .main_content_iner h4 { font-size: 18px; margin: 18px 0 4px; text-align: left; }
body[data-af="admin-index"] .main_content_iner center > br { display: none; }

@media (max-width: 1199px) {
  body[data-af="dashboard"] .main_content_iner .container,
  body[data-af="admin-index"] .main_content_iner .container { grid-template-columns: 1fr; }
}
@media (max-width: 991px) {
  body[data-af="dashboard"] .card-container { grid-template-columns: 1fr !important; }
}
@media (max-width: 640px) {
  body[data-af="dashboard"] .main_content_iner .columns,
  body[data-af="admin-index"] .main_content_iner .columns { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 0 !important; }
  body[data-af="dashboard"] .main_content_iner .column:nth-child(odd),
  body[data-af="admin-index"] .main_content_iner .column:nth-child(odd) { padding-left: 0; border-left: 0; }
  body[data-af="dashboard"] .main_content_iner .box,
  body[data-af="admin-index"] .main_content_iner .box { padding: 20px !important; padding-bottom: 22px !important; min-height: 0; }
  body[data-af="dashboard"] .card-container .card { padding: 18px !important; }
  body[data-af="dashboard"] .stats-form-row input[type="date"] { width: 100% !important; }
  body[data-af="dashboard"] .data-table tbody td { font-size: 15px !important; padding: 14px 6px !important; }
}
@media (max-width: 500px) {
  body[data-af] .input-container { flex-direction: row !important; border-radius: 999px !important; }
  body[data-af] .shorten-button { padding: 10px 16px !important; }
}

/* --------------------------------------------------------------------------
   7. Links page
   -------------------------------------------------------------------------- */
body[data-af] .alias-text { color: var(--af-text) !important; font-family: var(--af-display); font-size: 13px !important; }
body[data-af] .views-badge {
  background: var(--af-primary-50) !important; color: var(--af-primary-700) !important;
  border: 0 !important; padding: 5px 12px !important; font-size: 12.5px !important; font-weight: 600 !important;
}
body[data-af] .date-text, body[data-af] .date-cell { color: var(--af-muted) !important; font-size: 13px !important; }
body[data-af] .btn-goto,
body[data-af] .btn-destination,
body[data-af] .btn-delete {
  border-radius: 999px !important;
  padding: 7px 14px !important;
  font-size: 12.5px !important;
  box-shadow: none !important;
  transform: none !important;
}
body[data-af] .btn-goto { background: var(--af-primary) !important; color: #fff !important; }
body[data-af] .btn-goto:hover { background: var(--af-primary-600) !important; }
body[data-af] .btn-destination { background: var(--af-surface) !important; color: var(--af-text-2) !important; border: 1px solid var(--af-line-2) !important; }
body[data-af] .btn-destination:hover { border-color: var(--af-text-2) !important; color: var(--af-text) !important; }
body[data-af] .btn-delete {
  width: 34px; height: 34px; padding: 0 !important; justify-content: center;
  background: var(--af-danger-50) !important; color: var(--af-danger) !important;
}
body[data-af] .btn-delete:hover { background: var(--af-danger) !important; color: #fff !important; }
@media (max-width: 767px) {
  body[data-af="link"] .links-table,
  body[data-af="refferals"] .referral-table,
  body[data-af="paymenthistory"] .payment-table,
  body[data-af^="admin-"] .main_content_iner .table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* --------------------------------------------------------------------------
   8. Withdraw (addfund) + Profile forms
   -------------------------------------------------------------------------- */
body[data-af] .withdraw-wrapper,
body[data-af] .profile-wrapper { padding: 8px 0 24px !important; }
body[data-af] .withdraw-card,
body[data-af] .profile-card {
  max-width: 520px !important;
  margin: 0 auto !important;
  padding: 32px !important;
  background: var(--af-surface) !important;
  border: 1px solid var(--af-line) !important;
  border-radius: 20px !important;
  box-shadow: var(--af-shadow) !important;
  text-align: left !important;
}
body[data-af] .withdraw-card .card-icon,
body[data-af] .profile-card .card-icon {
  width: 52px !important; height: 52px !important;
  margin: 0 0 18px !important;
  border-radius: 14px !important;
  background: var(--af-primary-50) !important;
  box-shadow: none !important;
  display: flex; align-items: center; justify-content: center;
}
body[data-af] .withdraw-card .card-icon i,
body[data-af] .profile-card .card-icon i { color: var(--af-primary) !important; font-size: 22px !important; }
body[data-af] .withdraw-card h3,
body[data-af] .profile-card h3 {
  font-family: var(--af-display) !important; font-size: 20px !important; font-weight: 600 !important;
  color: var(--af-text) !important; text-align: left !important; margin: 0 0 6px !important;
}
body[data-af] .profile-card .subtitle { text-align: left !important; color: var(--af-muted) !important; margin-bottom: 22px !important; }
body[data-af] .balance-display {
  margin: 18px 0 24px !important;
  padding: 20px 22px !important;
  border-radius: 16px !important;
  border: 0 !important;
  text-align: left !important;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(92, 225, 255, .25) 0%, rgba(92, 225, 255, 0) 50%),
    linear-gradient(135deg, var(--af-ink-2), var(--af-ink-3)) !important;
}
body[data-af] .balance-display .balance-label { color: rgba(234, 240, 255, .65) !important; font-size: 12.5px !important; text-transform: none !important; letter-spacing: 0 !important; }
body[data-af] .balance-display .balance-amount {
  font-family: var(--af-display) !important; color: #fff !important; font-size: 30px !important; font-weight: 600 !important;
}
body[data-af] .form-group-custom { margin-bottom: 18px !important; text-align: left !important; }
body[data-af] .form-group-custom label {
  display: flex !important; align-items: center; gap: 8px;
  font-size: 13px !important; font-weight: 600 !important; color: var(--af-text-2) !important;
  text-transform: none !important; letter-spacing: 0 !important; margin-bottom: 8px !important;
}
body[data-af] .form-group-custom label i { color: var(--af-muted) !important; }
body[data-af] .form-group-custom input,
body[data-af] .form-group-custom select {
  width: 100% !important; height: 46px; padding: 0 14px !important; border-width: 1px !important;
}
body[data-af] .btn-withdraw,
body[data-af] .btn-submit {
  width: 100% !important;
  height: 48px;
  border: 0 !important;
  border-radius: 999px !important;
  background: var(--af-primary) !important;
  color: #fff !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  box-shadow: 0 10px 22px -10px rgba(67, 83, 255, .7) !important;
  transform: none !important;
}
body[data-af] .btn-withdraw:hover,
body[data-af] .btn-submit:hover { background: var(--af-primary-600) !important; }
body[data-af] .btn-submit:disabled { background: #b8bdd6 !important; box-shadow: none !important; }
body[data-af] .withdraw-info,
body[data-af] .info-box {
  margin-top: 18px !important; padding: 12px 14px !important; border-radius: 12px !important; border: 0 !important;
  background: var(--af-surface-2) !important; color: var(--af-text-2) !important; font-size: 13px !important; text-align: left !important;
}
body[data-af] .withdraw-info i, body[data-af] .info-box i { color: var(--af-primary) !important; }
body[data-af] .error-alert { border-radius: 12px !important; border: 0 !important; background: var(--af-danger-50) !important; color: var(--af-danger) !important; }
body[data-af] .password-strength { height: 6px !important; border-radius: 6px !important; background: var(--af-line) !important; margin-top: 10px !important; }
body[data-af] .password-strength .strength-bar { border-radius: 6px !important; }
body[data-af] .toast-success { border-radius: 999px !important; box-shadow: var(--af-shadow-lg) !important; background: var(--af-success) !important; }
@media (max-width: 575px) {
  body[data-af] .withdraw-card, body[data-af] .profile-card { padding: 22px 18px !important; border-radius: 16px !important; }
}

/* --------------------------------------------------------------------------
   9. Referrals
   -------------------------------------------------------------------------- */
body[data-af] .referral-wrapper { max-width: none !important; }
body[data-af] .info-card {
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  display: flex !important; align-items: center; gap: 16px; text-align: left !important;
  padding: 20px 22px !important; margin-bottom: 18px !important;
  border: 0 !important; border-radius: 18px !important;
  background:
    radial-gradient(100% 160% at 100% 0%, rgba(255, 201, 77, .28) 0%, rgba(255, 201, 77, 0) 50%),
    linear-gradient(135deg, var(--af-ink-2), var(--af-ink-3)) !important;
  box-shadow: 0 18px 40px -20px rgba(6, 10, 26, .55) !important;
}
body[data-af] .info-card .info-icon {
  flex: none; width: 48px; height: 48px; margin: 0 !important; border-radius: 14px;
  display: flex; align-items: center; justify-content: center; font-size: 24px !important;
  background: rgba(255, 255, 255, .08);
}
body[data-af] .info-card p { color: rgba(234, 240, 255, .85) !important; margin: 0 !important; font-size: 15px !important; }
body[data-af] .info-card .highlight { color: var(--af-gold) !important; background: none !important; font-weight: 700; }
body[data-af] .link-section {
  padding: 22px !important; border-radius: var(--af-radius) !important; background: var(--af-surface) !important;
  border: 1px solid var(--af-line) !important; box-shadow: var(--af-shadow) !important; text-align: left !important;
}
body[data-af] .link-section h5 { font-size: 15px !important; font-weight: 600 !important; color: var(--af-text) !important; margin-bottom: 12px !important; text-align: left !important; }
body[data-af] .link-copy-group {
  max-width: none !important;
  margin: 0 !important;
  display: flex !important; gap: 0 !important; padding: 5px; border: 1px solid var(--af-line-2);
  border-radius: 999px; background: var(--af-surface-2);
}
body[data-af] .main_content_iner .link-copy-group input {
  flex: 1 1 auto; min-width: 0; border: 0 !important; background: transparent !important;
  box-shadow: none !important; min-height: 0 !important; padding: 10px 16px !important; color: var(--af-text) !important; text-align: left !important;
}
body[data-af] .btn-copy {
  flex: none; border: 0 !important; border-radius: 999px !important; padding: 10px 20px !important;
  background: var(--af-primary) !important; color: #fff !important; font-weight: 600 !important;
  box-shadow: none !important; transform: none !important; white-space: nowrap;
}
body[data-af] .btn-copy:hover { background: var(--af-primary-600) !important; }
body[data-af] .section-divider { margin: 28px 0 4px !important; text-align: left !important; border: 0 !important; }
body[data-af] .section-divider::before, body[data-af] .section-divider::after { display: none !important; }
body[data-af] .section-divider h4 {
  font-size: 16px !important; font-weight: 600 !important; color: var(--af-text) !important;
  background: none !important; padding: 0 !important; margin: 0; text-align: left;
}
body[data-af] .name-cell { font-weight: 600 !important; }
body[data-af] .commission-cell {
  background: var(--af-success-50) !important; color: var(--af-success) !important;
  border-radius: 999px !important; padding: 4px 12px !important; font-weight: 600 !important; border: 0 !important;
}
@media (max-width: 575px) {
  body[data-af] .link-copy-group { flex-direction: column; border-radius: 16px; gap: 6px !important; }
  body[data-af] .btn-copy { width: 100%; }
}

/* --------------------------------------------------------------------------
   10. Payment history + buy (manualpayment)
   -------------------------------------------------------------------------- */
body[data-af="paymenthistory"] .main_content_iner center,
body[data-af="admin-paymenthistory"] .main_content_iner center { text-align: left; }
body[data-af] .amount-cell { font-weight: 700 !important; color: var(--af-text) !important; font-variant-numeric: tabular-nums; }
body[data-af] .method-badge {
  background: var(--af-surface-2) !important; color: var(--af-text-2) !important;
  border: 1px solid var(--af-line) !important; border-radius: 999px !important; padding: 4px 10px !important; font-size: 12px !important;
}
body[data-af] .account-cell { color: var(--af-text-2) !important; font-size: 13px !important; }
body[data-af] .status-badge { border-radius: 999px !important; padding: 5px 12px !important; font-size: 12px !important; font-weight: 600 !important; border: 0 !important; }
body[data-af] .status-badge::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-right: 6px; vertical-align: middle; }
body[data-af] .status-pending { background: var(--af-warning-50) !important; color: var(--af-warning) !important; }
body[data-af] .status-approved { background: var(--af-success-50) !important; color: var(--af-success) !important; }
body[data-af] .status-rejected { background: var(--af-danger-50) !important; color: var(--af-danger) !important; }
body[data-af] .alert-custom { border-radius: 14px !important; border: 0 !important; text-align: left !important; max-width: none !important; }
body[data-af] .alert-success-custom { background: var(--af-success-50) !important; color: #0b6e3e !important; }
body[data-af] .alert-warning-custom { background: var(--af-warning-50) !important; color: #7a4d00 !important; }

body[data-af="buy"] .main_content_iner center { text-align: center; }
body[data-af="buy"] .alert {
  max-width: 560px !important; margin: 0 auto 16px; border-radius: 16px; border: 0; text-align: left; padding: 20px 22px;
}
body[data-af="buy"] .alert-success {
  background: linear-gradient(135deg, var(--af-ink-2), var(--af-ink-3)) !important; color: #eaf0ff !important;
}
body[data-af="buy"] .alert-success h4 { color: #fff !important; font-size: 17px; line-height: 1.5; }
body[data-af="buy"] .alert-success h6 { color: rgba(234, 240, 255, .8) !important; font-size: 14px; margin: 6px 0 0; }
body[data-af="buy"] .alert-danger { background: var(--af-danger-50) !important; color: var(--af-danger) !important; font-size: 13px; }
body[data-af="buy"] #forme {
  max-width: 560px; margin: 0 auto; padding: 24px; text-align: left;
  background: var(--af-surface); border: 1px solid var(--af-line); border-radius: 20px; box-shadow: var(--af-shadow);
}
body[data-af="buy"] #forme h6[style] { color: var(--af-danger) !important; font-weight: 700; font-size: 15px; }
body[data-af="buy"] #forme input[type=text] { width: 100% !important; margin: 0 0 12px !important; display: block; }
body[data-af="buy"] #forme br { display: none; }
body[data-af="buy"] #forme .alert-danger { margin: 8px 0 16px; padding: 12px 14px; }
body[data-af="buy"] #webpost { margin-top: 16px; width: 100%; height: 46px; }

/* --------------------------------------------------------------------------
   11. About + Contact
   -------------------------------------------------------------------------- */
body[data-af="about"] .main_content_iner h2[style] {
  font-family: var(--af-display) !important; font-size: 22px; font-weight: 600; color: var(--af-text);
}
body[data-af="about"] .main_content_iner .card {
  width: 100% !important; max-width: 380px;
  padding: 30px 26px 26px; margin: 18px auto 0 !important;
  border: 1px solid var(--af-line) !important; border-radius: 20px !important;
  box-shadow: var(--af-shadow) !important; background: var(--af-surface) !important;
}
body[data-af="about"] .main_content_iner .card img { width: 96px !important; }
body[data-af="about"] .main_content_iner .card .container { padding: 0 !important; }
body[data-af="about"] .main_content_iner .card .title { color: var(--af-muted) !important; text-transform: uppercase; letter-spacing: .1em; font-size: 11px; margin: 10px 0 2px; }
body[data-af="about"] .main_content_iner .card h2 { font-family: var(--af-display) !important; font-size: 20px; margin: 0 0 10px; }
body[data-af="about"] .main_content_iner .card p { color: var(--af-text-2); }
body[data-af="about"] .main_content_iner .card .button {
  border-radius: 999px !important; background: var(--af-primary) !important; padding: 12px 18px !important;
  font-weight: 600; font-family: var(--af-body);
}
body[data-af="about"] .main_content_iner .card .button:hover { background: var(--af-primary-600) !important; }

body[data-af="contact"] .main_content_iner > .container-fluid > h3 {
  max-width: 640px; margin: 0 auto 14px; font-family: var(--af-display) !important; font-size: 20px; font-weight: 600;
}
body[data-af="contact"] .main_content_iner .container {
  max-width: 640px !important; margin: 0 auto; padding: 28px !important;
  background: var(--af-surface) !important; border: 1px solid var(--af-line) !important;
  border-radius: 20px !important; box-shadow: var(--af-shadow);
}
body[data-af="contact"] .main_content_iner .container label { display: block; margin: 0 0 6px; font-weight: 600; }
body[data-af="contact"] .main_content_iner .container input,
body[data-af="contact"] .main_content_iner .container textarea { margin: 0 0 16px !important; width: 100%; }
body[data-af="contact"] .main_content_iner .container .btn { width: 100%; height: 46px; }

/* --------------------------------------------------------------------------
   12. Admin pages (old bootstrap markup)
   -------------------------------------------------------------------------- */
body[data-af^="admin-"] .main_content_iner > .container-fluid > h4,
body[data-af^="admin-"] .main_content_iner center > h4,
body[data-af^="admin-"] .main_content_iner center h3,
body[data-af^="admin-"] .main_content_iner .addfund h3 {
  font-family: var(--af-display) !important; font-size: 19px !important; font-weight: 600; color: var(--af-text);
  text-align: left; margin: 4px 0 6px;
}
body[data-af^="admin-"] .main_content_iner center { text-align: left; }
body[data-af^="admin-"] .main_content_iner center > br,
body[data-af^="admin-"] .main_content_iner .container-fluid > br { display: none; }
body[data-af^="admin-"] .main_content_iner h6 { color: var(--af-muted); font-weight: 600; }
/* panels */
body[data-af^="admin-"] .addfund {
  background: var(--af-surface) !important; border: 1px solid var(--af-line); border-radius: 20px !important;
  padding: 26px !important; box-shadow: var(--af-shadow); max-width: 1100px;
}
body[data-af^="admin-"] .addfund center { text-align: left; }
body[data-af^="admin-"] #forme { padding: 0 !important; }
body[data-af^="admin-"] #forme table { border-collapse: separate; border-spacing: 0 6px; }
body[data-af^="admin-"] #forme th label,
body[data-af^="admin-"] .addfund label { color: var(--af-muted) !important; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
body[data-af^="admin-"] #txt { width: 260px; max-width: 100%; }
body[data-af^="admin-"] .main_content_iner input[type=text],
body[data-af^="admin-"] .main_content_iner select { margin: 4px 0 !important; }
body[data-af^="admin-"] .main_content_iner .inputt { width: 100%; min-width: 120px; }
body[data-af^="admin-"] .main_content_iner #search,
body[data-af^="admin-"] .main_content_iner #search2 { width: 220px; margin-right: 6px !important; }
body[data-af^="admin-"] .main_content_iner form.form-group {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  padding: 14px; background: var(--af-surface); border: 1px solid var(--af-line); border-radius: var(--af-radius);
}
body[data-af^="admin-"] .main_content_iner form.form-group br { display: none; }
body[data-af^="admin-"] .main_content_iner form.form-group input.form-group { margin: 0 !important; }
body[data-af^="admin-"] .main_content_iner form.form-group .btn { width: auto !important; }
body[data-af^="admin-"] .main_content_iner input[type=submit] { border-radius: 999px !important; font-weight: 600; }
body[data-af^="admin-"] .main_content_iner .table input { min-height: 34px !important; padding: 5px 10px !important; font-size: 12.5px !important; }
@media (max-width: 767px) {
  body[data-af^="admin-"] #forme table, body[data-af^="admin-"] #forme tr,
  body[data-af^="admin-"] #forme td, body[data-af^="admin-"] #forme th { display: block; padding-left: 0 !important; }
  body[data-af^="admin-"] #forme input { width: 100% !important; }
  body[data-af^="admin-"] #forme label { margin-left: 0 !important; }
}

/* ==========================================================================
   13. Standalone pages (no sidebar)
   ========================================================================== */

/* shared auth backdrop — dark ink with glow, matches index.php */
body[data-af="signin"],
body[data-af="signup"],
body[data-af="resetsent"],
body[data-af="message"],
body[data-af="promo"] {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(60% 50% at 15% 10%, rgba(138, 150, 255, .28) 0%, rgba(138, 150, 255, 0) 60%),
    radial-gradient(50% 45% at 90% 90%, rgba(92, 225, 255, .18) 0%, rgba(92, 225, 255, 0) 60%),
    linear-gradient(180deg, var(--af-ink) 0%, var(--af-ink-2) 100%) !important;
  background-attachment: fixed !important;
  color: var(--af-text);
}

/* ---------- Sign in ---------- */
body[data-af="signin"] {
  display: flex; align-items: center; justify-content: center; padding: 24px 16px; box-sizing: border-box;
}
body[data-af="signin"] .main {
  width: 100% !important;
  max-width: 400px;
  height: auto !important;
  padding: 36px 32px 26px;
  box-sizing: border-box;
  background: var(--af-surface) !important;
  border-radius: 24px !important;
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .6) !important;
  overflow: visible !important;
}
body[data-af="signin"] .signup { height: auto !important; }
body[data-af="signin"] .main::before {
  content: "";
  display: block;
  height: 44px;
  margin: -6px 0 18px -14px;
  background: url("logo.svg") left center / auto 96px no-repeat;
}
body[data-af="signin"] .main label {
  display: block !important;
  margin: 0 0 6px !important;
  font-family: var(--af-display) !important;
  font-size: 24px !important;
  font-weight: 600 !important;
  color: var(--af-text) !important;
  text-align: left;
  transform: none !important;
  cursor: default !important;
}
body[data-af="signin"] .main form::after {
  content: "Welcome back — sign in to your publisher dashboard.";
  display: block; order: -1;
}
body[data-af="signin"] .main form { display: flex; flex-direction: column; }
body[data-af="signin"] .main form label { order: -2; }
body[data-af="signin"] .main form::after { order: -1; margin: 0 0 22px; color: var(--af-muted); font-size: 14px; font-family: var(--af-body); }
body[data-af="signin"] #display form::after { content: "Enter your account email and we'll send you a reset link."; }
body[data-af="signin"] .main input:not([type=checkbox]) {
  width: 100% !important;
  height: 48px !important;
  margin: 0 0 12px !important;
  padding: 0 16px !important;
  box-sizing: border-box;
  display: block !important;
  font-family: var(--af-body);
  font-size: 15px;
  color: var(--af-text);
  background: var(--af-surface-2) !important;
  border: 1px solid var(--af-line-2) !important;
  border-radius: 12px !important;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
body[data-af="signin"] .main input:not([type=checkbox]):focus {
  background: #fff !important; border-color: var(--af-primary) !important; box-shadow: var(--af-ring);
}
body[data-af="signin"] .main button {
  width: 100% !important;
  height: 48px !important;
  margin: 6px 0 0 !important;
  font-family: var(--af-body) !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  border-radius: 999px !important;
  background: var(--af-primary) !important;
  box-shadow: 0 12px 24px -12px rgba(67, 83, 255, .8);
}
body[data-af="signin"] .main button:hover { background: var(--af-primary-600) !important; }
body[data-af="signin"] .main center p,
body[data-af="signin"] .main a p {
  margin: 14px 0 0 !important;
  color: var(--af-primary) !important;
  font-family: var(--af-body);
  font-size: 14px;
  font-weight: 500;
}
body[data-af="signin"] .main center a + center a p,
body[data-af="signin"] .main center center a p { margin-top: 6px !important; color: var(--af-text-2) !important; }
body[data-af="signin"] #wrong {
  margin-top: 14px !important; color: var(--af-danger) !important; font-weight: 500;
}
body[data-af="signin"] #wrong:empty { display: none; }
body[data-af="signin"] #hide { width: 100%; display: flex; justify-content: center; }

/* ---------- Sign up ---------- */
html:has(body[data-af="signup"]) { background: var(--af-ink) !important; }
body[data-af="signup"] { width: 100%; padding: 32px 16px !important; height: auto !important; min-height: 100vh; font-family: var(--af-body) !important; }
body[data-af="signup"] .container {
  max-width: 440px !important;
  padding: 32px !important;
  border-radius: 24px !important;
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .6) !important;
}
body[data-af="signup"] .header { margin-bottom: 10px !important; justify-content: flex-start !important; }
body[data-af="signup"] .logo { width: auto !important; height: 96px !important; margin: -26px 0 -26px -18px !important; object-fit: contain; object-position: left center; }
body[data-af="signup"] form::before {
  content: "Create your account";
  display: block; margin: 0 0 4px;
  font-family: var(--af-display); font-size: 22px; font-weight: 600; color: var(--af-text);
}
body[data-af="signup"] form > .input:first-of-type { margin-top: 20px; }
body[data-af="signup"] label { font-size: 13px !important; font-weight: 600; color: var(--af-text-2) !important; }
body[data-af="signup"] input[type=text],
body[data-af="signup"] input[type=email],
body[data-af="signup"] input[type=password] {
  height: 46px; padding: 0 14px !important; border: 1px solid var(--af-line-2) !important;
  border-radius: 12px !important; background: var(--af-surface-2) !important; font-family: var(--af-body); font-size: 15px !important;
  transition: border-color .2s, box-shadow .2s;
}
body[data-af="signup"] input:focus { outline: none; background: #fff !important; border-color: var(--af-primary) !important; box-shadow: var(--af-ring); }
body[data-af="signup"] .small-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
body[data-af="signup"] .captcha-box {
  justify-content: center; padding: 12px !important; border-radius: 12px !important;
  background: var(--af-primary-50) !important; border: 1px dashed var(--af-primary-100) !important;
}
body[data-af="signup"] .captcha-digit {
  display: inline-block; min-width: 34px; margin: 0 3px; padding: 6px 0; text-align: center;
  font-family: var(--af-display); font-size: 20px; font-weight: 600; color: var(--af-primary-700);
  background: #fff; border-radius: 8px; box-shadow: var(--af-shadow);
  user-select: none; -webkit-user-select: none;
}
body[data-af="signup"] button.primary {
  height: 48px; border-radius: 999px !important; background: var(--af-primary) !important;
  font-weight: 600; font-family: var(--af-body); opacity: .5 !important; transition: opacity .2s, background .2s;
}
body[data-af="signup"] button.primary.enabled { opacity: 1 !important; box-shadow: 0 12px 24px -12px rgba(67, 83, 255, .8); }
body[data-af="signup"] button.primary.enabled:hover { background: var(--af-primary-600) !important; }
body[data-af="signup"] .meta { color: var(--af-muted) !important; line-height: 1.7; }
body[data-af="signup"] .meta a { color: var(--af-primary); font-weight: 600; text-decoration: none; }
@media (max-width: 420px) {
  body[data-af="signup"] .container { padding: 24px 20px !important; }
  body[data-af="signup"] .small-row { grid-template-columns: 1fr; gap: 0; }
}

/* ---------- Password reset result ---------- */
body[data-af="resetsent"] { display: flex; align-items: center; justify-content: center; padding: 24px 16px; font-family: var(--af-body) !important; }
body[data-af="resetsent"] .card {
  max-width: 440px; width: 100%; padding: 34px 30px !important; border-radius: 24px !important;
  border: 1px solid rgba(255, 255, 255, .12); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .6) !important;
}
body[data-af="resetsent"] h1 { font-family: var(--af-display); font-size: 22px !important; font-weight: 600; }
body[data-af="resetsent"] p { color: var(--af-text-2) !important; line-height: 1.65; }
body[data-af="resetsent"] a.btn {
  border-radius: 999px !important; background: var(--af-primary) !important; padding: 12px 24px !important; font-weight: 600;
}
body[data-af="resetsent"] a.btn:hover { background: var(--af-primary-600) !important; }
body[data-af="resetsent"] footer { color: var(--af-muted) !important; }

/* ---------- Contact message sent ---------- */
body[data-af="message"] { font-family: var(--af-body) !important; }
body[data-af="message"] .response-card {
  border-radius: 24px !important; border: 1px solid rgba(255, 255, 255, .12) !important;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .6) !important;
}
body[data-af="message"] .icon-wrapper { box-shadow: 0 0 0 8px var(--af-success-50) !important; background: var(--af-success) !important; }
body[data-af="message"] .response-card h3 { font-family: var(--af-display) !important; font-weight: 600; }
body[data-af="message"] .details-box { border-radius: 14px !important; border: 1px solid var(--af-line) !important; background: var(--af-surface-2) !important; }
body[data-af="message"] .btn-back { border-radius: 999px !important; background: var(--af-primary) !important; }
body[data-af="message"] .btn-back:hover { background: var(--af-primary-600) !important; }

/* ---------- Publisher rates (public) ---------- */
body[data-af="pub_rates"] {
  font-family: var(--af-body) !important;
  background: var(--af-bg) !important;
  padding: 32px 16px !important;
  margin: 0;
}
body[data-af="pub_rates"] .container {
  max-width: 860px !important; margin: 0 auto !important; padding: 0 !important;
  background: transparent !important; box-shadow: none !important;
}
body[data-af="pub_rates"] h1 {
  font-family: var(--af-display) !important; font-size: clamp(22px, 3vw, 30px) !important; font-weight: 600;
  color: var(--af-text) !important; text-align: left !important; margin: 0 0 18px !important;
}
body[data-af="pub_rates"] .rates-table {
  width: 100%; border-collapse: separate !important; border-spacing: 0; overflow: hidden;
  background: var(--af-surface); border: 1px solid var(--af-line); border-radius: var(--af-radius); box-shadow: var(--af-shadow);
}
body[data-af="pub_rates"] .rates-table th {
  background: var(--af-surface-2) !important; color: var(--af-muted) !important; font-size: 11.5px !important;
  text-transform: uppercase; letter-spacing: .06em; font-weight: 600; border: 0 !important;
  border-bottom: 1px solid var(--af-line) !important; padding: 14px 18px !important; text-align: left !important;
}
body[data-af="pub_rates"] .rates-table td {
  background: var(--af-surface) !important; border: 0 !important; border-bottom: 1px solid var(--af-line) !important;
  padding: 13px 18px !important; text-align: left !important; color: var(--af-text) !important; font-size: 14px !important;
}
body[data-af="pub_rates"] .rates-table tr:last-child td { border-bottom: 0 !important; }
body[data-af="pub_rates"] .rates-table tr:hover td { background: #fafbff !important; }
body[data-af="pub_rates"] .rates-table .rate {
  font-family: var(--af-display); font-weight: 600 !important; color: var(--af-success) !important; font-variant-numeric: tabular-nums;
}

/* ---------- Promo entry + promo admin ---------- */
body[data-af="promo"],
body[data-af="promo-admin"] { font-family: var(--af-body) !important; padding: 40px 16px !important; }
body[data-af="promo-admin"] { background: var(--af-bg) !important; }
body[data-af="promo"] > center,
body[data-af="promo-admin"] > center {
  max-width: 460px; margin: 0 auto; padding: 32px 28px; background: var(--af-surface);
  border-radius: 24px; border: 1px solid var(--af-line); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .45);
}
body[data-af="promo-admin"] > center { max-width: 1000px; box-shadow: var(--af-shadow); }
body[data-af="promo"] h2, body[data-af="promo-admin"] h2 { font-family: var(--af-display) !important; font-size: 22px; font-weight: 600; color: var(--af-text); margin: 0 0 18px; }
body[data-af="promo"] h3, body[data-af="promo-admin"] h3 { font-size: 16px; font-weight: 600; color: var(--af-text-2); }
body[data-af="promo"] h2 a, body[data-af="promo-admin"] .logout { color: var(--af-danger) !important; font-size: 14px; font-family: var(--af-body); }
body[data-af="promo"] input:not([type=submit]):not([type=hidden]),
body[data-af="promo-admin"] input:not([type=submit]):not([type=hidden]),
body[data-af="promo-admin"] select {
  width: 100% !important; max-width: 100%; height: 46px; box-sizing: border-box; margin: 0 0 4px !important;
  padding: 0 14px !important; border: 1px solid var(--af-line-2) !important; border-radius: 12px !important;
  background: var(--af-surface-2) !important; font-family: var(--af-body); font-size: 15px;
}
body[data-af="promo-admin"] form input[type=date] { width: auto !important; }
body[data-af="promo"] input:focus, body[data-af="promo-admin"] input:focus { outline: none; border-color: var(--af-primary) !important; box-shadow: var(--af-ring); background: #fff !important; }
body[data-af="promo"] input[type=submit],
body[data-af="promo-admin"] input[type=submit],
body[data-af="promo-admin"] button {
  width: 100%; height: 46px; margin-top: 10px; border: 0 !important; border-radius: 999px !important;
  background: var(--af-primary) !important; color: #fff !important; font-weight: 600; font-family: var(--af-body); font-size: 15px; cursor: pointer;
  box-sizing: border-box; padding: 0 22px !important; margin-left: 0 !important; margin-right: 0 !important;
}
body[data-af="promo"] > center { margin-top: 8vh !important; }
body[data-af="promo-admin"] form input[type=submit],
body[data-af="promo-admin"] form button { width: auto; padding: 0 22px; }
body[data-af="promo"] p[style*="darkgreen"] {
  background: var(--af-success-50) !important; color: var(--af-success) !important; border-radius: 12px; font-weight: 600;
}
body[data-af="promo"] .success { color: var(--af-success) !important; }
body[data-af="promo"] .error { color: var(--af-danger) !important; }
body[data-af="promo-admin"] table {
  width: 100%; border-collapse: separate !important; border-spacing: 0; overflow: hidden; margin: 12px 0;
  border: 1px solid var(--af-line) !important; border-radius: var(--af-radius);
}
body[data-af="promo-admin"] th {
  background: var(--af-surface-2) !important; color: var(--af-muted); font-size: 11.5px; text-transform: uppercase;
  letter-spacing: .06em; border: 0 !important; border-bottom: 1px solid var(--af-line) !important; padding: 12px 14px !important;
}
body[data-af="promo-admin"] td { border: 0 !important; border-bottom: 1px solid var(--af-line) !important; padding: 11px 14px !important; }
body[data-af="promo-admin"] tr:last-child td { border-bottom: 0 !important; }

/* ==========================================================================
   14. Motion preferences
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  body[data-af] *, body[data-af] *::before, body[data-af] *::after { transition: none !important; animation: none !important; }
}

/* ==========================================================================
   15. Admin tools (af-* components used by the admin manager pages)
   ========================================================================== */
body[data-af] .af-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 14px 20px; margin: 0 0 20px;
}
body[data-af] .af-title {
  margin: 0; font-family: var(--af-display) !important; font-size: 22px; font-weight: 600;
  color: var(--af-text); display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
}
body[data-af] .af-sub { margin: 4px 0 0; color: var(--af-muted); font-size: 13.5px; }
body[data-af] .af-dim { color: var(--af-muted) !important; }
body[data-af] .af-neg { color: var(--af-danger) !important; }
body[data-af] .af-block { display: block; }
body[data-af] .af-back { display: inline-block; margin-bottom: 14px; color: var(--af-muted); font-weight: 500; }
body[data-af] .af-back:hover { color: var(--af-primary); text-decoration: none; }
body[data-af] .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
body[data-af] .nowrap { white-space: nowrap; }

/* alerts */
body[data-af] .af-alert {
  margin: 0 0 16px; padding: 12px 16px; border-radius: 12px; font-weight: 500; font-size: 14px;
  border: 1px solid transparent;
}
body[data-af] .af-alert-ok { background: var(--af-success-50); color: #0b6e3e; border-color: #c6ead6; }
body[data-af] .af-alert-bad { background: var(--af-danger-50); color: #a1271d; border-color: #f6cbc7; }
body[data-af] .af-note {
  margin: 0 0 14px; padding: 12px 16px; border-radius: 12px; background: var(--af-primary-50);
  color: var(--af-text-2); font-size: 13.5px;
}

/* range presets */
body[data-af] .af-range { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0; }
body[data-af] .af-seg {
  display: inline-flex; padding: 4px; gap: 2px; border-radius: 999px;
  background: var(--af-surface); border: 1px solid var(--af-line);
}
body[data-af] .af-seg a {
  padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 500;
  color: var(--af-text-2); white-space: nowrap;
}
body[data-af] .af-seg a:hover { background: var(--af-surface-2); text-decoration: none; color: var(--af-text); }
body[data-af] .af-seg a.on { background: var(--af-ink-2); color: #fff; }
body[data-af] .af-range-custom { display: inline-flex; align-items: center; gap: 8px; }
body[data-af] .af-range-custom span { color: var(--af-muted); font-size: 13px; }
body[data-af] .main_content_iner .af-range-custom input[type=date] { min-height: 38px; padding: 6px 10px; font-size: 13px; width: 150px; }
body[data-af] .af-range-custom .btn { padding: 8px 16px; }

/* KPI tiles */
body[data-af] .af-kpis {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 20px 0;
}
body[data-af] .af-kpis-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
body[data-af] .af-kpi {
  background: var(--af-surface); border: 1px solid var(--af-line); border-radius: var(--af-radius);
  padding: 16px 18px; box-shadow: var(--af-shadow); min-width: 0;
}
body[data-af] .af-kpi span { display: block; color: var(--af-muted); font-size: 12.5px; font-weight: 500; }
body[data-af] .af-kpi b {
  display: block; margin: 6px 0 2px; font-family: var(--af-display); font-size: 22px; font-weight: 600;
  color: var(--af-text); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
body[data-af] .af-kpi small { color: var(--af-muted); font-size: 12px; }

/* cards + grids */
body[data-af] .af-card {
  background: var(--af-surface); border: 1px solid var(--af-line); border-radius: var(--af-radius);
  box-shadow: var(--af-shadow); padding: 20px; margin: 0 0 20px; min-width: 0;
}
body[data-af] .af-card-flush { padding: 0; overflow: hidden; }
body[data-af] .af-card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 14px; flex-wrap: wrap;
}
body[data-af] .af-card-head h3 { margin: 0; font-size: 15px !important; font-weight: 600; }
body[data-af] .af-card-head a { font-size: 13px; font-weight: 600; color: var(--af-primary); }
body[data-af] .af-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
body[data-af] .af-grid-wide { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
body[data-af] .af-pill-link {
  display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--af-warning-50);
  color: var(--af-warning) !important; font-size: 12.5px; font-weight: 600;
}
body[data-af] .af-pill-link:hover { text-decoration: none; filter: brightness(.97); }

/* chart */
body[data-af] .af-chart { display: block; width: 100%; height: 220px; overflow: visible; }
body[data-af] .af-chart .grid { stroke: var(--af-line); stroke-dasharray: 3 4; }
body[data-af] .af-chart .bar { fill: var(--af-primary); opacity: .85; transition: opacity .15s; }
body[data-af] .af-chart .bar:hover { opacity: 1; fill: var(--af-primary-700); }
body[data-af] .af-chart .line { fill: none; stroke: #0bb5d9; stroke-width: 2.25; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
body[data-af] .af-chart .lbl { fill: var(--af-muted); font-size: 11px; text-anchor: middle; font-family: var(--af-body); }
body[data-af] .af-legend { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--af-muted); }
body[data-af] .af-legend span { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-left: 8px; }
body[data-af] .af-legend .k-bar { background: var(--af-primary); }
body[data-af] .af-legend .k-line { height: 3px; border-radius: 2px; background: #0bb5d9; }

/* horizontal bars (countries) */
body[data-af] .af-bars { list-style: none; margin: 0; padding: 0; }
body[data-af] .af-bars li {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto auto; align-items: center; gap: 12px;
  padding: 8px 0; border-bottom: 1px solid var(--af-line); font-size: 13.5px;
}
body[data-af] .af-bars li:last-child { border-bottom: 0; }
body[data-af] .af-bars .nm { font-weight: 600; }
body[data-af] .af-bars .track { height: 8px; border-radius: 8px; background: var(--af-surface-2); overflow: hidden; }
body[data-af] .af-bars .track i { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--af-primary), #0bb5d9); }
body[data-af] .af-bars .vl { font-weight: 600; font-variant-numeric: tabular-nums; }
body[data-af] .af-bars .vl2 { color: var(--af-muted); font-variant-numeric: tabular-nums; min-width: 64px; text-align: right; }

/* tables */
body[data-af] .af-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
body[data-af] .af-card:not(.af-card-flush) .af-table-wrap { margin: 0 -20px -20px; }
body[data-af] .af-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
body[data-af] .af-table th {
  background: var(--af-surface-2); color: var(--af-muted); font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em; text-align: left; padding: 11px 14px;
  border-top: 1px solid var(--af-line); border-bottom: 1px solid var(--af-line); white-space: nowrap;
}
body[data-af] .af-card-flush .af-table th { border-top: 0; }
body[data-af] .af-table td { padding: 12px 14px; border-bottom: 1px solid var(--af-line); vertical-align: middle; color: var(--af-text); }
body[data-af] .af-table tbody tr:last-child td { border-bottom: 0; }
body[data-af] .af-table tbody tr:hover td { background: #fafbff; }
body[data-af] .af-table .r { text-align: right; }
body[data-af] .af-table .b { font-weight: 600; font-variant-numeric: tabular-nums; }
body[data-af] .af-table .cb { width: 36px; padding-right: 0; }
body[data-af] .af-table .btn { padding: 6px 12px; font-size: 12.5px; margin: 1px 0 1px 4px; }
body[data-af] .af-table a:not(.btn):not(.af-badge) { color: var(--af-text); font-weight: 500; }
body[data-af] .af-table a:not(.btn):not(.af-badge):hover { color: var(--af-primary); }
body[data-af] .af-trunc { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body[data-af] .af-empty { text-align: center; color: var(--af-muted); padding: 28px 14px !important; }
body[data-af] .af-user { display: inline-flex; flex-direction: column; line-height: 1.3; }
body[data-af] .af-user b { font-weight: 600; }
body[data-af] .af-user small { color: var(--af-muted); font-size: 12px; }
body[data-af] .af-inline { display: inline; margin: 0; }
body[data-af] .main_content_iner .af-table input[type=checkbox] { margin: 0; }

/* badges + chips */
body[data-af] .af-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; font-family: var(--af-body); letter-spacing: 0; white-space: nowrap; vertical-align: middle;
}
body[data-af] .af-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
body[data-af] .af-badge-ok { background: var(--af-success-50); color: var(--af-success) !important; }
body[data-af] .af-badge-warn { background: var(--af-warning-50); color: var(--af-warning) !important; }
body[data-af] .af-badge-bad { background: var(--af-danger-50); color: var(--af-danger) !important; }
body[data-af] .af-badge-info { background: var(--af-primary-50); color: var(--af-primary-700) !important; }
body[data-af] .af-badge-muted { background: var(--af-surface-2); color: var(--af-muted) !important; }
body[data-af] .af-chip {
  display: inline-block; padding: 2px 9px; border-radius: 999px; background: var(--af-surface-2);
  border: 1px solid var(--af-line); color: var(--af-text-2); font-size: 12px; font-weight: 500; white-space: nowrap;
}
body[data-af] .af-chip-lg { padding: 7px 14px; font-size: 13px; }
body[data-af] .af-chip-lg b { margin-left: 6px; color: var(--af-text); }
body[data-af] a.af-chip:hover { border-color: var(--af-primary); color: var(--af-primary); text-decoration: none; }
body[data-af] .af-chips { display: flex; flex-wrap: wrap; gap: 10px; }
body[data-af] .af-flagged {
  display: flex; flex-direction: column; gap: 3px; padding: 10px 14px; border-radius: 12px;
  border: 1px solid var(--af-line); background: var(--af-surface-2); min-width: 170px;
}
body[data-af] .af-flagged b { color: var(--af-text); }
body[data-af] .af-flagged span { color: var(--af-muted); font-size: 12px; }
body[data-af] .af-flagged:hover { border-color: var(--af-warning); background: var(--af-warning-50); text-decoration: none; }
body[data-af] .af-copy { cursor: copy; border-bottom: 1px dashed var(--af-line-2); }
body[data-af] .af-copy.copied { color: var(--af-success); border-color: var(--af-success); }
body[data-af] .af-copy.copied::after { content: " \2713 copied"; font-size: 11px; }

/* tabs */
body[data-af] .af-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 16px; }
body[data-af] .af-tabs a {
  display: block; padding: 14px 16px; border-radius: 14px; background: var(--af-surface);
  border: 1px solid var(--af-line); color: var(--af-text); transition: border-color .15s, box-shadow .15s;
}
body[data-af] .af-tabs a:hover { text-decoration: none; border-color: var(--af-line-2); }
body[data-af] .af-tabs a.on { border-color: var(--af-primary); box-shadow: var(--af-ring); }
body[data-af] .af-tabs span { display: block; font-size: 12.5px; color: var(--af-muted); font-weight: 500; }
body[data-af] .af-tabs b { font-family: var(--af-display); font-size: 20px; font-weight: 600; margin-right: 8px; }
body[data-af] .af-tabs small { color: var(--af-muted); font-size: 12.5px; }
body[data-af] .af-tabs-sm { display: flex; gap: 6px; border-bottom: 1px solid var(--af-line); margin-bottom: 16px; }
body[data-af] .af-tabs-sm a {
  padding: 10px 14px; border: 0; border-radius: 0; background: none; box-shadow: none !important;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
body[data-af] .af-tabs-sm a.on { border-bottom-color: var(--af-primary); }
body[data-af] .af-tabs-sm a span { font-size: 14px; color: var(--af-text-2); }
body[data-af] .af-tabs-sm a.on span { color: var(--af-primary-700); font-weight: 600; }

/* filter bar */
body[data-af] .af-filters {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 16px;
  padding: 12px; border-radius: var(--af-radius); background: var(--af-surface); border: 1px solid var(--af-line);
}
body[data-af] .main_content_iner .af-filters input[type=search],
body[data-af] .main_content_iner .af-filters input[type=text] { flex: 1 1 220px; min-width: 0; margin: 0 !important; }
body[data-af] .main_content_iner .af-filters input[type=search] {
  font-family: var(--af-body); border: 1px solid var(--af-line-2); border-radius: var(--af-radius-sm);
  min-height: 42px; padding: 9px 14px; font-size: 14px;
}
body[data-af] .main_content_iner .af-filters input.af-w-sm { flex: 0 1 120px; }
body[data-af] .main_content_iner .af-filters input.af-w-xs { flex: 0 1 110px; }
body[data-af] .main_content_iner .af-filters select { flex: 0 1 170px; margin: 0 !important; }
body[data-af] .af-filters .af-dates { display: inline-flex; gap: 8px; }
body[data-af] .af-filters .af-dates[hidden] { display: none; }
body[data-af] .af-reset { color: var(--af-muted); font-size: 13px; font-weight: 500; }

/* bulk action bar */
body[data-af] .af-bulkbar {
  position: sticky; top: 76px; z-index: 20; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 0 0 12px; padding: 10px 14px; border-radius: 14px; background: var(--af-ink-2); color: #fff;
  box-shadow: var(--af-shadow-lg);
}
body[data-af] .af-bulkbar[hidden] { display: none; }
body[data-af] .af-bulkbar span { margin-right: auto; font-size: 14px; }

/* pager */
body[data-af] .af-pager { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 20px 0; }
body[data-af] .af-pager a, body[data-af] .af-pager span {
  min-width: 38px; height: 38px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; border: 1px solid var(--af-line); background: var(--af-surface); font-size: 13.5px; font-weight: 500; color: var(--af-text-2);
}
body[data-af] .af-pager a:hover { border-color: var(--af-primary); color: var(--af-primary); text-decoration: none; }
body[data-af] .af-pager .cur { background: var(--af-primary); border-color: var(--af-primary); color: #fff; }
body[data-af] .af-pager .off { opacity: .45; }
body[data-af] .af-pager .gap { border: 0; background: none; }

/* expandable details */
body[data-af] .af-details summary { cursor: pointer; color: var(--af-primary); font-size: 12.5px; font-weight: 600; list-style: none; }
body[data-af] .af-details summary::-webkit-details-marker { display: none; }
body[data-af] .af-details[open] summary { margin-bottom: 6px; }
body[data-af] .af-details dl { margin: 0; max-width: 340px; font-size: 12px; }
body[data-af] .af-details dt { color: var(--af-muted); font-weight: 600; margin-top: 4px; }
body[data-af] .af-details dd { margin: 0; word-break: break-all; color: var(--af-text-2); }

/* user profile header + edit form */
body[data-af] .af-profile {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin: 0 0 6px; padding: 22px;
  border-radius: 20px; color: #fff;
  background:
    radial-gradient(120% 160% at 100% 0%, rgba(92, 225, 255, .22) 0%, rgba(92, 225, 255, 0) 50%),
    linear-gradient(135deg, var(--af-ink-2), var(--af-ink-3));
}
body[data-af] .af-profile .af-title { color: #fff !important; }
body[data-af] .af-profile .af-sub { color: rgba(234, 240, 255, .7); }
body[data-af] .af-avatar {
  width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; flex: none;
  font-family: var(--af-display); font-size: 22px; font-weight: 600; color: var(--af-ink);
  background: linear-gradient(135deg, var(--af-aqua), var(--af-peri));
}
body[data-af] .af-profile-main { flex: 1 1 320px; min-width: 0; }
body[data-af] .af-profile-actions { display: flex; gap: 8px; flex-wrap: wrap; }
body[data-af] .af-profile .btn-outline-dark { background: rgba(255, 255, 255, .08) !important; border-color: rgba(255, 255, 255, .2) !important; color: #fff !important; }
body[data-af] .af-form { display: grid; gap: 12px; }
body[data-af] .af-form label { display: grid; gap: 6px; margin: 0; font-size: 12.5px; font-weight: 600; color: var(--af-text-2); }
body[data-af] .main_content_iner .af-form input,
body[data-af] .main_content_iner .af-form select { width: 100%; margin: 0 !important; }
body[data-af] .af-form .btn { justify-self: start; margin-top: 4px; }

@media (max-width: 1199px) {
  body[data-af] .af-kpis-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body[data-af] .af-grid-wide { grid-template-columns: 1fr; }
}
@media (max-width: 991px) {
  body[data-af] .af-grid-2 { grid-template-columns: 1fr; }
  body[data-af] .af-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body[data-af] .af-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575px) {
  body[data-af] .af-kpis, body[data-af] .af-kpis-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  body[data-af] .af-kpi { padding: 12px 14px; }
  body[data-af] .af-kpi b { font-size: 18px; }
  body[data-af] .af-seg { overflow-x: auto; max-width: 100%; }
  body[data-af] .af-range-custom { flex-wrap: wrap; }
  body[data-af] .main_content_iner .af-range-custom input[type=date] { width: 130px; }
  body[data-af] .af-filters select, body[data-af] .af-filters .btn { flex: 1 1 auto; }
  body[data-af] .af-bars li { grid-template-columns: 36px minmax(0, 1fr) auto; }
  body[data-af] .af-bars .vl2 { display: none; }
  body[data-af] .af-bulkbar { top: 66px; }
}
body[data-af] .af-table .btn.af-icon-btn { width: 34px; height: 34px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
@media (max-width: 575px) {
  body[data-af] .af-range, body[data-af] .af-range-custom { width: 100%; min-width: 0; }
  body[data-af] .af-range-custom { flex-wrap: nowrap; }
  body[data-af] .main_content_iner .af-range-custom input[type=date] { flex: 1 1 0; width: auto; min-width: 0; }
}
body[data-af] .header_iner .serach_field-area { overflow: hidden; }
body[data-af] .header_iner .sidebar_icon { display: flex; align-items: center; }
@media (max-width: 575px) {
  body[data-af^="admin-"] .header_iner .header_notification_warp { display: none !important; }
  body[data-af] .header_iner .search_inner::before { font-size: 16px !important; }
}

/* ==========================================================================
   16. Mobile sidebar + copy buttons
   ========================================================================== */
body[data-af] .header_iner .sidebar_icon { transform: none !important; top: auto !important; left: auto !important; cursor: pointer; }
body[data-af] .header_iner .sidebar_icon i { margin-right: 10px; }
@media (max-width: 991px) {
  body[data-af] .sidebar { transition: left .28s var(--af-ease), box-shadow .28s; z-index: 1001 !important; }
  body[data-af] .sidebar.active_sidebar { box-shadow: 0 0 0 100vmax rgba(6, 10, 26, .45), var(--af-shadow-lg) !important; }
  html.af-nav-open, html.af-nav-open body { overflow: hidden; }
  body[data-af] .sidebar .logo { padding-right: 16px !important; }
  body[data-af] .sidebar_close_icon { display: flex !important; align-items: center; cursor: pointer; }
}
/* Bottom quick-menu capsule (phones + tablets) */
body[data-af] .af-dock { display: none; }
@media (max-width: 991px) {
  body[data-af] .af-dock {
    position: fixed; z-index: 1000; left: 50%; transform: translateX(-50%);
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    width: min(440px, calc(100% - 24px));
    display: flex; align-items: center; justify-content: space-between; gap: 2px;
    padding: 6px; border-radius: 999px;
    background: rgba(11, 18, 48, .92);
    -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px);
    border: 1px solid rgba(138, 150, 255, .22);
    box-shadow: 0 18px 40px -14px rgba(6, 10, 26, .7);
  }
  body[data-af] .af-dock a, body[data-af] .af-dock button {
    flex: 1 1 0; min-width: 0; height: 52px; padding: 0; margin: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    border: 0; border-radius: 999px; background: transparent; cursor: pointer;
    color: rgba(234, 240, 255, .62) !important; font: 500 10.5px/1 var(--af-body); letter-spacing: .01em;
    text-decoration: none !important; -webkit-tap-highlight-color: transparent;
    transition: color .2s, background .2s;
  }
  body[data-af] .af-dock i { font-size: 17px; line-height: 1; }
  body[data-af] .af-dock span { white-space: nowrap; }
  body[data-af] .af-dock .on { color: #fff !important; background: rgba(138, 150, 255, .18); }
  body[data-af] .af-dock .on i { color: var(--af-aqua); }
  body[data-af] .af-dock .main {
    flex: 0 0 auto; width: 64px; color: #fff !important;
    background: var(--af-primary); box-shadow: 0 8px 18px -6px rgba(67, 83, 255, .8);
  }
  body[data-af] .af-dock .main.on { background: var(--af-primary-600); }
  body[data-af] .af-dock .main.on i { color: #fff; }
  body[data-af] .af-dock a:active, body[data-af] .af-dock button:active { transform: scale(.95); }
  /* keep page content and footer clear of the capsule */
  html.af-has-dock body[data-af] .main_content { padding-bottom: 110px !important; }
  html.af-has-dock body[data-af] .footer_part { bottom: 84px; }
  html.af-nav-open body[data-af] .af-dock { opacity: 0; pointer-events: none; }
  body[data-af] .af-bulkbar { z-index: 30; }
}
@media (max-width: 360px) {
  body[data-af] .af-dock span { font-size: 9.5px; }
  body[data-af] .af-dock .main { width: 54px; }
}

body[data-af] .af-acct { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; }
body[data-af] .af-acct > span { word-break: break-all; }
body[data-af] .af-copy-btn {
  flex: none; width: 28px; height: 28px; padding: 0; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--af-line-2); background: var(--af-surface); color: var(--af-muted);
  font-size: 12.5px; cursor: pointer; transition: color .15s, border-color .15s, background .15s;
}
body[data-af] .af-copy-btn:hover { color: var(--af-primary); border-color: var(--af-primary); }
body[data-af] .af-copy-btn.copied { color: #fff; background: var(--af-success); border-color: var(--af-success); }
body[data-af] .af-copy-btn.copied i::before { content: "\f00c"; }

/* Payout after 5% processing fee */
body[data-af] .af-pay { display: inline-flex; flex-direction: column; align-items: flex-end; line-height: 1.25; }
body[data-af] .af-pay b { color: var(--af-success); font-weight: 700; font-variant-numeric: tabular-nums; }
body[data-af] .af-pay small { color: var(--af-muted); font-size: 11.5px; white-space: nowrap; }
body[data-af] .af-table .af-net { color: var(--af-success) !important; }

/* ==========================================================================
   17. Admin link stats
   ========================================================================== */
body[data-af] .af-linkhead { margin-bottom: 18px; }
body[data-af] .af-linkhead .af-avatar { font-size: 22px; }
body[data-af] .af-profile a:not(.btn) { color: #fff; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .35); }
body[data-af] .af-dest { margin: 8px 0 0; font-size: 13px; color: rgba(234, 240, 255, .75); word-break: break-all; }
body[data-af] .af-dest a { color: var(--af-aqua) !important; }
body[data-af] .af-shortlink {
  padding: 6px 6px 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .18); color: #fff; font-size: 13px; font-weight: 600;
}
body[data-af] .af-profile .af-copy-btn { background: rgba(255, 255, 255, .12); border-color: transparent; color: #fff; }
body[data-af] .af-head-tight { align-items: center; margin: 0 0 4px; }
body[data-af] .af-head-tight .af-sub { margin: 0; }
body[data-af] .af-head-tight .af-sub b { color: var(--af-text); }
body[data-af] .af-legend .k-red { background: var(--af-danger); }
body[data-af] .af-chart.is-traffic .line { stroke: var(--af-danger); }
body[data-af] .af-mt { margin-top: 14px; }
body[data-af] .af-pad { padding: 18px 20px 0; }
body[data-af] .af-trunc-wide { max-width: 520px; }
body[data-af] .af-stat-link { margin-left: 6px; color: var(--af-muted) !important; }
body[data-af] .af-stat-link:hover { color: var(--af-primary) !important; }

body[data-af] .af-sources { list-style: none; margin: 0; padding: 0; }
body[data-af] .af-sources li a {
  display: grid; grid-template-columns: 38px minmax(0, 1.2fr) minmax(0, 1fr) 64px; align-items: center; gap: 12px;
  padding: 10px 8px; margin: 0 -8px; border-radius: 12px; color: var(--af-text) !important; text-decoration: none !important;
}
body[data-af] .af-sources li a:hover { background: var(--af-surface-2); }
body[data-af] .af-sources li.on a { background: var(--af-primary-50); box-shadow: inset 0 0 0 1px var(--af-primary-100); }
body[data-af] .af-sources .ic {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  background: var(--af-surface-2); color: var(--af-primary); font-size: 16px;
}
body[data-af] .af-sources .nm { display: flex; flex-direction: column; min-width: 0; }
body[data-af] .af-sources .nm b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body[data-af] .af-sources .nm small { color: var(--af-muted); font-size: 12px; }
body[data-af] .af-sources .track { height: 8px; border-radius: 8px; background: var(--af-surface-2); overflow: hidden; }
body[data-af] .af-sources .track i { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--af-primary), #0bb5d9); }
body[data-af] .af-sources .vl { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; display: flex; flex-direction: column; }
body[data-af] .af-sources .vl small { color: var(--af-muted); font-weight: 500; font-size: 11.5px; }

body[data-af] .af-stack { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: var(--af-surface-2); }
body[data-af] .af-stack i { display: block; height: 100%; }
body[data-af] .af-stack .d1, body[data-af] .af-stack-legend .d1 { background: var(--af-primary); }
body[data-af] .af-stack .d2, body[data-af] .af-stack-legend .d2 { background: #0bb5d9; }
body[data-af] .af-stack .d3, body[data-af] .af-stack-legend .d3 { background: var(--af-gold); }
body[data-af] .af-stack-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 12px 0 0; padding: 0; font-size: 13px; color: var(--af-text-2); }
body[data-af] .af-stack-legend span { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
body[data-af] .af-stack-legend b { margin-left: 4px; color: var(--af-text); }
@media (max-width: 575px) {
  body[data-af] .af-sources li a { grid-template-columns: 34px minmax(0, 1fr) 56px; }
  body[data-af] .af-sources .track { display: none; }
  body[data-af] .af-shortlink { font-size: 12px; }
}

/* ==========================================================================
   18. Confirm / reason dialog + email composer
   ========================================================================== */
body[data-af] .af-modal {
  position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center;
  padding: 16px; background: rgba(6, 10, 26, .55);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
body[data-af] .af-modal[hidden] { display: none; }
html.af-modal-open, html.af-modal-open body { overflow: hidden; }
body[data-af] .af-modal-card {
  width: 100%; max-width: 460px; padding: 24px; border-radius: 20px; background: var(--af-surface);
  border: 1px solid var(--af-line); box-shadow: 0 30px 60px -20px rgba(6, 10, 26, .5);
  animation: af-pop .18s var(--af-ease);
}
@keyframes af-pop { from { transform: translateY(8px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
body[data-af] .af-modal-card h3 { margin: 0 0 6px; font-family: var(--af-display) !important; font-size: 18px; font-weight: 600; }
body[data-af] .af-modal-note { margin: 0 0 16px; color: var(--af-text-2); font-size: 14px; line-height: 1.55; }
body[data-af] .af-modal-reason { display: grid; gap: 6px; margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--af-text-2); }
body[data-af] .af-modal-reason[hidden] { display: none; }
body[data-af] .af-modal-reason small { font-weight: 400; color: var(--af-muted); }
body[data-af] .af-modal textarea {
  width: 100%; min-height: 110px; padding: 12px 14px; resize: vertical; box-sizing: border-box;
  font: 14px/1.5 var(--af-body); color: var(--af-text);
  border: 1px solid var(--af-line-2); border-radius: 12px; background: var(--af-surface);
}
body[data-af] .af-modal textarea:focus { outline: none; border-color: var(--af-primary); box-shadow: var(--af-ring); }
body[data-af] .af-modal-err { margin: 4px 0 0; color: var(--af-danger); font-size: 13px; font-weight: 500; }
body[data-af] .af-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
body[data-af] .af-modal-actions .btn { min-width: 110px; }

/* email composer (Contact user + user profile) */
body[data-af] .af-compose { display: grid; gap: 12px; }
body[data-af] .af-compose label { display: grid; gap: 6px; margin: 0; font-size: 12.5px; font-weight: 600; color: var(--af-text-2); }
body[data-af] .main_content_iner .af-compose input,
body[data-af] .main_content_iner .af-compose textarea { width: 100%; margin: 0 !important; }
body[data-af] .main_content_iner .af-compose textarea { min-height: 150px; resize: vertical; line-height: 1.55; }
body[data-af] .af-compose-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
body[data-af] .af-compose-foot small { color: var(--af-muted); }
body[data-af] .af-mail-card { max-width: 760px; }
body[data-af] .af-templates { display: flex; flex-wrap: wrap; gap: 8px; }
body[data-af] .af-templates button {
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--af-line-2); background: var(--af-surface-2);
  font-size: 12.5px; font-weight: 500; color: var(--af-text-2); cursor: pointer;
}
body[data-af] .af-templates button:hover { border-color: var(--af-primary); color: var(--af-primary); }
body[data-af] .af-modal-actions .btn-danger { background: var(--af-danger) !important; color: #fff !important; }
body[data-af] .af-modal-actions .btn-danger:hover { filter: brightness(.94); }
body[data-af] .af-table td.af-neg { white-space: nowrap; }
