/* 7VENCORE dashboard. One dark ground, elevation by lightness, square corners like the site. */
@font-face { font-family: "Montserrat"; src: url("/assets/Montserrat.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
:root {
  --bg: #0c0b0a; --surface: #151311; --surface-2: #1e1b18; --surface-3: #2a2622;
  --rule: #24211d; --edge: #3a352f;
  --ink: #e7e4de; --muted: #a6a29b; --bad: #f0b9a6; --good: #b9d9b0;
  --side: 15rem; --gap: clamp(1rem, 2.5vw, 2rem);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 450 0.9375rem/1.5 "Montserrat", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
h1, h2, p, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.muted { color: var(--muted); }
.nums { font-variant-numeric: tabular-nums; }
.boot { padding: 2rem; color: var(--muted); }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; min-height: 2.5rem; padding: 0 1rem; background: var(--surface-3); border: 0; font-weight: 650; font-size: 0.875rem; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background-color 160ms ease, transform 120ms var(--ease-out); }
.btn:hover { background: #36312c; }
.btn:active { transform: scale(0.97); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.btn--primary { background: var(--ink); color: var(--bg); }
.btn--primary:hover { background: #fffaf1; }
.btn--danger { background: #251915; color: var(--bad); }
.btn--danger:hover { background: #352119; }
.btn--small { min-height: 2rem; padding: 0 0.7rem; font-size: 0.8125rem; }
.btn--wide { width: 100%; min-height: 3rem; }
.link { text-decoration: underline; text-underline-offset: 0.2em; text-decoration-color: var(--edge); transition: text-decoration-color 160ms ease; }
.link:hover { text-decoration-color: currentColor; }
.fld { display: grid; gap: 0.45rem; margin-bottom: 1rem; }
.fld label, .label { font-size: 0.875rem; font-weight: 600; }
.input { width: 100%; min-height: 2.5rem; padding: 0.55rem 0.75rem; background: var(--bg); border: 1px solid var(--edge); border-radius: 0; font-size: 0.9375rem; transition: border-color 160ms ease; }
.input:hover { border-color: #57504a; }
.input:focus-visible { outline-offset: 0; border-color: var(--ink); }
textarea.input { resize: vertical; line-height: 1.55; }
.hint { color: var(--muted); font-size: 0.8125rem; }
.pair { display: grid; gap: 0 var(--gap); }
@media (min-width: 60em) { .pair { grid-template-columns: 1fr 1fr; } }

/* ---------- login ---------- */
.login { min-height: 100svh; display: grid; place-items: center; padding: 1rem; }
.login__card { width: min(24rem, 100%); background: var(--surface); padding: 2rem; }
.login__mark { font-weight: 900; letter-spacing: -0.02em; font-size: 1.125rem; }
.login__title { font-size: 2rem; font-weight: 850; letter-spacing: -0.03em; margin: 0.25rem 0 1.75rem; }
.err { color: var(--bad); min-height: 1.5em; margin-bottom: 0.75rem; font-weight: 600; }

/* ---------- shell ---------- */
.shell { display: grid; min-height: 100svh; }
.side { background: var(--bg); border-bottom: 1px solid var(--rule); padding: 1rem; display: grid; gap: 1rem; }
.side__mark { font-weight: 900; letter-spacing: -0.02em; font-size: 1.125rem; text-decoration: none; display: flex; align-items: baseline; gap: 0.5rem; }
.side__mark span { font-weight: 500; font-size: 0.8125rem; color: var(--muted); letter-spacing: 0; }
.nav { display: flex; gap: 0.25rem; overflow-x: auto; scrollbar-width: none; margin-inline: -0.25rem; }
.nav__item { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; min-height: 2.25rem; padding: 0 0.75rem; text-decoration: none; white-space: nowrap; color: var(--muted); font-weight: 600; transition: background-color 160ms ease, color 160ms ease; }
.nav__item:hover { color: var(--ink); background: var(--surface); }
.nav__item.is-on { color: var(--ink); background: var(--surface-2); }
.count { min-width: 1.5rem; padding: 0 0.4rem; background: var(--ink); color: var(--bg); font-size: 0.75rem; font-weight: 800; text-align: center; line-height: 1.5rem; }
.side__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; font-size: 0.8125rem; }
.side__user { color: var(--muted); margin-right: auto; }
.side__user strong { color: var(--ink); }
.side__link { background: none; border: 0; padding: 0; cursor: pointer; font-weight: 600; text-decoration: underline; text-underline-offset: 0.2em; text-decoration-color: var(--edge); }
.side__link:hover { text-decoration-color: currentColor; }
.main { padding: 1.5rem var(--gap) 4rem; max-width: 76rem; width: 100%; }
@media (min-width: 60em) {
  .shell { grid-template-columns: var(--side) 1fr; }
  .side { position: sticky; top: 0; height: 100svh; border-bottom: 0; border-right: 1px solid var(--rule); grid-template-rows: auto 1fr auto; padding: 1.25rem 0.75rem; }
  .side__mark { padding: 0 0.75rem; flex-direction: column; gap: 0; }
  .nav { flex-direction: column; overflow: visible; margin: 0.5rem 0 0; }
  .side__foot { flex-direction: column; align-items: flex-start; padding: 0 0.75rem; }
  .main { padding: 2.25rem 2.5rem 5rem; }
}

/* ---------- title row + panels ---------- */
.title { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 2rem; margin-bottom: 1.75rem; }
.title h1 { font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.25rem); font-weight: 850; letter-spacing: -0.03em; line-height: 1.05; outline: none; }
.title__sub { color: var(--muted); margin-top: 0.4rem; max-width: 60ch; }
.panel { background: var(--surface); padding: 1.25rem; margin-bottom: var(--gap); }
.panel--plain { background: none; padding: 0; }
.panel__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 0.75rem; }
.panel h2, .form-grid__label h2 { font-size: 1rem; font-weight: 750; }
.grid2 { display: grid; gap: 0 var(--gap); }
@media (min-width: 70em) { .grid2 { grid-template-columns: 1fr 1fr; } }
.empty { color: var(--muted); padding: 0.75rem 0; }
.form-grid { display: grid; gap: 1rem var(--gap); }
.form-grid__label .hint { margin-top: 0.35rem; }
@media (min-width: 70em) { .form-grid { grid-template-columns: 16rem 1fr; } }

/* ---------- rows ---------- */
.rows { display: grid; }
.row { display: grid; grid-template-columns: 1fr auto; gap: 0.25rem 1rem; align-items: center; padding: 0.75rem 0; border-top: 1px solid var(--rule); }
.rows > li:first-child .row, .rows > .row:first-child { border-top: 0; }
.row--link { text-decoration: none; padding-inline: 0.5rem; margin-inline: -0.5rem; transition: background-color 160ms ease; }
.row--link:hover { background: var(--surface-2); }
.row__main { display: grid; min-width: 0; }
.row__main strong { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row__side { display: grid; text-align: right; font-weight: 650; }
.row__side .muted { font-weight: 500; font-size: 0.8125rem; }
.row__date { font-weight: 750; }
.row__acts { display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: flex-end; }
.tag { font-weight: 850; font-size: 0.8125rem; }
.panel .rows .row:has(.row__date) { grid-template-columns: 1fr auto; }
@media (min-width: 48em) { .panel .rows .row:has(.row__date) { grid-template-columns: 10.5rem 1fr 3rem auto; } }
.edit { padding: 1rem 0; border-top: 1px solid var(--rule); }
.edit__grid { display: grid; gap: 0 var(--gap); }
@media (min-width: 48em) { .edit__grid { grid-template-columns: repeat(3, 1fr); } }
.actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }

/* ---------- inbox ---------- */
.inbox { display: grid; gap: 0.25rem; }
.mail { background: var(--surface); }
.mail__sum { display: grid; grid-template-columns: 0.6rem 1fr auto; gap: 0.25rem 1rem; align-items: center; padding: 0.9rem 1.25rem; cursor: pointer; list-style: none; transition: background-color 160ms ease; }
.mail__sum::-webkit-details-marker { display: none; }
.mail__sum:hover { background: var(--surface-2); }
.mail__dot { width: 0.5rem; height: 0.5rem; background: transparent; }
.mail.is-new .mail__dot { background: var(--ink); }
.mail.is-new .row__main strong { font-weight: 850; }
.mail__body { padding: 0.25rem 1.25rem 1.25rem 2.85rem; display: grid; gap: 1rem; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 0.75rem 1.5rem; }
.facts dt { color: var(--muted); font-size: 0.8125rem; }
.facts dd { font-weight: 650; overflow-wrap: anywhere; }
.mail__msg { background: var(--bg); padding: 1rem; max-width: 70ch; overflow-wrap: anywhere; }
.seg { display: inline-flex; background: var(--surface); padding: 0.2rem; }
.seg__btn { min-height: 2.25rem; padding: 0 0.9rem; border: 0; background: none; cursor: pointer; font-weight: 650; color: var(--muted); }
.seg__btn.is-on { background: var(--surface-3); color: var(--ink); }

/* ---------- portfolio ---------- */
.tabs { display: flex; gap: 0.25rem; margin-bottom: 1rem; overflow-x: auto; }
.tabs__item { min-height: 2.5rem; display: inline-flex; align-items: center; padding: 0 1rem; text-decoration: none; font-weight: 650; color: var(--muted); background: var(--surface); transition: color 160ms ease, background-color 160ms ease; }
.tabs__item:hover { color: var(--ink); }
.tabs__item.is-on { color: var(--bg); background: var(--ink); }
.drop { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; padding: 1rem; background: var(--bg); margin: 1rem 0; cursor: pointer; position: relative; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.drop:focus-within { outline: 2px solid var(--ink); outline-offset: 2px; }
.drop--inline { background: none; padding: 0; margin: 0; display: inline-flex; }
.cards { display: grid; gap: 0.5rem; }
.card { display: grid; grid-template-columns: 6rem 1fr; gap: 1rem; padding: 1rem; background: var(--bg); align-items: start; }
.card--wide { grid-template-columns: 1fr; }
.card__num { position: absolute; }
.card { position: relative; }
.card__num { top: 0.5rem; left: 0.5rem; background: var(--bg); padding: 0 0.35rem; font-size: 0.75rem; font-weight: 800; z-index: 1; }
.card__fields .fld { margin-bottom: 0.6rem; }
.card .row__acts { grid-column: 1 / -1; justify-content: flex-start; }
.thumb { width: 6rem; aspect-ratio: 4 / 5; object-fit: cover; background: var(--surface-2); filter: grayscale(1) sepia(0.12) contrast(1.05); }
.thumb--empty { display: grid; place-items: center; color: var(--muted); font-size: 0.75rem; filter: none; }
.photo-pick { display: flex; flex-wrap: wrap; align-items: end; gap: 1rem; }
.photo-pick .thumb { width: 8rem; }
.photo-pick .fld { flex: 1 1 14rem; margin: 0; }
@media (min-width: 48em) { .card { grid-template-columns: 7.5rem 1fr auto; } .card .row__acts { grid-column: auto; flex-direction: column; align-items: stretch; } .thumb { width: 7.5rem; } }

/* ---------- quick links ---------- */
.quick { display: grid; gap: 0.5rem; }
@media (min-width: 48em) { .quick { grid-template-columns: 1fr 1fr; } }
.quick__item { display: flex; gap: 1rem; align-items: center; padding: 1rem; background: var(--surface); text-decoration: none; transition: background-color 160ms ease; }
.quick__item:hover { background: var(--surface-2); }
.quick__item .thumb { width: 4rem; }
.quick__item span { display: grid; }

/* ---------- save bar ---------- */
.savebar { position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; justify-content: flex-end; gap: 1rem; padding: 0.9rem 0; background: var(--bg); }
.stamp { color: var(--muted); font-weight: 600; font-size: 0.875rem; }
.stamp.is-bad { color: var(--bad); }
@media (prefers-reduced-motion: no-preference) {
  .main > * { animation: in 360ms var(--ease-out) both; }
  .main > :nth-child(2) { animation-delay: 40ms; }
  .main > :nth-child(3) { animation-delay: 80ms; }
}
@keyframes in { from { opacity: 0; transform: translateY(8px); } }
.main.is-quiet > * { animation: none; }
