/* Beranda Siswa - Command Center Styling */

.beranda-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 28px;
  background-color: #ffffff;
  border-bottom: 1px solid var(--color-border);
  min-height: 64px;
  position: sticky;
  top: 0;
  z-index: 40;
}

.beranda-search-wrapper {
  position: relative;
  width: 380px;
  max-width: 100%;
}

.search-input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
}

.beranda-search-input {
  width: 100%;
  padding: 10px 16px 10px 40px;
  border-radius: 9999px;
  border: 1px solid #e2e8f0;
  background-color: #f8fafc;
  font-size: 0.875rem;
  color: var(--color-text-primary);
  font-family: var(--font-body);
  transition: all var(--transition-fast);
  outline: none;
}

.beranda-search-input:focus {
  background-color: #ffffff;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}

.search-results-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.1);
  max-height: 320px;
  overflow-y: auto;
  z-index: 50;
  padding: 6px;
}

.search-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--color-text-primary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background-color var(--transition-fast);
}

.search-result-item:hover {
  background-color: #f1f5f9;
}

.search-result-type {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 6px;
}

.beranda-topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-icon-topbar {
  position: relative;
  background: none;
  border: 1px solid transparent;
  color: #64748b;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-icon-topbar:hover {
  background-color: #f1f5f9;
  color: #0f172a;
}

.notification-indicator-dot {
  position: absolute;
  top: 7px;
  right: 8px;
  width: 7px;
  height: 7px;
  background-color: #ef4444;
  border-radius: 50%;
  border: 1.5px solid #ffffff;
}

.topbar-user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 4px 4px;
  border-radius: 9999px;
  background-color: #ffffff;
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.topbar-user-pill:hover {
  background-color: #f1f5f9;
}

.topbar-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0d9488, #0f766e);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  font-family: var(--font-display);
}

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

.topbar-user-name {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-text-primary);
}

.topbar-user-class {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.arrow-icon {
  color: #94a3b8;
  margin-left: 2px;
}

/* Canvas & Hero Header */
.beranda-content-canvas {
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 32px 48px;
}

.beranda-hero-header {
  margin-bottom: 24px;
}

.beranda-hero-date {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 6px;
}

.beranda-hero-title {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-bottom: 4px;
}

.beranda-hero-subtitle {
  font-size: 1.05rem;
  color: #64748b;
  font-weight: 500;
}

/* 3-Column Command Grid Layout */
.beranda-command-grid {
  display: grid;
  grid-template-columns: 1.15fr 1.35fr 1fr;
  gap: 24px;
  align-items: start;
  margin-bottom: 36px;
}

.command-card {
  background-color: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

/* Card 1: Active Material Card with Historic Archival Overlay */
.card-active-material {
  position: relative;
  min-height: 440px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #ffffff;
}

.active-material-bg-wrapper {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 1;
}

.active-material-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  filter: grayscale(85%) contrast(110%);
  transition: transform 0.4s ease;
}

.card-active-material:hover .active-material-photo {
  transform: scale(1.03);
}

.active-material-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.15) 0%,
    rgba(15, 23, 42, 0.55) 45%,
    rgba(15, 23, 42, 0.92) 80%,
    rgba(15, 23, 42, 0.98) 100%
  );
}

.active-material-body {
  position: relative;
  z-index: 2;
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.active-material-kicker {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: 0.02em;
}

.active-material-title {
  margin: 0;
}

.active-material-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #ffffff;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.25;
}

.active-material-link:hover {
  color: #ccfbf1;
}

.active-material-description {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.45;
  margin: 4px 0 14px;
}

.active-material-bar-track {
  width: 100%;
  height: 6px;
  background-color: rgba(255, 255, 255, 0.25);
  border-radius: 9999px;
  overflow: hidden;
  margin-bottom: 8px;
}

.active-material-bar-fill {
  height: 100%;
  background-color: #2dd4bf;
  border-radius: 9999px;
}

.active-material-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
}

.active-material-percentage {
  color: #2dd4bf;
  font-weight: 700;
}

/* Card 2: Recommendations Column */
.card-recommendations {
  padding: 22px;
}

