:root {
  --cream: #f7f1ea;
  --blush: #f3e3dc;
  --rose: #c47b7b;
  --rose-deep: #8d4a56;
  --gold: #c4a574;
  --ink: #3a2a2c;
  --muted: #7a6466;
  --white: #fffdfb;
  --line: rgba(141, 74, 86, 0.14);
  --shadow: 0 18px 40px rgba(90, 48, 54, 0.1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: Outfit, sans-serif;
  color: var(--ink);
  background: var(--cream);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
img { display: block; max-width: 100%; }

.admin {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.side {
  background: #fffaf6;
  border-right: 1px solid var(--line);
  padding: 28px 20px;
}

.side h1 {
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  line-height: 1.1;
}

.side p { color: var(--muted); font-size: 0.88rem; margin: 8px 0 24px; }

.side nav { display: grid; gap: 8px; }

.side button,
.tab-btn {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 12px 14px;
  border-radius: 14px;
  cursor: pointer;
}

.tab-btn.is-on,
.tab-btn:hover { background: #f8ebe6; color: var(--rose-deep); }

.side__links {
  margin-top: 28px;
  display: grid;
  gap: 10px;
}

.side__links a {
  color: var(--rose-deep);
  font-size: 0.9rem;
}

.content { padding: 36px; }
.panel { display: none; max-width: 860px; }
.panel.is-on { display: block; }

.panel h2 {
  font-family: "Cormorant Garamond", serif;
  font-size: 2.2rem;
  margin-bottom: 8px;
}

.lead { color: var(--muted); margin-bottom: 24px; }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 22px;
  margin-bottom: 16px;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

label { display: grid; gap: 8px; font-size: 0.9rem; margin-bottom: 14px; }
label.full { grid-column: 1 / -1; }

input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: #fff;
  outline: none;
  font-size: 16px;
}

input:focus, textarea:focus { border-color: var(--gold); }

.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }

.btn {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  cursor: pointer;
  font-weight: 600;
}

.btn--gold { background: linear-gradient(135deg, #d8b57d, #b8894d); color: #3a2a2c; }
.btn--ghost { background: #f8ebe6; color: var(--rose-deep); }
.btn--danger { background: #f3d6d6; color: #8d3a3a; }

.preview {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 12%;
  border: 6px solid #fff;
  box-shadow: var(--shadow);
  background: #f4e7df;
}

.item {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  gap: 16px;
  align-items: center;
}

.portfolio-edit { display: grid; gap: 10px; }
.portfolio-edit label { margin-bottom: 0; }

.item img, .thumb {
  width: 92px;
  height: 92px;
  object-fit: contain;
  background: #f8f3ee;
  border-radius: 18px;
  border: 1px solid var(--line);
}

.thumb--round {
  border-radius: 50%;
  object-fit: cover;
}

.empty {
  color: var(--muted);
  padding: 12px 0 20px;
}

.lead-card__top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.lead-card__top p {
  color: var(--muted);
  margin-top: 4px;
}

.lead-card__top small {
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

.lead-card__msg {
  white-space: pre-wrap;
  margin: 0 0 14px;
  line-height: 1.5;
}

.lead-card__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.lead-card__links a { color: var(--rose-deep); }

.size-hint {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #f8ebe6;
  color: var(--rose-deep);
  font-size: 0.86rem;
}

.size-hint strong {
  color: var(--ink);
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: var(--rose-deep);
  color: white;
  padding: 12px 16px;
  border-radius: 14px;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: 0.25s ease;
}

.toast.is-on { opacity: 1; transform: none; }

.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login__box {
  width: min(420px, 100%);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 32px;
}

.login__box h1 {
  font-family: "Cormorant Garamond", serif;
  font-size: 2.4rem;
  margin-bottom: 8px;
}

.login__home {
  display: block;
  margin-top: 18px;
  text-align: center;
  color: #9a8486;
  font-size: 0.82rem;
  text-decoration: none;
}

.login__home:hover {
  color: var(--rose-deep);
}

.hidden { display: none !important; }

@media (max-width: 860px) {
  .admin { grid-template-columns: 1fr; }
  .row, .item { grid-template-columns: 1fr; }
  .content { padding: 16px; }
  .side {
    position: sticky;
    top: 0;
    z-index: 30;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 14px 16px 10px;
  }
  .side h1 { font-size: 1.5rem; }
  .side p { margin: 4px 0 12px; }
  .side nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }
  .tab-btn {
    width: auto;
    flex: 0 0 auto;
    white-space: nowrap;
    min-height: 42px;
  }
  .side__links {
    margin-top: 8px;
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
  .panel h2 { font-size: 1.8rem; }
  .preview { width: 140px; height: 140px; }
  .toast { left: 16px; right: 16px; bottom: 16px; }
  .login { padding: 16px; }
  .login__box { padding: 22px; border-radius: 22px; }
  .login__box h1 { font-size: 1.9rem; }
  .btn { min-height: 46px; }
}

@media (max-width: 420px) {
  .actions { flex-direction: column; }
  .actions .btn, .actions label.btn { width: 100%; text-align: center; }
  .lead-card__top { flex-direction: column; }
  .lead-card__top small { white-space: normal; }
}
