/* assets/css/realtime-report.css - ENHANCED VERSION */
/* STANDALONE LIVE MONITORING STYLES */

/* ===== VARIABLES & THEME ===== */
:root {
  --primary: #4361ee;
  --primary-dark: #3a56d4;
  --secondary: #7209b7;
  --success: #06d6a0;
  --warning: #ffd166;
  --danger: #ef476f;
  --dark: #1e293b;
  --light: #f8fafc;
  --gray: #64748b;
  --gray-light: #e2e8f0;
  --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESET & BASE STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", sans-serif;
  background: linear-gradient(135deg, #f0f4ff 0%, #f8fafc 100%);
  color: var(--dark);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== MODERN HEADER STYLES ===== */
.monitoring-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  padding: 1rem 2rem;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-image {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.logo-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.logo-text h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: white !important;
}

.logo-text p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9) !important;
  margin-top: 2px;
}

.admin-access {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.admin-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.25);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  backdrop-filter: blur(10px);
}

.admin-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

/* ===== MAIN CONTENT STYLES ===== */
.dashboard-container {
  flex: 1;
  width: 100%;
  max-width: 1400px;
  margin: 2rem auto;
  padding: 0 2rem;
}

.form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--gray-light);
}

.header-content h1 {
  color: var(--primary);
  margin-bottom: 0.5rem;
  font-size: 1.8rem;
  font-weight: 700;
}

.header-content p {
  color: var(--gray);
  font-size: 1rem;
}

/* ===== MODERN VIEW CONTROLS ===== */
.view-controls {
  background: rgba(255, 255, 255, 0.7);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.control-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.control-group label {
  font-weight: 600;
  color: var(--dark);
  font-size: 0.9rem;
  white-space: nowrap;
}

.form-control {
  padding: 0.75rem 1rem;
  border: 1px solid var(--gray-light);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  background: white;
  transition: var(--transition);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
}

.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 6px rgba(67, 97, 238, 0.2);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(67, 97, 238, 0.3);
}

.btn-primary i {
  color: white;
}

/* ===== MODERN AUTO REFRESH INFO ===== */
.auto-refresh-info {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid #fcd34d;
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  font-size: 0.85rem;
  color: #92400e;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 2px 4px rgba(251, 191, 36, 0.1);
}

/* ===== ENHANCED LIVE INDICATOR ===== */
.live-indicator {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  animation: pulse 2s infinite;
  font-weight: 700;
  box-shadow: 0 4px 6px rgba(239, 68, 68, 0.3);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 4px 6px rgba(239, 68, 68, 0.3);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 6px 10px rgba(239, 68, 68, 0.4);
  }
}

/* ===== NO ACTIVITY STATE - NEW DESIGN ===== */
.no-activity-state {
  text-align: center;
  padding: 4rem 2rem;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 2rem 0;
  border: 2px dashed #e2e8f0;
  position: relative;
  overflow: hidden;
}

.no-activity-state::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(67, 97, 238, 0.05),
    transparent
  );
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

.no-activity-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  color: var(--primary);
  animation: float 3s ease-in-out infinite;
  display: inline-block;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

.no-activity-state h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: var(--dark);
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.no-activity-state p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  color: var(--gray);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.no-activity-features {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.no-activity-feature {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(67, 97, 238, 0.05);
  border-radius: var(--radius);
  border: 1px solid rgba(67, 97, 238, 0.1);
  transition: var(--transition);
}

.no-activity-feature:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(67, 97, 238, 0.15);
}

.no-activity-feature i {
  color: var(--primary);
  font-size: 1.2rem;
}

.no-activity-feature span {
  color: var(--dark);
  font-weight: 500;
  font-size: 0.9rem;
}

/* ===== MODERN USER SECTION STYLES ===== */
.user-section {
  background: white;
  border-radius: var(--radius);
  padding: 0;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-light);
  overflow: hidden;
  transition: var(--transition);
}

