:root {
  --primary-blue: #2563eb;
  --primary-hover: #1d4ed8;
  --bg-main: #f8fafc;
  --sidebar-bg: #ffffff;
  --card-bg: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --success-green: #16a34a;
  --warning-yellow: #eab308;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
}

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

/* ================= SIDEBAR ================= */
.sidebar {
  width: 250px;
  background-color: var(--sidebar-bg);
  border-right: 1px solid #f1f5f9;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  left: 0;
  top: 0;
  z-index: 100;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 16px;
  text-decoration: none !important;
  color: inherit;
}

.logo-icon img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.brand-name {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  margin-top: 24px;
}

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

.nav-item i {
  font-size: 20px;
  width: 20px;
  text-align: center;
}

.nav-item:hover {
  background-color: #f8fafc;
  color: var(--text-main);
}

.nav-item.active {
  background-color: var(--primary-blue);
  color: #ffffff;
}

.nav-divider {
  height: 1px;
  background-color: #f1f5f9;
  margin: 16px 0;
}

.sidebar-footer {
  margin-top: auto;
}

.nav-item.logout {
  color: #ef4444;
}

.nav-item.logout:hover {
  background-color: #fef2f2;
}

/* ================= MAIN CONTENT ================= */
.main-content {
  margin-left: 250px;
  width: calc(100% - 250px);
  max-width: 1200px; /* Limits excessive stretch on big screens */
  padding: 32px 40px 100px 40px; /* Generous breathing room */
  box-sizing: border-box;
}
.top-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 24px;
}

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

.notification-icon {
  position: relative;
  font-size: 18px;
  color: var(--text-muted);
  cursor: pointer;
}

.notification-icon .badge {
  position: absolute;
  top: -6px;
  right: -8px;
  background-color: #ef4444;
  color: white;
  font-size: 10px;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.user-profile img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
}

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

.user-info .name {
  font-size: 14px;
  font-weight: 600;
}

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

.text-success {
  color: var(--success-green);
}

.text-warning {
  color: var(--warning-yellow);
}

/* ================= PAGE TITLE ================= */
.page-title-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.page-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-main);
}

.page-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ================= PROFILE OVERVIEW HEADER CARD ================= */
.profile-header-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
}

.avatar-upload-box {
  position: relative;
  width: 110px;
  height: 110px;
  flex-shrink: 0;
}

.avatar-upload-box img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #eff6ff;
}

.upload-badge {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background-color: var(--primary-blue);
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 2px solid white;
  transition: transform 0.2s ease;
}

.upload-badge:hover {
  transform: scale(1.1);
}

.profile-header-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.title-row h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
}

.badge-verified {
  background-color: #dcfce7;
  color: #15803d;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.designation {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}

.meta-tags {
  display: flex;
  gap: 16px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.meta-tags span {
  font-size: 13px;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: #f1f5f9;
  padding: 6px 12px;
  border-radius: 8px;
}

/* ================= SETTINGS / FORM CARDS ================= */
.settings-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
}

.card-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.card-header p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* Form Controls */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.form-control {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background-color: #f8fafc;
  font-size: 14px;
  color: var(--text-main);
  outline: none;
  transition: border-color 0.2s ease;
}

.form-control:focus {
  border-color: var(--primary-blue);
  background-color: #ffffff;
}

.form-control:disabled {
  background-color: #f1f5f9;
  cursor: not-allowed;
  color: #94a3b8;
}

textarea.form-control {
  resize: vertical;
}

/* Floating Action Bar */
.profile-action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: white;
  border: 1px solid var(--border-color);
  padding: 16px 24px;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  margin-top: 24px;
}

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

/* Buttons */
.btn-primary {
  background-color: var(--primary-blue);
  color: #ffffff;
  border: none;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.2s ease;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  color: #ffffff;
}

.btn-outline {
  background-color: white;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.2s ease;
}

.btn-outline:hover {
  background-color: #f1f5f9;
}

/* Mobile Screens (up to 768px) */
@media (max-width: 768px) {
  .main-content {
    margin-left: 0;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 16px 16px 80px 16px; /* Edge-to-edge touch nahi hone dega */
  }

  .top-header {
    margin-bottom: 16px;
  }

  .profile-header-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .profile-action-bar {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }

  .title-row {
    flex-wrap: wrap;
  }

  .page-title-section {
    flex-wrap: wrap;
    gap: 12px;
  }
}
/* Tablet Screens (769px to 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .main-content {
    margin-left: 250px; /* Sidebar ke sath gap maintain rakhega */
    width: calc(100% - 250px);
    padding: 24px 24px 80px 24px; /* Touch hone se rokega */
  }

  .profile-header-card {
    flex-wrap: wrap;
  }

  .page-title-section {
    flex-wrap: wrap;
    gap: 12px;
  }
}
