:root {
  color-scheme: dark;
  --ink: #0d0e0e;
  --ink-soft: #111313;
  --raised: #151717;
  --panel: #191b1b;
  --panel-2: #1f2221;
  --line: #2b2e2d;
  --line-strong: #454a47;
  --text: #f2eee7;
  --muted: #a4a8a2;
  --muted-2: #777c75;
  --accent: #c8a578;
  --accent-2: #ead7bd;
  --danger: #e0867c;
  --success: #9bcaa3;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 24px 70px rgba(0, 0, 0, .38);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--ink);
  color: var(--text);
  font-family: Inter, Avenir, "Helvetica Neue", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 82% -10%, rgba(200, 165, 120, .17), transparent 30rem),
    radial-gradient(circle at 8% 18%, rgba(255, 255, 255, .035), transparent 22rem),
    var(--ink);
}

img,
svg,
video {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--accent-2);
}

h1,
h2 {
  font-family: "Iowan Old Style", Baskerville, Georgia, serif;
  letter-spacing: -.025em;
}

h1 {
  margin: .2rem 0 .65rem;
  font-size: clamp(2.15rem, 5vw, 4rem);
  line-height: .98;
}

h2 {
  margin: 0 0 1.1rem;
  font-size: 1.35rem;
}

p {
  line-height: 1.65;
}

small {
  display: block;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.45;
}

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

.eyebrow {
  margin: 0 0 .75rem;
  color: var(--accent);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 1.4rem;
  min-height: 76px;
  padding: 0 max(24px, 4vw);
  border-bottom: 1px solid var(--line);
  background: rgba(13, 14, 14, .92);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  margin-right: auto;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
}

.brand small {
  color: var(--muted-2);
  font-size: .54rem;
  letter-spacing: .18em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  flex: 0 0 auto;
  border: 1px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  font: 700 .86rem Georgia, serif;
}

.topbar nav {
  display: flex;
  align-items: center;
  gap: clamp(.85rem, 1.8vw, 2rem);
}

.topbar nav a,
.link-button {
  color: var(--muted);
  font: inherit;
  font-size: .85rem;
}

.topbar nav a:hover,
.link-button:hover {
  color: var(--text);
}

.topbar form {
  margin: 0;
}

.nav-toggle,
.link-button {
  border: 0;
  background: none;
  cursor: pointer;
}

.nav-toggle {
  display: none;
  color: var(--text);
  font-size: 1.35rem;
}

.shell {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  padding: 64px 0 100px;
}

.auth-shell {
  display: grid;
  width: min(100% - 32px, 1240px);
  min-height: 100vh;
  place-items: center;
  padding: 30px 0;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 42px;
}

.page-head > * {
  min-width: 0;
}

.actions,
.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .75rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: .78rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--raised);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: .83rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.button:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #16120d;
}

.button.primary:hover {
  background: var(--accent-2);
  color: #16120d;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  margin-bottom: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(17, 19, 19, .88);
}

.stats article {
  min-width: 0;
  padding: 25px 30px;
  border-right: 1px solid var(--line);
}

.stats article:last-child {
  border-right: 0;
}

.stats span {
  display: block;
  color: var(--muted);
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.stats strong {
  display: block;
  margin: .55rem 0;
  overflow-wrap: anywhere;
  font: 600 2rem Georgia, serif;
}

.dashboard-grid,
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(290px, .8fr);
  gap: 32px;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-head h2 {
  margin: 0;
}

.section-head a {
  color: var(--accent);
  font-size: .8rem;
  white-space: nowrap;
}

.list-card,
.panel,
.data-card,
.form-card,
.project-card,
.gallery-card,
.login-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, #1b1d1d, #151717);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .035);
}

.panel,
.form-card {
  padding: 24px;
}

.empty {
  padding: 32px;
  color: var(--muted);
  text-align: center;
}

.list-row,
.calendar-row,
.file-row,
.payment-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
  padding: 16px 19px;
  border-bottom: 1px solid var(--line);
}

.list-row:last-child,
.calendar-row:last-child,
.file-row:last-child,
.payment-row:last-child {
  border-bottom: 0;
}

.list-row:hover,
.calendar-row:hover,
.file-row:hover {
  background: rgba(255, 255, 255, .035);
}

.list-row span,
.calendar-row span,
.file-row span,
.payment-row span {
  min-width: 0;
}

.list-row > span:not(.badge):not(.tag),
.calendar-row > span:not(.badge):not(.tag),
.file-row > span:not(.badge):not(.tag),
.payment-row > span:not(.badge):not(.tag) {
  flex: 1 1 auto;
}

