/* ========================================
   onikana B2B Matching Platform — Design System
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500;600;700&display=swap');

:root {
  /* Brand Colors */
  --primary: #2563EB;
  --primary-dark: #1D4ED8;
  --primary-light: #DBEAFE;
  --secondary: #059669;
  --secondary-light: #D1FAE5;
  --accent: #D97706;
  --accent-light: #FEF3C7;
  --error: #DC2626;
  --error-light: #FEE2E2;
  
  /* Neutral */
  --bg: #F1F5F9;
  --surface: #FFFFFF;
  --sidebar-bg: #0F172A;
  --sidebar-hover: #1E293B;
  --sidebar-active: #1E40AF;
  --text: #1E293B;
  --text-secondary: #64748B;
  --text-light: #94A3B8;
  --border: #E2E8F0;
  --border-dark: #CBD5E1;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.03);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.05);
  
  /* Radius */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;
  
  /* Spacing */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;
  
  /* Transition */
  --transition: all 0.2s ease;
  --transition-slow: all 0.3s ease;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  overflow: hidden;
  height: 100vh;
}

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

/* ========================================
   Layout
   ======================================== */
.app-layout {
  display: flex;
  height: 100vh;
  width: 100%;
}

/* Sidebar */
.sidebar {
  width: 260px;
  background: var(--sidebar-bg);
  color: #fff;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: var(--transition-slow);
  z-index: 100;
}

.sidebar-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), #818CF8);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
}

.logo-text {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.logo-sub {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 2px;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 8px;
  overflow-y: auto;
}

.nav-section {
  margin-bottom: 8px;
}

.nav-section-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  padding: 12px 12px 6px;
  font-weight: 600;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  font-size: 13.5px;
  color: #CBD5E1;
  user-select: none;
}

.nav-item:hover {
  background: var(--sidebar-hover);
  color: #fff;
}

.nav-item.active {
  background: var(--sidebar-active);
  color: #fff;
  font-weight: 500;
}

.nav-item .nav-icon {
  width: 20px;
  text-align: center;
  font-size: 16px;
  flex-shrink: 0;
}

.nav-item .nav-badge {
  margin-left: auto;
  background: var(--error);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  min-width: 20px;
  text-align: center;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
}

.sidebar-user:hover { background: var(--sidebar-hover); }

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #059669, #34D399);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.user-info { flex: 1; min-width: 0; }
.user-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 11px; color: var(--text-light); }

/* Main Content */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

/* Header */
.top-header {
  height: 60px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  flex-shrink: 0;
}

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

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.breadcrumb span { color: var(--text); font-weight: 600; }

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

.header-search {
  position: relative;
}

.header-search input {
  width: 240px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 0 16px 0 36px;
  font-size: 13px;
  background: var(--bg);
  transition: var(--transition);
  font-family: inherit;
}

.header-search input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
  width: 300px;
}

.header-search::before {
  content: '🔍';
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
}

.header-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 16px;
  position: relative;
}

.header-btn:hover { background: var(--bg); }

.header-btn .notif-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: var(--error);
  border-radius: 50%;
  border: 2px solid var(--surface);
}

/* Page Content */
.page-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.page { display: none; }
.page.active { display: block; animation: fadeIn 0.3s ease; }

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

.page-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.page-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

/* ========================================
   Components
   ======================================== */

/* Cards */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition);
}

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

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
}

.card-body { padding: 20px; }

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.stat-card:hover { 
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

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

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.stat-icon.blue { background: var(--primary-light); }
.stat-icon.green { background: var(--secondary-light); }
.stat-icon.amber { background: var(--accent-light); }
.stat-icon.red { background: var(--error-light); }

.stat-trend {
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 2px;
}

.stat-trend.up { color: var(--secondary); }
.stat-trend.down { color: var(--error); }

.stat-value {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Grid */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 24px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; margin-bottom: 24px; }

/* Tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 12px 16px;
  border-bottom: 2px solid var(--border);
  background: #F8FAFC;
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
}

.data-table tr {
  transition: var(--transition);
}

.data-table tr:hover {
  background: #F8FAFC;
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-blue { background: var(--primary-light); color: var(--primary-dark); }
.badge-green { background: var(--secondary-light); color: #065F46; }
.badge-amber { background: var(--accent-light); color: #92400E; }
.badge-red { background: var(--error-light); color: #991B1B; }
.badge-gray { background: #F1F5F9; color: var(--text-secondary); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-family: inherit;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }

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

.btn-secondary:hover { background: var(--bg); }

.btn-success { background: var(--secondary); color: #fff; }
.btn-success:hover { background: #047857; }

.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }

/* Progress Bar */
.progress-bar {
  height: 8px;
  background: var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--primary), #818CF8);
  transition: width 1s ease;
}

/* Scoring */
.score-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.score-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  min-width: 32px;
}

.score-track {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.score-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.8s ease;
}

