/* Meeture workspace: calm surfaces, clear hierarchy, and useful motion. */
.admin-body {
  --paper: #f8f3ec;
  --ink: #5d2036;
  --muted: #806d70;
  --line: #e8ddd8;
  --gold: #ac7558;
  --workspace-surface: #fffcf8;
  --workspace-shadow: 0 8px 30px rgb(75 36 41 / 4%);
  min-width: 320px;
  color: #392f32;
  background: var(--paper);
  line-height: 1.6;
}
.admin-body :is(button, a):hover {
  opacity: 1;
}
.admin-body :is(button, a, input, select, textarea):focus-visible {
  outline: 3px solid #b68567;
  outline-offset: 4px;
}
.admin-body :is(button, a, input, select, textarea) {
  transition:
    background-color 180ms ease,
    color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}
.admin-body :is(.button, .small-button) {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  border-radius: 10px;
  padding: 11px 18px;
  font-size: 12px;
  line-height: 1.5;
  font-weight: 500;
  text-decoration: none;
  letter-spacing: 0;
}
.admin-body .button {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fffaf7;
  box-shadow: 0 3px 8px rgb(93 32 54 / 8%);
}
.admin-body .small-button {
  border-color: #decbc7;
  background: #fffcf8;
  color: var(--ink);
}
.admin-body :is(button, .button, .small-button):disabled {
  opacity: 0.48;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}
