@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&display=swap');
:root {
  --paper: #f7f6f2;
  --white: #fff;
  --ink: #292c27;
  --muted: #7b7f74;
  --line: #e5e6df;
  --green: #354c3e;
  --pale: #eaf0e9;
  --sand: #eeebe3;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    14px/1.55 'DM Sans',
    sans-serif;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid #69835e;
  outline-offset: 4px;
}
[hidden] {
  display: none !important;
}
.wordmark {
  font:
    32px Georgia,
    serif;
  letter-spacing: 0.17em;
  text-decoration: none;
}
.wordmark small {
  display: block;
  font:
    9px 'DM Sans',
    sans-serif;
  letter-spacing: 0.3em;
  margin-top: 8px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--muted);
  font-weight: 600;
}
.primary,
.secondary,
.small-button {
  border: 1px solid var(--green);
  padding: 12px 20px;
  background: var(--green);
  color: #fff;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 25px;
  border-radius: 5px;
  text-decoration: none;
  white-space: nowrap;
}
.secondary,
.small-button {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.small-button {
  padding: 7px 12px;
  font-size: 12px;
  min-height: 36px;
}
.primary:hover {
  background: #243b2e;
}
.secondary:hover,
.small-button:hover {
  background: var(--sand);
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.text-link {
  font-size: 12px;
  color: var(--muted);
  text-underline-offset: 5px;
}
.login-screen {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  min-height: 100svh;
}
.login-story {
  background:
    linear-gradient(0deg, #222c23bd, #222c2320),
    url('../assets/campaign-beige.webp') center 30% / cover;
  color: white;
  padding: 48px 10%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 720px;
}
.login-story .eyebrow {
  color: #e1dfcf;
}
.login-story h1 {
  font:
    clamp(40px, 4.5vw, 70px)/1.1 Georgia,
    serif;
}
.login-story > span {
  font-size: 10px;
  letter-spacing: 0.15em;
}
.login-box {
  align-self: center;
  width: min(440px, 100%);
  padding: 40px;
  margin: auto;
}
.login-box h2 {
  font:
    38px Georgia,
    serif;
  margin: 14px 0;
}
.login-box > p {
  color: var(--muted);
}
label {
  display: block;
  font-size: 12px;
  font-weight: 600;
}
input,
select,
textarea {
  width: 100%;
  min-width: 0;
  display: block;
  padding: 12px;
  border: 1px solid #dadcd3;
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  margin-top: 7px;
  min-height: 46px;
}
textarea {
  min-height: 95px;
  resize: vertical;
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #aab9a1;
  outline-offset: 1px;
}
.login-box form {
  margin: 30px 0;
}
.login-box label {
  margin-bottom: 18px;
}
.login-box .primary {
  width: 100%;
  justify-content: space-between;
}
.demo-note {
  padding: 18px;
  background: var(--sand);
  border-radius: 6px;
  font-size: 12px;
  margin: 0 0 24px;
}
.demo-note p {
  margin: 6px 0;
}
.demo-note small {
  color: #717466;
}
.app {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  min-height: 100svh;
}
.sidebar {
  background: #f0f0e9;
  border-right: 1px solid var(--line);
  padding: 36px 22px;
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  flex-direction: column;
}
.sidebar .wordmark {
  padding-left: 15px;
}
.nav-label {
  font-size: 9px;
  letter-spacing: 0.17em;
  color: var(--muted);
  margin: 55px 15px 15px;
}
.sidebar nav {
  display: grid;
  gap: 6px;
}
.sidebar nav button {
  border: 0;
  text-align: left;
  padding: 13px 15px;
  background: transparent;
  color: #74796d;
  border-radius: 5px;
  min-height: 46px;
  font-size: 13px;
}
.sidebar nav button span {
  display: inline-block;
  width: 28px;
  font-size: 18px;
}
.sidebar nav button[aria-current='page'] {
  background: #dfe5d9;
  color: #2d422e;
  font-weight: 600;
}
.sidebar-bottom {
  margin-top: auto;
  padding: 24px 15px 0;
  font-size: 11px;
  color: #78806e;
}
.sidebar-bottom p {
  font-family: Georgia, serif;
  font-style: italic;
  margin-top: 20px;
}
.sidebar-bottom a {
  text-decoration: none;
}
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6d875d;
  margin-right: 7px;
}
.main {
  min-width: 0;
}
.topbar {
  height: 80px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px;
  font-size: 11px;
  color: var(--muted);
  background: #fafaf7;
}
.topbar b {
  margin: 0 12px;
  font-weight: 400;
  color: #b3b8a9;
}
.topbar strong {
  font-weight: 500;
  color: var(--ink);
}
.topbar > div {
  display: flex;
  align-items: center;
  gap: 12px;
}
.avatar {
  background: #e7e8df;
  border-radius: 50%;
  height: 30px;
  width: 30px;
  text-align: center;
  line-height: 30px;
  color: #6c7560;
}
.icon-button {
  border: 0;
  background: transparent;
  font-size: 22px;
  min-width: 40px;
  min-height: 44px;
  color: var(--ink);
}
.main-content {
  padding: 24px 40px 0;
  max-width: 1500px;
  margin: auto;
}
.mode-banner {
  padding: 11px 16px;
  border: 1px solid #dfe5d9;
  border-radius: 5px;
  background: #eef2e9;
  font-size: 11px;
  color: #5f6c54;
  line-height: 1.6;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 30px 0;
}
.page-heading h1 {
  font:
    38px/1.2 Georgia,
    serif;
  letter-spacing: -0.04em;
  margin: 9px 0 10px;
}
.page-heading p:last-child {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 25px;
}
.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 23px;
}
.stat small {
  color: var(--muted);
  font-size: 11px;
}
.stat strong {
  display: block;
  font:
    34px Georgia,
    serif;
  margin: 12px 0 6px;
}
.stat p {
  font-size: 10px;
  color: #7f8b70;
  margin: 0;
}
.overview-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 22px;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
}
.panel-head {
  padding: 21px 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.panel-head h2 {
  font-size: 14px;
  font-weight: 500;
  margin: 0;
}
.panel-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}
.mini-list {
  padding: 0 24px;
}
.mini-row {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 17px 0;
  border-bottom: 1px solid #f1f1ed;
}
.mini-row:last-child {
  border: 0;
}
.mini-row img {
  width: 44px;
  height: 56px;
  object-fit: cover;
  border-radius: 3px;
}
.mini-row > div {
  flex: 1;
  min-width: 0;
}
.mini-row strong {
  display: block;
  font-size: 12px;
  font-weight: 500;
}
.mini-row small {
  color: var(--muted);
  font-size: 10px;
}
.badge {
  font-size: 10px;
  display: inline-block;
  padding: 4px 9px;
  border-radius: 4px;
  background: var(--pale);
  color: #4e6848;
  white-space: nowrap;
}
.badge.draft {
  background: #f4eddd;
  color: #937734;
}
.badge.empty {
  background: #f5e8e1;
  color: #a26247;
}
.feature {
  min-height: 290px;
  position: relative;
  background: #d4c8b6;
}
.feature img {
  width: 100%;
  height: 290px;
  object-fit: cover;
  object-position: center 32%;
  display: block;
}
.feature::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent, #24231fab);
}
.feature > div {
  position: absolute;
  bottom: 24px;
  left: 24px;
  right: 24px;
  color: #fff;
  z-index: 1;
}
.feature h2 {
  font:
    28px Georgia,
    serif;
  margin: 7px 0;
}
.feature p {
  font-size: 11px;
  letter-spacing: 0.1em;
}
.feature a {
  font-size: 11px;
  text-underline-offset: 4px;
}
.tip {
  padding: 22px 24px;
  font-size: 12px;
  color: var(--muted);
}
.tip strong {
  display: block;
  color: var(--ink);
  margin-bottom: 7px;
}
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}
.filters {
  display: flex;
  gap: 10px;
  flex: 1;
}
.search {
  max-width: 330px;
}
.filters input,
.filters select {
  margin: 0;
  min-height: 42px;
  font-size: 12px;
}
.filters select {
  max-width: 180px;
}
.table-wrap {
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  white-space: nowrap;
  font-size: 12px;
}
th {
  font-weight: 500;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.07em;
  background: #fafbf8;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 16px 20px;
  border-bottom: 1px solid #f0f1eb;
}
tr:last-child td {
  border: 0;
}
.product-cell {
  display: flex;
  align-items: center;
  gap: 14px;
}
.product-cell img {
  width: 45px;
  height: 59px;
  object-fit: cover;
  border-radius: 3px;
}
.product-cell strong {
  font-weight: 500;
}
.product-cell small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 5px;
}
.row-actions {
  display: flex;
  gap: 7px;
}
.row-actions button {
  min-height: 40px;
}
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}
.empty-state h2 {
  color: var(--ink);
  font:
    25px Georgia,
    serif;
}
.collection-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.collection-card {
  padding: 25px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  min-width: 0;
}
.collection-card h2 {
  font:
    25px Georgia,
    serif;
  overflow-wrap: anywhere;
}
.collection-card p {
  color: var(--muted);
  font-size: 12px;
  min-height: 38px;
}
.collection-card .row-actions {
  margin-top: 24px;
}
.content-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}
.content-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
}
.content-card img,
.content-card video {
  height: 220px;
  width: 100%;
  object-fit: cover;
  background: var(--sand);
  display: block;
}
.content-card > div {
  padding: 22px;
}
.content-card h2 {
  font:
    24px Georgia,
    serif;
  margin: 0 0 9px;
}
.content-card p {
  color: var(--muted);
  font-size: 12px;
}
.settings {
  padding: 28px;
  max-width: 760px;
}
.settings h2 {
  font:
    26px Georgia,
    serif;
}
.settings p {
  color: var(--muted);
  line-height: 1.8;
}
.settings .row-actions {
  flex-wrap: wrap;
  margin-top: 24px;
}
.studio-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 50px;
  padding: 23px 0;
  border-top: 1px solid var(--line);
  font-size: 9px;
  letter-spacing: 0.13em;
  color: #989e8e;
}
.studio-footer span:last-child {
  font:
    italic 12px Georgia,
    serif;
  letter-spacing: 0;
}
dialog {
  width: min(720px, calc(100vw - 32px));
  max-height: 90dvh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0;
  box-shadow: 0 30px 100px #1b251733;
}
dialog::backdrop {
  background: #19201788;
  backdrop-filter: blur(3px);
}
dialog form {
  padding: 28px;
}
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
  margin-bottom: 24px;
}
.dialog-heading h2 {
  font:
    29px Georgia,
    serif;
  margin: 5px 0 0;
}
.dialog-heading p {
  margin: 0;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.full {
  grid-column: 1/-1;
}
.field-help {
  display: block;
  font-size: 10px;
  font-weight: 400;
  color: var(--muted);
  margin-top: 6px;
}
.cms-gallery-editor {
  border-top: 1px solid #d8d2ca;
  padding-top: 20px;
}
.cms-gallery-editor h3 {
  margin: 0 0 8px;
}
.cms-gallery-editor > p {
  font-size: 13px;
  line-height: 1.6;
}
.cms-gallery-list {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}
.cms-gallery-item {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.cms-gallery-item img {
  width: 52px;
  height: 70px;
  object-fit: contain;
  background: white;
  border: 1px solid #d8d2ca;
}
.cms-gallery-item span {
  flex: 1;
  min-width: 70px;
  font-size: 12px;
}
.cms-gallery-item button {
  padding: 8px 10px;
  font-size: 12px;
}
.cms-crop-dialog {
  width: min(560px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  padding: 24px;
  overflow: auto;
}
.cms-crop-dialog h2 {
  margin: 0 0 8px;
  font-size: 23px;
}
.cms-crop-dialog > p {
  font-size: 13px;
  line-height: 1.6;
}
.cms-crop-stage {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #e9e5df;
  border: 1px solid #d8d2ca;
  padding: 8px;
  margin: 16px 0;
}
.cms-crop-stage canvas {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 48dvh;
  background: white;
  touch-action: none;
  cursor: grab;
}
.cms-crop-stage canvas:active {
  cursor: grabbing;
}
.cms-crop-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.cms-crop-controls label {
  display: grid;
  gap: 8px;
  font-size: 13px;
}
.cms-crop-controls input,
.cms-crop-controls select {
  width: 100%;
  min-width: 0;
}
.cms-crop-dialog [data-error] {
  color: #a32828;
}
.upload-preview {
  display: block;
  width: 140px;
  height: 140px;
  object-fit: cover;
  margin-top: 12px;
  border-radius: 6px;
}
.upload-preview[hidden] {
  display: none;
}
.upload-control video.upload-preview {
  width: min(100%, 360px);
  height: auto;
  max-height: 260px;
  object-fit: contain;
  aspect-ratio: 16 / 9;
  background: #1d1b19;
}
#workspace .content-card video {
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
}
.checkbox-label input {
  width: 18px;
  min-height: 18px;
  margin: 0;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 26px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.error {
  color: #9b3e2f;
  background: #fbede7;
  padding: 12px;
  border-radius: 5px;
  white-space: normal;
  font-size: 12px;
}
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  background: #2f4938;
  color: white;
  padding: 14px 24px;
  border-radius: 7px;
  font-size: 12px;
  max-width: calc(100vw - 32px);
  box-shadow: 0 4px 25px #0002;
}
@media (min-width: 761px) and (max-width: 1180px) {
  .app {
    grid-template-columns: 185px minmax(0, 1fr);
  }
  .sidebar {
    padding: 28px 12px;
  }
  .topbar {
    padding-inline: 24px;
  }
  .main-content {
    padding: 22px 24px 0;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .overview-grid {
    grid-template-columns: 1fr;
  }
  .collection-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .content-card img,
  .content-card video {
    height: 180px;
  }
}
@media (max-width: 760px) {
  .login-screen {
    grid-template-columns: 1fr;
  }
  .login-story {
    min-height: 260px;
    padding: 25px 7%;
  }
  .login-story h1 {
    font-size: 32px;
    margin: 20px 0 12px;
  }
  .login-story h1 br {
    display: none;
  }
  .login-story > span,
  .login-story > div > p:last-child {
    display: none;
  }
  .login-box {
    padding: 32px 24px;
  }
  .app {
    display: block;
  }
  .sidebar {
    position: relative;
    min-height: 0;
    height: auto;
    padding: 19px 18px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .sidebar .wordmark {
    font-size: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0;
  }
  .wordmark small {
    margin: 0;
  }
  .nav-label,
  .sidebar-bottom {
    display: none;
  }
  .sidebar nav {
    display: flex;
    overflow-x: auto;
    gap: 4px;
    margin-top: 16px;
    padding-bottom: 12px;
  }
  .sidebar nav button {
    white-space: nowrap;
    padding: 10px 12px;
    font-size: 12px;
    min-height: 44px;
  }
  .sidebar nav button span {
    display: none;
  }
  .topbar {
    height: 58px;
    padding: 0 20px;
  }
  .user-label {
    display: none;
  }
  .main-content {
    padding: 18px 18px 0;
  }
  .page-heading {
    align-items: start;
    gap: 12px;
    flex-wrap: wrap;
    margin: 25px 0;
  }
  .page-heading h1 {
    font-size: 32px;
  }
  .page-heading .primary {
    font-size: 12px;
    padding: 10px 15px;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .stat {
    padding: 17px;
  }
  .stat strong {
    font-size: 30px;
  }
  .overview-grid,
  .collection-cards,
  .content-cards {
    grid-template-columns: 1fr;
  }
  .panel-head,
  .mini-list {
    padding-inline: 18px;
  }
  .toolbar {
    flex-wrap: wrap;
  }
  .filters {
    flex-basis: 100%;
    flex-wrap: wrap;
  }
  .filters input {
    max-width: none;
    flex: 1 1 180px;
  }
  .filters select {
    max-width: none;
    flex: 1 1 120px;
  }
  .toolbar > .primary {
    width: 100%;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .full {
    grid-column: auto;
  }
  dialog form {
    padding: 20px;
  }
  input,
  textarea,
  select {
    font-size: 16px !important;
  }
  .content-card img,
  .content-card video {
    height: 240px;
  }
  .settings {
    padding: 22px;
  }
  .settings .row-actions {
    flex-direction: column;
  }
  .mode-banner {
    font-size: 10px;
  }
  .dialog-actions {
    position: sticky;
    bottom: -20px;
    background: #fff;
    padding-bottom: 18px;
  }
  .toast {
    bottom: max(20px, env(safe-area-inset-bottom));
    width: max-content;
  }
  .small-button {
    min-height: 44px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
.cms-video-crop {
  width: min(94vw, 620px);
  max-height: 94dvh;
  overflow: auto;
  border: 1px solid #29231f;
  border-radius: 10px;
  padding: 22px;
  background: #fffdf9;
}
.cms-video-crop::backdrop {
  background: #0009;
}
.cms-video-crop .video-crop-stage {
  width: min(100%, 360px);
  max-height: 52dvh;
  margin: 12px auto;
  overflow: hidden;
  background: #000;
  touch-action: none;
  cursor: grab;
}
.cms-video-crop video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}
.cms-video-crop label {
  display: grid;
  gap: 5px;
  margin: 10px 0;
}
.cms-video-crop input {
  width: 100%;
}
