/* ═══════════════════════════════════════════════════════════════
   JIRA INTEGRATION MODULE — Styles
   Project: work-progress-asc
   ═══════════════════════════════════════════════════════════════ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700&display=swap');

/* ── CSS Variables (Dark Mode First) ── */
:root {
  --bg-primary: #0f1117;
  --bg-secondary: #161b27;
  --bg-card: #1e2536;
  --bg-card-hover: #252d42;
  --bg-input: #1a2035;
  --bg-modal: #1a2035;

  --border-color: #2d3748;
  --border-focus: #5c6ef8;

  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #0f1117;

  --accent: #5c6ef8;
  --accent-hover: #7c8fff;
  --accent-dim: rgba(92, 110, 248, 0.12);

  --success: #10b981;
  --success-dim: rgba(16, 185, 129, 0.12);
  --warning: #f59e0b;
  --warning-dim: rgba(245, 158, 11, 0.12);
  --danger: #ef4444;
  --danger-dim: rgba(239, 68, 68, 0.12);
  --info: #38bdf8;
  --info-dim: rgba(56, 189, 248, 0.12);

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --header-h: 60px;
  --sidebar-w: 280px;
}

html.light {
  --bg-primary: #f0f4ff;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f8faff;
  --bg-input: #f8faff;
  --bg-modal: #ffffff;
  --border-color: #e2e8f0;
  --border-focus: #5c6ef8;
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-inverse: #ffffff;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
}

/* ── Base Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.6;
  transition: background 0.3s, color 0.3s;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ════════════════════════════════════════════
   HEADER
   ════════════════════════════════════════════ */
.jira-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.jira-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.jira-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.jira-logo-icon {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, #5c6ef8, #8b5cf6);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: 0 2px 8px rgba(92,110,248,0.4);
}

.jira-logo-text {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.jira-logo-badge {
  font-size: 10px;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(92,110,248,0.3);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.back-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  border: 1px solid transparent;
}
.back-link:hover {
  color: var(--text-primary);
  background: var(--bg-card);
  border-color: var(--border-color);
}

.jira-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── User Info Badge ── */
.user-info-badge {
  display: none;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 4px 12px 4px 6px;
}
.user-info-badge.visible { display: flex; }

.user-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--accent-dim);
}

.user-avatar-placeholder {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: white;
}

.user-name-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Header Buttons ── */
.header-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.header-btn:hover {
  color: var(--text-primary);
  border-color: var(--accent);
  background: var(--accent-dim);
}
.header-btn svg { width: 14px; height: 14px; fill: currentColor; flex-shrink: 0; }
.header-btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
.header-btn.primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
.header-btn.danger {
  color: var(--danger);
  border-color: transparent;
}
.header-btn.danger:hover {
  background: var(--danger-dim);
  border-color: var(--danger);
}

/* ════════════════════════════════════════════
   MAIN LAYOUT
   ════════════════════════════════════════════ */
.jira-layout {
  display: flex;
  min-height: 100vh;
  padding-top: var(--header-h);
}

/* ── LEFT SIDEBAR ── */
.jira-sidebar {
  width: var(--sidebar-w);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  position: fixed;
  top: var(--header-h);
  left: 0;
  bottom: 0;
  overflow-y: auto;
  padding: 16px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  padding: 8px 8px 4px;
  margin-top: 4px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.18s;
  border: 1px solid transparent;
}
.sidebar-item:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}
.sidebar-item.active {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: rgba(92,110,248,0.2);
}
.sidebar-item svg { width: 16px; height: 16px; fill: currentColor; flex-shrink: 0; }

.sidebar-divider {
  height: 1px;
  background: var(--border-color);
  margin: 4px 0;
}

/* Board select in sidebar */
.sidebar-board-select {
  margin: 0 2px;
}
.sidebar-board-select select {
  width: 100%;
  padding: 8px 10px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 12px;
  cursor: pointer;
  outline: none;
}
.sidebar-board-select select:focus { border-color: var(--accent); }

/* Sprint list in sidebar */
.sprint-list-sidebar {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sprint-item-sidebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.18s;
  border: 1px solid transparent;
}
.sprint-item-sidebar:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}
.sprint-item-sidebar.active {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: rgba(92,110,248,0.2);
}
.sprint-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.sprint-dot.active { background: var(--success); }
.sprint-dot.future { background: var(--info); }
.sprint-dot.closed { background: var(--text-muted); }
.sprint-item-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── MAIN CONTENT ── */
.jira-main {
  flex: 1;
  margin-left: var(--sidebar-w);
  padding: 24px;
  min-height: calc(100vh - var(--header-h));
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ════════════════════════════════════════════
   LOGIN SCREEN
   ════════════════════════════════════════════ */
#login-screen {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.4s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.login-icon {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, #5c6ef8, #8b5cf6);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  margin: 0 auto 16px;
  box-shadow: 0 4px 20px rgba(92,110,248,0.4);
}

