:root {
  --ink: #0f172a;
  --ink-soft: #334155;
  --line: #d7e1ec;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
}

* { box-sizing: border-box; }

.app-body {
  margin: 0;
  font-family: 'Manrope', sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 0% 0%, rgba(14, 165, 233, 0.08), transparent 28%),
    radial-gradient(circle at 100% 0%, rgba(245, 158, 11, 0.08), transparent 28%),
    #f4f7fb;
}

.sidebar {
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  padding: 1.2rem 1rem;
  position: sticky;
  top: 0;
  height: 100vh;
}

.module-link {
  display: block;
  padding: 0.6rem 0.7rem;
  border-radius: 0.7rem;
  color: #334155;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
}

.module-link:hover {
  background: #eff6ff;
  color: #0c4a6e;
}

.module-link.active {
  background: linear-gradient(90deg, #e0f2fe, #ecfeff);
  border-color: #bae6fd;
  color: #075985;
}

.main-wrap {
  padding: 1.2rem;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.kpi-card,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1rem;
  box-shadow: 0 18px 36px -30px rgba(15, 23, 42, 0.45);
}

.kpi-card {
  padding: 1rem;
}

.kpi-label {
  margin: 0;
  color: #64748b;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.kpi-value {
  margin: 0.35rem 0 0;
  font-size: 1.65rem;
  font-weight: 800;
  color: #0f172a;
}

.panel { padding: 1rem; }

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

.panel-title {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 800;
}

.input {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  border-radius: 0.62rem;
  padding: 0.55rem 0.7rem;
  color: #0f172a;
  font-size: 0.92rem;
}

.input:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.18);
}

.btn-primary,
.btn-secondary {
  border-radius: 0.68rem;
  padding: 0.56rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(120deg, #0284c7, #0f766e);
  color: white;
}

.btn-secondary {
  background: #ffffff;
  color: #0f172a;
  border-color: #cbd5e1;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

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

.app-table th,
.app-table td {
  text-align: left;
  padding: 0.66rem;
  border-bottom: 1px solid #e5edf6;
  font-size: 0.88rem;
}

.app-table th {
  color: #64748b;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 0.2rem 0.5rem;
  font-size: 0.74rem;
  font-weight: 800;
}

.badge.Open { background: #dbeafe; color: #1d4ed8; }
.badge.In\ Progress { background: #e0f2fe; color: #0369a1; }
.badge.Resolved { background: #dcfce7; color: #15803d; }
.badge.Closed { background: #f1f5f9; color: #475569; }

.priority-Low { color: #0f766e; font-weight: 700; }
.priority-Medium { color: #b45309; font-weight: 700; }
.priority-High { color: #b91c1c; font-weight: 700; }

.timeline-item,
.audit-item {
  border: 1px solid #e2e8f0;
  border-radius: 0.8rem;
  padding: 0.7rem 0.8rem;
  background: #f8fafc;
}

.timeline-head,
.audit-head {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  align-items: center;
}

@media (max-width: 1023px) {
  .sidebar {
    position: relative;
    height: auto;
  }
}
