:root {
  --bg: #f3ead9;
  --card: rgba(255, 251, 245, 0.94);
  --border: rgba(90, 69, 49, 0.16);
  --text: #25180f;
  --muted: #6e5948;
  --accent: #b85b2f;
  --accent-dark: #8f401a;
  --success: #1f7a4d;
  --error: #a73b35;
  --shadow: 0 22px 55px rgba(58, 38, 19, 0.13);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 188, 121, 0.34), transparent 28%),
    radial-gradient(circle at bottom right, rgba(255, 218, 171, 0.4), transparent 24%),
    linear-gradient(135deg, #f7f0e3, #efdfca 52%, #e7d0b7);
}

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

.hero {
  margin-bottom: 24px;
}

.eyebrow,
.mini-label {
  margin: 0 0 10px;
  color: var(--accent-dark);
  text-transform: uppercase;
  letter-spacing: 0.17em;
  font-size: 0.75rem;
}

h1,
h2,
h3 {
  margin: 0;
}

h1 {
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  line-height: 0.95;
}

.subtitle {
  max-width: 820px;
  font-size: 1.1rem;
  color: var(--muted);
}

.panel {
  border: 1px solid var(--border);
  border-radius: 30px;
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  padding: 24px;
}

.panel-head,
.profile-card-head,
.profile-actions,
.modal-actions,
.inline-actions,
.picker-header,
.submit-row,
.unlock-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.profile-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.profile-list.empty,
.conversation-list.empty {
  padding: 20px;
  border: 1px dashed var(--border);
  border-radius: 18px;
  color: var(--muted);
}

.profile-card {
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(90, 69, 49, 0.08);
  background: rgba(255, 246, 237, 0.85);
}

.profile-card.selected {
  border-color: rgba(184, 91, 47, 0.45);
  box-shadow: inset 0 0 0 1px rgba(184, 91, 47, 0.12);
}

.profile-card h3 {
  font-size: 1.08rem;
}

.profile-meta,
.profile-submeta,
.muted,
.footnote,
.lock-copy {
  color: var(--muted);
}

.profile-meta,
.profile-submeta {
  margin: 10px 0 0;
  font-size: 0.95rem;
}

.profile-actions {
  margin-top: 14px;
}

.profile-actions button {
  min-width: 74px;
}

.badge {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.badge.live {
  background: rgba(31, 122, 77, 0.12);
  color: var(--success);
}

.badge.stopped {
  background: rgba(167, 59, 53, 0.12);
  color: var(--error);
}

.profile-form,
.picker,
.field {
  display: block;
}

.field,
.picker {
  margin-bottom: 20px;
}

.field span,
.picker h3 {
  display: block;
  margin-bottom: 10px;
  font-size: 0.95rem;
}

input[type="text"],
input[type="password"],
input[type="email"] {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.75);
  padding: 14px 16px;
  color: var(--text);
  font-size: 1rem;
}

button {
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff9f2;
  padding: 12px 18px;
  font-size: 0.98rem;
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, opacity 140ms ease;
}

button:hover {
  transform: translateY(-1px);
  background: var(--accent-dark);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  transform: none;
}

button[data-loading="true"] {
  cursor: wait;
  opacity: 0.66;
}

button.ghost {
  background: transparent;
  color: var(--accent-dark);
  border: 1px solid var(--border);
}

.conversation-list {
  display: grid;
  gap: 12px;
  max-height: 420px;
  overflow: auto;
  padding-right: 6px;
}

.conversation-item {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 14px;
  align-items: start;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 248, 240, 0.88);
  border: 1px solid rgba(98, 76, 53, 0.08);
}

.conversation-item input {
  margin-top: 3px;
}

.conversation-text {
  display: grid;
  gap: 4px;
}

.conversation-text span {
  color: var(--muted);
  font-size: 0.9rem;
}

.lock-panel {
  padding: 18px 20px;
  margin-bottom: 18px;
  border-radius: 20px;
  background: rgba(255, 244, 231, 0.95);
  border: 1px solid rgba(184, 91, 47, 0.18);
}

.unlock-row input {
  flex: 1 1 280px;
}

.status {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid transparent;
  min-height: 58px;
}

.status[data-tone="success"] {
  border-color: rgba(31, 122, 77, 0.28);
}

.status[data-tone="error"] {
  border-color: rgba(167, 59, 53, 0.3);
}

.hidden {
  display: none !important;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(33, 21, 12, 0.44);
  backdrop-filter: blur(6px);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(960px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
}

.password-panel {
  width: min(520px, 100%);
}

@media (max-width: 980px) {
  .modal {
    padding: 12px;
  }
}

@media (max-width: 720px) {
  .shell {
    width: min(100% - 20px, 1320px);
    padding-top: 24px;
  }

  .panel {
    padding: 18px;
    border-radius: 24px;
  }
}