.login-title {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.login-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Auth method tabs */
.auth-tabs {
  display: flex;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 4px;
  gap: 4px;
  margin-bottom: 20px;
}

.auth-tab-btn {
  flex: 1;
  padding: 8px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.auth-tab-btn.active {
  background: var(--bg-card);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
}

/* Form elements */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.form-input {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}
.form-input:focus { border-color: var(--accent); }
.form-input::placeholder { color: var(--text-muted); }

.form-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.5;
}
.form-hint a { color: var(--accent); text-decoration: none; }
.form-hint a:hover { text-decoration: underline; }

.form-panel { display: none; }
.form-panel.active { display: block; }

/* Submit button */
.login-submit-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  border: none;
  border-radius: var(--radius-sm);
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.login-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(92,110,248,0.4);
}
.login-submit-btn:active { transform: translateY(0); }
.login-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.login-error {
  background: var(--danger-dim);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 12px;
  color: var(--danger);
  margin-top: 12px;
  display: none;
  line-height: 1.7;
}
.login-error code {
  background: rgba(239,68,68,0.15);
  padding: 1px 4px;
  border-radius: 3px;
  font-family: monospace;
  font-size: 11px;
  word-break: break-all;
}
.login-error.visible { display: block; }

/* ════════════════════════════════════════════
   SPRINT BOARD SCREEN
   ════════════════════════════════════════════ */
#board-screen { display: none; flex-direction: column; gap: 20px; }
#board-screen.visible { display: flex; }

/* ── Sprint Info Bar ── */
.sprint-info-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.sprint-info-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sprint-name-title {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sprint-state-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.sprint-state-badge.active { background: var(--success-dim); color: var(--success); }
.sprint-state-badge.future { background: var(--info-dim); color: var(--info); }
.sprint-state-badge.closed { background: rgba(100,116,139,0.15); color: var(--text-muted); }

.sprint-dates {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.sprint-dates svg { width: 12px; height: 12px; fill: currentColor; }

.sprint-goal-text {
  font-size: 12px;
  color: var(--text-secondary);
  font-style: italic;
  max-width: 400px;
}

.sprint-stats-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.stat-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  min-width: 70px;
}
.stat-chip-num {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}
.stat-chip-label {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 2px;
}

/* Sprint progress bar */
.sprint-progress-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 20px;
}

.sprint-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.sprint-progress-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}
.sprint-progress-pct {
  font-size: 13px;
  font-weight: 700;
  color: var(--success);
}

.sprint-progress-bar {
  height: 8px;
  background: var(--border-color);
  border-radius: 4px;
  overflow: hidden;
}
.sprint-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--success), #059669);
  border-radius: 4px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Filter Bar ── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-search {
  flex: 1;
  min-width: 200px;
  position: relative;
}
.filter-search input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}
.filter-search input:focus { border-color: var(--accent); }
.filter-search-icon {
  position: absolute;
  left: 10px; top: 50%;
  transform: translateY(-50%);
  width: 14px; height: 14px;
  fill: var(--text-muted);
}

.filter-select {
  padding: 8px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 12px;
  cursor: pointer;
  outline: none;
}
.filter-select:focus { border-color: var(--accent); }

.view-toggle-group {
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.view-toggle-btn {
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  transition: all 0.2s;
}
.view-toggle-btn:hover { color: var(--text-primary); background: var(--bg-card-hover); }
.view-toggle-btn.active { color: var(--accent); background: var(--accent-dim); }
.view-toggle-btn svg { width: 14px; height: 14px; fill: currentColor; }

/* ── KANBAN BOARD ── */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  align-items: start;
}

.kanban-col {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.kanban-col-header {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border-color);
}

.kanban-col-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.kanban-col-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex: 1;
}

.kanban-col-count {
  font-size: 11px;
  font-weight: 700;
  background: var(--border-color);
  color: var(--text-secondary);
  border-radius: 10px;
  padding: 2px 7px;
}

.kanban-col-body {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 80px;
  max-height: calc(100vh - 320px);
  overflow-y: auto;
}

