/* ==========================================================================
   Admin/Dashboard styles — matches your site's theme/colors
   Uses CSS variables already defined in styles.css from your index.html
   ========================================================================== */

html, body {
  background: #000000 !important;
  color: #ffffff;
}

/* Much wider layout: nearly full-viewport width */
.admin-section{
  width: 98vw;                 /* fills almost the whole viewport width */
  max-width: 100vw;            /* no cap */
  margin: 24px auto;
  padding: 36px 20px;
  border-radius: 20px;
  box-sizing: border-box;
  color: #fff;
  background: linear-gradient(180deg, var(--bg-800) 0%, var(--bg-700) 100%);
}

/* --------------------------------------------------------------------------
   HEADING — solid, high-contrast, always readable + tasteful design accents
   -------------------------------------------------------------------------- */
.fancy-heading{
  text-align: center !important;
  margin: 0 auto 10px;
  font-weight: 900;
  letter-spacing: 0.4px;
  line-height: 1.15;
  font-size: 36px;
  color: #E9ECFF;                           /* <<< crisp, readable color */
  text-shadow:
    0 1px 0 rgba(255,255,255,.08),
    0 10px 28px rgba(108,99,255,.28);       /* subtle glow for dark bg */
  position: relative;
}

/* decorative glow/shine behind the heading */
.fancy-heading::before{
  content:"";
  position:absolute; left:50%; top:-18px;
  width: 42vw; max-width: 560px; height: 34px;
  transform: translateX(-50%);
  filter: blur(22px);
  background:
    radial-gradient(60% 60% at 50% 60%, rgba(108,99,255,.22) 0%, rgba(108,99,255,0) 70%);
  pointer-events: none;
}

/* animated underline bar */
.fancy-heading::after{
  content: "";
  display: block;
  width: 150px;
  height: 5px;
  margin: 12px auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #aeb7ff, var(--accent), #aeb7ff);
  background-size: 200% 100%;
  box-shadow: 0 8px 24px rgba(108,99,255,.35);
  animation: headingBar 5s linear infinite;
}
@keyframes headingBar{
  0%{ background-position: 0% 50%; }
  100%{ background-position: 200% 50%; }
}

.heading-sub{
  text-align: center !important;
  color: var(--text-300);
  margin-bottom: 18px;
}

/* When locked (not logged in) */
.admin-locked-note{
  margin: 16px auto 0;
  padding: 16px;
  width: 100%;
  max-width: 720px;
  border: 1px dashed rgba(255,255,255,.15);
  border-radius: 12px;
  text-align: center;
  color: var(--text-300);
}
.admin-locked-note i{ color: var(--accent); margin-right: 8px; }

/* Alerts */
.admin-alert{
  display:flex; align-items:center; gap:10px;
  padding:12px 14px;
  border-radius:12px;
  background: rgba(255,255,255,.06);
  color:#fff;
  margin:10px 0 18px;
}
.admin-alert--error{
  border:1px solid rgba(255,0,0,.35);
  background: linear-gradient(180deg, rgba(255,0,0,.12), rgba(255,0,0,.06));
}

/* Tools / meta (Total + buttons on the same row) */
.table-tools{
  display:flex;
  align-items:center;
  justify-content: space-between;   /* spread left/right */
  gap:10px;
  margin-bottom:12px;
  padding: 6px 4px;
}
.table-count{ color:var(--text-300); font-size: 15px; }

.btn-action{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 800;
  background: var(--accent);
  color: #fff !important;
  box-shadow: 0 8px 22px rgba(108,99,255,.35);
  transition: background .2s ease, transform .06s ease, box-shadow .2s ease;
  white-space: nowrap;
}
.btn-action:hover{
  background: var(--accent-600);
  box-shadow: 0 10px 26px rgba(108,99,255,.45);
}
.btn-action:active{ transform: translateY(1px); }
.btn-download i, .btn-logout i{ font-size: 14px; }

/* Wider table container */
.table-wrap{
  width: 100%;
  overflow:auto;
  border:1px solid rgba(255,255,255,.08);
  border-radius:14px;
  background: rgba(0,0,0,.2);
  box-shadow: 0 12px 30px rgba(0,0,0,.35);
}

