:root {
  color-scheme: light;
  --ink: #16201f;
  --muted: #64716f;
  --panel: #ffffff;
  --line: #d8dfdc;
  --field: #f7f9f8;
  --accent: #0b6b58;
  --accent-dark: #084b3e;
  --warm: #f4c95d;
  --page: #edf2ef;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--ink);
}

button,
input,
textarea {
  font: inherit;
}

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

.camera-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding: 28px;
  background: #192522;
}

.camera-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: #0c1110;
}

video,
#preview,
canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.empty-state {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
}

.camera-glyph {
  width: 64px;
  height: 48px;
  display: grid;
  place-items: center;
  margin: 0 auto;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  color: transparent;
}

.empty-state p {
  margin: 0;
  font-size: 0.95rem;
}

.capture-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

button {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 16px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

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

button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.send-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 30px;
  padding: 40px;
  background: var(--panel);
  border-left: 1px solid var(--line);
}

.brand-block p {
  margin: 0 0 10px;
  color: var(--accent);
  font-weight: 800;
  letter-spacing: 0;
}

h1 {
  margin: 0;
  max-width: 520px;
  font-size: clamp(2rem, 3vw, 3.5rem);
  line-height: 1.02;
  letter-spacing: 0;
}

form {
  display: grid;
  gap: 18px;
}

.account-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
}

.account-line span {
  color: var(--muted);
  font-weight: 800;
  overflow-wrap: anywhere;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.destination-line {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
}

.destination-line span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.destination-line strong {
  color: var(--ink);
  overflow-wrap: anywhere;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  color: var(--ink);
  padding: 12px 13px;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(11, 107, 88, 0.16);
}

.primary-action {
  background: var(--accent);
  color: #ffffff;
  font-weight: 800;
}

.primary-action:hover:not(:disabled) {
  background: var(--accent-dark);
}

.status {
  min-height: 24px;
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.status.success {
  color: var(--accent);
}

.status.error {
  color: #ad3030;
}

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

  .camera-panel,
  .send-panel {
    padding: 18px;
  }

  .send-panel {
    border-left: 0;
  }

  .account-line {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 2rem;
  }
}
