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

:root {
  --sidebar-w: 300px;
  --border: #ececec;
  --border-strong: #e3e5e8;
  --text-primary: #16181c;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --gray-bg: #f4f5f6;
  --gray-bg-hover: #eef0f2;
  --green: #059669;
  --green-dark: #047857;
  --green-bg: #d1fae5;
  --green-bg-soft: #ecfdf5;
  --black-pill: #16181c;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-full: 999px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text-primary);
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
}

.app {
  display: flex;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}

/* ===================== SIDEBAR ===================== */

.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  height: 100%;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 10px 14px 12px;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-topbar {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-bottom: 10px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  border-radius: 7px;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0;
}
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn:hover { background: var(--gray-bg); }
.icon-btn.small { width: 22px; height: 22px; }
.icon-btn.small svg { width: 13px; height: 13px; }

.logo {
  display: flex;
  align-items: center;
  padding: 2px 4px 0;
  margin-bottom: 14px;
}
.logo-image {
  height: 20px;
  width: auto;
  display: block;
}

.nav-main {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-bottom: 10px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 9px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
}
.nav-item:hover { background: var(--gray-bg); }
.nav-item.active { background: var(--gray-bg); font-weight: 600; }
.nav-icon { display: inline-flex; width: 16px; height: 16px; color: var(--text-primary); flex: 0 0 auto; }
.nav-icon svg { width: 16px; height: 16px; }
.nav-label { flex: 1; }

.badge {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--gray-bg);
  border-radius: var(--radius-full);
  padding: 1.5px 6px;
  line-height: 1.4;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5px;
  margin-bottom: 4px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-secondary);
}

.tasks-section { margin-bottom: 6px; }

.task-agent {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 9px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
}
.task-agent:hover { background: var(--gray-bg); }

.agent-avatar {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: linear-gradient(135deg, #34d399, #0891b2);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9.5px;
  font-weight: 700;
  flex: 0 0 auto;
}

.task-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 9px 4px 34px;
  border-radius: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
}
.task-item:hover { background: var(--gray-bg); }
.task-item.active { background: var(--gray-bg); font-weight: 600; color: var(--text-primary); }
.task-time { color: var(--text-muted); font-size: 11px; }

.teams-section {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 5px;
  margin-bottom: 4px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-secondary);
}

.sidebar-spacer { flex: 1; min-height: 4px; }

.sidebar-bottom {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 6px;
}

.share-earn {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border-radius: 10px;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  width: 100%;
}
.share-earn:hover { background: var(--gray-bg); }
.gift-icon { color: var(--green); flex: 0 0 auto; display: inline-flex; }
.gift-icon svg { width: 17px; height: 17px; }
.share-earn-text { display: flex; flex-direction: column; flex: 1; line-height: 1.3; }
.share-title { font-size: 12.5px; font-weight: 700; color: var(--text-primary); }
.share-sub { font-size: 11px; color: var(--text-secondary); }
.chevron { width: 14px; height: 14px; color: var(--text-muted); flex: 0 0 auto; }

.user-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 9px;
  border-radius: 10px;
  cursor: pointer;
}
.user-row:hover { background: var(--gray-bg); }
.avatar {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  background: var(--green);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  font-weight: 700;
  flex: 0 0 auto;
}
.user-name {
  flex: 1;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.upgrade-btn {
  border: none;
  background: var(--green);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  cursor: pointer;
  flex: 0 0 auto;
}
.upgrade-btn:hover { background: var(--green-dark); }
.user-chevron { flex: 0 0 auto; }

/* ===================== MAIN ===================== */

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  background: #ffffff;
}

.main-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 14px 32px 0;
}

.topbar-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}
.topbar-title[hidden] { display: none; }

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.update-btn {
  border: none;
  background: var(--black-pill);
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  cursor: pointer;
}
.update-btn:hover { background: #000; }

.main-content {
  flex: 1;
  padding: 20px 40px 40px;
  overflow-y: auto;
}

.page-title {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 4px 0 0;
}
