/* AiNA Partners Club - Advanced UI System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Color System - Deep Blue & Black Theme */
  --primary-900: #0c1425;
  --primary-800: #111827;
  --primary-700: #1f2937;
  --primary-600: #374151;
  --primary-500: #4f46e5;
  --primary-400: #6366f1;
  --primary-300: #8b5cf6;
  --primary-200: #a78bfa;
  --primary-100: #c4b5fd;
  
  --accent-500: #06b6d4;
  --accent-400: #22d3ee;
  --accent-300: #67e8f9;
  
  --surface-900: #030712;
  --surface-800: #0f172a;
  --surface-700: #1e293b;
  --surface-600: #334155;
  --surface-500: #475569;
  
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  --text-disabled: #475569;
  
  --border-primary: #1e293b;
  --border-secondary: #334155;
  
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  
  /* 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.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  
  /* Glass Effect */
  --glass-bg: rgba(15, 23, 42, 0.7);
  --glass-border: rgba(148, 163, 184, 0.1);
  --glass-backdrop: blur(16px);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, var(--surface-900) 0%, var(--primary-900) 50%, var(--surface-800) 100%);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Stickyナビの下に十分な余白を確保するためのヘルパー */
.has-sticky-nav { padding-top: 72px; }

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 80%, rgba(79, 70, 229, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(6, 182, 212, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

/* Typography */
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }

.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent-400); }

/* Layout */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.grid {
  display: grid;
}

.flex {
  display: flex;
}

.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }

.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-start { justify-content: flex-start; }
.justify-end { justify-content: flex-end; }

.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }

.gap-2 { gap: var(--spacing-sm); }
.gap-4 { gap: var(--spacing-md); }
.gap-6 { gap: var(--spacing-lg); }
.gap-8 { gap: var(--spacing-xl); }

/* Cards & Surfaces */
.card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-backdrop);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: var(--spacing-xl);
  box-shadow: var(--shadow-xl);
  transition: all 0.3s ease;
}

.card:hover {
  border-color: rgba(148, 163, 184, 0.2);
  box-shadow: var(--shadow-2xl);
  transform: translateY(-2px);
}

.card-compact {
  padding: var(--spacing-lg);
}

.glass-card {
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: var(--radius-2xl);
  box-shadow: 
    0 0 0 1px rgba(255, 255, 255, 0.05) inset,
    var(--shadow-2xl);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.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 0.5s ease;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--primary-500), var(--primary-400));
  color: white;
  box-shadow: 
    0 4px 14px 0 rgba(79, 70, 229, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-600), var(--primary-500));
  box-shadow: 
    0 6px 20px 0 rgba(79, 70, 229, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.2) inset;
  transform: translateY(-1px);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent-500), var(--accent-400));
  color: white;
  box-shadow: 
    0 4px 14px 0 rgba(6, 182, 212, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.btn-accent:hover {
  background: linear-gradient(135deg, var(--accent-600), var(--accent-500));
  box-shadow: 
    0 6px 20px 0 rgba(6, 182, 212, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.2) inset;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-secondary);
}

.btn-outline:hover {
  background: rgba(148, 163, 184, 0.1);
  border-color: var(--accent-400);
  color: var(--text-primary);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  background: rgba(148, 163, 184, 0.1);
  color: var(--text-primary);
}

/* Forms */
.form-group {
  margin-bottom: var(--spacing-lg);
}