.recommendations-head {
  margin-bottom: 16px;
}

.recommendations-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.recommendations-sparkle {
  color: #d97706;
  font-size: 1rem;
}

.recommendations-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--color-text-primary);
  margin: 0;
}

.recommendations-subtitle {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  line-height: 1.45;
}

.recommendation-target-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background-color: #e6f4f1;
  border: 1px solid #c7e9e4;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 20px;
}

.rec-target-badge {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: #0e6f64;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rec-target-content {
  flex: 1;
}

.rec-target-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0e6f64;
  margin: 0 0 2px;
  font-family: var(--font-display);
}

.rec-target-hint {
  font-size: 0.75rem;
  color: #334155;
  margin: 0;
}

.btn-rec-target-action {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background-color: #0e6f64;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  flex-shrink: 0;
  transition: transform var(--transition-fast), background-color var(--transition-fast);
}

.btn-rec-target-action:hover {
  background-color: #0b5850;
  transform: scale(1.05);
}

.study-route-section {
  margin-bottom: 20px;
}

.study-route-heading {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #64748b;
  margin: 0 0 10px;
}

.study-route-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
  margin: 0;
}

.study-route-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  text-decoration: none;
  color: var(--color-text-primary);
  font-size: 0.8125rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.study-route-item:hover {
  background-color: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.04);
  transform: translateX(2px);
}

.route-item-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.route-item-icon.icon-summary {
  background-color: #e0f2fe;
  color: #0284c7;
}

.route-item-icon.icon-flashcard {
  background-color: #fef3c7;
  color: #d97706;
}

.route-item-icon.icon-mindmap {
  background-color: #dcfce7;
  color: #16a34a;
}

.route-item-icon.icon-quiz {
  background-color: #fee2e2;
  color: #dc2626;
}

.route-item-label {
  flex: 1;
}

.route-item-duration {
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 500;
}

.secondary-concept-wrapper {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
}

.secondary-concept-heading {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 8px;
}

.secondary-concept-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background-color: #fffbeb;
  border: 1px solid #fef3c7;
  border-radius: 12px;
  text-decoration: none;
  color: var(--color-text-primary);
  transition: all var(--transition-fast);
}

.secondary-concept-card:hover {
  border-color: #fde68a;
  background-color: #fef9c3;
}

.secondary-concept-icon {
  color: #d97706;
  flex-shrink: 0;
}

.secondary-concept-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.secondary-concept-title {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #92400e;
}

.secondary-concept-rate {
  font-size: 0.72rem;
  color: #b45309;
}

.secondary-concept-arrow {
  color: #d97706;
  flex-shrink: 0;
}

/* Card 3: Right Stack */
.command-sidebar-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card-head-with-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.card-head-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--color-text-primary);
  margin: 0;
}

.card-head-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
}

.card-head-link:hover {
  text-decoration: underline;
}

/* Progress Donut */
.card-progress-overview {
  padding: 20px;
}

.progress-gauge-layout {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 18px;
}

.donut-gauge-box {
  position: relative;
  width: 86px;
  height: 86px;
  flex-shrink: 0;
}

.donut-gauge-svg {
  transform: rotate(-90deg);
  display: block;
}

.donut-bg {
  fill: none;
  stroke: #e2e8f0;
}

.donut-segment {
  fill: none;
  stroke-linecap: round;
  transition: stroke-dasharray 0.6s ease;
}

.donut-segment.segment-mastered {
  stroke: #0d9488;
}

.donut-segment.segment-reinforce {
  stroke: #f59e0b;
}

.donut-center-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.donut-percentage {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
}

.progress-metric-summary {
  display: flex;
  flex-direction: column;
}

.metric-topik-number {
  display: flex;
  align-items: baseline;
  gap: 4px;
  line-height: 1;
}

.topik-highlight {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  color: #0f172a;
}

.topik-slash {
  font-size: 0.95rem;
  font-weight: 600;
  color: #94a3b8;
}

.metric-topik-subtext {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 4px;
  font-weight: 500;
}

.mastery-legend-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid #f1f5f9;
  padding-top: 14px;
}

