/* ==========================================================================
   Hanton Hub — Site theme
   Modern dark UI shared across the whole site: the media dashboard
   (home/index.php) plus generic components (buttons, forms, tables, auth).
   ========================================================================== */

:root {
  --bg:            #07080c;
  --bg-glow-a:     rgba(6, 184, 107, .16);
  --bg-glow-b:     rgba(56, 189, 248, .10);
  --surface:       rgba(255, 255, 255, .035);
  --surface-solid: #101219;
  --surface-hover: rgba(255, 255, 255, .06);
  --border:        rgba(255, 255, 255, .09);
  --border-strong: rgba(255, 255, 255, .16);

  --text:          #eceef5;
  --muted:         #949cb0;
  --muted-dim:     #6b7285;

  --accent:        #20c97a;
  --accent-strong: #06b86b;
  --accent-soft:   rgba(32, 201, 122, .14);
  --danger:        #f2545b;

  --radius-sm: 10px;
  --radius:    16px;
  --radius-lg: 22px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow:    0 14px 40px rgba(0, 0, 0, .45);
  --shadow-lg: 0 30px 70px rgba(0, 0, 0, .55);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background-color: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Ambient background glows -------------------------------------------------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(60% 45% at 12% -5%, var(--bg-glow-a), transparent 70%),
    radial-gradient(55% 40% at 95% 0%, var(--bg-glow-b), transparent 70%),
    radial-gradient(80% 60% at 50% 120%, rgba(32, 201, 122, .07), transparent 70%);
  pointer-events: none;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(70% 55% at 50% 0%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(70% 55% at 50% 0%, #000 0%, transparent 75%);
  pointer-events: none;
}

a { color: inherit; text-decoration: none; }
img { display: block; }
::selection { background: var(--accent-soft); }

/* Scrollbar ---------------------------------------------------------------- */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .12);
  border-radius: 99px;
  border: 3px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, .22); background-clip: content-box; }

/* ============================ Top bar ==================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: .85rem clamp(1rem, 4vw, 2.75rem);
  background: rgba(8, 9, 13, .72);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  font-weight: 700;
  letter-spacing: .04em;
  font-size: 1.05rem;
  white-space: nowrap;
}
.brand .mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: .95rem;
  color: #04120b;
  background: linear-gradient(140deg, var(--accent), var(--accent-strong));
  box-shadow: 0 6px 18px rgba(32, 201, 122, .35);
}
.brand .name { color: var(--text); }
.brand .name span { color: var(--accent); }

.topnav {
  display: flex;
  align-items: center;
  gap: .25rem;
  margin-left: auto;
}
.topnav a {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .5rem .8rem;
  border-radius: 99px;
  font-size: .875rem;
  font-weight: 500;
  color: var(--muted);
  transition: background .18s, color .18s;
}
.topnav a:hover { color: var(--text); background: var(--surface-hover); }
.topnav a.primary { color: var(--accent); }
.topnav a.primary:hover { background: var(--accent-soft); }
.topnav .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }

.user-chip {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .35rem .35rem .35rem .8rem;
  border: 1px solid var(--border);
  border-radius: 99px;
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: border-color .18s, background .18s;
}
a.user-chip:hover { background: var(--surface-hover); border-color: var(--border-strong); }
.user-chip .who { font-size: .82rem; font-weight: 600; color: var(--muted); }
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: .8rem;
  font-weight: 700;
  color: #04120b;
  background: linear-gradient(140deg, var(--accent), var(--accent-strong));
}

/* ============================ Layout ===================================== */
.shell {
  max-width: 1360px;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1rem, 4vw, 2.75rem) 5rem;
}

