/* =========================================================
   A.T.B. SIGNATURE EXPERIENCE
   Visual-only layer | No logic, routes or data changes
   ========================================================= */

:root {
  --atb-surface: rgba(13, 27, 49, .88);
  --atb-surface-raised: rgba(19, 39, 68, .94);
  --atb-surface-soft: rgba(25, 48, 79, .62);
  --atb-line: rgba(91, 177, 255, .20);
  --atb-line-strong: rgba(91, 177, 255, .38);
  --atb-shadow-deep: 0 18px 48px rgba(0, 0, 0, .28);
  --atb-shadow-blue: 0 12px 35px rgba(35, 155, 255, .12);
  --atb-radius-sm: 12px;
  --atb-radius-md: 18px;
  --atb-radius-lg: 25px;
  --atb-transition: .22s ease;
}

/* ---------- GLOBAL TYPOGRAPHY ---------- */

html {
  scroll-behavior: smooth;
}

body {
  color: #edf5ff;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
  color: #f3f8ff;
  letter-spacing: -.025em;
  line-height: 1.35;
}

h1 {
  font-weight: 850;
}

h2, h3 {
  font-weight: 750;
}

p {
  line-height: 1.75;
}

a {
  transition: color var(--atb-transition);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--atb-cyan);
  outline-offset: 3px;
}

/* ---------- NAVIGATION / BRAND ---------- */

.topbar {
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--atb-line);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .16);
}

.brand {
  font-weight: 900;
  letter-spacing: .045em;
  text-shadow: 0 0 22px rgba(53, 186, 255, .22);
}

.topbar a,
.topbar button {
  transition: background var(--atb-transition), border-color var(--atb-transition);
}

/* ---------- SHARED SURFACES ---------- */

.card,
.panel,
.notice,
.feature-card,
.task-card,
.task-history,
.dash-card,
.weekly-task-card,
.admin-card,
.admin-login,
.profile-card,
.support-card,
.team-card,
.team-progress-card,
.team-members-list,
#teamMembersPanel,
.auth-card,
.withdraw-card,
.faq-card,
.report-card,
.activity-table-wrap {
  background:
    linear-gradient(145deg, rgba(20, 42, 72, .96), rgba(9, 22, 42, .96));
  border: 1px solid var(--atb-line);
  border-radius: var(--atb-radius-md);
  box-shadow: var(--atb-shadow-deep), inset 0 1px 0 rgba(255,255,255,.025);
}

.card,
.panel,
.admin-card,
.dash-card,
.task-card,
.profile-card,
.support-card,
.team-card,
.withdraw-card {
  position: relative;
  overflow: hidden;
}

.card,
.panel,
.admin-card,
.dash-card,
.task-card,
.profile-card,
.support-card,
.team-card {
  transition:
    border-color var(--atb-transition),
    box-shadow var(--atb-transition),
    transform var(--atb-transition);
}

.card:hover,
.panel:hover,
.admin-card:hover,
.dash-card:hover,
.task-card:hover,
.profile-card:hover,
.support-card:hover,
.team-card:hover {
  border-color: var(--atb-line-strong);
  box-shadow: var(--atb-shadow-deep), var(--atb-shadow-blue);
}

/* ---------- PAGE HEADERS ---------- */

.page-header,
.dash-heading,
.admin-page-header,
.withdraw-hero,
.faq-intro {
  position: relative;
  margin-bottom: 24px;
}

.page-header h1,
.dash-heading h1,
.admin-page h1,
.withdraw-hero h1 {
  text-shadow: 0 0 28px rgba(53, 186, 255, .12);
}

/* ---------- BUTTON SYSTEM ---------- */

button,
.btn,
.button,
a.btn {
  border-radius: var(--atb-radius-sm);
  font-weight: 750;
  letter-spacing: .015em;
  transition:
    transform var(--atb-transition),
    box-shadow var(--atb-transition),
    border-color var(--atb-transition);
}

button:hover,
.btn:hover,
.button:hover,
a.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 9px 24px rgba(35, 155, 255, .18);
}

