/* CSS Custom Properties & Core Design Tokens */
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,300..800&family=Outfit:wght@100..900&display=swap');

:root {
  --bg: #021E18;
  --bg2: #03241C;
  --bg3: #042E23;
  --surface: #003B2D;
  --surface2: #0A4A38;
  --green: #59C3BA;
  --green-dim: rgba(89, 195, 186, 0.1);
  --green-glow: rgba(89, 195, 186, 0.2);
  --amber: #F3B45E;
  --amber-dim: rgba(243, 180, 94, 0.1);
  --white: #D9DFD9;
  --white2: #B8C4BD;
  --muted: #7FA493;
  --border: rgba(27, 122, 90, 0.22);
  --border2: rgba(27, 122, 90, 0.42);
  
  --font-display: 'Bricolage Grotesque', sans-serif;
  --font-body: 'Outfit', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg);
  color: var(--white);
  font-family: var(--font-body);
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* Sidebar Styling */
.sidebar {
  width: 320px;
  background-color: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.sidebar-header {
  padding: 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-logo {
  height: 40px;
  object-fit: contain;
}

.sidebar-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--white);
}

.sidebar-title span {
  color: var(--green);
}

.client-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px 8px;
}

.client-item {
  padding: 12px 16px;
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 8px;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.client-item:hover {
  background-color: var(--bg3);
}

.client-item.active {
  background-color: var(--surface);
  border-color: var(--border2);
}

.client-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--white);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--white2);
}

.client-spend {
  font-family: var(--font-display);
  font-weight: 500;
}

/* Main Dashboard Area */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  background-color: var(--bg);
}

.dashboard-header {
  padding: 24px 32px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-title-section h1 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  margin-bottom: 4px;
}

.header-title-section p {
  color: var(--muted);
  font-size: 0.9rem;
}

.director-badge {
  background-color: var(--surface);
  border: 1px solid var(--border2);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
}

.director-badge span {
  color: var(--green);
  font-weight: 600;
}

/* Overview Summary Row */
.overview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 32px;
}

.kpi-card {
  background-color: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.kpi-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background-color: var(--green);
}

.kpi-card.attention::after {
  background-color: var(--amber);
}

.kpi-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.kpi-value {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 6px;
}

.kpi-sub {
  font-size: 0.85rem;
  color: var(--white2);
}

/* Detailed Content View */
.detail-container {
  padding: 0 32px 32px 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin-bottom: 12px;
}

.channel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.channel-card {
  background-color: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
}

.channel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}

.channel-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
}

.status-badge {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-active {
  background-color: rgba(89, 195, 186, 0.15);
  color: var(--green);
}

.status-inactive {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--muted);
}

.status-attention {
  background-color: rgba(243, 180, 94, 0.15);
  color: var(--amber);
}

.metric-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 12px;
}

.metric-item {
  background-color: var(--bg3);
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.02);
}

.metric-label {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.metric-value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
}

/* Recommendations Card */
.recommendations-card {
  background-color: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 16px;
  padding: 24px;
  position: relative;
}

.recommendations-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.recommendations-list li {
  position: relative;
  padding-left: 24px;
  font-size: 0.95rem;
  color: var(--white2);
  line-height: 1.5;
}

.recommendations-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: bold;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--surface2);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--green);
}
