@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

/* ============================
   CSS RESET & BASE
   ============================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", sans-serif;
}

/* ============================
   DESIGN TOKENS
   ============================ */
:root {
  /* Colors */
  --color-primary: #0ea5e9;
  --color-primary-dark: #0284c7;
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;
  --color-info: #3b82f6;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;

  /* Shadows - Reduced intensity */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;
}

/* ============================
   SMOOTH TRANSITIONS
   ============================ */
* {
  transition: background-color var(--transition-base),
    color var(--transition-base),
    border-color var(--transition-base);
}

button,
a,
.card-glow {
  transition: all var(--transition-base);
}

/* ============================
   FOCUS STATES (Accessibility)
   ============================ */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-md);
}

/* Screen Reader Only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Skip to main content link */
.skip-to-main {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-primary);
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  border-radius: var(--radius-md);
  z-index: 9999;
}

.skip-to-main:focus {
  top: 8px;
  left: 8px;
}

/* ============================
   CARD ENHANCEMENTS
   ============================ */
.card-glow {
  transition: box-shadow var(--transition-base),
    transform var(--transition-base);
  will-change: transform;
}

.card-glow:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.3);
}

/* Collapsible Widget Styles */
.widget-content {
  max-height: 500px;
  /* Arbitrary large height for transition */
  opacity: 1;
  overflow: hidden;
}

.widget-content.collapsed {
  max-height: 0;
  opacity: 0;
  padding-bottom: 0;
}

.widget-toggle-btn svg.rotated {
  transform: rotate(-180deg);
}

.card-glow:active {
  transform: translateY(-1px);
}

/* ============================
   DRAG & DROP VISUAL FEEDBACK
   ============================ */
.draggable {
  cursor: grab;
  user-select: none;
  position: relative;
}

.draggable:active {
  cursor: grabbing;
}

.draggable.dragging {
  opacity: 0.5;
  cursor: grabbing;
  transform: rotate(2deg) scale(1.02);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  z-index: 1000;
}

.drag-handle {
  cursor: grab;
  opacity: 0.4;
  transition: opacity var(--transition-fast);
}

.drag-handle:hover {
  opacity: 1;
}

.drag-handle:active {
  cursor: grabbing;
}

.drag-over {
  border: 2px dashed var(--color-primary) !important;
  background-color: rgba(14, 165, 233, 0.05);
}

.drop-indicator {
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
  border-radius: 2px;
  margin: 0.5rem 0;
  animation: pulse-indicator 1s ease-in-out infinite;
}

@keyframes pulse-indicator {

  0%,
  100% {
    opacity: 0.5;
  }

  50% {
    opacity: 1;
  }
}

/* ============================
   ACCORDION ANIMATIONS
   ============================ */
.accordion-open>.accordion-body {
  max-height: 2000px;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-toggle {
  position: relative;
  transition: color var(--transition-base);
}

.accordion-toggle::after {
  content: '▼';
  position: absolute;
  right: -1.5rem;
  transition: transform var(--transition-base);
  font-size: 0.75rem;
  opacity: 0.6;
}

.accordion-open .accordion-toggle::after {
  transform: rotate(180deg);
}

/* ============================
   TOAST NOTIFICATIONS
   ============================ */
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  to {
    opacity: 0;
    transform: translateY(8px) scale(0.95);
  }
}

.toast {
  animation: toast-in 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(8px);
}

.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: currentColor;
  opacity: 0.3;
  animation: toast-progress-bar 2.2s linear;
}

@keyframes toast-progress-bar {
  from {
    width: 100%;
  }

  to {
    width: 0%;
  }
}

/* ============================
   PROGRESS BARS
   ============================ */
.progress-bar {
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.3),
      transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

/* ============================
   LOADING STATES
   ============================ */
@keyframes placeholder-glow {

  0%,
  100% {
    background-color: rgba(56, 189, 248, 0.1);
  }

  50% {
    background-color: rgba(56, 189, 248, 0.25);
  }
}

.placeholder-animate {
  animation: placeholder-glow 1.5s ease-in-out infinite;
  border-radius: var(--radius-md);
}