.hero { padding: .5rem 0 2.25rem; max-width: 820px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(32, 201, 122, .25);
  padding: .35rem .7rem;
  border-radius: 99px;
  margin-bottom: 1.15rem;
}
.hero h1 {
  font-size: clamp(1.9rem, 4.6vw, 3.05rem);
  line-height: 1.06;
  letter-spacing: -.03em;
  font-weight: 700;
  margin-bottom: .7rem;
}
.hero h1 .grad {
  background: linear-gradient(100deg, var(--accent), #7ef0b4 60%, #38bdf8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p { color: var(--muted); font-size: clamp(.95rem, 1.6vw, 1.05rem); line-height: 1.6; max-width: 620px; }

/* ============================ Search ===================================== */
.search-panel {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .02));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.segmented {
  display: inline-flex;
  gap: .25rem;
  padding: .3rem;
  background: rgba(0, 0, 0, .35);
  border: 1px solid var(--border);
  border-radius: 99px;
  margin-bottom: 1rem;
}
.seg-btn {
  border: 0;
  cursor: pointer;
  font: inherit;
  font-size: .875rem;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  padding: .5rem 1.1rem;
  border-radius: 99px;
  transition: color .18s, background .18s, box-shadow .18s;
}
.seg-btn:hover { color: var(--text); }
.seg-btn.active {
  color: #04120b;
  background: linear-gradient(140deg, var(--accent), var(--accent-strong));
  box-shadow: 0 6px 16px rgba(32, 201, 122, .3);
}

.search-bar {
  display: flex;
  align-items: center;
  gap: .6rem;
  background: rgba(0, 0, 0, .42);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: .45rem .45rem .45rem 1rem;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.search-bar:focus-within {
  border-color: rgba(32, 201, 122, .55);
  box-shadow: 0 0 0 4px var(--accent-soft);
  background: rgba(0, 0, 0, .55);
}
.search-bar .icon { flex: none; color: var(--muted-dim); }
.search-bar input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 1.02rem;
  padding: .7rem 0;
}
.search-bar input::placeholder { color: var(--muted-dim); }
.search-bar button {
  flex: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  font-size: .95rem;
  color: #04120b;
  background: linear-gradient(140deg, var(--accent), var(--accent-strong));
  padding: .75rem 1.6rem;
  border-radius: 12px;
  transition: transform .15s, box-shadow .2s, filter .2s;
  box-shadow: 0 8px 22px rgba(32, 201, 122, .28);
}
.search-bar button:hover { filter: brightness(1.06); box-shadow: 0 10px 26px rgba(32, 201, 122, .4); }
.search-bar button:active { transform: translateY(1px) scale(.99); }

.search-hints {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .9rem;
}
.hint {
  font-size: .76rem;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: .3rem .6rem;
  border-radius: 8px;
}
.hint b { color: var(--accent); font-weight: 600; }

/* ============================ Stats ===================================== */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .8rem;
  margin-top: 1.4rem;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .9rem 1rem;
}
.stat .k { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-dim); margin-bottom: .35rem; }
.stat .v { font-size: 1.15rem; font-weight: 700; letter-spacing: -.01em; }
.stat .v.green { color: var(--accent); }

/* ============================ Section heads ============================= */
.section { margin-top: 3rem; }
.section-head {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.2rem;
}
.section-head h2 { font-size: 1.15rem; font-weight: 650; letter-spacing: -.01em; }
.section-head .count {
  font-size: .74rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 99px;
  padding: .2rem .55rem;
}
.section-head .spacer { flex: 1; }

/* ============================ Media grid =============================== */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
  gap: 1.15rem;
}

.media-card {
  position: relative;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .25s cubic-bezier(.2, .7, .3, 1), box-shadow .25s, border-color .25s;
  animation: cardIn .45s cubic-bezier(.2, .7, .3, 1) both;
}
.media-card:hover {
  transform: translateY(-6px);
  border-color: rgba(32, 201, 122, .45);
  box-shadow: var(--shadow-lg);
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.poster-wrap { position: relative; aspect-ratio: 2 / 3; overflow: hidden; background: #0b0d12; }
.media-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s cubic-bezier(.2, .7, .3, 1), filter .35s;
}
.media-card:hover .media-poster { transform: scale(1.06); }
.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .35) 0%, transparent 32%, rgba(0, 0, 0, .82) 100%);
  pointer-events: none;
}

