/* Material Design 3 Color Tokens - Calming Green Theme */
:root {
  --md-sys-color-primary: #2E7D32;
  --md-sys-color-on-primary: #FFFFFF;
  --md-sys-color-primary-container: #C8E6C9;
  --md-sys-color-on-primary-container: #1B5E20;

  --md-sys-color-secondary: #558B2F;
  --md-sys-color-on-secondary: #FFFFFF;
  --md-sys-color-secondary-container: #DCEDC8;
  --md-sys-color-on-secondary-container: #33691E;

  --md-sys-color-surface: #F1F8F4;
  --md-sys-color-on-surface: #1A1C1A;
  --md-sys-color-surface-variant: #DFE8E3;
  --md-sys-color-on-surface-variant: #404943;

  --md-sys-color-background: #F8FBF9;
  --md-sys-color-on-background: #1A1C1A;

  --md-sys-color-error: #C62828;
  --md-sys-color-on-error: #FFFFFF;

  --md-sys-color-outline: #70796F;
  --md-sys-color-shadow: #000000;

  /* Elevation - Softer shadows for green theme */
  --md-sys-elevation-level1: 0px 1px 2px 0px rgba(46, 125, 50, 0.2), 0px 1px 3px 1px rgba(46, 125, 50, 0.1);
  --md-sys-elevation-level2: 0px 1px 2px 0px rgba(46, 125, 50, 0.2), 0px 2px 6px 2px rgba(46, 125, 50, 0.12);
  --md-sys-elevation-level3: 0px 4px 8px 3px rgba(46, 125, 50, 0.12), 0px 1px 3px 0px rgba(46, 125, 50, 0.2);

  /* Typography */
  --md-sys-typescale-display-large-font-size: 57px;
  --md-sys-typescale-headline-large-font-size: 32px;
  --md-sys-typescale-title-large-font-size: 22px;
  --md-sys-typescale-body-large-font-size: 16px;
  --md-sys-typescale-label-large-font-size: 14px;
}

/* Dark Theme */
[data-theme="dark"] {
  --md-sys-color-primary: #81C784;
  --md-sys-color-on-primary: #003910;
  --md-sys-color-primary-container: #1B5E20;
  --md-sys-color-on-primary-container: #C8E6C9;

  --md-sys-color-secondary: #A5D6A7;
  --md-sys-color-on-secondary: #1B5E20;
  --md-sys-color-secondary-container: #2E7D32;
  --md-sys-color-on-secondary-container: #DCEDC8;

  --md-sys-color-surface: #1A1C1A;
  --md-sys-color-on-surface: #E1E3E1;
  --md-sys-color-surface-variant: #404943;
  --md-sys-color-on-surface-variant: #BFC9C2;

  --md-sys-color-background: #121412;
  --md-sys-color-on-background: #E1E3E1;

  --md-sys-color-error: #EF5350;
  --md-sys-color-on-error: #5D1414;

  --md-sys-color-outline: #8A938C;
  --md-sys-color-shadow: #000000;

  /* Elevation - Darker shadows for dark theme */
  --md-sys-elevation-level1: 0px 1px 3px 0px rgba(0, 0, 0, 0.4), 0px 1px 2px 0px rgba(0, 0, 0, 0.3);
  --md-sys-elevation-level2: 0px 2px 6px 2px rgba(0, 0, 0, 0.4), 0px 1px 2px 0px rgba(0, 0, 0, 0.3);
  --md-sys-elevation-level3: 0px 4px 8px 3px rgba(0, 0, 0, 0.4), 0px 1px 3px 0px rgba(0, 0, 0, 0.3);
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', sans-serif;
  background-color: var(--md-sys-color-background);
  color: var(--md-sys-color-on-background);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Smooth transitions for theme changes */
*,
*::before,
*::after {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* App Bar */
.app-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--md-sys-color-surface);
  box-shadow: var(--md-sys-elevation-level2);
}

