:root {
  --deep: #102b39;
  --navy: #183645;
  --blue: #204b60;
  --blue-soft: #295d73;
  --green: #82a677;
  --green-light: #a7c39a;
  --mist: #a2b7bd;
  --sand: #e6e1d3;
  --white: #fff;
  --danger: #cf7b72;
  --shadow: 0 22px 55px rgba(5, 20, 29, .2);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--sand); background: var(--navy); font-family: "Lato", sans-serif; }
a { color: inherit; }
button, input { font: inherit; }

.public-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 84% 20%, rgba(130,166,119,.2), transparent 25rem),
    radial-gradient(circle at 15% 75%, rgba(32,75,96,.8), transparent 32rem),
    var(--deep);
}

.landing { width: min(1180px, calc(100% - 40px)); min-height: 100vh; margin: 0 auto; }
.landing-nav { display: flex; min-height: 104px; align-items: center; justify-content: space-between; gap: 24px; }
.landing-logo { width: 210px; height: auto; }
.landing-actions, .hero-actions { display: flex; align-items: center; gap: 14px; }
.link-muted { color: var(--mist); text-decoration: none; font-weight: 700; }
.link-muted:hover { color: var(--sand); }
.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  border: 1px solid var(--green);
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  box-shadow: 0 12px 30px rgba(130,166,119,.18);
  font-weight: 900;
  text-decoration: none;
}
.button:hover { filter: brightness(1.06); transform: translateY(-1px); }
.button-small { min-height: 40px; padding-inline: 18px; font-size: 14px; }
.button-secondary { border-color: rgba(162,183,189,.42); background: transparent; box-shadow: none; color: var(--sand); }

.hero { display: grid; grid-template-columns: minmax(0,1.08fr) minmax(340px,.92fr); align-items: center; gap: 80px; min-height: 570px; padding: 58px 0 80px; }
.eyebrow { color: var(--green-light); font-size: 11px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.hero h1 { max-width: 720px; margin: 18px 0 22px; font: 700 clamp(45px,6vw,78px)/.98 "Philosopher", serif; letter-spacing: -.035em; }
.hero-copy > p { max-width: 620px; margin: 0 0 32px; color: var(--mist); font-size: 18px; font-weight: 300; line-height: 1.7; }
.hero-copy .environment-note { margin-top: 18px; font-size: 13px; }
.hero-visual { position: relative; display: grid; min-height: 430px; place-items: center; }
.hero-card { position: relative; z-index: 2; display: grid; width: min(350px,90%); min-height: 350px; padding: 50px 42px; place-items: center; border: 1px solid rgba(162,183,189,.18); border-radius: 42% 42% 24px 24px; background: linear-gradient(155deg,rgba(41,93,115,.82),rgba(16,43,57,.95)); box-shadow: var(--shadow); text-align: center; }
.hero-card img { width: 112px; margin-bottom: 16px; }
.hero-card strong { color: var(--sand); font: 700 25px/1.15 "Philosopher", serif; }
.hero-card span { max-width: 250px; color: var(--mist); font-size: 14px; line-height: 1.55; }
.orb { position: absolute; border-radius: 50%; filter: blur(1px); }
.orb-one { top: 15px; right: 4%; width: 180px; height: 180px; background: rgba(130,166,119,.22); }
.orb-two { bottom: 0; left: 3%; width: 230px; height: 230px; border: 1px solid rgba(162,183,189,.14); }

.value-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; overflow: hidden; border: 1px solid rgba(162,183,189,.15); border-radius: 22px; background: rgba(162,183,189,.15); }
.value-grid article { padding: 32px; background: rgba(16,43,57,.9); }
.value-grid article > span { color: var(--green); font-size: 12px; font-weight: 900; }
.value-grid h2 { margin: 22px 0 10px; font: 700 24px "Philosopher",serif; }
.value-grid p { margin: 0; color: var(--mist); font-size: 14px; line-height: 1.6; }
.landing-footer { display: flex; justify-content: space-between; padding: 40px 0; color: rgba(162,183,189,.7); font-size: 12px; }