.skeleton {
  background: linear-gradient(90deg,
      rgba(203, 213, 225, 0.3) 25%,
      rgba(226, 232, 240, 0.5) 50%,
      rgba(203, 213, 225, 0.3) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* ============================
   BUTTON ENHANCEMENTS
   ============================ */
button {
  position: relative;
  overflow: hidden;
}

button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

button:active::before {
  width: 300px;
  height: 300px;
}

.btn-loading {
  pointer-events: none;
  opacity: 0.7;
}

.btn-loading .button-text {
  opacity: 0;
}

.btn-loading .button-spinner {
  display: inline-block !important;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

/* ============================
   MODAL ANIMATIONS
   ============================ */
@keyframes modal-fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes modal-slide-up {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

#modal-overlay {
  animation: modal-fade-in 0.2s ease;
}

#modal {
  animation: modal-slide-up 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================
   STATUS BADGES
   ============================ */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-md);
  font-size: 0.75rem;
  font-weight: 600;
}

.status-complete {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-progress {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.status-pending {
  background: rgba(148, 163, 184, 0.1);
  color: #64748b;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

/* ============================
   DARK MODE REFINEMENTS
   ============================ */
.dark .card-glow:hover {
  box-shadow: 0 12px 35px rgba(14, 165, 233, 0.25);
}

.dark .skeleton {
  background: linear-gradient(90deg,
      rgba(51, 65, 85, 0.3) 25%,
      rgba(71, 85, 105, 0.5) 50%,
      rgba(51, 65, 85, 0.3) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
}

.dark .drag-over {
  background-color: rgba(14, 165, 233, 0.1);
}

/* ============================
   MICRO-INTERACTIONS
   ============================ */
@keyframes bounce-in {
  0% {
    transform: scale(0.9);
  }

  50% {
    transform: scale(1.05);
  }

  100% {
    transform: scale(1);
  }
}

.bounce-in {
  animation: bounce-in 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-4px);
  }

  75% {
    transform: translateX(4px);
  }
}

.shake {
  animation: shake 0.3s ease;
}

@keyframes pulse-success {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }
}

.pulse-success {
  animation: pulse-success 0.6s ease;
}

/* ============================
   UTILITY CLASSES
   ============================ */
.gradient-text {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glassmorphism {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.dark .glassmorphism {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ============================
   SCROLLBAR STYLING
   ============================ */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.4);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.6);
}

.dark ::-webkit-scrollbar-thumb {
  background: rgba(71, 85, 105, 0.6);
}

.dark ::-webkit-scrollbar-thumb:hover {
  background: rgba(71, 85, 105, 0.8);
}

/* ============================
   RESPONSIVE TOUCH TARGETS
   ============================ */
@media (max-width: 768px) {

  button,
  a,
  .clickable {
    min-height: 44px;
    min-width: 44px;
  }
}

/* ============================
   FADE-IN ANIMATION
   ============================ */
@keyframes fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

#main-content {
  animation: fade-in 0.5s ease-in-out;
}

/* ============================
   STAGGERED ANIMATIONS
   ============================ */
.bounce-in {
  animation: bounce-in 0.6s cubic-bezier(0.4, 0, 0.2, 1) both;
}

/* ============================
   HEADER BUTTONS RESPONSIVE
   ============================ */

/* Add Section Button - Improved Responsive Design */
.btn-add-section {
  /* Desktop (default) */
  padding: 12px 20px !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  gap: 8px;
  min-height: 44px;
}

.btn-add-section svg {
  /* Icon is hidden on desktop by default (sm:hidden in HTML) */
  width: 18px !important;
  height: 18px !important;
}

.btn-add-section span {
  /* Text is visible on desktop by default (hidden sm:inline in HTML) */
  display: inline !important;
}

/* Settings and Dark Mode Buttons */
.btn-settings,
.btn-dark-mode {
  /* Desktop (default) */
  padding: 12px 14px !important;
  font-size: 20px !important;
  min-height: 44px;
  min-width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
  .btn-add-section {
    padding: 10px 16px !important;
    font-size: 14px !important;
    gap: 6px;
  }

  .btn-add-section svg {
    width: 16px !important;
    height: 16px !important;
  }

  .btn-settings,
  .btn-dark-mode {
    padding: 10px 12px !important;
    font-size: 18px !important;
  }
}

/* Mobile (smaller than 640px) */
@media (max-width: 640px) {
  .btn-add-section {
    padding: 8px 10px !important;
    gap: 0;
    min-width: 40px;
  }

  .btn-add-section svg {
    width: 18px !important;
    height: 18px !important;
    display: block !important;
    /* Show icon on mobile */
  }

  .btn-add-section span {
    display: none !important;
    /* Hide text on mobile */
  }

  .btn-settings,
  .btn-dark-mode {
    padding: 8px 10px !important;
    font-size: 18px !important;
    min-width: 40px;
    min-height: 40px;
  }
}

/* Extra small screens (smaller than 380px) */
@media (max-width: 380px) {
  .btn-add-section {
    padding: 6px 8px !important;
    min-width: 36px;
  }

  .btn-add-section svg {
    width: 16px !important;
    height: 16px !important;
  }

  .btn-settings,
  .btn-dark-mode {
    padding: 6px 8px !important;
    font-size: 16px !important;
    min-width: 36px;
    min-height: 36px;
  }
}

/* Header button container spacing */
@media (max-width: 640px) {
  header .flex.items-center.gap-1\.5 {
    gap: 8px !important;
  }
}

@media (max-width: 380px) {
  header .flex.items-center.gap-1\.5 {
    gap: 6px !important;
  }
}

/* ============================
   GOAL ADJUSTMENT CONTROLS
   ============================ */

/* Goal adjustment button container */
.goal-adjust-controls {
  opacity: 0;
  transition: opacity 0.2s ease;
}

/* Show controls on hover of the goal row */
#widget-today .widget-content>div:hover .goal-adjust-controls,
.goal-adjust-controls:focus-within {
  opacity: 1;
}

/* Individual adjustment buttons */
.goal-adjust-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(4px);
}

