.admin-shell {
  --admin-blue: #25408f;
  --admin-magenta: #a01861;
  --admin-hot-pink: #d70c81;
  --admin-teal: #00a69c;
  --admin-yellow: #fbb040;
  --admin-ink: #253451;
  --admin-muted: #687083;
  --admin-line: #e5e8ef;
  --admin-surface: #f7f8fa;
  --admin-danger: #a52d43;
  width: 100%;
  min-height: 70vh;
  padding: clamp(24px, 4vw, 52px) clamp(16px, 4vw, 48px) 64px;
  color: var(--admin-ink);
  background: #fff;
  font-family: "Poppins", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.55;
}

body.admin-view .site-header,
body.admin-view .desktop-nav,
body.admin-view .bottom-nav {
  display: none;
}

body.admin-view #main-content {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

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

.admin-shell h1,
.admin-shell h2,
.admin-shell h3,
.admin-shell p {
  margin-top: 0;
}

.admin-shell h1,
.admin-shell h2,
.admin-shell h3,
.admin-shell strong,
.admin-shell button,
.admin-shell label,
.admin-shell dt {
  font-weight: 700;
}

.admin-shell h1,
.admin-shell h2,
.admin-shell h3 {
  color: var(--admin-blue);
  letter-spacing: -.035em;
  line-height: 1.2;
}

.admin-shell h1 {
  margin-bottom: 12px;
  font-size: clamp(32px, 4vw, 52px);
}

.admin-shell h2 {
  margin-bottom: 0;
  font-size: clamp(22px, 2.5vw, 30px);
}

.admin-shell h3 {
  margin-bottom: 14px;
  font-size: 17px;
}

.admin-shell button,
.admin-shell input,
.admin-shell select {
  font: inherit;
}

.admin-shell button {
  cursor: pointer;
}

.admin-shell button:disabled {
  cursor: wait;
  opacity: .6;
}

.admin-shell input,
.admin-shell select {
  min-height: 46px;
  width: 100%;
  border: 1px solid #d6dce8;
  border-radius: 9px;
  background: #fff;
  color: var(--admin-ink);
  padding: 10px 12px;
}

.admin-shell input::placeholder {
  color: #8991a1;
}

.admin-shell input:focus,
.admin-shell select:focus,
.admin-shell button:focus-visible,
.admin-shell a:focus-visible,
.admin-shell dialog:focus-visible {
  outline: 3px solid var(--admin-teal);
  outline-offset: 3px;
}

.admin-shell a {
  color: inherit;
}

.admin-eyebrow {
  margin-bottom: 10px;
  color: var(--admin-magenta);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  line-height: 1.4;
}

.admin-intro {
  max-width: 680px;
  margin-bottom: 0;
  color: var(--admin-muted);
  font-size: 14px;
  line-height: 1.7;
}

.admin-publication-note {
  margin: 20px 0 0;
  border-left: 4px solid var(--admin-yellow);
  border-radius: 0 8px 8px 0;
  background: #fff8e9;
  color: #6f531c;
  padding: 11px 14px;
  font-size: 12px;
  line-height: 1.6;
}

.admin-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 9px 15px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.admin-button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.admin-button-primary,
.admin-button-primary:hover,
.admin-button-primary:visited {
  border-color: var(--admin-blue);
  background: var(--admin-blue);
  color: #fff;
  box-shadow: 3px 3px 0 var(--admin-hot-pink);
}

.admin-button-secondary {
  border-color: #cad2e1;
  background: #fff;
  color: var(--admin-blue);
}

.admin-button-secondary:hover:not(:disabled) {
  border-color: var(--admin-blue);
  background: #f1f4fa;
}

.admin-button-quiet {
  border-color: transparent;
  background: transparent;
  color: var(--admin-blue);
}

.admin-button-full {
  width: 100%;
}