.user-section:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.user-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.user-info {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.user-avatar {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.user-details h3 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 600;
  color: white;
}

.user-details p {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
}

.last-update {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ===== ENHANCED STATS BAR ===== */
.stats-bar {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--gray-light);
  display: flex;
  gap: 2rem;
  font-size: 0.9rem;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.stat-badge {
  background: var(--primary);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(67, 97, 238, 0.2);
}

.stat-badge.completed {
  background: var(--success);
}

.stat-badge.in-progress {
  background: var(--warning);
  color: var(--dark);
}

/* ===== MODERN TABLE STYLES ===== */
.table-container-wrapper {
  border: 1px solid var(--gray-light);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin: 1rem;
}

.table-container {
  overflow: auto;
  max-height: 600px;
  position: relative;
}

.activity-table,
.delay-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 1200px;
  font-size: 0.85rem;
}

.activity-table thead,
.delay-table thead {
  position: sticky;
  top: 0;
  z-index: 100;
}

.activity-table th,
.delay-table th,
.activity-table td,
.delay-table td {
  border: 1px solid var(--gray-light);
  padding: 0.75rem;
  text-align: center;
  vertical-align: middle;
  height: 50px;
}

.time-header {
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-dark) 100%
  );
  color: white;
  font-weight: 600;
  text-align: center;
  border-bottom: 2px solid var(--primary-dark);
  padding: 1rem 0.75rem;
  height: 55px;
  font-size: 0.95rem;
}

.time-labels {
  background: var(--primary);
  position: sticky;
  top: 55px;
  z-index: 99;
}

.time-labels th {
  background: var(--primary);
  color: white;
  font-weight: 500;
  font-size: 0.75rem;
  padding: 0.5rem 0.4rem;
  text-orientation: mixed;
  height: 65px;
  min-width: 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.3);
}

.time-labels th:last-child {
  border-right: none;
}

/* Enhanced Freeze Pane Styles */
.activity-code,
.delay-code {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  font-weight: 700;
  text-align: center;
  width: 80px;
  min-width: 80px;
  max-width: 80px;
  position: sticky;
  left: 0;
  z-index: 50;
  border-right: 2px solid #94a3b8;
  font-size: 0.85rem;
  padding: 0.75rem 0.5rem;
}

.activity-description,
.delay-description {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  font-weight: 600;
  text-align: left;
  width: 240px;
  min-width: 240px;
  max-width: 240px;
  position: sticky;
  left: 80px;
  z-index: 45;
  border-right: 2px solid #94a3b8;
  padding: 0.75rem 1rem;
}

.activity-description span,
.delay-description span {
  display: block;
  line-height: 1.4;
  font-size: 0.85rem;
  white-space: normal;
  word-wrap: break-word;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 2.8em;
}

/* Enhanced Row Striping dan Hover Effects */
.activity-table tbody tr:nth-child(even),
.delay-table tbody tr:nth-child(even) {
  background-color: #fafbfc;
}

.activity-table tbody tr:hover,
.delay-table tbody tr:hover {
  background-color: #f1f5f9;
  transform: scale(1.002);
  transition: var(--transition);
}

.activity-table tbody tr:nth-child(even) .activity-code,
.activity-table tbody tr:nth-child(even) .activity-description,
.delay-table tbody tr:nth-child(even) .delay-code,
.delay-table tbody tr:nth-child(even) .delay-description {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.activity-table tbody tr:hover .activity-code,
.activity-table tbody tr:hover .activity-description,
.delay-table tbody tr:hover .delay-code,
.delay-table tbody tr:hover .delay-description {
  background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
}

/* ===== ENHANCED TIME BLOCKS STYLES ===== */
.time-block {
  position: relative;
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  cursor: default;
  margin: 0 auto;
  padding: 0;
  flex-shrink: 0;
  border-radius: 4px;
  overflow: hidden;
}

.time-indicator {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #f8fafc;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  transition: var(--transition);
  pointer-events: none;
}

/* Enhanced color fill untuk live monitoring */
.time-indicator.live {
  background: linear-gradient(
    135deg,
    var(--success) 0%,
    #05c293 100%
  ) !important;
  border-color: #05a380 !important;
  box-shadow: 0 2px 4px rgba(6, 214, 160, 0.4);
}

.time-indicator.live.delay {
  background: linear-gradient(
    135deg,
    var(--danger) 0%,
    #e63946 100%
  ) !important;
  border-color: #d90429 !important;
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.4);
}

/* ===== ENHANCED SUMMARY STYLES ===== */
.live-summary-cell {
  padding: 1rem;
  vertical-align: top;
  background: white;
  border-left: 1px solid var(--gray-light);
  min-width: 320px;
}

.live-summary-container {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  min-height: 70px;
}

.live-time-summary {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  border-radius: var(--radius);
  text-align: center;
  border: 2px solid var(--gray-light);
  padding: 1rem;
  font-weight: 700;
  min-width: 140px;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.live-time-summary small {
  color: var(--dark);
  font-size: 0.85rem;
  font-weight: 600;
}

.live-comment-display {
  background: #f8fafc;
  border: 1px solid var(--gray-light);
  border-radius: var(--radius);
  padding: 1rem;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--gray);
  flex: 1;
  min-height: 70px;
  max-height: 120px;
  overflow-y: auto;
  transition: var(--transition);
}

