/**
 * CBT MA BAHRUL ULUM KEPOHBARU
 * File: dashboard.css
 * Tahap 04/20: Layout, Sidebar, Topbar, Dashboard, Navigasi Mobile
 */

/* Stat Cards */
.stat-card {
  background: var(--cbt-surface);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  border: 1px solid var(--cbt-border);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 1.15rem;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
}

.stat-card.navy::after { background-color: var(--cbt-navy); }
.stat-card.teal::after { background-color: var(--cbt-teal); }
.stat-card.emerald::after { background-color: var(--cbt-emerald); }
.stat-card.gold::after { background-color: var(--cbt-gold); }
.stat-card.purple::after { background-color: #7C3AED; }
.stat-card.amber::after { background-color: #D97706; }
.stat-card.success::after { background-color: var(--cbt-success); }
.stat-card.danger::after { background-color: var(--cbt-danger); }

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.stat-icon.navy { background-color: rgba(18, 59, 104, 0.1); color: var(--cbt-navy); }
.stat-icon.teal { background-color: rgba(8, 126, 139, 0.1); color: var(--cbt-teal); }
.stat-icon.emerald { background-color: rgba(27, 94, 32, 0.1); color: var(--cbt-emerald); }
.stat-icon.gold { background-color: rgba(242, 181, 68, 0.15); color: #B37D16; }
.stat-icon.purple { background-color: rgba(124, 58, 237, 0.1); color: #7C3AED; }
.stat-icon.amber { background-color: rgba(217, 119, 6, 0.1); color: #D97706; }
.stat-icon.success { background-color: rgba(22, 163, 106, 0.1); color: var(--cbt-success); }
.stat-icon.danger { background-color: rgba(217, 75, 80, 0.1); color: var(--cbt-danger); }

.stat-info {
  flex: 1;
  min-width: 0;
}

.stat-value {
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--cbt-text-primary);
  font-family: 'Poppins', sans-serif;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--cbt-text-secondary);
  margin-top: 0.15rem;
  margin-bottom: 0;
  white-space: nowrap;
  overflow: hidden;
  text-truncate: ellipsis;
}

/* Server Resource Monitor Widget */
.resource-gauge {
  background: var(--cbt-surface-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  border: 1px solid var(--cbt-border);
}

.resource-bar-track {
  height: 8px;
  background-color: var(--cbt-border);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 6px;
}

.resource-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
}

/* Quick Action Grid */
.quick-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem 0.5rem;
  background: var(--cbt-surface);
  border: 1px solid var(--cbt-border);
  border-radius: var(--radius-md);
  color: var(--cbt-text-primary);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all var(--transition-fast);
  height: 100%;
}

.quick-action-btn:hover {
  border-color: var(--cbt-navy);
  background: var(--cbt-surface-subtle);
  transform: translateY(-2px);
  color: var(--cbt-navy);
  box-shadow: var(--shadow-sm);
}

.quick-action-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
}

/* Audit Logs Stream */
.timeline-stream {
  position: relative;
  padding-left: 1.5rem;
}

.timeline-stream::before {
  content: '';
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 6px;
  width: 2px;
  background-color: var(--cbt-border);
}

.timeline-item {
  position: relative;
  margin-bottom: 1rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -1.5rem;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--cbt-surface);
  box-shadow: 0 0 0 1px var(--cbt-border);
}

/* Student ID Card */
.student-id-card {
  background: linear-gradient(135deg, #123B68 0%, #087E8B 100%);
  color: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.student-id-card::after {
  content: 'MA BAHRUL ULUM';
  position: absolute;
  right: -20px;
  bottom: -15px;
  font-size: 4rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.04);
  pointer-events: none;
  letter-spacing: 2px;
  user-select: none;
}

.student-photo-frame {
  width: 90px;
  height: 110px;
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  flex-shrink: 0;
}

.token-verification-box {
  background: var(--cbt-surface);
  border: 2px dashed var(--cbt-teal);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: center;
}

.token-input-field {
  font-family: 'Poppins', monospace;
  font-size: 1.5rem;
  letter-spacing: 6px;
  text-transform: uppercase;
  font-weight: 700;
  text-align: center;
}
