/* public/css/client/rundown.css */

/* Variables mengikuti global */
:root {
  --primary-brand: #003DF6;
  --primary-light: rgba(0, 61, 246, 0.08);
  --primary-lighter: rgba(0, 61, 246, 0.04);
  --success-color: #198754;
  --warning-color: #ffc107;
  --muted-color: #6c757d;
  --border-color: #dee2e6;
  --bg-light: #f8f9fa;

  /* kalau global radius belum ada */
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-pill: 999px;
}

/* Layout utama - full width */
.rundown-page {
  min-height: calc(100vh - var(--head-offset, 0px));
  background: var(--bg-light);
  width: 100%;
}

/* Header section - full width */
.page-header {
  background: white;
  border-bottom: 1px solid var(--border-color);
  padding: 1.5rem 0;
  margin-bottom: 1.5rem;
  width: 100%;
}

.page-title {
  font-weight: 600;
  color: #212529;
  margin-bottom: 0.25rem;
  font-size: 1.5rem;
}

.page-subtitle {
  color: var(--muted-color);
  font-size: 0.875rem;
}

/* Container untuk konten di tengah */
/* FULL WIDTH: tanpa max-width, hanya padding tipis kanan kiri */
.content-container {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0 1rem;
}

/* Stats Overview */
.stats-overview {
  margin-bottom: 1.5rem;
  width: 100%;
}

.stat-item {
  background: white;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  padding: 1rem;
  height: 100%;
  transition: all 0.2s ease;
}

.stat-item:hover {
  border-color: var(--primary-brand);
  box-shadow: 0 2px 8px rgba(0, 61, 246, 0.08);
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  color: var(--primary-brand);
}

.stat-number {
  font-weight: 600;
  font-size: 1.25rem;
  color: #212529;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--muted-color);
  margin-top: 0.25rem;
}

/* Filter Section - full width background */
.filter-section {
  background: white;
  border-bottom: 1px solid var(--border-color);
  padding: 1.5rem 0;
  margin-bottom: 1.5rem;
  width: 100%;
}

.filter-label {
  font-size: 0.75rem;
  color: var(--muted-color);
  font-weight: 500;
  margin-bottom: 0.5rem;
  display: block;
}

/* Tombol filter mobile */
.mobile-filter-btn {
  border-radius: var(--radius-md);
}

/* Timeline */
.timeline-wrapper {
  position: relative;
  padding-left: 1.5rem;
  width: 100%;
}

.timeline-line {
  position: absolute;
  left: 0.75rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-color);
  z-index: 1;
}

.timeline-day {
  position: relative;
  margin-bottom: 1.5rem;
  width: 100%;
}

.timeline-marker {
  position: absolute;
  left: -1.5rem;
  width: 28px;
  height: 28px;
  background: white;
  border: 2px solid var(--border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  font-size: 0.75rem;
}

.timeline-marker.today {
  border-color: var(--primary-brand);
  background: var(--primary-brand);
  color: white;
}

.timeline-marker.past {
  border-color: var(--muted-color);
  background: white;
}

.timeline-marker.upcoming {
  border-color: var(--success-color);
  background: white;
}

/* Day Card */
.day-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: all 0.2s ease;
  width: 100%;
}

.day-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.day-header {
  background: var(--bg-light);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.day-date {
  font-weight: 600;
  color: #212529;
  margin: 0;
  font-size: 0.95rem;
}

.day-status {
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-today {
  background: var(--primary-light);
  color: var(--primary-brand);
}

.status-past {
  background: #e9ecef;
  color: var(--muted-color);
}

.status-upcoming {
  background: rgba(25, 135, 84, 0.1);
  color: var(--success-color);
}

/* Activity List */
.activity-list {
  padding: 0.5rem 0;
}

.activity-item {
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.15s ease;
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-item:hover {
  background: var(--primary-lighter);
}

.activity-time {
  min-width: 80px;
  font-weight: 500;
  color: var(--primary-brand);
  font-size: 0.85rem;
}

.activity-details {
  flex: 1;
}

.activity-title {
  font-weight: 500;
  color: #212529;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

.activity-meta {
  font-size: 0.75rem;
  color: var(--muted-color);
}

.activity-meta i {
  width: 14px;
  margin-right: 0.25rem;
}

/* Empty State */
.empty-state {
  padding: 3rem 1.5rem;
  text-align: center;
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  max-width: 800px;
  margin: 0 auto;
}

.empty-icon {
  font-size: 3rem;
  color: #dee2e6;
  margin-bottom: 1rem;
}

.empty-title {
  font-weight: 500;
  color: #212529;
  margin-bottom: 0.5rem;
}

.empty-text {
  color: var(--muted-color);
  font-size: 0.875rem;
  max-width: 400px;
  margin: 0 auto 1.5rem;
}

/* Filter actions row */
.filter-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .page-header {
    padding: 1rem 0;
    margin-bottom: 1rem;
  }

  .page-title {
    font-size: 1.25rem;
  }

  .content-container {
    padding: 0 0.75rem;
  }

  .stats-overview {
    margin-bottom: 1rem;
  }

  .stat-item {
    padding: 0.75rem;
  }

  .filter-section {
    padding: 1rem 0;
  }

  .timeline-wrapper {
    padding-left: 1rem;
  }

  .timeline-line {
    left: 0.5rem;
  }

  .timeline-marker {
    left: -1rem;
    width: 24px;
    height: 24px;
  }

  .day-header {
    padding: 0.875rem 1rem;
  }

  .activity-item {
    padding: 0.75rem 1rem;
    flex-direction: column;
    align-items: flex-start !important;
  }

  .activity-time {
    margin-bottom: 0.5rem;
  }

  /* Mobile: filter form stack
       (form desktop disembunyikan pakai d-none d-md-block) */
  .filter-actions {
    justify-content: flex-start;
  }
}

/* Tablet and up */
@media (min-width: 768px) {
  .activity-item {
    display: flex;
    align-items: flex-start;
  }

  .activity-time {
    margin-top: 0.125rem;
  }

  .content-container {
    padding: 0 1.5rem;
  }
}

/* Desktop large */
@media (min-width: 1200px) {
  .content-container {
    padding: 0 2rem;
  }
}

.modal-dialog-centered {
  display: flex !important;
  align-items: center !important;
  min-height: calc(100% - 1rem);
}

/* =========================================================
   Touch feedback di mobile (bikin efek kayak hover)
   ========================================================= */
@media (max-width: 768px) {

  /* Kartu statistik – efek saat di-tap */
  .stat-item:active {
    border-color: var(--primary-brand);
    box-shadow: 0 2px 8px rgba(0, 61, 246, 0.16);
    transform: translateY(-1px);
  }

  /* Card per hari – efek saat di-tap */
  .day-card:active {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
  }

  /* Item aktivitas – efek saat di-tap */
  .activity-item:active {
    background: var(--primary-lighter);
  }

  /* Tombol filter & tombol-tombol kecil lain – kasih rasa tap juga */
  .mobile-filter-btn:active,
  .btn.btn-sm:active,
  .btn.btn-primary.btn-sm:active,
  .btn.btn-outline-secondary.btn-sm:active {
    transform: translateY(1px);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
  }
}
