:root {
  --bg: #f4f7fc;
  --surface: #fff;
  --text: #1b2a45;
  --muted: #64738f;
  --line: #d8e1ef;
  --accent: #f27c0f;
  --shadow: 0 12px 30px rgba(27, 42, 69, 0.1);
}

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

body {
  margin: 0;
  font-family: "Source Sans 3", sans-serif;
  color: var(--text);
  background: var(--bg);
}

.shell {
  width: min(1020px, calc(100% - 2rem));
  margin: 2rem auto;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem;
  box-shadow: var(--shadow);
}

.hidden {
  display: none;
}

h1,
h2,
h3 {
  margin: 0 0 0.6rem;
  font-family: "Sora", sans-serif;
}

label {
  display: grid;
  gap: 0.35rem;
  font-weight: 600;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.62rem 0.72rem;
  font: inherit;
}

button,
a {
  border: 0;
  border-radius: 999px;
  padding: 0.65rem 1rem;
  font-family: "Sora", sans-serif;
  font-weight: 700;
}

button {
  cursor: pointer;
  background: linear-gradient(130deg, var(--accent), #ffa347);
  color: #fff;
}

a {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--text);
}

#loginForm {
  display: grid;
  gap: 0.7rem;
  max-width: 380px;
}

#loginNote,
#adminNote {
  margin: 0;
  color: var(--muted);
}

#leadsCount {
  margin: 0.3rem 0 0.7rem;
  color: var(--muted);
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.7rem;
}

.full {
  grid-column: 1 / -1;
}

.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.9rem;
  margin-bottom: 0.9rem;
}

.lead-inbox {
  display: grid;
  gap: 0.7rem;
}

.lead-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem;
  background: #fff;
}

.lead-item.unread {
  border-color: #f2c189;
  background: #fff9f1;
}

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

.lead-title {
  font-weight: 700;
}

.lead-meta {
  color: var(--muted);
  font-size: 0.93rem;
  margin-bottom: 0.35rem;
}

.lead-message {
  margin: 0;
  white-space: pre-wrap;
}

.lead-actions {
  margin-top: 0.55rem;
  display: flex;
  gap: 0.45rem;
}

.lead-actions button {
  padding: 0.42rem 0.75rem;
  font-size: 0.82rem;
}

.btn-ghost {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--text);
}

hr {
  border: 0;
  height: 1px;
  background: var(--line);
  margin: 1rem 0;
}

.security {
  display: flex;
  gap: 0.6rem;
  align-items: flex-end;
}

.security label {
  flex: 1;
}

@media (max-width: 760px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .security {
    flex-direction: column;
    align-items: stretch;
  }
}
