*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", "Manrope", sans-serif;
  color: #eef5ff;
  background:
    radial-gradient(circle at 15% -5%, #114594 0%, transparent 28%),
    radial-gradient(circle at 90% 0%, #17386a 0%, transparent 32%),
    linear-gradient(145deg, #040913, #07142b 45%, #040d1d 100%);
}

.auth-page {
  display: grid;
  place-items: center;
  padding: 1.2rem;
}

.auth-shell {
  width: min(560px, 94vw);
}

.auth-card {
  border: 1px solid rgba(112, 161, 224, 0.24);
  border-radius: 1.3rem;
  padding: clamp(1rem, 3vw, 1.55rem);
  background:
    linear-gradient(160deg, rgba(16, 34, 66, 0.92), rgba(8, 18, 37, 0.96)),
    radial-gradient(circle at 25% -10%, rgba(90, 180, 255, 0.15), transparent 45%);
  box-shadow:
    0 24px 60px rgba(2, 9, 22, 0.58),
    inset 0 1px 0 rgba(170, 210, 255, 0.08);
}

.auth-badge {
  width: 4.1rem;
  height: 4.1rem;
  border-radius: 1.05rem;
  margin: 0 auto 0.95rem;
  display: grid;
  place-items: center;
  font-family: "Sora", "Segoe UI", sans-serif;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #8fc7ff;
  border: 1px solid rgba(106, 170, 245, 0.36);
  background: linear-gradient(160deg, rgba(29, 67, 119, 0.7), rgba(13, 33, 62, 0.72));
}

.auth-title {
  text-align: center;
  margin: 0;
  font-family: "Sora", "Segoe UI", sans-serif;
  font-size: clamp(1.5rem, 4.5vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.auth-subtitle {
  margin: 0.55rem 0 1.1rem;
  text-align: center;
  color: #a9c1de;
}

.auth-form {
  gap: 0.9rem;
}

.auth-form label {
  font-weight: 600;
  color: #c6daf1;
}

.auth-form input {
  min-height: 3rem;
  margin-top: 0.42rem;
  border-radius: 0.85rem;
  border-color: rgba(123, 175, 244, 0.24);
  background: rgba(19, 31, 53, 0.74);
  font-size: 1rem;
}

.auth-submit {
  margin-top: 0.25rem;
  width: 100%;
  min-height: 3.05rem;
  border-radius: 0.95rem;
  font-size: 1.05rem;
  font-weight: 800;
  background: linear-gradient(135deg, #69b4ff, #5e9ee0);
  color: #f2f8ff;
}

.auth-foot,
.auth-mini,
.auth-links {
  text-align: center;
}

.auth-foot {
  margin: 1.05rem 0 0;
  color: #adc4df;
}

.auth-foot a,
.auth-links a {
  color: #79c1ff;
  text-decoration: none;
  font-weight: 700;
}

.auth-mini {
  margin: 0.35rem 0 0;
  color: #7f9ec0;
  font-size: 0.92rem;
}

.auth-links {
  margin-top: 0.55rem;
}

.wrap {
  width: min(860px, 92vw);
  margin: 2.2rem auto;
}

.card {
  border: 1px solid rgba(112, 161, 224, 0.28);
  border-radius: 1rem;
  padding: 1rem;
  background: linear-gradient(160deg, rgba(13, 33, 66, 0.86), rgba(8, 21, 43, 0.9));
}

h1 {
  margin: 0 0 0.7rem;
}

.muted {
  color: #b7cae7;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.actions {
  display: flex;
  gap: 0.5rem;
}

a.btn,
button.btn {
  border: 0;
  border-radius: 999px;
  padding: 0.58rem 0.95rem;
  text-decoration: none;
  font-weight: 700;
  color: #0b1427;
  cursor: pointer;
  background: linear-gradient(135deg, #f1bd5d, #daa13a);
}

a.btn.secondary,
button.btn.secondary {
  color: #eef5ff;
  border: 1px solid rgba(112, 161, 224, 0.28);
  background: rgba(16, 43, 85, 0.45);
}

form.grid {
  display: grid;
  gap: 0.8rem;
}

label {
  color: #b7cae7;
  font-size: 0.92rem;
}

input,
select {
  margin-top: 0.25rem;
  width: 100%;
  max-width: 100%;
  display: block;
  border: 1px solid rgba(112, 161, 224, 0.28);
  border-radius: 0.68rem;
  background: rgba(6, 18, 41, 0.78);
  color: #eef5ff;
  padding: 0.6rem 0.7rem;
}

.flash {
  border-radius: 0.7rem;
  padding: 0.62rem 0.72rem;
  margin-bottom: 0.75rem;
}

.flash.error {
  border: 1px solid rgba(240, 128, 128, 0.4);
  background: rgba(170, 51, 51, 0.2);
}

.flash.success {
  border: 1px solid rgba(92, 221, 154, 0.4);
  background: rgba(32, 125, 87, 0.2);
}

.members-grid {
  margin-top: 1rem;
  display: grid;
  gap: 0.9rem;
  grid-template-columns: 1fr 1fr;
}

.panel {
  margin-top: 1rem;
}

.panel h3 {
  margin: 0 0 0.55rem;
}

.changelog-list {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.55rem;
}

.changelog-list p {
  margin: 0.2rem 0 0;
}

.upload-form {
  margin-top: 0.5rem;
}

.uploads-grid {
  margin-top: 0.7rem;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.upload-item {
  margin: 0;
  border: 1px solid rgba(112, 161, 224, 0.2);
  border-radius: 0.7rem;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(13, 30, 57, 0.78), rgba(7, 18, 36, 0.76));
  box-shadow: 0 9px 25px rgba(3, 10, 23, 0.35);
}

.upload-item a {
  display: block;
  line-height: 0;
}

.upload-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.upload-item figcaption {
  padding: 0.45rem 0.55rem 0.55rem;
  display: grid;
  gap: 0.2rem;
  font-size: 0.82rem;
}

.upload-actions {
  margin-top: 0.35rem;
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.upload-actions form {
  margin: 0;
}

.admin-wrap {
  width: min(1700px, 98vw);
}

.dashboard-page {
  background:
    radial-gradient(circle at 10% -10%, rgba(86, 147, 255, 0.22), transparent 34%),
    radial-gradient(circle at 100% 0%, rgba(38, 92, 170, 0.2), transparent 30%),
    linear-gradient(145deg, #030a16, #08162f 48%, #040d1d 100%);
}

.dashboard-shell {
  margin-top: 1.6rem;
  margin-bottom: 2.4rem;
}

.members-shell {
  width: min(1160px, 94vw);
}

.dashboard-top {
  border: 1px solid rgba(112, 161, 224, 0.2);
  border-radius: 1rem;
  padding: 0.95rem 1rem;
  background: linear-gradient(160deg, rgba(14, 30, 56, 0.9), rgba(8, 20, 40, 0.9));
}

.dashboard-eyebrow {
  margin: 0 0 0.25rem;
  color: #7fc4ff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-card {
  border-color: rgba(123, 176, 247, 0.24);
  background:
    linear-gradient(160deg, rgba(15, 34, 65, 0.9), rgba(8, 19, 38, 0.95)),
    radial-gradient(circle at 15% -20%, rgba(90, 180, 255, 0.08), transparent 55%);
  box-shadow: 0 18px 45px rgba(2, 9, 22, 0.32);
}

.members-top h1 {
  margin: 0.1rem 0 0;
}

.members-hero-card {
  margin-top: 1rem;
}

.members-grid-modern {
  margin-top: 1rem;
}

.members-gallery-card {
  margin-top: 1rem;
}

.admin-stats {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.stat-box {
  border: 1px solid rgba(112, 161, 224, 0.28);
  border-radius: 0.75rem;
  padding: 0.85rem;
  background: linear-gradient(150deg, rgba(17, 36, 66, 0.78), rgba(9, 21, 44, 0.74));
  display: grid;
  gap: 0.3rem;
}

.stat-box strong {
  font-size: 1.6rem;
}

.table-wrap {
  overflow-x: visible;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

.admin-table th,
.admin-table td {
  text-align: left;
  padding: 0.78rem 0.6rem;
  border-bottom: 1px solid rgba(112, 161, 224, 0.18);
  vertical-align: middle;
  line-height: 1.35;
}

.admin-table th {
  color: #c7d9f3;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.admin-table tbody tr {
  min-height: 58px;
}

.admin-table tbody tr:hover {
  background: rgba(90, 180, 255, 0.1);
}

.cell-id {
  width: 64px;
  white-space: nowrap;
}

.cell-user {
  width: 170px;
  font-weight: 700;
}

.cell-email {
  width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cell-select {
  width: 130px;
}

.cell-date {
  width: 140px;
  white-space: nowrap;
  color: #c4d5ef;
}

.cell-action {
  width: 190px;
}

.status {
  display: inline-flex;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.status-pending {
  color: #ffd78f;
  background: rgba(241, 189, 93, 0.2);
}

.status-approved {
  color: #98e9c2;
  background: rgba(77, 216, 150, 0.2);
}

.status-rejected {
  color: #ffb4b4;
  background: rgba(235, 124, 124, 0.2);
}

.status-group {
  color: #a8d6ff;
  background: rgba(90, 180, 255, 0.16);
}

.inline-actions {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.inline-actions-meta {
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
}

.inline-actions-meta select {
  margin: 0;
  width: 100%;
  min-width: 0;
  padding: 0.48rem 0.58rem;
  border-radius: 0.58rem;
  font-size: 0.86rem;
}

.inline-actions button {
  border: 1px solid rgba(112, 161, 224, 0.28);
  background: rgba(16, 43, 85, 0.45);
  color: #eef5ff;
  border-radius: 0.55rem;
  padding: 0.35rem 0.55rem;
  cursor: pointer;
}

.inline-actions-meta .btn {
  min-height: 2.05rem;
  padding: 0.44rem 0.72rem;
  border-radius: 0.58rem;
  font-size: 0.84rem;
  background: linear-gradient(135deg, rgba(97, 168, 245, 0.3), rgba(69, 133, 214, 0.3));
  border-color: rgba(120, 176, 244, 0.35);
}

.reset-link-card {
  margin-bottom: 1rem;
}

.reset-link-card input {
  margin-top: 0.35rem;
}

@media (max-width: 880px) {
  .admin-stats {
    grid-template-columns: 1fr;
  }

  .members-grid {
    grid-template-columns: 1fr;
  }

  .uploads-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-table {
    table-layout: auto;
  }

  .cell-email,
  .cell-date,
  .cell-user,
  .cell-action,
  .cell-select,
  .cell-id {
    width: auto;
  }
}