.admin-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.admin-login-shell,
.admin-loading-shell {
  display: grid;
  min-height: 70vh;
  place-items: center;
  background: linear-gradient(135deg, #fff 0%, #fbf5f9 100%);
}

.admin-login-card,
.admin-loading-card {
  width: min(100%, 470px);
  border: 1px solid #e5e8ef;
  border-radius: 20px;
  background: #fff;
  padding: clamp(24px, 5vw, 42px);
  box-shadow: 0 15px 40px rgb(37 64 143 / 9%);
}

.admin-login-card .admin-publication-note,
.admin-loading-card .admin-publication-note {
  margin-bottom: 24px;
}

.admin-login-form {
  display: grid;
  gap: 17px;
}

.admin-field {
  display: grid;
  gap: 7px;
}

.admin-field label,
.admin-photo-review-form > label {
  color: var(--admin-blue);
  font-size: 12px;
}

.admin-form-status,
.admin-feedback,
.admin-inline-error {
  margin: 0;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.6;
}

.admin-form-status:not([hidden]),
.admin-feedback:not([hidden]) {
  display: block;
}

.admin-form-status,
.admin-feedback-error,
.admin-inline-error {
  background: #fff0f1;
  color: var(--admin-danger);
}

.admin-feedback-info {
  background: #eef2ff;
  color: var(--admin-blue);
}

.admin-unavailable {
  border-radius: 10px;
  background: var(--admin-surface);
  color: var(--admin-muted);
  padding: 14px;
  font-size: 12px;
  line-height: 1.7;
}

.admin-unavailable p:last-child {
  margin-bottom: 0;
}

.admin-loading-message {
  margin: 0;
  color: var(--admin-muted);
  font-size: 13px;
  text-align: center;
}

.admin-dashboard-shell {
  max-width: 1360px;
  margin: 0 auto;
}

.admin-dashboard-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
}

.admin-session-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 10px;
}

.admin-user-label {
  max-width: 220px;
  overflow: hidden;
  color: var(--admin-muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 30px 0;
}

.admin-summary-card {
  min-height: 120px;
  border-radius: 14px;
  color: #fff;
  padding: 20px;
  box-shadow: 4px 4px 0 rgb(37 64 143 / 10%);
}

.admin-summary-card-blue {
  background: var(--admin-blue);
}

.admin-summary-card-pink {
  background: var(--admin-magenta);
}

.admin-summary-card-teal {
  background: var(--admin-teal);
}

.admin-summary-label {
  display: block;
  font-size: 12px;
  line-height: 1.4;
  opacity: .9;
}

.admin-summary-card strong {
  display: block;
  margin-top: 13px;
  font-size: 32px;
  line-height: 1;
}

.admin-panel {
  border: 1px solid #e5e8ef;
  border-radius: 16px;
  background: #fff;
  padding: clamp(18px, 3vw, 30px);
  box-shadow: 0 9px 28px rgb(37 64 143 / 5%);
}

.admin-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 23px;
}

.admin-panel-heading .admin-eyebrow {
  margin-bottom: 5px;
}

.admin-filter-form {
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) minmax(150px, .8fr) minmax(170px, .9fr) auto;
  align-items: end;
  gap: 12px;
  border-radius: 12px;
  background: var(--admin-surface);
  padding: 15px;
}

.admin-filter-form .admin-field {
  min-width: 0;
}

.admin-filter-search input {
  min-width: 0;
}

.admin-filter-submit {
  min-height: 46px;
}

.admin-results {
  min-height: 190px;
  margin-top: 24px;
}

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

.admin-table {
  width: 100%;
  min-width: 850px;
  border-collapse: collapse;
  color: var(--admin-ink);
  font-size: 12px;
}

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

.admin-table th {
  background: var(--admin-surface);
  color: var(--admin-blue);
  font-size: 10px;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}

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

.admin-table tbody tr:hover {
  background: #fcfdff;
}

.admin-table td:first-child {
  min-width: 150px;
  color: var(--admin-blue);
  font-weight: 700;
}

.admin-table-action {
  min-height: 35px;
  padding: 6px 10px;
  white-space: nowrap;
}

.admin-status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
}

.admin-status-pending {
  background: #fff4cf;
  color: #765a09;
}

.admin-status-approved {
  background: #ddf6f1;
  color: #007b74;
}

.admin-status-rejected {
  background: #fff0f1;
  color: var(--admin-danger);
}

.admin-status-none {
  background: #edf0f5;
  color: var(--admin-muted);
}

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

.admin-empty-state,
.admin-error-state {
  border-radius: 12px;
  background: var(--admin-surface);
  padding: 38px 22px;
  text-align: center;
}

.admin-empty-state h2,
.admin-error-state h3 {
  margin-bottom: 8px;
  font-size: 20px;
}

.admin-empty-state p,
.admin-error-state p {
  max-width: 560px;
  margin: 0 auto 18px;
  color: var(--admin-muted);
  font-size: 12px;
  line-height: 1.7;
}

