/* Sparkle Design inspired modern stylesheet */
:root {
  /* Primary Colors - Modern and vibrant */
  --primary-25: #f0f9ff;
  --primary-50: #e0f2fe;
  --primary-100: #bae6fd;
  --primary-200: #7dd3fc;
  --primary-500: #3b82f6;
  --primary-600: #2563eb;
  --primary-700: #1d4ed8;
  
  /* Neutral Colors - Clean and modern with better contrast */
  --gray-25: #fcfcfd;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  
  /* Accent Colors - Enhanced vibrancy */
  --success-50: #f0fdf4;
  --success-500: #10b981;
  --success-600: #059669;
  --warning-50: #fffbeb;
  --warning-500: #f59e0b;
  --warning-600: #d97706;
  --danger-50: #fef2f2;
  --danger-500: #ef4444;
  --danger-600: #dc2626;
  
  /* New accent colors */
  --purple-50: #faf5ff;
  --purple-500: #8b5cf6;
  --purple-600: #7c3aed;
  --orange-50: #fff7ed;
  --orange-500: #f97316;
  --orange-600: #ea580c;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--gray-800);
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 25%, #cbd5e1 50%, #94a3b8 100%);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(600px circle at 20% 30%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
    radial-gradient(800px circle at 80% 70%, rgba(16, 185, 129, 0.08) 0%, transparent 50%),
    radial-gradient(400px circle at 40% 80%, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

/* Modern typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--gray-900);
}

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; }

/* Modern card design */
.card, .login-container, .form-container {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: var(--radius-xl);
  box-shadow: 
    0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04),
    0 0 0 1px rgba(59, 130, 246, 0.05);
  padding: 2rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.3), transparent);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.15),
    0 0 40px rgba(59, 130, 246, 0.1);
}

/* Enhanced form controls */
.form-control {
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  transition: all var(--transition-fast);
  background: white;
  color: var(--gray-800);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px var(--primary-100);
  background: white;
}

/* Modern button design */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  border-radius: var(--radius-md);
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition-fast);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  min-height: 40px;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left var(--transition-slow);
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-600), var(--primary-500));
  color: white;
  box-shadow: 0 4px 14px 0 rgba(59, 130, 246, 0.25);
  border: none;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-700), var(--primary-600));
  transform: translateY(-2px);
  box-shadow: 0 8px 25px 0 rgba(59, 130, 246, 0.4);
  color: white;
}

.btn-secondary {
  background: white;
  color: var(--gray-700);
  border: 1px solid var(--gray-300);
}

.btn-secondary:hover {
  background: var(--gray-50);
  color: var(--gray-800);
}

.btn-success {
  background: linear-gradient(135deg, var(--success-500), var(--success-600));
  color: white;
  box-shadow: 0 4px 14px 0 rgba(16, 185, 129, 0.25);
  border: none;
  position: relative;
  overflow: hidden;
}

.btn-success::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.btn-success:hover::before {
  left: 100%;
}

.btn-success:hover {
  background: linear-gradient(135deg, var(--success-600), #047857);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px 0 rgba(16, 185, 129, 0.4);
  color: white;
}

.btn-warning {
  background: linear-gradient(135deg, var(--warning-500), #f97316);
  color: white;
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger-500), var(--danger-600));
  color: white;
  box-shadow: 0 4px 14px 0 rgba(239, 68, 68, 0.25);
  border: none;
  position: relative;
  overflow: hidden;
}

.btn-danger::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.btn-danger:hover::before {
  left: 100%;
}

