/* Unified Modern CSS for All Views */
:root {
  /* Color palette - Different from reference */
  --primary-color: #99a7db;
  --secondary-color: #a229b3;
  --accent-color: #4895ef;
  --success-color: #4ecdc4;
  --warning-color: #ffeaa7;
  --danger-color: #fd79a8;
  --dark-color: #2d3436;
  --light-color: #f8f9fa;
  --text-color: #1a202c;
  --text-light: rgba(0, 0, 0, 0.7);

  /* Spacing and sizes */
  --border-radius: 12px;
  --box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* Fonts */
  --font-primary: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-heading: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* Base styles */
body {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  font-family: var(--font-primary);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  color: var(--text-color);
  line-height: 1.6;
}

/* App container */
.app-container {
  display: flex;
  height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Sidebar styles */
.sidebar {
  width: clamp(40px, 20%, 280px);
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 25px 0;
  flex-shrink: 0;
  height: 100vh;
  overflow-y: auto;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  transition:
    transform var(--transition),
    width var(--transition);
}

.logo-container {
  padding: 0 25px 25px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  text-align: center;
}

.nav-menu {
  display: flex;
  flex-direction: column;
  padding: 15px 0;
}

@media (max-width: 768px) {
  .nav-menu {
    padding: 10px 0;
  }

  .nav-item {
    padding: 10px 15px !important;
    font-size: 0.9rem;
  }

  .nav-item i {
    font-size: 16px;
    margin-right: 10px;
  }
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 14px 25px;
  color: var(--text-color);
  text-decoration: none;
  transition:
    background-color var(--transition),
    color var(--transition);
  margin: 2px 10px;
  border-radius: var(--border-radius);
}

.nav-item i {
  margin-right: 14px;
  font-size: 18px;
  width: 24px;
  text-align: center;
}

.nav-item.active {
  background-color: var(--primary-color);
  color: white;
}

.nav-item:hover:not(.active) {
  background-color: rgba(0, 0, 0, 0.03);
}

/* Main content styles */
.main-content {
  flex-grow: 1;
  margin-left: clamp(80px, 20%, 280px);
  padding: 25px 35px;
  overflow-y: auto;
  width: calc(100% - clamp(80px, 20%, 280px));
  display: block;
  position: relative;
}

.main-content-full {
  flex-grow: 1;
  margin-left: 0;
  padding: 25px 35px;
  overflow-y: auto;
  width: 100%;
  display: block;
  position: relative;
}

/* Container */
.container {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 2rem;
  margin-top: 100px;
  width: 80%;
  max-width: 2000px;
  margin-left: auto;
  margin-right: auto;
}

/* Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--text-color);
  margin-top: 0;
}

h2 {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
  text-align: center;
}

/* Cards */
.card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius);
  padding: 2rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  transition: var(--transition);
  box-shadow: var(--box-shadow);
  margin-bottom: 2rem;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.card-header {
  background: rgba(0, 0, 0, 0.05);
  padding: 1.5rem 2rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.card-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Buttons */
.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(67, 97, 238, 0.3);
}

.btn-secondary {
  background: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background: #5a6268;
  transform: translateY(-2px);
}

.btn-success {
  background: var(--success-color);
  color: white;
}

.btn-warning {
  background: var(--warning-color);
  color: var(--dark-color);
}

.btn-danger {
  background: var(--danger-color);
  color: white;
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-color);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input {
  width: 100%;
  padding: 1rem;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 1rem;
  transition: var(--transition);
  background: #f8f9fa;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-color);
  background: white;
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

/* Tables */
.modern-table {
  background: transparent;
  color: var(--text-color);
  width: 100%;
  border-collapse: collapse;
}

.modern-table th {
  background: rgba(0, 0, 0, 0.05);
  border: none;
  padding: 1rem 1.5rem;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 1px;
}

.modern-table td {
  border: none;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  vertical-align: middle;
}

.modern-table tbody tr:hover {
  background: rgba(0, 0, 0, 0.02);
}

/* Status badges */
.status-badge {
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-started {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-watching {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.status-stopped {
  background: rgba(107, 114, 128, 0.2);
  color: #6b7280;
  border: 1px solid rgba(107, 114, 128, 0.3);
}

/* Progress bars */
.progress-bar {
  height: 4px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 0.5rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* Dashboard widgets - Mobile optimized */
.dashboard-content {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 25px;
}

@media (max-width: 768px) {
  .dashboard-content {
    grid-template-columns: 1fr !important;
    gap: 15px;
  }

  .widget {
    min-height: auto !important;
    padding: 15px !important;
  }

  .widget-title {
    font-size: 1.2rem !important;
  }

  .widget-content {
    padding: 10px !important;
  }
}

.widget {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius);
  padding: 2rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  transition: var(--transition);
  box-shadow: var(--box-shadow);
}

.widget:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Calendar styles */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
}

.calendar-header {
  text-align: center;
  font-weight: 500;
  font-size: 14px;
  color: var(--text-light);
  padding: 8px 0;
}

.calendar-day {
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  transition:
    background-color var(--transition),
    color var(--transition);
}

.calendar-day.current {
  background-color: var(--primary-color);
  color: white;
}

/* Weather widget */
.weather-widget {
  text-align: center;
  padding: 20px;
}

.temperature {
  font-size: clamp(36px, 8vw, 48px);
  font-weight: 600;
  margin: 15px 0;
  line-height: 1.2;
}

.weather-icon {
  font-size: clamp(30px, 6vw, 42px);
  margin: 15px 0;
}

/* Responsive design */
@media (max-width: 768px) {

  /* Responsive width adjustments */
  html,
  body {
    width: 100% !important;
    overflow-x: hidden !important;
    -webkit-text-size-adjust: 100%;
    /* Prevent font boosting on mobile */
    touch-action: pan-y;
    /* Prevent horizontal scroll gestures */
  }

  /* Ensure dashboard widgets are visible */
  .widget {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    height: auto !important;
  }

  .container {
    width: 100% !important;
    max-width: 100% !important;
    padding: 1rem;
    margin: 0 auto;
  }

  /* Responsive typography */
  h1 {
    font-size: 1.8rem !important;
  }

  h2 {
    font-size: 1.6rem !important;
  }

  h3 {
    font-size: 1.4rem !important;
  }

  h4 {
    font-size: 1.2rem !important;
  }

  h5 {
    font-size: 1.1rem !important;
  }

  h6 {
    font-size: 1rem !important;
  }

  p,
  li,
  td,
  .btn,
  .form-input {
    font-size: 1rem !important;
  }

  /* Ensure text wrapping */
  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  p,
  li,
  td,
  th {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }

  .card,
  .widget {
    padding: 1rem;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    margin-left: 0;
    margin-right: 0;
  }

  .modern-table {
    width: 100% !important;
    display: block;
    overflow-x: auto;
  }

  .modern-table th,
  .modern-table td {
    padding: 0.75rem;
    min-width: 120px;
    /* Prevent columns from collapsing */
  }

  /* Mobile sidebar styles - FIXED VERSION */
  .sidebar {
    width: 85%;
    max-width: 320px;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    box-shadow: none;
    height: 100vh;
    top: 0;
    left: 0;
  }

  /* Show sidebar when body has sidebar-open class */
  body.sidebar-open .sidebar {
    transform: translateX(0);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.3);
  }

  /* Backdrop overlay */
  body.sidebar-open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: block;
    opacity: 1;
  }

  /* Adjust main content for mobile */
  .main-content {
    margin-left: 0;
    width: 100%;
    max-width: 100vw;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-x: hidden;
    box-sizing: border-box;
  }

  /* Mobile toggle button - VISIBLE BY DEFAULT */
  .mobile-toggle-btn {
    display: block !important;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 998;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 8px;
    width: 48px;
    height: 48px;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }

  .mobile-toggle-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
  }

  /* Hide toggle button when sidebar is open */
  body.sidebar-open .mobile-toggle-btn {
    opacity: 0;
    pointer-events: none;
  }

  /* Close button inside sidebar */
  .sidebar-close-btn {
    display: block;
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: var(--text-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    z-index: 1001;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    text-align: center;
    line-height: 40px;
  }

  .sidebar-close-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.05);
  }

  /* Improved touch handling */
  .sidebar {
    -webkit-overflow-scrolling: touch;
  }

  /* Prevent content scrolling when sidebar is open */
  body.sidebar-open {
    overflow: hidden;
  }

  /* Ensure all elements fit within viewport */
  * {
    max-width: 100vw;
    box-sizing: border-box;
  }

  /* Responsive form elements */
  input,
  select,
  textarea,
  button {
    max-width: 100% !important;
  }
}

