@font-face { font-family: Oswald; src: url(assets/fonts/Oswald.ttf) format('truetype'); font-weight: 200 700; font-display: swap; }
@font-face { font-family: 'Roboto Condensed'; src: url(assets/fonts/RobotoCondensed.ttf) format('truetype'); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #062326; --surface: #0b2e31; --surface-2: #103638; --line: #365556;
  --text: #f3f5f0; --muted: #b2c7c6; --accent: #9af0e7; --accent-ink: #062326;
  --warn: #f2d48b; --error: #f0b9b0;
  --display: Oswald, 'Arial Narrow', sans-serif; --body: 'Roboto Condensed', 'Arial Narrow', sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.45 var(--body); }
[hidden] { display: none !important; }
img { max-width: 100%; display: block; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: .01em; margin: 0; }
h1 { font-size: 40px; line-height: 1.05; text-transform: uppercase; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
.muted { color: var(--muted); }
.helper { color: var(--muted); font-size: 14px; margin: 8px 0 0; }
.eyebrow { color: var(--accent); font: 600 12px var(--body); letter-spacing: .24em; margin-bottom: 6px; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 1px solid var(--line); background: transparent; padding: 9px 16px; border-radius: 0; font-weight: 600; letter-spacing: .02em; }
button:hover { border-color: var(--accent); }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button:disabled { opacity: .45; cursor: default; }
.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); clip-path: polygon(0 0, 100% 0, 100% 72%, 94% 100%, 0 100%); padding-right: 22px; }
.secondary { border-color: var(--accent); color: var(--accent); }
.danger { border-color: var(--error); color: var(--error); }
.icon { border: 0; font-size: 24px; padding: 4px 10px; }
.wide { width: 100%; }
.small { padding: 5px 10px; font-size: 14px; }