.poster-badges {
  position: absolute;
  top: .6rem;
  left: .6rem;
  right: .6rem;
  display: flex;
  justify-content: space-between;
  gap: .4rem;
  z-index: 2;
}
.badge {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: .28rem .5rem;
  border-radius: 7px;
  color: #eafff3;
  background: rgba(6, 184, 107, .9);
  backdrop-filter: blur(4px);
}
.badge.ghost { background: rgba(0, 0, 0, .55); color: var(--text); border: 1px solid var(--border-strong); }

.media-info { padding: .85rem .9rem 1rem; position: relative; z-index: 2; }
.media-title {
  font-size: .92rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: .35rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.media-meta { font-size: .76rem; color: var(--muted); margin-bottom: .2rem; }
.media-meta.media-sep { color: var(--accent); font-weight: 500; }

.download-btn {
  width: 100%;
  margin-top: .7rem;
  border: 1px solid var(--border-strong);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  font-size: .82rem;
  color: var(--text);
  background: var(--surface);
  padding: .6rem;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  transition: background .18s, border-color .18s, color .18s, transform .12s;
}
.download-btn:hover {
  background: linear-gradient(140deg, var(--accent), var(--accent-strong));
  border-color: transparent;
  color: #04120b;
}
.download-btn:active { transform: scale(.985); }

/* ============================ Loader / empty ============================ */
.loader {
  display: none;
  justify-content: center;
  align-items: center;
  gap: .8rem;
  padding: 3rem 0;
}
.loader h1 { font-size: .9rem; font-weight: 500; color: var(--muted); }
.loader::before {
  content: "";
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .12);
  border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.noRes {
  display: none;
  text-align: center;
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.6;
  padding: 2.75rem 1.25rem;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  margin-top: .5rem;
}

/* ============================ Sidebar / queue =========================== */
.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 2rem;
  align-items: start;
}
.sidebar { position: sticky; top: 88px; display: grid; gap: 1.25rem; margin-top: 3rem; }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
}
.panel h3 {
  font-size: .74rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted-dim);
  margin-bottom: .9rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.panel h3 .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }

