:root {
  /* Colors */
  --primary: #4F46E5; /* Indigo 600 */
  --primary-hover: #4338ca;
  --secondary: #10B981; /* Emerald 500 */
  --accent: #F59E0B; /* Amber 500 */
  --danger: #EF4444; /* Red 500 */
  
  --bg-body: #F3F4F6; /* Cool Gray 100 */
  --bg-card: #FFFFFF;
  --bg-sidebar: #FFFFFF;
  --bg-input: #F9FAFB;
  
  --text-main: #111827; /* Gray 900 */
  --text-muted: #6B7280; /* Gray 500 */
  --text-light: #9CA3AF; /* Gray 400 */
  
  --border: #E5E7EB; /* Gray 200 */
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  
  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Font */
  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-family);
  background-color: var(--bg-body);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.5em 0;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 { font-size: 24px; }
h2 { font-size: 20px; }
h3 { font-size: 18px; }
p { margin: 0 0 1em 0; line-height: 1.5; color: var(--text-muted); }
a { text-decoration: none; color: inherit; transition: color 0.2s; }

/* Layout Grid */
.app-container {
  display: flex;
  width: 100%;
}

/* Sidebar */
.sidebar {
  width: 260px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  padding: 24px;
  z-index: 50;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
  font-weight: 800;
  font-size: 20px;
  color: var(--primary);
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 14px;
  transition: all 0.2s;
}

.nav-item:hover {
  background-color: #EEF2FF; /* Indigo 50 */
  color: var(--primary);
}

.nav-item.active {
  background-color: #EEF2FF;
  color: var(--primary);
  font-weight: 600;
}

.nav-icon {
  width: 20px;
  height: 20px;
  opacity: 0.7;
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: 260px; /* Sidebar width */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Top Header */
.top-header {
  height: 72px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 40;
}

.search-bar {
  position: relative;
  width: 320px;
}

.search-input {
  width: 100%;
  padding: 10px 16px 10px 40px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--bg-input);
  font-size: 14px;
  outline: none;
  transition: all 0.2s;
}

.search-input:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 14px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  color: var(--text-muted);
  font-size: 20px;
  transition: color 0.2s;
}

.icon-btn:hover {
  color: var(--primary);
}

.badge-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 1px solid #fff;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: var(--shadow-sm);
}

.user-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.user-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-main);
}

.user-role {
  font-size: 12px;
  color: var(--text-muted);
}

/* Dashboard Body */
.dashboard-body {
  padding: 32px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

/* Welcome Section */
.welcome-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  background: var(--bg-card);
  padding: 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.welcome-text h1 {
  margin-bottom: 4px;
}

.completion-widget {
  width: 300px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-muted);
}

.progress-track {
  width: 100%;
  height: 8px;
  background: #E5E7EB;
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: var(--radius-full);
  width: 0%; /* Set inline */
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  padding: 20px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s;
}

.stat-card:hover {
  transform: translateY(-4px);
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 18px;
}

.stat-icon.blue { background: #EEF2FF; color: var(--primary); }
.stat-icon.green { background: #ECFDF5; color: var(--secondary); }
.stat-icon.yellow { background: #FFFBEB; color: var(--accent); }
.stat-icon.red { background: #FEF2F2; color: var(--danger); }

.stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Main Grid: Jobs vs Activity */
.content-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
}

/* Section Headers */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
}

.link-action {
  font-size: 13px;
  color: var(--primary);
  font-weight: 600;
}

/* Job Cards */
.job-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
}

.job-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.job-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.job-company {
  display: flex;
  gap: 16px;
}

.company-logo {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: #F3F4F6;
  object-fit: cover;
}

.job-info h3 {
  margin-bottom: 4px;
  font-size: 16px;
}

.company-name {
  font-size: 13px;
  color: var(--text-muted);
}

.job-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.badge {
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
}

.badge-outline {
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.badge-soft {
  background: #EEF2FF;
  color: var(--primary);
}

.job-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.salary {
  font-weight: 700;
  color: var(--text-main);
  font-size: 14px;
}

.btn {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 13px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-block;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #4338ca 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.4);
}

.btn-secondary {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: var(--bg-body);
}

/* Activity Feed */
.activity-panel {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 24px;
  height: fit-content;
}

.activity-item {
  display: flex;
  gap: 16px;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.activity-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.activity-icon {
  width: 32px;
  height: 32px;
  background: #EEF2FF;
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
}

.activity-content p {
  font-size: 14px;
  margin-bottom: 4px;
  color: var(--text-main);
}

.activity-time {
  font-size: 12px;
  color: var(--text-light);
}

/* Company Post (Feed) */
.company-post {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.post-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.post-actions {
  display: flex;
  gap: 16px;
  margin-top: 16px;
}

.action-link {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.action-link:hover {
  color: var(--primary);
}

/* Settings Forms */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-main);
}

.form-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  transition: all 0.2s;
  font-family: inherit;
}

.form-input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.settings-container {
  max-width: 800px;
}

/* Responsive */
@media (max-width: 1024px) {
  .sidebar {
    width: 80px;
    padding: 24px 12px;
  }
  .brand span, .nav-item span {
    display: none;
  }
  .nav-item {
    justify-content: center;
    padding: 12px;
  }
  .main-content {
    margin-left: 80px;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .content-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .sidebar {
    display: none; /* In real app, toggle with JS */
  }
  .main-content {
    margin-left: 0;
  }
  .top-header {
    padding: 0 16px;
  }
  .dashboard-body {
    padding: 16px;
  }
  .search-bar {
    display: none;
  }
  .welcome-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  .completion-widget {
    width: 100%;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
}