.btn-danger:hover {
  background: linear-gradient(135deg, var(--danger-600), #b91c1c);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px 0 rgba(239, 68, 68, 0.4);
  color: white;
}

.btn-outline-primary {
  background: white;
  color: var(--primary-600);
  border: 1.5px solid var(--primary-300);
}

.btn-outline-primary:hover {
  background: var(--primary-50);
  border-color: var(--primary-500);
  color: var(--primary-700);
}

.btn-outline-secondary {
  background: white;
  color: var(--gray-600);
  border: 1.5px solid var(--gray-300);
}

.btn-outline-secondary:hover {
  background: var(--gray-50);
  color: var(--gray-700);
}

.btn-outline-success {
  background: white;
  color: var(--success-500);
  border: 1.5px solid #22c55e;
}

.btn-outline-warning {
  background: white;
  color: var(--warning-500);
  border: 1.5px solid var(--warning-500);
}

.btn-outline-danger {
  background: white;
  color: var(--danger-500);
  border: 1.5px solid var(--danger-500);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  min-height: 36px;
}

.btn-lg {
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
  min-height: 48px;
}

.rounded-pill {
  border-radius: 9999px;
}

/* Modern navigation */
.navbar {
  background: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--gray-900) !important;
}

/* Alert components */
.alert {
  border: none;
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  border-left: 4px solid;
}

.alert-warning {
  background: var(--warning-50);
  border-left-color: var(--warning-500);
  color: #92400e;
}

.alert-danger {
  background: var(--danger-50);
  border-left-color: var(--danger-500);
  color: #991b1b;
}

.alert-success {
  background: var(--success-50);
  border-left-color: var(--success-500);
  color: #166534;
}

/* Enhanced table wrapper */
.table-wrapper {
  background: white;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin: 1.5rem 0;
}

/* Modern spreadsheet-style table */
.modern-table {
  background: white;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 
    0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04),
    0 0 0 1px rgba(59, 130, 246, 0.05);
  border: 1px solid rgba(226, 232, 240, 0.8);
  position: relative;
}

.modern-table::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-500), var(--success-500), var(--purple-500));
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.table-responsive {
  overflow-x: auto !important;
  overflow-y: auto !important;
  border-radius: var(--radius-xl);
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.875rem;
}

thead {
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border-bottom: 2px solid var(--primary-500);
}

thead th {
  background: transparent;
  color: #1e293b !important;
  font-weight: 700;
  text-align: center;
  padding: 1rem 0.75rem;
  border: none;
  font-size: 0.8125rem;
  letter-spacing: 0.025em;
  white-space: nowrap;
  border-right: 1px solid rgba(14, 165, 233, 0.2);
}

thead th:last-child {
  border-right: none;
}

tbody tr {
  background: white;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border-bottom: 1px solid var(--gray-100);
  position: relative;
}

tbody tr::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 100%;
  background: transparent;
  transition: background 0.2s ease;
}

tbody tr:hover {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.03) 0%, rgba(59, 130, 246, 0.01) 100%);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

tbody tr:hover::before {
  background: linear-gradient(180deg, var(--primary-500), var(--primary-600));
}

tbody tr:last-child {
  border-bottom: none;
}

tbody tr:nth-child(even) {
  background: linear-gradient(90deg, #fafbfc 0%, #f8fafc 100%);
}

tbody tr:nth-child(even):hover {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.03) 0%, rgba(59, 130, 246, 0.01) 100%);
}

td {
  padding: 1rem 0.875rem;
  border: none;
  vertical-align: middle;
  color: var(--gray-800);
  border-right: 1px solid rgba(226, 232, 240, 0.5);
  position: relative;
  font-weight: 500;
}

td:last-child {
  border-right: none;
}

/* Cell-specific styling */
.pc-name-cell strong {
  font-weight: 700;
  color: var(--primary-700);
  font-size: 0.9375rem;
}

.pc-name-cell .text-muted {
  color: var(--gray-500);
  font-size: 0.8125rem;
}

.windows-cell {
  min-width: 200px;
}

