:root {
  --primary: #8d2529;
  --secondary: #241b15;
  --accent: #e2c17f;
  --primary-fg: #fffaf0;
  --body-fg: #2b251f;
  --body-bg: #f4f0e8;
  --body-quiet-color: #70675e;
  --body-loud-color: #17130f;
  --header-color: #fffaf0;
  --header-branding-color: #fffaf0;
  --header-bg: #17120e;
  --header-link-color: #fffaf0;
  --breadcrumbs-fg: #ead8b3;
  --breadcrumbs-link-fg: #fffaf0;
  --breadcrumbs-bg: #2b2119;
  --link-fg: #822126;
  --link-hover-color: #5e1519;
  --link-selected-fg: #5e1519;
  --hairline-color: #d9d0c3;
  --border-color: #cfc4b5;
  --error-fg: #b4232a;
  --message-success-bg: #e8f3e7;
  --message-warning-bg: #fff1cf;
  --message-error-bg: #f8dddd;
  --darkened-bg: #ebe4d9;
  --selected-bg: #f3e6cb;
  --selected-row: #fff8e8;
  --button-fg: #fff;
  --button-bg: #8d2529;
  --button-hover-bg: #6f1d21;
  --default-button-bg: #8d2529;
  --default-button-hover-bg: #6f1d21;
  --close-button-bg: #5f5851;
  --close-button-hover-bg: #423c37;
  --delete-button-bg: #a1262d;
  --delete-button-hover-bg: #7d1d22;
}

html[data-theme="dark"] {
  color-scheme: light;
  --body-fg: #2b251f;
  --body-bg: #f4f0e8;
  --darkened-bg: #ebe4d9;
  --selected-bg: #f3e6cb;
  --selected-row: #fff8e8;
}

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

#header {
  min-height: 4.5rem;
  padding: 0.6rem clamp(1rem, 3vw, 2.5rem);
  border-bottom: 2px solid #b58a43;
}

#branding,
#site-name {
  display: flex;
  align-items: center;
}

.tomris-admin-brand {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  color: #fffaf0 !important;
  text-decoration: none;
}

.tomris-admin-brand__name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.65rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.tomris-admin-brand__label {
  color: #d9bc82;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.admin-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.admin-nav-actions form {
  margin: 0;
}

.admin-nav-actions a,
.admin-nav-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.35rem;
  padding: 0.35rem 0.9rem;
  border: 1px solid #b58a43;
  border-radius: 0;
  background: transparent;
  color: #fffaf0 !important;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

.admin-nav-actions a:hover,
.admin-nav-actions a:focus-visible,
.admin-nav-actions button:hover,
.admin-nav-actions button:focus-visible {
  background: #b58a43;
  color: #17120e !important;
}

div.breadcrumbs {
  padding-inline: clamp(1rem, 3vw, 2.5rem);
}

#content {
  padding: clamp(1.25rem, 3vw, 2.5rem);
}

#content h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.admin-welcome {
  position: relative;
  overflow: hidden;
  margin-bottom: 1.5rem;
  padding: clamp(1.5rem, 4vw, 3rem);
  border-left: 5px solid #b58a43;
  background: #201812;
  color: #fffaf0;
  box-shadow: 0 14px 35px rgba(47, 32, 22, 0.12);
}

.admin-welcome::after {
  position: absolute;
  right: -3rem;
  bottom: -4.5rem;
  width: 12rem;
  height: 12rem;
  border: 1px solid rgba(226, 193, 127, 0.25);
  border-radius: 50%;
  content: "";
}

.admin-welcome__eyebrow {
  margin: 0 0 0.5rem;
  color: #d9bc82;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.admin-welcome h1 {
  margin: 0 0 0.7rem;
  color: #fffaf0;
}

.admin-welcome > p:not(.admin-welcome__eyebrow) {
  max-width: 44rem;
  margin: 0;
  color: #ded3c2;
  font-size: 1rem;
  line-height: 1.65;
}