.goal-adjust-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.4);
  transform: scale(1.1);
}

.goal-adjust-btn:active {
  transform: scale(0.95);
}

.goal-adjust-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: none;
}

.goal-adjust-btn svg {
  pointer-events: none;
}

/* Pulse animation when goal is updated */
@keyframes goal-update-pulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

.goal-updated {
  animation: goal-update-pulse 0.3s ease;
}

/* Mobile adjustments */
@media (max-width: 640px) {
  .goal-adjust-controls {
    opacity: 1;
    /* Always show on mobile */
  }

  .goal-adjust-btn {
    width: 20px;
    height: 20px;
  }
}

/* ============================
   TREND ANALYSIS STYLES
   ============================ */

/* Trend analysis container */
#trend-analysis {
  animation: fade-in 0.5s ease;
}

/* Trend indicator with color transition */
#trend-indicator {
  transition: all 0.3s ease;
}

/* Trend stat cards */
#trend-analysis .bg-white\/10 {
  transition: all 0.2s ease;
}

#trend-analysis .bg-white\/10:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

/* Trend icon animation */
#trend-icon {
  display: inline-block;
  animation: trend-pulse 2s ease-in-out infinite;
}

@keyframes trend-pulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }
}

/* Responsive adjustments for trend analysis */
@media (max-width: 640px) {
  #trend-analysis {
    font-size: 0.75rem;
  }

  #trend-analysis .grid {
    gap: 0.5rem;
  }
}

/* ============================
   TIME BREAKDOWN SCROLLBAR
   ============================ */

/* Custom scrollbar for time breakdown list */
#time-breakdown-list::-webkit-scrollbar {
  width: 4px;
}

#time-breakdown-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

#time-breakdown-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
}

#time-breakdown-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

/* Custom scrollbar for review preview list */
#review-preview-list::-webkit-scrollbar {
  width: 4px;
}

#review-preview-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

#review-preview-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
}

#review-preview-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

/* Hidden utility */
.hidden {
  display: none !important;
}

/* Mobile Responsive */
@media (max-width: 640px) {
  .quick-add-modal {
    max-width: 100%;
    border-radius: 20px 20px 0 0;
    max-height: 95vh;
  }

  .time-buttons-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .quick-add-header {
    padding: 16px 20px;
  }

  .quick-add-body {
    padding: 16px 20px;
  }
}

/* ============================
   DAILY SUMMARY MODAL
   ============================ */

/* Modal Container */
.daily-summary-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.daily-summary-modal.active {
  opacity: 1;
  pointer-events: all;
}

/* Overlay */
.daily-summary-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  animation: fade-in 0.3s ease;
}

/* Modal Content */
.daily-summary-content {
  position: relative;
  background: white;
  border-radius: 24px;
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  animation: modal-slide-up 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  scrollbar-width: thin;
}

.dark .daily-summary-content {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid rgba(148, 163, 184, 0.1);
}

/* Header */
.daily-summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px 32px 24px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.dark .daily-summary-header {
  border-bottom-color: rgba(71, 85, 105, 0.3);
}

