:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #171717;
  background: #f4f4f2;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(255,255,255,.95), transparent 36%),
    #f4f4f2;
}

button, input { font: inherit; }

button { cursor: pointer; }

.hidden { display: none !important; }

.view {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 64px;
}

.login-card {
  width: min(440px, 100%);
  margin: 12vh auto 0;
  padding: 40px;
}

.card,
.asset-card,
.project-card,
.archive-section {
  background: rgba(255,255,255,.9);
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 22px;
  box-shadow: 0 18px 60px rgba(0,0,0,.07);
}

.eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
  color: #737373;
}

h1 {
  margin: 8px 0 6px;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -.04em;
}

h2 {
  margin: 5px 0 0;
  font-size: 25px;
  letter-spacing: -.03em;
}

p { color: #6b6b6b; }

form label {
  display: block;
  margin: 18px 0;
  font-size: 13px;
  font-weight: 700;
}

input:not([type="checkbox"]) {
  width: 100%;
  margin-top: 7px;
  padding: 13px 14px;
  border: 1px solid #d9d9d6;
  border-radius: 12px;
  outline: none;
  background: #fff;
}

input:focus { border-color: #999; }

.legal {
  display: flex !important;
  align-items: center;
  gap: 8px;
  color: #686868;
  font-weight: 500 !important;
}

.legal input { margin: 0; }

button {
  border: 0;
  border-radius: 11px;
  padding: 11px 15px;
  transition: .18s ease;
}

button:disabled { opacity: .45; cursor: not-allowed; }

.primary {
  background: #151515;
  color: #fff;
}

.primary:hover:not(:disabled) { transform: translateY(-1px); }

.ghost {
  background: #ececea;
  color: #242424;
}

.danger {
  background: #f3e8e8;
  color: #8b2c2c;
}

.small { padding: 9px 12px; font-size: 13px; }
.tiny { padding: 6px 9px; font-size: 11px; }

.error {
  min-height: 20px;
  margin-top: 12px;
  color: #a32929;
  font-size: 13px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}

.top-actions {
  display: flex;
  gap: 8px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.project-card {
  position: relative;
  text-align: left;
  padding: 25px;
  min-height: 145px;
  color: inherit;
}

.project-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 65px rgba(0,0,0,.1);
}

.project-name {
  display: block;
  font-weight: 800;
  font-size: 19px;
}

.project-id {
  display: block;
  margin-top: 8px;
  color: #8a8a8a;
  font-size: 12px;
}

.arrow {
  position: absolute;
  right: 22px;
  bottom: 20px;
  font-size: 20px;
}

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

.asset-card { padding: 18px; }

.asset-head,
.asset-actions,
.asset-meta,
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ratio {
  margin-top: 3px;
  color: #999;
  font-size: 12px;
}

.rev {
  padding: 6px 9px;
  border-radius: 999px;
  background: #eeeeeb;
  color: #555;
  font-size: 11px;
  font-weight: 800;
}

.preview {
  display: grid;
  place-items: center;
  margin: 18px 0 12px;
  min-height: 220px;
  overflow: hidden;
  border-radius: 15px;
  background: #e8e8e5;
  color: #999;
}

.preview.banner { aspect-ratio: 4 / 1; min-height: 0; }
.preview.cover { aspect-ratio: 1.9 / 1; min-height: 0; }
.preview.logo,
.preview.thumbnail,
.preview.base-logo { aspect-ratio: 1; min-height: 0; }

.preview-placeholder {
  color: #666;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
}

.asset-meta {
  color: #777;
  font-size: 12px;
  min-height: 22px;
  margin-bottom: 14px;
}

.asset-actions { justify-content: flex-start; }

.archive-section {
  margin-top: 22px;
  padding: 24px;
}

.archive-group {
  margin-top: 22px;
}

.archive-group h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

.archive-items {
  display: grid;
  gap: 7px;
}

.archive-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #e5e5e1;
  border-radius: 10px;
  background: #fafaf8;
  font-size: 12px;
}

.empty { padding: 30px; }

dialog {
  width: min(430px, calc(100% - 32px));
  border: 0;
  border-radius: 20px;
  padding: 0;
  box-shadow: 0 30px 100px rgba(0,0,0,.25);
}

dialog::backdrop { background: rgba(0,0,0,.35); }

.dialog-card { padding: 28px; }

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 24px;
}

@media (max-width: 760px) {
  .view { width: min(100% - 20px, 620px); padding-top: 20px; }
  .login-card { margin-top: 7vh; padding: 28px; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .top-actions { width: 100%; }
  .top-actions button { flex: 1; }
  .asset-grid { grid-template-columns: 1fr; }
}

.preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.preview.banner img,
.preview.cover img {
  object-fit: cover;
}
