/* Material Design 3 Variables - Light Theme */
:root {
  /* Primary Colors */
  --md-sys-color-primary: #6750a4;
  --md-sys-color-on-primary: #ffffff;
  --md-sys-color-primary-container: #eaddff;
  --md-sys-color-on-primary-container: #21005d;
  
  /* Secondary Colors */
  --md-sys-color-secondary: #625b71;
  --md-sys-color-on-secondary: #ffffff;
  --md-sys-color-secondary-container: #e8def8;
  --md-sys-color-on-secondary-container: #1d192b;
  
  /* Tertiary Colors */
  --md-sys-color-tertiary: #7d5260;
  --md-sys-color-on-tertiary: #ffffff;
  --md-sys-color-tertiary-container: #ffd8e4;
  --md-sys-color-on-tertiary-container: #31111d;
  
  /* Surface Colors */
  --md-sys-color-surface: #fffbfe;
  --md-sys-color-on-surface: #1c1b1f;
  --md-sys-color-surface-variant: #e7e0ec;
  --md-sys-color-on-surface-variant: #49454f;
  --md-sys-color-surface-container: #f3edf7;
  --md-sys-color-surface-container-high: #ece6f0;
  --md-sys-color-surface-container-highest: #e6e0e9;
  
  /* Outline Colors */
  --md-sys-color-outline: #79747e;
  --md-sys-color-outline-variant: #cac4d0;
  
  /* Error Colors */
  --md-sys-color-error: #ba1a1a;
  --md-sys-color-on-error: #ffffff;
  --md-sys-color-error-container: #ffdad6;
  --md-sys-color-on-error-container: #410002;
  
  /* Success Colors */
  --md-sys-color-success: #006e1c;
  --md-sys-color-on-success: #ffffff;
  --md-sys-color-success-container: #9ef68e;
  --md-sys-color-on-success-container: #002204;
  
  /* Warning Colors */
  --md-sys-color-warning: #8c5000;
  --md-sys-color-on-warning: #ffffff;
  --md-sys-color-warning-container: #ffdcc0;
  --md-sys-color-on-warning-container: #2d1600;
  
  /* Typography */
  --md-sys-typescale-display-large-font: 'Roboto';
  --md-sys-typescale-display-large-size: 57px;
  --md-sys-typescale-display-large-weight: 400;
  
  --md-sys-typescale-headline-large-font: 'Roboto';
  --md-sys-typescale-headline-large-size: 32px;
  --md-sys-typescale-headline-large-weight: 400;
  
  --md-sys-typescale-title-large-font: 'Roboto';
  --md-sys-typescale-title-large-size: 22px;
  --md-sys-typescale-title-large-weight: 400;
  
  --md-sys-typescale-body-large-font: 'Roboto';
  --md-sys-typescale-body-large-size: 16px;
  --md-sys-typescale-body-large-weight: 400;
  
  --md-sys-typescale-label-large-font: 'Roboto';
  --md-sys-typescale-label-large-size: 14px;
  --md-sys-typescale-label-large-weight: 500;
}

