/* Global CSS Reset and Base Styles */
* {
  box-sizing: border-box;
}

:root {
  /* Color Palette */
  --color-primary: #007bff;
  --color-primary-dark: #0056b3;
  --color-primary-light: #4299e1;
  --color-secondary: #6c757d;
  --color-success: #28a745;
  --color-warning: #ffc107;
  --color-danger: #dc3545;
  --color-info: #17a2b8;
  
  /* Severity Colors */
  --color-severity-high: #dc3545;
  --color-severity-medium: #fd7e14;
  --color-severity-low: #f57c00;
  --color-severity-info: #17a2b8;
  
  /* Neutral Colors */
  --color-white: #ffffff;
  --color-gray-50: #f8f9fa;
  --color-gray-100: #f7fafc;
  --color-gray-200: #e9ecef;
  --color-gray-300: #dee2e6;
  --color-gray-400: #ced4da;
  --color-gray-500: #adb5bd;
  --color-gray-600: #6c757d;
  --color-gray-700: #495057;
  --color-gray-800: #343a40;
  --color-gray-900: #212529;
  
  /* Text Colors */
  --color-text-primary: #2d3748;
  --color-text-secondary: #718096;
  --color-text-muted: #a0aec0;
  
  /* Background Colors */
  --color-bg-primary: #ffffff;
  --color-bg-secondary: #f7fafc;
  --color-bg-tertiary: #edf2f7;
  
  /* Border Colors */
  --color-border-light: #e2e8f0;
  --color-border-medium: #cbd5e0;
  --color-border-dark: #a0aec0;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);
  
  /* Typography */
  --font-family-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-family-mono: 'Monaco', 'Menlo', 'Ubuntu Mono', Consolas, 'Courier New', monospace;
  
  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  
  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.2s ease;
  --transition-slow: 0.3s ease;
  
  /* Z-index */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
  --z-toast: 1080;
}

html {
  font-size: 16px;
  line-height: 1.5;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-family-sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text-primary);
  background-color: var(--color-bg-secondary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#root {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--spacing-md) 0;
  font-weight: 600;
  line-height: 1.25;
  color: var(--color-text-primary);
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
  margin: 0 0 var(--spacing-md) 0;
  color: var(--color-text-secondary);
}

/* Links */
a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

/* Code */
code {
  font-family: var(--font-family-mono);
  font-size: 0.875em;
  background-color: var(--color-gray-100);
  padding: 0.125rem 0.25rem;
  border-radius: var(--radius-sm);
  color: var(--color-text-primary);
}

pre {
  font-family: var(--font-family-mono);
  background-color: var(--color-gray-100);
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: 0 0 var(--spacing-md) 0;
}

pre code {
  background: none;
  padding: 0;
}

/* Form Elements */
input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="url"],
textarea,
select {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border-medium);
  border-radius: var(--radius-md);
  background-color: var(--color-bg-primary);
  color: var(--color-text-primary);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="url"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.btn:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

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

.btn-primary:hover:not(:disabled) {
  background-color: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
}

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

.btn-secondary:hover:not(:disabled) {
  background-color: #545b62;
  border-color: #4e555b;
}

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

.btn-success:hover:not(:disabled) {
  background-color: #218838;
  border-color: #1e7e34;
}

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

.btn-danger:hover:not(:disabled) {
  background-color: #c82333;
  border-color: #bd2130;
}

.btn-outline-primary {
  color: var(--color-primary);
  background-color: transparent;
  border-color: var(--color-primary);
}

.btn-outline-primary:hover:not(:disabled) {
  color: white;
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--color-primary) !important; }
.text-secondary { color: var(--color-text-secondary) !important; }
.text-muted { color: var(--color-text-muted) !important; }
.text-success { color: var(--color-success) !important; }
.text-warning { color: var(--color-warning) !important; }
.text-danger { color: var(--color-danger) !important; }

.bg-primary { background-color: var(--color-primary) !important; }
.bg-secondary { background-color: var(--color-bg-secondary) !important; }
.bg-light { background-color: var(--color-gray-100) !important; }
.bg-white { background-color: var(--color-white) !important; }

.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.d-inline-flex { display: inline-flex !important; }

.flex-column { flex-direction: column !important; }
.flex-row { flex-direction: row !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }
.align-items-center { align-items: center !important; }
.align-items-start { align-items: flex-start !important; }

.gap-1 { gap: var(--spacing-xs) !important; }
.gap-2 { gap: var(--spacing-sm) !important; }
.gap-3 { gap: var(--spacing-md) !important; }
.gap-4 { gap: var(--spacing-lg) !important; }

.m-0 { margin: 0 !important; }
.mt-1 { margin-top: var(--spacing-xs) !important; }
.mt-2 { margin-top: var(--spacing-sm) !important; }
.mt-3 { margin-top: var(--spacing-md) !important; }
.mb-1 { margin-bottom: var(--spacing-xs) !important; }
.mb-2 { margin-bottom: var(--spacing-sm) !important; }
.mb-3 { margin-bottom: var(--spacing-md) !important; }

.p-0 { padding: 0 !important; }
.p-1 { padding: var(--spacing-xs) !important; }
.p-2 { padding: var(--spacing-sm) !important; }
.p-3 { padding: var(--spacing-md) !important; }

.border { border: 1px solid var(--color-border-light) !important; }
.border-0 { border: 0 !important; }
.rounded { border-radius: var(--radius-md) !important; }
.rounded-sm { border-radius: var(--radius-sm) !important; }
.rounded-lg { border-radius: var(--radius-lg) !important; }

.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.shadow { box-shadow: var(--shadow-md) !important; }
.shadow-lg { box-shadow: var(--shadow-lg) !important; }

/* Touch-friendly interactions */
@media (hover: none) and (pointer: coarse) {
  /* Touch devices */
  .btn {
    min-height: 44px; /* iOS recommended touch target size */
    min-width: 44px;
    padding: 0.75rem 1.25rem;
  }
  
  .btn-sm {
    min-height: 36px;
    min-width: 36px;
    padding: 0.5rem 0.75rem;
  }
  
  /* Larger touch targets for interactive elements */
  input[type="checkbox"],
  input[type="radio"] {
    min-height: 20px;
    min-width: 20px;
  }
  
  /* Remove hover effects on touch devices */
  .btn:hover,
  a:hover,
  input:hover,
  textarea:hover,
  select:hover {
    transform: none;
    box-shadow: none;
  }
  
  /* Add touch feedback */
  .btn:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
  }
}

/* Responsive Utilities */
@media (max-width: 576px) {
  .d-sm-none { display: none !important; }
  .d-sm-block { display: block !important; }
  
  /* Mobile-specific utilities */
  .text-sm-center { text-align: center !important; }
  .flex-sm-column { flex-direction: column !important; }
  .gap-sm-2 { gap: var(--spacing-sm) !important; }
  
  /* Adjust font sizes for mobile */
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
  
  /* Increase line height for better readability on mobile */
  body {
    line-height: 1.6;
  }
}

@media (max-width: 768px) {
  .d-md-none { display: none !important; }
  .d-md-block { display: block !important; }
  
  /* Tablet-specific utilities */
  .text-md-center { text-align: center !important; }
  .flex-md-column { flex-direction: column !important; }
  .gap-md-3 { gap: var(--spacing-md) !important; }
}

@media (max-width: 992px) {
  .d-lg-none { display: none !important; }
  .d-lg-block { display: block !important; }
  
  /* Desktop-specific utilities */
  .text-lg-left { text-align: left !important; }
  .flex-lg-row { flex-direction: row !important; }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-gray-100);
  border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb {
  background: var(--color-gray-400);
  border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-gray-500);
}

/* Focus Visible Support */
.js-focus-visible :focus:not(.focus-visible) {
  outline: none;
}