.daily-summary-greeting {
  display: flex;
  align-items: center;
  gap: 12px;
}

.greeting-icon {
  font-size: 32px;
  animation: bounce-in 0.6s ease;
}

.daily-summary-greeting h2 {
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(135deg, #0ea5e9 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.daily-summary-close {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(148, 163, 184, 0.1);
  border: none;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.daily-summary-close:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  transform: rotate(90deg);
}

/* Motivational Message */
.daily-summary-motivation {
  margin: 24px 32px;
  padding: 20px 24px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
  border: 1px solid rgba(14, 165, 233, 0.2);
  animation: bounce-in 0.5s ease 0.1s both;
}

.daily-summary-motivation.success {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.1) 100%);
  border-color: rgba(16, 185, 129, 0.2);
}

.motivation-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.daily-summary-motivation p {
  font-size: 16px;
  font-weight: 600;
  color: #0f172a;
  margin: 0;
}

.dark .daily-summary-motivation p {
  color: #f1f5f9;
}

/* Section */
.daily-summary-section {
  padding: 24px 32px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  animation: fade-in 0.5s ease both;
}

.dark .daily-summary-section {
  border-bottom-color: rgba(71, 85, 105, 0.3);
}

.daily-summary-section:last-of-type {
  border-bottom: none;
}

.daily-summary-section h3 {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 20px;
}

.dark .daily-summary-section h3 {
  color: #f1f5f9;
}

/* Summary Stats */
.summary-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}

.stat-card {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid rgba(148, 163, 184, 0.1);
  transition: all 0.3s ease;
}

.dark .stat-card {
  background: linear-gradient(135deg, rgba(51, 65, 85, 0.5) 0%, rgba(30, 41, 59, 0.5) 100%);
  border-color: rgba(71, 85, 105, 0.3);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.stat-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.stat-content {
  flex: 1;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: #0ea5e9;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Progress Overview */
.progress-overview {
  margin-bottom: 16px;
}

.progress-bar-container {
  width: 100%;
  height: 12px;
  background: rgba(148, 163, 184, 0.1);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 12px;
}

.dark .progress-bar-container {
  background: rgba(51, 65, 85, 0.5);
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #0ea5e9 0%, #3b82f6 100%);
  border-radius: 999px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}

.progress-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.progress-percentage {
  font-size: 24px;
  font-weight: 700;
  color: #0ea5e9;
}

.progress-details {
  font-size: 14px;
  color: #64748b;
  font-weight: 500;
}

/* Progress Breakdown */
.progress-breakdown {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.breakdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #475569;
}

.dark .breakdown-item {
  color: #cbd5e1;
}

.breakdown-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.breakdown-item.completed .breakdown-dot {
  background: #10b981;
}

.breakdown-item.in-progress .breakdown-dot {
  background: #f59e0b;
}

.breakdown-item.not-started .breakdown-dot {
  background: #94a3b8;
}

/* Estimation Card */
.estimation-card {
  margin-top: 20px;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.estimation-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.estimation-content {
  flex: 1;
}

.estimation-text {
  font-size: 14px;
  color: #475569;
  margin: 0 0 4px 0;
}

.dark .estimation-text {
  color: #cbd5e1;
}

.estimation-date {
  font-size: 12px;
  color: #6366f1;
  font-weight: 600;
  margin: 0;
}

/* Recommendations */
.recommendations-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.recommendation-card {
  background: white;
  border-radius: 16px;
  padding: 20px;
  border: 2px solid rgba(148, 163, 184, 0.1);
  transition: all 0.3s ease;
}

.dark .recommendation-card {
  background: rgba(30, 41, 59, 0.5);
  border-color: rgba(71, 85, 105, 0.3);
}

.recommendation-card.high {
  border-color: rgba(239, 68, 68, 0.3);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.05) 0%, rgba(220, 38, 38, 0.05) 100%);
}

.dark .recommendation-card.high {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.1) 100%);
}