/* Dark Theme */
[data-theme="dark"] {
  /* Primary Colors */
  --md-sys-color-primary: #d0bcff;
  --md-sys-color-on-primary: #381e72;
  --md-sys-color-primary-container: #4f378b;
  --md-sys-color-on-primary-container: #eaddff;
  
  /* Secondary Colors */
  --md-sys-color-secondary: #ccc2dc;
  --md-sys-color-on-secondary: #332d41;
  --md-sys-color-secondary-container: #4a4458;
  --md-sys-color-on-secondary-container: #e8def8;
  
  /* Tertiary Colors */
  --md-sys-color-tertiary: #efb8c8;
  --md-sys-color-on-tertiary: #492532;
  --md-sys-color-tertiary-container: #633b48;
  --md-sys-color-on-tertiary-container: #ffd8e4;
  
  /* Surface Colors */
  --md-sys-color-surface: #10090d;
  --md-sys-color-on-surface: #e6e1e5;
  --md-sys-color-surface-variant: #49454f;
  --md-sys-color-on-surface-variant: #cab6cf;
  --md-sys-color-surface-container: #1d1b20;
  --md-sys-color-surface-container-high: #272529;
  --md-sys-color-surface-container-highest: #322f35;
  
  /* Outline Colors */
  --md-sys-color-outline: #938f99;
  --md-sys-color-outline-variant: #49454f;
  
  /* Error Colors */
  --md-sys-color-error: #ffb4ab;
  --md-sys-color-on-error: #690005;
  --md-sys-color-error-container: #93000a;
  --md-sys-color-on-error-container: #ffdad6;
  
  /* Success Colors */
  --md-sys-color-success: #82d96c;
  --md-sys-color-on-success: #003909;
  --md-sys-color-success-container: #005313;
  --md-sys-color-on-success-container: #9ef68e;
  
  /* Warning Colors */
  --md-sys-color-warning: #ffb951;
  --md-sys-color-on-warning: #4a2800;
  --md-sys-color-warning-container: #693c00;
  --md-sys-color-on-warning-container: #ffdcc0;
}

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

body {
  font-family: var(--md-sys-typescale-body-large-font);
  font-size: var(--md-sys-typescale-body-large-size);
  font-weight: var(--md-sys-typescale-body-large-weight);
  background-color: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  line-height: 1.5;
}

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

/* Navigation Rail */
.navigation-rail {
  width: 280px;
  background-color: var(--md-sys-color-surface-container);
  border-right: 1px solid var(--md-sys-color-outline-variant);
  display: flex;
  flex-direction: column;
  padding: 24px 0;
}

.nav-header {
  display: flex;
  align-items: center;
  padding: 0 24px;
  margin-bottom: 32px;
}

.nav-icon {
  font-size: 32px;
  color: var(--md-sys-color-primary);
  margin-right: 16px;
}

.nav-title {
  font-size: var(--md-sys-typescale-title-large-size);
  font-weight: var(--md-sys-typescale-title-large-weight);
  color: var(--md-sys-color-on-surface);
}

.nav-items {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 12px;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 16px 24px;
  border: none;
  background: none;
  border-radius: 28px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--md-sys-color-on-surface-variant);
  font-size: var(--md-sys-typescale-label-large-size);
  font-weight: var(--md-sys-typescale-label-large-weight);
  text-align: left;
  width: 100%;
}

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

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

.nav-item .material-icons {
  margin-right: 12px;
  font-size: 24px;
}

.nav-label {
  font-family: var(--md-sys-typescale-label-large-font);
}



/* Theme Toggle */
.header-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  margin-bottom: 16px;
  margin-left: 24px;
  margin-right: 24px;
}

.language-select {
  background: var(--md-sys-color-surface-container-high);
  border: 1px solid var(--md-sys-color-outline);
  border-radius: 8px;
  color: var(--md-sys-color-on-surface);
  font-size: 12px;
  padding: 4px 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.language-select:hover {
  background: var(--md-sys-color-surface-container-highest);
}

.language-select:focus {
  outline: 2px solid var(--md-sys-color-primary);
  outline-offset: 2px;
}

.theme-toggle {
  background: none;
  border: none;
  padding: 8px;
  border-radius: 20px;
  cursor: pointer;
  color: var(--md-sys-color-on-surface-variant);
  transition: all 0.2s ease;
}

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

.theme-toggle .material-icons {
  font-size: 24px;
}

.data-controls {
  display: flex;
  gap: 4px;
  margin-left: 8px;
}

.data-btn {
  background: none;
  border: none;
  color: var(--md-sys-color-on-surface);
  cursor: pointer;
  padding: 8px;
  border-radius: 20px;
  transition: background-color 0.2s ease;
}

.data-btn:hover {
  background-color: var(--md-sys-color-surface-variant);
}

.data-btn .material-icons {
  font-size: 18px;
}

/* Main Content */
.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  background-color: var(--md-sys-color-surface);
}