button:active,
.btn:active,
.button:active,
a.btn:active {
  transform: translateY(0);
}

/* ---------- FORMS ---------- */

input,
select,
textarea {
  border: 1px solid rgba(105, 164, 220, .25);
  border-radius: var(--atb-radius-sm);
  color: #edf5ff;
  transition: border-color var(--atb-transition), box-shadow var(--atb-transition);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(99, 229, 255, .7);
  box-shadow: 0 0 0 3px rgba(53, 186, 255, .10);
}

label {
  font-weight: 650;
}

/* ---------- TABLES ---------- */

table {
  border-collapse: separate;
  border-spacing: 0;
}

th {
  color: #8edfff;
  font-weight: 800;
  letter-spacing: .025em;
  white-space: nowrap;
}

td, th {
  border-bottom-color: rgba(105, 164, 220, .13);
}

tbody tr {
  transition: background var(--atb-transition);
}

tbody tr:hover {
  background: rgba(53, 186, 255, .045);
}

.table-wrap,
.activity-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border-radius: var(--atb-radius-md);
}

/* ---------- DASHBOARD ---------- */

.dashboard {
  width: min(100% - 32px, 1440px);
  margin-inline: auto;
}

.dash-heading {
  padding-block: 12px;
}

.atb-power-card {
  border: 1px solid rgba(99, 229, 255, .24);
  border-radius: var(--atb-radius-lg);
  background:
    radial-gradient(ellipse at 90% 0%, rgba(53,186,255,.15), transparent 42%),
    linear-gradient(135deg, rgba(20,43,75,.98), rgba(8,20,39,.98));
  box-shadow: 0 20px 55px rgba(0,0,0,.24);
}

.atb-power-brand {
  letter-spacing: .08em;
  text-shadow: 0 0 24px rgba(99,229,255,.25);
}

.dash-grid {
  gap: 18px;
}

.dash-card {
  min-width: 0;
  padding: 21px;
}

.dash-links {
  gap: 12px;
}

.dash-link {
  border: 1px solid var(--atb-line);
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(20,42,72,.88), rgba(10,24,44,.92));
  transition: border-color var(--atb-transition), transform var(--atb-transition);
}

.dash-link:hover {
  border-color: var(--atb-line-strong);
  transform: translateY(-2px);
}

/* ---------- TASKS ---------- */

.tasks-page {
  width: min(100% - 32px, 1250px);
  margin-inline: auto;
}

.tasks-grid {
  gap: 20px;
}

.task-card {
  padding: 23px;
  background:
    radial-gradient(circle at 100% 0%, rgba(152,114,255,.10), transparent 40%),
    linear-gradient(145deg, rgba(19,40,69,.97), rgba(9,21,40,.98));
}

.task-reward {
  color: var(--atb-gold);
  font-weight: 850;
  text-shadow: 0 0 16px rgba(245,201,103,.15);
}

.task-status {
  font-weight: 750;
}

.task-history {
  padding: 20px;
}

#nextTaskCountdown {
  color: var(--atb-cyan);
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

/* ---------- ADMIN CONTROL CENTER ---------- */

.admin-page {
  width: min(100% - 32px, 1500px);
  margin-inline: auto;
}

.admin-grid {
  gap: 18px;
}

.admin-card {
  padding: 22px;
}

.admin-links {
  gap: 12px;
}

.admin-page section {
  margin-bottom: 22px;
}

.admin-page table {
  width: 100%;
}

.admin-page .panel {
  padding: 22px;
}

.admin-page h1,
.admin-page h2 {
  margin-top: 0;
}

/* ---------- AUTHENTICATION ---------- */

.auth-wrap {
  min-height: 75vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 16px;
}

.auth-card {
  width: min(100%, 510px);
  padding: clamp(22px, 4vw, 38px);
  background:
    radial-gradient(circle at 50% 0%, rgba(53,186,255,.13), transparent 45%),
    linear-gradient(145deg, rgba(18,39,68,.98), rgba(7,19,37,.99));
}