.app-bar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  min-height: 64px;
  max-width: 1200px;
  margin: 0 auto;
}

.app-bar-title {
  font-weight: 500;
  color: var(--md-sys-color-on-surface);
  font-size: clamp(1.1rem, 2.2vw + 0.3rem, 1.6rem);
  flex: 1;
  text-align: center;
}

.menu-button {
  background: none;
  border: none;
  padding: 12px;
  min-width: 48px;
  min-height: 48px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.menu-button:hover {
  background-color: rgba(103, 80, 164, 0.08);
}

.menu-button .material-icons {
  font-size: 32px;
  color: var(--md-sys-color-on-surface);
}

/* Navigation Drawer */
.nav-drawer {
  position: fixed;
  top: 0;
  right: -360px;
  width: 360px;
  height: 100vh;
  background-color: var(--md-sys-color-surface);
  box-shadow: var(--md-sys-elevation-level3);
  transition: right 0.25s ease;
  z-index: 1001;
  padding: 16px;
  overflow-y: auto;
}

.nav-drawer.open {
  right: 0;
}

.nav-drawer-header {
  display: flex;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--md-sys-color-outline);
}

.nav-drawer-header h2 {
  font-size: clamp(1.125rem, 2vw + 0.5rem, 1.375rem);
  font-weight: 500;
  color: var(--md-sys-color-on-surface);
}

.close-button {
  background: none;
  border: none;
  padding: 12px;
  min-width: 48px;
  min-height: 48px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.close-button .material-icons {
  font-size: 28px;
  color: var(--md-sys-color-on-surface);
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 16px 24px;
  min-height: 56px;
  border-radius: 12px;
  cursor: pointer;
  color: var(--md-sys-color-on-surface);
  gap: 16px;
}

.nav-item:hover {
  background-color: rgba(103, 80, 164, 0.08);
}

.nav-item.active {
  background-color: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
}

.nav-item .material-icons {
  font-size: 28px;
  color: var(--md-sys-color-on-surface-variant);
}

.nav-item.active .material-icons {
  color: var(--md-sys-color-on-secondary-container);
}

.nav-item span:last-child {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
}

.nav-divider {
  height: 1px;
  background-color: var(--md-sys-color-outline);
  margin: 8px 0;
  opacity: 0.2;
}

.theme-toggle {
  cursor: pointer;
}

.theme-toggle:hover {
  background-color: var(--md-sys-color-primary-container);
}

/* Overlay */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Main Content */
/* Main Content */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
  min-height: 100vh;
}

.view {
  display: none;
  min-height: 100vh;
}

.view.active {
  display: block;
}

.view-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.view-title {
  font-size: var(--md-sys-typescale-headline-large-font-size);
  font-weight: 400;
  color: var(--md-sys-color-on-background);
}

.app-bar .home-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.3s ease;
  padding: 12px;
  min-width: 48px;
  min-height: 48px;
  border-radius: 50%;
}

.app-bar .home-icon {
  font-size: 24px;
  color: var(--md-sys-color-primary);
  transition: all 0.3s ease;
}

.app-bar .home-icon-link:hover {
  background-color: var(--md-sys-color-surface-variant);
}

.app-bar .home-icon-link:hover .home-icon {
  color: var(--md-sys-color-secondary);
}

.app-bar .home-icon-link:active .home-icon {
  transform: scale(0.9);
}

/* Floating Action Button */
.fab {
  background-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  border: none;
  border-radius: 16px;
  padding: 16px 24px;
  cursor: pointer;
  box-shadow: var(--md-sys-elevation-level3);
  transition: box-shadow 0.2s, background-color 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--md-sys-typescale-label-large-font-size);
  font-weight: 500;
}

.fab:hover {
  box-shadow: 0px 6px 10px 4px rgba(0, 0, 0, 0.15), 0px 2px 3px 0px rgba(0, 0, 0, 0.3);
  background-color: #7965AF;
}