.content-section {
  display: none;
}

.content-section.active {
  display: block;
}

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

.section-header h2 {
  font-size: var(--md-sys-typescale-headline-large-size);
  font-weight: var(--md-sys-typescale-headline-large-weight);
  color: var(--md-sys-color-on-surface);
}

.header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.view-toggle {
  display: flex;
  background-color: var(--md-sys-color-surface-container-high);
  border-radius: 20px;
  padding: 4px;
  margin-right: 8px;
}

.btn-icon {
  background: none;
  border: none;
  padding: 8px 12px;
  border-radius: 16px;
  cursor: pointer;
  color: var(--md-sys-color-on-surface-variant);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-icon:hover {
  background-color: var(--md-sys-color-surface-container-highest);
  color: var(--md-sys-color-on-surface);
}

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

.btn-icon .material-icons {
  font-size: 20px;
}

/* Buttons */
.btn-primary {
  background-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  border: none;
  padding: 12px 24px;
  border-radius: 20px;
  font-size: var(--md-sys-typescale-label-large-size);
  font-weight: var(--md-sys-typescale-label-large-weight);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.btn-primary:hover {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--md-sys-color-surface-container-high);
  color: var(--md-sys-color-on-surface);
  border: 1px solid var(--md-sys-color-outline);
  padding: 12px 24px;
  border-radius: 20px;
  font-size: var(--md-sys-typescale-label-large-size);
  font-weight: var(--md-sys-typescale-label-large-weight);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background-color: var(--md-sys-color-surface-container-highest);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

/* Sites Container */
.sites-container {
  margin-top: 24px;
}

/* Sites Grid */

.sites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.site-card {
  background-color: var(--md-sys-color-surface-container);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  transition: all 0.2s ease;
  border-left: 4px solid var(--md-sys-color-outline-variant);
}

/* Dynamic card coloring based on check results */
.site-card-success {
  border-left-color: var(--md-sys-color-success);
  background-color: var(--md-sys-color-success-container);
}

.site-card-warning {
  border-left-color: var(--md-sys-color-warning);
  background-color: var(--md-sys-color-warning-container);
}

.site-card-error {
  border-left-color: var(--md-sys-color-error);
  background-color: var(--md-sys-color-error-container);
}

.site-card-not-checked {
   border-left-color: var(--md-sys-color-outline-variant);
   background-color: var(--md-sys-color-surface-container);
 }

.site-card:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.16);
  transform: translateY(-2px);
}

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

.site-info h3 {
  font-size: 18px;
  font-weight: 500;
  color: var(--md-sys-color-on-surface);
  margin-bottom: 4px;
}

.site-info .site-url {
  color: var(--md-sys-color-on-surface-variant);
  font-size: 14px;
  word-break: break-all;
}

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

.icon-btn {
  background: none;
  border: none;
  padding: 8px;
  border-radius: 20px;
  cursor: pointer;
  color: var(--md-sys-color-on-surface-variant);
  transition: all 0.2s ease;
}

.icon-btn:hover {
  background-color: var(--md-sys-color-surface-container-high);
  color: var(--md-sys-color-on-surface);
}

.site-group {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
  margin-top: 12px;
}

.site-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--md-sys-color-outline-variant);
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--md-sys-color-outline);
}

.status-indicator.online {
  background-color: var(--md-sys-color-success);
}

.status-indicator.offline {
  background-color: var(--md-sys-color-error);
}

.status-indicator.checking {
  background-color: var(--md-sys-color-warning);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

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

/* Site Checks Styles */
.site-checks {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--md-sys-color-outline-variant);
}

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

.checks-header h4 {
  font-size: 14px;
  font-weight: 500;
  color: var(--md-sys-color-on-surface);
  margin: 0;
}