.score-fill.high { background: linear-gradient(90deg, var(--secondary), #34D399); }
.score-fill.mid { background: linear-gradient(90deg, var(--accent), #FBBF24); }
.score-fill.low { background: linear-gradient(90deg, var(--error), #F87171); }

/* Chat */
.chat-container {
  display: flex;
  height: calc(100vh - 180px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
}

.chat-sidebar {
  width: 280px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.chat-sidebar-header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}

.chat-list {
  flex: 1;
  overflow-y: auto;
}

.chat-item {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  transition: var(--transition);
  border-bottom: 1px solid var(--border);
}

.chat-item:hover { background: #F8FAFC; }
.chat-item.active { background: var(--primary-light); border-left: 3px solid var(--primary); }

.chat-item-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary), #818CF8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.chat-item-info { flex: 1; min-width: 0; }
.chat-item-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-item-last { font-size: 12px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.chat-item-time { font-size: 11px; color: var(--text-light); white-space: nowrap; }

.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.chat-main-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-msg {
  display: flex;
  gap: 10px;
  max-width: 70%;
}

.chat-msg.sent {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.chat-msg-bubble {
  padding: 10px 16px;
  border-radius: var(--radius-lg);
  font-size: 13.5px;
  line-height: 1.5;
}

.chat-msg.received .chat-msg-bubble {
  background: #F1F5F9;
  border-bottom-left-radius: 4px;
}

.chat-msg.sent .chat-msg-bubble {
  background: var(--primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-msg-time {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 4px;
}

.chat-input-area {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  align-items: center;
}

.chat-input-area input {
  flex: 1;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 0 16px;
  font-size: 13.5px;
  font-family: inherit;
  transition: var(--transition);
}

.chat-input-area input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* Forms */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: inherit;
  transition: var(--transition);
  background: var(--surface);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

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

/* ========================================
   Page-specific styles
   ======================================== */

/* Partner Card */
.partner-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 20px;
  transition: var(--transition);
  cursor: pointer;
}

.partner-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  border-color: var(--primary);
}

.partner-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}

.partner-logo {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.partner-name { font-size: 16px; font-weight: 700; margin-bottom: 2px; }
.partner-category { font-size: 12px; color: var(--text-secondary); }

.partner-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.partner-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--bg);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.partner-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

/* Meeting Timeline */
.meeting-timeline {
  position: relative;
}

.meeting-item {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  position: relative;
}

.meeting-item:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 19px;
  top: 52px;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.meeting-dot {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  z-index: 1;
}

.meeting-dot.scheduled { background: var(--primary-light); }
.meeting-dot.completed { background: var(--secondary-light); }
.meeting-dot.cancelled { background: var(--error-light); }

.meeting-info { flex: 1; }
.meeting-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.meeting-meta { font-size: 12px; color: var(--text-secondary); display: flex; gap: 16px; }

/* Wizard Steps */
.wizard-steps {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-bottom: 32px;
}

.wizard-step {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wizard-step-dot {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  border: 2px solid var(--border);
  color: var(--text-light);
  background: var(--surface);
  transition: var(--transition);
}

.wizard-step.active .wizard-step-dot {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.wizard-step.completed .wizard-step-dot {
  border-color: var(--secondary);
  background: var(--secondary);
  color: #fff;
}

.wizard-step-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.wizard-step.active .wizard-step-label { color: var(--primary); font-weight: 600; }
.wizard-step.completed .wizard-step-label { color: var(--secondary); }

.wizard-line {
  width: 60px;
  height: 2px;
  background: var(--border);
  margin: 0 8px;
  align-self: center;
}

.wizard-line.completed { background: var(--secondary); }

/* Chart placeholder */
.chart-placeholder {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chart-bar-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chart-bar-label {
  width: 60px;
  font-size: 12px;
  color: var(--text-secondary);
  text-align: right;
}

.chart-bar-track {
  flex: 1;
  height: 24px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.chart-bar-fill {
  height: 100%;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  padding-left: 8px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  transition: width 1s ease;
}

/* Landing page */
.landing-page {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  background: linear-gradient(135deg, #0F172A 0%, #1E3A5F 50%, #1E40AF 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.landing-bg-pattern {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at 30% 50%, rgba(37,99,235,0.15) 0%, transparent 50%),
              radial-gradient(circle at 70% 30%, rgba(129,140,248,0.1) 0%, transparent 40%);
}

.landing-content {
  text-align: center;
  max-width: 500px;
  z-index: 1;
}

.landing-logo {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, var(--primary), #818CF8);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 800;
  margin: 0 auto 24px;
  box-shadow: 0 8px 32px rgba(37,99,235,0.3);
}

.landing-title {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.03em;
}

.landing-subtitle {
  font-size: 15px;
  color: #94A3B8;
  margin-bottom: 36px;
  line-height: 1.6;
}

.login-form {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-xl);
  padding: 32px;
  text-align: left;
}

.login-form .form-label { color: #CBD5E1; }

.login-form .form-input {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
  color: #fff;
}

.login-form .form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.3);
}

.login-form .form-input::placeholder { color: #64748B; }

.login-btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary), #818CF8);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  margin-top: 8px;
}

.login-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(37,99,235,0.35); }

.login-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  font-size: 13px;
}

.login-options a { color: #818CF8; }

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}

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

.modal {
  background: var(--surface);
  border-radius: var(--radius-xl);
  width: 90%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  animation: slideUp 0.3s ease;
}

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

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

.modal-title { font-size: 17px; font-weight: 700; }

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  border: none;
  background: var(--bg);
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal-close:hover { background: var(--error-light); color: var(--error); }

.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-secondary);
}

.empty-state-icon { font-size: 48px; margin-bottom: 16px; }
.empty-state-title { font-size: 16px; font-weight: 600; margin-bottom: 8px; color: var(--text); }
.empty-state-desc { font-size: 13px; max-width: 400px; margin: 0 auto 20px; }

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--sidebar-bg);
  color: #fff;
  padding: 14px 20px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  box-shadow: var(--shadow-xl);
  z-index: 2000;
  transform: translateY(100px);
  opacity: 0;
  transition: var(--transition-slow);
}

.toast.show { transform: translateY(0); opacity: 1; }
