/* ============================================================
   CAWFA – Admin Dashboard Styles (Responsive + Link Icon)
   Prefix: .ad-
   ============================================================ */

.ad-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding-top: 6rem;
  padding-bottom: 4rem;
}

.ad-wrapper::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(circle at top left, #272727 0%, #000000 40%, #1a1a1a 100%);
  background-attachment: fixed;
}

.ad-wrapper .container {
  position: relative;
  z-index: 1;
  max-width: 1200px;
}

/* -----------------------------
   HEADER
----------------------------- */
.ad-header {
  margin-bottom: 1.5rem;
}
.ad-title {
  font-weight: 800;
  font-size: 2rem;
  color: #fff;
}
.ad-subtitle {
  color: #aaa;
  font-size: 0.95rem;
}
.ad-header-actions .btn {
  min-width: 140px;
}

/* -----------------------------
   BUTTONS
----------------------------- */
.ad-btn-primary,
.ad-btn-secondary {
  border-radius: 999px;
  padding: 0.55rem 1.6rem;
  font-weight: 600;
  border: none;
  transition: 0.3s;
}
.ad-btn-primary {
  background: #D90404;
  color: #fff;
}
.ad-btn-primary:hover {
  background: #730707;
}
.ad-btn-secondary {
  background: #730707;
  color: #fff;
}
.ad-btn-secondary:hover {
  background: #D90404;
  color: #fff;
}

/* -----------------------------
   CARD
----------------------------- */
.ad-card {
  background: rgba(0,0,0,0.92);
  border-radius: 14px;
  padding: 1.8rem;
  border: 1px solid #262626;
  box-shadow: 0 6px 23px rgba(0,0,0,0.7);
}
.ad-card-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
}
.ad-card-subtitle {
  font-size: 0.9rem;
  color: #999;
}
.ad-card-tools {
  gap: 0.75rem;
}

/* -----------------------------
   TOTAL USERS BADGE
----------------------------- */
.ad-total-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.8rem;
  border-radius: 999px;
  background: #111;
  border: 1px solid #333;
  font-size: 0.85rem;
  color: #ccc;
}
.ad-total-pill strong {
  margin-left: 0.25rem;
  color: #fff;
}

/* -----------------------------
   TABLE WRAPPER
----------------------------- */
.ad-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin-top: 0.6rem;
  border-radius: 10px;
  scrollbar-width: thin;
  scrollbar-color: #444 #111;
}
.ad-table-wrap::-webkit-scrollbar {
  height: 8px;
}
.ad-table-wrap::-webkit-scrollbar-thumb {
  background-color: #444;
  border-radius: 4px;
}
.ad-table-wrap::-webkit-scrollbar-track {
  background: #111;
}

/* -----------------------------
   TABLE BASE
----------------------------- */
.ad-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  color: #ddd;
  font-size: 0.93rem;
  margin-bottom: 0;
}

.ad-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #101010;
  border-bottom: 1px solid #333;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  padding: 0.75rem 1rem;
}

.ad-table tbody td {
  background-color: #050505;
  color: #f5f5f5;
  border-bottom: 1px solid #1f1f1f;
  padding: 0.7rem 1rem;
  vertical-align: middle;
}
.ad-table tbody tr:nth-child(even) td {
  background-color: #0b0b0b;
}
.ad-table tbody tr:hover td {
  background-color: #181818;
  color: #fff;
}

/* -----------------------------
   LINK (USERNAME)
----------------------------- */
.ad-link {
  color: #d90404;
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: 0.25s;
}
.ad-link i {
  font-size: 1rem;
  color: #d90404;
  opacity: 0.85;
  transition: 0.25s;
}
.ad-link:hover {
  color: #ff3d3d;
  text-decoration: underline;
}
.ad-link:hover i {
  color: #ff3d3d;
  opacity: 1;
}

/* -----------------------------
   ACTION BUTTONS
----------------------------- */
.ad-actions {
  text-align: right;
  white-space: nowrap;
}
.ad-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid #333;
  background: #000;
  color: #f2f2f2;
  margin-left: 6px;
  cursor: pointer;
  transition: 0.25s;
  font-size: 1rem;
}
.ad-action-btn.delete-user {
  color: #ff4d4d;
  border-color: #5a1e1e;
}
.ad-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  background: #1a1a1a;
}

/* -----------------------------
   PAGINATION
----------------------------- */
.ad-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
  align-items: center;
  margin-top: 1rem;
}
.ad-page-item {
  min-width: 34px;
  height: 34px;
  padding: 0 0.75rem;
  border-radius: 999px;
  border: 1px solid #333;
  background: #050505;
  color: #eee;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.2s;
  user-select: none;
}
.ad-page-item:hover {
  background: #202020;
}
.ad-page-item.ad-page-active {
  background: #D90404;
  border-color: #D90404;
  color: #fff;
}
.ad-page-item.ad-page-disabled {
  opacity: 0.4;
  cursor: default;
}

/* -----------------------------
   RESPONSIVE (≤768px)
----------------------------- */
@media (max-width: 768px) {
  .ad-wrapper {
    padding-top: 4.5rem;
    padding-bottom: 3rem;
  }

  .ad-header {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 1rem;
  }

  .ad-header-actions {
    width: 100%;
  }
  .ad-header-actions .btn {
    width: 100%;
    text-align: center;
  }

  .ad-card {
    padding: 1.2rem;
  }

  .ad-card-tools {
    flex-direction: column;
    align-items: flex-end;
    gap: .4rem;
  }

  .ad-total-pill {
    width: 100%;
    justify-content: flex-end;
  }

  /* Mobilde tablo kaydırılabilir */
  .ad-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-height: none;
  }

  .ad-table {
    min-width: 600px;
    font-size: 0.85rem;
  }

  .ad-pagination {
    justify-content: center;
  }
}