.fab .material-icons {
  font-size: 28px;
}

/* Filter Section */
.filter-section {
  background-color: var(--md-sys-color-surface-container-low);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.filter-row {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 150px;
}

.filter-field label {
  font-size: 14px;
  font-weight: 500;
  color: var(--md-sys-color-on-surface);
}

.filter-input {
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--md-sys-color-outline);
  background-color: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  transition: border-color 0.2s;
}

.filter-input:focus {
  outline: none;
  border-color: var(--md-sys-color-primary);
}

.filter-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  background-color: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
  white-space: nowrap;
}

.filter-button:hover {
  background-color: var(--md-sys-color-secondary-container);
  opacity: 0.9;
}

.filter-button .material-icons {
  font-size: 18px;
}

/* Entries List */
.entries-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 350px), 1fr));
  gap: 16px;
}

/* Card */
.card {
  background-color: var(--md-sys-color-surface);
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--md-sys-elevation-level1);
  transition: box-shadow 0.2s;
}

.card:hover {
  box-shadow: var(--md-sys-elevation-level2);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 16px;
}

.card-title {
  font-size: 18px;
  font-weight: 500;
  color: var(--md-sys-color-on-surface);
}

.card-date {
  font-size: 14px;
  color: var(--md-sys-color-on-surface-variant);
  margin-top: 4px;
}

.card-actions {
  display: flex;
  gap: 8px;
}

.icon-button {
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  border-radius: 50%;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-button:hover {
  background-color: rgba(103, 80, 164, 0.08);
}

.icon-button .material-icons {
  font-size: 20px;
  color: var(--md-sys-color-on-surface-variant);
}

/* Round Clear Button for Stats Filter */
.clear-filter-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--md-sys-color-surface-variant);
  color: var(--md-sys-color-on-surface-variant);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.clear-filter-btn:hover {
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  transform: scale(1.1);
}

.clear-filter-btn:active {
  transform: scale(0.95);
}

.card-content {
  display: grid;
  gap: 8px;
}

.symptom-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--md-sys-color-outline);
}

.symptom-item:last-child {
  border-bottom: none;
}

.symptom-label {
  font-size: 14px;
  color: var(--md-sys-color-on-surface-variant);
}

.symptom-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--md-sys-color-on-surface);
  padding: 4px 12px;
  background-color: var(--md-sys-color-secondary-container);
  border-radius: 8px;
}

.summary-section {
  margin-bottom: 16px;
}

.summary-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--md-sys-color-on-surface-variant);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.summary-text {
  font-size: 14px;
  color: var(--md-sys-color-on-surface);
  line-height: 1.5;
  white-space: pre-wrap;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 24px;
}

.modal.active {
  display: flex;
}

.modal-content {
  background-color: var(--md-sys-color-surface);
  border-radius: 28px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--md-sys-elevation-level3);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-bottom: 1px solid var(--md-sys-color-outline);
}

.modal-header h3 {
  font-size: 24px;
  font-weight: 400;
  color: var(--md-sys-color-on-surface);
}

form {
  padding: 24px;
}

.form-field {
  margin-bottom: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.form-field label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--md-sys-color-on-surface-variant);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.form-field input[type="date"],
.form-field input[type="number"],
.form-field textarea,
.form-field select {
  width: 100%;
  padding: 16px;
  border: 1px solid var(--md-sys-color-outline);
  border-radius: 4px;
  font-size: 16px;
  font-family: 'Roboto', sans-serif;
  background-color: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  transition: border-color 0.2s;
  cursor: pointer;
}

.form-field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='%236750A4' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 24px;
  padding-right: 48px;
}

.form-field input[type="date"]:focus,
.form-field input[type="number"]:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--md-sys-color-primary);
  border-width: 2px;
}

.form-field textarea {
  resize: vertical;
  min-height: 80px;
}

.section-title {
  font-size: 18px;
  font-weight: 500;
  color: var(--md-sys-color-on-surface);
  margin: 24px 0 16px 0;
}

