:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #edf8f6;
  color: #102427;
}

* {
  box-sizing: border-box;
}

body {
  background:
    radial-gradient(circle at top left, rgba(248, 180, 126, 0.2), transparent 28%),
    linear-gradient(180deg, rgba(237, 248, 246, 0.88), rgba(247, 250, 246, 1)),
    #edf8f6;
  margin: 0;
  min-width: 320px;
}

button,
input,
select,
textarea {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
  min-height: 100vh;
}

.workspace {
  padding: 28px;
}

.hero {
  align-items: stretch;
  background: #06232b;
  border-radius: 8px;
  color: #ffffff;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  min-height: 280px;
  margin-bottom: 20px;
  overflow: hidden;
  padding: 28px;
  position: relative;
}

.hero::before {
  background:
    linear-gradient(90deg, rgba(5, 32, 39, 0.92), rgba(5, 32, 39, 0.56) 58%, rgba(5, 32, 39, 0.12)),
    linear-gradient(180deg, rgba(248, 180, 126, 0.18), rgba(15, 127, 134, 0.08));
  content: "";
  inset: 0;
  position: absolute;
  z-index: 1;
}

.hero-image {
  height: 100%;
  inset: 0;
  object-fit: cover;
  object-position: center right;
  position: absolute;
  width: 100%;
}

.hero-copy,
.hero-status {
  position: relative;
  z-index: 2;
}

.eyebrow {
  color: #b9f0ef;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 4px;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  font-size: 2.85rem;
  line-height: 1.1;
  margin-bottom: 12px;
  max-width: 680px;
}

h2 {
  font-size: 1rem;
  margin-bottom: 0;
}

.hero-copy {
  align-self: end;
  max-width: 720px;
}

.hero-text {
  color: #e6fbfa;
  font-size: 1.02rem;
  line-height: 1.6;
  margin-bottom: 18px;
  max-width: 620px;
}

.hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-metrics span {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 8px 10px;
}

.hero-status {
  align-items: flex-start;
  display: flex;
  justify-content: flex-end;
  min-width: 140px;
}

.panel,
.report-panel {
  background: #ffffff;
  border: 1px solid #d9e4e5;
  box-shadow: 0 18px 46px rgba(22, 73, 81, 0.11);
}

.auth-panel {
  align-items: end;
  background: #ffffff;
  border: 1px solid #d9e4e5;
  border-radius: 8px;
  box-shadow: 0 16px 42px rgba(22, 73, 81, 0.08);
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  margin-bottom: 20px;
  padding: 18px;
}

.auth-copy,
.auth-status {
  color: #587174;
  font-size: 0.86rem;
  line-height: 1.45;
  margin: 8px 0 0;
}

.auth-controls {
  display: grid;
  gap: 10px;
}

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.secondary-button.quiet {
  background: #f4f7f8;
}

.auth-status.ok {
  color: #145b32;
}

.auth-status.error {
  color: #8a331f;
}

.panel {
  border-radius: 8px;
  display: grid;
  gap: 18px;
  padding: 22px;
}

.report-panel {
  border-width: 0 0 0 1px;
  min-height: 100vh;
  overflow: auto;
  padding: 28px;
}

.section-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.output-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.section-kicker {
  color: #6b8588;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 4px;
  text-transform: uppercase;
}

