@import url("/admin/fonts.css");
:root {
  --green: #153f34;
  --deep: #0c2e25;
  --paper: #f5f3ed;
  --white: #fff;
  --ink: #243b33;
  --muted: #64756c;
  --line: #dce3db;
  --gold: #ad7b3c;
  --red: #a33333;
  --radius: 18px;
  font:
    16px/1.55 system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--paper);
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select,
[contenteditable] {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
a {
  color: var(--green);
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[contenteditable]:focus-visible {
  outline: 3px solid #b8955f;
  outline-offset: 3px;
}
.skip {
  position: absolute;
  top: -70px;
  z-index: 10;
  background: white;
  padding: 12px;
}
.skip:focus {
  top: 0;
}
[hidden] {
  display: none !important;
}
.primary,
.secondary,
.danger,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 11px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 650;
  min-height: 47px;
}
.primary {
  background: var(--green);
  color: white;
}
.primary:hover {
  background: var(--deep);
}
.secondary {
  background: white;
  border-color: var(--line);
  color: var(--green);
}
.secondary:hover {
  background: #f0f4ee;
}
.danger {
  color: var(--red);
  background: #fff5f3;
  border-color: #ebceca;
}
.text-button {
  background: transparent;
  padding: 8px;
  color: var(--green);
}
.small {
  padding: 7px 12px;
  font-size: 0.88rem;
  min-height: 37px;
}
.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.11em;
  font-weight: 750;
  color: var(--muted);
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: clamp(1.7rem, 3vw, 2.45rem);
  line-height: 1.2;
  letter-spacing: -0.04em;
  margin-bottom: 14px;
}
h2 {
  font-size: 1.3rem;
  line-height: 1.3;
}
h3 {
  font-size: 1rem;
}
p {
  margin-bottom: 16px;
}
.muted,
.help {
  color: var(--muted);
}
.help {
  font-size: 0.87rem;
  margin: 7px 0 0;
}
.loading {
  min-height: 100dvh;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 16px;
}
.spinner {
  width: 25px;
  height: 25px;
  border: 3px solid var(--line);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: auto;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.auth-layout {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(350px, 46%) 1fr;
}
.auth-story {
  background: var(--green);
  color: #f6f2e8;
  padding: clamp(32px, 5vw, 80px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 50px;
  position: relative;
  overflow: hidden;
}
.auth-story:after {
  content: "1980";
  position: absolute;
  bottom: -50px;
  right: -10px;
  font-size: 200px;
  font-weight: 800;
  opacity: 0.045;
  pointer-events: none;
}
.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
  color: inherit;
}
.brand img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  background: white;
  border-radius: 50%;
  padding: 4px;
}
.brand strong {
  font-size: 1rem;
  letter-spacing: 0.04em;
}
.brand small {
  display: block;
  font-size: 0.72rem;
  opacity: 0.75;
}
.auth-story h1 {
  font-family: Georgia, serif;
  font-size: clamp(2.5rem, 4vw, 4rem);
  font-weight: 400;
  max-width: 470px;
  line-height: 1.1;
  letter-spacing: -0.04em;
}
.auth-story p {
  color: #d0ded3;
  max-width: 370px;
  font-size: 1.04rem;
}
.auth-story .eyebrow {
  color: #cad7bb;
}
.auth-note {
  font-size: 0.8rem;
  opacity: 0.7;
}
.auth-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}
.auth-box {
  width: 100%;
  max-width: 420px;
}
.auth-box h2 {
  font-size: 1.8rem;
  letter-spacing: -0.04em;
  margin-bottom: 10px;
}
.auth-box form {
  margin-top: 30px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 22px;
}
.field > label,
.field-label {
  font-size: 0.9rem;
  font-weight: 650;
}
input,
textarea,
select {
  border: 1px solid #cbd5cc;
  border-radius: 10px;
  padding: 12px 14px;
  background: white;
  color: var(--ink);
  width: 100%;
  min-height: 47px;
}
input:read-only {
  background: #edf1ec;
}
input[type="checkbox"] {
  width: 19px;
  height: 19px;
  min-height: 0;
  accent-color: var(--green);
}
textarea {
  resize: vertical;
  line-height: 1.6;
}
.auth-box .primary {
  width: 100%;
}
.auth-links {
  display: flex;
  flex-direction: column;
  gap: 9px;
  align-items: center;
  margin-top: 22px;
  font-size: 0.88rem;
}
.error-box {
  background: #fff2ef;
  border: 1px solid #edcbc4;
  color: #8d302a;
  padding: 14px;
  border-radius: 10px;
  margin-bottom: 18px;
}
.success-box {
  background: #edf4e9;
  border: 1px solid #d0e0c8;
  padding: 16px;
  border-radius: 12px;
}
.password-wrap {
  display: flex;
  border: 1px solid #cbd5cc;
  border-radius: 10px;
  background: white;
  overflow: hidden;
}
.password-wrap input {
  border: 0;
  border-radius: 0;
  min-width: 0;
}
.password-wrap button {
  border: 0;
  background: white;
  padding: 0 14px;
  color: var(--muted);
  font-size: 0.8rem;
}
.shell {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 242px minmax(0, 1fr);
}
.sidebar {
  background: #fbfcf8;
  border-right: 1px solid var(--line);
  padding: 28px 19px;
  display: flex;
  flex-direction: column;
  gap: 30px;
  position: sticky;
  top: 0;
  height: 100dvh;
}
.sidebar .brand {
  margin: 2px 8px 18px;
}
.sidebar .brand img {
  width: 42px;
  height: 42px;
}
.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  background: transparent;
  color: #56685d;
  padding: 12px 14px;
  border-radius: 10px;
  text-align: left;
  font-size: 0.91rem;
  min-height: 47px;
}
.nav-item span {
  width: 23px;
  font-size: 1.05rem;
  text-align: center;
}
.nav-item:hover {
  background: #eef2e9;
}
.nav-item.active {
  background: var(--green);
  color: white;
  font-weight: 650;
}
.sidebar-bottom {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.sidebar-bottom .secondary {
  width: 100%;
  font-size: 0.85rem;
}
.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 9px 0;
  min-width: 0;
}
.avatar {
  background: #e4ebdf;
  color: var(--green);
  border-radius: 50%;
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  font-weight: 750;
  flex-shrink: 0;
}
.user-info strong {
  display: block;
  font-size: 0.85rem;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 145px;
  white-space: nowrap;
}
.user-info small {
  font-size: 0.72rem;
  color: var(--muted);
}
.content-area {
  min-width: 0;
}
.topbar {
  min-height: 78px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 40px;
  background: #ffffff90;
}
.topbar strong {
  font-size: 0.9rem;
}
.topbar .actions {
  gap: 14px;
}
.topbar .text-button {
  font-size: 0.8rem;
  min-height: 35px;
}
.workspace {
  padding: 38px 40px 90px;
  max-width: 1380px;
  margin: auto;
}
.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 28px;
}
.page-heading p {
  max-width: 650px;
  color: var(--muted);
  margin: 0;
}
.page-heading .eyebrow {
  display: block;
  margin-bottom: 12px;
}
.welcome-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: #5c715a;
  background: #e9eedf;
  border: 1px solid #dbe5cf;
  border-radius: 100px;
  padding: 7px 13px;
  margin-bottom: 17px;
}
.welcome-note:before {
  content: "";
  background: #608359;
  border-radius: 50%;
  width: 6px;
  height: 6px;
}
.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 30px 0;
}
.quick-action {
  background: white;
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  color: var(--ink);
  min-height: 218px;
  transition:
    transform 0.15s,
    border-color 0.15s;
  position: relative;
}
.quick-action:hover {
  transform: translateY(-3px);
  border-color: #a2b59c;
}
.quick-action .icon {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  background: #edf1e6;
  border-radius: 12px;
  margin-bottom: 21px;
}
.quick-action:nth-child(2) .icon {
  background: #f4eadb;
}
.quick-action:nth-child(3) .icon {
  background: #e5edf0;
}
.quick-action strong {
  font-size: 1.1rem;
  margin-bottom: 8px;
}
.quick-action p {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 0;
}
.quick-action .arrow {
  position: absolute;
  right: 22px;
  top: 27px;
  color: #759073;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(260px, 1fr);
  gap: 22px;
  margin-top: 30px;
}
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}
.panel h2 {
  margin-bottom: 20px;
}
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}
.recent-item {
  padding: 15px 0;
  border-top: 1px solid #edf0e9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.recent-item button {
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  text-align: left;
  padding: 0;
}
.recent-item small {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  margin-top: 4px;
}
.badge {
  display: inline-flex;
  white-space: nowrap;
  align-items: center;
  gap: 5px;
  font-size: 0.73rem;
  line-height: 1.4;
  border-radius: 50px;
  padding: 5px 10px;
  background: #f4eddf;
  color: #8a6526;
}
.badge.published {
  background: #eaf2e5;
  color: #4c6e3b;
}
.steps {
  padding: 0;
  list-style: none;
  counter-reset: steps;
}
.steps li {
  position: relative;
  padding-left: 35px;
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 18px;
}
.steps li:before {
  counter-increment: steps;
  content: counter(steps);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #eef2e8;
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 750;
}
.steps strong {
  display: block;
  color: var(--ink);
  font-size: 0.9rem;
  margin-bottom: 4px;
}
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 23px 0;
}
.search {
  max-width: 360px;
}
.filters {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.filters button {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50px;
  color: var(--muted);
  padding: 8px 14px;
  min-height: 40px;
}
.filters button.active {
  background: #e4ecdf;
  border-color: #b9cbb2;
  color: var(--green);
}
.entry-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.entry-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 22px;
}
.entry-main {
  min-width: 0;
  flex: 1;
}
.entry-main h2 {
  margin: 0 0 6px;
  font-size: 1.03rem;
  overflow-wrap: anywhere;
}
.entry-main p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
}
.entry-row .actions {
  flex-wrap: nowrap;
  flex-shrink: 0;
}
.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.empty {
  padding: 60px 25px;
  text-align: center;
  border: 1px dashed #bdccbc;
  border-radius: var(--radius);
  background: #fafbf7;
}
.empty p {
  color: var(--muted);
}
.editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
}
.editor-main .panel {
  margin-bottom: 22px;
}
.editor-main .panel:last-child {
  margin: 0;
}
.editor-side .panel {
  position: sticky;
  top: 20px;
}
.editor-label {
  margin-bottom: 17px;
  font-size: 0.9rem;
  font-weight: 700;
}
.editor-toolbar {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  border: 1px solid #cbd5cc;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  padding: 7px;
  background: #f7f9f4;
}
.editor-toolbar button {
  border: 0;
  background: transparent;
  color: var(--ink);
  border-radius: 5px;
  padding: 7px 10px;
  min-height: 35px;
}
.editor-toolbar button:hover {
  background: #e3eadc;
}
.rich-editor {
  min-height: 300px;
  max-height: 650px;
  overflow: auto;
  border: 1px solid #cbd5cc;
  border-radius: 0 0 10px 10px;
  padding: 18px;
  line-height: 1.8;
  overflow-wrap: anywhere;
  background: white;
}
.rich-editor p {
  margin: 0 0 14px;
}
.rich-editor:empty:before {
  content: attr(data-placeholder);
  color: #91a18f;
}
.rich-editor img {
  max-width: 100%;
  height: auto;
}
.rich-editor figure {
  margin: 15px 0;
}
.rich-editor table {
  max-width: 100%;
  border-collapse: collapse;
}
.rich-editor td,
.rich-editor th {
  border: 1px solid var(--line);
  padding: 5px;
}
.cover-preview img {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  border-radius: 9px;
  background: #f4f4ef;
  margin-bottom: 12px;
}
.drop-zone {
  border: 1.5px dashed #b3c4ad;
  border-radius: 14px;
  padding: 28px;
  text-align: center;
  background: #f7f9f3;
}
.drop-zone.dragover {
  background: #e4eddc;
  border-color: var(--green);
}
.drop-zone .upload-icon {
  font-size: 1.8rem;
  display: block;
  margin-bottom: 10px;
}
.drop-zone p {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 9px 0 0;
}
.drop-zone input {
  display: none;
}
.upload-status {
  margin-top: 15px;
  font-size: 0.86rem;
}
.upload-status progress {
  width: 100%;
}
.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin-top: 23px;
}
.photo-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #fafbf8;
}
.photo-card img {
  display: block;
  aspect-ratio: 1.25;
  width: 100%;
  object-fit: cover;
}
.photo-card input {
  font-size: 0.75rem;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  padding: 8px;
  min-height: 35px;
  background: white;
}
.photo-actions {
  display: flex;
  justify-content: space-between;
  padding: 5px;
  gap: 4px;
}
.photo-actions button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.8rem;
  min-height: 30px;
  padding: 4px 7px;
}
.photo-actions button:last-child {
  color: var(--red);
}
.editor-bottom {
  position: sticky;
  bottom: 0;
  z-index: 3;
  background: #fdfefbf0;
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  padding: 16px 40px;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
}
.editor-bottom small {
  color: var(--muted);
  max-width: 300px;
  font-size: 0.78rem;
}
.editor-bottom .actions {
  justify-content: flex-end;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.schedule-row {
  display: grid;
  grid-template-columns: 1fr 1fr 40px;
  gap: 10px;
  margin-bottom: 10px;
}
.schedule-row button {
  border: 0;
  background: transparent;
  color: var(--red);
}
.note-box {
  font-size: 0.85rem;
  background: #f4f5ec;
  border-radius: 11px;
  padding: 16px;
  color: #65715b;
}
.check-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 26px 0;
}
.stat-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 23px;
}
.stat-card strong {
  display: block;
  font-size: 2.25rem;
  line-height: 1.25;
  letter-spacing: -0.05em;
  margin-top: 8px;
}
.stat-card span {
  font-size: 0.82rem;
  color: var(--muted);
}
.chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  min-height: 170px;
  padding-top: 15px;
  overflow-x: auto;
}
.chart-col {
  min-width: 28px;
  flex: 1;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: flex-end;
  height: 170px;
  gap: 8px;
}
.chart-col progress {
  appearance: none;
  writing-mode: vertical-lr;
  transform: rotate(180deg);
  height: 120px;
  width: 15px;
  border: 0;
  background: #edf2e8;
  border-radius: 5px;
}
.chart-col progress::-webkit-progress-bar {
  background: #edf2e8;
  border-radius: 5px;
}
.chart-col progress::-webkit-progress-value {
  background: #507b52;
  border-radius: 5px;
}
.chart-col progress::-moz-progress-bar {
  background: #507b52;
  border-radius: 5px;
}
.chart-col small {
  font-size: 0.62rem;
  color: var(--muted);
}
.chart-col b {
  font-size: 0.7rem;
}
.rank-row {
  padding: 13px 0;
  border-top: 1px solid #edf0e9;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 0.86rem;
}
.rank-row a {
  overflow-wrap: anywhere;
}
.rank-row strong {
  white-space: nowrap;
}
.stats-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 22px;
}
.user-card {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.user-card h3 {
  margin: 0 0 3px;
}
.user-card p {
  margin: 0;
  font-size: 0.83rem;
  color: var(--muted);
}
.code-box {
  margin-top: 20px;
  padding: 20px;
  background: #f2f6ec;
  border: 1px solid #d6e2cd;
  border-radius: 12px;
}
.code-box code {
  display: block;
  overflow-wrap: anywhere;
  padding: 13px;
  background: white;
  border-radius: 8px;
  margin: 12px 0;
  font-size: 0.8rem;
}
.code-box p {
  font-size: 0.85rem;
}
.storage progress {
  width: 100%;
  height: 8px;
  accent-color: var(--green);
}
dialog {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
  max-width: 500px;
  width: calc(100% - 32px);
  color: var(--ink);
}
dialog::backdrop {
  background: #0b251dc7;
  backdrop-filter: blur(4px);
}
#preview-dialog {
  max-width: 1200px;
  height: 90dvh;
  padding: 0;
  overflow: hidden;
}
#preview-dialog[open] {
  display: flex;
  flex-direction: column;
}
#preview-dialog header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 19px 25px;
  border-bottom: 1px solid var(--line);
  gap: 15px;
}
#preview-dialog h2 {
  margin: 5px 0 0;
  font-size: 1.05rem;
}
#preview-dialog iframe {
  border: 0;
  width: 100%;
  flex: 1;
  background: white;
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--deep);
  color: white;
  border-radius: 11px;
  padding: 14px 23px;
  box-shadow: 0 8px 30px #102a2430;
  z-index: 100;
  max-width: calc(100% - 32px);
  font-size: 0.9rem;
}
#toast.error {
  background: #8c342a;
}
.unsaved {
  color: var(--gold);
  font-size: 0.78rem;
}
.history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.history-row {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.history-row p {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 4px 0 10px;
}
.full-width {
  width: 100%;
}
.mt {
  margin-top: 22px;
}
.mb {
  margin-bottom: 22px;
}
@media (max-width: 1100px) {
  .shell {
    grid-template-columns: 205px minmax(0, 1fr);
  }
  .sidebar {
    padding: 24px 13px;
  }
  .workspace {
    padding: 30px 25px 80px;
  }
  .topbar {
    padding: 18px 25px;
  }
  .editor-bottom {
    padding: 15px 25px;
  }
  .quick-actions {
    gap: 12px;
  }
  .quick-action {
    padding: 21px;
    min-height: 235px;
  }
  .editor-grid {
    grid-template-columns: minmax(0, 1fr) 240px;
  }
  .photo-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 850px) {
  .shell {
    display: block;
  }
  .sidebar {
    position: relative;
    height: auto;
    padding: 15px 20px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    gap: 12px;
  }
  .sidebar .brand {
    margin: 0 0 10px;
  }
  .sidebar nav {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 5px;
    gap: 6px;
  }
  .nav-item {
    white-space: nowrap;
    padding: 9px 12px;
    font-size: 0.8rem;
    min-height: 40px;
  }
  .nav-item span {
    width: auto;
    font-size: 0.95rem;
  }
  .sidebar-bottom {
    display: none;
  }
  .topbar {
    min-height: 60px;
    padding: 12px 22px;
  }
  .workspace {
    padding: 27px 22px 70px;
  }
  .quick-action {
    min-height: 215px;
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .editor-grid {
    grid-template-columns: minmax(0, 1fr) 240px;
  }
  .auth-layout {
    grid-template-columns: 40% 1fr;
  }
  .auth-story {
    padding: 35px 25px;
  }
  .auth-story h1 {
    font-size: 2.6rem;
  }
  .auth-story p {
    font-size: 0.9rem;
  }
  .photo-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .editor-bottom {
    padding: 14px 22px;
  }
}
@media (max-width: 620px) {
  .auth-layout {
    display: block;
  }
  .auth-story {
    padding: 25px;
    gap: 25px;
    min-height: 0;
  }
  .auth-story > div:nth-child(2) {
    display: none;
  }
  .auth-story .auth-note {
    display: none;
  }
  .auth-story:after {
    display: none;
  }
  .auth-main {
    padding: 35px 24px;
  }
  .auth-box h2 {
    font-size: 1.55rem;
  }
  .brand small {
    font-size: 0.67rem;
  }
  .sidebar {
    padding: 15px 15px 10px;
  }
  .topbar {
    padding: 12px 16px;
  }
  .topbar strong {
    font-size: 0.78rem;
  }
  .topbar .actions {
    gap: 3px;
  }
  .topbar .text-button {
    font-size: 0.72rem;
    padding: 6px;
  }
  .workspace {
    padding: 25px 16px 75px;
  }
  .page-heading {
    gap: 12px;
    flex-wrap: wrap;
  }
  .page-heading h1 {
    font-size: 1.7rem;
  }
  .page-heading p {
    font-size: 0.9rem;
  }
  .page-heading .primary {
    font-size: 0.86rem;
  }
  .quick-actions {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 22px;
  }
  .quick-action {
    min-height: 0;
    display: grid;
    grid-template-columns: 44px 1fr;
    column-gap: 16px;
    padding: 21px;
  }
  .quick-action .icon {
    grid-row: 1/3;
    margin: 0;
    align-self: center;
  }
  .quick-action strong {
    font-size: 1rem;
    padding-right: 18px;
    margin-bottom: 5px;
  }
  .quick-action p {
    font-size: 0.81rem;
  }
  .quick-action .arrow {
    right: 18px;
    top: 20px;
  }
  .dashboard-grid {
    margin-top: 22px;
    gap: 17px;
  }
  .panel {
    padding: 21px;
  }
  .recent-item {
    align-items: flex-start;
  }
  .recent-item button {
    font-size: 0.9rem;
  }
  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .search {
    max-width: none;
  }
  .entry-row {
    padding: 17px;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
  }
  .entry-row .actions {
    width: 100%;
    justify-content: space-between;
  }
  .entry-main h2 {
    font-size: 0.96rem;
  }
  .editor-grid {
    display: flex;
    flex-direction: column;
  }
  .editor-side {
    order: -1;
  }
  .editor-side .panel {
    position: static;
  }
  .editor-side .cover-preview img {
    max-height: 170px;
  }
  .editor-side .note-box {
    display: none;
  }
  .editor-main .panel {
    padding: 19px;
  }
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .rich-editor {
    min-height: 260px;
    font-size: 0.95rem;
  }
  .editor-bottom {
    padding: 13px 14px;
    display: block;
  }
  .editor-bottom small {
    display: block;
    margin-bottom: 9px;
  }
  .editor-bottom .actions {
    display: grid;
    grid-template-columns: 1fr 1fr 1.1fr;
    gap: 7px;
  }
  .editor-bottom .actions button {
    font-size: 0.75rem;
    padding: 10px 8px;
    min-height: 44px;
  }
  .photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .drop-zone {
    padding: 23px 16px;
  }
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .stat-card {
    padding: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
  }
  .stat-card strong {
    font-size: 1.9rem;
    margin: 0;
  }
  .stats-columns {
    grid-template-columns: 1fr;
  }
  .user-card {
    flex-wrap: wrap;
  }
  .schedule-row {
    grid-template-columns: 1fr 1fr 30px;
    gap: 6px;
  }
  .schedule-row input {
    padding: 10px 8px;
    font-size: 0.82rem;
  }
  .page-heading .actions {
    width: 100%;
  }
  #preview-dialog header {
    padding: 15px;
  }
  #preview-dialog h2 {
    font-size: 0.9rem;
  }
  #preview-dialog .secondary {
    font-size: 0.76rem;
    padding: 9px 12px;
  }
  #toast {
    width: calc(100% - 30px);
    bottom: 15px;
    text-align: center;
  }
  .chart {
    gap: 4px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}