.mastery-legend-item {
  display: flex;
  align-items: center;
  font-size: 0.8125rem;
}

.legend-bullet {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 10px;
  flex-shrink: 0;
}

.bullet-mastered {
  background-color: #10b981;
}

.bullet-reinforce {
  background-color: #f59e0b;
}

.bullet-unopened {
  background-color: #cbd5e1;
}

.legend-name {
  color: #475569;
  flex: 1;
}

.legend-val {
  font-weight: 700;
  color: #0f172a;
}

/* Recent Activity Feed */
.card-recent-activities {
  padding: 18px 20px;
}

.activity-feed-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0;
  margin: 0;
}

.activity-feed-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.activity-feed-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-quiz-feed {
  background-color: #fee2e2;
  color: #e11d48;
}

.icon-mindmap-feed {
  background-color: #dcfce7;
  color: #16a34a;
}

.icon-flashcard-feed {
  background-color: #e0f2fe;
  color: #0284c7;
}

.activity-feed-details {
  flex: 1;
  line-height: 1.35;
}

.activity-feed-title {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--color-text-primary);
}

.activity-feed-sub {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 2px;
}

.activity-score-tag {
  color: #e11d48;
  font-weight: 600;
}

.activity-feed-time {
  font-size: 0.7rem;
  color: #94a3b8;
  white-space: nowrap;
}

/* Affirmation Card */
.card-quote-affirmation {
  background-color: #f0fdf4;
  border: 1px solid #dcfce7;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.quote-affirmation-text {
  font-size: 0.8125rem;
  font-style: italic;
  color: #166534;
  line-height: 1.45;
  margin: 0;
}

.quote-affirmation-plant {
  flex-shrink: 0;
  opacity: 0.8;
}

/* Stepper Track */
.beranda-stepper-section {
  background-color: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  padding: 24px 28px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.stepper-section-head {
  margin-bottom: 22px;
}

.stepper-section-title {
  margin: 0;
}

.stepper-title-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--color-text-primary);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
}

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

.stepper-track-container {
  position: relative;
  padding: 8px 0;
}

.stepper-track-line {
  position: absolute;
  top: 26px;
  left: 36px;
  right: 36px;
  height: 2px;
  background-color: #e2e8f0;
  z-index: 1;
}

.stepper-nodes-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  position: relative;
  z-index: 2;
}

.stepper-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  transition: transform var(--transition-fast);
}

.stepper-node:hover {
  transform: translateY(-2px);
}

.stepper-node-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: #ffffff;
  border: 2px solid #cbd5e1;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  transition: all var(--transition-fast);
}

.stepper-node.is-completed .stepper-node-circle {
  background-color: #0d9488;
  border-color: #0d9488;
  color: #ffffff;
}

.stepper-node.is-active .stepper-node-circle {
  background-color: #e6f4f1;
  border-color: #0e6f64;
  color: #0e6f64;
  box-shadow: 0 0 0 4px rgba(14, 111, 100, 0.15);
}

.stepper-node-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stepper-node-title {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--color-text-primary);
}

.stepper-node-state {
  font-size: 0.72rem;
  color: #94a3b8;
}

.stepper-node.is-completed .stepper-node-state {
  color: #0d9488;
  font-weight: 600;
}

.stepper-node.is-active .stepper-node-state {
  color: #0e6f64;
  font-weight: 700;
}

/* Responsiveness */
@media (max-width: 1100px) {
  .beranda-command-grid {
    grid-template-columns: 1fr 1fr;
  }
  .command-sidebar-stack {
    grid-column: span 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .card-quote-affirmation {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  .beranda-content-canvas {
    padding: 16px 16px 36px;
  }
  .beranda-search-wrapper {
    width: 200px;
  }
  .beranda-command-grid {
    grid-template-columns: 1fr;
  }
  .command-sidebar-stack {
    grid-column: span 1;
    grid-template-columns: 1fr;
  }
  .card-quote-affirmation {
    grid-column: span 1;
  }
  .stepper-nodes-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .stepper-track-line {
    display: none;
  }
  .stepper-node {
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 12px;
  }
  .stepper-node-circle {
    margin-bottom: 0;
  }
}