.admin-quick-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.5rem;
}

.admin-quick-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  padding: 0.55rem 1rem;
  border: 1px solid #7b6a58;
  color: #fffaf0;
  font-weight: 700;
  text-decoration: none;
}

.admin-quick-actions a:hover,
.admin-quick-actions a:focus-visible {
  border-color: #e2c17f;
  background: rgba(226, 193, 127, 0.1);
}

.admin-quick-actions .admin-quick-actions__primary {
  border-color: #9b292e;
  background: #9b292e;
}

.module,
.inline-group {
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: 0;
  background: #fff;
  box-shadow: 0 8px 24px rgba(47, 32, 22, 0.06);
}

.module h2,
.module caption,
.inline-group h2 {
  padding: 0.8rem 1rem;
  background: #30251d;
  color: #fffaf0;
  font-weight: 700;
}

.menu-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.26rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  white-space: nowrap;
}

.menu-status::before {
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.menu-status--visible {
  background: #e4f2e3;
  color: #27672d;
}

.menu-status--hidden {
  background: #eee9e3;
  color: #6e6258;
}

.admin-product-thumb {
  display: block;
  width: 3.2rem;
  height: 3.2rem;
  border: 1px solid #c3b7a5;
  object-fit: cover;
}

.admin-product-preview {
  display: block;
  width: min(34rem, 100%);
  max-height: 22rem;
  border: 1px solid #c3b7a5;
  object-fit: cover;
}

.admin-hero-preview {
  display: block;
  width: min(48rem, 100%);
  max-height: 25rem;
  border: 1px solid #c3b7a5;
  object-fit: cover;
}

.form-row {
  padding-block: 1rem;
}

.help,
form .help,
form p.help {
  margin-top: 0.45rem;
  color: #6f655c;
  font-size: 0.82rem;
  line-height: 1.5;
}

input[type="text"],
input[type="number"],
input[type="password"],
input[type="email"],
textarea,
select {
  min-height: 2.7rem;
  border-color: #bfb4a5;
  border-radius: 2px;
}

textarea {
  min-height: 6.5rem;
}

input:focus,
textarea:focus,
select:focus,
a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(181, 138, 67, 0.4);
  outline-offset: 2px;
}

.submit-row {
  border: 1px solid var(--border-color);
  border-radius: 0;
  background: #fff;
}

@media (max-width: 767px) {
  #header {
    align-items: stretch;
    flex-direction: column;
    gap: 0.55rem;
    min-height: 9.25rem !important;
    height: auto !important;
    box-sizing: border-box;
  }

  .tomris-admin-brand {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.1rem;
  }

  .tomris-admin-brand__label {
    font-size: 0.61rem;
  }

  .admin-nav-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .admin-nav-actions .change-password-link {
    display: none;
  }

  .admin-nav-actions a,
  .admin-nav-actions button {
    min-height: 2.75rem;
  }

  #content {
    padding: 1rem;
  }

  .admin-quick-actions {
    display: grid;
  }

  .admin-quick-actions a {
    width: 100%;
    box-sizing: border-box;
  }

  #result_list .column-sort_order,
  #result_list .field-sort_order,
  #result_list .column-updated_at,
  #result_list .field-updated_at,
  #result_list .column-category,
  #result_list .field-category {
    display: none;
  }

  #result_list .column-image_thumbnail {
    width: 3.5rem;
  }

  #result_list .admin-product-thumb {
    width: 2.8rem;
    height: 2.8rem;
  }

  #result_list th,
  #result_list td {
    padding-inline: 0.55rem;
  }

  #result_list .column-name {
    width: 43%;
  }

  #result_list .column-formatted_price {
    width: 24%;
  }

  #result_list .column-menu_status {
    width: 25%;
  }

  .change-list .filtered .results,
  .change-list .filtered .paginator,
  .filtered #toolbar,
  .filtered div.xfull,
  .filtered .actions {
    margin-right: 0;
  }
}
