@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --pink: #e11d70;
  --pink-strong: #d0005a;
  --bg: #f6f8fb;
  --text: #111827;
  --muted: #6b7280;
  --card: #ffffff;
  --border: #e5e7eb;
  --success: #16a34a;
  --warning: #f59e0b;
  --info: #0ea5e9;
  --shadow: 0 10px 30px rgba(17, 24, 39, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Space Grotesk', 'Segoe UI', Tahoma, sans-serif;
  background: var(--bg);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

.layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: linear-gradient(180deg, #f50076, #d0005a 80%, #9b003f 100%);
  color: #fff;
  padding: 18px 0;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 24px 18px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.5px;
}

.brand .logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  display: grid;
  place-items: center;
  font-weight: 700;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 12px;
}

.nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  color: #ffe9f4;
  font-weight: 500;
  transition: background 0.2s ease, transform 0.2s ease;
}

.nav a .icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  display: grid;
  place-items: center;
  font-size: 14px;
}

.nav a.active,
.nav a:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateX(4px);
}

.main {
  padding: 28px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.greeting h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}

.greeting p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  padding: 10px 14px;
  border-radius: 14px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.user-chip .avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #22c55e, #10b981);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
}

.page-title {
  font-size: 26px;
  margin: 0 0 18px;
  font-weight: 700;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.card {
  background: var(--card);
  border-radius: 16px;
  padding: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 12px;
}

.card-title .pill {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #fff;
}

.card .value {
  font-size: 30px;
  font-weight: 700;
  margin: 0;
}

.card .sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 18px;
}

.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.panel h3 {
  margin: 0 0 12px;
  font-size: 16px;
}

.tab-group {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-left: 10px;
}

.tab-group button {
  background: #fff;
  border: none;
  padding: 8px 14px;
  font-weight: 600;
  cursor: pointer;
  color: var(--muted);
}

.tab-group button.active {
  background: var(--pink);
  color: #fff;
}

.charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}

.legend-row {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.legend-row .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.status-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.tag {
  padding: 6px 10px;
  border-radius: 10px;
  background: #f3f4f6;
  color: #111827;
  font-size: 12px;
  font-weight: 600;
}

.badge-danger {
  background: #fee2e2;
  color: #b91c1c;
}

.btn, button.btn, input[type="submit"].btn, input[type="button"].btn {
  background: var(--pink);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 22px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(225,29,112,0.08);
  transition: background 0.18s, box-shadow 0.18s, transform 0.18s;
  outline: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn:hover, button.btn:hover, input[type="submit"].btn:hover, input[type="button"].btn:hover {
  background: var(--pink-strong);
  box-shadow: 0 4px 16px rgba(225,29,112,0.13);
  transform: translateY(-2px) scale(1.03);
}

.btn:active, button.btn:active, input[type="submit"].btn:active, input[type="button"].btn:active {
  background: var(--pink);
  box-shadow: 0 1px 4px rgba(225,29,112,0.08);
  transform: none;
}

.btn:disabled, button.btn:disabled, input[type="submit"].btn:disabled, input[type="button"].btn:disabled {
  background: #e5e7eb;
  color: #b0b0b0;
  cursor: not-allowed;
  box-shadow: none;
}

.role-tab {
  background: #fff;
  border: none;
  padding: 8px 18px;
  font-weight: 600;
  cursor: pointer;
  color: var(--muted);
  border-radius: 8px 8px 0 0;
  margin-right: 2px;
  transition: background 0.18s, color 0.18s;
}

.role-tab.active, .role-tab:focus, .role-tab:hover {
  background: var(--pink);
  color: #fff;
}

@media (max-width: 1024px) {
  .layout {
    grid-template-columns: 200px 1fr;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: relative;
    height: auto;
  }
}