.checks-grid {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.check-status {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  min-width: 0;
  flex: 1;
}

.check-status .material-icons {
  font-size: 16px;
}

.check-status.success {
  background-color: var(--md-sys-color-success-container);
  color: var(--md-sys-color-on-success-container);
}

.check-status.warning {
  background-color: var(--md-sys-color-warning-container);
  color: var(--md-sys-color-on-warning-container);
}

.check-status.error {
  background-color: var(--md-sys-color-error-container);
  color: var(--md-sys-color-on-error-container);
}

.check-status.not-checked {
  background-color: var(--md-sys-color-surface-container-high);
  color: var(--md-sys-color-on-surface-variant);
}

.check-name {
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.btn-small {
  padding: 6px 12px;
  font-size: 12px;
  min-height: 32px;
  border-radius: 16px;
}

.btn-small .material-icons {
  font-size: 16px;
  margin-right: 4px;
}

.btn-outline {
  background: none;
  border: 1px solid var(--md-sys-color-outline);
  color: var(--md-sys-color-primary);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
}

.btn-outline:hover {
  background-color: var(--md-sys-color-primary-container);
  border-color: var(--md-sys-color-primary);
}

.btn-secondary {
  background-color: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
}

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

/* Site Check Details Modal */
.site-check-details-modal .modal-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.site-check-details-modal .modal-header h3 {
  margin: 0 0 8px 0;
  color: var(--md-sys-color-on-surface);
}

.site-check-details-modal .site-url {
  color: var(--md-sys-color-on-surface-variant);
  font-size: 14px;
  margin: 0;
}

.check-details-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.check-detail {
  padding: 16px;
  border-radius: 12px;
  border-left: 4px solid;
}

.check-detail.success {
  background-color: var(--md-sys-color-success-container);
  border-left-color: var(--md-sys-color-success);
}

.check-detail.warning {
  background-color: var(--md-sys-color-warning-container);
  border-left-color: var(--md-sys-color-warning);
}

.check-detail.error {
  background-color: var(--md-sys-color-error-container);
  border-left-color: var(--md-sys-color-error);
}

.check-detail.not-checked {
  background-color: var(--md-sys-color-surface-container-high);
  border-left-color: var(--md-sys-color-outline);
}

.check-detail h4 {
  margin: 0 0 12px 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--md-sys-color-on-surface);
}

.check-detail p {
  margin: 8px 0;
  font-size: 14px;
  color: var(--md-sys-color-on-surface-variant);
}

.robots-content {
  background-color: var(--md-sys-color-surface-container-highest);
  padding: 12px;
  border-radius: 8px;
  font-size: 12px;
  font-family: 'Courier New', monospace;
  overflow-x: auto;
  margin: 8px 0;
  white-space: pre-wrap;
  color: var(--md-sys-color-on-surface);
}

.modal-content.large {
  max-width: 800px;
  width: 90vw;
  max-height: 80vh;
  overflow-y: auto;
}

/* Sites Table */
.sites-table {
  background-color: var(--md-sys-color-surface-container);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th {
  background-color: var(--md-sys-color-surface-container-high);
  color: var(--md-sys-color-on-surface);
  font-weight: 500;
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.data-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
  color: var(--md-sys-color-on-surface);
  vertical-align: middle;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover {
  background-color: var(--md-sys-color-surface-container-highest);
}

.table-site-name {
  font-weight: 500;
  color: var(--md-sys-color-on-surface);
}

.table-site-url {
  color: var(--md-sys-color-on-surface-variant);
  word-break: break-all;
  max-width: 200px;
}

.table-group-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.table-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.table-actions {
  display: flex;
  gap: 4px;
}

.table-last-checked {
  font-size: 12px;
  color: var(--md-sys-color-on-surface-variant);
}

.table-group-badge.no-group {
  background-color: var(--md-sys-color-outline);
  color: var(--md-sys-color-on-surface);
}

/* Hide table when empty */
.sites-table:empty {
  display: none !important;
}

/* Progress Container */
.progress-container {
  background-color: var(--md-sys-color-surface-container);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

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

.progress-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  color: var(--md-sys-color-on-surface);
}

/* Progress Bar */
.progress-bar {
  position: relative;
  background-color: var(--md-sys-color-surface-container-high);
  border-radius: 8px;
  height: 8px;
  margin-bottom: 20px;
  overflow: hidden;
}

.progress-fill {
  background-color: var(--md-sys-color-primary);
  height: 100%;
  border-radius: 8px;
  transition: width 0.3s ease;
  width: 0%;
}

.progress-text {
  position: absolute;
  top: -24px;
  right: 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--md-sys-color-on-surface-variant);
}

/* Logs Container */
.logs-container {
  background-color: var(--md-sys-color-surface-container-highest);
  border-radius: 8px;
  border: 1px solid var(--md-sys-color-outline-variant);
}

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

.logs-header h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--md-sys-color-on-surface);
}