.list-row strong,
.calendar-row strong,
.file-row strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-row time,
.calendar-row time {
  width: 52px;
  flex: 0 0 auto;
  color: var(--accent);
  font-size: .7rem;
  text-align: center;
  text-transform: uppercase;
}

.list-row time b,
.calendar-row time b {
  display: block;
  font: 600 1.45rem Georgia, serif;
}

.badge,
.tag {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: .3rem .58rem;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px;
  background: rgba(255, 255, 255, .055);
  color: #cfd2cc;
  font-size: .68rem;
  line-height: 1.1;
  white-space: nowrap;
}

.tag {
  margin: 0 .25rem .25rem 0;
}

.status-completed {
  border-color: rgba(155, 202, 163, .38);
  color: var(--success);
}

.status-cancelled,
.danger {
  color: var(--danger);
}

.pipeline {
  border-top: 1px solid var(--line);
}

.pipeline div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 13px 4px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.pipeline b {
  color: var(--text);
}

.messages {
  position: fixed;
  top: 92px;
  right: 24px;
  z-index: 50;
  display: grid;
  gap: .7rem;
  width: min(380px, calc(100vw - 32px));
}

.message {
  padding: 13px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #262929;
  box-shadow: var(--shadow);
  transition: opacity .3s, transform .3s;
}

.message.success {
  border-color: rgba(155, 202, 163, .5);
}

.message.error {
  border-color: rgba(224, 134, 124, .6);
}

.message.fade {
  opacity: 0;
  transform: translateY(-8px);
}

.filterbar,
.searchbar {
  display: flex;
  align-items: stretch;
  gap: .75rem;
  margin-bottom: 28px;
}

.filterbar input,
.searchbar input {
  flex: 1 1 280px;
}

.filterbar select {
  flex: 0 1 220px;
}

.searchbar {
  max-width: 800px;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  color: var(--muted);
  font-size: .85rem;
  white-space: nowrap;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  padding: .8rem .9rem;
  border: 1px solid #343837;
  border-radius: var(--radius-sm);
  outline: none;
  background: #101212;
  color: var(--text);
  font: inherit;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(200, 165, 120, .14);
}

input[type="checkbox"] {
  width: auto;
  min-height: 0;
  accent-color: var(--accent);
}

input[type="file"] {
  padding: .65rem;
}

.form-card {
  padding: 32px;
}

.form-card.narrow {
  max-width: 760px;
}

.form-card > div:not(.form-grid):not(.form-actions),
.form-card .field {
  margin-bottom: 1.2rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.form-grid .field {
  margin-bottom: 0;
}

.field.wide {
  grid-column: 1 / -1;
}

.field label,
.form-card > div > label,
.login-card label {
  display: block;
  margin-bottom: .45rem;
  color: #c5c7c3;
  font-size: .77rem;
  font-weight: 600;
}

.helptext,
.field small {
  margin-top: .35rem;
}

.errorlist,
.error {
  margin: .45rem 0 0;
  padding: 0;
  color: var(--danger);
  font-size: .78rem;
  list-style: none;
}

.form-actions {
  flex-wrap: wrap;
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

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

th,
td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-align: left;
  text-transform: uppercase;
}

td {
  font-size: .88rem;
}

tr:last-child td {
  border-bottom: 0;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.project-card {
  display: flex;
  min-width: 0;
  min-height: 210px;
  flex-direction: column;
  padding: 22px;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}

.project-card:hover {
  border-color: #4a4d4b;
  box-shadow: var(--shadow);
  color: var(--text);
  transform: translateY(-3px);
}

.project-card > div:first-child,
.card-foot,
.title-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-width: 0;
}

.title-meta {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.project-card h2 {
  margin: 28px 0 5px;
}

.project-card p {
  margin: 0;
  color: var(--muted);
  font-size: .85rem;
}

.card-foot {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .75rem;
}

.details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
}

.details div {
  min-width: 0;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.details dt {
  color: var(--muted);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.details dd {
  margin: .35rem 0 0;
  overflow-wrap: anywhere;
}

.sensitive {
  border-left: 3px solid #8d6951;
}

.timeline {
  margin-top: 22px;
}

.timeline > div {
  display: flex;
  gap: 12px;
  padding-bottom: 18px;
}

.timeline i {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.timeline p {
  min-width: 0;
  margin: 0;
  font-size: .82rem;
}

.file-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .055);
  color: var(--accent);
}

.file-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.file-preview-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .035);
}

