/* ===== ELIMU TRACK — Scoped Professional Dashboard UI Stylesheet ===== */

/* ── Content Wrapper Animations ── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.content {
  animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* ── Professional Header ── */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 16px;
}

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

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

.header-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--navy3);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

.status-dot {
  width: 6px;
  height: 6px;
  background-color: var(--green);
  border-radius: 50%;
  display: inline-block;
  animation: subtlePulse 2s infinite;
}

@keyframes subtlePulse {
  0% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.6; }
}

.header-sub {
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
}

.header-meta {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.meta-clock {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.meta-date {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

@media(max-width: 768px) {
  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .header-meta {
    text-align: left;
    align-items: flex-start;
    border-top: 1px solid var(--border);
    padding-top: 12px;
    width: 100%;
  }
}

/* ── Minimalist Cards ── */
.glass-card {
  background: var(--navy2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.glass-card:hover {
  border-color: rgba(37, 99, 235, 0.3);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

body.theme-dark .glass-card,
body.theme-midnight .glass-card,
body.theme-royal .glass-card,
body.theme-emerald .glass-card {
  background: var(--navy2);
  border: 1px solid var(--border);
  box-shadow: none;
}

body.theme-dark .glass-card:hover,
body.theme-midnight .glass-card:hover,
body.theme-royal .glass-card:hover,
body.theme-emerald .glass-card:hover {
  border-color: var(--blue2);
}

/* ── Refined Stat Cards Grid ── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  position: relative;
  background: var(--navy2) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  padding: 18px 20px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 108px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

/* Accent top line on cards instead of full color block */
.stat-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: transparent;
}
.stat-card.blue::after { background: var(--blue2); }
.stat-card.gold::after { background: var(--gold); }
.stat-card.green::after { background: var(--green); }
.stat-card.purple::after { background: var(--purple); }
.stat-card.orange::after { background: var(--orange); }

/* Remove previous layout decorators */
.stat-card::before { display: none !important; }

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border-color: rgba(30,110,244,0.3) !important;
}

body.theme-dark .stat-card:hover,
body.theme-midnight .stat-card:hover,
body.theme-royal .stat-card:hover,
body.theme-emerald .stat-card:hover {
  border-color: var(--blue2) !important;
  box-shadow: none;
}

.stat-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.stat-card-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.stat-card-icon-container {
  width: 24px;
  height: 24px;
  background: var(--navy3);
  border: 1px solid var(--border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--muted);
}

.stat-card-body {
  margin-top: auto;
}

.stat-card-value {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* ── App Shortcuts (Quick Actions) ── */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}

.quick-card {
  background: var(--navy2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  text-decoration: none;
  color: var(--text) !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.quick-icon-wrapper {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  margin-bottom: 10px;
  transition: all 0.2s ease;
  background: var(--navy3);
  color: var(--muted);
  border: 1px solid var(--border);
}

.quick-card:hover {
  border-color: rgba(30, 110, 244, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
}

.quick-card:hover .quick-icon-wrapper {
  background: rgba(30, 110, 244, 0.1);
  color: var(--blue2);
  border-color: rgba(30, 110, 244, 0.2);
}

.quick-card .ql {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 2px;
  color: var(--text);
}

.quick-card .qd {
  font-size: 10px;
  color: var(--muted);
}

/* ── Polished Grade Analytics Chart ── */
.chart-container-card {
  position: relative;
}

.chart-wrap {
  display: flex;
  gap: 20px;
  align-items: flex-end;
  height: 150px;
  margin-top: 20px;
  position: relative;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

/* Elegant dashed gridlines */
.chart-wrap::before {
  content: '';
  position: absolute;
  inset: 0 0 20px 0;
  background-image: linear-gradient(to bottom, var(--border) 1px, transparent 1px);
  background-size: 100% 25%;
  pointer-events: none;
  border-bottom: 1px solid var(--border);
}

.chart-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  height: 100%;
  justify-content: flex-end;
  position: relative;
  z-index: 2;
}

.chart-bar-wrapper {
  width: 22px;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.chart-bar {
  width: 100%;
  border-radius: 4px 4px 0 0;
  transition: height 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

/* Dynamic Tooltip on hover */
.chart-bar::after {
  content: attr(data-count);
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  background: var(--text);
  color: var(--navy2);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: all 0.15s ease;
}

.chart-bar:hover::after {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

.chart-lbl {
  font-size: 10px;
  font-weight: 500;
  color: var(--muted);
  text-align: center;
  line-height: 1.2;
}

/* ── Minimalist Activity Timeline ── */
.activity-list {
  display: flex;
  flex-direction: column;
  position: relative;
  padding-left: 14px;
}

.activity-list::before {
  content: '';
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: 1px;
  background-color: var(--border);
}

.act-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  background: transparent;
  border: none;
  margin-bottom: 6px;
  transition: background 0.15s ease;
}

.act-item:hover {
  background: var(--navy3);
}

.act-item::before {
  content: '';
  position: absolute;
  top: 50%;
  left: -13px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--navy2);
  border: 1px solid var(--border);
  z-index: 2;
  transform: translateY(-50%);
  transition: all 0.2s;
}

.act-item:hover::before {
  background: var(--blue2);
  border-color: var(--blue2);
}

.act-dot {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
  background: var(--navy3) !important;
  color: var(--muted);
  border: 1px solid var(--border);
}

.act-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.act-time {
  font-size: 10px;
  color: var(--muted);
  margin-top: 1px;
}

/* ── Clean Form Customizations ── */
.link-box {
  background: var(--navy2) !important;
  border: 1px solid var(--border) !important;
  border-radius: 12px;
  padding: 22px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.link-box h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text);
}

.link-box p {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 16px;
  line-height: 1.4;
}

.form-group input,
.form-group select {
  background-color: var(--navy3) !important;
  border: 1px solid var(--border) !important;
  font-size: 13px !important;
  padding: 8px 12px !important;
  border-radius: 8px !important;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--blue2) !important;
  background-color: var(--navy2) !important;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1) !important;
}

.gen-link-row {
  margin-top: 14px;
  background: var(--navy3) !important;
  border: 1px dashed var(--border) !important;
  border-radius: 8px;
  padding: 10px 12px;
}

.gen-link-url {
  font-family: monospace;
  font-size: 11px;
  color: var(--blue2) !important;
}

/* ── Section Headers Refinements ── */
.section-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.section-sub {
  font-size: 11px;
  color: var(--muted);
}