.live-comment-display.with-comments {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-left: 4px solid #0ea5e9;
  border: 2px solid #bfdbfe;
}

.live-comment-display:empty {
  display: none;
}

.live-comment-display.no-comments {
  background: #fafafa;
  color: #94a3b8;
  font-style: italic;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.live-comment-display strong {
  color: var(--dark);
  font-size: 0.8rem;
  display: block;
  margin-bottom: 0.5rem;
}

.live-comment-display i {
  color: var(--gray);
  margin-right: 0.25rem;
}

/* Enhanced Highlight untuk total minutes */
.total-minutes.highlight {
  color: var(--success);
  font-size: 1.2rem;
  font-weight: 700;
}

.total-minutes.delay-highlight {
  color: var(--danger);
  font-size: 1.2rem;
  font-weight: 700;
}

/* ===== MODERN FOOTER STYLES ===== */
.monitoring-footer {
  background: linear-gradient(135deg, #0f172a 0%, #1a1f36 100%);
  color: white;
  margin-top: auto;
  width: 100%;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2.5rem 2rem 1.5rem;
}

.footer-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.3rem;
  font-weight: 700;
  color: white;
}

.footer-links {
  display: flex;
  gap: 2.5rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

.footer-links a:hover {
  color: white;
  transform: translateY(-2px);
}

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

/* ===== ENHANCED RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
  .dashboard-container {
    padding: 0 1.5rem;
  }

  .header-content {
    padding: 0 1.5rem;
  }
}

@media (max-width: 992px) {
  .view-controls {
    padding: 1.25rem;
    gap: 1rem;
  }

  .control-group {
    flex: 1;
    min-width: 200px;
  }

  .stats-bar {
    gap: 1.5rem;
  }

  .no-activity-features {
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  .monitoring-header {
    padding: 1rem;
  }

  .header-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .admin-access {
    justify-content: center;
    flex-wrap: wrap;
  }

  .dashboard-container {
    padding: 0 1rem;
    margin: 1rem auto;
  }

  .form-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .view-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    padding: 1rem;
  }

  .control-group {
    justify-content: space-between;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .control-group label {
    width: 100%;
  }

  .form-control {
    width: 100%;
  }

  .stats-bar {
    gap: 1rem;
    padding: 1rem;
  }

  .user-header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
    padding: 1.25rem;
  }

  .user-info {
    flex-direction: column;
    gap: 0.75rem;
  }

  .live-summary-container {
    flex-direction: column;
    gap: 0.75rem;
  }

  .live-time-summary {
    min-width: 100%;
    padding: 0.75rem;
  }

  .live-summary-cell {
    min-width: 280px;
  }

  .footer-main {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
  }

  /* Mobile freeze pane adjustments */
  .activity-code,
  .delay-code {
    width: 65px;
    min-width: 65px;
  }

  .activity-description,
  .delay-description {
    width: 200px;
    min-width: 200px;
    left: 65px;
  }

  .time-block {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
  }

  .table-container-wrapper {
    margin: 0.5rem;
  }

  .no-activity-state {
    padding: 3rem 1.5rem;
  }

  .no-activity-state h3 {
    font-size: 1.5rem;
  }

  .no-activity-state p {
    font-size: 1rem;
  }
}

@media (max-width: 576px) {
  .dashboard-container {
    padding: 0 0.75rem;
  }

  .header-content h1 {
    font-size: 1.4rem;
  }

  .logo-image {
    width: 45px;
    height: 45px;
  }

  .admin-btn {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
  }

  .footer-content {
    padding: 2rem 1rem 1rem;
  }

  .footer-links {
    flex-direction: column;
    gap: 1rem;
  }

  /* Mobile freeze pane adjustments */
  .activity-code,
  .delay-code {
    width: 55px;
    min-width: 55px;
    font-size: 0.75rem;
    padding: 0.5rem 0.25rem;
  }

  .activity-description,
  .delay-description {
    width: 150px;
    min-width: 150px;
    left: 55px;
    padding: 0.5rem 0.75rem;
  }

  .activity-description span,
  .delay-description span {
    font-size: 0.8rem;
  }

  .time-block {
    width: 22px;
    height: 22px;
    min-width: 22px;
    min-height: 22px;
  }

  .time-header {
    font-size: 0.85rem;
    padding: 0.75rem 0.5rem;
  }

  .time-labels th {
    font-size: 0.7rem;
    min-width: 16px;
  }

  .no-activity-state {
    padding: 2rem 1rem;
  }

  .no-activity-state h3 {
    font-size: 1.3rem;
  }

  .no-activity-features {
    flex-direction: column;
    align-items: center;
  }
}

/* Enhanced Scrollbar Styling */
.table-container::-webkit-scrollbar {
  width: 14px;
  height: 14px;
}

.table-container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 8px;
}

