/* =====================================================
   nexogreen v2 — Tema claro
   Arquivo de estilos compartilhado por todas as páginas
   ===================================================== */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700&family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
  --bg: #f3f7f4;
  --surface: #ffffff;
  --surface2: #eef4f0;
  --surface3: #dde8e1;
  --line: rgba(20, 70, 45, .09);
  --line2: rgba(20, 70, 45, .16);
  --text: #10261b;
  --muted: #5b7264;
  --dim: #93a89b;
  --accent: #16a35f;
  --accent2: #5cc24a;
  --accentInk: #ffffff;
  --amber: #d98b0b;
  --red: #dc4545;
  --cGlass: rgba(22, 163, 95, .12);
  --aGlass: rgba(217, 139, 11, .13);
  --rGlass: rgba(220, 69, 69, .11);
  --shadow: 0 1px 2px rgba(16, 38, 27, .04), 0 6px 18px rgba(16, 38, 27, .05);
  --radius: 20px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { background: var(--bg); }
body {
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  min-height: 100vh;
  font-size: 15px;
}
button, input, select, textarea { font-family: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }

/* Fundo com curvas de nível */
.topo-bg { position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .9; }
.topo-bg svg { width: 100%; height: 100%; }

/* Layout base */
.page { position: relative; z-index: 1; max-width: 560px; margin: 0 auto; padding: 18px 18px 120px; }
.page.has-sticky { padding-bottom: 150px; }