.auth-card h1,
.auth-card h2 {
  text-align: center;
}

.field {
  margin-bottom: 17px;
}

/* ---------- MARKET ---------- */

.market-container {
  width: min(100% - 32px, 1450px);
  margin-inline: auto;
}

.market-hero {
  border-radius: var(--atb-radius-lg);
  border: 1px solid var(--atb-line);
  background:
    radial-gradient(circle at 85% 10%, rgba(152,114,255,.13), transparent 38%),
    linear-gradient(145deg, rgba(19,42,74,.96), rgba(8,20,39,.98));
  box-shadow: var(--atb-shadow-deep);
}

.market-top {
  border-bottom: 1px solid var(--atb-line);
}

.market-container canvas,
.market-container svg {
  max-width: 100%;
}

/* ---------- PROFILE / TEAM / SUPPORT ---------- */

.profile-page,
.team-page,
.support-page,
.withdraw-page,
.faq-container {
  width: min(100% - 32px, 1250px);
  margin-inline: auto;
}

.profile-card,
.team-card,
.support-card,
.withdraw-card {
  padding: 22px;
}

.password-section {
  border-top: 1px solid var(--atb-line);
  padding-top: 20px;
}

.chat-page {
  width: min(100% - 24px, 1100px);
  margin-inline: auto;
}

.chat-box {
  border: 1px solid var(--atb-line);
  border-radius: var(--atb-radius-md);
  background: rgba(8, 21, 40, .82);
}

.chat-form {
  gap: 10px;
}

/* ---------- WITHDRAWALS ---------- */

.withdraw-hero {
  padding: 25px;
  border-radius: var(--atb-radius-lg);
  border: 1px solid var(--atb-line);
  background:
    radial-gradient(circle at 90% 0%, rgba(53,186,255,.13), transparent 42%),
    linear-gradient(145deg, rgba(20,43,75,.96), rgba(8,20,39,.98));
}

.withdraw-layout {
  gap: 20px;
}

/* ---------- FAQ / CONTENT PAGES ---------- */

.faq-intro,
.faq-card {
  padding: 22px;
}

.faq-card {
  margin-bottom: 14px;
}

.faq-answer {
  line-height: 1.8;
}

.container {
  max-width: 1200px;
}

footer {
  border-top: 1px solid var(--atb-line);
}

/* ---------- STATUS COLORS: PRESERVE MEANING ---------- */

.success,
.status-success,
.text-success {
  color: #63dfa8;
}

.danger,
.status-danger,
.text-danger {
  color: #ff858d;
}

.warning,
.status-warning,
.text-warning {
  color: #ffd27a;
}

/* ---------- RTL / ARABIC ---------- */

[dir="rtl"] {
  text-align: right;
}

[dir="rtl"] th,
[dir="rtl"] td {
  text-align: inherit;
}

/* ---------- RESPONSIVE ---------- */

@media (max-width: 900px) {
  .dashboard,
  .admin-page,
  .tasks-page,
  .market-container,
  .profile-page,
  .team-page,
  .support-page,
  .withdraw-page,
  .faq-container {
    width: min(100% - 24px, 100%);
  }

  .dash-grid,
  .admin-grid,
  .tasks-grid {
    gap: 14px;
  }
}

@media (max-width: 600px) {
  .card,
  .panel,
  .admin-card,
  .dash-card,
  .task-card,
  .profile-card,
  .support-card,
  .team-card,
  .withdraw-card,
  .auth-card {
    border-radius: 15px;
  }

  .dash-card,
  .admin-card,
  .task-card,
  .profile-card,
  .support-card,
  .team-card,
  .withdraw-card {
    padding: 17px;
  }

  .admin-page .panel {
    padding: 16px;
  }

  .auth-wrap {
    padding: 18px 12px;
  }

  .withdraw-hero {
    padding: 19px;
  }

  table {
    font-size: .9rem;
  }
}

/* ---------- ACCESSIBILITY ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}