@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&display=swap");

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
}

.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  background: var(--color-primary);
  color: #fff;
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.sidebar .logo {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 10px;
  line-height: 1.2;
}

.logo-img {
  height: 28px;
  width: auto;
  display: block;
}

.logo-wrap {
  display: block;
  margin-bottom: 18px;
}

.logo-wrap .logo-img {
  margin-bottom: 8px;
}

.sidebar a {
  color: #e5e7eb;
  text-decoration: none;
  display: block;
  padding: 10px 12px 10px 36px;
  border-radius: 10px;
  margin-bottom: 6px;
  position: relative;
  background: transparent;
  transition: background 0.15s ease, color 0.15s ease;
}

.sidebar a::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.35);
}

.sidebar a:hover, .sidebar a.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.sidebar a:hover::before, .sidebar a.active::before {
  background: #fff;
}

.nav-sections {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}

.nav-section {
  display: flex;
  flex-direction: column;
}

.nav-section-footer {
  margin-top: auto;
}

.nav-title {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin: 10px 0 8px;
}

.logout-link {
  color: #fecaca;
}

.logout-link::before {
  background: #f87171;
}

.logout-link:hover {
  background: rgba(248, 113, 113, 0.18);
  color: #fff;
}

.main {
  flex: 1;
  padding: 32px;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.back-link {
  font-size: 12px;
  text-decoration: none;
  color: #4b5563;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 6px 10px 6px 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.back-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  color: #111827;
  background: #fff;
  font-size: 16px;
  line-height: 1;
}

.back-link:hover {
  color: #111827;
  background: #f3f4f6;
}

.messages {
  margin: 0 0 16px 0;
  display: grid;
  gap: 8px;
}

.message {
  padding: 10px 12px;
  border-radius: 8px;
  background: #eef2ff;
  color: #1f2937;
  border: 1px solid #c7d2fe;
}

.message.error {
  background: #fee2e2;
  color: #7f1d1d;
  border-color: #fecaca;
}

.message.success {
  background: #dcfce7;
  color: #14532d;
  border-color: #bbf7d0;
}

.card {
  background: var(--color-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.kpi {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kpi-link {
  color: inherit;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.kpi-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.kpi .value {
  font-size: 26px;
  font-weight: 700;
}

.btn {
  background: var(--color-accent);
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
}

.btn.secondary {
  background: var(--color-secondary);
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th, .table td {
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
}

.status {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
}

.status.green { background: #dcfce7; color: var(--status-green); }
.status.yellow { background: #fef3c7; color: var(--status-yellow); }
.status.red { background: #fee2e2; color: var(--status-red); }
.status.gray { background: #e5e7eb; color: var(--status-gray); }

.form-control {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
}

.form-group {
  margin-bottom: 14px;
}

@media (max-width: 900px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; }
}
