:root {
  --brand: #b08a4a;
  --brand-dark: #8c6a38;
  --ink: #1c1614;
  --ink-soft: #7a716b;
  --paper: #f4eee6;
  --line: #eadfd4;
  --white: #fffcf8;
  --shadow: 0 10px 30px -18px rgb(28 22 20 / 0.18);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(900px 420px at 0% -10%, rgb(209 176 122 / 0.2), transparent 55%),
    var(--paper);
  color: var(--ink);
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 14px;
  letter-spacing: -0.01em;
}

a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }

.auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.card {
  width: min(400px, 100%);
  background: var(--white);
  border: 1px solid rgb(255 255 255 / 0.8);
  border-radius: 1.5rem;
  padding: 1.75rem;
  box-shadow: var(--shadow);
}

.brand-logo {
  display: block;
}

.brand-logo img,
img.brand-logo {
  display: block;
  height: 32px;
  width: auto;
}

.muted { color: var(--ink-soft); }

label { display: block; font-size: 0.8rem; color: var(--ink-soft); margin-top: 0.9rem; }

input, select {
  width: 100%;
  margin-top: 0.35rem;
  border: 1px solid var(--line);
  background: #fbf6ef;
  border-radius: 0.75rem;
  padding: 0.7rem 0.85rem;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus, select:focus {
  border-color: rgb(176 138 74 / 0.55);
  box-shadow: 0 0 0 3px rgb(176 138 74 / 0.15);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 0;
  border-radius: 999px;
  padding: 0.65rem 1.1rem;
  cursor: pointer;
  background: linear-gradient(135deg, #d4b07a, #b08a4a 48%, #8c6a38);
  color: white;
  font-size: 0.85rem;
  font-weight: 600;
}

.btn-line {
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid var(--line);
}

.btn-full { width: 100%; margin-top: 1.1rem; }

.error { color: #9b1c1c; font-size: 0.8rem; margin-top: 0.7rem; }
.flash {
  margin: 0 0 0.9rem;
  padding: 0.55rem 0.8rem;
  border-radius: 0.7rem;
  background: #eef6ee;
  color: #2f6a3a;
  font-size: 0.8rem;
}

.shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
}

.side {
  display: flex;
  flex-direction: column;
  padding: 1.1rem 0.85rem 1rem;
  background: #1a1512;
  color: #f7f3ee;
}

.side .brand-logo { padding: 0.25rem 0.5rem 1rem; }
.side .brand-logo img { height: 28px; }

.side nav { display: flex; flex-direction: column; gap: 0.2rem; flex: 1; }

.side a {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.7rem;
  border-radius: 0.7rem;
  color: #d9cbb8;
  font-size: 0.86rem;
}

.side a svg { width: 16px; height: 16px; opacity: 0.8; }

.side a.active {
  background: linear-gradient(135deg, rgb(212 176 122 / 0.28), rgb(140 106 56 / 0.22));
  color: #fff;
}

.side a:hover { background: rgb(255 255 255 / 0.06); color: #fff; }

.side-user {
  margin-top: auto;
  padding: 0.75rem 0.55rem 0;
  border-top: 1px solid rgb(255 255 255 / 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.side-user span { font-size: 0.78rem; color: #d9cbb8; }

.btn-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 0.55rem;
  background: transparent;
  color: #d9cbb8;
  cursor: pointer;
}

.btn-icon:hover { background: rgb(255 255 255 / 0.08); color: #fff; }

.search-wrap {
  position: relative;
  display: block;
  flex: 1;
  min-width: 220px;
  margin: 0;
  font-size: inherit;
  color: inherit;
}

.search-wrap svg {
  position: absolute;
  left: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-soft);
  pointer-events: none;
}

.search-wrap input {
  width: 100%;
  padding-left: 2.15rem;
}

.workspace { min-width: 0; }

.main { padding: 1.15rem 1.4rem 2rem; }

.top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1rem;
}

.top .muted { font-size: 0.8rem; }

h1 { font-size: 1.35rem; margin: 0; font-weight: 650; letter-spacing: -0.03em; }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}

.stat {
  background: var(--white);
  border: 1px solid rgb(255 255 255 / 0.7);
  border-radius: 1rem;
  padding: 0.95rem 1rem;
  box-shadow: var(--shadow);
}

.stat .muted { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; }
.stat b { display: block; font-size: 1.6rem; margin-top: 0.25rem; letter-spacing: -0.04em; }

.panel {
  background: var(--white);
  border: 1px solid rgb(234 223 212 / 0.9);
  border-radius: 1rem;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.toolbar {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  padding: 0.7rem 0.8rem;
  border-bottom: 1px solid var(--line);
  background: #fbf7f1;
}

.toolbar input, .toolbar select {
  width: auto;
  margin: 0;
  padding: 0.42rem 0.7rem;
  border-radius: 0.6rem;
  font-size: 0.82rem;
}

.toolbar .btn { padding: 0.42rem 0.9rem; font-size: 0.8rem; }

.check-col {
  width: 2.2rem;
  text-align: center;
  vertical-align: middle;
}

.check-col input {
  width: 1rem;
  height: 1rem;
  accent-color: #b08a4a;
  cursor: pointer;
}

.bulk-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.85rem;
  border-bottom: 1px solid var(--line);
  background: #f4ebe0;
  font-size: 0.82rem;
}

.bulk-bar[hidden] { display: none !important; }

.bulk-bar .btn { padding: 0.35rem 0.8rem; font-size: 0.78rem; }

table { width: 100%; border-collapse: collapse; }

th, td {
  text-align: left;
  padding: 0.62rem 0.85rem;
  font-size: 0.82rem;
  vertical-align: middle;
}

th {
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: #fcf8f3;
  border-bottom: 1px solid var(--line);
}

td { border-bottom: 1px solid #f1e7dc; }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background 0.12s; }
tbody tr:hover { background: #fbf6ef; }

.user-cell {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #ead7b8, #b08a4a);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  flex-shrink: 0;
}

.mono { font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  background: #f3ebe1;
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 600;
}

.badge-admin { background: #1c1614; color: #f7f3ee; }
.badge-vendor { background: #f0e2cc; color: #8c6a38; }
.badge-client { background: #efe8df; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c5b8ab;
}

.pill-on .dot { background: #3d9a5a; box-shadow: 0 0 0 3px rgb(61 154 90 / 0.15); }
.pill-wait .dot { background: #c9a227; box-shadow: 0 0 0 3px rgb(201 162 39 / 0.18); }
.pill-off { color: var(--ink-soft); }

.row-actions { display: flex; gap: 0.35rem; justify-content: flex-end; flex-wrap: wrap; align-items: center; }
.row-actions a, .row-actions button:not(.btn) {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  background: none;
  border: 0;
  padding: 0;
  border-radius: 0.5rem;
  color: var(--brand-dark);
  cursor: pointer;
}
.row-actions a:hover, .row-actions button:not(.btn):hover { background: #f3ebe1; }
.row-actions .btn {
  width: auto;
  height: auto;
  padding: 0.32rem 0.75rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #d4b07a, #b08a4a 48%, #8c6a38);
  color: #fff;
  border: 0;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}
.row-actions .btn-line {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}
.row-actions .btn:hover { filter: brightness(1.06); background: linear-gradient(135deg, #d4b07a, #b08a4a 48%, #8c6a38); }
.row-actions .btn-line:hover { filter: none; background: #f3ebe1; }
.cell-actions { width: 1%; white-space: nowrap; }

.status-select {
  width: auto;
  min-width: 11.5rem;
  margin: 0;
  padding: 0.38rem 2rem 0.38rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background-color: #fbf6ef;
  cursor: pointer;
}

.status-select.pill-on { background-color: #eef6f0; }
.status-select.pill-wait { background-color: #fbf4e4; }
.status-select.pill-off { background-color: #f4eee8; color: var(--ink-soft); }

.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.75rem 0.9rem;
  border-top: 1px solid var(--line);
  background: #fcf8f3;
}

.pager-meta {
  margin: 0;
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.pager-pages {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
}

.pager-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.6rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: #fff;
  color: var(--ink);
  font-size: 0.78rem;
}

.pager-btn.is-on {
  background: linear-gradient(135deg, #d4b07a, #b08a4a 48%, #8c6a38);
  border-color: transparent;
  color: #fff;
  font-weight: 600;
}

.pager-btn.is-disabled {
  opacity: 0.38;
  pointer-events: none;
}

.pager-btn:hover:not(.is-on):not(.is-disabled) {
  background: #f3ebe1;
}

.pager-gap {
  color: var(--ink-soft);
  padding: 0 0.15rem;
}

.form-card {
  max-width: 480px;
  background: var(--white);
  border-radius: 1.15rem;
  padding: 1.2rem 1.3rem 1.4rem;
  box-shadow: var(--shadow);
  border: 1px solid rgb(234 223 212 / 0.9);
}

.check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--ink);
}
.check input { width: auto; margin: 0; }
.flash-error {
  background: #f8ecec;
  color: #9b1c1c;
}

.top-actions { display: flex; gap: 0.4rem; align-items: center; }

.nav-label {
  margin: 0.85rem 0.7rem 0.25rem;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a7d70;
}

.thumb {
  width: 40px;
  height: 40px;
  border-radius: 0.55rem;
  object-fit: cover;
  flex-shrink: 0;
  background: #eadfd4;
}

.cat-icon {
  width: 28px;
  height: 28px;
  border-radius: 0.55rem;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
}

.form-wide { max-width: 760px; }

.form-legend {
  margin: 1.1rem 0 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.form-legend:first-child { margin-top: 0; }

.i18n-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
}

.i18n-grid label { margin-top: 0; }
.i18n-grid .span-2 { grid-column: span 2; }

textarea {
  width: 100%;
  margin-top: 0.35rem;
  border: 1px solid var(--line);
  background: #fbf6ef;
  border-radius: 0.75rem;
  padding: 0.7rem 0.85rem;
  color: var(--ink);
  outline: none;
  resize: vertical;
  font: inherit;
}

textarea:focus {
  border-color: rgb(176 138 74 / 0.55);
  box-shadow: 0 0 0 3px rgb(176 138 74 / 0.15);
}

.color-row {
  display: flex;
  gap: 0.45rem;
  margin-top: 0.35rem;
  align-items: center;
}

.color-row input[type="color"] {
  width: 44px;
  height: 40px;
  padding: 0;
  border-radius: 0.6rem;
  cursor: pointer;
}

button.pill {
  cursor: pointer;
  background: none;
  border: 0;
  font: inherit;
}

.edit-grid {
  display: grid;
  grid-template-columns: minmax(280px, 400px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.edit-grid .form-card { max-width: none; }
.edit-side { display: grid; gap: 0.75rem; min-width: 0; }

.panel-head {
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--line);
  background: #fbf7f1;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.session-row {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid #f1e7dc;
}

.session-row:last-child { border-bottom: 0; }

.session-meta { min-width: 0; display: grid; gap: 0.15rem; }
.session-meta b { font-size: 0.84rem; }

.empty-hint {
  margin: 0;
  padding: 0.9rem;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.platform-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.18rem 0.5rem 0.18rem 0.4rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: #efe8df;
  color: var(--ink);
  white-space: nowrap;
}

.platform-tag svg { width: 13px; height: 13px; }
.platform-ios { background: #eceef2; color: #1c1c1e; }
.platform-android { background: #e7f3ea; color: #2f6a3a; }
.platform-web { background: #f0e2cc; color: #8c6a38; }

.editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 1rem;
  align-items: start;
}

.editor-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.85rem;
  padding: 0.35rem;
  background: var(--white);
  border: 1px solid rgb(234 223 212 / 0.9);
  border-radius: 1rem;
  box-shadow: var(--shadow);
}

.editor-tabs button {
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  border-radius: 0.75rem;
  padding: 0.5rem 0.9rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  cursor: pointer;
}

.editor-tabs button:hover { background: #fbf6ef; color: var(--ink); }

.editor-tabs button.on {
  background: #1c1614;
  color: #fff;
}

.editor-main, .editor-side { display: grid; gap: 0.85rem; min-width: 0; }

.editor-card {
  background: var(--white);
  border: 1px solid rgb(234 223 212 / 0.9);
  border-radius: 1.1rem;
  padding: 1.05rem 1.15rem 1.2rem;
  box-shadow: var(--shadow);
}

.editor-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.editor-head h2 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.editor-head .muted { font-size: 0.74rem; max-width: 28rem; }

.lang-tabs { display: flex; gap: 0.25rem; flex-wrap: wrap; }

.lang-tabs button {
  border: 1px solid var(--line);
  background: #fbf6ef;
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
}

.lang-tabs button.on {
  background: #1c1614;
  border-color: #1c1614;
  color: #fff;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.55rem;
}

.gallery-item {
  position: relative;
  margin: 0;
  border-radius: 0.8rem;
  overflow: hidden;
  background: #eadfd4;
  aspect-ratio: 4 / 3;
}

.gallery-item img,
.gallery-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-item:first-child {
  box-shadow: 0 0 0 2px #b08a4a;
}

.gallery-actions {
  position: absolute;
  inset: auto 0.35rem 0.35rem;
  display: flex;
  gap: 0.25rem;
}

.gallery-actions button {
  border: 0;
  border-radius: 999px;
  padding: 0.2rem 0.5rem;
  font: inherit;
  font-size: 0.64rem;
  font-weight: 700;
  background: rgb(255 252 248 / 0.92);
  color: var(--ink);
  cursor: pointer;
}

.gallery-actions button.danger { color: #9b1c1c; }

.new-tag {
  position: absolute;
  top: 0.35rem;
  left: 0.35rem;
  background: #1c1614;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.12rem 0.4rem;
}

.dropzone {
  display: grid;
  place-items: center;
  gap: 0.15rem;
  margin: 0;
  min-height: 88px;
  border: 1px dashed #d8c6b0;
  border-radius: 0.9rem;
  background: #fbf7f1;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 650;
  cursor: pointer;
}

.dropzone small { color: var(--ink-soft); font-weight: 500; font-size: 0.72rem; }
.dropzone input { display: none; }

.day-picks { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.day-pick {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: #fbf6ef;
  color: var(--ink);
  font-size: 0.8rem;
  cursor: pointer;
}

.day-pick input { width: auto; margin: 0; }

.sticky-card { position: sticky; top: 1rem; }
.side-meta {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.9rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}
.side-meta div { display: flex; justify-content: space-between; gap: 0.5rem; font-size: 0.8rem; }
.side-meta b { font-variant-numeric: tabular-nums; }

.vendor-chip {
  display: grid;
  gap: 0.1rem;
  margin-top: 0.85rem;
  padding: 0.7rem 0.75rem;
  border-radius: 0.8rem;
  background: #fbf6ef;
  font-size: 0.84rem;
  font-weight: 650;
}

.new-vendor {
  margin-top: 0.7rem;
  padding: 0.75rem;
  border-radius: 0.85rem;
  background: #fbf7f1;
  border: 1px dashed #d8c6b0;
}

.cover-preview { margin-bottom: 0.7rem; }
.cover-preview img {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: 0.8rem;
  background: #eadfd4;
}

.seo-urls {
  display: grid;
  gap: 0.28rem;
  margin: 0.55rem 0 0;
}
.seo-urls a {
  font-size: 0.74rem;
  color: var(--ink-soft);
  word-break: break-all;
}
.seo-urls a:hover { color: var(--brand-dark); }

.serp-preview {
  margin: 0 0 0.85rem;
  padding: 0.85rem 0.95rem;
  border-radius: 0.9rem;
  background: #fff;
  border: 1px solid var(--line);
}
.serp-url {
  margin: 0;
  font-size: 0.72rem;
  color: #188038;
  word-break: break-all;
}
.serp-title {
  margin: 0.2rem 0 0;
  font-size: 1.05rem;
  color: #1a0dab;
  font-weight: 500;
  line-height: 1.3;
}
.serp-desc {
  margin: 0.25rem 0 0;
  font-size: 0.8rem;
  color: #4d5156;
  line-height: 1.45;
}
.field-count {
  display: block;
  margin-top: 0.22rem;
  font-size: 0.7rem;
  color: var(--ink-soft);
  font-weight: 650;
}

.stat { text-decoration: none; color: inherit; }

.stat.is-active {
  border-color: rgb(176 138 74 / 0.45);
  box-shadow: 0 0 0 3px rgb(176 138 74 / 0.12), var(--shadow);
}

.badge-constructor { background: #f0e2cc; color: #8c6a38; }
.badge-help { background: #efe4d4; color: #7a5a2e; }
.badge-on { background: #e8f4ec; color: #2f6a3a; }
.badge-wait { background: #fbf4e4; color: #8a6a1a; }
.badge-off { background: #f1ebe5; color: #7a716b; }

.package-code {
  display: inline-flex;
  align-items: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--brand-dark);
}

.package-code:hover { text-decoration: underline; }

.package-row.is-help td:first-child {
  box-shadow: inset 3px 0 0 #c9a227;
}

.package-attention {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}

.package-card {
  display: grid;
  gap: 0.35rem;
  padding: 0.85rem 0.9rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 0.95rem;
  background: #fbf7f1;
}

.package-card.is-help {
  background: linear-gradient(180deg, #fff9ef, #fbf7f1);
  border-color: rgb(201 162 39 / 0.35);
}

.package-card.is-constructor {
  background: linear-gradient(180deg, #fffdf9, #fbf7f1);
}

.package-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.package-card-client {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.35;
}

.package-card-meta {
  margin: 0;
  font-size: 0.74rem;
  line-height: 1.4;
}

.package-orders {
  display: grid;
  gap: 0.65rem;
}

.package-order {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.8rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: #fbf7f1;
}

.package-order-main { min-width: 0; flex: 1; }

.package-order-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.3rem;
}

.package-order-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 650;
}

.package-order-title a:hover { color: var(--brand-dark); }

.empty-state {
  padding: 2.4rem 1rem;
  text-align: center;
}

.empty-state-title {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 700;
}

.inbox-card .editor-head {
  align-items: center;
}

.inbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.75rem;
}

.inbox-item {
  display: grid;
  gap: 0.45rem;
  padding: 0.9rem 0.95rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: linear-gradient(180deg, #fffdf9, #fbf7f1);
  box-shadow: inset 3px 0 0 #c9a227;
}

.inbox-item.has-package {
  box-shadow: inset 3px 0 0 #b08a4a;
}

.inbox-item.is-help {
  background: linear-gradient(180deg, #fff9ef, #fbf7f1);
}

.inbox-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.inbox-item-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.inbox-item-meta {
  margin: -0.15rem 0 0;
  font-size: 0.74rem;
}

.inbox-item-client {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.15rem;
  padding-top: 0.55rem;
  border-top: 1px solid rgb(234 223 212 / 0.9);
}

.inbox-item-client b {
  display: block;
  font-size: 0.84rem;
  font-weight: 650;
}

.inbox-item-client .muted {
  font-size: 0.72rem;
}

.inbox-item-facts {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.inbox-item-facts .mono {
  color: var(--ink);
  font-weight: 650;
}

.inbox-package {
  display: inline-flex;
  width: fit-content;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: #f0e2cc;
  color: #8c6a38;
  font-size: 0.7rem;
  font-weight: 650;
}

.inbox-package:hover {
  background: #e8d4b4;
}

.inbox-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.2rem;
}

.inbox-actions .btn,
.inbox-actions .btn-line {
  padding: 0.4rem 0.8rem;
  font-size: 0.76rem;
}

.inbox-actions .btn-line {
  background: #fff;
  color: var(--ink);
}

.moderation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}

.moderation-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: #fbf7f1;
}

.moderation-card img,
.moderation-empty {
  width: 100%;
  height: 120px;
  object-fit: cover;
  background: #eadfd4;
  display: grid;
  place-items: center;
  color: var(--ink-soft);
  font-size: 0.75rem;
}

.moderation-body {
  display: grid;
  gap: 0.25rem;
  padding: 0.7rem 0.75rem 0.8rem;
}

.moderation-body b { font-size: 0.84rem; }

.moderation-actions {
  display: flex;
  gap: 0.35rem;
  margin-top: 0.45rem;
}

.moderation-actions .btn { padding: 0.4rem 0.8rem; font-size: 0.76rem; }
.moderation-actions .btn-line { background: #fff; color: var(--ink); }

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 0.85rem 1rem;
}

.detail-grid div { display: grid; gap: 0.18rem; min-width: 0; }

.detail-grid .muted {
  font-size: 0.7rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.detail-grid b {
  font-size: 0.92rem;
  font-weight: 650;
  word-break: break-word;
}

.detail-notes {
  margin: 0;
  white-space: pre-wrap;
  font-size: 0.9rem;
  line-height: 1.55;
}

.comment-list { display: grid; gap: 0.55rem; }

.comment-item {
  padding: 0.7rem 0.8rem;
  border-radius: 0.8rem;
  background: #fbf6ef;
}

.comment-item header {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.3rem;
  font-size: 0.78rem;
}

.comment-item p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.comment-item-log {
  background: #f4ebe0;
  box-shadow: inset 3px 0 0 #b08a4a;
}

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { flex-direction: row; align-items: center; gap: 0.5rem; overflow: auto; }
  .side nav { flex-direction: row; }
  .side-user { margin: 0; border: 0; padding: 0; }
  .stats { grid-template-columns: 1fr 1fr; }
  .toolbar { flex-wrap: wrap; }
  .edit-grid { grid-template-columns: 1fr; }
  .i18n-grid { grid-template-columns: 1fr; }
  .i18n-grid .span-2 { grid-column: auto; }
  .editor { grid-template-columns: 1fr; }
  .sticky-card { position: static; }
  .editor-tabs { overflow-x: auto; flex-wrap: nowrap; }
  .package-order { flex-direction: column; align-items: stretch; }
  .package-order .row-actions { justify-content: flex-start; }
}