/* Print Styles */
@media print {
  * {
    background: transparent !important;
    color: black !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
  
  a, a:visited {
    text-decoration: underline;
  }
  
  pre, blockquote {
    border: 1px solid #999;
    page-break-inside: avoid;
  }
  
  thead {
    display: table-header-group;
  }
  
  tr, img {
    page-break-inside: avoid;
  }
  
  img {
    max-width: 100% !important;
  }
  
  p, h2, h3 {
    orphans: 3;
    widows: 3;
  }
  
  h2, h3 {
    page-break-after: avoid;
  }
}
.workflow-stepper {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
  border: 1px solid #e9ecef;
}

.stepper-container {
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.step-wrapper {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
  border-radius: 12px;
  transition: all 0.3s ease;
  min-width: 180px;
  position: relative;
}

.step-item.clickable {
  cursor: pointer;
}

.step-item.clickable:hover {
  background: rgba(0, 123, 255, 0.05);
  transform: translateY(-2px);
}

.step-item.clickable:focus {
  outline: 2px solid #007bff;
  outline-offset: 2px;
}

.step-item.active {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.step-item.completed {
  background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
  color: white;
}

.step-item.pending {
  background: #ffffff;
  border: 2px dashed #dee2e6;
  color: #6c757d;
}

.step-item.disabled {
  background: #f8f9fa;
  color: #adb5bd;
  opacity: 0.6;
}

.step-indicator {
  position: relative;
  margin-bottom: 12px;
}

.step-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: rgba(255, 255, 255, 0.2);
  margin-bottom: 4px;
}

.step-item.pending .step-icon {
  background: #e9ecef;
}

.step-item.disabled .step-icon {
  background: #f8f9fa;
}

.completion-icon {
  font-size: 20px;
  font-weight: bold;
}

.step-number {
  position: absolute;
  bottom: -8px;
  right: -8px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  font-size: 12px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-item.pending .step-number {
  background: #6c757d;
}

.step-item.disabled .step-number {
  background: #adb5bd;
}

.step-content {
  text-align: center;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.step-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
  line-height: 1.3;
}

.step-description {
  font-size: 13px;
  opacity: 0.9;
  line-height: 1.4;
  margin-bottom: 8px;
}

.step-item.pending .step-description {
  opacity: 0.7;
}

.step-status {
  margin-top: 8px;
}

.status-indicator {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.step-status.completed .status-indicator {
  background: rgba(255, 255, 255, 0.3);
}

.step-status.pending .status-indicator {
  background: #e9ecef;
  color: #6c757d;
}

.step-status.disabled .status-indicator {
  background: #f8f9fa;
  color: #adb5bd;
}

.step-connector {
  display: flex;
  align-items: center;
  margin: 0 8px;
  opacity: 0.6;
}

.step-connector.completed {
  opacity: 1;
}

.connector-line {
  width: 40px;
  height: 2px;
  background: #dee2e6;
  border-radius: 1px;
}

.step-connector.completed .connector-line {
  background: #28a745;
}

.connector-arrow {
  margin-left: 4px;
  font-size: 16px;
  color: #6c757d;
}

.step-connector.completed .connector-arrow {
  color: #28a745;
}

.workflow-progress {
  margin-top: 16px;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: #e9ecef;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #007bff 0%, #28a745 100%);
  border-radius: 3px;
  transition: width 0.5s ease;
}

.progress-text {
  font-size: 14px;
  color: #6c757d;
  text-align: center;
  font-weight: 500;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .stepper-container {
    flex-direction: column;
    align-items: stretch;
  }
  
  .step-wrapper {
    flex-direction: column;
    width: 100%;
  }
  
  .step-item {
    min-width: unset;
    width: 100%;
    flex-direction: row;
    text-align: left;
    padding: 12px 16px;
  }
  
  .step-indicator {
    margin-right: 16px;
    margin-bottom: 0;
  }
  
  .step-icon {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }
  
  .step-content {
    text-align: left;
    min-height: unset;
    flex: 1;
  }
  
  .step-connector {
    width: 100%;
    justify-content: center;
    margin: 8px 0;
  }
  
  .connector-line {
    width: 2px;
    height: 20px;
  }
  
  .connector-arrow {
    transform: rotate(90deg);
    margin-left: 0;
    margin-top: 4px;
  }
}

/* アクセシビリティ対応 */
@media (prefers-reduced-motion: reduce) {
  .step-item,
  .progress-fill {
    transition: none;
  }
  
  .step-item.clickable:hover {
    transform: none;
  }
}

/* ハイコントラストモード対応 */
@media (prefers-contrast: high) {
  .step-item {
    border: 2px solid;
  }
  
  .step-item.active {
    border-color: #ffffff;
  }
  
  .step-item.completed {
    border-color: #ffffff;
  }
  
  .step-item.pending {
    border-color: #6c757d;
  }
  
  .step-item.disabled {
    border-color: #adb5bd;
  }
}.workflow-navigation {
  background: #ffffff;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #e9ecef;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.workflow-progress-section {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e9ecef;
}

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

.progress-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #212529;
}

.progress-text {
  font-size: 14px;
  color: #6c757d;
  font-weight: 500;
}

.progress-bar-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.progress-bar {
  flex: 1;
  height: 8px;
  background: #e9ecef;
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #007bff 0%, #28a745 100%);
  border-radius: 4px;
  transition: width 0.5s ease;
}

.progress-percentage {
  font-size: 14px;
  font-weight: 600;
  color: #007bff;
  min-width: 40px;
  text-align: right;
}

.next-step-recommendation {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 24px;
  border-left: 4px solid #007bff;
}

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

.recommendation-icon {
  font-size: 18px;
}

.recommendation-header h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #212529;
  flex: 1;
}

.urgency-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.urgency-badge.high {
  background: #dc3545;
  color: white;
  animation: pulse-urgent 2s infinite;
}

.urgency-badge.medium {
  background: #ffc107;
  color: #212529;
}

@keyframes pulse-urgent {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.recommendation-content {
  margin-bottom: 16px;
}

.recommendation-title {
  margin: 0 0 4px 0;
  font-size: 14px;
  font-weight: 600;
  color: #212529;
}

.recommendation-description {
  margin: 0;
  font-size: 13px;
  color: #6c757d;
  line-height: 1.4;
}

.recommendation-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.recommendation-button.high {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: white;
}

.recommendation-button.medium {
  background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
  color: #212529;
}

.recommendation-button.low {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  color: white;
}

.recommendation-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.recommendation-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.button-arrow {
  font-size: 16px;
  transition: transform 0.3s ease;
}

.recommendation-button:hover:not(:disabled) .button-arrow {
  transform: translateX(4px);
}

.workflow-shortcuts {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e9ecef;
}

.workflow-shortcuts h4 {
  margin: 0 0 16px 0;
  font-size: 15px;
  font-weight: 600;
  color: #212529;
}

.shortcuts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.shortcut-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 12px;
  border: 1px solid #dee2e6;
  background: #ffffff;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.shortcut-button:hover:not(:disabled) {
  border-color: #007bff;
  background: #f8f9fa;
  transform: translateY(-2px);
}

.shortcut-button.active {
  border-color: #007bff;
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  color: white;
}

.shortcut-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.shortcut-icon {
  font-size: 20px;
  margin-bottom: 8px;
}

.shortcut-label {
  font-size: 12px;
  font-weight: 500;
  text-align: center;
  line-height: 1.3;
}

.shortcut-count {
  font-size: 11px;
  opacity: 0.8;
}

.shortcut-alert {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 12px;
  height: 12px;
  background: #dc3545;
  color: white;
  border-radius: 50%;
  font-size: 10px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse-alert 2s infinite;
}

@keyframes pulse-alert {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.workflow-summary h4 {
  margin: 0 0 16px 0;
  font-size: 15px;
  font-weight: 600;
  color: #212529;
}

.summary-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 12px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 8px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.stat-item.high-risk {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: white;
  border-color: #dc3545;
}

.stat-item.medium-risk {
  background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
  color: #212529;
  border-color: #ffc107;
}

.stat-item.low-risk {
  background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
  color: white;
  border-color: #28a745;
}

.stat-value {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .shortcuts-grid {
    grid-template-columns: 1fr;
  }
  
  .summary-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .shortcut-button {
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    padding: 12px 16px;
  }
  
  .shortcut-icon {
    margin-bottom: 0;
    font-size: 18px;
  }
  
  .shortcut-label {
    text-align: left;
    font-size: 13px;
  }
}

/* アクセシビリティ対応 */
@media (prefers-reduced-motion: reduce) {
  .urgency-badge.high,
  .shortcut-alert {
    animation: none;
  }
  
  .recommendation-button:hover:not(:disabled),
  .shortcut-button:hover:not(:disabled) {
    transform: none;
  }
  
  .recommendation-button:hover:not(:disabled) .button-arrow {
    transform: none;
  }
}

/* ハイコントラストモード対応 */
@media (prefers-contrast: high) {
  .workflow-navigation {
    border: 2px solid #000000;
  }
  
  .shortcut-button {
    border: 2px solid #000000;
  }
  
  .shortcut-button.active {
    border: 2px solid #ffffff;
  }
}.progress-indicator {
  background-color: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
  margin: 16px 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.progress-indicator.mobile {
  position: fixed;
  bottom: 16px;
  right: 16px;
  left: 16px;
  margin: 0;
  padding: 12px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
}

.progress-indicator.mobile.landscape {
  bottom: 12px;
  right: 12px;
  left: auto;
  min-width: 280px;
  max-width: 320px;
}

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

.progress-indicator__title {
  font-weight: 600;
  color: #2d3748;
  display: flex;
  align-items: center;
  gap: 8px;
}

.progress-indicator__spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #e2e8f0;
  border-top: 2px solid #4299e1;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.progress-indicator__cancel-btn {
  background: none;
  border: 1px solid #e2e8f0;
  color: #718096;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s ease;
}

.progress-indicator__cancel-btn:hover {
  background-color: #f7fafc;
  border-color: #cbd5e0;
}

.progress-indicator__progress-bar {
  width: 100%;
  height: 8px;
  background-color: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-indicator__progress-fill {
  height: 100%;
  background-color: #48bb78;
  transition: width 0.3s ease;
  border-radius: 4px;
}

.progress-indicator__progress-fill--indeterminate {
  background: linear-gradient(
    90deg,
    transparent,
    #4299e1,
    transparent
  );
  background-size: 200% 100%;
  animation: indeterminate 2s linear infinite;
}

@keyframes indeterminate {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.progress-indicator__stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: #4a5568;
}

.progress-indicator__current-file {
  flex: 1;
  margin-right: 16px;
  font-family: monospace;
  font-size: 12px;
  color: #718096;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.progress-indicator__percentage {
  font-weight: 500;
  color: #2d3748;
}

.progress-indicator__details {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  font-size: 12px;
}

.progress-indicator__detail {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.progress-indicator__detail-label {
  color: #718096;
  margin-bottom: 4px;
}

.progress-indicator__detail-value {
  font-weight: 600;
  color: #2d3748;
}

.progress-indicator__detail-value--success {
  color: #38a169;
}

.progress-indicator__detail-value--warning {
  color: #d69e2e;
}

.progress-indicator__detail-value--error {
  color: #e53e3e;
}

.progress-indicator__time-remaining {
  font-size: 12px;
  color: #a0aec0;
  text-align: center;
  margin-top: 8px;
}

.progress-indicator--completed {
  border-color: #48bb78;
  background-color: #f0fff4;
}

.progress-indicator--completed .progress-indicator__title {
  color: #38a169;
}

.progress-indicator--error {
  border-color: #e53e3e;
  background-color: #fffafa;
}

.progress-indicator--error .progress-indicator__title {
  color: #e53e3e;
}

.progress-indicator--cancelled {
  border-color: #d69e2e;
  background-color: #fffbeb;
}

.progress-indicator--cancelled .progress-indicator__title {
  color: #d69e2e;
}

.progress-indicator__error-message {
  margin-top: 8px;
  padding: 8px 12px;
  background-color: #fed7d7;
  border: 1px solid #feb2b2;
  border-radius: 4px;
  color: #c53030;
  font-size: 14px;
}

.progress-indicator__success-message {
  margin-top: 8px;
  padding: 8px 12px;
  background-color: #c6f6d5;
  border: 1px solid #9ae6b4;
  border-radius: 4px;
  color: #276749;
  font-size: 14px;
}

.progress-indicator__actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.progress-indicator__action-btn {
  background-color: #4299e1;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s ease;
}

.progress-indicator__action-btn:hover {
  background-color: #3182ce;
}

.progress-indicator__action-btn--secondary {
  background-color: transparent;
  color: #4299e1;
  border: 1px solid #4299e1;
}

.progress-indicator__action-btn--secondary:hover {
  background-color: #ebf8ff;
}
/* Mobil
e-specific styles */
@media (max-width: 768px) {
  .progress-indicator__header {
    margin-bottom: 8px;
  }
  
  .progress-indicator__title {
    font-size: 14px;
  }
  
  .progress-indicator__cancel-btn {
    padding: 4px 8px;
    font-size: 11px;
  }
  
  .progress-indicator__progress-bar {
    height: 6px;
    margin-bottom: 6px;
  }
  
  .progress-indicator__stats {
    font-size: 12px;
  }
  
  .progress-indicator__current-file {
    font-size: 11px;
    margin-right: 12px;
  }
  
  .progress-indicator__details {
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 8px;
    font-size: 11px;
  }
  
  .progress-indicator__actions {
    margin-top: 8px;
    gap: 6px;
  }
  
  .progress-indicator__action-btn {
    padding: 6px 12px;
    font-size: 12px;
  }
}

/* Touch-friendly enhancements */
@media (hover: none) and (pointer: coarse) {
  .progress-indicator__cancel-btn,
  .progress-indicator__action-btn {
    min-height: 44px;
    padding: 8px 16px;
    font-size: 14px;
  }
  
  .progress-indicator__cancel-btn:active,
  .progress-indicator__action-btn:active {
    transform: scale(0.98);
  }
}

/* Very small screens */
@media (max-width: 480px) {
  .progress-indicator.mobile {
    bottom: 12px;
    right: 12px;
    left: 12px;
    padding: 10px;
  }
  
  .progress-indicator__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  
  .progress-indicator__title {
    font-size: 13px;
  }
  
  .progress-indicator__stats {
    font-size: 11px;
  }
  
  .progress-indicator__current-file {
    font-size: 10px;
  }
  
  .progress-indicator__details {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    font-size: 10px;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .progress-indicator.mobile {
    max-height: 40vh;
    overflow-y: auto;
  }
  
  .progress-indicator__details {
    grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
  }
}.text-input {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.text-input__label {
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 4px;
}

.text-input__textarea {
  width: 100%;
  min-height: 200px;
  padding: 12px;
  border: 2px solid #e2e8f0;
  border-radius: 6px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
  transition: border-color 0.2s ease;
  background-color: #fafafa;
}

.text-input__textarea:focus {
  outline: none;
  border-color: #4299e1;
  box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.text-input__textarea--error {
  border-color: #e53e3e;
}

.text-input__textarea--error:focus {
  border-color: #e53e3e;
  box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

.text-input__info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #718096;
}

.text-input__char-count {
  color: #a0aec0;
}

.text-input__char-count--warning {
  color: #d69e2e;
}

.text-input__char-count--error {
  color: #e53e3e;
}

.text-input__actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.text-input__clear-btn {
  background: none;
  border: 1px solid #e2e8f0;
  color: #718096;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s ease;
}

.text-input__clear-btn:hover {
  background-color: #f7fafc;
  border-color: #cbd5e0;
}

.text-input__clear-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.text-input__scan-btn {
  background-color: #48bb78;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

.text-input__scan-btn:hover {
  background-color: #38a169;
}

.text-input__scan-btn:disabled {
  background-color: #a0aec0;
  cursor: not-allowed;
}

.text-input__scan-btn--scanning {
  background-color: #4299e1;
}

.text-input__scan-btn--scanning:hover {
  background-color: #3182ce;
}

.text-input__realtime-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #4a5568;
}

.text-input__realtime-checkbox {
  width: 16px;
  height: 16px;
  accent-color: #4299e1;
}

.text-input__syntax-highlight {
  position: relative;
}

.text-input__syntax-highlight .text-input__textarea {
  background-color: transparent;
  position: relative;
  z-index: 2;
}

.text-input__highlight-layer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.text-input__credential-highlight {
  background-color: rgba(229, 62, 62, 0.2);
  border-radius: 2px;
  padding: 1px 2px;
}

.text-input__error-message {
  color: #e53e3e;
  font-size: 14px;
  margin-top: 4px;
}

.text-input__help-text {
  color: #718096;
  font-size: 12px;
  line-height: 1.4;
}

.text-input__placeholder {
  color: #a0aec0;
  font-style: italic;
}/* Ac
cessibility enhancements */
.input-label {
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
  display: block;
}

.input-description {
  font-size: 14px;
  color: #666;
  margin-bottom: 12px;
  line-height: 1.4;
}

.text-input:focus {
  outline: 2px solid #0066cc;
  outline-offset: 2px;
  border-color: #0066cc;
}

.text-input:focus:not(:focus-visible) {
  outline: none;
}

.text-input:focus-visible {
  outline: 2px solid #0066cc;
  outline-offset: 2px;
  border-color: #0066cc;
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .text-input {
    border-width: 2px;
  }
  
  .text-input:focus,
  .text-input:focus-visible {
    outline-width: 3px;
    border-width: 2px;
  }
  
  .input-label {
    font-weight: 700;
  }
}

/* Screen reader only content */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Status announcements */
.input-stats[role="status"] {
  position: relative;
}

/* Improved keyboard navigation */
.input-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.input-actions button:focus {
  z-index: 1;
}

/* Touch accessibility */
@media (hover: none) and (pointer: coarse) {
  .text-input {
    font-size: 16px; /* Prevent zoom on iOS */
    min-height: 120px;
  }
  
  .input-actions button {
    min-height: 44px;
    padding: 12px 16px;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .text-input {
    transition: none;
  }
  
  .syntax-highlight {
    transition: none;
  }
}

/* Windows High Contrast Mode */
@media screen and (-ms-high-contrast: active) {
  .text-input {
    border: 2px solid ButtonText;
  }
  
  .text-input:focus {
    outline: 2px solid Highlight;
  }
  
  .syntax-highlight {
    display: none; /* Hide syntax highlighting in high contrast mode */
  }
}/* Accessible Button Component Styles */

.accessible-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  border: 1px solid transparent;
  border-radius: 0.375rem;
  transition: all 0.15s ease-in-out;
  position: relative;
  min-height: 2.5rem;
  font-family: inherit;
}

.accessible-button:focus {
  outline: 2px solid #4299e1;
  outline-offset: 2px;
}

.accessible-button:focus:not(:focus-visible) {
  outline: none;
}

.accessible-button:focus-visible {
  outline: 2px solid #4299e1;
  outline-offset: 2px;
}

.accessible-button:disabled,
.accessible-button[aria-disabled="true"] {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

/* Button Variants */
.accessible-button--primary {
  color: white;
  background-color: #4299e1;
  border-color: #4299e1;
}

.accessible-button--primary:hover:not(:disabled):not([aria-disabled="true"]) {
  background-color: #3182ce;
  border-color: #3182ce;
}

.accessible-button--primary:active:not(:disabled):not([aria-disabled="true"]) {
  background-color: #2c5282;
  border-color: #2c5282;
  transform: translateY(1px);
}

.accessible-button--secondary {
  color: #4a5568;
  background-color: white;
  border-color: #e2e8f0;
}

.accessible-button--secondary:hover:not(:disabled):not([aria-disabled="true"]) {
  background-color: #f7fafc;
  border-color: #cbd5e0;
}

.accessible-button--secondary:active:not(:disabled):not([aria-disabled="true"]) {
  background-color: #edf2f7;
  border-color: #a0aec0;
  transform: translateY(1px);
}

.accessible-button--danger {
  color: white;
  background-color: #e53e3e;
  border-color: #e53e3e;
}

.accessible-button--danger:hover:not(:disabled):not([aria-disabled="true"]) {
  background-color: #c53030;
  border-color: #c53030;
}

.accessible-button--danger:active:not(:disabled):not([aria-disabled="true"]) {
  background-color: #9c2626;
  border-color: #9c2626;
  transform: translateY(1px);
}

.accessible-button--ghost {
  color: #4a5568;
  background-color: transparent;
  border-color: transparent;
}

.accessible-button--ghost:hover:not(:disabled):not([aria-disabled="true"]) {
  background-color: #f7fafc;
  border-color: #e2e8f0;
}

.accessible-button--ghost:active:not(:disabled):not([aria-disabled="true"]) {
  background-color: #edf2f7;
  border-color: #cbd5e0;
  transform: translateY(1px);
}

/* Button Sizes */
.accessible-button--sm {
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  min-height: 2rem;
}

.accessible-button--md {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  min-height: 2.5rem;
}

.accessible-button--lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  min-height: 3rem;
}

/* Full Width */
.accessible-button--full-width {
  width: 100%;
}

/* Loading State */
.accessible-button--loading {
  color: transparent;
}

.accessible-button__spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 1rem;
  height: 1rem;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.accessible-button--loading .accessible-button__spinner {
  color: white;
}

.accessible-button--secondary.accessible-button--loading .accessible-button__spinner,
.accessible-button--ghost.accessible-button--loading .accessible-button__spinner {
  color: #4a5568;
}

/* Icon Positioning */
.accessible-button__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.accessible-button__icon--left {
  margin-right: -0.25rem;
}

.accessible-button__icon--right {
  margin-left: -0.25rem;
}

.accessible-button__text {
  display: flex;
  align-items: center;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .accessible-button {
    border-width: 2px;
  }
  
  .accessible-button:focus,
  .accessible-button:focus-visible {
    outline-width: 3px;
  }
  
  .accessible-button--primary {
    background-color: #000;
    border-color: #000;
    color: #fff;
  }
  
  .accessible-button--secondary {
    background-color: #fff;
    border-color: #000;
    color: #000;
  }
  
  .accessible-button--danger {
    background-color: #c53030;
    border-color: #c53030;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .accessible-button {
    transition: none;
  }
  
  .accessible-button:active {
    transform: none;
  }
  
  .accessible-button__spinner {
    animation: none;
  }
}

/* Touch Devices */
@media (hover: none) and (pointer: coarse) {
  .accessible-button {
    min-height: 44px;
    padding: 0.75rem 1.25rem;
  }
  
  .accessible-button--sm {
    min-height: 36px;
    padding: 0.5rem 0.75rem;
  }
  
  .accessible-button--lg {
    min-height: 48px;
    padding: 1rem 1.5rem;
  }
  
  .accessible-button:active:not(:disabled):not([aria-disabled="true"]) {
    transform: scale(0.98);
  }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .accessible-button {
    font-size: 1rem;
    min-height: 44px;
  }
  
  .accessible-button--sm {
    font-size: 0.875rem;
    min-height: 36px;
  }
  
  .accessible-button--lg {
    font-size: 1.125rem;
    min-height: 48px;
  }
}

/* Windows High Contrast Mode */
@media screen and (-ms-high-contrast: active) {
  .accessible-button {
    border: 2px solid ButtonText;
  }
  
  .accessible-button:focus {
    outline: 2px solid Highlight;
  }
}/* File Upload Container */
.file-upload-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.file-upload-container.mobile {
  gap: 16px;
}

.file-upload-container.tablet {
  gap: 20px;
}

/* Drop Zone */
.drop-zone {
  border: 2px dashed #ccc;
  border-radius: 12px;
  padding: 48px 24px;
  text-align: center;
  background: #fafafa;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.drop-zone:hover:not(.disabled) {
  border-color: #0066cc;
  background: #f0f8ff;
}

.drop-zone.drag-over {
  border-color: #0066cc;
  background: #e6f3ff;
  transform: scale(1.02);
}

.drop-zone.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.drop-zone.touch {
  border-style: solid;
  border-width: 2px;
}

/* Drop Zone Content */
.drop-zone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.drop-zone-icon {
  font-size: 48px;
  opacity: 0.7;
}

.drop-zone-text h3 {
  margin: 0;
  color: #333;
  font-size: 20px;
  font-weight: 600;
}

.drop-zone-text p {
  margin: 4px 0 0 0;
  color: #666;
  font-size: 14px;
}

.drop-zone-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

/* Buttons */
.upload-button,
.directory-button {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.upload-button.primary {
  background: #0066cc;
  color: white;
}

.upload-button.primary:hover:not(:disabled) {
  background: #0052a3;
}

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

.directory-button.secondary:hover:not(:disabled) {
  background: #5a6268;
}

.upload-button:disabled,
.directory-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* File Upload Info */
.file-upload-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.supported-formats h4,
.upload-tips h4 {
  margin: 0 0 12px 0;
  color: #333;
  font-size: 16px;
  font-weight: 600;
}

.format-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.format-tag {
  padding: 4px 8px;
  background: #e9ecef;
  border-radius: 4px;
  font-size: 12px;
  font-family: monospace;
  color: #495057;
}

.format-tag.more {
  background: #007bff;
  color: white;
  font-weight: 500;
}

.upload-tips ul {
  margin: 0;
  padding-left: 20px;
  color: #666;
}

.upload-tips li {
  margin-bottom: 6px;
  font-size: 14px;
}

/* Mobile-specific styles */
.file-upload-container.mobile .drop-zone {
  padding: 32px 16px;
  border-radius: 8px;
}

.file-upload-container.mobile .drop-zone-icon {
  font-size: 36px;
}

.file-upload-container.mobile .drop-zone-text h3 {
  font-size: 18px;
}

.file-upload-container.mobile .drop-zone-text p {
  font-size: 13px;
}

.file-upload-container.mobile .drop-zone-actions {
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.file-upload-container.mobile .upload-button,
.file-upload-container.mobile .directory-button {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
}

.file-upload-container.mobile .file-upload-info {
  grid-template-columns: 1fr;
  gap: 16px;
}

.file-upload-container.mobile .supported-formats h4,
.file-upload-container.mobile .upload-tips h4 {
  font-size: 14px;
}

.file-upload-container.mobile .upload-tips li {
  font-size: 13px;
}

/* Touch-friendly enhancements */
@media (hover: none) and (pointer: coarse) {
  .drop-zone {
    min-height: 120px;
    padding: 24px;
  }
  
  .upload-button,
  .directory-button {
    min-height: 44px;
    padding: 12px 20px;
    font-size: 16px;
  }
  
  .drop-zone:active:not(.disabled) {
    transform: scale(0.99);
    background: #e6f3ff;
  }
  
  .upload-button:active:not(:disabled),
  .directory-button:active:not(:disabled) {
    transform: scale(0.98);
  }
}

/* Responsive design */
@media (max-width: 768px) {
  .file-upload-info {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .drop-zone {
    padding: 24px 16px;
  }
  
  .drop-zone-actions {
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }
  
  .upload-button,
  .directory-button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .file-upload-container {
    gap: 12px;
  }
  
  .drop-zone {
    padding: 20px 12px;
  }
  
  .drop-zone-icon {
    font-size: 32px;
  }
  
  .drop-zone-text h3 {
    font-size: 16px;
  }
  
  .drop-zone-text p {
    font-size: 12px;
  }
  
  .format-tags {
    gap: 4px;
  }
  
  .format-tag {
    font-size: 11px;
    padding: 3px 6px;
  }
  
  .upload-tips li {
    font-size: 12px;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .drop-zone {
    padding: 16px;
    min-height: 80px;
  }
  
  .drop-zone-icon {
    font-size: 28px;
  }
  
  .drop-zone-actions {
    flex-direction: row;
    justify-content: center;
  }
  
  .upload-button,
  .directory-button {
    width: auto;
    min-width: 120px;
  }
}.error-display {
  background-color: #fee;
  border: 1px solid #fcc;
  border-radius: 4px;
  padding: 12px;
  margin: 8px 0;
  color: #c33;
}

.error-display__title {
  font-weight: bold;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.error-display__icon {
  color: #e53e3e;
  font-size: 16px;
}

.error-display__message {
  margin-bottom: 8px;
  line-height: 1.4;
}

.error-display__details {
  font-size: 0.9em;
  color: #666;
  background-color: #f9f9f9;
  padding: 8px;
  border-radius: 3px;
  font-family: monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

.error-display__actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
}

.error-display__retry-btn {
  background-color: #e53e3e;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9em;
}

.error-display__retry-btn:hover {
  background-color: #c53030;
}

.error-display__dismiss-btn {
  background-color: transparent;
  color: #666;
  border: 1px solid #ccc;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9em;
}

.error-display__dismiss-btn:hover {
  background-color: #f5f5f5;
}

.error-display--warning {
  background-color: #fffbeb;
  border-color: #fed7aa;
  color: #92400e;
}

.error-display--warning .error-display__icon {
  color: #f59e0b;
}

.error-display--info {
  background-color: #eff6ff;
  border-color: #bfdbfe;
  color: #1e40af;
}

.error-display--info .error-display__icon {
  color: #3b82f6;
}/* Scanner Component Styles */

.scanner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

.scanner-header {
  margin-bottom: 24px;
}

.scanner-header h2 {
  margin: 0 0 16px 0;
  color: #1a1a1a;
  font-size: 28px;
  font-weight: 600;
}

.scanner-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid #e5e5e5;
}

.tab {
  padding: 12px 24px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  color: #666;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.tab:hover {
  color: #333;
  background-color: #f5f5f5;
}

.tab.active {
  color: #0066cc;
  border-bottom-color: #0066cc;
}

.tab:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.scanner-content {
  margin-top: 24px;
}

/* Text Input Styles */
.text-input-container {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
}

.input-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
}

.input-header label {
  font-weight: 500;
  color: #333;
  margin: 0;
}

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

.text-input-wrapper {
  position: relative;
  background: #fff;
}

.syntax-highlight {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow: hidden;
  pointer-events: none;
  color: transparent;
  z-index: 1;
}

.text-input {
  position: relative;
  width: 100%;
  padding: 16px;
  border: none;
  outline: none;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
  background: transparent;
  color: #333;
  z-index: 2;
}

.text-input::placeholder {
  color: #999;
}

.input-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: #f8f9fa;
  border-top: 1px solid #e9ecef;
  font-size: 12px;
  color: #666;
}

.input-stats {
  display: flex;
  gap: 16px;
}

.input-hint {
  font-style: italic;
}

/* Syntax highlighting colors */
.highlight-aws-key {
  background-color: #ffebee;
  color: #c62828;
  font-weight: 600;
}

.highlight-secret {
  background-color: #fff3e0;
  color: #ef6c00;
}

.highlight-env {
  background-color: #e8f5e8;
  color: #2e7d32;
}

.highlight-string {
  background-color: #f3e5f5;
  color: #7b1fa2;
}

/* File Upload Styles */
.file-upload-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.drop-zone {
  border: 2px dashed #ccc;
  border-radius: 12px;
  padding: 48px 24px;
  text-align: center;
  background: #fafafa;
  transition: all 0.3s ease;
  cursor: pointer;
}

.drop-zone:hover {
  border-color: #0066cc;
  background: #f0f8ff;
}

.drop-zone.drag-over {
  border-color: #0066cc;
  background: #e6f3ff;
  transform: scale(1.02);
}

.drop-zone.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.drop-zone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.drop-zone-icon {
  font-size: 48px;
  opacity: 0.7;
}

.drop-zone-text h3 {
  margin: 0;
  color: #333;
  font-size: 20px;
  font-weight: 600;
}

.drop-zone-text p {
  margin: 4px 0 0 0;
  color: #666;
  font-size: 14px;
}

.drop-zone-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.file-upload-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.supported-formats h4,
.upload-tips h4 {
  margin: 0 0 12px 0;
  color: #333;
  font-size: 16px;
  font-weight: 600;
}

.format-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.format-tag {
  padding: 4px 8px;
  background: #e9ecef;
  border-radius: 4px;
  font-size: 12px;
  font-family: monospace;
  color: #495057;
}

.upload-tips ul {
  margin: 0;
  padding-left: 20px;
  color: #666;
}

.upload-tips li {
  margin-bottom: 6px;
  font-size: 14px;
}

/* Progress Indicator Styles */
.progress-indicator {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 320px;
  z-index: 1000;
}

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

.progress-title {
  font-weight: 600;
  color: #333;
}

.progress-stats {
  font-size: 14px;
  color: #666;
}

.progress-bar-container {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.progress-bar {
  flex: 1;
  height: 8px;
  background: #e9ecef;
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #0066cc, #0052a3);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.progress-percentage {
  font-size: 14px;
  font-weight: 600;
  color: #0066cc;
  min-width: 40px;
  text-align: right;
}

.progress-current-file {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.current-file-label {
  font-size: 12px;
  color: #666;
  font-weight: 500;
}

.current-file-name {
  font-size: 14px;
  color: #333;
  font-family: monospace;
  word-break: break-all;
}

.progress-animation {
  display: flex;
  justify-content: center;
}

.scanning-dots {
  display: flex;
  gap: 4px;
}

.scanning-dots span {
  animation: scanning-pulse 1.4s infinite ease-in-out;
  color: #0066cc;
  font-size: 16px;
}

.scanning-dots span:nth-child(1) { animation-delay: -0.32s; }
.scanning-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes scanning-pulse {
  0%, 80%, 100% {
    opacity: 0.3;
    transform: scale(0.8);
  }
  40% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Button Styles */
.scan-button,
.clear-button,
.upload-button,
.directory-button {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.primary {
  background: #0066cc;
  color: white;
}

.primary:hover:not(:disabled) {
  background: #0052a3;
}

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

.secondary:hover:not(:disabled) {
  background: #5a6268;
}

.scan-button:disabled,
.clear-button:disabled,
.upload-button:disabled,
.directory-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Scan History Styles */
.scan-history {
  margin-top: 32px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.scan-history h3 {
  margin: 0 0 12px 0;
  color: #333;
  font-size: 18px;
  font-weight: 600;
}

.history-summary {
  color: #666;
  font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .scanner {
    padding: 16px;
  }
  
  .scanner-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  
  .scanner-tabs::-webkit-scrollbar {
    display: none;
  }
  
  .tab {
    flex-shrink: 0;
    padding: 10px 16px;
    font-size: 14px;
  }
  
  .file-upload-info {
    grid-template-columns: 1fr;
  }
  
  .progress-indicator {
    bottom: 16px;
    right: 16px;
    left: 16px;
    min-width: auto;
  }
  
  .input-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .input-actions {
    align-self: stretch;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .text-input {
    font-size: 16px; /* Prevent zoom on iOS */
    min-height: 120px;
  }
  
  .drop-zone {
    padding: 32px 16px;
  }
  
  .drop-zone-actions {
    flex-direction: column;
    gap: 8px;
  }
  
  .drop-zone-actions button {
    width: 100%;
  }
}

/* Touch-friendly enhancements */
@media (hover: none) and (pointer: coarse) {
  .tab {
    min-height: 44px;
    padding: 12px 20px;
  }
  
  .scan-button,
  .clear-button,
  .upload-button,
  .directory-button {
    min-height: 44px;
    padding: 12px 20px;
    font-size: 16px;
  }
  
  .drop-zone {
    min-height: 120px;
    padding: 24px;
  }
  
  /* Add touch feedback */
  .tab:active {
    background-color: #e9ecef;
    transform: scale(0.98);
  }
  
  .scan-button:active,
  .clear-button:active,
  .upload-button:active,
  .directory-button:active {
    transform: scale(0.98);
  }
  
  .drop-zone:active {
    transform: scale(0.99);
  }
  
  /* Improve text input on touch devices */
  .text-input {
    -webkit-appearance: none;
    border-radius: 8px;
  }
}

/* Small mobile screens */
@media (max-width: 480px) {
  .scanner {
    padding: 12px;
  }
  
  .scanner-header h2 {
    font-size: 24px;
  }
  
  .input-header {
    padding: 12px 16px;
  }
  
  .text-input {
    padding: 12px;
    font-size: 16px;
  }
  
  .input-footer {
    padding: 8px 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .input-stats {
    gap: 12px;
  }
  
  .progress-indicator {
    bottom: 12px;
    right: 12px;
    left: 12px;
    padding: 16px;
  }
  
  .drop-zone {
    padding: 24px 16px;
  }
  
  .drop-zone-text h3 {
    font-size: 18px;
  }
  
  .drop-zone-text p {
    font-size: 13px;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .text-input {
    min-height: 80px;
  }
  
  .drop-zone {
    padding: 20px 16px;
    min-height: 80px;
  }
  
  .progress-indicator {
    max-height: 40vh;
    overflow-y: auto;
  }
}
/* Enhanc
ed Scanner Styles */
.scanner.enhanced {
  position: relative;
}

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

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

.real-time-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #666;
  cursor: pointer;
}

.real-time-toggle input[type="checkbox"] {
  margin: 0;
}

.clear-all-button {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.scanning-indicator {
  color: #0066cc;
  animation: pulse 1s infinite;
  margin-left: 8px;
}

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

.real-time-results {
  color: #0066cc;
  font-weight: 500;
}

/* Error Display Styles */
.error-display {
  margin: 16px 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.error-display.recoverable {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
}

.error-display.critical {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
}

.error-content {
  display: flex;
  align-items: flex-start;
  padding: 16px;
  gap: 12px;
}

.error-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.error-details {
  flex: 1;
}

.error-message {
  font-weight: 500;
  color: #721c24;
  margin-bottom: 4px;
}

.error-location {
  font-size: 12px;
  color: #856404;
  font-family: monospace;
}

.error-dismiss {
  background: none;
  border: none;
  font-size: 18px;
  color: #721c24;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.error-dismiss:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

.error-actions {
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.05);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.error-action-button {
  padding: 8px 16px;
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.error-action-button:hover {
  background: #c82333;
}

/* Scan History Styles */
.scan-history {
  margin-top: 32px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
  overflow: hidden;
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: #e9ecef;
  border-bottom: 1px solid #dee2e6;
}

.history-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: #333;
}

.history-toggle h3 {
  margin: 0;
  font-weight: 600;
}

.toggle-icon {
  font-size: 12px;
  transition: transform 0.2s ease;
}

.clear-history-button {
  padding: 6px 12px;
  font-size: 12px;
}

.history-content {
  padding: 16px;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.history-entry {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.history-entry:hover {
  border-color: #0066cc;
  box-shadow: 0 2px 8px rgba(0, 102, 204, 0.1);
}

.history-entry.severity-high {
  border-left: 4px solid #dc3545;
}

.history-entry.severity-medium {
  border-left: 4px solid #ffc107;
}

.history-entry.severity-low {
  border-left: 4px solid #28a745;
}

.entry-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.entry-info {
  flex: 1;
}

.entry-source {
  font-weight: 500;
  color: #333;
  margin-bottom: 4px;
}

.entry-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: #666;
}

.entry-results {
  display: flex;
  align-items: center;
  gap: 8px;
}

.result-count {
  background: #e9ecef;
  color: #495057;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  min-width: 24px;
  text-align: center;
}

.result-count.severity-high {
  background: #dc3545;
  color: white;
}

.result-count.severity-medium {
  background: #ffc107;
  color: #212529;
}

.result-count.severity-low {
  background: #28a745;
  color: white;
}

.result-label {
  font-size: 12px;
  color: #666;
}

.entry-preview {
  margin-top: 8px;
}

.preview-types {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.type-tag {
  padding: 2px 6px;
  background: #e9ecef;
  border-radius: 3px;
  font-size: 10px;
  color: #495057;
  text-transform: capitalize;
}

/* Enhanced responsive design */
@media (max-width: 768px) {
  .header-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .header-actions {
    align-self: stretch;
    justify-content: space-between;
  }
  
  .history-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .entry-main {
    flex-direction: column;
    gap: 8px;
  }
  
  .entry-results {
    align-self: flex-start;
  }
}/
* Accessibility utilities */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Skip link styles */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: #000;
  color: #fff;
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 9999;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 6px;
}

/* Focus management */
.scanner:focus-within {
  outline: none;
}

/* Improved tab accessibility */
.scanner-tabs {
  position: relative;
}

.scanner-tabs::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: #e5e5e5;
  z-index: -1;
}

.tab:focus {
  outline: 2px solid #0066cc;
  outline-offset: -2px;
  z-index: 1;
}

.tab:focus:not(:focus-visible) {
  outline: none;
}

.tab:focus-visible {
  outline: 2px solid #0066cc;
  outline-offset: -2px;
  z-index: 1;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .tab {
    border-width: 2px;
  }
  
  .tab.active {
    border-bottom-width: 3px;
  }
  
  .tab:focus,
  .tab:focus-visible {
    outline-width: 3px;
  }
}

/* Screen reader announcements */
#scan-status {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Keyboard navigation indicators */
.scanner-content:focus-within {
  outline: 1px solid transparent;
}

/* Ensure proper focus order */
.scanner {
  isolation: isolate;
}

.scanner-header {
  position: relative;
  z-index: 1;
}

.scanner-content {
  position: relative;
  z-index: 0;
}.syntax-highlighter {
  border: 1px solid #dee2e6;
  border-radius: 6px;
  overflow: hidden;
  background: #f8f9fa;
}

.code-block {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 13px;
  line-height: 1.5;
  overflow-x: auto;
}

.code-line {
  display: flex;
  align-items: flex-start;
  min-height: 20px;
  transition: background-color 0.2s ease;
}

.code-line:hover {
  background-color: #f1f3f4;
}

.code-line.highlight-line {
  background-color: #fff3cd;
  border-left: 3px solid #ffc107;
}

.code-line.context-before {
  background-color: #f8f9fa;
  opacity: 0.8;
}

.code-line.context-after {
  background-color: #f8f9fa;
  opacity: 0.8;
}

.line-number {
  display: inline-block;
  width: 50px;
  padding: 2px 12px;
  text-align: right;
  color: #6c757d;
  background-color: #e9ecef;
  border-right: 1px solid #dee2e6;
  user-select: none;
  flex-shrink: 0;
  font-size: 11px;
}

.highlight-line .line-number {
  background-color: #ffeaa7;
  color: #856404;
  font-weight: 600;
}

.line-content {
  padding: 2px 12px;
  flex: 1;
  white-space: pre;
  overflow-x: auto;
}

.credential-highlight {
  background-color: #dc3545;
  color: white;
  padding: 1px 3px;
  border-radius: 3px;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* Language-specific syntax highlighting */
.language-javascript .line-content,
.language-typescript .line-content {
  color: #333;
}

.language-python .line-content {
  color: #333;
}

.language-java .line-content {
  color: #333;
}

.language-json .line-content {
  color: #333;
}

.language-yaml .line-content {
  color: #333;
}

.language-xml .line-content,
.language-html .line-content {
  color: #333;
}

.language-css .line-content {
  color: #333;
}

.language-bash .line-content {
  color: #333;
}

/* Basic syntax highlighting patterns */
.language-javascript .line-content,
.language-typescript .line-content {
  /* Keywords would be highlighted here in a full implementation */
}

/* Responsive design */
@media (max-width: 768px) {
  .syntax-highlighter {
    font-size: 12px;
  }
  
  .line-number {
    width: 40px;
    padding: 2px 8px;
    font-size: 10px;
  }
  
  .line-content {
    padding: 2px 8px;
  }
  
  .code-block {
    overflow-x: scroll;
  }
}

/* Scrollbar styling for webkit browsers */
.code-block::-webkit-scrollbar {
  height: 8px;
}

.code-block::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.code-block::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

.code-block::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}.result-item {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  margin-bottom: 16px;
  background: white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: all 0.2s ease;
}

.result-item:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Severity-based border colors */
.result-item.severity-high {
  border-left: 4px solid #dc3545;
}

.result-item.severity-medium {
  border-left: 4px solid #fd7e14;
}

.result-item.severity-low {
  border-left: 4px solid #ffc107;
}

.result-item.severity-info {
  border-left: 4px solid #17a2b8;
}

.result-item.selected {
  background-color: #f0f8ff;
  border-color: #007bff;
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.15);
}

.result-selection {
  display: flex;
  align-items: center;
  padding: 4px;
  cursor: default;
}

.result-checkbox {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #007bff;
}

.result-checkbox:focus {
  outline: 2px solid #007bff;
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.result-header {
  padding: 16px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.2s ease;
  gap: 12px;
}

.result-header:hover {
  background-color: #f8f9fa;
}

.result-main-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.result-type-badge {
  display: flex;
  align-items: center;
  gap: 12px;
}

.badge {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge.severity-high {
  background-color: #dc3545;
  color: white;
}

.badge.severity-medium {
  background-color: #fd7e14;
  color: white;
}

.badge.severity-low {
  background-color: #ffc107;
  color: #212529;
}

.badge.severity-info {
  background-color: #17a2b8;
  color: white;
}

.severity-indicator {
  font-size: 11px;
  font-weight: 600;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.result-location {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
}

.filename {
  font-weight: 600;
  color: #495057;
}

.line-number {
  color: #6c757d;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.confidence {
  color: #6c757d;
  font-size: 12px;
}

.result-toggle {
  display: flex;
  align-items: center;
}

.expand-icon {
  font-size: 12px;
  color: #6c757d;
  transition: transform 0.2s ease;
  user-select: none;
}

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

.result-details {
  border-top: 1px solid #dee2e6;
  padding: 20px;
  background-color: #f8f9fa;
}

.result-details h4 {
  margin: 0 0 12px 0;
  font-size: 14px;
  font-weight: 600;
  color: #495057;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.result-credential {
  margin-bottom: 24px;
}

.credential-value {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 4px;
}

.masked-value {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 13px;
  background-color: #f8f9fa;
  padding: 4px 8px;
  border-radius: 3px;
  color: #e83e8c;
  font-weight: 600;
}

.position-info {
  font-size: 12px;
  color: #6c757d;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.result-context {
  margin-bottom: 24px;
}

.result-metadata {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.metadata-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.metadata-item strong {
  color: #495057;
  min-width: 80px;
}

.severity-text.severity-high {
  color: #dc3545;
  font-weight: 600;
}

.severity-text.severity-medium {
  color: #fd7e14;
  font-weight: 600;
}

.severity-text.severity-low {
  color: #f57c00;
  font-weight: 600;
}

.severity-text.severity-info {
  color: #17a2b8;
  font-weight: 600;
}

/* Responsive design */
@media (max-width: 768px) {
  .result-header {
    padding: 12px;
  }
  
  .result-main-info {
    gap: 6px;
  }
  
  .result-location {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  
  .result-details {
    padding: 16px;
  }
  
  .result-metadata {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  
  .credential-value {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .badge {
    font-size: 11px;
    padding: 3px 6px;
  }
  
  .masked-value {
    font-size: 12px;
    word-break: break-all;
  }
}

/* Touch-friendly enhancements */
@media (hover: none) and (pointer: coarse) {
  .result-header {
    min-height: 44px;
    padding: 16px;
  }
  
  .result-item {
    margin-bottom: 12px;
  }
  
  /* Add touch feedback */
  .result-header:active {
    background-color: #f0f0f0;
    transform: scale(0.99);
  }
  
  .expand-icon {
    font-size: 16px;
    padding: 8px;
    margin: -8px;
  }
}

/* Small mobile screens */
@media (max-width: 480px) {
  .result-item {
    margin-bottom: 8px;
    border-radius: 6px;
  }
  
  .result-header {
    padding: 10px;
  }
  
  .result-details {
    padding: 12px;
  }
  
  .result-type-badge {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  
  .filename {
    font-size: 13px;
    word-break: break-all;
  }
  
  .line-number {
    font-size: 12px;
  }
  
  .confidence {
    font-size: 11px;
  }
  
  .masked-value {
    font-size: 11px;
    padding: 3px 6px;
  }
  
  .position-info {
    font-size: 11px;
  }
}

/* Very small screens */
@media (max-width: 375px) {
  .result-header {
    padding: 8px;
  }
  
  .result-details {
    padding: 10px;
  }
  
  .result-main-info {
    gap: 4px;
  }
  
  .badge {
    font-size: 10px;
    padding: 2px 4px;
  }
  
  .severity-indicator {
    font-size: 10px;
  }
}.result-filters {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.filters-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #dee2e6;
}

.filters-header h3 {
  margin: 0;
  color: #495057;
  font-size: 18px;
}

.filters-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.filter-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-label {
  font-weight: 600;
  color: #495057;
  font-size: 14px;
  margin-bottom: 4px;
}

.search-input {
  padding: 8px 12px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.2s ease;
}

.search-input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

.sort-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.sort-btn {
  padding: 6px 12px;
  border: 1px solid #ced4da;
  background: white;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.sort-btn:hover {
  background-color: #f8f9fa;
  border-color: #adb5bd;
}

.sort-btn.active {
  background-color: #007bff;
  color: white;
  border-color: #007bff;
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  background: #f8f9fa;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
  font-size: 14px;
}

.checkbox-label:hover {
  background-color: #e9ecef;
}

.checkbox-label input[type="checkbox"] {
  margin: 0;
  cursor: pointer;
}

.severity-text {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.5px;
}

.severity-text.severity-high {
  color: #dc3545;
}

.severity-text.severity-medium {
  color: #fd7e14;
}

.severity-text.severity-low {
  color: #f57c00;
}

.severity-text.severity-info {
  color: #17a2b8;
}

.files-group {
  max-height: 150px;
}

.filename-text {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 12px;
  color: #495057;
}

/* File Selection Styles */
.selection-section {
  border-top: 2px solid #e9ecef;
  padding-top: 16px;
  margin-top: 8px;
}

.file-selection-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
  padding: 12px;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  background: #f8f9fa;
}

.file-selection-item {
  border: 1px solid #dee2e6;
  border-radius: 4px;
  background: white;
  transition: all 0.2s ease;
}

.file-selection-item:hover {
  border-color: #007bff;
  box-shadow: 0 1px 3px rgba(0,123,255,0.1);
}

.file-selection-label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  cursor: pointer;
  margin: 0;
}

.file-selection-checkbox {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #007bff;
  flex-shrink: 0;
}

.file-selection-checkbox:focus {
  outline: 2px solid #007bff;
  outline-offset: 2px;
}

.file-selection-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 8px;
}

.file-result-count {
  background: #e3f2fd;
  color: #1976d2;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
  border: 1px solid #2196f3;
}

/* Severity Selection Styles */
.severity-selection-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
  padding: 12px;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  background: #f8f9fa;
}

.severity-selection-item {
  border: 1px solid #dee2e6;
  border-radius: 4px;
  background: white;
  transition: all 0.2s ease;
}

.severity-selection-item:hover {
  border-color: #007bff;
  box-shadow: 0 1px 3px rgba(0,123,255,0.1);
}

.severity-selection-label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  cursor: pointer;
  margin: 0;
}

.severity-selection-checkbox {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #007bff;
  flex-shrink: 0;
}

.severity-selection-checkbox:focus {
  outline: 2px solid #007bff;
  outline-offset: 2px;
}

.severity-selection-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 8px;
}

.severity-result-count {
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}

.severity-count-high {
  background: #ffebee;
  color: #c62828;
  border: 1px solid #dc3545;
}

.severity-count-medium {
  background: #fff3e0;
  color: #ef6c00;
  border: 1px solid #fd7e14;
}

.severity-count-low {
  background: #fffde7;
  color: #f57c00;
  border: 1px solid #ffc107;
}

.severity-count-info {
  background: #e0f2f1;
  color: #00695c;
  border: 1px solid #17a2b8;
}

/* Selection Status Styles */
.selection-status-section {
  background: #e8f5e8;
  border: 1px solid #4caf50;
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 8px;
}

.selection-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.selection-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.selection-count {
  font-weight: 600;
  color: #2e7d32;
  font-size: 14px;
}

.selection-mode {
  font-size: 12px;
  color: #388e3c;
  font-style: italic;
}

.selection-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.selection-actions .btn {
  padding: 4px 8px;
  font-size: 12px;
  white-space: nowrap;
}

/* Responsive adjustments for selection status */
@media (max-width: 768px) {
  .selection-status {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  
  .selection-actions {
    justify-content: stretch;
  }
  
  .selection-actions .btn {
    flex: 1;
  }
}

/* Responsive design */
@media (max-width: 768px) {
  .result-filters {
    padding: 16px;
  }
  
  .filters-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .sort-buttons {
    justify-content: flex-start;
  }
  
  .sort-btn {
    flex: 1;
    min-width: 0;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .sort-buttons {
    flex-direction: column;
  }
  
  .sort-btn {
    width: 100%;
  }
}/* Export History Modal Styles */
.export-history-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.export-history-modal {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  width: 90%;
  max-width: 1200px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.export-history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #e0e0e0;
  background-color: #f8f9fa;
}

.export-history-header h2 {
  margin: 0;
  color: #333;
  font-size: 1.5rem;
}

.close-button {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.close-button:hover {
  background-color: #e0e0e0;
  color: #333;
}

/* Statistics Section */
.export-history-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 20px;
  background-color: #f8f9fa;
  border-bottom: 1px solid #e0e0e0;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 120px;
}

.stat-label {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 1.2rem;
  font-weight: bold;
  color: #333;
}

.stat-value.success {
  color: #28a745;
}

.stat-value.failed {
  color: #dc3545;
}

/* Filters Section */
.export-history-filters {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 15px 20px;
  background-color: #fff;
  border-bottom: 1px solid #e0e0e0;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-group label {
  font-weight: 500;
  color: #333;
  white-space: nowrap;
}

.filter-group select {
  padding: 6px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: white;
  font-size: 0.9rem;
}

.clear-history-button {
  margin-left: auto;
  padding: 8px 16px;
  background-color: #dc3545;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background-color 0.2s;
}

.clear-history-button:hover:not(:disabled) {
  background-color: #c82333;
}

.clear-history-button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

/* History Content */
.export-history-content {
  flex: 1;
  overflow: auto;
  padding: 0;
}

.no-history {
  text-align: center;
  padding: 40px;
  color: #666;
  font-style: italic;
}

/* History Table */
.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.history-table th,
.history-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #e0e0e0;
}

.history-table th {
  background-color: #f8f9fa;
  font-weight: 600;
  color: #333;
  position: sticky;
  top: 0;
  z-index: 10;
}

.history-table th.sortable {
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s;
}

.history-table th.sortable:hover {
  background-color: #e9ecef;
}

.history-table tbody tr:hover {
  background-color: #f8f9fa;
}

.success-row {
  border-left: 3px solid #28a745;
}

.failed-row {
  border-left: 3px solid #dc3545;
}

/* Format Badges */
.format-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
}

.format-json {
  background-color: #e3f2fd;
  color: #1976d2;
}

.format-csv {
  background-color: #e8f5e8;
  color: #388e3c;
}

.format-html {
  background-color: #fff3e0;
  color: #f57c00;
}

.format-xml {
  background-color: #f3e5f5;
  color: #7b1fa2;
}

.format-sarif {
  background-color: #fce4ec;
  color: #c2185b;
}

.format-markdown {
  background-color: #e0f2f1;
  color: #00695c;
}

.format-pdf {
  background-color: #ffebee;
  color: #d32f2f;
}

.format-excel {
  background-color: #e8f5e8;
  color: #2e7d32;
}

/* Status Badges */
.status-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
}

.status-badge.success {
  background-color: #d4edda;
  color: #155724;
}

.status-badge.failed {
  background-color: #f8d7da;
  color: #721c24;
}

/* Filename column */
.filename {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Action Buttons */
.action-buttons {
  display: flex;
  gap: 8px;
}

.re-export-button,
.delete-button {
  padding: 4px 8px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: background-color 0.2s;
}

.re-export-button {
  background-color: #007bff;
  color: white;
}

.re-export-button:hover {
  background-color: #0056b3;
}

.delete-button {
  background-color: #6c757d;
  color: white;
}

.delete-button:hover {
  background-color: #545b62;
}

/* Footer */
.export-history-footer {
  padding: 15px 20px;
  background-color: #f8f9fa;
  border-top: 1px solid #e0e0e0;
  text-align: center;
  color: #666;
  font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .export-history-modal {
    width: 95%;
    max-height: 95vh;
  }
  
  .export-history-stats {
    flex-direction: column;
    gap: 10px;
  }
  
  .stat-item {
    flex-direction: row;
    justify-content: space-between;
    min-width: auto;
  }
  
  .export-history-filters {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  
  .filter-group {
    justify-content: space-between;
  }
  
  .clear-history-button {
    margin-left: 0;
    align-self: center;
  }
  
  .history-table {
    font-size: 0.8rem;
  }
  
  .history-table th,
  .history-table td {
    padding: 8px 4px;
  }
  
  .filename {
    max-width: 120px;
  }
  
  .action-buttons {
    flex-direction: column;
    gap: 4px;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .export-history-modal {
    background: #2d3748;
    color: #e2e8f0;
  }
  
  .export-history-header {
    background-color: #4a5568;
    border-bottom-color: #4a5568;
  }
  
  .export-history-header h2 {
    color: #e2e8f0;
  }
  
  .close-button {
    color: #a0aec0;
  }
  
  .close-button:hover {
    background-color: #4a5568;
    color: #e2e8f0;
  }
  
  .export-history-stats {
    background-color: #4a5568;
    border-bottom-color: #4a5568;
  }
  
  .stat-label {
    color: #a0aec0;
  }
  
  .stat-value {
    color: #e2e8f0;
  }
  
  .export-history-filters {
    background-color: #2d3748;
    border-bottom-color: #4a5568;
  }
  
  .filter-group label {
    color: #e2e8f0;
  }
  
  .filter-group select {
    background-color: #4a5568;
    border-color: #4a5568;
    color: #e2e8f0;
  }
  
  .history-table th {
    background-color: #4a5568;
    color: #e2e8f0;
  }
  
  .history-table th.sortable:hover {
    background-color: #2d3748;
  }
  
  .history-table tbody tr:hover {
    background-color: #4a5568;
  }
  
  .history-table th,
  .history-table td {
    border-bottom-color: #4a5568;
  }
  
  .export-history-footer {
    background-color: #4a5568;
    border-top-color: #4a5568;
    color: #a0aec0;
  }
}

/* Accessibility improvements */
.export-history-modal:focus-within {
  outline: 2px solid #007bff;
  outline-offset: 2px;
}

.sortable:focus {
  outline: 2px solid #007bff;
  outline-offset: -2px;
}

.re-export-button:focus,
.delete-button:focus,
.clear-history-button:focus,
.close-button:focus {
  outline: 2px solid #007bff;
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .export-history-modal {
    border: 2px solid #000;
  }
  
  .format-badge,
  .status-badge {
    border: 1px solid currentColor;
  }
  
  .history-table th,
  .history-table td {
    border: 1px solid #000;
  }
}/* Export Modal Styles */

.export-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.export-modal {
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.export-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 24px 0 24px;
  border-bottom: 1px solid #e9ecef;
  margin-bottom: 24px;
}

.export-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: #212529;
}

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

.export-history-button {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.9rem;
  cursor: pointer;
  color: #495057;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.export-history-button:hover {
  background: #e9ecef;
  border-color: #adb5bd;
  color: #212529;
}

.export-history-button:focus {
  outline: 2px solid #007bff;
  outline-offset: 2px;
}

.export-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #6c757d;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.export-modal-close:hover {
  background: #f8f9fa;
  color: #495057;
}

.export-modal-close:focus {
  outline: 2px solid #007bff;
  outline-offset: 2px;
}

.export-modal-content {
  flex: 1;
  overflow-y: auto;
  padding: 0 24px;
}

.export-info {
  margin-bottom: 32px;
}

.export-target-info h3 {
  margin: 0 0 16px 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #495057;
}

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

.target-count {
  font-weight: 600;
  color: #007bff;
  font-size: 1.1rem;
}

.original-count {
  color: #6c757d;
  font-size: 0.9rem;
}

.applied-filters {
  background: #f8f9fa;
  padding: 16px;
  border-radius: 8px;
  border-left: 4px solid #007bff;
}

.applied-filters h4 {
  margin: 0 0 12px 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: #495057;
}

.applied-filters ul {
  margin: 0;
  padding-left: 20px;
}

.applied-filters li {
  margin-bottom: 4px;
  color: #6c757d;
  font-size: 0.9rem;
}

.export-format-selection {
  margin-bottom: 32px;
}

.export-format-selection h3 {
  margin: 0 0 16px 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #495057;
}

.format-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.format-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: white;
}

.format-option:hover {
  border-color: #007bff;
  background: #f8f9fa;
}

.format-option.selected {
  border-color: #007bff;
  background: #e3f2fd;
}

.format-option:focus {
  outline: 2px solid #007bff;
  outline-offset: 2px;
}

.format-icon {
  font-size: 24px;
  min-width: 32px;
  text-align: center;
}

.format-info {
  flex: 1;
}

.format-name {
  font-weight: 600;
  color: #212529;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.new-badge {
  background: #28a745;
  color: white;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 500;
}

.format-description {
  font-size: 0.9rem;
  color: #6c757d;
  line-height: 1.4;
}

.export-options {
  margin-bottom: 32px;
}

.export-options h3 {
  margin: 0 0 16px 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #495057;
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.option-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.option-checkbox:hover {
  background: #f8f9fa;
}

.option-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.option-checkbox span {
  font-size: 0.9rem;
  color: #495057;
}

.export-preview-section {
  margin-bottom: 32px;
}

.preview-header {
  margin-bottom: 16px;
}

.preview-header h3 {
  margin: 0 0 12px 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #495057;
}

.preview-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.preview-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.preview-format-badge {
  background: #007bff;
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
}

.preview-size-info {
  color: #6c757d;
  font-size: 0.9rem;
}

.preview-toggle {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  color: #495057;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.preview-toggle:hover {
  background: #e9ecef;
  border-color: #adb5bd;
}

.preview-content {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  overflow: hidden;
  background: white;
}

.preview-toolbar {
  background: #f8f9fa;
  padding: 12px;
  border-bottom: 1px solid #dee2e6;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.preview-note {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #856404;
  font-size: 0.85rem;
  flex: 1;
}

.preview-icon {
  font-size: 1rem;
}

.preview-remaining {
  color: #6c757d;
  font-size: 0.8rem;
  margin-left: 4px;
}

.preview-options {
  display: flex;
  align-items: center;
  gap: 12px;
}

.preview-format-info {
  color: #6c757d;
  font-size: 0.8rem;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.preview-code-container {
  position: relative;
}

.preview-code {
  background: #f8f9fa;
  padding: 16px;
  margin: 0;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.8rem;
  line-height: 1.5;
  color: #495057;
  max-height: 400px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
  border: none;
}

.preview-overlay {
  position: absolute;
  top: 8px;
  right: 8px;
}

.preview-refresh {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #dee2e6;
  border-radius: 4px;
  padding: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  backdrop-filter: blur(2px);
}

.preview-refresh:hover {
  background: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.export-modal-footer {
  padding: 24px;
  border-top: 1px solid #e9ecef;
  background: #f8f9fa;
}

.export-progress {
  margin-bottom: 20px;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 16px;
}

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

.progress-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.progress-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #495057;
}

.progress-percentage {
  font-size: 1.2rem;
  font-weight: 700;
  color: #007bff;
}

.progress-time {
  font-size: 0.8rem;
  color: #6c757d;
  text-align: right;
}

.progress-bar {
  width: 100%;
  height: 12px;
  background: #e9ecef;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 12px;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #007bff, #0056b3);
  border-radius: 6px;
  position: relative;
  overflow: hidden;
}

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

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

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

.progress-count {
  font-size: 0.85rem;
  color: #6c757d;
}

.progress-cancel {
  background: #dc3545;
  color: white;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.progress-cancel:hover {
  background: #c82333;
  transform: translateY(-1px);
}

.export-spinner {
  animation: spin 1s linear infinite;
  display: inline-block;
}

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

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

.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 100px;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: #007bff;
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: #0056b3;
}

.btn-primary:focus {
  outline: 2px solid #007bff;
  outline-offset: 2px;
}

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

.btn-secondary:hover:not(:disabled) {
  background: #545b62;
}

.btn-secondary:focus {
  outline: 2px solid #6c757d;
  outline-offset: 2px;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
  .export-modal-overlay {
    padding: 10px;
  }

  .export-modal {
    max-height: 95vh;
  }

  .export-modal-header,
  .export-modal-content,
  .export-modal-footer {
    padding-left: 16px;
    padding-right: 16px;
  }

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

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

  .target-summary {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .preview-controls {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .preview-toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .preview-note {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .preview-code {
    font-size: 0.75rem;
    max-height: 250px;
  }

  .modal-actions {
    flex-direction: column-reverse;
  }

  .btn {
    width: 100%;
  }

  .progress-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .progress-time {
    text-align: left;
  }

  .progress-details {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .progress-cancel {
    align-self: flex-end;
  }
}

/* アクセシビリティ対応 */
@media (prefers-reduced-motion: reduce) {
  .export-modal,
  .format-option,
  .btn,
  .progress-fill {
    transition: none;
  }

  @keyframes modalSlideIn {
    from, to {
      opacity: 1;
      transform: none;
    }
  }
}

/* 高コントラストモード対応 */
@media (prefers-contrast: high) {
  .export-modal {
    border: 2px solid #000;
  }

  .format-option {
    border-width: 2px;
  }

  .format-option.selected {
    border-color: #000;
    background: #fff;
  }

  .btn-primary {
    border: 2px solid #000;
  }

  .btn-secondary {
    border: 2px solid #000;
  }
}
/*
 Confirmation Dialog Styles */
.confirmation-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
  border-radius: 12px;
}

.confirmation-dialog {
  background: white;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

.confirmation-header {
  padding: 20px 20px 0 20px;
  border-bottom: 1px solid #e9ecef;
  margin-bottom: 20px;
}

.confirmation-header h3 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 600;
  color: #495057;
  text-align: center;
}

.confirmation-content {
  padding: 0 20px 20px 20px;
}

.confirmation-summary {
  margin-bottom: 20px;
}

.confirmation-format,
.confirmation-count {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f8f9fa;
}

.confirmation-label {
  font-weight: 600;
  color: #495057;
  min-width: 100px;
}

.confirmation-value {
  color: #007bff;
  font-weight: 500;
  text-align: right;
}

.confirmation-original {
  color: #6c757d;
  font-size: 0.9rem;
  font-weight: normal;
  display: block;
  margin-top: 2px;
}

.confirmation-filters {
  margin: 16px 0;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 6px;
  border-left: 4px solid #007bff;
}

.confirmation-filter-list {
  margin: 8px 0 0 0;
  padding-left: 20px;
}

.confirmation-filter-list li {
  margin-bottom: 4px;
  color: #6c757d;
  font-size: 0.9rem;
}

.confirmation-options {
  margin: 16px 0;
}

.confirmation-option-list {
  margin: 8px 0 0 0;
  padding-left: 0;
  list-style: none;
}

.confirmation-option-list li {
  margin-bottom: 6px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.confirmation-option-list li.enabled {
  color: #28a745;
}

.confirmation-option-list li.disabled {
  color: #6c757d;
}

.confirmation-warning {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 6px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #856404;
  font-size: 0.9rem;
}

.warning-icon {
  font-size: 1.2rem;
}

.confirmation-actions {
  padding: 20px;
  border-top: 1px solid #e9ecef;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Completion Notification Styles */
.completion-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
  border-radius: 12px;
}

.completion-notification {
  background: white;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  max-width: 450px;
  width: 90%;
  animation: completionSlideIn 0.3s ease-out;
}

@keyframes completionSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.completion-header {
  padding: 24px 20px 16px 20px;
  text-align: center;
  border-bottom: 1px solid #e9ecef;
}

.completion-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.completion-header h3 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 600;
  color: #28a745;
}

.completion-content {
  padding: 20px;
}

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

.completion-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid #f8f9fa;
}

.completion-label {
  font-weight: 500;
  color: #495057;
}

.completion-value {
  color: #007bff;
  font-weight: 500;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.9rem;
}

.completion-message {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  border-radius: 6px;
  padding: 12px;
  color: #155724;
  font-size: 0.9rem;
  text-align: center;
}

/* Responsive design for dialogs */
@media (max-width: 768px) {
  .confirmation-dialog,
  .completion-notification {
    width: 95%;
    margin: 10px;
  }

  .confirmation-format,
  .confirmation-count,
  .completion-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .confirmation-value,
  .completion-value {
    text-align: left;
  }

  .confirmation-actions {
    flex-direction: column-reverse;
  }

  .confirmation-actions .btn {
    width: 100%;
  }
}.result-summary {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #dee2e6;
}

.summary-header h2 {
  margin: 0;
  color: #495057;
  font-size: 24px;
}

.export-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}

.export-info {
  margin-bottom: 8px;
}

.export-count-info {
  font-size: 14px;
  color: #495057;
  font-weight: 500;
  background: #e3f2fd;
  padding: 6px 12px;
  border-radius: 16px;
  border: 1px solid #2196f3;
}

.export-buttons .btn-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}

.quick-export-buttons {
  display: flex;
  gap: 4px;
}

.btn {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: #007bff;
  color: white;
  border: 1px solid #007bff;
}

.btn-primary:hover:not(:disabled) {
  background: #0056b3;
  border-color: #0056b3;
}

.btn-outline {
  background: transparent;
  color: #007bff;
  border: 1px solid #007bff;
}

.btn-outline:hover:not(:disabled) {
  background: #007bff;
  color: white;
}

.btn-small {
  padding: 6px 12px;
  font-size: 12px;
}

.summary-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  transition: transform 0.2s ease;
}

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

.stat-card.filtered {
  background: #e3f2fd;
  border-color: #2196f3;
}

.stat-card.selected {
  background: #e8f5e8;
  border-color: #4caf50;
}

.stat-number {
  font-size: 32px;
  font-weight: 700;
  color: #495057;
  margin-bottom: 8px;
}

.stat-card.filtered .stat-number {
  color: #1976d2;
}

.stat-card.selected .stat-number {
  color: #388e3c;
}

.stat-label {
  font-size: 14px;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

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

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

.summary-section h3 {
  margin: 0 0 16px 0;
  color: #495057;
  font-size: 18px;
  font-weight: 600;
}

.severity-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.severity-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #f8f9fa;
  border-radius: 20px;
  border: 1px solid #e9ecef;
}

.severity-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

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

.severity-count {
  background: white;
  color: #495057;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid #dee2e6;
}

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

.type-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #e9ecef;
}

.type-label {
  flex: 1;
  font-weight: 500;
  color: #495057;
  min-width: 0;
}

.type-count {
  background: white;
  color: #495057;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid #dee2e6;
  min-width: 40px;
  text-align: center;
}

.type-bar {
  flex: 2;
  height: 8px;
  background: #e9ecef;
  border-radius: 4px;
  overflow: hidden;
  min-width: 100px;
}

.type-bar-fill {
  height: 100%;
  transition: width 0.3s ease;
  border-radius: 4px;
}

.file-breakdown {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 300px;
  overflow-y: auto;
}

.file-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #f8f9fa;
  border-radius: 4px;
  border: 1px solid #e9ecef;
}

.file-item.more-files {
  font-style: italic;
  color: #6c757d;
  justify-content: center;
}

.file-label {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 12px;
  color: #495057;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-count {
  background: white;
  color: #495057;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid #dee2e6;
  margin-left: 12px;
}

/* Responsive design */
@media (max-width: 768px) {
  .result-summary {
    padding: 16px;
  }
  
  .summary-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  
  .export-buttons {
    width: 100%;
    justify-content: stretch;
  }
  
  .export-buttons .btn-group {
    width: 100%;
  }
  
  .quick-export-buttons {
    width: 100%;
  }
  
  .quick-export-buttons .btn {
    flex: 1;
  }
  
  .summary-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  
  .stat-card {
    padding: 16px;
  }
  
  .stat-number {
    font-size: 24px;
  }
  
  .severity-breakdown {
    flex-direction: column;
    gap: 8px;
  }
  
  .severity-item {
    justify-content: space-between;
  }
  
  .type-item {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  
  .type-bar {
    min-width: auto;
  }
}

/* Selection Status Styles */
.selection-status {
  background: #f0f8ff;
  border: 1px solid #4caf50;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 24px;
}

.selection-status h3 {
  color: #2e7d32;
  margin-bottom: 12px;
}

.selection-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.selection-summary {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.selection-count {
  font-weight: 600;
  color: #2e7d32;
  font-size: 16px;
}

.selection-mode {
  font-size: 12px;
  color: #666;
  font-style: italic;
}

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

.selection-breakdown {
  border-top: 1px solid #c8e6c9;
  padding-top: 16px;
}

.selection-breakdown h4 {
  margin: 0 0 12px 0;
  color: #2e7d32;
  font-size: 16px;
  font-weight: 600;
}

.selection-breakdown h5 {
  margin: 16px 0 8px 0;
  color: #2e7d32;
  font-size: 14px;
  font-weight: 600;
}

.selection-severity-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.selection-severity-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: white;
  border-radius: 16px;
  border: 1px solid #c8e6c9;
}

.selection-file-breakdown {
  background: white;
  border-radius: 6px;
  padding: 12px;
  border: 1px solid #c8e6c9;
}

.selection-file-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid #e8f5e8;
}

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

.selection-file-item.more-files {
  font-style: italic;
  color: #666;
  justify-content: center;
  border-bottom: none;
}

@media (max-width: 768px) {
  .selection-info {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .selection-actions {
    width: 100%;
    justify-content: flex-end;
  }
  
  .selection-severity-breakdown {
    flex-direction: column;
    gap: 8px;
  }
  
  .selection-severity-item {
    justify-content: space-between;
  }
}

@media (max-width: 480px) {
  .summary-stats {
    grid-template-columns: 1fr;
  }
  
  .export-buttons .btn-group {
    flex-direction: column;
    width: 100%;
  }
  
  .quick-export-buttons {
    flex-direction: column;
    width: 100%;
  }
  
  .selection-actions {
    flex-direction: column;
    width: 100%;
  }
  
  .selection-actions .btn {
    width: 100%;
  }
}.results-container {
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.results-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

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

.results-empty {
  text-align: center;
  padding: 60px 20px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 2px dashed #dee2e6;
}

.results-empty h3 {
  color: #28a745;
  margin-bottom: 10px;
}

.results-empty p {
  color: #6c757d;
  margin: 0;
}

.results-actions {
  display: flex;
  gap: 10px;
  margin: 20px 0;
  justify-content: flex-end;
}

.results-list {
  margin-top: 20px;
}

/* Button styles */
.btn {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

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

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-primary {
  background-color: #007bff;
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background-color: #0056b3;
}

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

.btn-secondary:hover:not(:disabled) {
  background-color: #545b62;
}

.btn-small {
  padding: 6px 12px;
  font-size: 12px;
}

/* Responsive design */
@media (max-width: 768px) {
  .results-container {
    padding: 10px;
  }
  
  .results-actions {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
    justify-content: center;
  }
}/* Acc
essibility enhancements */
.results-container {
  position: relative;
}

.results-container:focus-within {
  outline: none;
}

.results-list {
  outline: none;
}

.results-list:focus {
  outline: 2px solid #0066cc;
  outline-offset: 2px;
}

.results-list:focus:not(:focus-visible) {
  outline: none;
}

.results-list:focus-visible {
  outline: 2px solid #0066cc;
  outline-offset: 2px;
}

.results-actions[role="toolbar"] {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
}

.results-actions[role="toolbar"]:focus-within {
  outline: none;
}

/* Screen reader only content */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Loading state accessibility */
.results-loading[role="status"] {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
}

.loading-spinner[aria-hidden="true"] {
  width: 2rem;
  height: 2rem;
  border: 3px solid #e2e8f0;
  border-top: 3px solid #4299e1;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

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

/* Empty state accessibility */
.results-empty[role="status"] {
  text-align: center;
  padding: 2rem;
  color: #718096;
}

.results-empty h3 {
  color: #2d3748;
  margin-bottom: 0.5rem;
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .results-list:focus,
  .results-list:focus-visible {
    outline-width: 3px;
  }
  
  .loading-spinner {
    border-width: 4px;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .loading-spinner {
    animation: none;
  }
}

/* Touch devices */
@media (hover: none) and (pointer: coarse) {
  .results-actions button {
    min-height: 44px;
    padding: 12px 16px;
  }
}

/* Mobile responsive */
@media (max-width: 768px) {
  .results-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  
  .results-actions button {
    width: 100%;
  }
}

/* Windows High Contrast Mode */
@media screen and (-ms-high-contrast: active) {
  .results-list:focus {
    outline: 2px solid Highlight;
  }
  
  .loading-spinner {
    border-color: ButtonText;
    border-top-color: Highlight;
  }
}/* Version Info Component Styles */

.version-info {
  background-color: var(--color-bg-primary);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  padding: var(--spacing-lg);
  font-size: 0.875rem;
}

.version-info--compact {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-xs) var(--spacing-sm);
  background-color: var(--color-bg-secondary);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
}

.version-info__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--spacing-md);
}

.version-info__header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-primary);
}

.version-info__toggle {
  background: none;
  border: none;
  color: var(--color-text-secondary);
  cursor: pointer;
  padding: var(--spacing-xs);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.version-info__toggle:hover {
  background-color: var(--color-bg-secondary);
  color: var(--color-text-primary);
}

.version-info__main {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.version-info__item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.version-info__label {
  color: var(--color-text-secondary);
  font-weight: 500;
}

.version-info__value {
  color: var(--color-text-primary);
  font-family: var(--font-mono);
}

.version-info__version {
  font-weight: 600;
  color: var(--color-primary);
}

.version-info__env {
  padding: 0.125rem 0.375rem;
  background-color: var(--color-warning-light);
  color: var(--color-warning-dark);
  border-radius: var(--radius-sm);
  font-size: 0.625rem;
  font-weight: 500;
  text-transform: uppercase;
}

.version-info__commit {
  background-color: var(--color-bg-secondary);
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
}

.version-info__update {
  margin-top: var(--spacing-md);
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--color-border-light);
}

.version-info__update-button {
  background-color: var(--color-primary);
  color: white;
  border: none;
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.version-info__update-button:hover:not(:disabled) {
  background-color: var(--color-primary-dark);
}

.version-info__update-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.version-info__update-status {
  margin-top: var(--spacing-sm);
  padding: var(--spacing-sm);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
}

.version-info__update-status.has-update {
  background-color: var(--color-success-light);
  border: 1px solid var(--color-success);
  color: var(--color-success-dark);
}

.version-info__update-status.no-update {
  background-color: var(--color-info-light);
  border: 1px solid var(--color-info);
  color: var(--color-info-dark);
}

.version-info__update-available {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-sm);
}

.version-info__update-link {
  background-color: var(--color-success);
  color: white;
  text-decoration: none;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.version-info__update-link:hover {
  background-color: var(--color-success-dark);
}

.version-info__up-to-date {
  font-weight: 500;
}

.version-info__details {
  margin-top: var(--spacing-md);
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--color-border-light);
}

.version-info__section {
  margin-bottom: var(--spacing-md);
}

.version-info__section:last-child {
  margin-bottom: 0;
}

.version-info__section h4 {
  margin: 0 0 var(--spacing-sm) 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-primary);
}

.version-info__tech-info {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.version-info__debug-button {
  background-color: var(--color-bg-secondary);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border-light);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.875rem;
  transition: all var(--transition-fast);
}

.version-info__debug-button:hover {
  background-color: var(--color-bg-tertiary);
  border-color: var(--color-border-medium);
}

/* Responsive Design */
@media (max-width: 768px) {
  .version-info {
    padding: var(--spacing-md);
  }

  .version-info__item {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-xs);
  }

  .version-info__update-available {
    flex-direction: column;
    align-items: flex-start;
  }

  .version-info__update-link {
    align-self: flex-end;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  .version-info__env {
    background-color: var(--color-warning-dark);
    color: var(--color-warning-light);
  }

  .version-info__commit {
    background-color: var(--color-bg-tertiary);
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .version-info {
    border-width: 2px;
  }

  .version-info__update-status {
    border-width: 2px;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .version-info__toggle,
  .version-info__update-button,
  .version-info__update-link,
  .version-info__debug-button {
    transition: none;
  }
}/* Configuration Component Styles */

.configuration {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

.configuration-header {
  margin-bottom: 30px;
}

.configuration-header h2 {
  margin: 0 0 15px 0;
  color: #333;
  font-size: 28px;
  font-weight: 600;
}

.message {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 500;
}

.message-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.message-error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.message-info {
  background-color: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

.configuration-tabs {
  display: flex;
  border-bottom: 2px solid #e9ecef;
  margin-bottom: 30px;
  gap: 4px;
}

.tab {
  padding: 12px 24px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  color: #6c757d;
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
}

.tab:hover {
  color: #495057;
  background-color: #f8f9fa;
}

.tab.active {
  color: #007bff;
  border-bottom-color: #007bff;
  background-color: #fff;
}

.configuration-content {
  min-height: 400px;
}

/* General Settings */
.general-settings {
  max-width: 600px;
}

.setting-group {
  margin-bottom: 25px;
}

.setting-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
}

.setting-group input,
.setting-group select,
.setting-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.2s ease;
}

.setting-group input:focus,
.setting-group select:focus,
.setting-group textarea:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.setting-group small {
  display: block;
  margin-top: 6px;
  color: #6c757d;
  font-size: 12px;
}

.setting-group input[type="checkbox"] {
  width: auto;
  margin-right: 8px;
}

/* Pattern Settings */
.patterns-settings {
  max-width: 800px;
}

.add-pattern-section {
  background: #f8f9fa;
  padding: 25px;
  border-radius: 8px;
  margin-bottom: 30px;
}

.add-pattern-section h3 {
  margin: 0 0 20px 0;
  color: #333;
  font-size: 20px;
}

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

.form-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 15px;
}

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

.form-group label {
  margin-bottom: 6px;
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 10px 12px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.validation-result {
  padding: 12px;
  border-radius: 4px;
  font-size: 14px;
}

.validation-result.valid {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.validation-result.invalid {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.validation-result .success {
  font-weight: 600;
}

.validation-result .errors .error {
  margin-bottom: 4px;
}

.pattern-test {
  background: #fff;
  padding: 20px;
  border-radius: 6px;
  border: 1px solid #dee2e6;
}

.pattern-test h4 {
  margin: 0 0 15px 0;
  color: #333;
  font-size: 16px;
}

.pattern-test textarea {
  width: 100%;
  margin-bottom: 10px;
}

.pattern-test button {
  padding: 8px 16px;
  background-color: #6c757d;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s ease;
}

.pattern-test button:hover {
  background-color: #5a6268;
}

.test-results {
  margin-top: 15px;
  padding: 15px;
  background-color: #f8f9fa;
  border-radius: 4px;
}

.test-results ul {
  margin: 10px 0 0 0;
  padding-left: 20px;
}

.test-results code {
  background-color: #e9ecef;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
}

.form-actions button {
  padding: 12px 24px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

.form-actions button:hover:not(:disabled) {
  background-color: #0056b3;
}

.form-actions button:disabled {
  background-color: #6c757d;
  cursor: not-allowed;
}

.existing-patterns h3 {
  margin: 0 0 20px 0;
  color: #333;
  font-size: 20px;
}

.no-patterns {
  color: #6c757d;
  font-style: italic;
  text-align: center;
  padding: 40px;
  background-color: #f8f9fa;
  border-radius: 8px;
}

.patterns-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.pattern-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 20px;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  transition: box-shadow 0.2s ease;
}

.pattern-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pattern-info h4 {
  margin: 0 0 10px 0;
  color: #333;
  font-size: 18px;
}

.pattern-info p {
  margin: 5px 0;
  color: #6c757d;
  font-size: 14px;
}

.pattern-info code {
  background-color: #f8f9fa;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 13px;
}

.remove-pattern {
  background-color: #dc3545;
  color: white;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  transition: background-color 0.2s ease;
  flex-shrink: 0;
}

.remove-pattern:hover {
  background-color: #c82333;
}

/* Exclusions Settings */
.exclusions-settings {
  max-width: 700px;
}

.exclusion-preview {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  margin-top: 20px;
}

.exclusion-preview h4 {
  margin: 0 0 15px 0;
  color: #333;
  font-size: 16px;
}

.exclusion-preview ul {
  margin: 0;
  padding-left: 20px;
}

.exclusion-preview li {
  margin-bottom: 5px;
}

.exclusion-preview code {
  background-color: #e9ecef;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

/* Import/Export Settings */
.import-export-settings {
  max-width: 700px;
}

.import-export-settings h3 {
  margin: 0 0 15px 0;
  color: #333;
  font-size: 18px;
}

.import-export-settings button {
  padding: 10px 20px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  margin-right: 10px;
  margin-bottom: 10px;
  transition: background-color 0.2s ease;
}

.import-export-settings button:hover {
  background-color: #0056b3;
}

.import-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.danger-zone {
  border-top: 2px solid #dee2e6;
  padding-top: 30px;
  margin-top: 40px;
}

.danger-zone h3 {
  color: #dc3545;
}

.danger-zone button.danger {
  background-color: #dc3545;
}

.danger-zone button.danger:hover {
  background-color: #c82333;
}

/* Responsive Design */
@media (max-width: 768px) {
  .configuration {
    padding: 15px;
  }
  
  .configuration-tabs {
    flex-wrap: wrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  
  .configuration-tabs::-webkit-scrollbar {
    display: none;
  }
  
  .tab {
    padding: 10px 16px;
    font-size: 14px;
    flex-shrink: 0;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .pattern-item {
    flex-direction: column;
    gap: 15px;
  }
  
  .remove-pattern {
    align-self: flex-end;
  }
  
  .import-export-settings button {
    width: 100%;
    margin-bottom: 8px;
  }
  
  .import-actions {
    flex-direction: column;
    gap: 8px;
  }
}

/* Touch-friendly enhancements */
@media (hover: none) and (pointer: coarse) {
  .tab {
    min-height: 44px;
    padding: 12px 20px;
  }
  
  .form-actions button,
  .import-export-settings button,
  .pattern-test button {
    min-height: 44px;
    padding: 12px 20px;
    font-size: 16px;
  }
  
  .remove-pattern {
    min-height: 44px;
    min-width: 44px;
    font-size: 18px;
  }
  
  /* Add touch feedback */
  .tab:active {
    background-color: #e9ecef;
    transform: scale(0.98);
  }
  
  button:active {
    transform: scale(0.98);
  }
  
  .pattern-item:active {
    transform: scale(0.99);
  }
  
  /* Improve form inputs on touch devices */
  .form-group input,
  .form-group select,
  .form-group textarea,
  .setting-group input,
  .setting-group select,
  .setting-group textarea {
    font-size: 16px; /* Prevent zoom on iOS */
    min-height: 44px;
    -webkit-appearance: none;
    border-radius: 8px;
  }
}

/* Small mobile screens */
@media (max-width: 480px) {
  .configuration {
    padding: 12px;
  }
  
  .configuration-header h2 {
    font-size: 24px;
  }
  
  .add-pattern-section {
    padding: 16px;
  }
  
  .pattern-item {
    padding: 16px;
  }
  
  .pattern-info h4 {
    font-size: 16px;
  }
  
  .pattern-info p {
    font-size: 13px;
  }
  
  .form-group label,
  .setting-group label {
    font-size: 14px;
  }
  
  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: 12px;
  }
  
  .validation-result {
    padding: 10px;
    font-size: 13px;
  }
  
  .pattern-test {
    padding: 16px;
  }
}

/* Very small screens */
@media (max-width: 375px) {
  .configuration {
    padding: 8px;
  }
  
  .add-pattern-section {
    padding: 12px;
  }
  
  .pattern-item {
    padding: 12px;
  }
  
  .configuration-tabs {
    margin-bottom: 20px;
  }
  
  .tab {
    padding: 8px 12px;
    font-size: 13px;
  }
}/*
 About Settings */
.about-settings {
  max-width: 800px;
}

.about-section {
  margin-bottom: var(--spacing-xl);
}

.about-section h3 {
  margin: 0 0 var(--spacing-md) 0;
  color: var(--color-text-primary);
  font-size: 1.25rem;
  font-weight: 600;
}

.about-section p {
  margin: 0 0 var(--spacing-md) 0;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.about-features h4,
.about-security h4,
.about-links h4 {
  margin: 0 0 var(--spacing-sm) 0;
  color: var(--color-text-primary);
  font-size: 1rem;
  font-weight: 600;
}

.about-features ul {
  margin: 0;
  padding-left: var(--spacing-lg);
  color: var(--color-text-secondary);
}

.about-features li {
  margin-bottom: var(--spacing-xs);
  line-height: 1.5;
}

.about-security {
  background-color: var(--color-info-light);
  border: 1px solid var(--color-info);
  border-radius: var(--radius-md);
  padding: var(--spacing-lg);
  margin: var(--spacing-lg) 0;
}

.about-security p {
  margin: 0;
  color: var(--color-info-dark);
}

.version-section {
  margin: var(--spacing-xl) 0;
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-md);
  margin-top: var(--spacing-md);
}

.about-link {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md);
  background-color: var(--color-bg-secondary);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--color-text-primary);
  font-weight: 500;
  transition: all var(--transition-fast);
}

.about-link:hover {
  background-color: var(--color-bg-tertiary);
  border-color: var(--color-border-medium);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

@media (max-width: 768px) {
  .link-grid {
    grid-template-columns: 1fr;
  }
  
  .about-link {
    padding: var(--spacing-sm) var(--spacing-md);
  }
}.remediation-suggestions {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin: 20px 0;
}

.suggestions-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #e0e0e0;
}

.suggestions-header h3 {
  margin: 0;
  color: #333;
  font-size: 1.2em;
}

.suggestions-actions {
  display: flex;
  gap: 10px;
}

.btn {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: #007bff;
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: #0056b3;
}

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

.btn-secondary:hover:not(:disabled) {
  background: #545b62;
}

.btn-small {
  padding: 4px 8px;
  font-size: 12px;
}

.no-results {
  padding: 40px;
  text-align: center;
  color: #666;
  font-style: italic;
}

.loading {
  padding: 40px;
  text-align: center;
  color: #666;
}

.suggestions-list {
  max-height: 600px;
  overflow-y: auto;
}

.suggestion-item {
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s;
}

.suggestion-item:hover {
  background-color: #f8f9fa;
}

.suggestion-item.selected {
  background-color: #e3f2fd;
  border-left: 4px solid #2196f3;
}

.suggestion-header {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  gap: 12px;
}

.suggestion-checkbox {
  display: flex;
  align-items: center;
  cursor: pointer;
  position: relative;
}

.suggestion-checkbox input[type="checkbox"] {
  opacity: 0;
  position: absolute;
}

.checkmark {
  width: 18px;
  height: 18px;
  border: 2px solid #ddd;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.suggestion-checkbox input:checked + .checkmark {
  background: #007bff;
  border-color: #007bff;
}

.suggestion-checkbox input:checked + .checkmark::after {
  content: '✓';
  color: white;
  font-size: 12px;
  font-weight: bold;
}

.suggestion-info {
  flex: 1;
}

.suggestion-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.filename {
  font-weight: 600;
  color: #333;
}

.line-number {
  color: #666;
  font-size: 0.9em;
}

.suggestion-details {
  display: flex;
  gap: 16px;
  font-size: 0.85em;
}

.confidence {
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 500;
}

.confidence-high {
  background: #d4edda;
  color: #155724;
}

.confidence-medium {
  background: #fff3cd;
  color: #856404;
}

.confidence-low {
  background: #f8d7da;
  color: #721c24;
}

.credential-type {
  color: #666;
  text-transform: capitalize;
}

.suggestion-content {
  padding: 0 20px 16px 50px;
}

.replacement-info {
  background: #f8f9fa;
  padding: 12px;
  border-radius: 4px;
  border-left: 4px solid #007bff;
}

.env-var-suggestion,
.original-value {
  margin-bottom: 8px;
}

.env-var-suggestion:last-child,
.original-value:last-child {
  margin-bottom: 0;
}

code {
  background: #e9ecef;
  padding: 2px 4px;
  border-radius: 3px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.9em;
}

.masked {
  color: #dc3545;
  font-weight: 500;
}

.preview-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.preview-content {
  background: white;
  border-radius: 8px;
  max-width: 80vw;
  max-height: 80vh;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #e0e0e0;
  background: #f8f9fa;
}

.preview-header h4 {
  margin: 0;
  color: #333;
}

.preview-body {
  padding: 20px;
  max-height: 60vh;
  overflow-y: auto;
}

.code-preview {
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 16px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-x: auto;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .suggestions-header {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }

  .suggestions-actions {
    justify-content: center;
    flex-wrap: wrap;
  }

  .suggestion-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .suggestion-details {
    flex-direction: column;
    gap: 4px;
  }

  .preview-content {
    max-width: 95vw;
    max-height: 95vh;
  }

  .preview-header {
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
  }
}.remediation-history {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin: 20px 0;
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #e0e0e0;
}

.history-header h3 {
  margin: 0;
  color: #333;
  font-size: 1.2em;
}

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

.btn {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.btn-small {
  padding: 4px 8px;
  font-size: 12px;
}

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

.btn-secondary:hover {
  background: #545b62;
}

.btn-danger {
  background: #dc3545;
  color: white;
}

.btn-danger:hover {
  background: #c82333;
}

.btn-primary {
  background: #007bff;
  color: white;
}

.btn-primary:hover {
  background: #0056b3;
}

.btn-warning {
  background: #ffc107;
  color: #212529;
}

.btn-warning:hover {
  background: #e0a800;
}

.loading,
.no-history {
  padding: 40px;
  text-align: center;
  color: #666;
  font-style: italic;
}

.history-list {
  max-height: 600px;
  overflow-y: auto;
}

.batch-item {
  border-bottom: 1px solid #f0f0f0;
}

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

.batch-header {
  padding: 16px 20px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.batch-header:hover {
  background-color: #f8f9fa;
}

.batch-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.expand-icon {
  font-size: 12px;
  color: #666;
  transition: transform 0.2s;
}

.batch-date {
  font-weight: 600;
  color: #333;
}

.batch-status {
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
}

.status-completed {
  background: #d4edda;
  color: #155724;
}

.status-failed {
  background: #f8d7da;
  color: #721c24;
}

.status-in_progress {
  background: #fff3cd;
  color: #856404;
}

.batch-summary {
  display: flex;
  gap: 16px;
  font-size: 0.9em;
}

.summary-item {
  color: #666;
}

.summary-item.success {
  color: #28a745;
  font-weight: 500;
}

.summary-item.error {
  color: #dc3545;
  font-weight: 500;
}

.summary-item.warning {
  color: #ffc107;
  font-weight: 500;
}

.batch-details {
  padding: 0 20px 20px 20px;
  background: #f8f9fa;
  border-top: 1px solid #e0e0e0;
}

.batch-files {
  margin-bottom: 20px;
}

.batch-files strong {
  display: block;
  margin-bottom: 8px;
  color: #333;
}

.batch-files ul {
  margin: 0;
  padding-left: 20px;
}

.batch-files li {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.9em;
  color: #666;
  margin-bottom: 4px;
}

.no-files {
  color: #999;
  font-style: italic;
}

.actions-list h4 {
  margin: 0 0 12px 0;
  color: #333;
  font-size: 1em;
}

.action-item {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  margin-bottom: 8px;
  padding: 12px;
}

.action-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.action-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.action-status {
  font-size: 16px;
}

.action-file {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.9em;
  color: #333;
  font-weight: 500;
}

.action-env-var {
  color: #007bff;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.9em;
}

.action-controls {
  display: flex;
  gap: 4px;
}

.action-error {
  margin-top: 8px;
  padding: 8px;
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  border-radius: 4px;
  color: #721c24;
  font-size: 0.9em;
}

.action-timestamp {
  margin-top: 8px;
  font-size: 0.85em;
  color: #666;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .history-header {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }

  .history-actions {
    justify-content: center;
  }

  .batch-summary {
    flex-direction: column;
    gap: 4px;
  }

  .action-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .action-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .action-controls {
    align-self: flex-end;
  }
}.remediation {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

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

.remediation-title {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.remediation-actions {
  display: flex;
  align-items: center;
}

.back-to-results-button {
  padding: 8px 16px;
  border: 1px solid var(--color-border-light);
  background-color: var(--color-bg-primary);
  color: var(--color-text-secondary);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 0.875rem;
  font-weight: 500;
}

.back-to-results-button:hover {
  background-color: var(--color-bg-secondary);
  color: var(--color-text-primary);
}

.remediation-title h2 {
  margin: 0;
  color: #333;
  font-size: 1.5em;
}

.remediation-stats {
  display: flex;
  gap: 16px;
}

.stat-item {
  padding: 4px 8px;
  background: #f8f9fa;
  border-radius: 4px;
  font-size: 0.9em;
  color: #666;
}

.stat-item.high-severity {
  background: #f8d7da;
  color: #721c24;
  font-weight: 500;
}

.remediation-tabs {
  display: flex;
  border-bottom: 2px solid #e0e0e0;
}

.tab-button {
  padding: 12px 20px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 16px;
  color: #666;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tab-button:hover {
  color: #333;
  background: #f8f9fa;
}

.tab-button.active {
  color: #007bff;
  border-bottom-color: #007bff;
  font-weight: 500;
}

.tab-badge {
  background: #007bff;
  color: white;
  border-radius: 12px;
  padding: 2px 6px;
  font-size: 12px;
  font-weight: 500;
  min-width: 18px;
  text-align: center;
}

.tab-button.active .tab-badge {
  background: white;
  color: #007bff;
}

.remediation-content {
  min-height: 400px;
}

.tab-panel {
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.no-results-message {
  text-align: center;
  padding: 60px 20px;
  color: #666;
}

.message-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.no-results-message h3 {
  margin: 0 0 12px 0;
  color: #333;
}

.no-results-message p {
  margin: 0;
  font-size: 1.1em;
  line-height: 1.5;
}

.warning-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-left: 4px solid #ffc107;
  border-radius: 4px;
  padding: 16px;
  margin-bottom: 20px;
}

.warning-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.warning-content {
  flex: 1;
}

.warning-content strong {
  display: block;
  color: #856404;
  margin-bottom: 4px;
}

.warning-content p {
  margin: 0;
  color: #856404;
  font-size: 0.95em;
}

.recent-batch-summary {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-width: 400px;
  z-index: 1000;
  animation: slideInUp 0.3s ease-out;
}

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

.summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #e0e0e0;
  background: #f8f9fa;
  border-radius: 8px 8px 0 0;
}

.summary-header h4 {
  margin: 0;
  color: #333;
  font-size: 1em;
}

.close-button {
  background: none;
  border: none;
  font-size: 18px;
  color: #666;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s;
}

.close-button:hover {
  background: #e0e0e0;
}

.summary-content {
  padding: 16px;
}

.summary-stats {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.stat {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.9em;
  font-weight: 500;
}

.stat.success {
  background: #d4edda;
  color: #155724;
}

.stat.error {
  background: #f8d7da;
  color: #721c24;
}

.stat.warning {
  background: #fff3cd;
  color: #856404;
}

.modified-files {
  font-size: 0.9em;
}

.modified-files strong {
  display: block;
  margin-bottom: 8px;
  color: #333;
}

.modified-files ul {
  margin: 0;
  padding-left: 16px;
}

.modified-files li {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  color: #666;
  margin-bottom: 4px;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .remediation {
    padding: 16px;
  }

  .remediation-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .remediation-stats {
    flex-wrap: wrap;
    gap: 8px;
  }

  .tab-button {
    padding: 10px 16px;
    font-size: 14px;
  }

  .recent-batch-summary {
    bottom: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
  }

  .summary-stats {
    flex-wrap: wrap;
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .remediation-tabs {
    flex-direction: column;
  }

  .tab-button {
    border-bottom: 1px solid #e0e0e0;
    border-right: none;
  }

  .tab-button.active {
    border-bottom-color: #e0e0e0;
    border-left: 2px solid #007bff;
  }
}/* Main Application Styles */
.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--color-bg-secondary);
}

.app-header {
  background-color: var(--color-bg-primary);
  border-bottom: 1px solid var(--color-border-light);
  padding: var(--spacing-lg) 0;
  box-shadow: var(--shadow-sm);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-title h1 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-text-primary);
}

.header-title p {
  margin: 0.25rem 0 0 0;
  color: var(--color-text-secondary);
  font-size: 0.875rem;
}

.header-nav {
  display: flex;
  gap: var(--spacing-sm);
}

.nav-button {
  padding: var(--spacing-sm) var(--spacing-md);
  border: 1px solid var(--color-border-light);
  background-color: transparent;
  color: var(--color-text-secondary);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 0.875rem;
  font-weight: 500;
}

.nav-button:hover:not(:disabled) {
  background-color: var(--color-bg-secondary);
  color: var(--color-text-primary);
}

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

.nav-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.mobile-nav {
  display: flex;
  background-color: var(--color-bg-secondary);
  border-top: 1px solid var(--color-border-light);
  padding: var(--spacing-sm);
  gap: var(--spacing-xs);
}

.mobile-nav-button {
  flex: 1;
  padding: var(--spacing-sm);
  border: 1px solid var(--color-border-light);
  background-color: var(--color-bg-primary);
  color: var(--color-text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 0.75rem;
  font-weight: 500;
  text-align: center;
}

.mobile-nav-button:hover:not(:disabled) {
  background-color: var(--color-bg-secondary);
  color: var(--color-text-primary);
}

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

.mobile-nav-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.app-header__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.app-header__title {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text-primary);
}

.app-header__logo {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 14px;
}

.app-header__version {
  background-color: var(--color-gray-100);
  color: var(--color-text-secondary);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
}

.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  padding: var(--spacing-xl) var(--spacing-lg);
  gap: var(--spacing-lg);
}

.app-content {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
  min-height: 0;
}

.view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--spacing-md);
}

.view-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-text-primary);
}

.scanning-indicator {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  color: var(--color-text-secondary);
  font-size: 0.875rem;
}

.error-display {
  background-color: var(--color-danger-light);
  border: 1px solid var(--color-danger);
  border-radius: var(--radius-md);
  padding: var(--spacing-lg);
  margin-top: var(--spacing-lg);
}

.error-display h3 {
  margin: 0 0 var(--spacing-sm) 0;
  color: var(--color-danger);
  font-size: 1.125rem;
}

.error-display p {
  margin: 0 0 var(--spacing-md) 0;
  color: var(--color-text-primary);
}

.error-display button {
  background-color: var(--color-danger);
  color: white;
  border: none;
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.875rem;
}

.app-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  gap: var(--spacing-lg);
  text-align: center;
}

.app-loading p {
  color: var(--color-text-secondary);
  font-size: 1.125rem;
  margin: 0;
}

.app-content--with-results {
  grid-template-columns: 1fr 1fr;
}

.app-scanner-section {
  background-color: var(--color-bg-primary);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border-light);
}

.app-results-section {
  background-color: var(--color-bg-primary);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border-light);
  max-height: 80vh;
  overflow-y: auto;
}

.app-footer {
  background-color: var(--color-bg-primary);
  border-top: 1px solid var(--color-border-light);
  padding: var(--spacing-lg) 0;
  margin-top: auto;
}

.app-footer__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

.app-footer__links {
  display: flex;
  gap: var(--spacing-lg);
}

.app-footer__link {
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.app-footer__link:hover {
  color: var(--color-primary);
}

/* Loading State */
.app-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  gap: var(--spacing-lg);
}

.app-loading__spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--color-gray-200);
  border-top: 4px solid var(--color-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.app-loading__text {
  color: var(--color-text-secondary);
  font-size: 1.125rem;
}

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

/* Error State */
.app-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  gap: var(--spacing-lg);
  text-align: center;
  padding: var(--spacing-xl);
}

.app-error__icon {
  font-size: 4rem;
  color: var(--color-danger);
}

.app-error__title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0;
}

.app-error__message {
  color: var(--color-text-secondary);
  max-width: 500px;
  line-height: 1.6;
  margin: 0;
}

.app-error__actions {
  display: flex;
  gap: var(--spacing-md);
}

/* Welcome State */
.app-welcome {
  text-align: center;
  padding: var(--spacing-2xl) var(--spacing-lg);
}

.app-welcome__title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-md);
}

.app-welcome__subtitle {
  font-size: 1.25rem;
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-xl);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.app-welcome__features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-xl);
  margin-top: var(--spacing-2xl);
}

.app-welcome__feature {
  padding: var(--spacing-xl);
  background-color: var(--color-bg-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border-light);
}

.app-welcome__feature-icon {
  font-size: 2rem;
  margin-bottom: var(--spacing-md);
  color: var(--color-primary);
}

.app-welcome__feature-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-sm);
}

.app-welcome__feature-description {
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin: 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .header-nav {
    display: none;
  }
  
  .mobile-nav {
    display: flex;
  }
}

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

@media (max-width: 768px) {
  .header-content {
    padding: 0 var(--spacing-md);
    flex-direction: column;
    gap: var(--spacing-sm);
  }
  
  .header-title {
    text-align: center;
  }
  
  .header-title h1 {
    font-size: 1.5rem;
  }
  
  .app-main {
    padding: var(--spacing-lg) var(--spacing-md);
    gap: var(--spacing-md);
  }
  
  .view-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-sm);
  }
  
  .scanning-indicator {
    align-self: flex-end;
  }
}

@media (max-width: 480px) {
  .app-header__title {
    font-size: 1.25rem;
  }
  
  .app-main {
    padding: var(--spacing-md);
  }
  
  .app-scanner-section,
  .app-results-section {
    padding: var(--spacing-md);
  }
  
  .app-welcome__title {
    font-size: 1.75rem;
  }
  
  .app-welcome__features {
    margin-top: var(--spacing-xl);
  }
  
  .app-welcome__feature {
    padding: var(--spacing-lg);
  }
}

/* Touch-friendly enhancements */
@media (hover: none) and (pointer: coarse) {
  .app-header__logo {
    min-height: 44px;
    min-width: 44px;
  }
  
  .app-footer__link {
    padding: var(--spacing-sm);
    margin: calc(var(--spacing-sm) * -1);
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  
  /* Add touch feedback for interactive elements */
  .app-welcome__feature {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
  
  .app-welcome__feature:active {
    transform: scale(0.98);
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .app-header {
    padding: var(--spacing-md) 0;
  }
  
  .app-main {
    padding: var(--spacing-md);
  }
  
  .app-results-section {
    max-height: 50vh;
  }
}

/* Very small screens (iPhone SE, etc.) */
@media (max-width: 375px) {
  .app-header__container {
    padding: 0 var(--spacing-sm);
  }
  
  .app-main {
    padding: var(--spacing-sm);
    gap: var(--spacing-md);
  }
  
  .app-scanner-section,
  .app-results-section {
    padding: var(--spacing-md);
  }
  
  .app-header__title {
    font-size: 1.125rem;
  }
  
  .app-welcome__title {
    font-size: 1.5rem;
  }
  
  .app-welcome__subtitle {
    font-size: 1rem;
  }
}

/* Dark Mode Support (Future Enhancement) */
@media (prefers-color-scheme: dark) {
  /* Dark mode styles would go here */
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .app-header,
  .app-scanner-section,
  .app-results-section,
  .app-footer {
    border-width: 2px;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  .app-loading__spinner {
    animation: none;
  }
  
  * {
    transition: none !important;
    animation: none !important;
  }
}
/* ワークフロー指向のスタイル */
.main-workflow {
  margin-bottom: var(--spacing-xl);
}

.view-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--spacing-lg);
  padding: var(--spacing-lg);
  background: var(--color-bg-primary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-light);
}

.view-title-section {
  flex: 1;
}

.view-title-section h2 {
  margin: 0 0 var(--spacing-xs) 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-text-primary);
}

.view-description {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: 0.875rem;
  line-height: 1.5;
}

.view-status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--spacing-sm);
}

.scanning-indicator {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-md);
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  color: white;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  animation: pulse 2s infinite;
}

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

.results-summary {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--spacing-xs);
}

.results-count {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-primary);
  padding: var(--spacing-xs) var(--spacing-sm);
  background: var(--color-bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-light);
}

.high-risk-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  padding: 2px var(--spacing-xs);
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  animation: attention 3s infinite;
}

@keyframes attention {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* ワークフロー制約のスタイル */
.workflow-constraint-message {
  background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
  color: #212529;
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-lg);
  border-left: 4px solid #e0a800;
}

.workflow-constraint-message .constraint-title {
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
}

.workflow-constraint-message .constraint-description {
  font-size: 0.875rem;
  margin: 0;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .view-header {
    flex-direction: column;
    align-items: stretch;
    gap: var(--spacing-md);
  }
  
  .view-status {
    align-items: flex-start;
  }
  
  .results-summary {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* アクセシビリティ対応 */
@media (prefers-reduced-motion: reduce) {
  .scanning-indicator,
  .high-risk-badge {
    animation: none;
  }
}

/* ダークモード対応の準備 */
@media (prefers-color-scheme: dark) {
  .view-header {
    background: var(--color-bg-primary-dark, #2d3748);
    border-color: var(--color-border-dark, #4a5568);
  }
  
  .view-title-section h2 {
    color: var(--color-text-primary-dark, #f7fafc);
  }
  
  .view-description {
    color: var(--color-text-secondary-dark, #a0aec0);
  }
  
  .results-count {
    background: var(--color-bg-secondary-dark, #1a202c);
    border-color: var(--color-border-dark, #4a5568);
    color: var(--color-text-primary-dark, #f7fafc);
  }
}/
* コンテンツレイアウト */
.content-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--spacing-xl);
  align-items: start;
}

.main-content {
  min-width: 0; /* グリッドオーバーフロー防止 */
}

.workflow-sidebar {
  position: sticky;
  top: var(--spacing-lg);
}

/* レスポンシブ対応 */
@media (max-width: 1024px) {
  .content-layout {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
  
  .workflow-sidebar {
    position: static;
    order: -1; /* サイドバーを上に移動 */
  }
}

@media (max-width: 768px) {
  .app-content {
    padding: 0 var(--spacing-md);
  }
  
  .content-layout {
    gap: var(--spacing-md);
  }
}