.form-label {
  display: block;
  margin-bottom: var(--spacing-sm);
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.form-input {
  width: 100%;
  padding: 0.875rem 1rem;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-size: 0.875rem;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-400);
  box-shadow: 
    0 0 0 3px rgba(79, 70, 229, 0.1),
    0 4px 6px -1px rgba(0, 0, 0, 0.1);
  background: rgba(15, 23, 42, 0.7);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.input-with-icon {
  position: relative;
}

.input-with-icon .form-input {
  padding-right: 3rem;
}

.input-with-icon .icon {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

/* Navigation */
.navbar {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-backdrop);
  border-bottom: 1px solid var(--border-primary);
  padding: var(--spacing-md) 0;
  position: sticky;
  top: 0;
  z-index: 50;
}

/* ナビ直後のコンテンツに軽い余白を追加して重なりを防ぐ */
.navbar + .container,
.navbar + main .container { margin-top: var(--spacing-lg); }

.navbar-brand {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
  text-decoration: none;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
  list-style: none;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
  background: rgba(148, 163, 184, 0.1);
}

/* Logo */
.logo {
  width: 3rem;
  height: 3rem;
  background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.25rem;
  color: white;
  box-shadow: 
    0 8px 25px rgba(79, 70, 229, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

/* Status & Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-success {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.2);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-error {
  background: rgba(239, 68, 68, 0.2);
  color: var(--error);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-primary {
  background: rgba(79, 70, 229, 0.2);
  color: var(--primary-400);
  border: 1px solid rgba(79, 70, 229, 0.3);
}

/* 追加ユーティリティ/色 */
.badge-secondary {
  background: rgba(148, 163, 184, 0.2);
  color: var(--text-secondary);
  border: 1px solid rgba(148, 163, 184, 0.3);
}

/* Alerts */
.alert {
  padding: var(--spacing-md);
  border-radius: var(--radius-lg);
  margin-bottom: var(--spacing-lg);
  border: 1px solid;
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.2);
  color: var(--success);
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.2);
  color: var(--error);
}

.alert-warning {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.2);
  color: var(--warning);
}

/* Tables */
.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--glass-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.table th,
.table td {
  padding: var(--spacing-md);
  text-align: left;
  border-bottom: 1px solid var(--border-primary);
}

.table th {
  background: rgba(15, 23, 42, 0.8);
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.table tbody tr:hover {
  background: rgba(148, 163, 184, 0.05);
}

/* Utilities */
.w-full { width: 100%; }
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; }

/* spacing utils used by nav/badges */
.ml-2 { margin-left: var(--spacing-sm); }
.mr-1 { margin-right: var(--spacing-xs); }
.mr-2 { margin-right: var(--spacing-sm); }
.px-2 { padding-left: var(--spacing-sm); padding-right: var(--spacing-sm); }
.py-1 { padding-top: var(--spacing-xs); padding-bottom: var(--spacing-xs); }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.hidden { display: none; }
.space-y-2 > * + * { margin-top: var(--spacing-sm); }
.space-y-4 > * + * { margin-top: var(--spacing-lg); }

.p-4 { padding: var(--spacing-md); }
.p-6 { padding: var(--spacing-lg); }
.p-8 { padding: var(--spacing-xl); }

.m-4 { margin: var(--spacing-md); }
.m-6 { margin: var(--spacing-lg); }
.m-8 { margin: var(--spacing-xl); }

.mt-4 { margin-top: var(--spacing-md); }
.mt-6 { margin-top: var(--spacing-lg); }
.mt-8 { margin-top: var(--spacing-xl); }

.mb-4 { margin-bottom: var(--spacing-md); }
.mb-6 { margin-bottom: var(--spacing-lg); }
.mb-8 { margin-bottom: var(--spacing-xl); }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.rounded { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-2xl { border-radius: var(--radius-2xl); }

.shadow { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }
.shadow-2xl { box-shadow: var(--shadow-2xl); }

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

.animate-fade-in {
  animation: fadeIn 0.6s ease-out;
}

.animate-slide-in {
  animation: slideIn 0.4s ease-out;
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: 0 var(--spacing-sm);
  }
  .navbar { padding: calc(var(--spacing-sm) + 2px) 0; }
  
  .card {
    padding: var(--spacing-lg);
  }
  
  .btn {
    padding: 0.625rem 1.25rem;
  }
  
  .navbar-nav {
    gap: var(--spacing-md);
  }
}

/* Dark mode overrides for better contrast */
.bg-white { background-color: var(--surface-700) !important; }
.bg-gray-50 { background-color: var(--surface-800) !important; }
.bg-gray-100 { background-color: var(--surface-700) !important; }
.text-gray-900 { color: var(--text-primary) !important; }
.text-gray-700 { color: var(--text-secondary) !important; }
.text-gray-600 { color: var(--text-muted) !important; }
.border-gray-200 { border-color: var(--border-primary) !important; }
.border-gray-300 { border-color: var(--border-secondary) !important; }