.windows-display {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.windows-main {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.windows-main strong {
  font-weight: 700;
  color: var(--text-primary);
}

.edition-badge {
  background: var(--primary-100);
  color: var(--primary-700);
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-sm);
  font-size: 0.6875rem;
  font-weight: 600;
}

.windows-details {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.update-badge {
  background: var(--warning-100);
  color: var(--warning-700);
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-sm);
  font-size: 0.6875rem;
  font-weight: 600;
}

.build-info {
  color: var(--gray-500);
  font-size: 0.75rem;
  font-family: 'SFMono-Regular', monospace;
}

.ip-cell {
  min-width: 150px;
}

.ip-badge {
  display: inline-block;
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
  margin: 0.125rem 0.125rem 0.125rem 0;
  font-family: 'SFMono-Regular', monospace;
}

.ip-more {
  font-size: 0.75rem;
  color: var(--gray-500);
  font-weight: 500;
}

.system-cell {
  min-width: 200px;
}

.system-compact {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.system-compact div {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
}

.system-compact i {
  width: 14px;
  color: var(--primary-500);
  font-size: 0.8125rem;
}

.apps-cell {
  text-align: center;
}

.app-count-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background: var(--primary-50);
  color: var(--primary-700);
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-md);
  font-weight: 600;
}

.kb-cell {
  min-width: 120px;
}

.kb-badge-small {
  display: inline-block;
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
  font-family: 'SFMono-Regular', monospace;
}

.kb-recent {
  background: #dcfce7;
  color: #166534;
}

.kb-old {
  background: var(--gray-100);
  color: var(--gray-600);
}

.kb-more {
  font-size: 0.75rem;
  color: var(--gray-500);
  margin-left: 0.25rem;
}

.date-cell {
  font-family: 'SFMono-Regular', monospace;
  font-size: 0.8125rem;
  color: var(--gray-600);
  white-space: nowrap;
}

.detail-btn {
  background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
  color: white;
  border: none;
  padding: 0.625rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
  position: relative;
  overflow: hidden;
}

.detail-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.detail-btn:hover::before {
  left: 100%;
}

.detail-btn:hover {
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

.detail-btn i {
  font-size: 0.875rem;
}

/* Search and filter components */
.input-group {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.input-group-text {
  background: var(--gray-100);
  border: 1px solid var(--gray-300);
  color: var(--gray-600);
  font-size: 0.875rem;
}

/* === 同意チェック 行（中央寄せ＆視認性UP）=== */
.consent-row {
  display: inline-flex;           /* 横幅を内容サイズにする */
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  text-align: center;
  margin: 0 auto;                 /* 親（フォーム幅）の中央に配置 */
}

.consent-arrow {
  font-weight: 900;
  font-size: 1.1rem;
  background: linear-gradient(135deg, var(--primary-600), var(--purple-600));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 0 rgba(0,0,0,0); /* 影は消す */
  animation: consentPop 1.8s ease-in-out infinite;
}
.consent-row:has(#agree_privacy:checked) .consent-arrow {
  background: linear-gradient(135deg, var(--success-600), var(--success-500));
}


/* 矢印が文字(⇒)の場合の位置微調整 */
.consent-arrow:not(:has(i)) { 
  font-weight: 800; 
  letter-spacing: -0.02em; 
}


/* 既存の input[type="checkbox"] を上書きして少し大きく見やすく */
.consent-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 1.25rem;
  height: 1.25rem;
  border: 2.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
  position: relative;
  transition: all var(--transition-fast);
  display: inline-block;
}

.consent-checkbox:hover {
  border-color: var(--primary-400);
  box-shadow: 0 0 0 3px var(--primary-100);
}

.consent-checkbox:checked {
  background: var(--primary-600);
  border-color: var(--primary-600);
}

.consent-checkbox:checked::after {
  content: '✓';
  position: absolute;
  color: #fff;
  font-size: 0.9rem;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -57%);
  font-weight: 800;
}

/* ラベルの見た目微調整 */
.consent-label {
  font-weight: 500;
  color: var(--gray-800);
  user-select: none;
}

/* === 未同意（disabled）ボタンをさらに薄く見せる === */
#submitBtn:disabled {
  opacity: 0.24;                       /* より薄く */
  filter: grayscale(70%) brightness(0.9);
  box-shadow: none !important;          /* 立体感を消す */
  cursor: not-allowed;
}

