/* jira-dashboard.html — page-specific styles */

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(135deg, #0b0e13 0%, #141c28 100%);
  min-height: 100vh;
  color: #c9d2dc;
  line-height: 1.6;
  font-size: 13px;
  overflow-x: hidden;
}

:root {
  --bg: #0b0e13;
  --surface: rgba(255, 255, 255, 0.05);
  --surface2: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.1);
  --accent: #2b8be6;
  --accent2: #f59e0b;
  --accent3: #10b981;
  --danger: #ef4444;
  --warn: #f59e0b;
  --text: #c9d2dc;
  --muted: #8c99a8;
  --font-display: 'Inter', sans-serif;
}

.app-container { display: flex; min-height: 100vh; }

/* Sidebar - Prioriti AI design */
.sidebar {
  width: 280px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  padding: 24px 0;
  box-shadow: 2px 0 25px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.logo {
  display: flex;
  align-items: center;
  font-size: 20px;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, #ff6b00, #ff9933);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.logo img { height: 32px; }
.logo .material-icons { margin-right: 12px; font-size: 28px; }

.nav { padding: 0 12px 16px; flex: 1; overflow-y: auto; }
.nav-section { margin-bottom: 20px; }
.nav-label {
  font-size: 10px; color: var(--muted); letter-spacing: 1.5px;
  text-transform: uppercase; padding: 8px 12px 4px; margin-bottom: 4px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: 0 25px 25px 0;
  cursor: pointer; color: rgba(255,255,255,0.8);
  transition: all 0.3s ease; margin: 4px 0;
  font-size: 13px; border: none; background: none; width: 100%; text-align: left;
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(43,139,230,0.3), rgba(84,104,242,0.3));
  border-left: 4px solid #5468f2;
  color: white;
  font-weight: 500;
  box-shadow: 0 4px 20px rgba(84,104,242,0.3);
}
.nav-item .nav-icon { width: 20px; text-align: center; flex-shrink: 0; font-size: 18px; }
.nav-item .material-icons { font-size: 20px; margin-right: 4px; }
.nav-badge {
  margin-left: auto; background: var(--accent); color: #fff;
  font-size: 10px; padding: 2px 8px; border-radius: 20px;
}
.nav-badge.warn { background: var(--warn); }

.sidebar-footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 11px; color: var(--muted);
}
.connection-dot {
  display: inline-block; width: 7px; height: 7px;
  border-radius: 50%; margin-right: 6px; background: #2b384a;
  vertical-align: middle;
}
.connection-dot.connected { background: var(--accent3); box-shadow: 0 0 6px var(--accent3); }
.connection-dot.demo { background: var(--accent2); box-shadow: 0 0 6px var(--accent2); }

/* Main content */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: rgba(255,255,255,0.02);
  overflow: hidden;
}

/* Header - Prioriti AI style */
.header {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px 32px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky; top: 0; z-index: 100;
}
.header-left { display: flex; align-items: center; }
.header-title {
  font-size: 24px;
  font-weight: 700;
  margin-left: 12px;
  background: linear-gradient(135deg, #ff6b00, #ff9933);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.header-right { display: flex; align-items: center; gap: 16px; }
.topbar-project {
  background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1);
  color: var(--text); padding: 8px 14px; border-radius: 10px;
  font-family: 'Inter', sans-serif; font-size: 12px; cursor: pointer;
  appearance: none;
}
.topbar-project:focus { outline: none; border-color: var(--accent); }
.btn {
  padding: 10px 18px; border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all 0.3s ease; white-space: nowrap;
}
.btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}
.btn.primary {
  background: linear-gradient(135deg, #2b8be6, #5468f2);
  border: none;
  color: white;
  box-shadow: 0 4px 15px rgba(43,139,230,0.3);
}
.btn.primary:hover { box-shadow: 0 6px 20px rgba(43,139,230,0.4); }

/* CONNECT PANEL */
.connect-banner {
  margin: 20px 32px 0;
  background: linear-gradient(135deg, rgba(43,139,230,0.15), rgba(84,104,242,0.08));
  border: 1px solid rgba(43,139,230,0.3);
  border-radius: 16px; padding: 20px 24px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  backdrop-filter: blur(10px);
}
.connect-banner.hidden { display: none; }
.connect-label { font-size: 12px; color: var(--muted); flex: 1; min-width: 200px; }
.connect-label strong { color: var(--text); display: block; margin-bottom: 2px; font-size: 13px; }
.connect-fields { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.connect-input {
  background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1);
  color: var(--text); padding: 8px 12px; border-radius: 10px;
  font-family: 'Inter', sans-serif; font-size: 12px; width: 220px;
}
.connect-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(43,139,230,0.2); }
.connect-input.sm { width: 140px; }

