*, *::before, *::after { box-sizing: border-box; }
:root {
  --accent: #2fc176;
  --accent-2: #23945b;
  --bg: #040607;
  --panel: #0b1213;
  --border: #1b2b28;
  --muted: #7a9e90;
  --text: #edf6f2;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Saira Condensed", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}
a { color: inherit; }

.app-header {
  background: rgba(4,6,7,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}
.app-header .brand { display: flex; align-items: center; gap: 12px; }
.app-header img { height: 20px; }
.badge {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--accent);
  background: rgba(47,193,118,.12);
  border: 1px solid rgba(47,193,118,.25);
  border-radius: 6px;
  padding: 2px 8px;
}
.app-header nav { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.app-header nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.9rem;
  padding: 6px 12px;
  border-radius: 8px;
  transition: background .15s;
}
.app-header nav a:hover,
.app-header nav a.active { background: #111c1a; color: var(--text); }
.user-chip { color: var(--muted); font-size: 0.85rem; margin-right: 8px; }

.page { padding: 28px; max-width: 1200px; margin: 0 auto; }
.page-wide { max-width: 1400px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 9px;
  font: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  text-decoration: none;
  border: none;
}
.btn-primary { background: var(--accent); color: #051a0c; }
.btn-primary:hover { opacity: .92; }
.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--text); border-color: #2a4d41; }
.btn-sm { padding: 7px 14px; font-size: 0.88rem; }

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.page-head h1 { margin: 0; font-size: 1.6rem; }
.page-head p { margin: 4px 0 0; color: var(--muted); }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.stat-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #000;
  padding: 18px 20px;
}
.stat-card .label {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: .06em;
  font-weight: 600;
  margin-bottom: 6px;
}
.stat-card .value { font-size: 1.8rem; font-weight: 800; line-height: 1; }
.stat-card .value.green { color: var(--accent); }

.card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #000;
  padding: 20px;
  margin-bottom: 16px;
}
.card h2, .card h3 { margin: 0 0 12px; font-size: 1.1rem; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
th { color: var(--muted); font-size: 0.78rem; letter-spacing: .06em; font-weight: 700; }
tr:hover td { background: rgba(17,28,26,.35); }
.row-link { text-decoration: none; display: block; color: inherit; }

.pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
}
.pill-recebido { background: rgba(148,163,184,.12); color: #cbd5e1; border-color: rgba(148,163,184,.25); }
.pill-analise { background: rgba(251,191,36,.12); color: #fcd34d; border-color: rgba(251,191,36,.25); }
.pill-andamento { background: rgba(59,130,246,.12); color: #93c5fd; border-color: rgba(59,130,246,.25); }
.pill-concluido { background: rgba(47,193,118,.12); color: var(--accent); border-color: rgba(47,193,118,.25); }
.pill-urgente { background: rgba(239,68,68,.12); color: #fca5a5; border-color: rgba(239,68,68,.25); }

.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.field label { color: var(--muted); font-size: 0.85rem; }
.field input, .field textarea, .field select {
  padding: 10px 13px;
  border-radius: 9px;
  border: 1px solid #1f322c;
  background: #08100e;
  color: #eef8f3;
  font: inherit;
  font-size: 0.95rem;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47,193,118,.12);
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 720px) { .grid-2 { grid-template-columns: 1fr; } }

.alert {
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 0.92rem;
}
.alert-ok { background: rgba(47,193,118,.12); border: 1px solid rgba(47,193,118,.3); color: #bbf7d0; }
.alert-erro { background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.35); color: #fca5a5; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  position: relative;
  padding: 0 0 18px 22px;
  border-left: 2px solid var(--border);
  margin-left: 6px;
}
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}
.timeline .meta { color: #4a6e62; font-size: 0.78rem; margin-bottom: 4px; }
.timeline .msg { color: var(--text); }

.empty { color: #3a5a52; text-align: center; padding: 32px 16px; }

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.login-card {
  width: 100%;
  max-width: 420px;
  padding: 40px 36px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #000;
}
.login-card .logo { height: 24px; display: block; margin: 0 auto 28px; }
.login-card h1 { text-align: center; font-size: 1.5rem; margin: 0 0 6px; }
.login-card .sub { text-align: center; color: var(--muted); margin: 0 0 24px; }

.backlog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.ticket-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: border-color .15s, transform .1s;
}
.ticket-card:hover { border-color: #2a4d41; transform: translateY(-1px); }
.ticket-card .code { color: var(--accent); font-size: 0.78rem; font-weight: 700; letter-spacing: .04em; }
.ticket-card .title { font-weight: 700; margin: 6px 0; }
.ticket-card .partner { color: var(--muted); font-size: 0.85rem; }

.detail-grid { display: grid; grid-template-columns: 1fr 340px; gap: 20px; }
@media (max-width: 900px) { .detail-grid { grid-template-columns: 1fr; } }

.file-list { list-style: none; margin: 0; padding: 0; }
.file-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.file-list li:last-child { border-bottom: none; }
