:root {
  --bg: #071915;
  --panel: #0c2b24;
  --panel-2: #12382f;
  --line: #1f6c5e;
  --text: #f1faf7;
  --muted: #9fc9c0;
  --primary: #41dec9;
  --primary-dark: #06221e;
  --danger: #ff7777;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}

a {
  color: inherit;
}

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

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
}

.sidebar {
  border-right: 1px solid var(--line);
  background: #05221d;
  padding: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #f8fffd;
  color: #007466;
  font-size: 28px;
  font-weight: 800;
}

.brand strong {
  display: block;
  font-size: 18px;
}

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

.main {
  padding: 28px;
}

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

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

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

.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 18px;
}

.card h2,
.card h3,
.topbar h1 {
  margin: 0 0 8px;
}

.form {
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
}

.field span {
  color: var(--muted);
  font-size: 13px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #2b7568;
  border-radius: 8px;
  color: var(--text);
  background: #06231f;
  padding: 10px 12px;
  outline: none;
}

textarea {
  min-height: 88px;
  resize: vertical;
}

.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid #2b7568;
  border-radius: 8px;
  color: var(--text);
  background: var(--panel-2);
  padding: 0 14px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 700;
}

.primary {
  border: none;
  color: var(--primary-dark);
  background: var(--primary);
}

.secondary {
  background: #104137;
}

.danger {
  color: #3a0707;
  background: var(--danger);
  border: none;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

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

.item {
  border: 1px solid #245e54;
  border-radius: 8px;
  background: #082720;
  padding: 12px;
}

.item strong {
  display: block;
  margin-bottom: 4px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  background: #194a41;
  color: #cdf4ee;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
}

.message {
  margin-bottom: 14px;
  border: 1px solid #2b7568;
  border-radius: 8px;
  background: #082720;
  color: #cdf4ee;
  padding: 12px;
}

.message.error {
  border-color: #a44949;
  color: #ffd8d8;
}

.hidden {
  display: none !important;
}

.split-entry {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: center;
  gap: 32px;
  padding: 8vw;
}

.split-entry h1 {
  margin: 18px 0 10px;
  font-size: 56px;
}

.entry-actions {
  display: grid;
  gap: 12px;
}

.recorder {
  display: grid;
  gap: 12px;
}

.meter {
  height: 10px;
  border-radius: 999px;
  background: #05221d;
  overflow: hidden;
}

.meter div {
  width: 0;
  height: 100%;
  background: var(--primary);
}

audio {
  width: 100%;
}

@media (max-width: 860px) {
  .app-shell,
  .split-entry,
  .grid,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .main {
    padding: 18px;
  }
}
