@import url("../assets/plusjakartasans.css");

:root {
  --ink: #000000;
  --muted: #696969;
  --line: #deded8;
  --paper: #f7f7f1;
  --surface: #ffffff;
  --soft: #f0f0ea;
  --red: #d23b31;
  --amber: #9c6a08;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.09);
  --radius: 30px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

#app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 300px 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  overflow: hidden;
  min-height: 100vh;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: 30px 24px;
  background: #000000;
  color: #ffffff;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
}

.brand-logo {
  width: min(220px, 100%);
  height: auto;
  display: block;
  filter: invert(1);
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  font-size: 15px;
  font-weight: 800;
}

.brand span {
  margin-top: 4px;
  color: #a3a3a3;
  font-size: 12px;
}

.menu {
  display: grid;
  gap: 10px;
}

.menu button {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 999px;
  color: #dcdcdc;
  background: transparent;
  padding: 0 16px;
  text-align: left;
  font-weight: 700;
}

.menu button:hover,
.menu button.active {
  background: #ffffff;
  color: #000000;
}

.upgrade-callout {
  display: grid;
  gap: 9px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  background: #121212;
  color: #ffffff;
}

.upgrade-callout strong {
  font-size: 14px;
}

.upgrade-callout span {
  color: #b7b7b7;
  font-size: 12px;
  line-height: 1.45;
}

.upgrade-callout button {
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  background: #ffffff;
  color: #000000;
  font-weight: 900;
}

.sidebar-spacer {
  margin-top: auto;
}

.security-footer {
  position: fixed;
  right: 24px;
  bottom: 14px;
  z-index: 5;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
}

.logout-button {
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: #ffffff;
  color: #000000;
  font-weight: 800;
}

.login-shell {
  grid-column: 1 / -1;
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background: #050505;
}

.login-shell::before,
.login-shell::after {
  content: "";
  position: absolute;
  inset: -18%;
  pointer-events: none;
}

.login-shell::before {
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.16), transparent 10%),
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.16), transparent 19%),
    radial-gradient(circle at 72% 76%, rgba(255, 255, 255, 0.12), transparent 22%);
  filter: blur(28px);
  opacity: 0.8;
}

.login-shell::after {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at center, #000000 0%, transparent 68%);
}

.spiral-scene {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  perspective: 900px;
  pointer-events: none;
}

.spiral-scene span {
  position: absolute;
  width: var(--size);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 50%;
  transform:
    rotate(var(--angle))
    translateX(var(--shift))
    rotateX(64deg)
    rotateY(-8deg);
  animation: spiral-turn 14s linear infinite;
  animation-delay: var(--delay);
  opacity: 0.48;
}

.spiral-scene span:nth-child(3n) {
  border-radius: 44% 56% 48% 52%;
}

.spiral-scene span:nth-child(4n) {
  border-color: rgba(255, 255, 255, 0.18);
}

@keyframes spiral-turn {
  0% {
    transform:
      rotate(var(--angle))
      translateX(var(--shift))
      rotateX(64deg)
      rotateY(-8deg)
      scale(0.92);
  }

  50% {
    transform:
      rotate(calc(var(--angle) + 180deg))
      translateX(var(--shift))
      rotateX(64deg)
      rotateY(8deg)
      scale(1.04);
  }

  100% {
    transform:
      rotate(calc(var(--angle) + 360deg))
      translateX(var(--shift))
      rotateX(64deg)
      rotateY(-8deg)
      scale(0.92);
  }
}

.login-panel {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  display: grid;
  gap: 24px;
  padding: 36px;
  background: #ffffff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.login-brand {
  color: var(--ink);
  align-items: flex-start;
  justify-content: flex-start;
}

.login-logo {
  width: 150px;
  filter: none;
  margin-top: 4px;
}

.login-brand span {
  color: var(--muted);
}

.login-form,
.demo-logins {
  display: grid;
  gap: 14px;
}

.signup-panel {
  width: min(720px, 100%);
}

.signup-switch {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 6px;
  background: var(--soft);
  border-radius: 999px;
}

.signup-switch button {
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.signup-switch button.active {
  background: #000000;
  color: #ffffff;
}

.login-error {
  padding: 12px 14px;
  background: #fff1f0;
  border: 1px solid #efb9b3;
  border-radius: 18px;
  color: var(--red);
  font-weight: 800;
}

.demo-logins {
  gap: 6px;
  padding: 18px;
  background: var(--soft);
  border-radius: 22px;
  color: var(--muted);
  font-size: 13px;
}

.demo-logins strong {
  color: var(--ink);
}

.shell {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  min-height: 116px;
  padding: 30px 38px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 247, 241, 0.92);
  backdrop-filter: blur(12px);
}

.eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  margin-top: 6px;
  font-size: 42px;
  font-weight: 300;
  line-height: 1.05;
}

h2 {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-icon,
.profile-button {
  position: relative;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid #000000;
  border-radius: 50%;
  background: #ffffff;
  color: #000000;
}

.topbar-icon:hover,
.profile-button:hover,
.profile-button {
  background: #000000;
  color: #ffffff;
}

.profile-button {
  padding: 0;
  overflow: hidden;
}

.topbar-icon.muted {
  border-color: var(--line);
  color: var(--muted);
}

.notification-dot {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  padding: 0 6px;
  border: 2px solid var(--paper);
  border-radius: 999px;
  background: #000000;
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
}

.content {
  padding: 30px 38px 46px;
  display: grid;
  gap: 24px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.metric,
.panel,
.project-card,
.profile-card,
.form-panel,
.portfolio-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.metric {
  padding: 24px;
}

.metric span,
.metric small {
  color: var(--muted);
}

.metric strong {
  display: block;
  margin: 10px 0 4px;
  font-size: 42px;
  font-weight: 300;
}

.two-column {
  display: grid;
  grid-template-columns: 1.35fr 0.8fr;
  gap: 20px;
  align-items: start;
}

.panel,
.form-panel {
  padding: 24px;
  display: grid;
  gap: 16px;
}

.section-head,
.card-title,
.application-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.ghost,
.primary,
.icon-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #000000;
  border-radius: 999px;
  background: #ffffff;
  color: #000000;
  padding: 0 18px;
  font-weight: 800;
}

.primary,
.ghost:hover {
  background: #000000;
  color: #ffffff;
}

.icon-button {
  width: 42px;
  padding: 0;
}

.icon-button.danger,
.danger-text {
  color: var(--red);
  border-color: #e8b5b0;
}

.danger-text {
  width: fit-content;
  margin-top: 14px;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.action-profile-card {
  position: relative;
  padding-right: 196px;
}

.business-action-card {
  padding-right: 116px;
}

.admin-card-actions {
  position: absolute;
  top: 18px;
  right: 18px;
  display: flex;
  gap: 7px;
  z-index: 2;
}

.admin-card-actions .icon-button {
  width: 36px;
  height: 36px;
  min-height: 36px;
  flex: 0 0 36px;
  background: #ffffff;
}

.project-side .icon-button,
.application-actions .icon-button,
.service-pill .icon-button {
  width: 36px;
  height: 36px;
  min-height: 36px;
}

.rules {
  display: grid;
  gap: 14px;
  color: var(--muted);
  line-height: 1.6;
}

.settings-block {
  display: grid;
  gap: 12px;
  padding: 18px;
  background: var(--soft);
  border-radius: 24px;
}

.settings-message {
  padding: 12px 14px;
  border-radius: 18px;
  background: #ffffff;
  color: var(--muted);
  font-weight: 800;
}

.membership-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.payment-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
}

.payment-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.profile-image-setting {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.notification-list {
  display: grid;
  gap: 10px;
}

.notification-list p {
  padding: 14px 16px;
  background: var(--soft);
  border-radius: 18px;
  color: var(--ink);
  font-weight: 700;
}

.chat-layout {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.chat-sidebar,
.chat-window {
  min-height: 560px;
}

.chat-sidebar {
  align-content: start;
}

.chat-list,
.chat-requests,
.message-list {
  display: grid;
  gap: 10px;
}

.chat-person {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #ffffff;
  color: var(--ink);
}

.chat-person.active {
  background: #000000;
  color: #ffffff;
}

.chat-person strong {
  align-self: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-person .actions,
.chat-person > span:not(.avatar) {
  grid-column: 2;
}

.chat-profile-button {
  width: 42px;
  height: 42px;
  min-height: 42px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  padding: 0;
}

.chat-profile-button:hover .chat-avatar {
  outline: 3px solid rgba(0, 0, 0, 0.12);
}

.avatar.chat-avatar {
  width: 42px;
  height: 42px;
  min-width: 42px;
  font-size: 13px;
}

.chat-list span,
.chat-requests span,
.muted-text {
  color: var(--muted);
  font-size: 13px;
}

.message-list {
  min-height: 360px;
  align-content: start;
  padding-top: 4px;
}

.message-list article {
  width: min(78%, 620px);
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 22px;
  background: var(--soft);
}

.message-list article.mine {
  justify-self: end;
  background: #000000;
  color: #ffffff;
}

.message-list article.mine .attachment-list span {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.message-list small {
  color: var(--muted);
}

.chat-window-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.chat-title-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-title-profile span:not(.avatar) {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.chat-options {
  position: relative;
}

.chat-options summary {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #ffffff;
  color: #000000;
  list-style: none;
  cursor: pointer;
}

.chat-options summary::-webkit-details-marker {
  display: none;
}

.chat-options[open] summary {
  background: #000000;
  color: #ffffff;
}

.chat-options button {
  position: absolute;
  right: 0;
  top: 50px;
  z-index: 2;
  width: max-content;
  margin-top: 0;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.chat-compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px 42px;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
}

.chat-compose input[name="message"] {
  border: 0;
  box-shadow: none;
  background: transparent;
  padding-left: 12px;
}

.compose-file,
.compose-send {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
}

.compose-file {
  color: #000000;
  cursor: pointer;
}

.compose-file input {
  display: none;
}

.compose-send {
  border: 0;
  background: #000000;
  color: #ffffff;
  padding: 0;
}

.detail-modal {
  width: min(880px, 100%);
}

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

.detail-grid p,
.detail-list article {
  display: grid;
  gap: 5px;
  padding: 14px;
  background: var(--soft);
  border-radius: 18px;
}

.detail-grid span,
.detail-list span,
.detail-list p,
.detail-bio {
  color: var(--muted);
  line-height: 1.55;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.detail-list {
  display: grid;
  gap: 10px;
}

.project-list,
.grid-list {
  display: grid;
  gap: 16px;
}

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

.project-card {
  padding: 22px;
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 22px;
}

.project-meta,
.tags,
.actions,
.private-info,
.mini-list,
.attachment-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.project-meta {
  margin-bottom: 10px;
}

.project-meta span,
.tags span,
.status,
.membership-badge,
.mini-list small {
  background: var(--soft);
  color: #3e3e3e;
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 800;
}

.membership-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.membership-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.membership-badge.hub {
  background: #000000;
  color: #ffffff;
}

.membership-badge.free {
  background: var(--soft);
  color: var(--muted);
}

.project-card p,
.profile-card p,
.application-row p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.55;
}

.tags {
  margin-top: 14px;
}

.attachment-list {
  margin-top: 14px;
}

.attachment-list span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.attachment-list svg {
  width: 14px;
  height: 14px;
}

.project-side {
  border-left: 1px solid var(--line);
  padding-left: 20px;
  display: grid;
  gap: 11px;
  justify-items: start;
  align-content: center;
}

.project-side strong {
  font-size: 28px;
  font-weight: 300;
}

.project-side small,
.application-row small {
  color: var(--muted);
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 150px 190px 160px auto;
  gap: 10px;
  align-items: center;
}

.list-toolbar {
  grid-template-columns: minmax(220px, 1fr) minmax(170px, 0.45fr) minmax(150px, auto) auto;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: 999px;
  padding: 12px 16px;
  color: var(--ink);
  outline: 0;
}

textarea {
  resize: vertical;
  border-radius: 24px;
}

input:focus,
textarea:focus,
select:focus {
  border-color: #000000;
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.08);
}

.profile-card {
  padding: 22px;
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 16px;
}

.avatar {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #000000;
  color: #ffffff;
  font-weight: 900;
  overflow: hidden;
}

.avatar.business,
.avatar.designer {
  background: #000000;
}

.avatar-status-wrap {
  position: relative;
  width: 64px;
  height: 64px;
}

.avatar-status-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 18px;
  height: 18px;
  border: 3px solid var(--surface);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.avatar-status-badge.free {
  background: #b8b8ad;
}

.avatar-status-badge.hub {
  background: #000000;
}

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

.profile-button-avatar {
  width: 44px;
  height: 44px;
  background: transparent;
  color: inherit;
  font-size: 13px;
}

.settings-avatar {
  width: 86px;
  height: 86px;
  font-size: 24px;
}

.card-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.card-title .membership-badge.hub {
  color: #ffffff;
}

.card-title .membership-badge.free {
  color: var(--muted);
}

.private-info {
  margin-top: 14px;
  padding: 14px;
  background: var(--soft);
  border-radius: 22px;
}

.private-info.locked {
  color: var(--muted);
}

.portfolio-strip {
  margin-top: 14px;
  display: flex;
  gap: 8px;
}

.portfolio-strip img {
  width: 76px;
  height: 58px;
  object-fit: cover;
  border-radius: 14px;
}

.application-row {
  align-items: flex-start;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.application-row:last-child {
  border-bottom: 0;
}

.application-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status.pending {
  color: var(--amber);
  background: #fff6de;
}

.status.approved {
  color: #111111;
  background: #e8e8df;
}

.status.rejected {
  color: var(--red);
  background: #fdecea;
}

.form-panel {
  max-width: 780px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.upload-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px dashed #bdbdb6;
  border-radius: 999px;
  background: #ffffff;
  color: #000000;
  padding: 0 16px;
  font-weight: 900;
  cursor: pointer;
}

.upload-button:hover {
  border-style: solid;
  border-color: #000000;
  background: var(--soft);
}

.toggle {
  grid-template-columns: 18px 1fr;
  align-items: center;
}

.toggle input {
  width: 18px;
  height: 18px;
}

.inline-form,
.portfolio-form,
.form-grid {
  display: grid;
  gap: 10px;
}

.inline-form {
  grid-template-columns: 1fr auto;
}

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

.portfolio-form {
  grid-template-columns: 1fr;
}

.portfolio-page {
  display: grid;
  gap: 18px;
}

.portfolio-toolbar {
  grid-template-columns: minmax(220px, 1fr) 150px 190px 140px auto;
}

.service-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.service-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
}

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

.portfolio-card {
  overflow: hidden;
}

.portfolio-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.portfolio-media {
  position: relative;
}

.portfolio-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.portfolio-card-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 7px;
}

.portfolio-card-actions .icon-button {
  width: 34px;
  height: 34px;
  min-height: 34px;
  border: 0;
  background: rgba(255, 255, 255, 0.92);
  color: #000000;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
}

.portfolio-card-actions .icon-button:hover {
  background: #000000;
  color: #ffffff;
}

.portfolio-card-actions .icon-button.danger:hover {
  background: var(--red);
  color: #ffffff;
}

.portfolio-card-body {
  padding: 14px;
}

.case-study-card {
  display: grid;
  grid-template-rows: auto 1fr;
}

.case-study-card > img {
  aspect-ratio: 16 / 10;
}

.case-study-card .portfolio-media img {
  aspect-ratio: 16 / 10;
}

.case-study-card p {
  color: var(--muted);
  line-height: 1.55;
  margin-top: 10px;
}

.case-sections {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 12px;
  background: var(--soft);
  border-radius: 18px;
}

.portfolio-link {
  display: inline-flex;
  width: fit-content;
  margin-top: 12px;
  color: #000000;
  font-weight: 800;
}

.trashed-card {
  opacity: 0.82;
  background: #f7f7f2;
}

.empty {
  min-height: 180px;
  display: grid;
  place-items: center;
  background: #ffffff;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.5);
  z-index: 20;
  overflow: auto;
}

.modal-card {
  width: min(680px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  display: grid;
  gap: 16px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
}

.modal-card .section-head {
  align-items: center;
  gap: 18px;
}

.modal-card .section-head h2 {
  margin: 0;
}

.modal-card .icon-button[data-close-modal] {
  width: 36px;
  height: 36px;
  min-height: 36px;
  flex: 0 0 36px;
}

.modal-card > .primary[type="submit"],
.modal-card > button.primary[type="submit"] {
  justify-self: end;
}

.modal-card label,
.modal-card input,
.modal-card textarea,
.modal-card select {
  min-width: 0;
}

.confirm-modal {
  width: min(460px, 100%);
}

.confirm-modal p {
  color: var(--muted);
  line-height: 1.55;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.danger-primary {
  border-color: var(--red);
  background: var(--red);
  color: #ffffff;
}

@media (max-width: 1180px) {
  #app {
    grid-template-columns: 250px 1fr;
  }

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

  .two-column,
  .toolbar,
  .list-toolbar,
  .portfolio-toolbar,
  .project-card {
    grid-template-columns: 1fr;
  }

  .project-side {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: 16px;
  }
}

@media (max-width: 820px) {
  #app {
    grid-template-columns: 1fr;
  }

  .sidebar {
    min-height: 100vh;
    height: 100vh;
  }

  .topbar,
  .content {
    padding-left: 20px;
    padding-right: 20px;
  }

  .stats-grid,
  .grid-list,
  .portfolio-grid,
  .portfolio-form,
  .form-grid,
  .inline-form {
    grid-template-columns: 1fr;
  }
}