.symptoms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--md-sys-color-outline);
}

/* Buttons */
.btn {
  padding: 10px 24px;
  border: none;
  border-radius: 20px;
  font-size: var(--md-sys-typescale-label-large-font-size);
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s, box-shadow 0.2s;
  font-family: 'Roboto', sans-serif;
}

.btn-primary {
  background-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
}

.btn-primary:hover {
  background-color: #7965AF;
  box-shadow: var(--md-sys-elevation-level1);
}

.btn-secondary {
  background-color: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
}

.btn-secondary:hover {
  background-color: #D0C6E3;
  box-shadow: var(--md-sys-elevation-level1);
}

/* Stats View */
.stats-controls {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 200px;
}

.control-group label {
  font-size: 14px;
  font-weight: 500;
  color: var(--md-sys-color-on-surface-variant);
}

.stats-dropdown {
  padding: 16px;
  padding-right: 48px;
  border: 1px solid var(--md-sys-color-outline);
  border-radius: 4px;
  background-color: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  font-family: 'Roboto', sans-serif;
  font-size: 16px;
  cursor: pointer;
  transition: border-color 0.2s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='%236750A4' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 24px;
}

.stats-dropdown:hover {
  border-color: var(--md-sys-color-primary);
}

.stats-dropdown:focus {
  outline: none;
  border-color: var(--md-sys-color-primary);
  border-width: 2px;
}

.stats-container {
  background-color: var(--md-sys-color-surface);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--md-sys-elevation-level1);
  min-height: 400px;
}

#chartContainer {
  width: 100%;
  height: 500px;
}

.stats-placeholder {
  color: var(--md-sys-color-on-surface-variant);
  font-size: var(--md-sys-typescale-body-large-font-size);
  text-align: center;
  padding: 60px 20px;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--md-sys-color-on-surface-variant);
}

.empty-state .material-icons {
  font-size: 64px;
  color: var(--md-sys-color-outline);
  margin-bottom: 16px;
}

.empty-state p {
  font-size: var(--md-sys-typescale-body-large-font-size);
}

/* ========================================
   Material Design 3 Responsive Breakpoints
   MD3 Standard: 600dp, 840dp (compact/medium/expanded)
   Updated: 2025-10-04 15:10 - Fixed hamburger menu icon
   ======================================== */

