@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Sora:wght@500;700&display=swap");

:root {
  --bg: #f4faf8;
  --bg-accent: #dff2ec;
  --surface: #ffffff;
  --surface-soft: #f7fbfa;
  --text: #17353a;
  --text-soft: #4d666b;
  --line: #d2e3df;
  --primary: #087f5b;
  --primary-strong: #076249;
  --danger: #c0392b;
  --success: #1b9e5a;
  --shadow: 0 18px 42px rgba(9, 53, 42, 0.12);
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: "Manrope", sans-serif;
  color: var(--text);
}

body {
  background: radial-gradient(circle at 10% 10%, #ebfbf6 0%, transparent 33%),
    radial-gradient(circle at 90% 5%, #e6f2ff 0%, transparent 37%),
    linear-gradient(180deg, var(--bg) 0%, #eef6f4 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.shell-container {
  width: min(1080px, 94%);
  margin: 0 auto;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid var(--line);
}

.header-content {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  font-family: "Sora", sans-serif;
  font-weight: 700;
}

.brand img {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 8px 18px rgba(8, 127, 91, 0.25);
}

.app-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.app-nav a {
  color: var(--text-soft);
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
}

.app-nav a:hover,
.app-nav a.is-active {
  background: #e8f6f1;
  color: var(--primary-strong);
}

.shell-main {
  width: min(940px, 95%);
  flex: 1;
  padding: 1.3rem 0 2.4rem;
  display: grid;
  gap: 1rem;
}

.app-footer {
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
}

.footer-content {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  color: var(--text-soft);
  font-size: 0.92rem;
}

.panel {
  background: var(--surface);
  border: 1px solid #deebe8;
  border-radius: var(--radius-lg);
  padding: 1.1rem;
  box-shadow: var(--shadow);
}

.panel--hero {
  background: linear-gradient(135deg, #f2fff8 0%, #e8f4ff 100%);
  border-color: #c8e7df;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
}

.hero-content h1 {
  margin: 0.2rem 0 0.45rem;
  font-family: "Sora", sans-serif;
  font-size: clamp(1.3rem, 2vw, 1.95rem);
  line-height: 1.25;
}

.hero-content p {
  margin: 0;
  color: var(--text-soft);
}

.eyebrow {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary-strong);
  font-weight: 700;
}

.hero-logo {
  width: 100px;
  border-radius: 18px;
  object-fit: cover;
}

.hero-icon {
  font-size: 3rem;
  color: var(--primary);
}

h2 {
  margin: 0 0 0.8rem;
  font-size: 1.15rem;
}

.muted {
  margin: 0;
  color: var(--text-soft);
}

.form-grid {
  display: grid;
  gap: 0.8rem;
}

.form-grid-wide {
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.35rem;
}

label {
  font-size: 0.92rem;
  font-weight: 700;
}

.input,
select.input,
input.input {
  width: 100%;
  border: 1px solid #c7dcd6;
  border-radius: var(--radius-md);
  min-height: 48px;
  padding: 0.65rem 0.82rem;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 0.95rem;
}

.input:focus,
select.input:focus {
  outline: 3px solid rgba(8, 127, 91, 0.2);
  border-color: var(--primary);
}

.btn-primary-wide,
.btn-secondary-wide,
.btn-success-wide {
  border: none;
  border-radius: 14px;
  min-height: 48px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.btn-primary-wide {
  color: #fff;
  background: linear-gradient(90deg, var(--primary) 0%, #0a9b70 100%);
}

.btn-secondary-wide {
  color: var(--primary-strong);
  border: 1px solid #b6d9ce;
  background: #f3fbf9;
}

.btn-success-wide {
  color: #fff;
  background: linear-gradient(90deg, #24a148 0%, #28b463 100%);
  margin-top: 0.75rem;
}

.btn-primary-wide:hover,
.btn-secondary-wide:hover,
.btn-success-wide:hover {
  filter: brightness(0.98);
  transform: translateY(-1px);
}

.btn-primary-wide:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-link,
.btn-link-danger {
  border: none;
  background: none;
  font-weight: 700;
  cursor: pointer;
}

.btn-link {
  color: var(--primary-strong);
}

.btn-link-danger {
  color: var(--danger);
}

.payment-options {
  display: grid;
  gap: 0.65rem;
}

.payment-option {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.6rem;
  align-items: center;
  padding: 0.8rem;
}

.payment-option input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.payment-option small {
  color: var(--text-soft);
}

.cta-group {
  margin-top: 0.8rem;
  display: grid;
  gap: 0.6rem;
}

.status-panel {
  display: grid;
  gap: 0.6rem;
}

.status-text {
  margin: 0;
  font-weight: 800;
  letter-spacing: 0.04em;
}

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

.status-pending,
.status-in_process {
  color: #dd8f02;
}

.status-rejected,
.status-cancelled {
  color: var(--danger);
}

.approved-box {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  background: #e9faef;
  border: 1px solid #caedd8;
  border-radius: var(--radius-md);
  padding: 0.85rem;
}

.approved-icon {
  font-size: 2.2rem;
  color: var(--success);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
}

.added-list {
  display: grid;
  gap: 0.6rem;
}

.added-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.7rem;
  background: #fcfffe;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

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

.product-grid[hidden],
.product-grid.is-collapsed {
  display: none !important;
}

.produto-card {
  border: 1px solid #d8e8e3;
  border-radius: var(--radius-md);
  background: #fbfefd;
  padding: 0.5rem;
  display: grid;
  gap: 0.35rem;
  text-align: left;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.produto-card img {
  width: 100%;
  height: 112px;
  object-fit: cover;
  border-radius: 10px;
}

.produto-card strong {
  font-size: 0.88rem;
}

.produto-card small {
  color: var(--text-soft);
}

.produto-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 16px rgba(8, 102, 77, 0.15);
}

.produto-card.is-hidden {
  display: none;
}

.selected-product {
  border: 1px dashed #b9d6cc;
  border-radius: var(--radius-md);
  padding: 0.8rem;
  background: #f7fcfa;
  display: grid;
  gap: 0.55rem;
}

.selected-summary {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 0.7rem;
  align-items: center;
}

.selected-summary img {
  width: 100%;
  height: 70px;
  border-radius: 10px;
  object-fit: cover;
}

.table-wrap {
  overflow-x: auto;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.comparison-table th,
.comparison-table td {
  border-bottom: 1px solid #deebe8;
  padding: 0.65rem 0.45rem;
  text-align: left;
  font-size: 0.9rem;
}

.comparison-table th {
  color: var(--text-soft);
  font-weight: 700;
}

.comparison-table .row-best td {
  background: #eefaf5;
}

.formula-list {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.35rem;
}

.logout-form {
  margin-top: 0.9rem;
}

.error-text {
  color: var(--danger);
  font-size: 0.84rem;
  margin: 0;
}

.success-banner {
  padding: 0.75rem;
  border-radius: 12px;
  border: 1px solid #bce4c8;
  background: #ecf9f1;
  color: #177542;
  margin-bottom: 0.8rem;
}

.error-banner {
  padding: 0.75rem;
  border-radius: 12px;
  border: 1px solid #efc5c1;
  background: #fff2f1;
  color: #9f2f25;
  margin-bottom: 0.8rem;
}

@media (max-width: 900px) {
  .header-content {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.65rem 0;
  }

  .app-nav {
    width: 100%;
  }

  .app-nav a {
    flex: 1;
    text-align: center;
  }
}

@media (max-width: 700px) {
  .shell-main {
    width: min(96%, 96%);
    padding-top: 0.9rem;
    gap: 0.85rem;
  }

  .panel {
    border-radius: 16px;
    padding: 0.9rem;
  }

  .panel--hero {
    grid-template-columns: 1fr;
  }

  .hero-logo {
    width: 70px;
  }

  .footer-content {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    min-height: 72px;
  }
}
