/* ==========================================================================
   TutorBridge - Dashboard Styles (Student, Tutor, Institute)
   ========================================================================== */

.dashboard-page-bg {
  background-color: #F8FAFC;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.dashboard-wrapper {
  flex: 1;
  max-width: 1360px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem 1rem;
  width: 100%;
}

.dashboard-layout-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1.75rem;
  align-items: flex-start;
}

/* Sidebar Navigation */
.dashboard-sidebar-panel {
  background: #FFFFFF;
  border: 1px solid var(--border-light, #E2E8F0);
  border-radius: var(--radius-xl, 16px);
  padding: 1.25rem 0.85rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  position: sticky;
  top: 80px;
}

.sidebar-user-brief {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.5rem 0.6rem 1.25rem 0.6rem;
  margin-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-light, #E2E8F0);
}

.sidebar-user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #E2E8F0;
}

.sidebar-user-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main, #0F172A);
  line-height: 1.2;
}

.sidebar-user-role-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #218DAE;
  background: #E8F5F8;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  margin-top: 0.2rem;
}

.sidebar-nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.sidebar-nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md, 8px);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary, #475569);
  text-decoration: none;
  transition: all 0.15s ease;
}

.sidebar-nav-link svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  flex-shrink: 0;
}

.sidebar-nav-link:hover {
  background: #F1F5F9;
  color: var(--text-main, #0F172A);
}

.sidebar-nav-link.active {
  background: #218DAE;
  color: #FFFFFF;
}

.sidebar-nav-link.active svg {
  stroke: #FFFFFF;
}

.sidebar-divider {
  height: 1px;
  background: var(--border-light, #E2E8F0);
  margin: 0.75rem 0;
}

/* Dashboard Main Content Area */
.dashboard-main-area {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

/* Welcome Banner */
.dash-welcome-banner {
  background: linear-gradient(135deg, #E8F5F8 0%, #FFFFFF 100%);
  border: 1px solid rgba(33, 141, 174, 0.25);
  border-radius: var(--radius-xl, 16px);
  padding: 1.75rem 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.dash-welcome-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-main, #0F172A);
  margin-bottom: 0.25rem;
}

.dash-welcome-sub {
  color: var(--text-secondary, #475569);
  font-size: 0.95rem;
}

/* Search Bar in Dashboard */
.dash-search-container {
  background: #FFFFFF;
  border: 1px solid var(--border-light, #E2E8F0);
  border-radius: var(--radius-lg, 12px);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.dash-search-input {
  border: none;
  outline: none;
  flex: 1;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text-main, #0F172A);
}

/* Dashboard Metric Cards Grid */
.dash-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.dash-metric-card {
  background: #FFFFFF;
  border: 1px solid var(--border-light, #E2E8F0);
  border-radius: var(--radius-lg, 12px);
  padding: 1.25rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.dash-metric-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary, #64748B);
  margin-bottom: 0.35rem;
}

.dash-metric-val {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-main, #0F172A);
  line-height: 1.1;
}

/* Dashboard Section Card */
.dash-section-card {
  background: #FFFFFF;
  border: 1px solid var(--border-light, #E2E8F0);
  border-radius: var(--radius-xl, 16px);
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.dash-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.dash-section-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main, #0F172A);
}

/* Class Card */
.upcoming-class-card {
  border: 1px solid var(--border-light, #E2E8F0);
  border-radius: var(--radius-md, 10px);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 0.75rem;
  transition: all 0.15s ease;
}

.upcoming-class-card:hover {
  border-color: #218DAE;
  background: #FAFDFF;
}

.class-time-tag {
  background: #E8F5F8;
  color: #218DAE;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  white-space: nowrap;
}

/* Requirement Card */
.user-requirement-card {
  border: 1px solid var(--border-light, #E2E8F0);
  border-radius: var(--radius-md, 10px);
  padding: 1.2rem;
  margin-bottom: 0.85rem;
  background: #FFFFFF;
  transition: all 0.15s ease;
}

.user-requirement-card:hover {
  border-color: #218DAE;
}

.req-badge-active {
  background: #DCFCE7;
  color: #166534;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
}

@media (max-width: 1024px) {
  .dashboard-layout-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-sidebar-panel {
    position: static;
  }
}