/* Desktop: 3 columns (≥1280px) */
@media (min-width: 1280px) {
  .entries-list {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

/* Tablet: 2 columns (841px - 1279px) */
@media (min-width: 841px) and (max-width: 1279px) {
  .entries-list {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* Mobile & Small Devices: 1 column (≤840px) - FORCE */
@media (max-width: 840px) {

  /* Base font size for mobile */
  html {
    font-size: 16px;
  }

  body {
    font-size: 16px;
    line-height: 24px;
  }

  /* App bar - MD3 touch target (48dp min) */
  .app-bar-content {
    padding: 8px 16px;
    min-height: 56px;
  }

  .app-bar-title {
    font-size: 1.25rem;
  }

  .menu-button {
    min-width: 48px;
    min-height: 48px;
    padding: 8px;
  }

  .menu-button .material-icons {
    font-size: 32px;
  }

  /* Main content */
  .main-content {
    padding: 12px;
  }

  /* Force 1 column layout on mobile */
  .entries-list {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  .symptoms-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  /* Navigation drawer - responsive width */
  .nav-drawer {
    width: min(85vw, 320px);
    right: calc(-1 * min(85vw, 320px));
  }

  .nav-item {
    padding: 14px 20px;
    min-height: 48px;
  }

  /* Modal full-screen on mobile */
  .modal-content {
    max-width: 100%;
    border-radius: 28px 28px 0 0;
    margin-top: auto;
    max-height: 90vh;
  }

  /* Cards */
  .card {
    padding: 12px;
  }

  /* View title */
  .view-title {
    font-size: 1.5rem;
  }
}

/* Loading State */
.loading {
  text-align: center;
  padding: 24px;
  color: var(--md-sys-color-on-surface-variant);
}

/* Snackbar for notifications */
.snackbar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background-color: var(--md-sys-color-on-surface);
  color: var(--md-sys-color-surface);
  padding: 14px 16px;
  border-radius: 4px;
  box-shadow: var(--md-sys-elevation-level3);
  z-index: 3000;
  transition: transform 0.3s;
  display: flex;
  align-items: center;
  gap: 12px;
}

.snackbar.show {
  transform: translateX(-50%) translateY(0);
}

/* Settings View */
.settings-section {
  background: var(--md-sys-color-surface);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: var(--md-sys-elevation-level1);
}

.settings-section h3 {
  font-size: 18px;
  font-weight: 500;
  color: var(--md-sys-color-primary);
  margin-bottom: 16px;
}

/* Setting Item */
.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
}

.setting-info {
  flex: 1;
}

.setting-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--md-sys-color-on-surface);
  margin-bottom: 4px;
}

.setting-description {
  font-size: 14px;
  color: var(--md-sys-color-on-surface-variant);
}

/* Toggle Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 32px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--md-sys-color-surface-variant);
  transition: 0.3s;
  border-radius: 16px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 24px;
  width: 24px;
  left: 4px;
  bottom: 4px;
  background-color: var(--md-sys-color-on-surface-variant);
  transition: 0.3s;
  border-radius: 50%;
}

input:checked+.slider {
  background-color: var(--md-sys-color-primary);
}

input:checked+.slider:before {
  background-color: var(--md-sys-color-on-primary);
  transform: translateX(20px);
}

/* Disabled switch */
.switch input:disabled+.slider {
  opacity: 0.5;
  cursor: not-allowed;
}

.switch input:disabled:checked+.slider {
  background-color: var(--md-sys-color-primary);
  opacity: 0.6;
}

/* Sync Status Card */
.sync-status-card,
.data-info-card {
  background: var(--md-sys-color-surface-variant);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.sync-status-row,
.data-info-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--md-sys-color-outline);
}

.sync-status-row:last-child,
.data-info-row:last-child {
  border-bottom: none;
}

.sync-label,
.data-label {
  font-weight: 500;
  color: var(--md-sys-color-on-surface);
}

.sync-value,
.data-value {
  color: var(--md-sys-color-on-surface-variant);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Status Indicator */
.status-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.status-indicator.online {
  background-color: #4CAF50;
}

.status-indicator.offline {
  background-color: #FF9800;
}

.status-indicator.syncing {
  background-color: #2196F3;
  animation: pulse 1.5s ease-in-out infinite;
}

.status-indicator.error {
  background-color: #F44336;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

/* Buttons */
.button-primary,
.button-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
}

.button-primary {
  background-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
}

.button-primary:hover {
  background-color: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
}

.button-secondary {
  background-color: var(--md-sys-color-surface-variant);
  color: var(--md-sys-color-on-surface-variant);
}

.button-secondary:hover {
  background-color: var(--md-sys-color-outline);
  color: var(--md-sys-color-surface);
}

.button-danger {
  background-color: var(--md-sys-color-error);
  color: var(--md-sys-color-on-error);
}

.button-danger:hover:not(:disabled) {
  background-color: #D32F2F;
  box-shadow: var(--md-sys-elevation-level1);
}

.button-primary:disabled,
.button-secondary:disabled,
.button-danger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background-color: var(--md-sys-color-surface-variant);
  color: var(--md-sys-color-on-surface-variant);
}

.button-primary .material-icons,
.button-secondary .material-icons,
.button-danger .material-icons {
  font-size: 20px;
}