.table-container::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 8px;
  border: 3px solid #f1f1f1;
}

.table-container::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* Loading Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.user-section {
  animation: fadeIn 0.5s ease-out;
}

/* Section Headers */
.section-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--gray-light);
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.section-header h2 {
  color: var(--dark);
  font-size: 1.3rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Alert Styles */
.alert {
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  margin: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.alert-info {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1px solid #bae6fd;
  color: #0369a1;
}

/* Button Variants */
.btn-secondary {
  background: var(--gray);
  color: white;
  box-shadow: 0 4px 6px rgba(100, 116, 139, 0.2);
}

.btn-secondary:hover {
  background: #475569;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(100, 116, 139, 0.3);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
}

/* ===== HORIZONTAL SUMMARY LAYOUT STYLES ===== */

/* Live Summary Container - Horizontal Layout */
.live-summary-container {
  display: flex;
  align-items: stretch;
  gap: 1rem;
  min-width: 500px;
  max-width: 800px;
  padding: 1rem;
  height: 120px;
}

/* Time Summary - Horizontal */
.live-time-summary {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  border-radius: var(--radius-sm);
  text-align: center;
  border: 2px solid var(--gray-light);
  padding: 1rem;
  font-weight: 700;
  min-width: 120px;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.live-time-summary small {
  color: var(--dark);
  font-size: 0.75rem;
  font-weight: 600;
  display: block;
  margin-bottom: 0.5rem;
}

.total-minutes.highlight {
  color: var(--success);
  font-size: 1.8rem;
  font-weight: bold;
  line-height: 1;
}

.total-minutes.delay-highlight {
  color: var(--danger);
  font-size: 1.8rem;
  font-weight: bold;
  line-height: 1;
}

/* Comment Display - Horizontal */
.live-comment-display {
  flex: 1;
  min-width: 200px;
  max-width: 300px;
  padding: 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  line-height: 1.4;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: pre-wrap;
  border: 2px solid transparent;
  overflow-y: auto;
  height: 100%;
}

.live-comment-display.with-comments {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-color: #bfdbfe;
  color: #0369a1;
  border-left: 4px solid #0ea5e9;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.1);
}

.live-comment-display.no-comments {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-color: #e2e8f0;
  color: #64748b;
  border-left: 4px solid #94a3b8;
  font-style: italic;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.live-comment-display strong {
  color: #0c4a6e;
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
}

/* Equipment Display - Horizontal */
.equipment-display {
  flex: 1;
  min-width: 180px;
  max-width: 250px;
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 2px solid #dcfce7;
  border-radius: var(--radius-sm);
  padding: 1rem;
  font-size: 0.85rem;
  color: #166534;
  border-left: 4px solid #22c55e;
  word-wrap: break-word;
  overflow-wrap: break-word;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.1);
  overflow-y: auto;
  height: 100%;
}

.equipment-display strong {
  color: #166534;
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
}

/* Auto-save Badge - Horizontal */
.autosave-badge {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  color: #92400e;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid #f59e0b;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(245, 158, 11, 0.2);
  height: fit-content;
  align-self: flex-start;
  margin-top: 0;
  white-space: nowrap;
}

.autosave-badge i {
  color: #d97706;
}

/* Live Summary Cell Adjustments for Horizontal Layout */
.live-summary-cell {
  padding: 0;
  vertical-align: top;
  background: white;
  border-left: 1px solid var(--gray-light);
  min-width: 600px;
  max-width: 900px;
}

/* Content Scroll for Horizontal Layout */
.live-comment-display.with-comments,
.equipment-display {
  max-height: none;
}

.live-comment-display.with-comments::-webkit-scrollbar,
.equipment-display::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.live-comment-display.with-comments::-webkit-scrollbar-track,
.equipment-display::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 3px;
}

.live-comment-display.with-comments::-webkit-scrollbar-thumb,
.equipment-display::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

/* Table Row Hover Effects for Horizontal Summary */
.activity-table tbody tr:hover .live-summary-cell,
.delay-table tbody tr:hover .live-summary-cell {
  background: #f8fafc;
}

.activity-table tbody tr:hover .live-comment-display.with-comments,
.delay-table tbody tr:hover .live-comment-display.with-comments {
  background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
}

.activity-table tbody tr:hover .equipment-display,
.delay-table tbody tr:hover .equipment-display {
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
}

/* Enhanced Status Display in Horizontal Layout */
.summary-status-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 100px;
  flex-shrink: 0;
}

.status-badge-horizontal {
  padding: 0.4rem 0.8rem;
  border-radius: 15px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
  white-space: nowrap;
}

.status-badge-horizontal.in-progress {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
  border: 1px solid #f59e0b;
}

.status-badge-horizontal.completed {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  color: #065f46;
  border: 1px solid #10b981;
}

/* Responsive Adjustments for Horizontal Layout */
@media (max-width: 1200px) {
  .live-summary-cell {
    min-width: 550px;
    max-width: 700px;
  }

  .live-summary-container {
    min-width: 450px;
    max-width: 650px;
  }

  .live-comment-display {
    min-width: 180px;
    max-width: 250px;
  }

  .equipment-display {
    min-width: 150px;
    max-width: 200px;
  }
}

@media (max-width: 992px) {
  .live-summary-cell {
    min-width: 500px;
    max-width: 600px;
  }

  .live-summary-container {
    min-width: 400px;
    max-width: 550px;
    gap: 0.75rem;
    padding: 0.75rem;
  }

  .live-comment-display {
    min-width: 160px;
    max-width: 220px;
    font-size: 0.8rem;
  }

  .equipment-display {
    min-width: 140px;
    max-width: 180px;
    font-size: 0.8rem;
  }

  .live-time-summary {
    min-width: 100px;
    padding: 0.75rem;
  }

  .total-minutes.highlight,
  .total-minutes.delay-highlight {
    font-size: 1.6rem;
  }
}

@media (max-width: 768px) {
  .live-summary-cell {
    min-width: 450px;
    max-width: 100%;
  }

  .live-summary-container {
    min-width: 350px;
    max-width: 100%;
    padding: 0.5rem;
    gap: 0.5rem;
    height: 100px;
  }

  .live-comment-display {
    min-width: 140px;
    max-width: 180px;
    font-size: 0.75rem;
    padding: 0.75rem;
  }

  .equipment-display {
    min-width: 120px;
    max-width: 160px;
    font-size: 0.75rem;
    padding: 0.75rem;
  }

  .live-time-summary {
    min-width: 80px;
    padding: 0.5rem;
  }

  .total-minutes.highlight,
  .total-minutes.delay-highlight {
    font-size: 1.4rem;
  }

  .autosave-badge {
    padding: 0.4rem 0.8rem;
    font-size: 0.7rem;
  }
}

@media (max-width: 576px) {
  .live-summary-cell {
    min-width: 400px;
  }

  .live-summary-container {
    min-width: 300px;
    padding: 0.5rem;
    gap: 0.5rem;
    height: 90px;
  }

  .live-comment-display {
    min-width: 120px;
    max-width: 150px;
    font-size: 0.7rem;
    padding: 0.5rem;
  }

  .equipment-display {
    min-width: 100px;
    max-width: 130px;
    font-size: 0.7rem;
    padding: 0.5rem;
  }

  .live-time-summary {
    min-width: 70px;
    padding: 0.4rem;
  }

  .total-minutes.highlight,
  .total-minutes.delay-highlight {
    font-size: 1.2rem;
  }

  .live-time-summary small {
    font-size: 0.7rem;
  }

  .live-comment-display strong,
  .equipment-display strong {
    font-size: 0.65rem;
  }
}

/* Compact Layout for Multiple Items */
.live-summary-container.compact {
  height: 100px;
  gap: 0.75rem;
}

.live-summary-container.compact .live-time-summary {
  min-width: 90px;
  padding: 0.75rem;
}

.live-summary-container.compact .live-comment-display,
.live-summary-container.compact .equipment-display {
  padding: 0.75rem;
  font-size: 0.8rem;
}

/* Enhanced Visual Hierarchy */
.live-summary-container > * {
  transition: var(--transition);
}

.live-summary-container > *:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Alignment Improvements */
.live-comment-display,
.equipment-display {
  display: flex;
  flex-direction: column;
}

.live-comment-display strong,
.equipment-display strong {
  flex-shrink: 0;
}

.live-comment-display div,
.equipment-display div {
  flex: 1;
  overflow-y: auto;
}

/* Tombol Close */
.btn-close {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: var(--radius);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-close:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
}

/* Status badge untuk closed */
.stat-badge.closed {
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
  color: white;
  border: 1px solid #374151;
}

/* Data source info */
.data-source {
  margin-top: 0.25rem;
  font-size: 0.7rem;
  color: #6b7280;
}

.data-source small {
  background: #f3f4f6;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
}

/* Header controls layout */
.header-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Count badges */
.stat-badge.count {
  background: #3b82f6;
  color: white;
}

/* Close button styles */
.btn-close {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-close:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
}