/* Cabeçalho de página interna */
.ph { display: flex; align-items: center; gap: 12px; margin: 4px 0 18px; }
.ph .tt { font-family: Sora, 'DM Sans', sans-serif; font-weight: 600; font-size: 18px; }
.ph .ss { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.ph .grow { flex: 1; min-width: 0; }

.iconbtn {
  width: 42px; height: 42px; border-radius: 14px; flex-shrink: 0;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  display: grid; place-items: center; position: relative; transition: border-color .2s;
}
.iconbtn:hover { border-color: var(--accent); }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card.pad { padding: 18px; }
.mb { margin-bottom: 12px; }

.sec { display: flex; justify-content: space-between; align-items: baseline; margin: 24px 2px 12px; }
.sec h4 { font-family: Sora, 'DM Sans', sans-serif; font-weight: 600; font-size: 16px; }
.sec a, .sec button { font-size: 13px; color: var(--accent); font-weight: 600; }
.label-sm { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 8px; letter-spacing: .2px; display: block; }

/* Inputs */
.field {
  height: 52px; border-radius: 15px; background: #f6faf7; border: 1px solid var(--line2);
  display: flex; align-items: center; gap: 12px; padding: 0 16px; transition: all .2s;
}
.field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(22, 163, 95, .12); background: #fff; }
.field input, .field select { flex: 1; border: none; outline: none; background: transparent; font-size: 15px; height: 100%; min-width: 0; }
.field select { appearance: none; -webkit-appearance: none; }
.field svg { flex-shrink: 0; }
.fgroup { margin-bottom: 16px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid2 > * { min-width: 0; }
.field input { width: 100%; }
textarea.ta {
  width: 100%; border-radius: 13px; background: #f6faf7; border: 1px solid var(--line2);
  padding: 11px 12px; font-size: 14px; line-height: 1.4; min-height: 64px; resize: vertical; outline: none;
}
textarea.ta:focus { border-color: var(--accent); background: #fff; }
input[type="date"]::-webkit-calendar-picker-indicator, input[type="time"]::-webkit-calendar-picker-indicator { opacity: .55; cursor: pointer; }

/* Botões */
.btn {
  height: 54px; border-radius: 16px; width: 100%;
  background: linear-gradient(135deg, var(--accent), var(--accent2)); color: var(--accentInk);
  font-family: Sora, 'DM Sans', sans-serif; font-weight: 600; font-size: 15.5px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: 0 12px 28px rgba(22, 163, 95, .28); transition: transform .15s, opacity .2s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
.btn.ghost { background: var(--surface); color: var(--text); border: 1px solid var(--line2); box-shadow: var(--shadow); }
.btn.sm { height: 44px; font-size: 14px; border-radius: 13px; }
.btn.wpp { background: linear-gradient(135deg, #25d366, #128c7e); box-shadow: 0 12px 28px rgba(18, 140, 126, .25); }
.btn-sq { width: 54px; height: 54px; flex-shrink: 0; border-radius: 16px; background: var(--surface); border: 1px solid var(--line2); display: grid; place-items: center; box-shadow: var(--shadow); }
.link-btn { font-size: 13px; font-weight: 600; color: var(--accent); }

/* Segmented (C / P/C / N/C, Sim/Não, Turno) */
.seg { display: inline-flex; background: var(--surface2); border-radius: 12px; padding: 3px; gap: 2px; flex-shrink: 0; }
.seg button { min-width: 46px; height: 34px; padding: 0 10px; border-radius: 9px; font-size: 12px; font-weight: 700; color: var(--dim); transition: all .15s; }
.seg button.on-C { background: var(--accent); color: #fff; }
.seg button.on-PC { background: var(--amber); color: #fff; }
.seg button.on-NC { background: var(--red); color: #fff; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(16, 38, 27, .12); }
.seg.full { display: flex; width: 100%; }
.seg.full button { flex: 1; height: 42px; font-size: 14px; }

/* Chips / selos */
.chip { font-size: 12px; color: var(--muted); border: 1px solid var(--line2); border-radius: 30px; padding: 6px 11px; display: inline-flex; align-items: center; gap: 6px; background: var(--surface); }
.chip.on { border-color: var(--accent); color: var(--accent); background: var(--cGlass); font-weight: 600; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.st { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px; white-space: nowrap; }
.st.ok { background: var(--cGlass); color: var(--accent); }
.st.pc { background: var(--aGlass); color: var(--amber); }
.st.nc { background: var(--rGlass); color: var(--red); }
.st.na { background: var(--surface2); color: var(--muted); }
.tchip { font-size: 12.5px; font-weight: 600; padding: 7px 12px; border-radius: 30px; border: 1px solid var(--line2); color: var(--muted); display: inline-flex; gap: 6px; align-items: center; background: var(--surface); }
.tchip.on { border-color: rgba(220, 69, 69, .45); background: var(--rGlass); color: #c23434; }

/* Barra C/PC/NC */
.bar { display: flex; height: 6px; border-radius: 6px; overflow: hidden; gap: 2px; background: var(--surface2); }
.bar i { display: block; height: 100%; }
.bar .c { background: var(--accent); }
.bar .p { background: var(--amber); }
.bar .n { background: var(--red); }

/* Contadores */
.cnts { display: flex; gap: 6px; }
.cnt { min-width: 46px; text-align: center; border-radius: 12px; padding: 6px 6px 5px; }
.cnt b { display: block; font-family: Sora, 'DM Sans', sans-serif; font-size: 16px; font-weight: 700; line-height: 1.1; }
.cnt span { font-size: 9.5px; font-weight: 700; letter-spacing: .4px; }
.cnt.c { background: var(--cGlass); color: var(--accent); }
.cnt.p { background: var(--aGlass); color: var(--amber); }
.cnt.n { background: var(--rGlass); color: var(--red); }

/* Item de ronda */
.rc { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 14px; display: flex; gap: 13px; margin-bottom: 10px; box-shadow: var(--shadow); cursor: pointer; transition: border-color .2s, transform .15s; }
.rc:hover { border-color: var(--accent); }
.rc:active { transform: scale(.99); }
.rc .date { width: 52px; border-radius: 14px; background: var(--surface2); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 6px 0; flex-shrink: 0; }
.rc .date b { font-family: Sora, 'DM Sans', sans-serif; font-size: 18px; font-weight: 700; line-height: 1; }
.rc .date span { font-size: 10.5px; color: var(--muted); font-weight: 700; letter-spacing: .8px; margin-top: 3px; }
.rc .m { flex: 1; min-width: 0; }
.rc .t { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.rc .t b { font-family: Sora, 'DM Sans', sans-serif; font-size: 14.5px; font-weight: 600; }
.rc .s { font-size: 12.5px; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc .bar { margin-top: 10px; }

/* Estados */
.empty { text-align: center; padding: 40px 20px; color: var(--muted); font-size: 14px; }
.skel { background: linear-gradient(90deg, var(--surface2), #f8fbf9, var(--surface2)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 20px; height: 86px; margin-bottom: 10px; }
@keyframes sk { 0% { background-position: 200% 0 } 100% { background-position: -200% 0 } }

/* Tab bar */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: rgba(255, 255, 255, .97); backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
}
.tabbar .in { max-width: 560px; margin: 0 auto; display: flex; align-items: flex-start; }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 11px; color: var(--dim); font-weight: 500; }
.tab.on { color: var(--accent); }
.tab svg { width: 22px; height: 22px; }
.fab { width: 58px; height: 58px; border-radius: 20px; background: linear-gradient(135deg, var(--accent), var(--accent2)); display: grid; place-items: center; margin-top: -28px; box-shadow: 0 10px 26px rgba(22, 163, 95, .35), 0 0 0 6px var(--bg); }

/* Rodapé fixo (ações) */
.sticky { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 14px 18px calc(18px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, rgba(243, 247, 244, 0), var(--bg) 32%); }
.sticky .in { max-width: 560px; margin: 0 auto; display: flex; gap: 10px; }

/* Toast */
.toast { position: fixed; top: 18px; left: 50%; transform: translate(-50%, -20px); opacity: 0; z-index: 999; background: var(--text); color: #fff; padding: 12px 18px; border-radius: 14px; font-size: 14px; box-shadow: 0 10px 30px rgba(16, 38, 27, .25); transition: all .25s; max-width: 90vw; text-align: center; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--red); }

/* Marca */
.mark { width: 64px; height: 64px; border-radius: 20px; background: linear-gradient(145deg, #e2f4e9, #fff); border: 1px solid var(--line2); display: grid; place-items: center; box-shadow: 0 10px 30px rgba(22, 163, 95, .16); }
.word { font-family: Sora, 'DM Sans', sans-serif; font-weight: 700; letter-spacing: -.6px; }
.word b { color: var(--accent); font-weight: 700; }

/* Avatar */
.av { width: 44px; height: 44px; border-radius: 14px; background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; font-family: Sora, 'DM Sans', sans-serif; font-weight: 700; display: grid; place-items: center; font-size: 16px; flex-shrink: 0; }

/* Spinner */
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .45); border-top-color: #fff; animation: rot .8s linear infinite; }
@keyframes rot { to { transform: rotate(360deg) } }

@media (min-width: 700px) {
  .page { padding-top: 28px; }
}