/* 有効化時は通常表示 */
#submitBtn:not(:disabled) {
  opacity: 1;
  filter: none;
}



/* Statistics cards */
.stats-card {
  background: white;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  text-align: center;
  box-shadow: 
    0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05),
    0 0 0 1px rgba(59, 130, 246, 0.05);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.stats-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-500), var(--success-500), var(--orange-500));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.stats-card:hover::before {
  transform: scaleX(1);
}

.stats-card:hover {
  transform: translateY(-6px);
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.15),
    0 0 30px rgba(59, 130, 246, 0.1);
}

.stats-card h5 {
  color: var(--gray-600);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stats-card .stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-600);
}

/* Expandable content */
.expandable {
  transition: all var(--transition-normal);
  border-radius: var(--radius-md);
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
}

.expandable.limited {
  max-height: 1.5em;
  overflow: hidden;
}

.expandable.expanded {
  max-height: 200px;
  overflow: auto;
  padding: 0.75rem;
  font-family: 'SFMono-Regular', 'Monaco', 'Cascadia Code', monospace;
  font-size: 0.8125rem;
  line-height: 1.4;
}

.default-value {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  color: var(--gray-800);
  font-weight: 500;
}

/* Data visualization improvements */
.data-summary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  background: var(--gray-100);
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 0.25rem;
}

.data-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
}

.badge-primary { background: var(--primary-100); color: var(--primary-700); }
.badge-success { background: var(--success-50); color: #166534; }
.badge-warning { background: var(--warning-50); color: #92400e; }
.badge-danger { background: var(--danger-50); color: #991b1b; }
.badge-secondary { background: var(--gray-100); color: var(--gray-700); }

/* Simplified IP Address styling */
.ip-container {
  margin-bottom: 0.25rem;
}

.ip-address {
  font-family: 'SFMono-Regular', 'Monaco', 'Cascadia Code', monospace;
  background: var(--gray-100);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--gray-700);
  display: inline-block;
  margin: 0.125rem;
}

.ip-local {
  background: #dcfce7;
  color: #166534;
  font-weight: 500;
}

.ip-vpn {
  background: #fef3c7;
  color: #92400e;
}

.ip-private {
  background: #dbeafe;
  color: #1d4ed8;
}

.ip-public {
  background: #fee2e2;
  color: #dc2626;
  font-weight: 500;
}

/* Application category styling */
.app-category {
  margin-bottom: 0.5rem;
}

.app-category-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.025em;
  margin-bottom: 0.25rem;
}

.app-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.25rem;
}

.app-item {
  background: var(--gray-100);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--gray-700);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

.app-important {
  background: var(--primary-100);
  color: var(--primary-700);
  font-weight: 500;
  border: 1px solid var(--primary-200);
}

/* System info styling */
.system-info {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.system-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-600);
  margin-top: 0.125rem;
  flex-shrink: 0;
}

.system-value {
  font-weight: 500;
  color: var(--gray-800);
  font-size: 0.8125rem;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.system-detail {
  font-size: 0.75rem;
  color: var(--gray-600);
}

/* KB update styling */
.kb-update {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
  margin: 0.125rem;
  white-space: nowrap;
}

.kb-recent {
  background: var(--success-50);
  color: #166534;
  border: 1px solid var(--success-500);
  animation: pulse 2s infinite;
}

.kb-normal {
  background: var(--gray-100);
  color: var(--gray-700);
  border: 1px solid var(--gray-200);
}

/* Loading and animation utilities */
.fade-in {
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.scale-in {
  animation: scaleIn 0.3s ease-out;
}

@keyframes scaleIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Enhanced pulse animation */
.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.8; }
  100% { transform: scale(1); opacity: 1; }
}

/* Bounce animation for interactive elements */
.bounce-on-hover {
  transition: transform var(--transition-fast);
}

.bounce-on-hover:hover {
  transform: translateY(-2px);
  animation: subtle-bounce 0.6s ease;
}

@keyframes subtle-bounce {
  0%, 100% { transform: translateY(-2px); }
  50% { transform: translateY(-4px); }
}