.grid {
  display: grid;
  gap: 14px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.four {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.location-card {
  align-self: end;
  background: #eef7f8;
  border: 1px solid #cce0e2;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  min-height: 116px;
  padding: 12px;
}

.location-card strong {
  color: #173a3e;
  display: block;
  font-size: 0.88rem;
}

.location-card span,
.gps-status {
  color: #4c686b;
  font-size: 0.8rem;
  line-height: 1.35;
}

.gps-status {
  margin: 0;
}

.gps-status.ok {
  color: #145b32;
}

.gps-status.error {
  color: #8a331f;
}

.gps-status.loading {
  color: #0f6269;
}

label {
  color: #315154;
  display: grid;
  font-size: 0.82rem;
  font-weight: 700;
  gap: 7px;
}

input,
select,
textarea {
  background: #f9fbfb;
  border: 1px solid #c8d7d9;
  border-radius: 6px;
  color: #142326;
  min-height: 42px;
  padding: 10px 11px;
  width: 100%;
}

textarea {
  line-height: 1.45;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #0f7f86;
  outline: 3px solid rgba(15, 127, 134, 0.16);
}

input.invalid,
select.invalid,
textarea.invalid {
  border-color: #b93f2f;
}

.field-message {
  color: #9b321f;
  font-size: 0.76rem;
  font-weight: 700;
  min-height: 16px;
}

.form-alert {
  background: #fff8e8;
  border: 1px solid #e6c76d;
  border-radius: 8px;
  color: #62480b;
  font-size: 0.86rem;
  padding: 12px 14px;
}

.form-alert strong {
  display: block;
  margin-bottom: 6px;
}

.form-alert ul {
  margin: 0;
  padding-left: 18px;
}

.status-pill {
  background: rgba(237, 243, 243, 0.92);
  border: 1px solid rgba(207, 221, 221, 0.92);
  border-radius: 999px;
  color: #315154;
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 700;
  min-height: 32px;
  padding: 7px 12px;
  white-space: nowrap;
}

.status-pill.ok {
  background: #e4f7ec;
  border-color: #b8e4c7;
  color: #145b32;
}

.status-pill.error {
  background: #fff0ea;
  border-color: #f0c0ad;
  color: #8a331f;
}

.upload-strip {
  background:
    linear-gradient(135deg, rgba(248, 180, 126, 0.08), rgba(15, 127, 134, 0.06)),
    #fbfdfc;
  border: 1px dashed #aac3c6;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.upload-hint {
  color: #587174;
  font-size: 0.82rem;
  line-height: 1.4;
  margin: -4px 0 0;
}

.file-picker input {
  background: #ffffff;
}

.media-list {
  color: #3f5d60;
  display: grid;
  font-size: 0.88rem;
  gap: 10px;
}

.media-list.empty {
  background: #f7faf9;
  border: 1px solid #d9e4e5;
  border-radius: 8px;
  padding: 14px;
}

.media-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.media-summary span,
.media-tags span {
  background: #eaf1f1;
  border: 1px solid #d3e1e2;
  border-radius: 999px;
  color: #315154;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 6px 8px;
}

.media-tags .media-tag-ok {
  background: #e4f7ec;
  border-color: #b8e4c7;
  color: #145b32;
}

.media-tags .media-tag-warn {
  background: #fff8e8;
  border-color: #e6c76d;
  color: #62480b;
}

.media-tags .media-tag-loading {
  background: #e8f4ff;
  border-color: #bad7f2;
  color: #174b77;
}

.media-item {
  align-items: start;
  background:
    linear-gradient(135deg, rgba(15, 127, 134, 0.1), rgba(255, 255, 255, 0) 42%),
    #f7faf9;
  border: 1px solid #d9e4e5;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: 46px minmax(0, 1fr);
  min-height: 74px;
  padding: 12px;
}

.media-icon {
  align-items: center;
  background: linear-gradient(180deg, #0f7f86, #0b5961);
  border-radius: 8px;
  color: #ffffff;
  display: flex;
  font-size: 0.72rem;
  font-weight: 900;
  height: 46px;
  justify-content: center;
  width: 46px;
}

.media-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.media-copy strong,
.media-copy span {
  overflow-wrap: anywhere;
}

.media-copy strong {
  color: #173a3e;
  font-size: 0.9rem;
}

.media-copy span {
  color: #587174;
  font-size: 0.78rem;
}

.media-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  grid-column: 2;
}

.actions {
  align-items: end;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.api-field {
  min-width: 0;
}

.primary-button,
.secondary-button {
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 800;
  min-height: 42px;
  padding: 10px 14px;
}

.primary-button {
  background: #0f7f86;
  color: #ffffff;
}

.secondary-button {
  background: #eaf1f1;
  color: #244649;
}

.primary-button:hover,
.secondary-button:hover {
  filter: brightness(0.96);
}

.primary-button:disabled {
  cursor: progress;
  opacity: 0.68;
}

.secondary-button:disabled {
  cursor: progress;
  opacity: 0.66;
}

.empty-state,
.report {
  border: 1px solid #d9e4e5;
  border-radius: 8px;
  margin-top: 18px;
  padding: 18px;
}

.history-panel {
  border-bottom: 1px solid #d9e4e5;
  margin-bottom: 22px;
  padding-bottom: 22px;
}

.history-list {
  color: #587174;
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.history-item {
  background: #f7faf9;
  border: 1px solid #d9e4e5;
  border-radius: 8px;
  color: #173a3e;
  cursor: pointer;
  display: grid;
  gap: 5px;
  min-height: 72px;
  padding: 11px;
  text-align: left;
}

.history-item:hover {
  border-color: #0f7f86;
}

.history-item strong,
.history-item span {
  display: block;
}

.history-item strong {
  font-size: 0.9rem;
}

.history-item span {
  color: #587174;
  font-size: 0.78rem;
}

.history-item p {
  color: #315154;
  font-size: 0.82rem;
  line-height: 1.35;
  margin: 0;
}

.processing-detail {
  background: #f7faf9;
  border: 1px solid #d9e4e5;
  border-radius: 8px;
  color: #315154;
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding: 12px;
}

.processing-detail.error {
  background: #fff0ea;
  border-color: #f0c0ad;
  color: #8a331f;
}

.processing-detail-header {
  display: grid;
  gap: 4px;
}

.processing-detail-header strong {
  color: #173a3e;
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.processing-detail-header span,
.frame-row span {
  color: #587174;
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.processing-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.processing-metrics span {
  background: #eaf1f1;
  border: 1px solid #d3e1e2;
  border-radius: 999px;
  color: #315154;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 6px 8px;
}

.frame-list {
  display: grid;
  gap: 8px;
}

.frame-row {
  border-left: 3px solid #0f7f86;
  display: grid;
  gap: 3px;
  padding-left: 9px;
}

.frame-row strong {
  color: #173a3e;
  font-size: 0.82rem;
}

.reel-preview {
  background:
    linear-gradient(180deg, rgba(12, 65, 76, 0.78), rgba(10, 29, 34, 0.92)),
    url("./assets/ocean-creator-banner.png") center / cover;
  border-radius: 8px;
  color: #ffffff;
  display: grid;
  gap: 10px;
  margin-top: 18px;
  min-height: 180px;
  padding: 18px;
}

.reel-preview p {
  align-self: end;
  color: #e7fbf9;
  font-weight: 700;
  line-height: 1.45;
  margin: 0;
}

.reel-badge {
  align-self: start;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
  justify-self: start;
  padding: 7px 9px;
}

.empty-state {
  color: #587174;
  display: grid;
  gap: 6px;
  line-height: 1.45;
}

.empty-state strong {
  color: #173a3e;
}

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

.report h3,
.report p {
  margin: 0;
}

.report h3 {
  font-size: 0.94rem;
}

.report-hero {
  background:
    linear-gradient(135deg, rgba(15, 127, 134, 0.14), rgba(248, 180, 126, 0.12)),
    #f7faf9;
  border: 1px solid #d9e4e5;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 14px;
}

.report-hero h3 {
  color: #173a3e;
  font-size: 1.08rem;
}

.report-hero p:last-child {
  color: #315154;
  font-size: 0.9rem;
  line-height: 1.5;
}

.report-card {
  background: #ffffff;
  border: 1px solid #d9e4e5;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 13px;
}

.safety-card {
  border-color: #e7d3b0;
}

.report-list,
.check-list,
.storyboard-list {
  margin: 0;
  padding: 0;
}

.report-list {
  padding-left: 18px;
}

.report-list li {
  color: #315154;
  font-size: 0.84rem;
  line-height: 1.45;
  margin: 6px 0;
}

.check-list,
.storyboard-list {
  display: grid;
  gap: 8px;
  list-style: none;
}

.check-list li {
  align-items: start;
  color: #315154;
  display: grid;
  font-size: 0.84rem;
  gap: 8px;
  grid-template-columns: 14px minmax(0, 1fr);
  line-height: 1.45;
}

.check-list li span {
  background: #0f7f86;
  border-radius: 999px;
  height: 8px;
  margin-top: 6px;
  width: 8px;
}

.storyboard-list li {
  display: grid;
  gap: 9px;
  grid-template-columns: 28px minmax(0, 1fr);
}

.storyboard-list li span {
  align-items: center;
  background: #163f47;
  border-radius: 999px;
  color: #ffffff;
  display: flex;
  font-size: 0.76rem;
  font-weight: 900;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.storyboard-list li p {
  color: #315154;
  font-size: 0.84rem;
  line-height: 1.45;
  padding-top: 4px;
}

.export-pill {
  background: #fff8e8;
  border: 1px solid #e6c76d;
  border-radius: 999px;
  color: #62480b;
  font-size: 0.76rem;
  font-weight: 800;
  justify-self: start;
  padding: 7px 9px;
}

.social-pack {
  background:
    linear-gradient(135deg, rgba(248, 180, 126, 0.1), rgba(15, 127, 134, 0.07)),
    #ffffff;
}

.caption-list {
  display: grid;
  gap: 8px;
}

.caption-list p {
  background: #f7faf9;
  border: 1px solid #d9e4e5;
  border-radius: 8px;
  color: #315154;
  font-size: 0.84rem;
  line-height: 1.45;
  padding: 10px;
}

.hashtag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hashtag-list span {
  background: #e4f7ec;
  border: 1px solid #b8e4c7;
  border-radius: 999px;
  color: #145b32;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 6px 8px;
}

.share-note {
  color: #587174;
  font-size: 0.8rem;
  line-height: 1.45;
}

.job-status {
  display: grid;
  gap: 8px;
}

.job-row {
  border-left: 3px solid #0f7f86;
  padding-left: 10px;
}

.job-row strong {
  display: block;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .report-panel {
    border-width: 1px 0 0;
    min-height: auto;
  }

  .grid.four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .workspace,
  .report-panel {
    padding: 12px;
  }

  .hero,
  .auth-panel,
  .section-heading,
  .output-actions,
  .actions {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .hero,
  .section-heading {
    flex-direction: column;
  }

  .hero {
    min-height: 300px;
    padding: 18px;
  }

  h1 {
    font-size: 1.85rem;
  }

  .hero-text {
    font-size: 0.94rem;
    line-height: 1.45;
  }

  .panel,
  .report-panel {
    border-radius: 0;
  }

  .panel {
    padding: 16px;
  }

  .grid.two,
  .auth-panel,
  .grid.four {
    grid-template-columns: 1fr;
  }

  input,
  select,
  textarea,
  .primary-button,
  .secondary-button {
    min-height: 46px;
  }
}