.button-primary.syncing .material-icons {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* About Info */
.about-info {
  color: var(--md-sys-color-on-surface-variant);
  line-height: 1.6;
}

.about-info p {
  margin: 8px 0;
}

.about-info strong {
  color: var(--md-sys-color-on-surface);
}

/* ========== Links View Styles ========== */

.links-category {
  margin-bottom: 3rem;
}

.links-category-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1.5rem;
  padding: 16px;
  background: var(--md-sys-color-surface-container-highest);
  border-radius: 12px;
  box-shadow: var(--md-sys-elevation-level2);
  transition: all 0.2s ease;
}

.links-category-icon {
  font-size: 32px;
  padding: 10px;
  border-radius: 12px;
  transition: all 0.2s ease;
}

.links-category-title {
  flex: 1;
}

.links-category-title h3 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--md-sys-color-on-surface);
}

.links-category-title p {
  margin: 4px 0 0 0;
  font-size: 0.875rem;
  color: var(--md-sys-color-on-surface-variant);
}

.category-description-link {
  color: var(--md-sys-color-primary);
  text-decoration: underline;
  transition: all 0.2s ease;
  font-weight: 500;
}

.category-description-link:hover {
  color: var(--md-sys-color-secondary);
  text-decoration: none;
}

.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
  max-width: 100%;
}

/* Desktop: Max 3 Spalten */
@media (min-width: 1200px) {
  .links-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Tablet: 2 Spalten */
@media (min-width: 769px) and (max-width: 1199px) {
  .links-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile: 1 Spalte */
@media (max-width: 768px) {
  .links-grid {
    grid-template-columns: 1fr;
  }
}

.link-card {

  background-color: var(--md-sys-color-surface);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  box-shadow: var(--md-sys-elevation-level1);
  transition: box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

.link-card:hover {
  box-shadow: var(--md-sys-elevation-level2);
}

.link-card.inactive {
  opacity: 0.6;
  cursor: not-allowed;
}

.link-card.inactive:hover {
  box-shadow: var(--md-sys-elevation-level1);
}

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

.link-card-icon {
  font-size: 32px;
  color: var(--md-sys-color-primary);
  flex-shrink: 0;
}

.link-card-info {
  min-height: 60px;
  flex: 1;
  min-width: 0;
}

.link-card-title {
  font-size: 18px;
  font-weight: 500;
  color: var(--md-sys-color-on-surface);
  margin: 0 0 4px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.link-card-description {
  font-size: 14px;
  color: var(--md-sys-color-on-surface-variant);
  line-height: 1.4;
  margin: 0;
}

.link-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.link-badges-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.link-badges-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
}


h2 {
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1) !important;
}

.link-badge {

  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  /* Thin subtle border */

}

.link-badge.native {
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
}

.link-badge.external {
  background: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
}

.link-badge.interactive {
  background: var(--md-sys-color-tertiary-container, var(--md-sys-color-secondary-container));
  color: var(--md-sys-color-on-tertiary-container, var(--md-sys-color-on-secondary-container));
}

.link-badge.pilot {
  background: var(--md-sys-color-tertiary-container);
  color: var(--md-sys-color-on-tertiary-container);
}

.link-badge.demo {
  background: var(--md-sys-color-error-container);
  color: var(--md-sys-color-on-error-container);
}

.link-badge.coming-soon {
  background: var(--md-sys-color-surface-variant);
  color: var(--md-sys-color-on-surface-variant);
}

.link-external-icon {
  font-size: 18px;
  color: var(--md-sys-color-on-surface-variant);
  margin-left: auto;
}

/* Category Color Accents - Dynamic based on selected theme */
.links-category-header {
  background: color-mix(in srgb, var(--md-sys-color-primary) 15%, transparent) !important;
  border: 2px solid color-mix(in srgb, var(--md-sys-color-primary) 30%, transparent) !important;
}

.links-category-icon {
  background: color-mix(in srgb, var(--md-sys-color-primary) 25%, transparent) !important;
  color: var(--md-sys-color-primary) !important;
}

/* Settings Container - Required for About View */
.settings-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}