.logs-content {
  max-height: 200px;
  overflow-y: auto;
  padding: 12px 16px;
  font-family: 'Roboto Mono', monospace;
  font-size: 12px;
  line-height: 1.4;
  background-color: var(--md-sys-color-surface);
}

.log-entry {
  margin-bottom: 4px;
  padding: 2px 0;
  color: var(--md-sys-color-on-surface-variant);
}

.log-entry.success {
  color: var(--md-sys-color-tertiary);
}

.log-entry.error {
  color: var(--md-sys-color-error);
}

.log-entry.warning {
  color: var(--md-sys-color-secondary);
}

.log-entry.info {
  color: var(--md-sys-color-primary);
}

.log-timestamp {
  color: var(--md-sys-color-outline);
  margin-right: 8px;
}

/* Button Variants */
.btn-text {
  background: none;
  border: none;
  color: var(--md-sys-color-primary);
  padding: 8px 12px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

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

.btn-text .material-icons {
  font-size: 16px;
}

/* Settings Modal */
.settings-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.settings-modal.active {
  display: flex;
}

.settings-modal-content {
  background-color: var(--md-sys-color-surface);
  border-radius: 16px;
  padding: 24px;
  width: 90%;
  max-width: 480px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.24);
}

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

.settings-modal-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 500;
  color: var(--md-sys-color-on-surface);
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.form-group input {
  padding: 12px 16px;
  border: 1px solid var(--md-sys-color-outline);
  border-radius: 8px;
  background-color: var(--md-sys-color-surface-container);
  color: var(--md-sys-color-on-surface);
  font-size: 16px;
  transition: border-color 0.2s ease;
}

.form-group input:focus {
  outline: none;
  border-color: var(--md-sys-color-primary);
  box-shadow: 0 0 0 2px rgba(103, 80, 164, 0.2);
}

.form-group .help-text {
  font-size: 12px;
  color: var(--md-sys-color-on-surface-variant);
  margin-top: 4px;
}

.settings-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}

.btn-outlined {
  background: none;
  border: 1px solid var(--md-sys-color-outline);
  color: var(--md-sys-color-primary);
  padding: 10px 24px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}

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

/* Results Container */
.results-container {
  margin-top: 24px;
}

.result-card {
  background-color: var(--md-sys-color-surface-container);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  border-left: 4px solid var(--md-sys-color-outline);
}

.result-card.success {
  border-left-color: var(--md-sys-color-success);
}

.result-card.error {
  border-left-color: var(--md-sys-color-error);
}

.result-card.warning {
  border-left-color: var(--md-sys-color-warning);
}

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

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

.result-icon.success {
  color: var(--md-sys-color-success);
}

.result-icon.error {
  color: var(--md-sys-color-error);
}

.result-icon.warning {
  color: var(--md-sys-color-warning);
}

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

.result-details {
  color: var(--md-sys-color-on-surface-variant);
  font-size: 14px;
  line-height: 1.4;
}

/* Modals */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background-color: var(--md-sys-color-surface-container-high);
  border-radius: 28px;
  padding: 24px;
  max-width: 560px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.24);
}

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