.admin-body [data-saving="true"] button:disabled {
  cursor: progress;
}
.admin-body :is(.text-link, .sidebar-bottom a, .sidebar-bottom button) {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
}
.admin-body .text-link {
  text-underline-offset: 5px;
}
.admin-sidebar {
  z-index: 20;
  width: 238px;
  height: 100dvh;
  padding: 30px 20px 22px;
  background: #f1e8e1;
  border-color: #e3d5cd;
}
.admin-brand {
  width: fit-content;
  color: var(--ink);
  font-size: 43px;
  line-height: 1;
  letter-spacing: -1.8px;
}
.admin-brand span {
  font-size: 9px;
  line-height: 1.5;
  letter-spacing: 2px;
  color: #937369;
  margin-top: 12px;
}
.admin-sidebar .sidebar-label {
  margin: 34px 12px 12px;
  color: #8c716d;
  font-size: 9px;
  letter-spacing: 1.3px;
}
.admin-sidebar nav {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 3px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #d6bdb3 transparent;
}
.admin-sidebar nav button {
  flex: 0 0 auto;
  border: 0;
  border-radius: 10px;
  min-height: 44px;
  padding: 11px 12px;
  align-items: center;
  color: #755a5e;
  gap: 12px;
  font-size: 12px;
  text-align: left;
}
.admin-sidebar nav button.active {
  color: #fff9f3;
  background: var(--ink);
  box-shadow: 0 4px 12px rgb(93 32 54 / 10%);
}
.admin-sidebar nav span {
  color: #b17f65;
  font-size: 13px;
}
.admin-sidebar nav button.active span {
  color: #e7b79c;
}
.admin-sidebar nav i {
  font-size: 10px;
}
.admin-sidebar .sidebar-bottom {
  flex: 0 0 auto;
  margin-top: 18px;
  border-top: 1px solid #dfcec6;
  padding: 14px 12px 0;
  gap: 0;
  color: #816263;
}
.sidebar-bottom :is(a, button) {
  font-size: 11px;
}
.sidebar-bottom small {
  margin-top: 14px;
  font-size: 9px;
}
.admin-main {
  margin-left: 238px;
  min-width: 0;
}
.admin-topbar {
  height: 68px;
  padding-inline: clamp(24px, 3vw, 48px);
  background: rgb(255 252 248 / 65%);
  border-color: var(--line);
  font-size: 11px;
}
.admin-online {
  padding: 6px 11px;
  border: 1px solid #e0d7c8;
  border-radius: 100px;
  background: #fbfaf3;
  color: #667059;
  font-size: 10px;
}
.admin-content {
  max-width: 1600px;
  margin: 0 auto;
  padding: 36px clamp(24px, 3vw, 48px) 72px;
}
.admin-title {
  align-items: center;
  gap: 24px;
}
.admin-title h1 {
  color: var(--ink);
  font-size: clamp(24px, 2.35vw, 34px);
  line-height: 1.55;
  margin: 10px 0 0;
  letter-spacing: -0.4px;
}
.admin-title .eyebrow {
  color: #a07964;
  font-size: 9px;
  letter-spacing: 2px;
}
.admin-title > .small-button {
  flex: 0 0 auto;
}
.stat-grid {
  gap: 14px;
  border: 0;
  margin: 30px 0;
}
.stat-grid > div,
.stat-grid > div:last-child {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--workspace-surface);
  padding: 22px 24px 18px;
  box-shadow: var(--workspace-shadow);
  min-width: 0;
}
.stat-grid > div:first-child {
  background: #f1e4df;
  border-color: #e4cfc5;
}
.stat-grid span {
  font-size: 12px;
  color: #796067;
}
.stat-grid strong {
  font-size: 48px;
  line-height: 1.1;
  color: var(--ink);
  margin: 16px 0 10px;
  font-variant-numeric: tabular-nums;
}
.stat-grid small {
  color: #a08377;
  font-size: 8px;
  letter-spacing: 1.4px;
}
.table-toolbar {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--workspace-surface);
  padding: 16px;
  gap: 10px;
  margin-bottom: 18px;
}
.admin-body
  :is(
    .field input,
    .field select,
    .field textarea,
    .table-toolbar input,
    .table-toolbar select
  ) {
  min-height: 44px;
  padding: 11px 13px;
  border: 1px solid #dfd0c9;
  border-radius: 9px;
  background: #fffcf8;
  color: #453239;
  box-shadow: none;
  font-size: 13px;
}
.admin-body :is(input, textarea)::placeholder {
  color: #9c8783;
  opacity: 1;
}
.admin-body
  :is(
    .field input,
    .field select,
    .field textarea,
    .table-toolbar input,
    .table-toolbar select
  ):focus {
  border-color: #986271;
  box-shadow: 0 0 0 3px rgb(93 32 54 / 6%);
}
.admin-body .field {
  gap: 9px;
  color: #70545c;
  line-height: 1.6;
}
.admin-body .field textarea {
  resize: vertical;
  min-height: 108px;
}
.admin-body .form-grid {
  gap: 18px;
}
.admin-body .auth-form {
  gap: 18px;
}
.table-toolbar input#search {
  max-width: 380px;
  min-width: 180px;
}
.table-toolbar .muted {
  font-size: 11px;
  line-height: 1.7;
}
.table-wrap {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--workspace-surface);
  box-shadow: var(--workspace-shadow);
  scrollbar-width: thin;
  scrollbar-color: #cfaea5 #f4ebe4;
}
.admin-body th {
  background: #f1e8e1;
  color: #81646a;
  font-size: 11px;
  font-weight: 500;
  padding: 16px 19px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.admin-body td {
  padding: 19px;
  line-height: 1.6;
  border-color: #eee5de;
}
.admin-body tbody tr:last-child td {
  border-bottom: 0;
}
.admin-body td strong {
  color: #4e3440;
  font-weight: 500;
}
.admin-body td small {
  font-size: 11px;
  color: #8a7378;
  line-height: 1.7;
}
.admin-body td .text-link {
  font-size: 11px;
}
.style-tag {
  border-color: #e8d8cc;
  color: #956e59;
  background: #fbf4eb;
  border-radius: 5px;
  padding: 4px 8px;
}
.state {
  border-radius: 100px;
  font-size: 10px;
  padding: 5px 10px;
  line-height: 1.5;
}
.admin-empty {
  border: 1px dashed #dec9c0;
  border-radius: 14px;
  background: #fffaf5;
  padding: 46px 24px;
}
.table-wrap .admin-empty {
  border: 0;
  border-radius: 0;
}
.admin-empty h3 {
  color: var(--ink);
  margin: 16px 0 10px;
}
.admin-empty p {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 0;
}
.admin-work {
  background: #fffcf8;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  padding-bottom: 20px;
  box-shadow: var(--workspace-shadow);
}
.admin-work > :is(h3, p, .work-controls) {
  margin-inline: 20px;
}
.admin-work-image {
  height: 240px;
  overflow: hidden;
}
.admin-work-image img {
  object-fit: cover;
}
.admin-work-image .badge {
  border-radius: 5px;
  background: #fffcf1ed;
}
.admin-work .work-controls {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.admin-collection,
.module-card {
  border-color: var(--line);
  box-shadow: var(--workspace-shadow);
}
.module-card {
  background: #fffcf8;
  border-radius: 14px;
  padding: 24px;
}
.module-preview {
  border-radius: 8px;
  border-color: var(--line);
}
.module-index {
  color: #ab806a;
}
.module-ornament {
  color: #be9c90;
}
.module-card p,
.content-intro p {
  color: var(--muted);
}
.collection-kind-switch {
  background: #eee0d8;
  border-radius: 11px;
}
.collection-kind-switch button {
  min-height: 44px;
  border-radius: 8px;
}
.admin-body dialog {
  width: min(92vw, 680px);
  max-height: 88dvh;
  padding: 36px;
  border: 1px solid #e1cec5;
  border-radius: 18px;
  background: #fffcf8;
  box-shadow: 0 24px 100px rgb(45 22 29 / 20%);
  overscroll-behavior: contain;
}
.admin-body dialog::backdrop {
  background: rgb(42 24 30 / 38%);
  backdrop-filter: blur(4px);
}
.admin-body .modal-close {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #755861;
}
.admin-body .modal-title {
  color: var(--ink);
  margin-top: 18px;
}
.admin-body .modal-desc {
  color: var(--muted);
  line-height: 1.8;
}
.detail-block {
  background: #f8f0e9;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.upload-zone {
  border-color: #d4afa2;
  border-radius: 10px;
  background: #faf0e7;
  line-height: 1.8;
}
.media-thumb {
  border-radius: 8px;
  overflow: hidden;
}
.module-language {
  border-color: var(--line);
  border-radius: 10px;
  margin-bottom: 14px;
  background: #fffcf8;
}
.admin-body .form-error:not(:empty) {
  border: 1px solid #e6c9c2;
  background: #fbede8;
  color: #963f40;
  padding: 12px 15px;
  border-radius: 8px;
}
.admin-body .notice {
  color: #826d64;
  background: #f6eee5;
  border-radius: 8px;
  padding: 12px 15px;
}
.admin-body #toast {
  border-radius: 12px;
  background: #5d2036;
  box-shadow: 0 8px 28px rgb(61 24 37 / 16%);
  max-width: min(90vw, 560px);
  line-height: 1.7;
}
.admin-body:has(.admin-login) {
  background:
    radial-gradient(ellipse at 14% 20%, #efdfd3 0, transparent 47%),
    radial-gradient(ellipse at 88% 83%, #ecdce0 0, transparent 48%), #f8f3ec;
}
.admin-login {
  width: min(calc(100% - 40px), 520px);
  margin: clamp(32px, 7vh, 88px) auto;
  border: 1px solid #e3d3c8;
  border-radius: 20px;
  background: rgb(255 252 248 / 95%);
  box-shadow: 0 22px 80px rgb(85 41 40 / 7%);
  padding: 44px;
}
.admin-login .admin-brand {
  font-size: 47px;
}
.admin-login .eyebrow {
  margin-top: 40px;
  color: #a47e67;
  font-size: 9px;
  letter-spacing: 1.7px;
}
.admin-login h1 {
  color: var(--ink);
  font-size: 33px;
  line-height: 1.6;
  margin: 20px 0 30px;
}
.admin-login h1 em {
  color: #a67c6b;
}
.admin-login .button {
  width: 100%;
  min-height: 48px;
}
.admin-login .text-link {
  font-size: 12px;
  color: #8d7173;
  margin-top: 22px;
}
.admin-body
  :is(
    .insight-grid > article,
    .analytics-card,
    .date-slot-panel,
    .notification-status,
    .location-settings
  ) {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--workspace-surface);
  box-shadow: var(--workspace-shadow);
  min-width: 0;
}
.admin-body
  :is(
    .insight-grid h2,
    .analytics-card h2,
    .calendar-header h2,
    .settings-section h2,
    .date-slot-heading h2
  ) {
  color: var(--ink);
  font-size: 22px;
  line-height: 1.5;
}
.insight-grid > article > strong {
  color: var(--ink);
  font-size: 54px;
}
.metric-row {
  font-size: 12px;
  color: #826770;
  padding-block: 12px;
}
.metric-row progress {
  height: 5px;
  accent-color: #a87964;
}
.trend-chart {
  padding-top: 16px;
}
.trend-bar {
  background: #a5717b;
  border-radius: 3px 3px 0 0;
}
.trend-column small,
.trend-value {
  color: #866e74;
  font-variant-numeric: tabular-nums;
}
.calendar-header {
  gap: 18px;
  flex-wrap: wrap;
}
.calendar-header h2 {
  margin-bottom: 0;
}
.calendar-controls {
  flex-wrap: wrap;
}
.calendar-grid {
  border-radius: 12px;
  border-color: var(--line);
  overflow: hidden;
  background: var(--line);
}
.week-heading {
  background: #f0e4dc;
  color: #8d716c;
}
.calendar-day {
  background: #fffcf8;
  min-width: 0;
  transition:
    background-color 180ms ease,
    box-shadow 180ms ease;
}
.calendar-day.selected {
  background: #f0ded7;
  box-shadow: inset 0 0 0 1px #bc8a79;
}
.calendar-day.today .day-number {
  color: #843b50;
}
.calendar-chip {
  border-radius: 4px;
  padding: 3px 6px;
}
.day-agenda h3 {
  font-size: 16px;
  color: var(--ink);
  font-weight: 500;
}
.agenda-item {
  background: var(--workspace-surface);
  border-color: var(--line);
  border-radius: 10px;
  padding: 18px;
}
.agenda-item > strong {
  color: #975d66;
  font-variant-numeric: tabular-nums;
}
.agenda-item > span:nth-child(2) {
  min-width: 0;
  overflow-wrap: anywhere;
}
.studio-settings {
  max-width: 960px;
}
.settings-section {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffcf8;
  padding: 26px;
  margin-bottom: 22px;
}
.settings-section .notice {
  background: #f5eee5;
}
.service-settings,
.location-settings {
  padding: 22px;
  border-radius: 10px;
  background: #f9f2e9;
}
.service-settings h3,
.schedule-form h3 {
  color: var(--ink);
}
.date-slot-status {
  flex-wrap: wrap;
}
.date-slot-chip {
  border-radius: 7px;
}
.date-slot-panel:focus-within {
  border-color: #caa99b;
}
.reset-code {
  background: #f7eee7;
  border-radius: 10px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.notification-status {
  color: var(--muted);
}
@media (hover: hover) {
  .admin-sidebar nav button:not(.active):hover {
    background: #e9dad2;
    color: var(--ink);
  }
  .admin-body .button:not(:disabled):hover {
    background: #79364d;
    border-color: #79364d;
    box-shadow: 0 5px 14px rgb(93 32 54 / 13%);
  }
  .admin-body .small-button:not(:disabled):hover {
    background: #f3e6df;
    border-color: #cdaaa0;
  }
  .admin-body tbody tr:hover {
    background: #fcf5ee;
  }
  .admin-body .modal-close:hover {
    background: #f0e1db;
  }
  .admin-body .text-link:hover {
    color: var(--ink);
    text-decoration: underline;
  }
  .upload-zone:hover {
    background: #f5e5d8;
  }
  .calendar-day:not(.selected):hover {
    background: #f7ece3;
  }
  .agenda-item:hover {
    background: #faf0e8;
    border-color: #d1b6aa;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .admin-content,
  .admin-login,
  .admin-body dialog[open] {
    animation: workspace-enter 300ms ease both;
  }
  .admin-body :is(.button, .small-button):not(:disabled):active {
    transform: translateY(1px);
  }
  @keyframes workspace-enter {
    from {
      opacity: 0.65;
      transform: translateY(7px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
@media (max-width: 1100px) {
  .admin-sidebar {
    width: 210px;
    padding-inline: 16px;
  }
  .admin-main {
    margin-left: 210px;
  }
  .stat-grid {
    gap: 10px;
  }
  .stat-grid > div {
    padding: 19px 17px;
  }
  .stat-grid strong {
    font-size: 42px;
  }
}
@media (max-width: 760px) {
  .admin-sidebar {
    position: relative;
    width: 100%;
    height: auto;
    padding: 24px 18px 14px;
    border-right: 0;
    border-bottom: 1px solid #e0cec4;
  }
  .admin-sidebar .admin-brand {
    font-size: 34px;
  }
  .admin-sidebar .admin-brand span {
    font-size: 8px;
    margin-top: 8px;
  }
  .admin-sidebar .sidebar-label,
  .sidebar-bottom small {
    display: none;
  }
  .admin-sidebar nav {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    margin: 22px -4px 0;
    padding: 4px;
    gap: 5px;
    scrollbar-width: none;
  }
  .admin-sidebar nav::-webkit-scrollbar {
    display: none;
  }
  .admin-sidebar nav button {
    width: auto;
    white-space: nowrap;
    padding: 10px 14px;
    font-size: 12px;
    gap: 8px;
  }
  .admin-sidebar nav i {
    display: none;
  }
  .admin-sidebar .sidebar-bottom {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    border: 0;
    padding: 0;
    margin-top: 10px;
    gap: 0 16px;
  }
  .sidebar-bottom :is(a, button) {
    font-size: 10px;
    min-height: 36px;
  }
  .admin-main {
    margin-left: 0;
  }
  .admin-topbar {
    display: none;
  }
  .admin-content {
    padding: 28px 18px 64px;
  }
  .admin-title {
    display: flex;
    align-items: flex-start;
    gap: 12px;
  }
  .admin-title h1 {
    font-size: 24px;
  }
  .admin-title > .small-button {
    margin-top: 0;
    font-size: 11px;
    padding: 10px 12px;
  }
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 24px 0;
  }
  .stat-grid > div,
  .stat-grid > div:nth-child(2),
  .stat-grid > div:last-child {
    border: 1px solid var(--line);
    padding: 18px;
  }
  .stat-grid small {
    display: block;
    font-size: 8px;
  }
  .table-toolbar {
    padding: 12px;
    gap: 9px;
  }
  .table-toolbar input#search {
    flex: 1 1 100%;
    width: 100%;
    max-width: none;
  }
  .table-toolbar :is(select, input[type="date"]) {
    min-width: 0;
    flex: 1 1 40%;
  }
  .table-toolbar .button {
    margin-left: 0;
  }
  .admin-body
    :is(
      .field input,
      .field select,
      .field textarea,
      .table-toolbar input,
      .table-toolbar select
    ) {
    font-size: 16px;
  }
  .admin-work-image {
    height: 220px;
  }
  .admin-body dialog {
    padding: 28px 22px;
    max-height: 92dvh;
    border-radius: 14px;
  }
  .detail-block {
    padding: 18px;
  }
  .admin-body .form-grid {
    grid-template-columns: 1fr;
  }
  .settings-section {
    padding: 20px;
  }
  .service-settings,
  .location-settings {
    padding: 16px;
  }
  .insight-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .insight-grid > article,
  .analytics-card {
    padding: 22px;
  }
  .calendar-header {
    align-items: flex-start;
  }
  .calendar-controls .small-button {
    padding-inline: 11px;
    font-size: 11px;
  }
}
@media (max-width: 440px) {
  .admin-title {
    flex-direction: column;
  }
  .admin-title > .small-button {
    align-self: flex-start;
  }
  .admin-work-grid {
    grid-template-columns: 1fr;
  }
  .admin-work-image {
    height: 300px;
  }
  .admin-login {
    width: calc(100% - 28px);
    margin-block: 24px;
    padding: 30px 24px;
  }
  .admin-login h1 {
    font-size: 29px;
  }
  .admin-body .confirm-actions > * {
    flex: 1 1 auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  .admin-body *,
  .admin-body *::before,
  .admin-body *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