.admin-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 17px;
}

.admin-pagination-count,
.admin-pagination-actions > span {
  margin: 0;
  color: var(--admin-muted);
  font-size: 11px;
}

.admin-pagination-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.admin-pagination-actions .admin-button {
  min-height: 36px;
  padding: 7px 11px;
}

.admin-dialog {
  width: min(720px, calc(100% - 28px));
  max-height: min(90vh, 900px);
  margin: auto;
  border: 0;
  border-radius: 17px;
  background: #fff;
  color: var(--admin-ink);
  padding: 0;
  box-shadow: 0 25px 80px rgb(13 29 68 / 25%);
}

.admin-dialog::backdrop {
  background: rgb(19 36 78 / 68%);
  backdrop-filter: blur(3px);
}

.admin-dialog-inner {
  position: relative;
  max-height: min(90vh, 900px);
  overflow-y: auto;
  padding: clamp(22px, 4vw, 38px);
}

.admin-dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid #dfe4ed;
  border-radius: 50%;
  background: #fff;
  color: var(--admin-blue);
  font-size: 24px;
  line-height: 1;
}

.admin-detail-card {
  padding-top: 8px;
}

.admin-detail-card h2 {
  max-width: calc(100% - 42px);
  margin-bottom: 7px;
}

.admin-detail-date {
  margin-bottom: 25px;
  color: var(--admin-muted);
  font-size: 12px;
}

.admin-detail-section {
  border-top: 1px solid var(--admin-line);
  padding-top: 20px;
  margin-top: 22px;
}

.admin-detail-section h3 {
  margin-bottom: 15px;
  font-size: 16px;
}

.admin-detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 22px;
  margin: 0;
}

.admin-detail-list > div {
  min-width: 0;
  border-bottom: 1px solid #eef0f4;
  padding: 10px 0;
}

.admin-detail-list dt {
  margin-bottom: 3px;
  color: var(--admin-muted);
  font-size: 10px;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.admin-detail-list dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--admin-ink);
  font-size: 12px;
  line-height: 1.6;
}

.admin-detail-link {
  color: var(--admin-blue);
  font-weight: 700;
  text-decoration-color: var(--admin-hot-pink);
  text-underline-offset: 3px;
}

.admin-detail-empty {
  margin-bottom: 0;
  border-radius: 9px;
  background: var(--admin-surface);
  color: var(--admin-muted);
  padding: 13px;
  font-size: 12px;
}

.admin-photo-frame {
  display: grid;
  min-height: 210px;
  place-items: center;
  overflow: hidden;
  border-radius: 11px;
  background: #edf0f3;
}

.admin-photo-frame img {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: contain;
}

.admin-photo-fallback {
  max-width: 430px;
  margin: 0;
  padding: 26px;
  color: var(--admin-blue);
  font-size: 12px;
  line-height: 1.7;
  text-align: center;
}

.admin-photo-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 13px 0 4px;
}

.admin-photo-auth-note {
  color: var(--admin-muted);
  font-size: 10px;
}

.admin-photo-review-form {
  display: grid;
  gap: 8px;
  margin-top: 22px;
  border-top: 1px solid var(--admin-line);
  padding-top: 20px;
}

.admin-photo-review-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-photo-review-controls select {
  max-width: 300px;
}

.admin-inline-error {
  margin-bottom: 14px;
}

@media (max-width: 760px) {
  .admin-dashboard-header {
    flex-direction: column;
  }

  .admin-session-actions {
    width: 100%;
    justify-content: space-between;
    padding-top: 0;
  }

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

  .admin-filter-search,
  .admin-filter-submit {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .admin-shell {
    padding-inline: 13px;
    padding-bottom: 35px;
  }

  .admin-summary-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-block: 22px;
  }

  .admin-summary-card {
    min-height: 92px;
    padding: 16px;
  }

  .admin-summary-card strong {
    margin-top: 8px;
    font-size: 27px;
  }

  .admin-panel-heading {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .admin-panel-heading .admin-button {
    align-self: flex-start;
  }

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

  .admin-filter-search,
  .admin-filter-submit {
    grid-column: auto;
  }

  .admin-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-pagination-actions {
    justify-content: space-between;
  }

  .admin-pagination-actions .admin-button {
    flex: 1;
  }

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

  .admin-photo-review-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-photo-review-controls select {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .admin-shell *,
  .admin-shell *::before,
  .admin-shell *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