.field { display: grid; gap: 6px; font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.field input, .field select, .field textarea { background: var(--surface-2); border: 1px solid var(--line); padding: 10px 12px; color: var(--text); font-size: 16px; border-radius: 0; }
.field textarea { min-height: 96px; resize: vertical; }
.check { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-error { color: var(--error); min-height: 1.2em; margin: 4px 0 10px; }

.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: linear-gradient(160deg, #0b3a3d 0 40%, var(--bg) 40%); }
.login-card { width: min(440px, 100%); background: var(--surface); padding: 36px 32px; border-top: 3px solid var(--accent); }
.login-logo { width: 150px; margin-bottom: 26px; }
.login-card h1 { font-size: 34px; margin-bottom: 8px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); margin: 18px 0; font-size: 14px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.shell > * { min-width: 0; }
.sidebar { background: #041b1d; border-right: 1px solid var(--line); padding: 24px 16px; display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh; }
.brand { display: grid; gap: 6px; text-decoration: none; color: var(--muted); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; }
.brand img { width: 120px; }
nav { display: grid; gap: 2px; }
.nav-link { text-align: left; border: 0; border-left: 3px solid transparent; padding: 10px 12px; font-weight: 500; color: var(--muted); display: flex; justify-content: space-between; }
.nav-link.active { color: var(--text); border-left-color: var(--accent); background: var(--surface-2); }
.nav-link .count { background: var(--accent); color: var(--accent-ink); font-size: 12px; padding: 0 7px; font-weight: 700; }
.side-note { margin-top: auto; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); padding-top: 14px; }

.workspace { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 32px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.tag { border: 1px solid var(--accent); color: var(--accent); padding: 2px 10px; font-size: 12px; letter-spacing: .08em; white-space: nowrap; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding: 28px 32px 8px; position: relative; }
.page-head::after { content: ''; position: absolute; right: 0; top: 0; width: 220px; height: 100%; background: linear-gradient(115deg, transparent 0 55%, rgba(154,240,231,.08) 55%); pointer-events: none; }
.page-head p { color: var(--muted); margin: 8px 0 0; }
#content { padding: 20px 32px 40px; display: grid; gap: 20px; }
footer { margin-top: auto; padding: 16px 32px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

.panel { background: var(--surface); border: 1px solid var(--line); padding: 20px; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat { background: var(--surface); border: 1px solid var(--line); padding: 18px; }
.stat span { color: var(--muted); font-size: 14px; }
.stat strong { display: block; font: 600 36px var(--display); margin: 4px 0; }
.stat small { color: var(--muted); }
.notice { border-left: 3px solid var(--accent); background: var(--surface-2); padding: 12px 16px; color: var(--muted); }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { display: inline-block; font-size: 12px; padding: 2px 8px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.pill.ok { border-color: var(--accent); color: var(--accent); }
.pill.warn { border-color: var(--warn); color: var(--warn); }
.pill.off { opacity: .7; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs button.active { background: var(--surface-2); border-color: var(--accent); }

.master { display: grid; grid-template-columns: 180px 1fr; gap: 20px; }
.master-photo { width: 180px; aspect-ratio: 3/4; object-fit: cover; clip-path: polygon(0 0, 100% 0, 100% 88%, 80% 100%, 0 100%); }
.works { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin-top: 14px; }
.work { background: var(--surface-2); border: 1px solid var(--line); display: flex; flex-direction: column; }
.work img { width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.work.hidden-work img { opacity: .35; }
.work-body { padding: 8px 10px; display: grid; gap: 6px; flex: 1; }
.work-body b { font-family: var(--display); font-weight: 500; font-size: 16px; }
.work-body small { color: var(--muted); }
.work-tools { display: flex; gap: 4px; flex-wrap: wrap; margin-top: auto; }
.work-tools button { padding: 3px 8px; font-size: 13px; }

.review { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; padding: 16px 0; border-top: 1px solid var(--line); }
.review:first-of-type { border-top: 0; }
.review-meta { color: var(--muted); font-size: 14px; }
.stars { color: var(--accent); letter-spacing: 2px; }
.review-photo { width: 84px; aspect-ratio: 3/4; object-fit: cover; grid-row: span 3; }
.reply { border-left: 2px solid var(--accent); padding-left: 10px; color: var(--muted); font-size: 15px; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; font-size: 13px; }
td small { display: block; color: var(--muted); }
.table-wrap { overflow-x: auto; }

.compose { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; }
.phone { background: #021416; border: 1px solid var(--line); padding: 26px 14px; border-radius: 26px; height: fit-content; }
.phone-note { background: rgba(243,245,240,.1); padding: 12px; border-radius: 12px; font-size: 14px; }
.phone-note b { display: block; }
.phone-note small { color: var(--muted); }

dialog { background: var(--surface); color: var(--text); border: 1px solid var(--line); border-top: 3px solid var(--accent); padding: 0; width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); }
dialog::backdrop { background: rgba(2, 16, 18, .7); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); margin: 0; }
#modal-body { padding: 20px; }
.preview-img { width: 140px; aspect-ratio: 4/5; object-fit: cover; margin-bottom: 12px; }
.toast { position: fixed; right: 20px; bottom: 20px; background: var(--accent); color: var(--accent-ink); padding: 12px 18px; font-weight: 600; max-width: calc(100vw - 40px); z-index: 10; }

@media (max-width: 960px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compose { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; padding: 14px 16px; gap: 12px; }
  .brand img { width: 96px; }
  nav { display: flex; overflow-x: auto; gap: 4px; }
  .nav-link { border-left: 0; border-bottom: 3px solid transparent; white-space: nowrap; }
  .nav-link.active { border-bottom-color: var(--accent); }
  .side-note { display: none; }
  .topbar, .page-head, footer { padding-left: 16px; padding-right: 16px; }
  #content { padding: 16px 16px 32px; }
  h1 { font-size: 30px; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .master { grid-template-columns: 1fr; }
  .master-photo { width: 140px; }
  .two { grid-template-columns: 1fr; }
  .review { grid-template-columns: 1fr; }
  .review-photo { grid-row: auto; }
  .panel-head > * { max-width: 100%; }
  .topbar { flex-wrap: wrap; }
}