/* Data table (very wide min-width so columns breathe) */
.admin-table{
  width:100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 1600px; /* wide to prevent cramped columns */
  font-size: 14px;
}
.admin-table thead th{
  position:sticky; top:0;
  background: linear-gradient(180deg, #161b33, #0d1122);
  color:#fff;
  text-align:left;
  padding:12px 14px;
  font-weight:800;
  border-bottom:1px solid rgba(255,255,255,.08);
  z-index:1;
}
.admin-table tbody td{
  padding:12px 14px;
  color:#eaeafa;
  border-bottom:1px solid rgba(255,255,255,.06);
  vertical-align: top;
}
.admin-table tbody tr:nth-child(even) td{
  background: rgba(255,255,255,.02);
}
/* Row hover effect for readability */
.admin-table tbody tr:hover td{
  background: rgba(108,99,255,.08);
  transition: background .15s ease;
}
.admin-table .empty-row{
  text-align:center;
  color:var(--text-300);
}

/* Links in table */
.link-out{
  color:#cfd6ff;
  text-decoration: underline;
  word-break: break-all;
}
.link-out:hover{ color:#ffffff; }

/* Pagination controls */
.pagination-controls{
  margin-top: 14px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 12px;
}
.pager-status{ color: var(--text-300); font-size: 14px; }
.pager-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 14px;
  border-radius:999px;
  background: rgba(255,255,255,.08);
  color:#fff;
  text-decoration:none;
  font-weight:700;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
  transition: background .2s ease, transform .06s ease;
}
.pager-btn:hover{ background: rgba(255,255,255,.14); }
.pager-btn:active{ transform: translateY(1px); }
.pager-btn.disabled{ opacity:.45; pointer-events:none; }

/* Login overlay popup */
.login-overlay{
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 40% 20%, rgba(108,99,255,.12), rgba(0,0,0,.85));
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  z-index: 5000;
}

.login-card{
  width: 100%;
  max-width: 420px;
  color: #fff;
  background: linear-gradient(180deg, rgba(21,26,46,.95), rgba(13,17,34,.92));
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,.65), 0 0 0 6px rgba(108,99,255,.15);
}

.login-card__header{
  text-align:center;
  margin-bottom: 14px;
}
.login-card__header i{
  font-size: 34px;
  color: var(--accent);
}
.login-card__header h3{
  margin: 8px 0 6px;
  font-weight: 800;
}
.login-card__header p{
  margin: 0;
  color: var(--text-400);
  font-size: 14px;
}

.login-error{
  display:flex; align-items:center; gap:8px;
  background: linear-gradient(180deg, rgba(255,0,0,.16), rgba(255,0,0,.10));
  border:1px solid rgba(255,0,0,.35);
  padding:10px 12px;
  border-radius:12px;
  color:#fff;
  margin: 10px 0 12px;
  font-size:14px;
}

.login-field{ margin-top: 10px; }
.login-field label{
  display:block;
  font-weight:700;
  margin-bottom:6px;
  font-size:14px;
}
.input-wrap{
  position:relative;
  display:flex; align-items:center; gap:8px;
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.10);
  border-radius:12px;
  padding:10px 12px;
}
.input-wrap i{ color: var(--accent); }
.input-wrap input{
  width: 100%;
  background: transparent;
  border: 0;
  color: #fff;
  outline: none;
  font-size: 15px;
}
.toggle-pass{
  border:0; background: transparent; color:#cfd6ff; cursor:pointer;
}
.toggle-pass:hover{ color:#fff; }

.hint.creds{
  margin-top:6px;
  color:var(--text-400);
  font-size:12px;
}

.login-submit{
  width: 100%;
  margin-top: 14px;
  padding: 12px 16px;
  border:0;
  border-radius: 14px;
  color:#fff;
  background: var(--accent);
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(108,99,255,.35);
  transition: transform .06s ease, background .2s ease, box-shadow .2s ease;
}
.login-submit:hover{
  background: var(--accent-600);
  box-shadow: 0 10px 26px rgba(108,99,255,.45);
}
.login-submit:active{ transform: translateY(1px); }

.login-foot{ margin-top:10px; text-align:center; }
.mini-link{
  color:#cfd6ff; text-decoration:underline; font-size:12px;
}
.mini-link:hover{ color:#fff; }

/* Mobile */
@media (max-width: 768px){
  .admin-section{
    width:100%;
    margin:16px 0;
    border-radius:0;
    padding:28px 12px;
  }
  .table-wrap{ border-radius:0; }
  .admin-table{ font-size:13px; min-width:1200px; } /* wide, scrolls horizontally */
  .login-card{ margin: 0 16px; }
}
