:root {
  --bg: #f7f3ea;
  --panel: #ffffff;
  --ink: #17221f;
  --muted: #66706b;
  --line: #d8ded7;
  --teal: #0f766e;
  --teal-dark: #115e59;
  --coral: #dc6b4f;
  --shadow: 0 20px 60px rgba(21, 34, 31, 0.13);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.09), transparent 34%), linear-gradient(315deg, rgba(220, 107, 79, 0.08), transparent 36%), var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input, textarea { font: inherit; }
.app-shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; }
.eyebrow { margin: 0 0 6px; color: var(--teal-dark); font-size: .78rem; font-weight: 800; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(2rem, 4vw, 3.35rem); line-height: 1; }
h2 { margin: 0 0 12px; font-size: 1.1rem; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 18px; align-items: start; }
.composer, .panel, .login-panel {
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(216, 222, 215, .9);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 18px;
}
.sidebar { display: grid; gap: 14px; }
label { display: grid; gap: 8px; font-weight: 750; margin-bottom: 14px; }
input, textarea {
  width: 100%;
  border: 1px solid #cfd8d1;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 12px 13px;
  outline: none;
}
textarea { resize: vertical; }
input:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(15, 118, 110, .13); }
.upload-zone {
  min-height: 180px;
  border: 2px dashed #a7b4ad;
  border-radius: 8px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  text-align: center;
  background: #fbfaf6;
}
.upload-zone input { max-width: 330px; border: 0; background: transparent; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.platform-options { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.platform-option {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fbfaf6;
  margin: 0;
}
.platform-option input, .inline input { width: 18px; height: 18px; accent-color: var(--teal); }
.platform-option.disabled { opacity: .55; }
.inline { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.primary, .secondary, .icon-button {
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 800;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.primary { background: var(--teal); color: white; }
.secondary, .icon-button { background: white; color: var(--ink); border-color: var(--line); }
.full { width: 100%; }
.platform-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf6;
  padding: 12px;
  margin-bottom: 10px;
}
.platform-card summary { display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.platform-card label { margin-top: 10px; }
.test-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.saved-post { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
.saved-post small, .muted { color: var(--muted); display: block; margin-top: 4px; }
.alert { border-radius: 8px; padding: 12px; margin-bottom: 14px; font-weight: 750; }
.alert.success { background: #e8f7ee; border: 1px solid #b9e5c8; color: #166534; }
.alert.error { background: #fff0ec; border: 1px solid #f1b6aa; color: #9f2f1d; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-panel { width: min(420px, 100%); }
.login-icon { width: 52px; height: 52px; border-radius: 8px; background: #dff3ee; display: grid; place-items: center; margin-bottom: 14px; }

@media (max-width: 900px) {
  .layout, .two-col, .platform-options, .test-row { grid-template-columns: 1fr; }
}