.recommendation-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.recommendation-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.recommendation-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.recommendation-title-group {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.recommendation-title-group h4 {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.dark .recommendation-title-group h4 {
  color: #f1f5f9;
}

.priority-badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.priority-badge.high {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.priority-badge.medium {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.priority-badge.low {
  background: rgba(148, 163, 184, 0.1);
  color: #64748b;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.recommendation-description {
  font-size: 14px;
  color: #475569;
  margin: 0 0 12px 0;
  line-height: 1.6;
}

.dark .recommendation-description {
  color: #cbd5e1;
}

.recommendation-videos {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.recommended-video {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(148, 163, 184, 0.05);
  border-radius: 8px;
  font-size: 13px;
}

.dark .recommended-video {
  background: rgba(51, 65, 85, 0.3);
}

.video-bullet {
  color: #0ea5e9;
  font-weight: 700;
}

.video-title {
  flex: 1;
  color: #334155;
  font-weight: 500;
}

.dark .video-title {
  color: #e2e8f0;
}

.video-progress {
  font-size: 12px;
  font-weight: 600;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
  padding: 2px 8px;
  border-radius: 999px;
}

.more-videos {
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
  padding: 4px 12px;
  text-align: center;
}

.no-recommendations {
  text-align: center;
  padding: 40px 20px;
}

.no-rec-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 12px;
}

.no-recommendations p {
  font-size: 16px;
  color: #64748b;
  font-weight: 500;
  margin: 0;
}

/* Footer */
.daily-summary-footer {
  padding: 24px 32px 32px;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.btn-primary,
.btn-secondary {
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(135deg, #0ea5e9 0%, #3b82f6 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(14, 165, 233, 0.4);
}

.btn-secondary {
  background: rgba(148, 163, 184, 0.1);
  color: #475569;
}

.dark .btn-secondary {
  background: rgba(51, 65, 85, 0.5);
  color: #cbd5e1;
}

.btn-secondary:hover {
  background: rgba(148, 163, 184, 0.2);
}

/* Mobile Responsive */
@media (max-width: 640px) {
  .daily-summary-content {
    max-height: 95vh;
    border-radius: 20px 20px 0 0;
  }

  .daily-summary-header {
    padding: 24px 20px 16px;
  }

  .daily-summary-greeting h2 {
    font-size: 24px;
  }

  .greeting-icon {
    font-size: 28px;
  }

  .daily-summary-motivation {
    margin: 16px 20px;
    padding: 16px;
  }

  .motivation-icon {
    font-size: 28px;
  }

  .daily-summary-motivation p {
    font-size: 14px;
  }

  .daily-summary-section {
    padding: 20px;
  }

  .daily-summary-section h3 {
    font-size: 16px;
  }

  .summary-stats {
    grid-template-columns: 1fr;
  }

  .stat-card {
    padding: 16px;
  }

  .stat-icon {
    font-size: 24px;
  }

  .stat-value {
    font-size: 20px;
  }

  .progress-breakdown {
    flex-direction: column;
    gap: 12px;
  }

  .recommendation-title-group {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .daily-summary-footer {
    padding: 20px;
    flex-direction: column-reverse;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    justify-content: center;
  }
}

/* ============================
   ENHANCED MULTI-COURSE BREAKDOWN
   ============================ */

/* Course Breakdown List */
.course-breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Course Breakdown Card */
.course-breakdown-card {
  background: white;
  border-radius: 12px;
  padding: 16px;
  border: 2px solid rgba(148, 163, 184, 0.1);
  transition: all 0.3s ease;
}

.dark .course-breakdown-card {
  background: rgba(30, 41, 59, 0.5);
  border-color: rgba(71, 85, 105, 0.3);
}

.course-breakdown-card.active-course {
  border-color: rgba(14, 165, 233, 0.4);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.05) 0%, rgba(59, 130, 246, 0.05) 100%);
}

.dark .course-breakdown-card.active-course {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
}

.course-breakdown-card.had-activity {
  border-color: rgba(16, 185, 129, 0.3);
}

.course-breakdown-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

/* Course Header */
.course-breakdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.course-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.course-title-group h4 {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dark .course-title-group h4 {
  color: #f1f5f9;
}

.active-badge {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(14, 165, 233, 0.1);
  color: #0ea5e9;
  border: 1px solid rgba(14, 165, 233, 0.2);
  flex-shrink: 0;
}

.course-completion {
  font-size: 18px;
  font-weight: 700;
  color: #0ea5e9;
  flex-shrink: 0;
}

/* Course Progress Bar */
.course-progress-bar-container {
  width: 100%;
  height: 8px;
  background: rgba(148, 163, 184, 0.1);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 12px;
}

.dark .course-progress-bar-container {
  background: rgba(51, 65, 85, 0.5);
}

.course-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #0ea5e9 0%, #3b82f6 100%);
  border-radius: 999px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Course Stats Row */
.course-stats-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.course-stat {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}

.dark .course-stat {
  color: #94a3b8;
}

.course-stat.highlight {
  color: #10b981;
  font-weight: 600;
}

.course-stat.warning {
  color: #f59e0b;
  font-weight: 600;
}

.stat-icon-small {
  font-size: 14px;
}

/* Course Hint */
.course-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #64748b;
  font-style: italic;
}

.dark .course-hint {
  color: #94a3b8;
}

/* Recommended Course Items */
.recommendation-courses {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.recommended-course-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(148, 163, 184, 0.05);
  border-radius: 8px;
  font-size: 13px;
}

.dark .recommended-course-item {
  background: rgba(51, 65, 85, 0.3);
}

.course-bullet {
  color: #0ea5e9;
  font-weight: 700;
}

.course-name {
  flex: 1;
  color: #334155;
  font-weight: 500;
}

.dark .course-name {
  color: #e2e8f0;
}

.course-reviews {
  font-size: 11px;
  font-weight: 600;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
  padding: 2px 8px;
  border-radius: 999px;
}

/* Mobile Responsive for Course Cards */
@media (max-width: 640px) {
  .course-breakdown-card {
    padding: 12px;
  }

  .course-title-group h4 {
    font-size: 14px;
  }

  .course-completion {
    font-size: 16px;
  }

  .course-stats-row {
    gap: 8px;
  }

  .course-stat {
    font-size: 11px;
  }
}

/* ============================
   EXPANDABLE COURSE DETAILS
   ============================ */

/* Course Details Toggle Button */
.course-details-toggle {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.dark .course-details-toggle {
  border-color: rgba(71, 85, 105, 0.3);
}

.course-expand-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 8px 12px;
  background: rgba(14, 165, 233, 0.05);
  border: 1px solid rgba(14, 165, 233, 0.2);
  border-radius: 8px;
  color: #0ea5e9;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dark .course-expand-btn {
  background: rgba(14, 165, 233, 0.1);
  border-color: rgba(14, 165, 233, 0.3);
}

.course-expand-btn:hover {
  background: rgba(14, 165, 233, 0.1);
  transform: translateY(-1px);
}

.dark .course-expand-btn:hover {
  background: rgba(14, 165, 233, 0.15);
}

.expand-icon {
  font-size: 12px;
  transition: transform 0.3s ease;
}

.expand-icon.rotated {
  transform: rotate(180deg);
}

/* Course Details Container */
.course-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.course-details.expanded {
  max-height: 600px;
  margin-top: 12px;
}

/* Detail Sections */
.detail-section {
  margin-bottom: 12px;
  padding: 12px;
  background: rgba(148, 163, 184, 0.03);
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.08);
}

.dark .detail-section {
  background: rgba(51, 65, 85, 0.2);
  border-color: rgba(71, 85, 105, 0.3);
}

.detail-section:last-child {
  margin-bottom: 0;
}

.detail-header {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dark .detail-header {
  color: #94a3b8;
}

/* Detail Video Items */
.detail-video {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  background: white;
  border-radius: 6px;
  margin-bottom: 6px;
  transition: all 0.2s ease;
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.dark .detail-video {
  background: rgba(30, 41, 59, 0.5);
  border-color: rgba(71, 85, 105, 0.3);
}

.detail-video:hover {
  transform: translateX(4px);
  border-color: rgba(14, 165, 233, 0.3);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.detail-video:last-child {
  margin-bottom: 0;
}

.video-icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 2px;
}

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

.video-name {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dark .video-name {
  color: #f1f5f9;
}

.video-section {
  font-size: 11px;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dark .video-section {
  color: #94a3b8;
}

/* Course Actions */
.course-actions {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.dark .course-actions {
  border-color: rgba(71, 85, 105, 0.3);
}

.course-switch-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 14px;
  background: linear-gradient(135deg, #0ea5e9 0%, #3b82f6 100%);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.2);
}

.course-switch-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.35);
}

.course-switch-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(14, 165, 233, 0.25);
}

/* Mobile Responsive */
@media (max-width: 640px) {
  .course-details.expanded {
    max-height: 500px;
  }

  .detail-section {
    padding: 10px;
  }

  .detail-video {
    padding: 6px 8px;
  }

  .video-name {
    font-size: 12px;
  }

  .video-section {
    font-size: 10px;
  }

  .course-switch-btn {
    padding: 9px 12px;
    font-size: 12px;
  }
}