/* Admin — Maria Merz / HIMERA (internal) */

.admin-body {
  min-height: 100vh;
  background: #070707;
}

.admin-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
}

.admin-login__card {
  width: min(100%, 400px);
}

.admin-login__card .kicker {
  margin-bottom: 12px;
}

.admin-login__card h1 {
  margin: 0 0 12px;
  font-size: 28px;
  font-weight: 400;
  letter-spacing: 0.06em;
}

.admin-login__card > p {
  margin: 0 0 28px;
  color: var(--white-mute);
  font-size: 14px;
  line-height: 1.55;
}

.admin-login label {
  display: block;
  margin-bottom: 16px;
}

.admin-login label span {
  display: block;
  margin-bottom: 8px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--white-mute);
}

.admin-login input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--white);
  font: inherit;
}

.admin-login input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.4);
}

.admin-login__err {
  margin: 0 0 12px;
  font-size: 13px;
  color: #e8a0a0;
}

.admin-login__err[hidden] {
  display: none !important;
}

/* Shell */

.admin-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 100vh;
}

.admin-shell[hidden] {
  display: none !important;
}

.admin-side {
  border-right: 1px solid var(--line);
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #0a0a0a;
}

.admin-side__brand {
  margin-bottom: 28px;
}

.admin-side__brand strong {
  display: block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.admin-side__brand span {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  color: var(--white-mute);
  letter-spacing: 0.06em;
}

.admin-side nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-side nav button {
  width: 100%;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  color: var(--white-mute);
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.admin-side nav button:hover,
.admin-side nav button.is-on {
  color: var(--white);
  background: rgba(255, 255, 255, 0.04);
}

.admin-side__foot {
  margin-top: auto;
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-side__foot a,
.admin-side__foot button {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white-mute);
  background: none;
  border: 0;
  padding: 0;
  text-align: left;
  cursor: pointer;
  font: inherit;
  text-decoration: none;
}

.admin-side__foot a:hover,
.admin-side__foot button:hover {
  color: var(--white);
}

.admin-main {
  padding: 28px clamp(20px, 3vw, 40px) 64px;
  overflow-x: hidden;
}

.admin-top {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.admin-top h1 {
  margin: 0 0 6px;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 400;
  letter-spacing: 0.05em;
}

.admin-top p {
  margin: 0;
  font-size: 13px;
  color: var(--white-mute);
  max-width: 40rem;
  line-height: 1.5;
}

.admin-badge {
  display: inline-block;
  padding: 6px 10px;
  border: 1px solid var(--line);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--white-mute);
}

.admin-panel[hidden] {
  display: none !important;
}

/* Stats */

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-bottom: 32px;
}

.admin-stats article {
  padding: 20px 18px;
  background: #070707;
}

.admin-stats .n {
  display: block;
  font-size: 26px;
  font-weight: 300;
  margin-bottom: 6px;
}

.admin-stats span {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--white-mute);
}

/* Toolbar */

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
}

.admin-toolbar input[type="search"],
.admin-toolbar select {
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--white);
  font: inherit;
  font-size: 13px;
  min-width: 180px;
}

.admin-toolbar select option {
  background: #111;
}

.admin-btn {
  padding: 10px 16px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--white);
  font: inherit;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.admin-btn:hover {
  background: rgba(255, 255, 255, 0.06);
}

.admin-btn--fill {
  background: var(--white);
  color: var(--black);
  border-color: var(--white);
}

.admin-btn--fill:hover {
  background: #e8e8e8;
}

.admin-btn--ghost {
  border-color: var(--line);
  color: var(--white-mute);
}

/* Tables */

.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 720px;
}

.admin-table th,
.admin-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.admin-table th {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 400;
  color: var(--white-mute);
  background: #0c0c0c;
}

.admin-table tr:last-child td {
  border-bottom: 0;
}

.admin-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.admin-muted {
  color: var(--white-mute);
}

.admin-status {
  display: inline-block;
  padding: 3px 8px;
  border: 1px solid var(--line);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white-mute);
  white-space: nowrap;
}

.admin-status.is-hot {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.35);
}

.admin-status.is-ok {
  color: #b8d4b8;
  border-color: rgba(180, 210, 180, 0.35);
}

.admin-status.is-warn {
  color: #e0c890;
  border-color: rgba(224, 200, 144, 0.35);
}

.admin-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-row-actions button,
.admin-row-actions select {
  font-size: 11px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--white-mute);
  cursor: pointer;
  font: inherit;
}

.admin-row-actions select {
  color: var(--white);
  max-width: 140px;
}

/* Cards / lists */

.admin-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.admin-card {
  border: 1px solid var(--line);
  padding: 18px 18px 16px;
  background: #0a0a0a;
}

.admin-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 400;
}

.admin-card .meta {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--white-mute);
  line-height: 1.45;
}

.admin-card .body {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--white-dim);
}

.admin-card__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

/* Forms in drawer/modal simple */

.admin-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(100%, 420px);
  background: #0c0c0c;
  border-left: 1px solid var(--line);
  z-index: 80;
  padding: 24px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.35s var(--ease);
}

.admin-drawer.is-open {
  transform: none;
}

.admin-drawer h2 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 400;
}

.admin-drawer .close {
  position: absolute;
  top: 20px;
  right: 20px;
  border: 0;
  background: none;
  color: var(--white-mute);
  font-size: 18px;
  cursor: pointer;
}

.admin-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 70;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.admin-backdrop.is-on {
  opacity: 1;
  pointer-events: auto;
}

.admin-field {
  margin-bottom: 14px;
}

.admin-field span {
  display: block;
  margin-bottom: 6px;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--white-mute);
}

.admin-field input,
.admin-field textarea,
.admin-field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--white);
  font: inherit;
  font-size: 13px;
}

.admin-field textarea {
  min-height: 100px;
  resize: vertical;
}

.admin-empty {
  padding: 40px 20px;
  border: 1px dashed var(--line);
  color: var(--white-mute);
  font-size: 14px;
  line-height: 1.55;
  text-align: center;
}

.admin-note {
  margin: 0 0 20px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--white-mute);
  line-height: 1.5;
}

.admin-note strong {
  color: var(--white);
  font-weight: 500;
}

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

  .admin-side {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding-bottom: 16px;
  }

  .admin-side nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
  }

  .admin-side nav button {
    width: auto;
    padding: 8px 10px;
  }

  .admin-side__foot {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px;
  }

  .admin-stats {
    grid-template-columns: 1fr 1fr;
  }
}

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