:root {
  --primary-color: #0d6efd;
  --bg-color: #f8f9fa;
}

body {
  background-color: var(--bg-color);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #333;
  -webkit-tap-highlight-color: transparent;
}

/* Màn hình đăng nhập */
.login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(135deg, #0d6efd, #0043a8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 16px;
}

.login-card {
  width: 100%;
  max-width: 400px;
  border-radius: 16px;
}

.login-icon-wrap {
  width: 60px;
  height: 60px;
  background: #e7f1ff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

/* Header */
.sticky-header-container {
  position: sticky;
  top: 0;
  z-index: 1020;
  box-shadow: 0 4px 6px rgba(0,0,0,0.08);
}

.app-header {
  background: linear-gradient(135deg, #0d6efd, #0043a8);
  color: white;
  padding: 10px 16px;
}

.current-time-bar {
  background-color: #e9ecef;
  color: #495057;
  font-size: 0.85rem;
  padding: 4px 16px;
  font-weight: 600;
  border-bottom: 1px solid #dee2e6;
}

.cnms-banner {
  background: linear-gradient(135deg, #ff416c, #ff4b2b);
  color: white;
  padding: 8px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  text-align: center;
  animation: blink-animation 2s infinite;
}

@keyframes blink-animation {
  0% { opacity: 1; }
  50% { opacity: 0.85; }
  100% { opacity: 1; }
}

.nav-tabs-scroll {
  display: flex;
  overflow-x: auto;
  white-space: nowrap;
  padding: 8px 16px;
  background: white;
  gap: 8px;
  scrollbar-width: none;
}

.nav-tabs-scroll::-webkit-scrollbar {
  display: none;
}

.pill-btn {
  border-radius: 50px;
  padding: 6px 14px;
  font-weight: 600;
  font-size: 0.85rem;
  border: 1px solid #dee2e6;
  background-color: #f8f9fa;
  color: #495057;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.pill-btn.active {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  box-shadow: 0 2px 4px rgba(13, 110, 253, 0.3);
}

.period-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #0d6efd;
  background: #e7f1ff;
  padding: 8px 12px;
  border-radius: 8px;
  margin: 15px 0 10px 0;
  display: flex;
  align-items: center;
}

.card-item {
  border: none;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  background: white;
  border-left: 4px solid #6c757d;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #212529;
}

.summary-badge {
  background-color: #e7f1ff;
  color: #0d6efd;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 5px 10px;
  border-radius: 8px;
  display: inline-block;
  margin-bottom: 6px;
  word-break: break-word;
}

.time-badge {
  font-size: 0.75rem;
  background-color: #f1f3f5;
  color: #495057;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 500;
}

.loading-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 40vh;
}