* { box-sizing: border-box; }
:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --primary: #0f766e;
  --primary-2: #115e59;
  --success: #15803d;
  --warning: #ca8a04;
  --danger: #b91c1c;
  --info: #1d4ed8;
  --shadow: 0 10px 30px rgba(15, 23, 42, .08);
  --radius: 18px;
}
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
textarea { resize: vertical; }
.app-shell { max-width: 860px; margin: 0 auto; min-height: 100vh; padding: 0 14px 92px; }
.topbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px 0 10px; }
.topbar h1 { margin: 4px 0 0; font-size: 1.5rem; }
.eyebrow { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.user-pill { display: flex; flex-direction: column; padding: 10px 12px; border-radius: 14px; background: #ecfeff; min-width: 120px; }
.user-pill span { font-size: .82rem; color: var(--muted); }
.topbar-right { display: flex; gap: 10px; align-items: center; }
.content-wrap { display: flex; flex-direction: column; gap: 16px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.card-header h2 { margin: 0 0 4px; font-size: 1.1rem; }
.card-header p { margin: 0; color: var(--muted); }
.form-card label { display: block; margin-top: 12px; }
.form-card label span { display: block; margin-bottom: 6px; font-size: .92rem; color: var(--muted); }
input[type=text], input[type=password], input[type=date], select, textarea, input[type=file] { width: 100%; border: 1px solid #cbd5e1; background: #fff; padding: 12px 14px; border-radius: 14px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(15, 118, 110, .12); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 14px; padding: 12px 14px; font-weight: 600; cursor: pointer; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-2); }
.btn-light { background: #eef2ff; color: #1e293b; }
.btn-danger { background: var(--danger); color: white; }
.btn-block { width: 100%; }
.auth-card { min-height: calc(100vh - 80px); display: grid; place-items: center; }
.auth-form { width: min(100%, 420px); }
.stack-lg { display: flex; flex-direction: column; gap: 16px; }
.stack-md { display: flex; flex-direction: column; gap: 12px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.stats-grid .stat-card { display: flex; flex-direction: column; gap: 8px; }
.stat-card span { color: var(--muted); }
.stat-card strong { font-size: 1.5rem; }
.filters-card { display: flex; flex-direction: column; gap: 12px; }
.inline-filters { flex-direction: row; align-items: center; flex-wrap: wrap; }
.chips-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); background: #fff; border-radius: 999px; padding: 0; overflow: hidden; }
.chip input { display: none; }
.chip span { padding: 10px 12px; display: block; font-size: .9rem; }
.chip.active { border-color: var(--primary); background: #ccfbf1; }
.list-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.compact-card { padding: 12px 14px; }
.row-actions { display: flex; gap: 8px; align-items: center; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.wrap { flex-wrap: wrap; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 10px; font-size: .78rem; font-weight: 700; }
.badge-success { background: #dcfce7; color: #166534; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-info { background: #dbeafe; color: #1d4ed8; }
.badge-neutral { background: #e2e8f0; color: #334155; }
.muted, .muted-row small { color: var(--muted); }
.muted-row { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.notice { border-radius: 14px; padding: 12px 14px; }
.notice.warning { background: #fef3c7; }
.notice.danger { background: #fee2e2; }
.notice.neutral { background: #e2e8f0; }
.empty-state { color: var(--muted); text-align: center; padding: 14px; }
.bottom-nav { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: min(860px, 100%); display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.92); backdrop-filter: blur(14px); border-top: 1px solid rgba(148,163,184,.3); }
.bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--muted); padding: 8px 4px; border-radius: 14px; }
.bottom-nav a.active { background: #ccfbf1; color: var(--primary-2); font-weight: 700; }
.bottom-nav span { font-size: 1.1rem; }
.flash { border-radius: 14px; padding: 12px 14px; margin-bottom: 4px; }
.flash-success { background: #dcfce7; color: #166534; }
.flash-error { background: #fee2e2; color: #991b1b; }
.flash-warning { background: #fef3c7; color: #92400e; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.gap-12 { gap: 12px; }
details summary { cursor: pointer; color: var(--primary); font-weight: 600; margin-top: 4px; }
.duplicate-warning { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: #fff7ed; border: 1px solid #fdba74; color: #9a3412; }
.hidden { display: none !important; }
.timeline { display: flex; flex-direction: column; gap: 12px; }
.timeline-item { border-left: 3px solid #cbd5e1; padding-left: 12px; }
.timeline-item strong { display: block; margin-bottom: 4px; }
.detail-card h2 { margin: 0; }
.info-line { padding: 12px; border-radius: 14px; background: #f8fafc; border: 1px solid #e2e8f0; }
.info-line span { display: block; color: var(--muted); margin-bottom: 4px; }
.accent-card { background: linear-gradient(135deg, #ccfbf1 0%, #ecfeff 100%); }
.border-urgent { border-left: 6px solid var(--danger); }
.border-attention { border-left: 6px solid var(--warning); }
.border-normal { border-left: 6px solid var(--primary); }
.checkbox-group label { display: inline-flex; align-items: center; gap: 8px; }
.checkbox-group input { width: auto; }
.attachment-card { border: 1px dashed #cbd5e1; border-radius: 14px; padding: 12px; }
.quick-form { position: sticky; top: 8px; z-index: 4; }
@media (max-width: 760px) {
  .grid-2, .stats-grid { grid-template-columns: 1fr; }
  .topbar { flex-direction: column; }
  .topbar-right { width: 100%; justify-content: space-between; }
  .list-card { flex-direction: column; align-items: stretch; }
  .row-actions { width: 100%; }
  .row-actions .btn, .row-actions form { flex: 1; }
  .inline-filters { flex-direction: column; align-items: stretch; }
}

.checkbox-inline{display:flex;align-items:center;gap:8px;margin-top:8px;font-size:14px;color:#334155}.checkbox-inline input{width:auto}


.brand-wrap{display:flex;align-items:center}
.brand-lockup{display:flex;align-items:center;gap:12px}
.brand-logo-img{width:48px;height:48px;display:block;filter:drop-shadow(0 6px 12px rgba(15,118,110,.18))}
.cadastro-form-card{padding:18px}
.cadastro-grid label{margin-top:0}
.btn-xl{min-height:52px;font-size:1.05rem}
.upload-block{margin-top:14px}
.upload-copy{margin-bottom:8px}
.upload-label{display:block;margin-bottom:4px;font-size:.92rem;color:var(--muted);font-weight:600}
.upload-copy p{margin:0;color:var(--muted);font-size:.95rem;line-height:1.45}
.file-input-hidden{position:absolute;left:-9999px;opacity:0;pointer-events:none}
.upload-dropzone{display:flex;align-items:center;gap:14px;padding:16px 18px;border:1.5px dashed #94a3b8;border-radius:18px;background:linear-gradient(135deg,#f8fafc 0%,#ecfeff 100%);cursor:pointer;transition:.18s ease;border-color:#99f6e4;box-shadow:inset 0 0 0 1px rgba(255,255,255,.4)}
.upload-dropzone:hover{transform:translateY(-1px);border-color:var(--primary);box-shadow:0 12px 24px rgba(15,118,110,.10)}
.upload-icon{width:48px;height:48px;border-radius:16px;display:grid;place-items:center;background:#ccfbf1;font-size:1.35rem;flex:0 0 auto}
.upload-texts{display:flex;flex-direction:column;gap:2px;min-width:0}
.upload-texts strong{font-size:1rem}
.upload-texts span{font-size:.9rem;color:var(--muted);line-height:1.35}
.upload-chip{margin-left:auto;padding:8px 12px;border-radius:999px;background:#0f766e;color:#fff;font-size:.85rem;font-weight:700;white-space:nowrap}
.upload-hint{margin-top:8px;font-size:.83rem;color:var(--muted)}
@media (max-width:760px){.brand-logo-img{width:42px;height:42px}.upload-dropzone{align-items:flex-start;flex-wrap:wrap}.upload-chip{margin-left:0}}


/* ===== iGreen dark mobile header patch ===== */
.app-shell { max-width: 860px; margin: 0 auto; min-height: 100vh; padding: 0 14px 92px; }
.app-topbar {
    background: linear-gradient(180deg, #101312 0%, #151917 100%);
    padding: 6px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    position: sticky;
    top: 0;
    z-index: 30;
}

.brand-logo {
    display: block;
    width: 115px;
    max-width: 35vw;
    height: auto;
    object-fit: contain;
}
.brand-wrap { display: flex; align-items: center; min-width: 0; }

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.topbar-user-card {
  background: rgba(255,255,255,.10);
  color: #ffffff;
  border-radius: 18px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  min-width: 0;
  backdrop-filter: blur(10px);
}
.topbar-user-card strong {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
}
.topbar-user-card span {
  font-size: 12px;
  color: rgba(255,255,255,.72);
  text-transform: capitalize;
  margin-top: 4px;
}
.topbar-btn {
  background: rgba(255,255,255,.08);
  color: #ffffff;
  text-decoration: none;
  border-radius: 16px;
  padding: 12px 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  transition: .18s ease;
}
.topbar-btn:hover { background: rgba(255,255,255,.14); }
.topbar-btn-danger { background: rgba(255,255,255,.12); }

@media (max-width: 768px) {
  .app-topbar {
    padding: 12px;
    align-items: flex-start;
    flex-direction: column;
    margin-left: -14px;
    margin-right: -14px;
  }
  .brand-logo {
    width: 146px;
    max-width: 62vw;
  }
  .topbar-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 8px;
  }
  .topbar-user-card {
    padding: 10px 12px;
    border-radius: 16px;
  }
  .topbar-btn {
    padding: 10px 12px;
    border-radius: 14px;
    min-height: 42px;
    font-size: 14px;
  }
}