/* ── ISSUE CARD ── */
.issue-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px;
  cursor: pointer;
  transition: all 0.18s;
  position: relative;
  overflow: hidden;
}
.issue-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.2s;
}
.issue-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.issue-card:hover::before { opacity: 1; }

.issue-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.issue-key-badge {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(92,110,248,0.2);
  border-radius: 4px;
  padding: 2px 6px;
  white-space: nowrap;
  text-decoration: none;
}
.issue-key-badge:hover { text-decoration: underline; }

.issue-type-icon { width: 16px; height: 16px; flex-shrink: 0; }

.issue-summary {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 10px;
}

.issue-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.issue-meta-left { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.priority-badge {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

.assignee-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border-radius: 10px;
  padding: 2px 6px;
}
.assignee-avatar {
  width: 16px; height: 16px;
  border-radius: 50%;
  object-fit: cover;
}
.assignee-avatar-ph {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: 700;
  color: white;
}

.story-points-badge {
  font-size: 10px;
  font-weight: 700;
  background: var(--warning-dim);
  color: var(--warning);
  border-radius: 4px;
  padding: 2px 6px;
  border: 1px solid rgba(245,158,11,0.2);
}

/* ── LIST VIEW ── */
.issues-list-view {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.issue-list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  cursor: pointer;
  transition: all 0.18s;
}
.issue-list-row:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
}

.issue-list-key { min-width: 90px; }
.issue-list-summary { flex: 1; font-size: 13px; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.issue-list-status { min-width: 100px; }
.issue-list-assignee { min-width: 110px; display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-secondary); }
.issue-list-points { min-width: 50px; text-align: right; }

/* Status pills */
.status-pill {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
}

/* ── EMPTY STATE ── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: var(--text-muted);
  gap: 12px;
}
.empty-state-icon { font-size: 48px; opacity: 0.5; }
.empty-state h3 { font-size: 16px; font-weight: 600; color: var(--text-secondary); }
.empty-state p { font-size: 13px; }

/* ── LOADING ── */
.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 13px;
}

.spinner {
  width: 24px; height: 24px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ════════════════════════════════════════════
   ISSUE DETAIL MODAL
   ════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }

.modal-card {
  background: var(--bg-modal);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 680px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s ease;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border-color);
}

.modal-header-left { flex: 1; }

.modal-issue-key {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 6px;
  display: block;
}

.modal-issue-title {
  font-family: 'Outfit', sans-serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

.modal-close-btn {
  width: 30px; height: 30px;
  border: none;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.2s;
  flex-shrink: 0;
}
.modal-close-btn:hover { background: var(--danger-dim); color: var(--danger); }

.modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  gap: 20px;
}

.modal-body-main { flex: 1; }

.modal-body-sidebar {
  width: 200px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-field-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.modal-description {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  white-space: pre-wrap;
  max-height: 200px;
  overflow-y: auto;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  padding: 12px;
  border: 1px solid var(--border-color);
}
.modal-description.empty { color: var(--text-muted); font-style: italic; }

.modal-meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.modal-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* Transition select */
.transition-select-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.transition-select-wrap label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}
.transition-select-wrap select {
  padding: 7px 10px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 12px;
  cursor: pointer;
  outline: none;
}
.transition-select-wrap select:focus { border-color: var(--accent); }

.modal-action-btn {
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.modal-action-btn.primary {
  background: var(--accent);
  color: white;
}
.modal-action-btn.primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}
.modal-action-btn.primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.open-jira-link {
  font-size: 12px;
  color: var(--text-secondary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  transition: all 0.2s;
}
.open-jira-link:hover { color: var(--accent); border-color: var(--accent); }
.open-jira-link svg { width: 12px; height: 12px; fill: currentColor; }

/* ════════════════════════════════════════════
   TOAST NOTIFICATION
   ════════════════════════════════════════════ */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text-primary);
  box-shadow: var(--shadow-md);
  max-width: 320px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastIn 0.3s ease;
  pointer-events: all;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}
.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.info { border-left: 3px solid var(--info); }
.toast-icon { font-size: 16px; flex-shrink: 0; }
.toast-msg { flex: 1; }

/* ════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════ */
@media (max-width: 900px) {
  .jira-sidebar { width: 240px; }
  .jira-main { margin-left: 240px; padding: 16px; }
}

@media (max-width: 700px) {
  .jira-sidebar { display: none; }
  .jira-main { margin-left: 0; padding: 12px; }
  .kanban-board { grid-template-columns: 1fr; }
  .modal-body { flex-direction: column; }
  .modal-body-sidebar { width: 100%; }
}
