:root {
  color-scheme: light;
  --ink: #192b28;
  --muted: #536760;
  --accent: #15634c;
  --canvas: #edf1ed;
  --line: #dce5dd;
  --dark: #192d29;
  font-family: system-ui, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--canvas); line-height: 1.45; }
button, input, select, textarea { font: inherit; }
button, .button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
:focus-visible { outline: 3px solid #60bb9c; outline-offset: 3px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(27px, 3vw, 38px); letter-spacing: -.045em; line-height: 1.15; overflow-wrap: anywhere; }
h2 { font-size: 19px; letter-spacing: -.02em; }
small { display: block; color: var(--muted); }
.muted { color: var(--muted); font-size: 14px; }
.error { color: #a12823; font-size: 14px; }
.stack { display: grid; align-content: start; gap: 15px; }
.workspace { min-height: 100vh; display: grid; grid-template-columns: 230px minmax(0, 1fr); }
.sidebar { background: var(--dark); color: #fff; padding: 26px 16px 19px; display: flex; flex-direction: column; min-height: 100vh; height: 100%; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 26px; font-size: 17px; font-weight: 700; }
.brand-mark { display: grid; place-items: center; width: 37px; height: 37px; border-radius: 12px; color: #152d23; background: #adf0cf; flex-shrink: 0; font-size: 23px; font-weight: 650; }
.sidebar small { color: #b9cfbf; font-size: 12px; font-weight: 400; }
.sidebar nav { display: grid; gap: 5px; }
.sidebar nav button { background: transparent; border: 0; color: #dcebe0; text-align: left; border-radius: 8px; padding: 11px 13px; }
.sidebar nav button[aria-current="page"], .sidebar nav button:hover { background: #304c42; color: #fff; }
.identity { margin-top: auto; border-top: 1px solid #3e534d; padding: 15px 0 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 9px; font-size: 13px; }
.identity strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.identity button { background: transparent; border: 0; color: #fff; padding: 8px; }
.avatar { border-radius: 50%; min-width: 32px; height: 32px; background: #385e51; display: grid; place-items: center; font-weight: 700; }
.content { width: 100%; max-width: 1450px; padding: 21px clamp(16px, 4vw, 55px) 55px; }
.topbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; border-bottom: 1px solid #d9e2d8; padding-bottom: 16px; font-size: 14px; color: var(--muted); }
#page { margin-top: 25px; }
.page-head { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 16px; margin-bottom: 24px; }
.page-head p { margin-top: 7px; }
.heading-link { display: inline-flex; margin-bottom: 12px; }
.badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 99px; background: #e4eae5; padding: 4px 10px; color: #42594f; font-size: 12px; font-weight: 650; white-space: nowrap; width: fit-content; }
.badge.live, .badge.sent { background: #d7efdd; color: #175235; }
.badge.preview { background: #dfebff; color: #244f81; }
.badge.review, .badge.error { background: #f9e6db; color: #873c23; }
.card { border: 1px solid var(--line); background: #fcfdfb; border-radius: 15px; padding: 20px; }
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; justify-content: space-between; align-items: center; padding-bottom: 15px; }
.toolbar input { max-width: 350px; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; min-width: 575px; }
th, td { text-align: left; border-top: 1px solid var(--line); padding: 13px 10px; font-size: 14px; }
th { color: var(--muted); font-size: 12px; font-weight: 700; }
td small { margin-top: 2px; }
.link { border: 0; background: transparent; padding: 0; color: var(--accent); font-weight: 700; text-align: left; }
.link:hover { text-decoration: underline; }
.split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 16px; }
label { display: grid; gap: 6px; font-size: 14px; font-weight: 650; }
input, textarea, select { width: 100%; background: white; border: 1px solid #cbd8ce; border-radius: 8px; color: var(--ink); padding: 9px 11px; min-height: 42px; font-weight: 400; }
textarea { resize: vertical; }
.button, .primary { display: inline-grid; place-items: center; border: 1px solid #cad9cd; border-radius: 8px; background: #f7faf6; color: var(--ink); padding: 8px 13px; min-height: 40px; min-width: 40px; font-size: 14px; font-weight: 700; }
.button:hover { background: #e7f0e6; }
.primary { background: #15634c; color: #fff; border-color: #15634c; }
.primary:hover { background: #0c4e39; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.notice { border-radius: 8px; padding: 9px 12px; margin-top: 14px; background: #dbeee0; color: #175235; font-size: 14px; }
.notice.error { background: #f8e3df; color: #922c24; }
.upload-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--line); padding-top: 12px; font-size: 14px; }
.upload-row label { position: relative; }
.upload-row input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.upload-row label:focus-within { outline: 3px solid #60bb9c; }
.media-list { display: grid; gap: 8px; }
.media-row { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; border-radius: 9px; background: #eef4ee; padding: 9px; align-items: start; }
.media-row img, .preview-photo { display: block; width: 52px; height: 52px; object-fit: contain; background: #fff; border-radius: 5px; }
.media-row .filename { overflow-wrap: anywhere; font-size: 13px; padding: 2px 0 6px; }
.media-row form { display: grid; gap: 7px; }
.media-row .button { min-height: 32px; padding: 4px 9px; font-size: 12px; }
.bubble { padding: 13px 15px; border-radius: 12px 12px 3px 12px; background: #e0efe2; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.preview-images { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.preview-photo { width: 94px; height: 94px; border: 1px solid var(--line); }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 18px; background: radial-gradient(ellipse at 30% 20%, #e2efe0 0%, var(--canvas) 60%); }
.login-card { width: min(100%, 400px); border: 1px solid var(--line); border-radius: 19px; padding: 28px; background: #fcfdfb; box-shadow: 0 18px 50px #15291e11; }
.login-card h1 { font-size: 30px; margin-top: 13px; }
.login-card p { margin: 8px 0 16px; }
dialog { background: #fcfdfb; border: 1px solid var(--line); border-radius: 15px; width: min(480px, calc(100% - 24px)); color: var(--ink); padding: 23px; }
dialog::backdrop { background: #10241d87; }
@media (max-width: 900px) { .workspace { grid-template-columns: 175px minmax(0, 1fr); } .split { grid-template-columns: 1fr; } }
@media (max-width: 630px) {
  .workspace { display: block; }
  .sidebar { min-height: auto; padding: 12px 14px; gap: 11px; }
  .brand { padding: 0; }
  .sidebar nav { display: flex; flex-wrap: wrap; }
  .sidebar nav button { padding: 8px; }
  .identity { padding-top: 8px; }
  .content { padding-top: 16px; }
  .card { padding: 14px; }
}