/* Leaderboard */
.user-ranking ul { list-style: none; display: grid; gap: .45rem; }
.user-ranking li {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .85rem;
  padding: .45rem .55rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, .02);
  border: 1px solid transparent;
  transition: border-color .18s, background .18s;
}
.user-ranking li:hover { border-color: var(--border); background: var(--surface-hover); }
.user-ranking .rank {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-size: .72rem;
  font-weight: 700;
  color: var(--muted);
  background: rgba(255, 255, 255, .06);
}
.user-ranking li:nth-child(1) .rank { color: #1c1400; background: linear-gradient(140deg, #ffd76a, #f5a623); }
.user-ranking li:nth-child(2) .rank { color: #10141b; background: linear-gradient(140deg, #e6ecf5, #b7c2d0); }
.user-ranking li:nth-child(3) .rank { color: #1c0f04; background: linear-gradient(140deg, #e2a06a, #c07a3f); }
.user-ranking .who { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-ranking .who.topg { font-weight: 700; }
.user-ranking .dl { font-size: .78rem; font-weight: 700; color: var(--accent); }
.user-ranking .dl small { color: var(--muted-dim); font-weight: 500; }

/* Storage */
.sizeDisk { list-style: none; display: grid; gap: .6rem; }
.sizeDisk li { display: flex; justify-content: space-between; font-size: .84rem; color: var(--muted); }
.sizeDisk li b { color: var(--text); font-weight: 600; }
.storage-bar { height: 7px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; margin-top: .2rem; }
.storage-bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #7ef0b4); }

/* Active downloads queue */
.queue-section { display: grid; gap: .7rem; }
.queue-item {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .7rem .8rem;
}
.queue-title { font-size: .83rem; font-weight: 600; margin-bottom: .45rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.progress-eta { font-size: .72rem; color: var(--muted); margin-bottom: .45rem; }
.progress-bar { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .09); overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent-strong), var(--accent)); border-radius: 99px; transition: width .5s ease; }
.progress-fill a { font-size: .68rem; color: #04120b; font-weight: 700; text-decoration: none; padding-left: .4rem; }
.queue-empty { font-size: .82rem; color: var(--muted-dim); }

/* ============================ Responsive =============================== */
@media (max-width: 1040px) {
  .dash-grid { grid-template-columns: 1fr; }
  .sidebar { position: static; grid-template-columns: 1fr 1fr; margin-top: 0; }
}
@media (max-width: 720px) {
  .topbar { flex-wrap: wrap; gap: .6rem; padding: .75rem 1rem; }
  .brand { margin-right: auto; }
  .topnav {
    order: 3;
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .topnav::-webkit-scrollbar { display: none; }
  .topnav .label { display: inline; }
  .user-chip .who { display: none; }
  .stats { grid-template-columns: 1fr; }
  .sidebar { grid-template-columns: 1fr; }
  .media-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .85rem; }
  .search-bar { flex-wrap: wrap; }
  .search-bar button { width: 100%; }
}

/* ==========================================================================
   Generic site components — shared by every page
   ========================================================================== */

/* Page shell ---------------------------------------------------------------- */
.wrap { max-width: 1180px; margin: 0 auto; padding: clamp(1.25rem, 3vw, 2.5rem) clamp(1rem, 4vw, 2rem) 4rem; }
.wrap-narrow { max-width: 760px; }
.wrap-auth { min-height: calc(100vh - 90px); display: grid; place-items: center; padding: 1.5rem 1rem 4rem; }

.page-head { margin: .5rem 0 1.75rem; }
.page-head h1 { font-size: clamp(1.5rem, 3.2vw, 2.15rem); font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.page-head p { color: var(--muted); margin-top: .45rem; font-size: .95rem; line-height: 1.55; max-width: 620px; }
.crumb { display: inline-flex; align-items: center; gap: .4rem; font-size: .78rem; color: var(--muted-dim); margin-bottom: .6rem; letter-spacing: .02em; }
.crumb a { color: var(--accent); }
.crumb a:hover { text-decoration: underline; }

/* Buttons ------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: inherit; font-weight: 600; font-size: .9rem; padding: .65rem 1.15rem;
  border-radius: 11px; border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--text); cursor: pointer; transition: background .18s, border-color .18s, filter .18s, transform .12s;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--surface-hover); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(140deg, var(--accent), var(--accent-strong)); color: #04120b; border-color: transparent; box-shadow: 0 8px 22px rgba(32, 201, 122, .26); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-danger { background: rgba(242, 84, 91, .12); border-color: rgba(242, 84, 91, .38); color: #ffb3b8; }
.btn-danger:hover { background: rgba(242, 84, 91, .22); }
.btn-ghost { background: transparent; }
.btn-sm { padding: .45rem .8rem; font-size: .8rem; border-radius: 9px; }
.btn-block { width: 100%; }

/* Forms --------------------------------------------------------------------- */
.form { display: grid; gap: 1rem; }
.field { display: grid; gap: .4rem; }
.field > label { font-size: .78rem; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.input,
.form input[type="text"],
.form input[type="password"],
.form input[type="email"],
.form input[type="number"],
.form input[type="search"],
.form select,
.form textarea {
  width: 100%; font: inherit; font-size: .95rem; color: var(--text);
  background: rgba(0, 0, 0, .42); border: 1px solid var(--border-strong);
  border-radius: 11px; padding: .7rem .9rem; outline: 0;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.form input::placeholder, .input::placeholder, .form textarea::placeholder { color: var(--muted-dim); }
.form input:focus, .form select:focus, .form textarea:focus, .input:focus {
  border-color: rgba(32, 201, 122, .55); box-shadow: 0 0 0 4px var(--accent-soft); background: rgba(0, 0, 0, .55);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.form-actions { display: flex; flex-wrap: wrap; gap: .7rem; }
.check { display: inline-flex; align-items: center; gap: .5rem; font-size: .85rem; color: var(--muted); cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }

/* Panels -------------------------------------------------------------------- */
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.panel-title { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-dim); font-weight: 600; }
.divider { height: 1px; background: var(--border); border: 0; margin: 1.25rem 0; }
.stack { display: grid; gap: 1.25rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-items: start; }

/* Tables -------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table.data-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.data-table thead th {
  text-align: left; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted-dim); font-weight: 600; padding: .75rem .9rem; white-space: nowrap;
  border-bottom: 1px solid var(--border); background: rgba(255, 255, 255, .02);
}
.data-table tbody td { padding: .7rem .9rem; border-bottom: 1px solid rgba(255, 255, 255, .05); color: var(--text); font-weight: 500; white-space: nowrap; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: rgba(255, 255, 255, .03); }
.data-table td.num { color: var(--muted-dim); font-variant-numeric: tabular-nums; }
.data-table td.accent { color: var(--accent); font-weight: 600; }

/* Alerts -------------------------------------------------------------------- */
.alert { border-radius: var(--radius-sm); padding: .8rem 1rem; font-size: .88rem; line-height: 1.5; border: 1px solid var(--border); background: var(--surface); }
.alert-error { border-color: rgba(242, 84, 91, .4); background: rgba(242, 84, 91, .1); color: #ffb3b8; }
.alert-ok { border-color: rgba(32, 201, 122, .4); background: var(--accent-soft); color: #bff5d8; }

/* Pills / badges ------------------------------------------------------------ */
.badge-soft { display: inline-flex; align-items: center; gap: .35rem; font-size: .7rem; font-weight: 700; padding: .25rem .55rem; border-radius: 99px; background: var(--surface-hover); color: var(--muted); border: 1px solid var(--border); }
.badge-soft.on { background: var(--accent-soft); color: var(--accent); border-color: rgba(32, 201, 122, .35); }

/* Auth (login / reset) ------------------------------------------------------ */
.auth-card {
  width: 100%; max-width: 430px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .02));
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: clamp(1.4rem, 3vw, 2rem); box-shadow: var(--shadow); backdrop-filter: blur(10px);
}
.auth-brand { display: flex; align-items: center; justify-content: center; gap: .6rem; margin-bottom: 1.35rem; }
.auth-brand .name { font-weight: 700; letter-spacing: .04em; }
.auth-brand .name span { color: var(--accent); }
.auth-tabs { display: flex; gap: .25rem; padding: .3rem; background: rgba(0, 0, 0, .35); border: 1px solid var(--border); border-radius: 99px; margin-bottom: 1.35rem; }
.auth-tabs button { flex: 1; border: 0; cursor: pointer; font: inherit; font-size: .82rem; font-weight: 600; color: var(--muted); background: transparent; padding: .5rem; border-radius: 99px; transition: color .18s, background .18s; }
.auth-tabs button:hover { color: var(--text); }
.auth-tabs button.active { color: #04120b; background: linear-gradient(140deg, var(--accent), var(--accent-strong)); }
.auth-title { font-size: 1.2rem; font-weight: 700; text-align: center; margin-bottom: .3rem; }
.auth-sub { text-align: center; color: var(--muted); font-size: .85rem; margin-bottom: 1.25rem; line-height: 1.5; }
.auth-form { display: none; }
.auth-form.active { display: block; }
.auth-alt { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 1.1rem; font-size: .82rem; }
.auth-alt a { color: var(--accent); cursor: pointer; }
.auth-alt a:hover { text-decoration: underline; }

/* Misc ---------------------------------------------------------------------- */
.muted { color: var(--muted); }
.center { text-align: center; }
.empty-state { text-align: center; color: var(--muted-dim); padding: 2rem 1rem; font-size: .9rem; border: 1px dashed var(--border-strong); border-radius: var(--radius); }
.embed-frame { width: 100%; min-height: 620px; border: 1px solid var(--border); border-radius: var(--radius); background: #0b0d12; }
.footer { text-align: center; color: var(--muted-dim); font-size: .78rem; padding: 2rem 1rem 3rem; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--accent); }
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; }

@media (max-width: 720px) {
  .form-grid, .grid-2 { grid-template-columns: 1fr; }
}

/* Register tool — cash report ------------------------------------------------ */
.report-item { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-bottom: 1px solid var(--border); font-size: .86rem; color: var(--muted); }
.report-item:last-child { border-bottom: 0; }
.report-item > span:last-child { color: var(--text); font-variant-numeric: tabular-nums; }
.report-total { display: flex; justify-content: space-between; gap: 1rem; padding: .85rem 0 .2rem; margin-top: .5rem; font-size: 1.05rem; font-weight: 700; color: var(--accent); border-top: 2px solid var(--border-strong); font-variant-numeric: tabular-nums; }
.report-total + .report-total { padding-top: .5rem; margin-top: .5rem; border-top: 1px solid var(--border); }

/* Profile — download-history status line ------------------------------------ */
.progressTorrent { color: var(--accent); font-weight: 600; }

/* ── Ads ──────────────────────────────────────────────────────────────────── */

.ad-banner {
  display: flex;
  justify-content: center;
  margin: 1.5rem 0;
  min-height: 90px;
}

.ad-banner > * {
  max-width: 100%;
}

/* Clickable Direct Link ad */
.ad-direct {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .85rem 1.25rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(32, 201, 122, .10), rgba(56, 189, 248, .08));
  border: 1px solid var(--border-strong);
  font-size: .84rem;
  font-weight: 500;
  color: var(--muted);
  transition: background .15s, border-color .15s, color .15s;
}

.ad-direct:hover {
  background: linear-gradient(135deg, rgba(32, 201, 122, .18), rgba(56, 189, 248, .12));
  border-color: rgba(32, 201, 122, .35);
  color: var(--text);
}

.ad-direct-label {
  flex: 1;
  text-align: center;
}

.ad-direct-arrow {
  flex-shrink: 0;
  color: var(--accent);
  font-weight: 600;
}

/* Sidebar ad — compact */
.ad-sidebar {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
}

/* VPN affiliate banner */
.ad-vpn {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .7rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(32, 201, 122, .08);
  border: 1px solid rgba(32, 201, 122, .18);
  font-size: .82rem;
  color: var(--muted);
  transition: background .15s, border-color .15s;
}

.ad-vpn:hover {
  background: rgba(32, 201, 122, .14);
  border-color: rgba(32, 201, 122, .32);
  color: var(--text);
}

.ad-vpn-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.ad-vpn-text {
  flex: 1;
  font-weight: 500;
}

.ad-vpn-arrow {
  flex-shrink: 0;
  color: var(--accent);
  font-weight: 600;
}

.ad-panel {
  margin-top: 1rem;
  padding: 0;
}

.ad-panel .ad-vpn {
  border-radius: var(--radius);
  border: none;
}

/* Sticky footer ad bar */
.ad-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: var(--surface-solid);
  border-top: 1px solid var(--border-strong);
  padding: 0;
}

.ad-footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 800px;
  margin: 0 auto;
  padding: .4rem .5rem;
  min-height: 50px;
  position: relative;
}

.ad-footer-close {
  position: absolute;
  right: .4rem;
  top: .2rem;
  background: none;
  border: none;
  color: var(--muted-dim);
  font-size: .75rem;
  cursor: pointer;
  padding: .2rem .4rem;
  border-radius: 4px;
}

.ad-footer-close:hover {
  color: var(--text);
  background: var(--surface-hover);
}
