:root {
  --ink: #252630;
  --muted: #888993;
  --gold: #bc963f;
  --gold-dark: #92712c;
  --paper: #fff;
  --canvas: #f7f6f2;
  --line: #eeece6;
  --nav: #0d1018;
  --green: #31866a;
  --red: #bd5552;
  --blue: #557ca9;
  --shadow: 0 10px 28px #20202a0a;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font:
    14px/1.65 'Roza Arabic',
    'Noto Sans Arabic',
    Tahoma,
    Arial,
    sans-serif;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
.app-shell {
  min-height: 100vh;
}
.sidebar {
  position: fixed;
  z-index: 10;
  inset: 0 0 0 auto;
  width: 258px;
  background: var(--nav);
  color: #c9cad0;
  display: flex;
  flex-direction: column;
  padding: 24px 17px 14px;
  overflow: auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 3px 6px 22px;
  color: #fff;
}
.brand img {
  width: 43px;
  height: 43px;
  object-fit: cover;
  border-radius: 13px;
  border: 1px solid #ffffff28;
}
.brand b {
  display: block;
  font-size: 18px;
  letter-spacing: 0.2px;
}
.brand small {
  display: block;
  font-size: 10px;
  color: #8c8e99;
  margin-top: 1px;
}
.workspace {
  border: 1px solid #ffffff13;
  background: #ffffff08;
  border-radius: 10px;
  padding: 10px 12px;
  margin: 0 0 19px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}
.online-dot,
.env-note i {
  width: 7px;
  height: 7px;
  border-radius: 100%;
  background: #51bd8b;
  display: inline-block;
}
.workspace-tag {
  margin-right: auto;
  color: #9ba09f;
  font-size: 10px;
}
.nav-group {
  margin: 0 0 12px;
}
.nav-label {
  font-size: 9px;
  color: #70727e;
  padding: 6px 12px 4px;
  letter-spacing: 0.5px;
}
.nav-link {
  height: 38px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 12px;
  border-radius: 8px;
  color: #aeb0b9;
  font-size: 12px;
  margin: 2px 0;
  transition: 0.18s;
}
.nav-link:hover {
  background: #ffffff0c;
  color: #fff;
}
.nav-link.active {
  background: #bc963f20;
  color: #e3c373;
  box-shadow: inset -2px 0 var(--gold);
}
.nav-icon {
  width: 17px;
  text-align: center;
  font-size: 15px;
  opacity: 0.88;
}
.nav-count {
  margin-right: auto;
  background: #342a19;
  color: #e2c77e;
  padding: 0 7px;
  border-radius: 10px;
  font-size: 9px;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 18px;
}
.env-note {
  font-size: 10px;
  color: #8e909a;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px 13px;
}
.env-note i {
  background: #c89d45;
}
.profile {
  width: 100%;
  border: 0;
  background: #ffffff09;
  border-radius: 10px;
  color: #fff;
  display: flex;
  align-items: center;
  text-align: right;
  padding: 9px;
  gap: 9px;
}
.profile b {
  font-size: 11px;
  display: block;
}
.profile small {
  font-size: 9px;
  color: #9a9ca4;
  display: block;
}
.avatar,
.top-avatar {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #ead7a7;
  color: #493716;
  width: 31px;
  height: 31px;
  font-weight: 700;
}
.dots {
  margin-right: auto;
  color: #9b9ca4;
  font-size: 19px;
}
.main-area {
  margin-right: 258px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.topbar {
  height: 65px;
  position: sticky;
  top: 0;
  z-index: 6;
  background: #f7f6f2ed;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #eae8e1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 36px;
}
.crumb {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 11px;
  color: #9899a1;
}
.crumb b {
  font-weight: 400;
  color: #d0cec6;
}
.crumb strong {
  font-weight: 600;
  color: #42434c;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 17px;
}
.today {
  font-size: 10px;
  color: #85868e;
}
.icon-button {
  position: relative;
  width: 34px;
  height: 34px;
  border: 1px solid #e8e6df;
  background: #fff;
  border-radius: 9px;
  color: #565760;
  display: grid;
  place-items: center;
  font-size: 16px;
}
.icon-button:hover {
  border-color: #c5a75f;
  color: var(--gold-dark);
}
.notify-dot {
  width: 6px;
  height: 6px;
  position: absolute;
  top: 6px;
  right: 7px;
  border-radius: 50%;
  background: #d0685c;
}
.top-avatar {
  width: 29px;
  height: 29px;
  font-size: 12px;
}
.mobile-menu {
  display: none;
}
.page-view {
  width: min(1320px, 100%);
  padding: 28px 36px 35px;
  margin: 0 auto;
  flex: 1;
}
.footer {
  display: flex;
  justify-content: space-between;
  color: #a0a0a2;
  font-size: 9px;
  padding: 14px 36px;
  border-top: 1px solid #eae8e1;
}
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}
.page-head h1 {
  margin: 0;
  font-size: 23px;
  letter-spacing: -0.4px;
  font-weight: 700;
}
.page-head p {
  margin: 4px 0 0;
  color: #919198;
  font-size: 11px;
}
.eyebrow {
  color: var(--gold-dark);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.4px;
  margin-bottom: 4px;
}
.head-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.btn {
  border: 1px solid #e8e6df;
  background: #fff;
  padding: 8px 13px;
  border-radius: 8px;
  color: #555660;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 35px;
}
.btn:hover {
  border-color: #cbb77f;
}
.btn.primary {
  background: var(--gold);
  border-color: var(--gold);
  color: white;
  font-weight: 600;
}
.btn.primary:hover {
  background: #a98432;
}
.btn.soft {
  background: #fbf8ef;
  color: #876921;
  border-color: #eee5cf;
}
.btn.danger {
  color: #b65d58;
  background: #fff9f8;
  border-color: #f0d9d7;
}
.btn.small {
  min-height: 28px;
  padding: 5px 9px;
  font-size: 10px;
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.card {
  background: #fff;
  border: 1px solid #efede7;
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 17px;
  border-bottom: 1px solid #f2f0eb;
}
.card-head h2,
.card-head h3 {
  font-size: 12px;
  margin: 0;
  font-weight: 700;
}
.card-head p {
  font-size: 9px;
  color: #96969c;
  margin: 3px 0 0;
}
.card-body {
  padding: 16px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 15px;
}
.stat-card {
  padding: 15px 16px;
  position: relative;
  overflow: hidden;
}
.stat-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #92939b;
  font-size: 10px;
}
.stat-icon {
  width: 31px;
  height: 31px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: #f8f3e8;
  color: #a47e2e;
  font-size: 15px;
}
.stat-value {
  font-size: 22px;
  font-weight: 700;
  margin-top: 9px;
  line-height: 1.2;
}
.stat-meta {
  font-size: 9px;
  color: #9a9ba2;
  margin-top: 7px;
}
.trend {
  color: var(--green);
  font-size: 9px;
  margin-right: 5px;
}
.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.8fr);
  gap: 13px;
  margin-bottom: 14px;
}
.chart-wrap {
  height: 190px;
  padding: 12px 16px 5px;
}
.chart-wrap svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.chart-grid {
  stroke: #f1efe9;
  stroke-width: 1;
}
.chart-line {
  fill: none;
  stroke: var(--gold);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.chart-fill {
  fill: url(#chart-fill);
}
.chart-point {
  fill: #fff;
  stroke: var(--gold);
  stroke-width: 2;
}
.chart-labels {
  display: flex;
  justify-content: space-between;
  color: #a1a1a7;
  font-size: 8px;
  padding: 0 15px 12px;
}
.legend {
  font-size: 9px;
  color: #85868e;
}
.legend i {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--gold);
  border-radius: 50%;
  margin-left: 6px;
}
.mini-list {
  display: grid;
  gap: 0;
}
.mini-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid #f3f1ed;
}
.mini-row:last-child {
  border: 0;
}
.mini-date {
  background: #f8f6f1;
  border-radius: 8px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 8px;
  color: #8d8e95;
  line-height: 1.3;
}
.mini-date b {
  font-size: 14px;
  color: #555;
}
.mini-row-main {
  flex: 1;
  min-width: 0;
}
.mini-row-main b {
  display: block;
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mini-row-main small {
  color: #9a9ba2;
  font-size: 9px;
}
.mini-row .arrow {
  color: #b8b8bc;
}
.lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(230px, 0.85fr);
  gap: 13px;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
  font-size: 10px;
}
th {
  text-align: right;
  color: #9899a0;
  font-weight: 500;
  background: #fcfbf8;
  padding: 10px 12px;
  border-bottom: 1px solid #f0eee8;
}
td {
  padding: 11px 12px;
  border-bottom: 1px solid #f3f1ed;
  color: #5b5c65;
}
tr:last-child td {
  border: 0;
}
.table-link {
  font-weight: 700;
  color: #444650;
}
.muted {
  color: #96969d;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 20px;
  padding: 3px 8px;
  font-size: 9px;
  background: #f5f4f0;
  color: #777;
}
.status:before {
  content: '';
  width: 5px;
  height: 5px;
  background: currentColor;
  border-radius: 50%;
}
.status.green {
  background: #edf7f2;
  color: #348365;
}
.status.gold {
  background: #fbf5e7;
  color: #9d7a2a;
}
.status.red {
  background: #fcf0ef;
  color: #b65e59;
}
.status.blue {
  background: #eef4fa;
  color: #587da4;
}
.status.gray {
  background: #f2f2f2;
  color: #85868c;
}
.task {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid #f3f1ed;
}
.task:last-child {
  border: 0;
}
.task input {
  accent-color: var(--gold);
  margin-top: 4px;
}
.task b {
  font-size: 10px;
  display: block;
}
.task small {
  font-size: 9px;
  color: #9b9ca2;
}
.timeline {
  position: relative;
  padding-right: 17px;
}
.timeline:before {
  content: '';
  position: absolute;
  right: 4px;
  top: 5px;
  bottom: 5px;
  width: 1px;
  background: #eee9dc;
}
.timeline-item {
  position: relative;
  padding: 0 0 17px 0;
}
.timeline-item:before {
  content: '';
  position: absolute;
  right: -17px;
  top: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px #f7f3e9;
}
.timeline-item b {
  font-size: 10px;
  display: block;
}
.timeline-item small {
  color: #999aa1;
  font-size: 9px;
}
.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid #f0eee8;
}
.field,
.select,
.search {
  height: 35px;
  border: 1px solid #e9e7e0;
  border-radius: 8px;
  background: #fff;
  padding: 0 10px;
  color: #51525b;
  font-size: 10px;
  outline: none;
}
.field:focus,
.select:focus,
.search:focus,
textarea:focus {
  border-color: #c6a65a;
  box-shadow: 0 0 0 3px #bc963f18;
}
.search {
  min-width: 200px;
}
.filters .spacer {
  flex: 1;
}
.table-actions {
  display: flex;
  gap: 5px;
}
.table-actions .btn {
  min-height: 25px;
  padding: 3px 7px;
  font-size: 9px;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 15px;
  font-size: 9px;
  color: #999;
}
.tabs {
  display: flex;
  gap: 5px;
  padding: 4px;
  background: #f4f3ef;
  border-radius: 9px;
  width: max-content;
  margin-bottom: 15px;
}
.tab {
  border: 0;
  background: transparent;
  padding: 7px 12px;
  border-radius: 7px;
  color: #85858d;
  font-size: 10px;
}
.tab.active {
  background: #fff;
  box-shadow: 0 2px 5px #0000000b;
  color: #393a43;
  font-weight: 600;
}
.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
  gap: 14px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.form-field {
  display: grid;
  gap: 5px;
}
.form-field.full {
  grid-column: 1/-1;
}
.form-field label {
  font-size: 10px;
  color: #73747d;
}
.form-field input,
.form-field select,
.form-field textarea {
  border: 1px solid #e9e7e0;
  border-radius: 8px;
  background: #fff;
  padding: 9px 10px;
  font-size: 11px;
  color: #44454e;
  min-width: 0;
  outline: none;
}
.form-field textarea {
  min-height: 80px;
  resize: vertical;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  margin-top: 15px;
}
.detail-hero {
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 15px;
}
.detail-monogram {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #f4eddb;
  color: #886d30;
  font-weight: 700;
  font-size: 20px;
}
.detail-hero h2 {
  margin: 0;
  font-size: 16px;
}
.detail-hero p {
  margin: 3px 0;
  color: #95969d;
  font-size: 10px;
}
.detail-hero .status {
  margin-right: auto;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.detail-cell {
  padding: 12px;
  background: #fcfbf9;
  border-radius: 8px;
}
.detail-cell small {
  display: block;
  font-size: 9px;
  color: #999;
}
.detail-cell b {
  font-size: 11px;
  display: block;
  margin-top: 3px;
}
.segmented {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.check-option {
  display: flex;
  align-items: center;
  gap: 7px;
  background: #fcfbf8;
  border: 1px solid #efede6;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 10px;
}
.check-option input {
  accent-color: var(--gold);
}
.notice {
  padding: 11px 13px;
  background: #fbf7eb;
  border: 1px solid #f0e8d3;
  border-radius: 9px;
  color: #88703c;
  font-size: 10px;
  margin: 12px 0;
}
.notice.info {
  background: #f2f6fa;
  border-color: #e2eaf2;
  color: #627c96;
}
.notice.danger {
  background: #fcf3f1;
  border-color: #f0dfdc;
  color: #a75c56;
}
.empty {
  padding: 42px 15px;
  text-align: center;
  color: #96969d;
  font-size: 11px;
}
.empty b {
  display: block;
  color: #555;
  margin-bottom: 5px;
}
.metric-strip {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.metric-chip {
  background: #faf9f6;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 10px;
  color: #777;
}
.metric-chip b {
  color: #34353e;
  margin-right: 6px;
}
.calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  padding: 14px;
}
.calendar-head,
.calendar-day {
  padding: 8px 4px;
  text-align: center;
  font-size: 9px;
}
.calendar-head {
  color: #9a9aa0;
}
.calendar-day {
  background: #fcfbf9;
  border-radius: 8px;
  min-height: 47px;
  color: #595a63;
  text-align: right;
  padding: 6px;
}
.calendar-day.today {
  background: #f7f0df;
  border: 1px solid #e8d9b5;
}
.calendar-day.has-event:after {
  content: '';
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  margin-top: 5px;
}
.calendar-day.dim {
  color: #c5c5c8;
}
.chart-bars {
  height: 150px;
  display: flex;
  align-items: end;
  gap: 14px;
  padding: 10px 12px;
}
.bar-group {
  height: 100%;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: end;
  flex-direction: column;
  gap: 6px;
}
.bar {
  width: min(26px, 70%);
  border-radius: 5px 5px 0 0;
  background: #d4bd83;
  min-height: 4px;
}
.bar.alt {
  background: #e9e4d7;
}
.bar-group small {
  font-size: 8px;
  color: #999;
}
.switch-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #f1efe9;
}
.switch-row b {
  font-size: 10px;
}
.switch-row small {
  display: block;
  color: #999;
  font-size: 9px;
}
.switch {
  appearance: none;
  width: 33px;
  height: 18px;
  border-radius: 10px;
  background: #d9d9d9;
  position: relative;
  cursor: pointer;
}
.switch:checked {
  background: var(--gold);
}
.switch:before {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  top: 2px;
  right: 2px;
  background: #fff;
  border-radius: 50%;
  transition: 0.15s;
}
.switch:checked:before {
  right: 17px;
}
.toast-root {
  position: fixed;
  z-index: 99;
  bottom: 20px;
  left: 20px;
  display: grid;
  gap: 7px;
}
.toast {
  background: #20212a;
  color: #fff;
  border-radius: 9px;
  padding: 10px 14px;
  box-shadow: 0 8px 25px #0002;
  font-size: 11px;
  animation: toast-in 0.2s ease;
}
.toast.error {
  background: #a94c49;
}
.toast.success {
  background: #287458;
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.modal {
  border: 1px solid #e8e5dc;
  border-radius: 14px;
  padding: 0;
  width: min(560px, calc(100vw - 28px));
  box-shadow: 0 20px 70px #0003;
}
.modal::backdrop {
  background: #17192266;
  backdrop-filter: blur(2px);
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 18px;
  border-bottom: 1px solid #efede6;
}
.modal-head h2 {
  font-size: 14px;
  margin: 0;
}
.modal #modal-body {
  padding: 18px;
}
.modal:has(.catalog-editor) {
  width: min(880px, calc(100vw - 28px));
}
.modal:has(.catalog-editor) .modal-head {
  position: sticky;
  inset-block-start: 0;
  z-index: 1;
  background: var(--paper);
}
.catalog-editor-section {
  min-inline-size: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.catalog-editor > .full,
.catalog-editor-section .form-grid > .full,
[data-form='stock-save'] > .full {
  grid-column: 1 / -1;
}
.catalog-editor-section legend {
  padding-inline: 7px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}
.catalog-editor-section p,
.catalog-copy-note,
.catalog-error {
  margin: 0;
}
.catalog-editor-section .catalog-lines + button {
  margin-block-start: 8px;
}
.catalog-editor .form-actions {
  flex-wrap: wrap;
  margin-block-start: 0;
}
.catalog-editor .form-field,
.catalog-editor .form-field input,
.catalog-editor .form-field select,
.catalog-editor .form-field textarea {
  font-size: 12px;
}
.catalog-editor .form-field input:focus,
.catalog-editor .form-field select:focus,
.catalog-editor .form-field textarea:focus,
.catalog-library .search:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}
.catalog-editor .form-field small,
.catalog-cell-photo small,
.catalog-library-item small,
.catalog-component-name small {
  display: block;
  color: var(--muted);
}
.catalog-lines {
  display: grid;
  gap: 8px;
}
.catalog-lines:not(:empty) {
  margin-block-start: 10px;
}
.catalog-line {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.5fr) minmax(76px, 0.55fr) auto;
  align-items: end;
  gap: 8px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.album-line {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.3fr) auto;
}
.catalog-line .form-field {
  min-width: 0;
}
.catalog-line .catalog-photo-previews {
  grid-column: 1 / -1;
}
.catalog-line .catalog-photo-previews:empty {
  display: none;
}
.catalog-library-filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.5fr);
  gap: 8px;
  margin-block: 10px;
}
.catalog-library-filters input,
.catalog-library-filters select {
  min-width: 0;
  width: 100%;
}
.catalog-library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 7px;
  max-height: 240px;
  overflow-y: auto;
}
.catalog-library-item,
.catalog-component-name,
.catalog-cell-photo {
  display: flex;
  align-items: center;
  gap: 9px;
}
.catalog-library-item {
  padding: 6px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 9px;
  text-align: start;
}
.catalog-library-item:hover,
.catalog-library-item:focus-visible {
  border-color: var(--gold);
}
.catalog-library-item[hidden] {
  display: none;
}
.form-field[hidden],
.switch-row[hidden] {
  display: none;
}
.directory-assigned {
  display: block;
}
.catalog-add-mark {
  margin-inline-start: auto;
  color: var(--gold-dark);
}
.catalog-library-item img,
.catalog-component-name img,
.catalog-cell-photo img,
.catalog-photo-placeholder {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 7px;
  object-fit: cover;
}
.catalog-cell-photo img,
.catalog-cell-photo .catalog-photo-placeholder {
  width: 63px;
}
.catalog-photo-placeholder {
  display: grid;
  place-items: center;
  color: var(--gold-dark);
  background: #f7f2e4;
}
.catalog-photo-placeholder svg {
  width: 18px;
  height: 18px;
}
.catalog-photo-previews {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.catalog-photo-tile {
  position: relative;
  width: 94px;
  height: 62px;
}
.catalog-photo-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}
.catalog-photo-tile button {
  position: absolute;
  inset-block-start: 3px;
  inset-inline-end: 3px;
  padding: 0;
  width: 24px;
  height: 24px;
  min-height: 0;
  line-height: 1;
}
.catalog-status,
.catalog-copy-note,
.catalog-error {
  border-radius: 8px;
  padding: 4px 8px;
  background: #f4f0e4;
  color: #705b2c;
}
.catalog-status.published {
  background: #eaf5ee;
  color: #23694f;
}
.catalog-error {
  background: #fbeceb;
  color: #882d27;
}
@media (max-width: 600px) {
  .catalog-line {
    grid-template-columns: minmax(0, 1fr) minmax(66px, 0.6fr);
  }
  .catalog-line > :first-child {
    grid-column: 1/-1;
  }
  .catalog-line > button {
    justify-self: start;
  }
}
.role-picker {
  display: flex;
  align-items: center;
  gap: 10px;
}
.denied-card {
  max-width: 600px;
  margin: 45px auto;
  text-align: center;
  padding: 35px;
}
.denied-icon {
  font-size: 35px;
  color: #bf6a61;
}
.denied-card h2 {
  margin: 8px 0;
}
.denied-card p {
  font-size: 11px;
  color: #94949a;
}
@media (max-width: 1100px) {
  .sidebar {
    width: 226px;
  }
  .main-area {
    margin-right: 226px;
  }
  .topbar {
    padding: 0 24px;
  }
  .page-view {
    padding: 24px;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 760px) {
  .sidebar {
    transform: translateX(105%);
    transition: transform 0.22s;
    width: min(290px, 85vw);
    box-shadow: -12px 0 40px #0002;
  }
  .sidebar.open {
    transform: none;
  }
  .backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: #1115;
    z-index: 9;
  }
  .backdrop.show {
    display: block;
  }
  .main-area {
    margin: 0;
  }
  .topbar {
    height: 57px;
    padding: 0 14px;
  }
  .mobile-menu {
    display: grid;
  }
  .crumb {
    margin-left: auto;
    margin-right: 10px;
  }
  .today {
    display: none;
  }
  .top-actions {
    gap: 9px;
  }
  .page-view {
    padding: 20px 14px;
  }
  .page-head {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 16px;
    gap: 12px;
  }
  .page-head h1 {
    font-size: 20px;
  }
  .head-actions {
    width: 100%;
  }
  .dash-grid,
  .lower-grid,
  .content-grid {
    grid-template-columns: 1fr;
  }
  .stats-grid {
    gap: 8px;
  }
  .stat-card {
    padding: 12px;
  }
  .stat-value {
    font-size: 19px;
  }
  .footer {
    padding: 12px 14px;
    gap: 6px;
    flex-direction: column;
  }
  .detail-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .search {
    min-width: 150px;
    flex: 1;
  }
  .table-wrap {
    margin-inline: -1px;
  }
  .chart-wrap {
    height: 160px;
  }
}
@media (max-width: 420px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stat-card {
    padding: 10px;
  }
  .stat-top {
    font-size: 9px;
  }
  .stat-icon {
    width: 27px;
    height: 27px;
  }
  .stat-value {
    font-size: 17px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-field.full {
    grid-column: auto;
  }
  .detail-grid {
    grid-template-columns: 1fr 1fr;
  }
  .head-actions .btn {
    flex: 1;
  }
}
/* Keep small screens within the viewport; tab strips and data tables scroll internally. */
html,
body,
.app-shell,
.main-area,
.page-view {
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
}
.tabs {
  max-width: 100%;
  overflow-x: auto;
}
.card,
.card-head,
.content-grid,
.dash-grid,
.lower-grid {
  min-width: 0;
  max-width: 100%;
}
.table-wrap {
  max-width: 100%;
  overflow-x: auto;
}
.search {
  min-width: min(200px, 100%);
}
@media (max-width: 760px) {
  .topbar {
    gap: 8px;
  }
  .crumb {
    overflow: hidden;
  }
  .page-head {
    min-width: 0;
  }
  .page-head > div:first-child {
    min-width: 0;
  }
  .head-actions {
    max-width: 100%;
  }
  .card-head {
    gap: 8px;
  }
  .content-grid,
  .dash-grid,
  .lower-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .footer {
    min-width: 0;
  }
  .footer span {
    overflow-wrap: anywhere;
  }
}