/* Tablet styles */
@media (min-width: 769px) and (max-width: 1024px) {
  .sidebar {
    width: 240px;
  }

  .main-content {
    margin-left: 240px;
    width: calc(100% - 240px);
  }

  .container {
    width: 90%;
  }
}

/* Hide mobile toggle on desktop */
@media (min-width: 769px) {

  .mobile-toggle-btn,
  .sidebar-close-btn {
    display: none !important;
  }
}

/* Custom greeting message style */
.greeting-message {
  font-size: var(--greeting-font-size, 24px);
  color: var(--greeting-color, #3b82f6);
  margin-bottom: 10px;
}

/* Custom date display style */
.date-display {
  font-size: var(--date-font-size, 18px);
  color: var(--date-color, #10b981);
  font-weight: bold;
}

.greeting {
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  padding: 15px;
  border-radius: var(--border-radius);
  margin-bottom: 15px;
  color: white;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.header-date {
  font-size: 1.2rem;
  font-weight: bold;
  margin-top: 5px;
}

/* Animation keyframes */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

/* Additional Mobile Enhancements */

/* Improved mobile table scrolling */
@media (max-width: 768px) {
  .table-responsive {
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
  }

  .table-responsive .modern-table {
    margin-bottom: 0;
    min-width: 600px;
    /* Ensure horizontal scroll when needed */
  }

  /* Mobile-friendly form layouts */
  .row.g-2 .col-md-3,
  .row.g-2 .col-md-6 {
    margin-bottom: 1rem;
  }

  /* Better mobile modals */
  .modal-dialog {
    margin: 1rem;
    max-width: calc(100vw - 2rem);
  }

  .modal-content {
    border-radius: 12px;
  }

  /* Improved mobile alerts */
  .alert {
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
  }

  /* Mobile-friendly navigation tabs */
  .nav-tabs {
    border-bottom: 2px solid #dee2e6;
    margin-bottom: 1rem;
  }

  .nav-tabs .nav-link {
    padding: 0.75rem 1rem;
    border-radius: 8px 8px 0 0;
    font-size: 0.9rem;
    font-weight: 500;
  }

  .nav-tabs .nav-link.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
  }

  /* Better mobile chart container */
  .chart-container {
    position: relative;
    height: 300px !important;
    margin: 1rem 0;
  }

  /* Mobile-friendly progress indicators */
  .progress-bar {
    height: 6px;
    border-radius: 3px;
  }

  /* Improved mobile status badges */
  .status-badge {
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
    display: inline-block;
    margin: 0.1rem;
  }

  /* Mobile touch improvements for interactive elements */
  .nav-item,
  .btn,
  .form-control,
  .dropdown-toggle {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  /* Prevent text selection on interactive elements */
  .btn,
  .nav-item,
  .mobile-toggle-btn,
  .hide-sidebar-btn {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
  }

  /* Ensure proper spacing for mobile forms */
  .form-group {
    margin-bottom: 1.25rem;
  }

  .form-label {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
  }

  /* Mobile-friendly file input */
  .form-control[type="file"] {
    padding: 0.5rem;
    border: 2px dashed #dee2e6;
    background-color: #f8f9fa;
  }

  .form-control[type="file"]:focus {
    border-color: var(--primary-color);
    background-color: white;
  }

  /* Better mobile dropdown menus */
  .dropdown-menu {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: none;
    padding: 0.5rem 0;
  }

  .dropdown-item {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }

  .dropdown-item:hover,
  .dropdown-item:focus {
    background-color: var(--primary-color);
    color: white;
  }
}

/* Tasks View Styles */
.task-card {
  margin-bottom: 15px;
  border-left: 4px solid;
}

.priority-high {
  border-left-color: #dc3545;
}

.priority-medium {
  border-left-color: #ffc107;
}

.priority-low {
  border-left-color: #0dcaf0;
}

.priority-none {
  border-left-color: #6c757d;
}

.task-title {
  font-weight: 600;
}

.task-actions {
  display: flex;
  gap: 6px;
}

.priority-badge {
  font-size: 0.8rem;
  padding: 4px 8px;
  border-radius: 12px;
}

.task-description {
  display: none !important;
}

@media (max-width: 768px) {
  .table-responsive {
    display: none;
  }

  .mobile-tasks {
    display: block;
  }
}

@media (min-width: 769px) {
  .mobile-tasks {
    display: none;
  }
}

/* High DPI display optimizations */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {

  .mobile-toggle-btn,
  .hide-sidebar-btn {
    border-width: 0.5px;
  }
}

/* Landscape mobile optimizations */
@media (max-width: 768px) and (orientation: landscape) {
  .sidebar {
    width: 70%;
    max-width: 280px;
  }

  .mobile-toggle-btn {
    top: 10px;
    left: 10px;
    width: 44px;
    height: 44px;
  }

  .hide-sidebar-btn {
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
  }

  .main-content {
    padding: 15px 25px;
  }
}

/* Dark mode support for mobile elements */
@media (prefers-color-scheme: dark) {
  @media (max-width: 768px) {
    .mobile-toggle-btn {
      background: rgba(0, 0, 0, 0.8);
      color: white;
      border-color: rgba(255, 255, 255, 0.3);
    }

    .hide-sidebar-btn {
      background: rgba(0, 0, 0, 0.8);
      color: white;
    }

    body.sidebar-open::before {
      background: rgba(0, 0, 0, 0.7);
    }
  }
}

/* Intervals Dashboard Mobile Specific Styles */
@media (max-width: 768px) {

  /* Dashboard header adjustments */
  .intervals-dashboard-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .intervals-dashboard-header h1 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }

  .intervals-dashboard-header .btn-group {
    align-self: stretch;
  }

  /* Tab navigation for mobile */
  .nav-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav-tabs .nav-item {
    flex-shrink: 0;
  }

  .nav-tabs .nav-link {
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
    white-space: nowrap;
  }

  /* Metrics cards mobile optimization */
  .intervals-metric-card {
    margin-bottom: 1rem;
  }

  .intervals-metric-card .display-6 {
    font-size: 2rem;
  }

  .intervals-metric-card .card-title {
    font-size: 0.9rem;
  }

  .intervals-metric-card .card-text {
    font-size: 0.8rem;
  }

  /* Chart containers */
  .intervals-chart-container {
    height: 250px;
    margin: 1rem 0;
  }

  /* Activities table mobile optimization */
  .intervals-activities-table {
    font-size: 0.8rem;
  }

  .intervals-activities-table th,
  .intervals-activities-table td {
    padding: 0.5rem;
  }

  .intervals-activities-table .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
  }

  /* Plan section mobile styles */
  .intervals-plan-table {
    font-size: 0.8rem;
    min-width: 100%;
  }

  .intervals-plan-table th,
  .intervals-plan-table td {
    padding: 0.5rem;
    white-space: nowrap;
  }

  /* Ensure plan container is visible and scrollable on mobile */
  #planContainer {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -1rem;
    padding: 0 1rem;
  }

  #planContainer .table-responsive {
    min-width: 600px;
    /* Ensure table has minimum width for horizontal scrolling */
  }

  /* Mobile optimization for plan sessions */
  .intervals-session-item {
    font-size: 0.9rem;
    line-height: 1.4;
  }

  .intervals-session-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
  }

  /* Plan meta information mobile styles */
  #planMeta {
    font-size: 0.8rem;
    line-height: 1.3;
  }

  /* Ensure plan tab content is visible on mobile */
  #plan.tab-pane {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  /* Force plan container to be visible and properly sized */
  #planContainer {
    display: block !important;
    width: 100%;
    min-height: 200px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Ensure plan table is visible and responsive */
  #planContainer .table {
    width: 100%;
    min-width: 500px;
    /* Minimum width for horizontal scrolling */
  }

  /* Mobile-specific plan table styles */
  #planContainer .table th,
  #planContainer .table td {
    padding: 0.5rem;
    font-size: 0.8rem;
  }

  /* Make sure plan error alert is visible if needed */
  #planError {
    display: block !important;
  }

  /* Additional mobile plan styles */
  .intervals-plan-day {
    border-bottom: 1px solid #dee2e6;
    padding: 0.5rem 0;
  }

  .intervals-plan-session {
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 4px;
  }

  /* Filter dropdown mobile optimization */
  .intervals-filter-select {
    font-size: 0.9rem;
    padding: 0.5rem;
  }

  /* Pagination controls mobile styles */
  .intervals-pagination .btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
  }
}

/* Tablet styles for Intervals Dashboard */
@media (min-width: 769px) and (max-width: 1024px) {
  .intervals-metric-card .display-6 {
    font-size: 2.5rem;
  }

  .intervals-chart-container {
    height: 300px;
  }
}