.admin-body {
  background: #0b0b0a;
}
.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 30px;
  background: radial-gradient(ellipse at top, #78602b1c, transparent 60%);
}
.login-card {
  width: 100%;
  max-width: 430px;
  padding: 40px;
  border: 1px solid var(--border);
  background: #11110f;
}
.login-card .brand {
  margin-bottom: 45px;
}
.login-card h1 {
  font-size: 33px;
  letter-spacing: -1px;
}
.login-card form {
  display: grid;
  gap: 20px;
}
.login-card > p {
  font-size: 13px;
}
.login-card .text-link {
  font-size: 11px;
  margin-top: 25px;
}
.admin-shell {
  display: grid;
  grid-template-columns: 245px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: #10100e;
  border-right: 1px solid var(--border);
  padding: 30px 22px;
  position: fixed;
  inset: 0 auto 0 0;
  width: 245px;
  display: flex;
  flex-direction: column;
  z-index: 20;
}
.sidebar .brand {
  gap: 8px;
  margin-bottom: 45px;
}
.sidebar .brand b {
  font-size: 16px;
}
.sidebar .brand small {
  font-size: 6px;
  letter-spacing: 3px;
}
.sidebar .monogram {
  font-size: 36px;
  width: 43px;
}
.sidebar-label {
  font-size: 9px;
  letter-spacing: 3px;
  color: #706853;
  margin: 0 13px 16px;
}
.admin-nav {
  display: grid;
  gap: 7px;
}
.admin-nav button {
  border: 1px solid transparent;
  text-align: left;
  padding: 13px 15px;
  color: var(--muted);
  background: none;
  border-radius: 4px;
  font-size: 13px;
  display: flex;
  gap: 14px;
  align-items: center;
}
.admin-nav button.active {
  color: var(--light-gold);
  background: #d3ae5410;
  border-color: #d3ae542d;
}
.admin-nav button:hover {
  color: var(--gold);
}
.admin-nav span {
  font-size: 17px;
  color: var(--gold);
  width: 20px;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 30px;
  display: grid;
  gap: 16px;
}
.sidebar-bottom a {
  font-size: 12px;
  color: var(--muted);
  padding: 0 14px;
}
.sidebar-bottom .btn {
  font-size: 12px;
}
.admin-main {
  grid-column: 2;
  padding: 35px 40px;
  min-width: 0;
}
.admin-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 23px;
  margin-bottom: 30px;
  gap: 20px;
}
.admin-topbar p {
  font-size: 11px;
  margin: 0;
}
.admin-topbar strong {
  font-size: 12px;
  color: var(--light-gold);
  font-weight: 400;
}
.admin-topbar .btn {
  padding: 8px 15px;
  min-height: 38px;
  font-size: 11px;
}
.admin-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
}
.admin-title h1 {
  font-size: 36px;
  letter-spacing: -1px;
  margin-bottom: 9px;
}
.admin-title p {
  font-size: 12px;
  margin: 0;
}
.admin-title .btn {
  font-size: 12px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 17px;
  margin-bottom: 30px;
}
.metric {
  background: #13130f;
  border: 1px solid var(--border);
  padding: 24px;
}
.metric small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 12px;
}
.metric strong {
  font-weight: 400;
  font-size: 34px;
  color: var(--light-gold);
}
.metric p {
  font-size: 10px;
  margin: 7px 0 0;
}
.admin-panel {
  border: 1px solid var(--border);
  background: #11110f;
  margin-bottom: 28px;
  padding: 25px;
  overflow: hidden;
}
.admin-panel h2 {
  font-size: 21px;
  letter-spacing: 0;
  margin-bottom: 20px;
}
.admin-panel .hint {
  margin-top: 0;
}
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
th {
  font-weight: 400;
  color: #8e8878;
  text-align: left;
  font-size: 10px;
  letter-spacing: 1px;
  white-space: nowrap;
}
td,
th {
  padding: 15px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
td:first-child,
th:first-child {
  padding-left: 0;
}
td:last-child,
th:last-child {
  padding-right: 0;
}
td .minor {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 6px;
  max-width: 240px;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.status-pill {
  display: inline-block;
  border: 1px solid #6e5a31;
  color: var(--gold);
  background: #d3ae5410;
  font-size: 10px;
  padding: 4px 9px;
  border-radius: 20px;
  white-space: nowrap;
}
.status-pill.confirmed,
.status-pill.read {
  color: #9ed0b2;
  border-color: #385c46;
  background: #385c461f;
}
.status-pill.cancelled {
  color: #e7a7a0;
  border-color: #794b42;
  background: #794b421f;
}
.status-pill.completed {
  color: #aeb4d5;
  border-color: #575d78;
  background: #575d781f;
}
.table-actions {
  display: flex;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
}
.mini-btn {
  border: 1px solid #50452a;
  color: var(--gold);
  background: transparent;
  border-radius: 3px;
  padding: 6px 10px;
  font-size: 10px;
  white-space: nowrap;
}
.mini-btn.danger {
  color: #e9a39b;
  border-color: #69453f;
}
.table-select {
  padding: 6px;
  font-size: 10px;
  min-height: 30px;
  width: auto;
}
.toolbar {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.toolbar input {
  max-width: 340px;
  font-size: 12px;
  min-height: 40px;
}
.toolbar select {
  width: auto;
  font-size: 12px;
  min-height: 40px;
}
.editor-form {
  display: grid;
  gap: 20px;
}
.editor-form .form-grid {
  gap: 17px;
}
.editor-form .btn {
  justify-self: start;
}
.editor-form h3 {
  font-size: 23px;
}
.editor-form .status {
  margin: 0;
}
.editor-form label {
  font-size: 11px;
}
.editor-form .preview {
  height: 170px;
  max-width: 100%;
  object-fit: contain;
  border: 1px solid var(--border);
}
.editor-form fieldset {
  border: 1px solid var(--border);
  padding: 20px;
}
.editor-form legend {
  font-size: 11px;
  color: var(--gold);
  padding: 0 8px;
}
.day-checks {
  display: flex;
  gap: 17px;
  flex-wrap: wrap;
}
.day-checks .check-label {
  font-size: 11px;
}
.upload-field {
  display: grid;
  gap: 10px;
}
.upload-field input[type="file"] {
  font-size: 11px;
  padding: 10px;
}
.admin-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.admin-gallery article {
  border: 1px solid var(--border);
  background: #12120f;
}
.admin-gallery img {
  height: 190px;
  object-fit: cover;
  width: 100%;
}
.admin-gallery article > div {
  padding: 18px;
}
.admin-gallery h3 {
  font-size: 17px;
  margin-bottom: 8px;
}
.admin-gallery p {
  font-size: 11px;
}
.admin-gallery .table-actions {
  margin-top: 18px;
}
#editor {
  width: 640px;
  max-width: 95vw;
  max-height: 90vh;
  padding: 28px;
}
.quick-actions {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}
.notice {
  padding: 18px;
  border: 1px solid #5c4b26;
  background: #d3ae540a;
  font-size: 12px;
  color: #cfbf98;
  margin-bottom: 25px;
  line-height: 1.9;
}
.preline {
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.message-body {
  max-width: 390px;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.hidden {
  display: none !important;
}
.admin-busy {
  opacity: 0.6;
  pointer-events: none;
}
@media (max-width: 1100px) {
  .sidebar {
    width: 215px;
    padding: 25px 15px;
  }
  .admin-shell {
    grid-template-columns: 215px 1fr;
  }
  .admin-main {
    padding: 25px;
  }
  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .admin-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 760px) {
  .admin-shell {
    display: block;
  }
  .sidebar {
    position: static;
    width: 100%;
    padding: 18px;
    display: block;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .sidebar .brand {
    margin-bottom: 20px;
  }
  .sidebar-label {
    display: none;
  }
  .admin-nav {
    display: flex;
    overflow-x: auto;
    gap: 6px;
    padding-bottom: 6px;
  }
  .admin-nav button {
    white-space: nowrap;
    padding: 10px 12px;
    font-size: 11px;
    gap: 8px;
  }
  .admin-nav span {
    font-size: 14px;
    width: auto;
  }
  .sidebar-bottom {
    margin-top: 10px;
    padding-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .sidebar-bottom .btn {
    min-height: 34px;
    font-size: 10px;
    padding: 6px 14px;
  }
  .admin-main {
    padding: 22px 16px;
  }
  .admin-topbar {
    margin-bottom: 25px;
  }
  .admin-title {
    align-items: start;
  }
  .admin-title h1 {
    font-size: 29px;
  }
  .admin-title .btn {
    font-size: 10px;
    padding: 10px 13px;
    gap: 10px;
    min-height: 40px;
  }
  .metrics {
    gap: 12px;
  }
  .metric {
    padding: 19px;
  }
  .metric strong {
    font-size: 28px;
  }
  .admin-panel {
    padding: 18px;
  }
  .admin-gallery {
    gap: 15px;
  }
  .admin-gallery img {
    height: 150px;
  }
  .admin-gallery article > div {
    padding: 14px;
  }
  .admin-panel .form-grid {
    grid-template-columns: 1fr;
  }
  .admin-panel .full {
    grid-column: auto;
  }
  .login-card {
    padding: 30px;
  }
  .toolbar input {
    max-width: 100%;
  }
  #editor .form-grid {
    grid-template-columns: 1fr;
  }
  #editor .full {
    grid-column: auto;
  }
}

.sidebar .brand {
  gap: 0;
}
.sidebar .brand b {
  font-size: 17px;
  text-transform: none;
}
.login-card .brand b {
  font-size: 23px;
  text-transform: none;
}

/* Responsive panel refinements. */
.admin-main,
.admin-panel,
.admin-title > div,
.toolbar,
.editor-form,
.editor-form label {
  min-width: 0;
}
.admin-main h1,
.admin-panel h2,
.notice,
.metric small {
  overflow-wrap: anywhere;
}
.table-wrap {
  max-width: 100%;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}
.admin-gallery {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.admin-gallery article {
  min-width: 0;
}
.admin-gallery h3,
.admin-gallery p {
  overflow-wrap: anywhere;
}
.editor-form input,
.editor-form select,
.editor-form textarea {
  font-size: 16px;
  min-width: 0;
  max-width: 100%;
}
.admin-title .btn,
.quick-actions .btn,
.editor-form > .btn {
  min-height: 44px;
}
#editor .close {
  min-width: 44px;
  min-height: 44px;
  padding: 0 0 8px;
}
@media (max-width: 1100px) {
  .admin-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .sidebar .brand {
    max-width: 100%;
  }
  .sidebar .brand b {
    white-space: normal;
  }
  .admin-nav {
    max-width: 100%;
    overscroll-behavior-x: contain;
  }
  .admin-nav button {
    min-height: 44px;
    flex-shrink: 0;
  }
  .admin-main {
    padding: 24px 18px;
  }
  .admin-topbar {
    gap: 12px;
  }
  .admin-title {
    flex-wrap: wrap;
    gap: 18px;
  }
  .admin-title h1 {
    line-height: 1.25;
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .metric {
    min-width: 0;
  }
  .admin-panel {
    padding: 20px 17px;
  }
  .toolbar > * {
    max-width: 100%;
  }
  .toolbar input,
  .toolbar select {
    font-size: 16px;
    min-height: 44px;
  }
  .mini-btn,
  .table-select {
    min-height: 40px;
  }
  .quick-actions .btn {
    flex: 1 1 150px;
  }
  .admin-gallery img {
    height: auto;
    aspect-ratio: 4/3;
  }
  .editor-form .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .editor-form .full {
    grid-column: auto;
  }
  .editor-form fieldset {
    padding: 18px 14px;
    min-width: 0;
  }
  .day-checks {
    gap: 13px;
  }
  .day-checks .check-label {
    min-height: 40px;
    align-items: center;
  }
  #editor {
    padding: 21px;
    max-width: calc(100% - 24px);
    max-height: calc(100svh - 24px);
  }
}
@media (max-width: 480px) {
  .toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .toolbar input,
  .toolbar select {
    width: 100%;
    max-width: none;
  }
  .admin-gallery {
    grid-template-columns: minmax(0, 1fr);
  }
  .metric {
    padding: 19px 16px;
  }
  .metric strong {
    font-size: 29px;
  }
  .metric small {
    font-size: 11px;
    line-height: 1.6;
  }
  .notice {
    padding: 16px;
    font-size: 12px;
  }
  .admin-topbar .eyebrow {
    font-size: 8px;
    letter-spacing: 2px;
  }
  .login-wrap {
    padding: 20px 16px;
  }
  .login-card {
    padding: 30px 23px;
  }
  .login-card .brand b {
    font-size: 22px;
  }
  .login-card input {
    font-size: 16px;
  }
}