/* Custom checkbox and radio styles */
input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 1.125rem;
  height: 1.125rem;
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-sm);
  background: white;
  cursor: pointer;
  position: relative;
  transition: all var(--transition-fast);
}

input[type="checkbox"]:checked {
  background: var(--primary-500);
  border-color: var(--primary-500);
}

input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  color: white;
  font-size: 0.875rem;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

input[type="checkbox"]:hover {
  border-color: var(--primary-400);
  box-shadow: 0 0 0 2px var(--primary-100);
}

/* Enhanced focus states */
.form-control:focus,
.btn:focus,
input[type="checkbox"]:focus {
  outline: 2px solid var(--primary-500);
  outline-offset: 2px;
}

/* Responsive design - Mobile First */
@media (max-width: 575.98px) {
  /* Container adjustments */
  .container {
    padding: 0 0.75rem;
  }
  
  /* Typography scaling */
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
  
  /* Card adjustments */
  .card, .login-container, .form-container {
    padding: 1.25rem;
    margin: 0.75rem 0;
    border-radius: var(--radius-lg);
  }
  
  /* Button adjustments */
  .btn {
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
    width: 100%;
    justify-content: center;
  }
  
  .btn-sm {
    padding: 0.625rem 0.875rem;
    font-size: 0.75rem;
  }
  
  /* Table responsive */
  .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-lg);
  }
  
  table {
    min-width: 1000px;
  }
  
  th, td {
    padding: 0.5rem;
    font-size: 0.75rem;
    white-space: nowrap;
  }
  
  /* Stats cards mobile layout */
  .stats-card {
    padding: 1.25rem;
    margin-bottom: 1rem;
  }
  
  .stats-card .stat-value {
    font-size: 1.75rem;
  }
  
  /* Form controls mobile */
  .form-control {
    font-size: 1rem; /* Prevent zoom on iOS */
    padding: 0.875rem 1rem;
  }
  
  /* Navigation mobile */
  .navbar-nav {
    gap: 0.5rem;
  }
  
  /* Search controls mobile */
  .search-input-group {
    max-width: 100%;
  }
  
  .filter-controls {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .filter-select {
    width: 100%;
  }
}

@media (min-width: 576px) and (max-width: 767.98px) {
  .container {
    padding: 0 1rem;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .action-buttons {
    flex-direction: row;
    flex-wrap: wrap;
  }
  
  .btn {
    flex: 1;
    min-width: 120px;
  }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
  
  .controls-panel {
    padding: 1.25rem;
  }
  
  .filter-controls {
    flex-wrap: wrap;
    gap: 0.75rem;
  }
}

@media (min-width: 992px) {
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .btn {
    width: auto;
  }
  
  .action-buttons {
    justify-content: flex-start;
  }
}

/* Large screens optimization */
@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }
  
  .stats-card {
    padding: 2rem;
  }
  
  .controls-panel {
    padding: 2rem;
  }
  
  table {
    font-size: 0.9375rem;
  }
  
  th, td {
    padding: 1rem 0.875rem;
  }
}

/* Ultra-wide screens */
@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }
  
  .stats-grid {
    gap: 2rem;
  }
}

/* Dark mode preferences (future-proofing) */
@media (prefers-color-scheme: dark) {
  :root {
    --gray-50: #1e293b;
    --gray-100: #334155;
    --gray-900: #f8fafc;
  }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .btn {
    border: 2px solid currentColor;
  }
  
  .card {
    border: 2px solid var(--gray-400);
  }
}

/* Print styles */
@media print {
  .navbar,
  .btn,
  .controls-panel {
    display: none !important;
  }
  
  .table-wrapper {
    box-shadow: none;
    border: 1px solid #000;
  }
  
  body {
    background: white !important;
    color: black !important;
  }
}

/* Column width optimization for table */

/* Performance optimizations */
.table-wrapper {
  will-change: transform;
  contain: layout style;
}