/* CONTENT */
.content { flex: 1; overflow-y: auto; padding: 32px; }

/* VIEWS */
.view { display: none; }
.view.active { display: block; animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* SECTION HEADER */
.section-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 24px; flex-wrap: wrap;
}
.section-title { font-family: 'Inter', sans-serif; font-weight: 700; font-size: 22px; color: #f2f5f9; }
.section-sub { color: var(--muted); font-size: 12px; flex: 1; }
.tag {
  font-size: 10px; padding: 4px 10px; border-radius: 8px;
  border: 1px solid; letter-spacing: 0.5px; text-transform: uppercase;
  font-weight: 600;
}
.tag-blue { border-color: var(--accent); color: var(--accent); background: rgba(43,139,230,0.15); }
.tag-green { border-color: var(--accent3); color: var(--accent3); background: rgba(16,185,129,0.15); }
.tag-yellow { border-color: var(--accent2); color: var(--accent2); background: rgba(245,158,11,0.15); }
.tag-red { border-color: var(--danger); color: var(--danger); background: rgba(239,68,68,0.15); }

/* STATS ROW - glass cards */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 28px; }
.stat-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px; padding: 20px;
  position: relative; overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}
.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 25px 50px rgba(0,0,0,0.3);
  border-color: rgba(43,139,230,0.3);
}
.stat-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
}
.stat-card.blue::before { background: linear-gradient(90deg, #2b8be6, #5468f2); }
.stat-card.green::before { background: var(--accent3); }
.stat-card.yellow::before { background: var(--accent2); }
.stat-card.red::before { background: var(--danger); }
.stat-value { font-family: 'Inter', sans-serif; font-weight: 800; font-size: 32px; line-height: 1; margin-bottom: 4px; color: #f2f5f9; }
.stat-label { font-size: 12px; color: var(--muted); }
.stat-delta { font-size: 11px; margin-top: 8px; }
.stat-delta.up { color: var(--accent3); }
.stat-delta.down { color: var(--danger); }

/* SPRINT BOARD */
.sprint-select-row { display: flex; gap: 10px; margin-bottom: 20px; align-items: center; flex-wrap: wrap; }
.sprint-select-row label { color: var(--muted); font-size: 11px; }
.sprint-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.sprint-col {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px; padding: 16px;
  min-height: 300px; display: flex; flex-direction: column;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}
.sprint-col-header {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 14px; padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.col-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.col-dot.todo { background: var(--muted); }
.col-dot.inprogress { background: var(--accent); }
.col-dot.review { background: var(--accent2); }
.col-dot.done { background: var(--accent3); }
.col-title { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; flex: 1; }
.col-count { font-size: 11px; color: var(--muted); background: rgba(0,0,0,0.25); padding: 2px 8px; border-radius: 10px; }

.ticket {
  background: rgba(0,0,0,0.2); border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px; padding: 12px;
  margin-bottom: 8px; cursor: pointer;
  transition: all 0.3s ease;
  animation: slideIn 0.3s ease;
}
@keyframes slideIn { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: translateX(0); } }
.ticket:hover { border-color: rgba(43,139,230,0.5); transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0,0,0,0.3); }
.ticket-key { font-size: 10px; color: var(--accent); font-weight: 600; margin-bottom: 5px; }
.ticket-title { font-size: 12px; line-height: 1.4; margin-bottom: 8px; }
.ticket-footer { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ticket-type {
  font-size: 9px; padding: 2px 6px; border-radius: 3px;
  text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600;
}
.type-story { background: rgba(79,247,176,0.15); color: var(--accent3); }
.type-bug { background: rgba(247,79,110,0.15); color: var(--danger); }
.type-task { background: rgba(91,163,235,0.15); color: var(--accent); }
.type-epic { background: rgba(247,193,79,0.15); color: var(--accent2); }
.ticket-points {
  margin-left: auto; font-size: 10px; color: var(--muted);
  background: rgba(0,0,0,0.25); padding: 2px 8px; border-radius: 10px;
}
.ticket-avatar {
  width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.priority-dot {
  width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
}
.p-high { background: var(--danger); }
.p-medium { background: var(--accent2); }
.p-low { background: var(--accent3); }

/* ISSUES TABLE */
.filter-row { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input {
  background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1);
  color: var(--text); padding: 10px 14px; border-radius: 10px;
  font-family: 'Inter', sans-serif; font-size: 13px; flex: 1; min-width: 200px;
  transition: all 0.2s;
}
.search-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(43,139,230,0.2); }
.filter-select {
  background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1);
  color: var(--text); padding: 8px 12px; border-radius: 10px;
  font-family: 'Inter', sans-serif; font-size: 12px; cursor: pointer;
  appearance: none; padding-right: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23a1a1aa' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center;
}
.issues-table { width: 100%; border-collapse: collapse; }
.issues-table th {
  text-align: left; padding: 12px 16px;
  font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px;
  border-bottom: 1px solid rgba(255,255,255,0.1); font-weight: 600;
}
.issues-table td {
  padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,0.06);
  vertical-align: middle; font-size: 12px;
}
.issues-table tr:hover td { background: rgba(43,139,230,0.06); }
.issue-key { color: var(--accent); font-weight: 600; white-space: nowrap; }
.status-pill {
  font-size: 10px; padding: 3px 9px; border-radius: 20px;
  font-weight: 600; white-space: nowrap;
}
.s-todo { background: rgba(110,123,142,0.2); color: var(--muted); }
.s-inprogress { background: rgba(91,163,235,0.15); color: var(--accent); }
.s-review { background: rgba(247,193,79,0.15); color: var(--accent2); }
.s-done { background: rgba(79,247,176,0.15); color: var(--accent3); }
.s-blocked { background: rgba(247,79,110,0.15); color: var(--danger); }
.assignee-cell { display: flex; align-items: center; gap: 8px; }

/* WORKLOAD CHART */
.charts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 24px; }
.chart-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px; padding: 24px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
}
.chart-card:hover { box-shadow: 0 25px 50px rgba(0,0,0,0.25); }
.chart-title { font-family: 'Inter', sans-serif; font-weight: 700; font-size: 16px; margin-bottom: 4px; color: #f2f5f9; }
.chart-sub { font-size: 12px; color: var(--muted); margin-bottom: 20px; }
.chart-card.full { grid-column: 1 / -1; }

/* BAR CHART */
.bar-chart { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: flex; align-items: center; gap: 12px; }
.bar-label { width: 100px; font-size: 11px; color: var(--muted); text-align: right; flex-shrink: 0; }
.bar-track { flex: 1; background: rgba(0,0,0,0.25); border-radius: 4px; height: 24px; overflow: hidden; position: relative; }
.bar-fill {
  height: 100%; border-radius: 4px;
  display: flex; align-items: center; padding-left: 10px;
  font-size: 11px; font-weight: 600; color: #fff;
  transition: width 1s cubic-bezier(0.4,0,0.2,1);
}
.bar-fill.accent { background: linear-gradient(90deg, #2b8be6, #5468f2); }
.bar-fill.green { background: linear-gradient(90deg, var(--accent3), #34d399); }
.bar-fill.yellow { background: linear-gradient(90deg, var(--accent2), #fbbf24); }
.bar-fill.red { background: linear-gradient(90deg, var(--danger), #f87171); }
.bar-meta { width: 60px; font-size: 11px; color: var(--muted); flex-shrink: 0; }

/* DONUT */
.donut-wrap { display: flex; align-items: center; gap: 24px; }
.donut-chart { position: relative; width: 140px; height: 140px; flex-shrink: 0; }
.donut-chart svg { transform: rotate(-90deg); }
.donut-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.donut-center-val { font-family: 'Inter', sans-serif; font-weight: 800; font-size: 28px; line-height: 1; color: #f2f5f9; }
.donut-center-label { font-size: 10px; color: var(--muted); margin-top: 2px; }
.donut-legend { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.legend-item { display: flex; align-items: center; gap: 8px; }
.legend-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.legend-name { flex: 1; font-size: 11px; color: var(--muted); }
.legend-val { font-size: 12px; font-weight: 600; }

/* VELOCITY CHART */
.velocity-chart { display: flex; align-items: flex-end; gap: 10px; height: 160px; padding-top: 10px; }
.vel-bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.vel-bars { display: flex; gap: 3px; align-items: flex-end; width: 100%; justify-content: center; }
.vel-bar {
  flex: 1; max-width: 20px; border-radius: 4px 4px 0 0;
  transition: height 1s cubic-bezier(0.4,0,0.2,1);
  min-height: 4px;
}
.vel-bar.committed { background: rgba(91,163,235,0.3); border: 1px solid var(--accent); }
.vel-bar.completed { background: var(--accent); }
.vel-label { font-size: 10px; color: var(--muted); white-space: nowrap; }
.vel-legend { display: flex; gap: 16px; margin-bottom: 12px; justify-content: flex-end; }
.vel-legend-item { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.vel-legend-box { width: 12px; height: 12px; border-radius: 3px; }

/* TEAM TABLE */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.team-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px; padding: 20px;
  transition: all 0.3s ease;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}
.team-card:hover { border-color: rgba(43,139,230,0.4); transform: translateY(-2px); box-shadow: 0 25px 50px rgba(0,0,0,0.25); }
.team-card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.team-avatar {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.team-name { font-family: 'Inter', sans-serif; font-weight: 700; font-size: 14px; color: #f2f5f9; }
.team-role { font-size: 11px; color: var(--muted); margin-top: 1px; }
.team-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.team-stat { text-align: center; }
.team-stat-val { font-family: 'Inter', sans-serif; font-weight: 700; font-size: 18px; color: #f2f5f9; }
.team-stat-label { font-size: 10px; color: var(--muted); margin-top: 1px; }
.mini-bar-track { background: rgba(0,0,0,0.25); border-radius: 3px; height: 4px; margin-top: 10px; overflow: hidden; }
.mini-bar-fill { height: 100%; border-radius: 3px; background: var(--accent); }

/* MODAL */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.75); z-index: 1000;
  align-items: center; justify-content: center;
  backdrop-filter: blur(10px);
}
.modal-overlay.open { display: flex; animation: fadeIn 0.15s ease; }
.modal {
  background: rgba(11,14,19,0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px; padding: 28px; width: 560px; max-width: 95vw;
  max-height: 85vh; overflow-y: auto;
  animation: slideUp 0.2s ease;
  box-shadow: 0 25px 50px rgba(0,0,0,0.5);
}
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-header { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 20px; }
.modal-key { font-size: 13px; color: var(--accent); font-weight: 600; }
.modal-title { font-family: 'Inter', sans-serif; font-weight: 700; font-size: 18px; flex: 1; line-height: 1.3; color: #f2f5f9; }
.modal-close { background: none; border: none; color: var(--muted); font-size: 20px; cursor: pointer; padding: 0 4px; line-height: 1; margin-left: auto; flex-shrink: 0; }
.modal-close:hover { color: var(--text); }
.modal-field { margin-bottom: 16px; }
.modal-field-label { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 5px; }
.modal-field-val { font-size: 13px; }
.modal-desc { line-height: 1.6; color: var(--muted); font-size: 12px; }
.modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.comment { padding: 12px; background: rgba(0,0,0,0.2); border-radius: 10px; margin-bottom: 8px; }
.comment-author { font-weight: 600; font-size: 11px; margin-bottom: 4px; }
.comment-text { font-size: 12px; color: var(--muted); line-height: 1.5; }

/* LOADING */
.loading {
  display: flex; align-items: center; justify-content: center;
  padding: 60px; color: var(--muted); gap: 12px; flex-direction: column;
}
.spinner {
  width: 32px; height: 32px; border-radius: 50%;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* TOOLTIP */
.tooltip { position: relative; }
.tooltip::after {
  content: attr(data-tip);
  position: absolute; bottom: calc(100% + 6px); left: 50%;
  transform: translateX(-50%);
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text); padding: 5px 10px; border-radius: 6px;
  font-size: 11px; white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity 0.15s; z-index: 200;
}
.tooltip:hover::after { opacity: 1; }

/* SCROLLBAR */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 3px; }

@media (max-width: 900px) {
  .sprint-cols { grid-template-columns: repeat(2, 1fr); }
  .charts-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .sidebar { display: none; }
  .sprint-cols { grid-template-columns: 1fr; }
}