.dashboard-page { min-height: 100vh; background: #eff3f1; color: var(--navy); }
.dashboard-shell { display: grid; grid-template-columns: 250px minmax(0,1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; display: flex; height: 100vh; flex-direction: column; padding: 30px 22px; background: var(--deep); color: var(--sand); }
.sidebar-brand { display: block; padding: 3px 10px 34px; }
.sidebar-brand img { width: 176px; }
.sidebar-nav { display: grid; gap: 8px; }
.sidebar-nav a { display: flex; min-height: 46px; align-items: center; gap: 12px; padding: 0 14px; border-radius: 12px; color: var(--mist); text-decoration: none; font-size: 14px; font-weight: 700; }
.sidebar-nav a span { width: 20px; color: var(--green); text-align: center; }
.sidebar-nav a:hover, .sidebar-nav a.active { background: rgba(130,166,119,.13); color: #fff; }
.sidebar-user { display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 16px 8px 0; border-top: 1px solid rgba(162,183,189,.12); }
.user-avatar { display: grid; flex: 0 0 36px; width: 36px; height: 36px; place-items: center; border-radius: 50%; background: var(--green); color: #fff; font-weight: 900; }
.sidebar-user div { min-width: 0; }
.sidebar-user strong, .sidebar-user small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user strong { max-width: 145px; font-size: 12px; }
.sidebar-user small { margin-top: 3px; color: var(--mist); font-size: 10px; }

.dashboard-main { min-width: 0; padding: 38px clamp(24px,4vw,58px) 70px; }
.dashboard-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 30px; margin-bottom: 30px; }
.dashboard-header h1 { margin: 8px 0 4px; font: 700 36px/1.1 "Philosopher",serif; }
.dashboard-header p { margin: 0; color: #6d8289; font-size: 14px; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.updated-at, .period-chip { display: inline-flex; min-height: 34px; align-items: center; padding: 0 14px; border: 1px solid #d8e1de; border-radius: 999px; background: rgba(255,255,255,.7); color: #6d8289; font-size: 11px; font-weight: 700; }
.logout-form { margin: 0; }
.icon-button { display: grid; width: 36px; height: 36px; padding: 0; place-items: center; border: 0; border-radius: 50%; background: var(--navy); color: #fff; cursor: pointer; text-decoration: none; }

.kpi-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.kpi-card { position: relative; overflow: hidden; min-height: 145px; padding: 22px; border: 1px solid #dde6e3; border-radius: 18px; background: #fff; box-shadow: 0 14px 34px rgba(31,66,77,.06); }
.kpi-card::before { content: ""; position: absolute; top: 0; right: 0; width: 74px; height: 74px; border-radius: 0 0 0 100%; background: rgba(162,183,189,.09); }
.kpi-card > span { display: block; color: #71868d; font-size: 12px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.kpi-card > strong { display: block; margin: 14px 0 8px; color: var(--navy); font: 700 31px/1 "Philosopher",serif; }
.kpi-card > small { color: #82959b; font-size: 11px; }
.kpi-card.accent-green { background: linear-gradient(145deg,#82a677,#72966a); border-color: transparent; }
.kpi-card.accent-green > span,.kpi-card.accent-green > strong,.kpi-card.accent-green > small { color: #fff; }
.kpi-card.accent-blue { background: linear-gradient(145deg,#204b60,#183645); border-color: transparent; }
.kpi-card.accent-blue > span,.kpi-card.accent-blue > strong,.kpi-card.accent-blue > small { color: #fff; }
.kpi-card.accent-sand { background: linear-gradient(145deg,#e6e1d3,#d7d0bc); }

.section-block { padding-top: 52px; scroll-margin-top: 20px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.section-heading h2 { margin: 6px 0 0; font: 700 27px "Philosopher",serif; }
.panel { border: 1px solid #dde6e3; border-radius: 18px; background: #fff; box-shadow: 0 14px 34px rgba(31,66,77,.05); }
.panel h3 { margin: 0; color: var(--navy); font-size: 14px; }
.mood-layout { display: grid; grid-template-columns: minmax(300px,.8fr) minmax(400px,1.2fr); gap: 16px; }
.mood-summary { display: grid; grid-template-columns: .9fr 1.1fr; overflow: hidden; }
.mood-score { display: grid; padding: 28px; place-content: center; background: var(--navy); color: #fff; text-align: center; }
.mood-score span { color: var(--mist); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.mood-score strong { margin: 8px 0; font: 700 58px/1 "Philosopher",serif; color: var(--green-light); }
.mood-score small { color: var(--mist); font-size: 10px; }
.mood-facts { display: grid; padding: 19px 24px; }
.mood-facts div { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid #edf1ef; }
.mood-facts div:last-child { border: 0; }
.mood-facts strong { font: 700 20px "Philosopher",serif; }
.mood-facts span { color: #7b8f95; font-size: 11px; }
.mood-distribution { padding: 24px 26px; }
.distribution-list { display: grid; gap: 13px; margin-top: 21px; }
.distribution-row { display: grid; grid-template-columns: 58px minmax(0,1fr) 32px; align-items: center; gap: 12px; font-size: 11px; }
.distribution-row > span { color: #667d85; }
.distribution-row > strong { text-align: right; }
.progress-track { height: 8px; overflow: hidden; border-radius: 999px; background: #edf1ef; }
.progress-track i { display: block; min-width: 2px; height: 100%; border-radius: inherit; }
.trend-panel { margin-top: 16px; padding: 24px 26px; }
.panel-title p { margin: 5px 0 0; color: #83969c; font-size: 11px; }
.bar-chart { display: grid; grid-template-columns: repeat(7,1fr); align-items: end; gap: clamp(10px,2vw,28px); height: 215px; margin-top: 18px; }
.bar-column { display: grid; grid-template-rows: 20px 150px 20px; gap: 5px; align-items: end; text-align: center; }
.bar-column .bar-value { color: #71878e; font-size: 10px; }
.bar-track { position: relative; height: 150px; border-radius: 8px; background: linear-gradient(to top,#edf1ef,transparent); }
.bar-track i { position: absolute; right: 16%; bottom: 0; left: 16%; min-height: 3px; border-radius: 7px 7px 2px 2px; background: linear-gradient(to top,var(--green),var(--green-light)); }
.bar-column small { color: #71878e; font-size: 10px; }

.operation-layout { display: grid; grid-template-columns: minmax(0,1fr) 245px; gap: 16px; }
.appointments-panel { min-width: 0; overflow: hidden; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 11px; }
th { padding: 15px 18px; background: #f7f9f8; color: #71878e; font-size: 9px; letter-spacing: .06em; text-align: left; text-transform: uppercase; }
td { padding: 15px 18px; border-top: 1px solid #edf1ef; white-space: nowrap; }
.status { display: inline-flex; min-height: 25px; align-items: center; padding: 0 9px; border-radius: 999px; background: #edf1ef; color: #6b8087; font-size: 9px; font-weight: 900; text-transform: uppercase; }
.status-pago { background: rgba(130,166,119,.18); color: #5f8556; }
.status-recusado,.status-reembolsado { background: rgba(207,123,114,.14); color: #aa5d55; }
.empty-table { padding: 35px; color: #7f9399; text-align: center; }
.rating-panel { padding: 24px; }
.rating-panel h3 { margin-bottom: 12px; }
.rating-stat { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 3px 10px; padding: 15px 0; border-bottom: 1px solid #edf1ef; }
.rating-stat span { color: #71878e; font-size: 11px; }
.rating-stat strong { grid-row: span 2; color: var(--green); font: 700 29px "Philosopher",serif; }
.rating-stat small { color: #a08f63; font-size: 9px; }
.rating-panel p { margin: 18px 0 0; color: #81949a; font-size: 11px; line-height: 1.5; }
.text-link { color: #6e9564; font-size: 11px; font-weight: 900; text-decoration: none; }

@media (max-width: 1050px) {
  .dashboard-shell { grid-template-columns: 84px minmax(0,1fr); }
  .sidebar { padding-inline: 14px; }
  .sidebar-brand { padding-inline: 0; }
  .sidebar-brand img { width: 58px; object-fit: cover; object-position: left; }
  .sidebar-nav a { justify-content: center; padding: 0; font-size: 0; }
  .sidebar-nav a span { font-size: 17px; }
  .sidebar-user div { display: none; }
  .sidebar-user { justify-content: center; }
  .kpi-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .mood-layout,.operation-layout { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .landing { width: min(100% - 28px,1180px); }
  .landing-nav { min-height: 86px; }
  .landing-logo { width: 165px; }
  .landing-actions .link-muted { display: none; }
  .hero { grid-template-columns: 1fr; gap: 24px; padding-top: 35px; }
  .hero h1 { font-size: 46px; }
  .hero-visual { min-height: 350px; }
  .value-grid { grid-template-columns: 1fr; }
  .dashboard-shell { display: block; }
  .sidebar { position: static; width: 100%; height: auto; padding: 14px 18px; flex-direction: row; align-items: center; }
  .sidebar-brand { padding: 0; }
  .sidebar-brand img { width: 128px; object-fit: contain; }
  .sidebar-nav { display: flex; margin-left: auto; }
  .sidebar-nav a { width: 40px; min-height: 40px; }
  .sidebar-user { display: none; }
  .dashboard-main { padding: 28px 16px 55px; }
  .dashboard-header { display: block; }
  .header-actions { margin-top: 18px; }
  .updated-at { display: none; }
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi-card { min-height: 130px; padding: 18px; }
  .kpi-card > strong { font-size: 25px; }
  .mood-summary { grid-template-columns: 1fr; }
  .bar-chart { gap: 6px; }
  .section-heading { align-items: flex-start; }
}

@media (max-width: 450px) {
  .hero-actions { align-items: stretch; flex-direction: column; }
  .kpi-grid { grid-template-columns: 1fr; }
  .period-chip { display: none; }
}