.file-preview-card strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-preview-card p {
  margin: .55rem 0 0;
  color: var(--accent);
  font-size: .82rem;
}

.file-preview-image {
  display: grid;
  overflow: hidden;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 10px;
  background: #0b0c0c;
}

.file-preview-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.file-preview-document {
  border: 1px solid var(--line);
  color: var(--accent);
  font: 700 .9rem Georgia, serif;
  letter-spacing: .08em;
}

.payment-row {
  justify-content: space-between;
}

.payment-row form {
  flex: 0 0 auto;
}

.calendar-list {
  display: flex;
  max-width: 900px;
  flex-direction: column;
  gap: 42px;
}

.login-card {
  width: min(430px, 100%);
  padding: 44px;
  box-shadow: var(--shadow);
}

.hero-mark {
  width: 58px;
  height: 58px;
  margin-bottom: 32px;
  font-size: 1.8rem;
}

.login-card h1 {
  font-size: 3rem;
}

.login-card form {
  margin-top: 30px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.gallery-card {
  overflow: hidden;
}

.gallery-image {
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #0b0c0c;
}

.gallery-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s;
}

.gallery-card:hover img {
  transform: scale(1.025);
}

.gallery-copy {
  padding: 20px;
}

.gallery-copy h2 {
  margin: .2rem 0 .4rem;
}

.gallery-copy p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: .82rem;
}

.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .45rem;
  margin: 1rem 0;
}

.gallery-thumbs a {
  display: block;
  overflow: hidden;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b0c0c;
}

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

@media (max-width: 1000px) {
  .topbar {
    flex-wrap: wrap;
    gap: 0 1rem;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .topbar nav {
    display: none;
    order: 10;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: .4rem;
    padding-top: 12px;
  }

  .topbar nav.open {
    display: flex;
  }

  .topbar nav a {
    padding: .65rem 0;
    border-top: 1px solid rgba(255, 255, 255, .06);
  }

  .topbar form {
    display: none;
  }

  .topbar nav.open + form {
    display: block;
    order: 11;
    width: 100%;
    padding-top: .6rem;
    border-top: 1px solid rgba(255, 255, 255, .06);
  }

  .topbar nav.open + form .link-button {
    min-height: 38px;
    color: var(--accent);
  }

  .dashboard-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .project-grid,
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .shell {
    width: min(100% - 28px, 1240px);
    padding-top: 36px;
  }

  .topbar {
    padding-right: 16px;
    padding-left: 16px;
  }

  .page-head {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 28px;
  }

  .actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .actions .button {
    flex: 1 1 150px;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .stats article {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .stats article:last-child {
    border-bottom: 0;
  }

  .two-col,
  .project-grid,
  .gallery-grid,
  .form-grid,
  .details {
    grid-template-columns: 1fr;
  }

  .field.wide {
    grid-column: auto;
  }

  .filterbar,
  .searchbar {
    flex-direction: column;
  }

  .filterbar select,
  .filterbar input,
  .searchbar input,
  .filterbar .button,
  .searchbar .button {
    flex: 1 1 auto;
    width: 100%;
  }

  .check {
    align-self: flex-start;
  }

  .form-card,
  .panel,
  .login-card {
    padding: 24px;
  }

  .list-row,
  .calendar-row,
  .file-row,
  .payment-row {
    align-items: flex-start;
    padding: 14px 12px;
  }

  .list-row,
  .calendar-row,
  .file-row {
    flex-wrap: wrap;
  }

  .badge {
    font-size: .62rem;
  }

  .card-foot {
    align-items: flex-start;
    flex-direction: column;
    gap: .35rem;
  }

  .messages {
    top: 86px;
    right: 14px;
    left: 14px;
    width: auto;
  }

  .file-preview-grid {
    grid-template-columns: 1fr;
  }

  .file-preview-card {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .table-wrap {
    overflow: visible;
  }

  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
  }

  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  tr {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
  }

  tr:last-child {
    border-bottom: 0;
  }

  td {
    display: grid;
    grid-template-columns: minmax(90px, .42fr) minmax(0, 1fr);
    gap: .75rem;
    padding: .55rem 0;
    border-bottom: 0;
    overflow-wrap: anywhere;
  }

  td::before {
    color: var(--muted);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
  }

  td:nth-child(1)::before { content: "Client"; }
  td:nth-child(2)::before { content: "Contact"; }
  td:nth-child(3)::before { content: "Updated"; }
  td:nth-child(4)::before { content: "Details"; }

  td.empty {
    display: block;
    padding: 24px;
  }

  td.empty::before {
    content: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