.modal-header h3 {
  font-size: var(--md-sys-typescale-title-large-size);
  font-weight: var(--md-sys-typescale-title-large-weight);
  color: var(--md-sys-color-on-surface);
}

.close-btn {
  background: none;
  border: none;
  padding: 8px;
  border-radius: 20px;
  cursor: pointer;
  color: var(--md-sys-color-on-surface-variant);
  transition: all 0.2s ease;
}

.close-btn:hover {
  background-color: var(--md-sys-color-surface-container-highest);
  color: var(--md-sys-color-on-surface);
}

/* Forms */
.form-field {
  margin-bottom: 24px;
}

.form-field label {
  display: block;
  margin-bottom: 8px;
  font-size: var(--md-sys-typescale-label-large-size);
  font-weight: var(--md-sys-typescale-label-large-weight);
  color: var(--md-sys-color-on-surface);
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 16px;
  border: 1px solid var(--md-sys-color-outline);
  border-radius: 4px;
  font-size: var(--md-sys-typescale-body-large-size);
  background-color: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  transition: all 0.2s ease;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--md-sys-color-primary);
  box-shadow: 0 0 0 2px rgba(103, 80, 164, 0.2);
}

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

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 32px;
}

/* Loading States */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: var(--md-sys-color-on-surface-variant);
}

.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--md-sys-color-outline-variant);
  border-top: 2px solid var(--md-sys-color-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 12px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

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

.empty-state .material-icons {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.6;
}

.empty-state h3 {
  font-size: 20px;
  margin-bottom: 8px;
  color: var(--md-sys-color-on-surface);
}

.empty-state p {
  font-size: 14px;
  line-height: 1.4;
}

/* Site Selection Controls */
.site-selection-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 10px;
}

.site-selection-controls .btn-text {
    background: none;
    border: none;
    color: var(--md-sys-color-primary);
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    transition: background-color 0.2s;
}

.site-selection-controls .btn-text:hover {
    background-color: var(--md-sys-color-primary-container);
}

.site-selection-controls .btn-primary {
    background-color: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.site-selection-controls .btn-primary:hover:not(:disabled) {
    background-color: var(--md-sys-color-primary);
    opacity: 0.9;
}

.site-selection-controls .btn-primary:disabled {
    background-color: var(--md-sys-color-outline-variant);
    cursor: not-allowed;
    opacity: 0.6;
}

/* Site Checkboxes */
.site-checkbox {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.site-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    flex: 1;
}

.result-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

/* Results Grid */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 16px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 10000;
    animation: slideIn 0.3s ease-out;
    max-width: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.notification-success {
    background-color: var(--md-sys-color-primary);
}

.notification-error {
    background-color: var(--md-sys-color-error);
}

.notification-info {
    background-color: var(--md-sys-color-tertiary);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .sites-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
  .app-container {
    flex-direction: column;
  }
  
  .navigation-rail {
    width: 100%;
    height: auto;
    flex-direction: row;
    padding: 12px;
    overflow-x: auto;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }
  
  .nav-header {
    margin-bottom: 0;
    margin-right: 24px;
    flex-shrink: 0;
  }
  
  .nav-items {
    flex-direction: row;
    padding: 0;
    gap: 8px;
  }
  
  .nav-item {
    white-space: nowrap;
    min-width: auto;
    padding: 8px 16px;
  }
  
  .main-content {
    padding: 16px;
  }
  
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  
  .header-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  
  .view-toggle {
    order: -1;
    margin-bottom: 8px;
  }
  
  .sites-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .site-card {
    padding: 16px;
  }
  
  .modal-content {
    width: 95%;
    margin: 20px;
    max-height: 90vh;
  }
  
  .progress-container {
    margin: 16px 0;
  }
  
  .logs-container {
    max-height: 200px;
  }
  
  .table-container {
    overflow-x: auto;
  }
  
  .sites-table {
    min-width: 600px;
  }
}

@media (max-width: 480px) {
  .main-content {
    padding: 12px;
  }
  
  .section-header h2 {
    font-size: 20px;
  }
  
  .btn-primary,
  .btn-secondary {
    padding: 10px 16px;
    font-size: 14px;
  }
  
  .site-card {
    padding: 12px;
  }
  
  .modal-content {
    width: 100%;
    margin: 10px;
    border-radius: 12px;
  }
  
  .form-field input,
  .form-field select,
  .form-field textarea {
    padding: 12px;
  }
  
  .nav-item {
    padding: 6px 12px;
    font-size: 14px;
  }
}

/* Logs Modal Styles */
.logs-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 70vh;
}