.fade-in {
  will-change: opacity, transform;
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  .btn:hover {
    transform: none;
  }
  
  .card:hover {
    transform: none;
  }
  
  .btn {
    min-height: 44px; /* iOS touch target */
  }
  
  input[type="checkbox"] {
    min-width: 44px;
    min-height: 44px;
  }
}

/* Table optimizations for better performance */
.table-responsive {
  will-change: scroll-position;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-300) var(--gray-100);
}

.table-responsive::-webkit-scrollbar {
  height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
  background: var(--gray-100);
  border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: var(--primary-300);
  border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
  background: var(--primary-500);
}

.info-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.info-item i {
  width: 16px;
  color: var(--primary-500);
}

.section-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.pc-ip-section {
  margin-bottom: 1rem;
}

.ip-more {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-left: 0.5rem;
}

.pc-system-section {
  margin-bottom: 1rem;
}

.system-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

.system-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.system-item i {
  width: 16px;
  color: var(--primary-500);
}

.pc-apps-section {
  margin-bottom: 1rem;
}

.apps-summary {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.app-count {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.app-count i {
  color: var(--primary-500);
}

.app-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.app-tag {
  background: var(--gray-100);
  color: var(--text-secondary);
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
}

.app-tag.app-important {
  background: var(--primary-100);
  color: var(--primary-700);
  font-weight: 600;
}

.pc-updates-section {
  margin-bottom: 0;
}

.updates-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.kb-badge {
  background: var(--gray-100);
  color: var(--text-secondary);
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
}

.kb-badge.kb-recent {
  background: #dcfce7;
  color: #166534;
  font-weight: 600;
}

.kb-badge.kb-old {
  background: var(--gray-100);
  color: var(--text-secondary);
}

/* Detail Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal.show {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: white;
  border-radius: var(--radius-xl);
  width: 90%;
  max-width: 1000px;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: var(--shadow-2xl);
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.modal.show .modal-content {
  transform: scale(1);
}

.modal-header {
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
  color: white;
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--radius-md);
  transition: background 0.2s ease;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.modal-body {
  padding: 2rem;
  max-height: calc(90vh - 120px);
  overflow-y: auto;
}

.detail-section {
  margin-bottom: 2rem;
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

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

.detail-section-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.detail-section-title i {
  color: var(--primary-500);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.detail-item {
  background: white;
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.detail-item-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.detail-item-value {
  font-size: 0.875rem;
  color: var(--text-primary);
  word-break: break-word;
}

/* Enhanced table responsive design */
@media (max-width: 768px) {
  .table-responsive {
    max-height: 70vh;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  thead th,
  td {
    padding: 0.5rem 0.375rem;
    font-size: 0.8125rem;
  }
  
  .windows-cell {
    min-width: 180px;
  }
  
  .system-cell {
    min-width: 160px;
  }
}

@media (min-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
  }
  
  .table-responsive {
    max-height: 80vh;
  }
  
  .modern-table {
    border-radius: var(--radius-2xl);
  }
}

/* Enhanced Performance Optimizations */
.pc-cards-container {
  will-change: transform;
  contain: layout style;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.pc-card {
  will-change: transform, box-shadow;
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;
}

.modal {
  will-change: opacity, visibility;
}

.modal-content {
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}

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

@keyframes highlight {
  0% { background: var(--primary-100); }
  100% { background: transparent; }
}

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

/* Loading states */
.loading {
  opacity: 0.7;
  pointer-events: none;
  position: relative;
}

.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.loading::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 24px;
  margin: -12px 0 0 -12px;
  border: 2px solid var(--primary-200);
  border-top: 2px solid var(--primary-500);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  z-index: 10;
}

/* Optimized transitions */
* {
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* GPU acceleration hints */
.btn-detail {
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;
}

/* Improved text rendering */
.pc-name,
.modal-title,
.detail-section-title {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Fix CSS variables */
:root {
  --card-bg: rgba(255, 255, 255, 0.95);
  --border-color: #e2e8f0;
  --text-primary: #334155;
  --text-secondary: #64748b;
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
}