* {
  box-sizing: border-box;
  font-family: "PPNeueMachina", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 500;
}

:root {
  --bg: #060406;
  --text-main: #f0edf2;
  --text-dim: rgba(240, 237, 242, 0.62);
  --text-soft: rgba(240, 237, 242, 0.48);
  --rect-bg: linear-gradient(180deg, rgba(23, 24, 26, 0.84) 0%, rgba(23, 24, 26, 0.72) 100%);
  --rect-bg-strong: linear-gradient(180deg, rgba(23, 24, 26, 0.9) 0%, rgba(23, 24, 26, 0.78) 100%);
  --rect-border: rgba(253, 246, 252, 0.1);
  --rect-inset: inset 0 0 0 1px rgba(253, 246, 252, 0.03);
}

body.admin-page {
  margin: 0;
  min-height: 100vh;
  color: var(--text-main);
  background: transparent !important;
  display: flex;
  flex-direction: column;
}

.camera-logo {
  position: fixed;
  left: 50vw;
  top: 50vh;
  transform: translate(-50%, -50%);
  width: 420px;
  max-width: 44vw;
  opacity: 0.09;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.header {
  background-color: transparent;
  padding: 14px 0 0;
  z-index: 20;
}

.header-shell {
  width: 100%;
  min-height: 74px;
  padding: 12px 20px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(18, 16, 18, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.logo {
  text-decoration: none;
  margin-right: 8px;
  line-height: 1;
}

.logo img {
  max-height: 24px;
  width: auto;
}

.logo h1 {
  margin: 0 0 0 10px;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: #fff;
}

.logo-main,
.logo-dev {
  font-weight: 400;
}

.logo-main {
  color: #fff;
}

.logo-dev {
  color: #d7a8cd;
}

.navmenu {
  margin: 0 auto;
  flex: 1;
  display: flex;
  justify-content: center;
}

.navmenu ul {
  margin: 0;
  padding: 0;
  display: flex;
  list-style: none;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.navmenu a {
  padding: 8px 6px;
  border-radius: 10px;
  color: #f8f5fb;
  font-size: 15px;
  text-decoration: none;
}

.navmenu li:hover > a,
.navmenu a.is-active {
  color: #fff;
  background: transparent;
}

.nav-icon {
  margin-right: 6px;
  font-size: 12px;
  line-height: 1;
}

.header-actions {
  margin-left: 14px;
  gap: 10px;
}

.header-btn {
  height: 40px;
  padding: 0 16px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #f5f0f8;
  font-size: 15px;
  line-height: 1;
  text-decoration: none;
  transition: 0.25s ease;
}

.header-btn-dark {
  background: linear-gradient(90deg, rgba(239, 97, 121, 0.05) 0%, rgba(23, 24, 26, 0.05) 100%);
  border-color: rgba(255, 255, 255, 0.01);
}

.header-btn-accent {
  background: linear-gradient(90deg, #efa9e0 0%, #896180 100%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-clip: padding-box;
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.header-btn:hover {
  color: #fff;
  transform: none;
  filter: none;
}

.admin-main {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 136px;
  padding-bottom: 48px;
  display: grid;
  gap: 16px;
  flex: 1 0 auto;
}

.admin-card {
  border: 1px solid var(--rect-border);
  background: var(--rect-bg);
  border-radius: 12px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--rect-inset);
  padding: 18px;
}

.admin-topline {
  margin: 0;
  color: var(--text-soft);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.admin-title {
  margin: 6px 0 0;
  font-size: 34px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.86);
}

.admin-subtitle {
  margin: 8px 0 0;
  color: var(--text-dim);
  font-size: 14px;
}

.admin-chips {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-chip {
  min-height: 36px;
  border-radius: 9px;
  border: 1px solid rgba(253, 246, 252, 0.14);
  background: var(--rect-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--rect-inset);
  color: var(--text-main);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  font-size: 14px;
  transition: none;
}

.admin-chip:hover {
  color: var(--text-main);
  border-color: rgba(253, 246, 252, 0.14);
  background: var(--rect-bg);
}

.admin-chip.is-active {
  color: #fff;
  border-color: rgba(253, 246, 252, 0.24);
  border-bottom: 0;
  background: linear-gradient(180deg, #ef6179 0%, #ed4561 100%);
}

.flash-box {
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
}

.flash-box.error {
  color: #ffbdbd;
  background: rgba(255, 0, 0, 0.12);
  border: 1px solid rgba(255, 0, 0, 0.28);
}

.flash-box.success {
  color: #c9ffdd;
  background: rgba(0, 204, 68, 0.12);
  border: 1px solid rgba(0, 204, 68, 0.28);
}

.section-title {
  margin: 0 0 12px;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.9);
}

.table-wrap {
  border: 1px solid var(--rect-border);
  border-radius: 12px;
  overflow: auto;
  background: var(--rect-bg);
  box-shadow: var(--rect-inset);
}

.users-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}

.users-table th,
.users-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
  font-size: 14px;
}

.users-table th {
  color: var(--text-soft);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.users-table tr:last-child td {
  border-bottom: none;
}

.users-table code {
  color: #f2d3ea;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 11px;
  text-transform: uppercase;
}

.status-active {
  background: rgba(60, 220, 151, 0.15);
  color: #3ddc97;
}

.status-banned {
  background: rgba(255, 80, 80, 0.15);
  color: #ff6b6b;
}

.btn-action {
  min-height: 34px;
  border-radius: 9px;
  font-size: 13px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  cursor: pointer;
  transition: none;
}

.btn-ban {
  background: rgba(255, 80, 80, 0.15);
  border-color: rgba(255, 80, 80, 0.3);
  color: #ff8e8e;
}

.btn-ban:hover {
  background: rgba(255, 80, 80, 0.15);
}

.btn-unban {
  background: rgba(60, 220, 151, 0.15);
  border-color: rgba(60, 220, 151, 0.3);
  color: #87e8b9;
}

.btn-unban:hover {
  background: rgba(60, 220, 151, 0.15);
}

.btn-primary {
  min-height: 42px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: linear-gradient(180deg, #ef6179 0%, #ed4561 100%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-clip: padding-box;
  color: #fff;
  padding: 0 14px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  background: linear-gradient(180deg, #ef6179 0%, #ed4561 100%);
  filter: none;
}

.header-btn-accent::before,
.header-btn-accent::after,
.btn-primary::before,
.btn-primary::after {
  content: none !important;
  display: none !important;
}

.ip-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.ip-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--rect-border);
  border-radius: 10px;
  background: var(--rect-bg);
  box-shadow: var(--rect-inset);
}

.add-form {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.add-input {
  flex: 1;
  min-width: 220px;
  min-height: 42px;
  border-radius: 10px;
  border: 1px solid rgba(253, 246, 252, 0.14);
  background: var(--rect-bg);
  box-shadow: var(--rect-inset);
  color: #fdf6fc;
  padding: 0 12px;
  outline: none;
}

.add-input::placeholder {
  color: rgba(253, 246, 252, 0.45);
}

.add-input:focus {
  border-color: rgba(253, 246, 252, 0.26);
  background: var(--rect-bg-strong);
}

.muted {
  color: var(--text-soft);
}

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  z-index: 999;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-card {
  width: 100%;
  max-width: 440px;
  border-radius: 14px;
  border: 1px solid var(--rect-border);
  background: var(--rect-bg);
  box-shadow: var(--rect-inset);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 18px;
}

.modal-title {
  margin: 0 0 10px;
  font-size: 18px;
}

.modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.btn-cancel {
  min-height: 40px;
  border-radius: 9px;
  border: 1px solid rgba(253, 246, 252, 0.14);
  background: var(--rect-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fdf6fc;
  padding: 0 14px;
  cursor: pointer;
}

body.admin-page > .footer {
  margin-top: auto;
}

/* Keep admin header typography identical to profile header sizing. */
body.admin-page .header .header-shell {
  min-height: 58px;
  padding: 9px 9px 9px 17px;
  border-radius: 100px;
}

body.admin-page .header .logo img {
  height: 24px !important;
  width: auto !important;
  max-height: 24px !important;
}

body.admin-page .header .logo h1 {
  margin: 0 0 0 10px !important;
  font-size: 15px !important;
  font-weight: 400 !important;
  line-height: 1 !important;
  letter-spacing: -0.01em !important;
}

@media (max-width: 1199px) {
  body.admin-page {
    background-attachment: scroll;
    background-position: center -340px;
    background-size: 1900px auto;
  }

  .camera-logo {
    width: 360px;
    max-width: 72vw;
  }

  .header-shell {
    min-height: 58px;
    padding: 7px 12px;
    border-radius: 16px;
  }

  .navmenu {
    display: none;
  }

  .admin-main {
    padding-top: 126px;
  }

  .admin-title {
    font-size: 28px;
  }
}

:root {
  --bg: #17181a;
  --text-main: #f4efef;
  --text-dim: rgba(244, 239, 239, 0.66);
  --text-soft: rgba(244, 239, 239, 0.5);
  --rect-bg: linear-gradient(180deg, rgba(36, 18, 18, 0.88) 0%, rgba(17, 18, 20, 0.82) 100%);
  --rect-bg-strong: linear-gradient(180deg, rgba(44, 20, 20, 0.92) 0%, rgba(30, 14, 14, 0.86) 100%);
  --rect-border: rgba(255, 214, 214, 0.12);
  --rect-inset: inset 0 0 0 1px rgba(255, 230, 230, 0.03);
}

.header-shell {
  background: rgba(23, 24, 26, 0.84) !important;
}

.logo-dev {
  color: #ed4561 !important;
}

.header-btn-accent,
.btn-primary,
.btn-primary:hover,
.admin-chip.is-active {
  background: linear-gradient(180deg, #ed4561 0%, #ef6179 100%) !important;
  border-color: rgba(255, 214, 214, 0.24) !important;
}

.header-btn-dark {
  background: linear-gradient(180deg, rgba(237, 69, 97, 0.06) 0%, rgba(23, 24, 26, 0.1) 100%) !important;
}

.users-table code {
  color: #ffb3b3 !important;
}

.add-input:focus {
  border-color: rgba(237, 69, 97, 0.36) !important;
  background: var(--rect-bg-strong) !important;
}

body.admin-page .admin-card,
body.admin-page .ip-item,
body.admin-page .modal-card {
  background: linear-gradient(180deg, rgba(34, 16, 16, 0.96) 0%, rgba(17, 18, 20, 0.9) 100%) !important;
  border-color: rgba(255, 214, 214, 0.16) !important;
  box-shadow:
    0 14px 36px rgba(0, 0, 0, 0.18),
    inset 0 0 0 1px rgba(255, 230, 230, 0.04) !important;
}

body.admin-page .btn-primary,
body.admin-page .btn-primary:hover,
body.admin-page .btn-action.btn-select,
body.admin-page .btn-action.btn-select:hover,
body.admin-page .admin-chip.is-active {
  color: #ffffff !important;
  background: linear-gradient(180deg, #ed4561 0%, #ef6179 100%) !important;
  border-color: rgba(255, 214, 214, 0.24) !important;
  box-shadow: 0 12px 28px rgba(237, 69, 97, 0.16) !important;
}

body.admin-page .btn-cancel,
body.admin-page .header-btn-dark {
  border-color: rgba(255, 214, 214, 0.14) !important;
  background: linear-gradient(180deg, rgba(237, 69, 97, 0.05) 0%, rgba(23, 24, 26, 0.08) 100%) !important;
  color: #fff3f3 !important;
}

body.admin-page .add-input,
body.admin-page .modal-card input,
body.admin-page .modal-card select {
  color: #fff4f4 !important;
}

body.admin-page .add-input::placeholder {
  color: rgba(255, 228, 228, 0.48) !important;
}