.logs-filters {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 16px;
  background: var(--md-sys-color-surface-container);
  border-radius: 12px;
  flex-wrap: wrap;
}

.logs-filters select,
.logs-filters input {
  padding: 8px 12px;
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: 8px;
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  font-size: 14px;
}

.logs-filters select {
  min-width: 120px;
}

.logs-filters input {
  flex: 1;
  min-width: 200px;
}

.logs-container {
  flex: 1;
  overflow-y: auto;
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: 12px;
  background: var(--md-sys-color-surface);
  max-height: 400px;
}

.log-entry {
  padding: 12px 16px;
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
  font-family: 'Roboto Mono', monospace;
  font-size: 13px;
  line-height: 1.4;
}

.log-entry:last-child {
  border-bottom: none;
}

.log-entry.error {
  background: var(--md-sys-color-error-container);
  color: var(--md-sys-color-on-error-container);
}

.log-entry.warn {
  background: var(--md-sys-color-warning-container);
  color: var(--md-sys-color-on-warning-container);
}

.log-entry.info {
  background: var(--md-sys-color-surface-container);
  color: var(--md-sys-color-on-surface);
}

.log-entry.debug {
  background: var(--md-sys-color-surface-variant);
  color: var(--md-sys-color-on-surface-variant);
}

.log-timestamp {
  color: var(--md-sys-color-outline);
  font-weight: 500;
}

.log-level {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  margin: 0 8px;
}

.log-level.error {
  background: var(--md-sys-color-error);
  color: var(--md-sys-color-on-error);
}

.log-level.warn {
  background: var(--md-sys-color-warning);
  color: var(--md-sys-color-on-warning);
}

.log-level.info {
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
}

.log-level.debug {
  background: var(--md-sys-color-outline);
  color: var(--md-sys-color-surface);
}

.log-message {
  margin: 4px 0;
}

.log-context {
  color: var(--md-sys-color-outline);
  font-size: 12px;
  margin-top: 4px;
}

.log-error {
  color: var(--md-sys-color-error);
  font-size: 12px;
  margin-top: 4px;
  white-space: pre-wrap;
}

.logs-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--md-sys-color-outline);
  font-style: italic;
}

/* Title Verification Section Styles */
.info-container {
  margin-top: 24px;
}

.info-card {
  background: var(--md-sys-color-surface-container);
  border-radius: 16px;
  padding: 24px;
  border: 1px solid var(--md-sys-color-outline-variant);
}

.info-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.info-header .material-icons {
  font-size: 24px;
  color: var(--md-sys-color-primary);
}

.info-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  color: var(--md-sys-color-on-surface);
}

.info-card p {
  margin: 0 0 20px 0;
  color: var(--md-sys-color-on-surface-variant);
  line-height: 1.5;
}

.info-stats {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--md-sys-color-on-surface-variant);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 16px;
  font-weight: 500;
  color: var(--md-sys-color-on-surface);
}

/* Checkbox styles for title verification settings */
.form-field label input[type="checkbox"] {
  margin-right: 8px;
  width: auto;
  padding: 0;
}

.form-field label {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.form-field label:has(input[type="checkbox"]) {
  margin-bottom: 8px;
}

@media (max-width: 768px) {
  .info-stats {
    flex-direction: column;
    gap: 16px;
  }
  
  .info-card {
    padding: 16px;
  }
}