@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@600;700;800&display=swap");

:root {
  --bg: #07101d;
  --surface: rgba(13, 26, 43, 0.78);
  --surface-strong: #102238;
  --surface-soft: rgba(18, 39, 62, 0.62);
  --text: #f4f8fb;
  --muted: #91a2b5;
  --subtle: #64778b;
  --border: rgba(148, 178, 204, 0.14);
  --accent: #48d5b5;
  --accent-strong: #20bd9c;
  --blue: #6c8cff;
  --warning: #ffba69;
  --shadow: 0 22px 54px rgba(0, 4, 12, 0.3);
  --radius: 18px;
  --chart-text: #91a2b5;
  --chart-grid: rgba(148, 178, 204, 0.1);
  --chart-tooltip: #14283e;
  --action-bg: #64e6c8;
  --action-bg-hover: #82efd6;
  --action-text: #06251f;
  --action-border: #9af5df;
  --action-shadow: 0 8px 24px rgba(72, 213, 181, 0.22);
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; background: var(--bg); }
body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 75% -10%, rgba(50, 118, 141, 0.22), transparent 34rem),
    radial-gradient(circle at 5% 25%, rgba(55, 79, 144, 0.16), transparent 28rem),
    var(--bg);
  font-family: "DM Sans", ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, select, input { font: inherit; }
button, select { cursor: pointer; }
a { color: inherit; }

.ambient {
  position: fixed;
  z-index: 0;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  opacity: 0.2;
}
.ambient-one { width: 280px; height: 280px; top: 18%; right: -160px; background: #34ddbd; }
.ambient-two { width: 240px; height: 240px; bottom: 10%; left: -160px; background: #547eff; }

.app {
  position: relative;
  z-index: 1;
  width: min(1440px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px 36px 18px;
}

.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 11px; width: fit-content; text-decoration: none; }
.logo {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(74, 222, 189, 0.25);
  border-radius: 12px;
  color: var(--accent);
  background: linear-gradient(145deg, rgba(72, 213, 181, 0.19), rgba(72, 213, 181, 0.05));
  box-shadow: 0 10px 24px rgba(29, 192, 157, 0.1);
}
.logo svg { width: 25px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.title { font-family: "Manrope", sans-serif; font-size: 18px; font-weight: 800; letter-spacing: -0.3px; }
.subtitle { margin-top: 1px; color: var(--muted); font-size: 11px; }

.tabs { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--border); border-radius: 12px; background: rgba(6, 15, 27, 0.65); }
.tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  transition: 180ms ease;
}
.tab-btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.tab-btn.active { color: #071a17; background: var(--accent); box-shadow: 0 7px 18px rgba(38, 205, 170, 0.18); }
.tab-icon { font-size: 15px; }
.status-badge {
  display: flex;
  justify-self: end;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.topbar-actions { display: flex; justify-self: end; align-items: center; gap: 18px; }
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-soft);
}
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-icon { width: 14px; font-size: 11px; text-align: center; }
.toggle-track { position: relative; width: 30px; height: 16px; border-radius: 999px; background: rgba(148, 178, 204, 0.2); }
.toggle-thumb { position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); transition: transform 180ms ease; }
[data-theme="light"] .toggle-thumb { transform: translateX(14px); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(72, 213, 181, 0.1); }
.status-badge.offline .status-dot { background: #ef7070; box-shadow: 0 0 0 4px rgba(239, 112, 112, 0.1); }

.sync-overview {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: rgba(10, 22, 37, 0.64);
}
.sync-overview-label { display: flex; align-items: center; gap: 8px; padding: 0 10px 0 3px; color: var(--muted); font-size: 10px; font-weight: 700; }
.source-sync-item { display: grid; grid-template-columns: auto minmax(110px, 1fr) auto; align-items: center; gap: 8px; min-width: 260px; padding: 7px 9px; border-left: 1px solid var(--border); }
.source-sync-item .provider-icon { width: 28px; height: 28px; border-radius: 8px; font-size: 10px; }
.source-sync-item strong,
.source-sync-item small { display: block; }
.source-sync-item strong { font-size: 10px; }
.source-sync-item small { overflow: hidden; margin-top: 2px; color: var(--subtle); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.sync-state { padding: 4px 7px; border-radius: 999px; color: var(--muted); background: var(--surface-soft); font-size: 8px; font-weight: 800; }
.source-sync-item[data-status="synced"] .sync-state { color: var(--accent); background: rgba(72, 213, 181, 0.09); }
.source-sync-item[data-status="partial"] .sync-state { color: var(--warning); background: rgba(255, 186, 105, 0.09); }
.source-sync-item[data-status="failed"] .sync-state { color: #ef7070; background: rgba(239, 112, 112, 0.09); }
.source-sync-item[data-status="running"] .sync-state { color: var(--blue); animation: statusPulse 1.2s ease infinite; }
@keyframes statusPulse { 50% { opacity: 0.55; } }

.tab-content { display: none; }
.tab-content.active { display: block; animation: reveal 280ms ease; }
@keyframes reveal { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 50px 2px 26px; }
.eyebrow, .section-label { color: var(--accent); font-size: 10px; font-weight: 700; letter-spacing: 1.5px; }
h1 { margin: 8px 0 7px; font-family: "Manrope", sans-serif; font-size: clamp(28px, 4vw, 42px); line-height: 1.08; letter-spacing: -1.5px; }
.page-heading p { margin: 0; color: var(--muted); font-size: 14px; }

.btn {
  display: inline-flex;
  height: 42px;
  align-items: center;
  gap: 9px;
  padding: 0 17px;
  border: 1px solid var(--action-border);
  border-radius: 11px;
  color: var(--action-text);
  background: var(--action-bg);
  box-shadow: var(--action-shadow);
  font-size: 13px;
  font-weight: 700;
  transition: 180ms ease;
}
.btn:hover { background: var(--action-bg-hover); transform: translateY(-1px); }
.btn:focus-visible { outline: 3px solid var(--action-border); outline-offset: 3px; }
.btn:disabled { opacity: 0.72; cursor: wait; box-shadow: none; transform: none; }
.btn.loading .refresh-icon { animation: spin 800ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.controls {
  display: grid;
  grid-template-columns: minmax(220px, 1.35fr) minmax(190px, 1fr) minmax(210px, 1fr);
  gap: 14px;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: rgba(10, 22, 37, 0.68);
  backdrop-filter: blur(16px);
}
.control { display: flex; min-width: 0; flex-direction: column; gap: 7px; }
label { color: var(--muted); font-size: 11px; font-weight: 600; }
select, input {
  width: 100%;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: 0;
  color: var(--text);
  background: #0b192a;
  padding: 0 12px;
  font-size: 13px;
  transition: 160ms ease;
}
select:focus, input:focus { border-color: rgba(72, 213, 181, 0.55); box-shadow: 0 0 0 3px rgba(72, 213, 181, 0.07); }
.input-wrap { position: relative; }
.input-wrap span { position: absolute; top: 10px; left: 12px; color: var(--subtle); }
.input-wrap input { padding-left: 34px; }

.card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(17, 35, 56, 0.86), rgba(9, 22, 37, 0.78));
  box-shadow: var(--shadow);
}
.hero-card { padding: 23px; }
.cardHeader { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.cardTitle { font-family: "Manrope", sans-serif; font-size: 17px; font-weight: 700; letter-spacing: -0.25px; }
.hero-card .cardTitle { margin-top: 6px; font-size: 21px; }
.cardHint { margin-top: 5px; color: var(--muted); font-size: 12px; }
.window-badge, .table-count, .legend-note {
  padding: 6px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(6, 15, 27, 0.45);
  font-size: 10px;
  font-weight: 600;
}
.legend-note { display: flex; align-items: center; gap: 6px; border: 0; background: none; }
.legend-note span { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

.kpiRow { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-top: 22px; }
.kpi {
  position: relative;
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: rgba(5, 15, 27, 0.4);
}
.kpi::before { content: ""; position: absolute; top: 0; left: 14px; width: 28px; height: 2px; border-radius: 2px; background: var(--kpi-color, var(--accent)); }
.kpi .name { overflow: hidden; color: var(--muted); font-size: 10px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.kpi .value { margin-top: 8px; font-family: "Manrope", sans-serif; font-size: 24px; font-weight: 800; letter-spacing: -1px; }
.kpi .unit { margin-left: 3px; color: var(--subtle); font-family: "DM Sans", sans-serif; font-size: 10px; font-weight: 500; letter-spacing: 0; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.chart-card { min-height: 390px; padding: 21px 21px 8px; }
.chart-card-wide { grid-column: 1 / -1; }
.chart { width: 100%; height: 330px; }
.tableCard { grid-column: 1 / -1; padding: 21px; }
.tableWrap { overflow: hidden; margin-top: 18px; border: 1px solid var(--border); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; background: rgba(4, 13, 24, 0.28); }
th { padding: 11px 14px; color: var(--subtle); background: rgba(255, 255, 255, 0.018); font-size: 10px; letter-spacing: 0.8px; text-align: left; text-transform: uppercase; }
th:last-child, td:last-child { text-align: right; }
td { padding: 12px 14px; border-top: 1px solid rgba(148, 178, 204, 0.09); color: #c9d4df; font-size: 12px; }
td:last-child { color: var(--text); font-weight: 700; }
tbody tr { transition: background 150ms ease; }
tbody tr:hover { background: rgba(72, 213, 181, 0.035); }

.identity-card { padding: 24px; }
.profile-summary { display: flex; align-items: center; gap: 14px; padding-bottom: 22px; border-bottom: 1px solid var(--border); }
.avatar { display: grid; width: 50px; height: 50px; flex: 0 0 auto; place-items: center; border-radius: 15px; color: #08231e; background: linear-gradient(145deg, #65e7ca, #32b89a); font-family: "Manrope"; font-size: 18px; font-weight: 800; }
.profile-name { margin-top: 5px; font-family: "Manrope"; font-size: 20px; font-weight: 700; }
.identity-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 20px; }
.identity { display: flex; align-items: center; gap: 14px; min-height: 108px; padding: 18px; border: 1px solid var(--border); border-radius: 14px; background: rgba(5, 15, 27, 0.36); }
.provider-icon { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 10px; font-weight: 800; }
.jira-icon { color: #8fb0ff; background: rgba(82, 123, 240, 0.13); }
.github-icon { color: #f2f4f7; background: rgba(255, 255, 255, 0.08); }
.identity-title { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: 0.9px; text-transform: uppercase; }
.identity-value { margin-top: 5px; font-size: 14px; font-weight: 700; }
.identity-sub { margin-top: 4px; overflow-wrap: anywhere; color: var(--subtle); font-size: 11px; }
.identity-sub a { color: var(--accent); text-decoration: none; }

.footer { display: flex; justify-content: space-between; margin-top: 22px; padding: 15px 3px 0; border-top: 1px solid var(--border); color: var(--subtle); font-size: 10px; }
.toast {
  position: fixed;
  z-index: 10;
  right: 24px;
  bottom: 24px;
  max-width: min(360px, calc(100vw - 48px));
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 11px;
  color: var(--text);
  background: #14283e;
  box-shadow: var(--shadow);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: 200ms ease;
}
.toast.show { opacity: 1; transform: none; }
.toast.error { border-color: rgba(239, 112, 112, 0.35); }

.filter-journey {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(10, 22, 37, 0.72);
}
.filter-step { display: flex; min-width: 0; align-items: flex-start; gap: 11px; }
.step-number {
  display: grid;
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(72, 213, 181, 0.3);
  border-radius: 50%;
  color: var(--accent);
  background: rgba(72, 213, 181, 0.08);
  font-size: 10px;
  font-weight: 800;
  margin-top: 22px;
}
.step-arrow { margin-top: 25px; color: var(--subtle); font-size: 22px; }
.filter-step .control { min-height: 72px; flex: 1; }
.sprint-dates { min-height: 13px; color: var(--muted); font-size: 10px; line-height: 1.25; }
.filter-journey.compact { margin-bottom: 16px; }

.project-hero {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto auto;
  align-items: center;
  gap: 24px;
  padding: 23px;
}
.project-mark {
  display: grid;
  width: 58px;
  height: 58px;
  margin-top: 7px;
  place-items: center;
  border: 1px solid rgba(72, 213, 181, 0.25);
  border-radius: 15px;
  color: var(--accent);
  background: rgba(72, 213, 181, 0.09);
  font-family: "Manrope";
  font-size: 15px;
  font-weight: 800;
}
.project-hero-copy h2 { margin: 0; font-family: "Manrope"; font-size: 22px; }
.project-hero-copy p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.project-hero-copy .project-date-line { display: flex; gap: 14px; font-size: 10px; }
.project-date-line strong { color: var(--text); font-weight: 700; }
.project-stat { min-width: 95px; padding-left: 22px; border-left: 1px solid var(--border); }
.project-stat strong { display: block; font-family: "Manrope"; font-size: 24px; }
.project-stat span { color: var(--muted); font-size: 10px; }
.project-kpis, .developer-kpis { margin: 16px 0 0; }
.context-chip, .source-pill {
  padding: 6px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(5, 15, 27, 0.45);
  font-size: 10px;
  font-weight: 700;
}
.source-pill { text-transform: capitalize; }
.source-pill.jira { color: #9ab5ff; background: rgba(108, 140, 255, 0.08); }
.source-pill.github { color: #bdf7e9; background: rgba(72, 213, 181, 0.08); }
.person-cell { display: flex; align-items: center; gap: 9px; }
.mini-avatar {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  color: #08231e;
  background: var(--accent);
  font-size: 9px;
  font-weight: 800;
}

.developer-picker {
  position: absolute;
  z-index: 2;
  top: 16px;
  right: 18px;
  width: min(245px, calc(100% - 36px));
  padding: 6px 8px 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9px;
  background: rgba(7, 16, 29, 0.72);
  backdrop-filter: blur(12px);
}
.developer-picker label { display: block; margin-bottom: 4px; color: rgba(255, 255, 255, 0.68); font-size: 9px; }
.developer-picker select { height: 30px; border-color: rgba(255, 255, 255, 0.12); border-radius: 8px; background: rgba(7, 16, 29, 0.75); font-size: 11px; }
.presentation-btn {
  width: 100%;
  margin-top: 7px;
  padding: 7px 10px;
  border: 1px solid rgba(72, 213, 181, 0.38);
  border-radius: 8px;
  color: #07101d;
  background: var(--accent);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}
.presentation-btn:disabled { cursor: wait; opacity: 0.65; }
.report-card p { margin: 7px 0 10px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.report-card .presentation-btn { margin-top: 0; }
.page-actions { display: flex; align-items: center; gap: 10px; }
.social-cover { position: relative; overflow: visible; margin: 28px 0 16px; }
.cover-pattern {
  height: 96px;
  border-radius: 18px 18px 0 0;
  background:
    linear-gradient(120deg, rgba(72, 213, 181, 0.28), rgba(108, 140, 255, 0.18)),
    repeating-linear-gradient(135deg, transparent 0 22px, rgba(255, 255, 255, 0.018) 22px 23px);
}
.social-profile {
  display: flex;
  min-height: 94px;
  align-items: center;
  gap: 14px;
  padding: 14px 20px 14px 120px;
}
.avatar-large {
  position: absolute;
  bottom: 19px;
  left: 22px;
  width: 80px;
  height: 80px;
  border: 4px solid #102238;
  border-radius: 21px;
  font-size: 22px;
  box-shadow: 0 15px 35px rgba(0, 5, 14, 0.35);
}
.profile-copy { flex: 1; }
.profile-line { display: flex; align-items: center; gap: 8px; }
.profile-line h1 { margin: 0; font-size: 21px; letter-spacing: -0.55px; }
.verified { display: grid; width: 15px; height: 15px; place-items: center; border-radius: 50%; color: #08231e; background: var(--accent); font-size: 8px; font-weight: 900; }
.profile-copy > p { margin: 3px 0 7px; color: var(--muted); font-size: 10px; }
.profile-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.profile-tags span { padding: 3px 7px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); font-size: 8px; }
.profile-score { padding-left: 20px; border-left: 1px solid var(--border); text-align: center; }
.profile-score strong { display: block; color: var(--accent); font-family: "Manrope"; font-size: 22px; }
.profile-score span { color: var(--muted); font-size: 8px; text-transform: uppercase; }
.profile-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 16px; }
.profile-sidebar { display: flex; flex-direction: column; gap: 16px; }
.profile-main { min-width: 0; }
.profile-main .chart-card { margin-top: 16px; }
.monthly-time-card { margin-top: 16px; padding: 17px 19px; overflow: hidden; background: linear-gradient(110deg, rgba(72, 213, 181, 0.08), var(--surface-strong) 48%); }
.monthly-time-summary { display: grid; grid-template-columns: auto minmax(150px, 1fr) auto; align-items: center; gap: 14px; }
.monthly-time-icon { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid rgba(72, 213, 181, 0.25); border-radius: 12px; color: var(--accent); background: rgba(72, 213, 181, 0.09); font-size: 20px; }
.monthly-time-copy strong, .monthly-time-copy span { display: inline-block; }
.monthly-time-copy strong { margin-right: 7px; color: var(--accent); font-family: "Manrope"; font-size: 25px; line-height: 1.1; }
.monthly-time-copy span { color: var(--muted); font-size: 10px; }
.monthly-time-copy .section-label { margin-bottom: 3px; }
.monthly-ticket-detail { padding-top: 14px; border-top: 1px solid var(--border); margin-top: 14px; }
.monthly-ticket-detail.hidden { display: none; }
.side-card { padding: 18px; }
.provider-list { display: flex; flex-direction: column; gap: 6px; margin-top: 15px; }
.provider-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 9px; border-radius: 10px; background: rgba(5, 15, 27, 0.32); }
.provider-row .provider-icon { width: 30px; height: 30px; border-radius: 8px; font-size: 11px; }
.provider-row strong, .provider-row small { display: block; }
.provider-row strong { font-size: 11px; }
.provider-row small { margin-top: 2px; color: var(--subtle); font-size: 9px; }
.provider-state { color: var(--subtle); font-size: 13px; }
.provider-state.connected { color: var(--accent); }
.hr-icon { color: #ffcb87; background: rgba(255, 186, 105, 0.1); }
.teams-icon { color: #b9a7ff; background: rgba(167, 137, 255, 0.1); }
.confluence-icon { color: #8fb0ff; background: rgba(82, 123, 240, 0.1); }
.badge-grid { display: flex; flex-direction: column; gap: 7px; margin-top: 15px; }
.achievement { display: flex; align-items: center; gap: 10px; padding: 9px; border: 1px solid transparent; border-radius: 10px; opacity: 0.4; filter: grayscale(1); }
.achievement.earned { border-color: rgba(72, 213, 181, 0.13); background: rgba(72, 213, 181, 0.05); opacity: 1; filter: none; }
.achievement > span { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; color: var(--accent); background: rgba(72, 213, 181, 0.1); }
.achievement strong, .achievement small { display: block; }
.achievement strong { font-size: 10px; }
.achievement small { margin-top: 2px; color: var(--subtle); font-size: 8px; }

.secondary-btn {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text);
  background: var(--surface-soft);
  font-size: 10px;
  font-weight: 700;
}
.secondary-btn:hover { border-color: rgba(72, 213, 181, 0.42); color: var(--accent); }
.secondary-btn:disabled { cursor: wait; opacity: 0.6; }
.evidence-state { margin-top: 17px; padding: 13px; border: 1px dashed var(--border); border-radius: 10px; color: var(--muted); font-size: 11px; text-align: center; }
.ticket-table { margin-top: 10px; }
.ticket-table.hidden { display: none; }
.ticket-link { color: var(--accent); font-weight: 700; text-decoration: none; white-space: nowrap; }
.ticket-link:hover { text-decoration: underline; }
.ticket-summary { max-width: 420px; }
.status-pill { display: inline-block; padding: 4px 7px; border-radius: 999px; color: var(--text); background: var(--surface-soft); font-size: 9px; white-space: nowrap; }

.metric-glossary { margin-top: 18px; padding: 0; }
.metric-glossary summary {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 17px 20px;
  cursor: pointer;
  list-style: none;
}
.metric-glossary summary::-webkit-details-marker { display: none; }
.metric-glossary summary strong,
.metric-glossary summary small { display: block; }
.metric-glossary summary strong { font-size: 12px; }
.metric-glossary summary small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.glossary-icon { display: grid; width: 28px; height: 28px; place-items: center; border: 1px solid rgba(72, 213, 181, 0.25); border-radius: 50%; color: var(--accent); background: rgba(72, 213, 181, 0.07); font-family: serif; font-weight: 800; }
.summary-action { color: var(--accent); font-size: 10px; font-weight: 700; }
.metric-glossary[open] .summary-action::after { content: " ↑"; }
.glossary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; padding: 1px 20px 20px; }
.glossary-item { padding: 15px; border: 1px solid var(--border); background: rgba(5, 15, 27, 0.2); }
.glossary-item:nth-child(1) { border-radius: 11px 0 0 0; }
.glossary-item:nth-child(3) { border-radius: 0 11px 0 0; }
.glossary-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.glossary-heading strong { font-size: 11px; }
.glossary-item p { min-height: 45px; margin: 9px 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.glossary-item small { display: block; color: var(--subtle); font-size: 9px; line-height: 1.45; }
.glossary-item b { color: var(--text); }
.method-note { margin: 0 20px 20px; padding: 11px 13px; border-left: 2px solid var(--warning); color: var(--muted); background: rgba(255, 186, 105, 0.05); font-size: 9px; line-height: 1.5; }

.confluence-card { margin-top: 16px; padding: 21px; }
.confluence-title { display: flex; align-items: center; gap: 11px; }
.confluence-title .provider-icon { width: 36px; height: 36px; border-radius: 10px; }
.integration-status { padding: 6px 9px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); background: var(--surface-soft); font-size: 9px; font-weight: 700; }
.contribution-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin-top: 18px; }
.contribution-stats > div { padding: 13px; border: 1px solid var(--border); border-radius: 11px; background: rgba(5, 15, 27, 0.25); }
.contribution-stats strong,
.contribution-stats span { display: block; }
.contribution-stats strong { font-family: "Manrope"; font-size: 19px; }
.contribution-stats span { margin-top: 4px; color: var(--muted); font-size: 9px; }
.integration-empty { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; margin-top: 12px; padding: 15px; border: 1px dashed var(--border); border-radius: 12px; }
.empty-document { display: grid; width: 38px; height: 44px; place-items: center; border: 1px solid rgba(82, 123, 240, 0.22); border-radius: 8px; color: #8fb0ff; background: rgba(82, 123, 240, 0.08); font-size: 19px; }
.integration-empty strong { font-size: 11px; }
.integration-empty p { max-width: 590px; margin: 4px 0 0; color: var(--muted); font-size: 9px; line-height: 1.45; }
.admin-managed { padding: 6px 9px; border: 1px solid var(--border); border-radius: 999px; color: var(--subtle); background: var(--surface-soft); font-size: 9px; font-weight: 700; white-space: nowrap; }
.confluence-page-link[href] { color: var(--accent); text-decoration: none; }
.confluence-page-link[href]:hover { text-decoration: underline; }
.contribution-timeline.hidden,
.integration-empty.hidden { display: none; }
.contribution-timeline { display: grid; gap: 8px; margin-top: 12px; }
.contribution-event { display: grid; grid-template-columns: 75px 1fr auto; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; color: var(--text); text-decoration: none; background: var(--surface-soft); }
.contribution-event-type { color: var(--accent); font-size: 9px; font-weight: 700; }
.contribution-event strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.contribution-event small { color: var(--muted); font-size: 9px; }

[data-theme="light"] {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --surface-soft: #f7f9fc;
  --text: #182433;
  --muted: #617184;
  --subtle: #8190a0;
  --border: #dfe6ee;
  --accent: #087f6c;
  --accent-strong: #087f6c;
  --blue: #4f6fd8;
  --warning: #a96413;
  --shadow: 0 8px 26px rgba(31, 48, 68, 0.08);
  --chart-text: #617184;
  --chart-grid: rgba(70, 91, 112, 0.12);
  --chart-tooltip: #ffffff;
  --action-bg: #087f6c;
  --action-bg-hover: #066957;
  --action-text: #ffffff;
  --action-border: #065f51;
  --action-shadow: 0 7px 18px rgba(8, 127, 108, 0.2);
}
[data-theme="light"] body {
  background:
    radial-gradient(circle at 78% -12%, rgba(56, 166, 145, 0.09), transparent 30rem),
    var(--bg);
}
[data-theme="light"] .ambient { opacity: 0.06; }
[data-theme="light"] .logo {
  color: var(--accent);
  border-color: rgba(8, 127, 108, 0.18);
  background: #e9f6f3;
  box-shadow: none;
}
[data-theme="light"] .tabs {
  border-color: var(--border);
  background: #e9eef4;
}
[data-theme="light"] .tab-btn.active {
  color: #ffffff;
  background: var(--accent);
  box-shadow: none;
}
[data-theme="light"] .tab-btn:hover:not(.active) { color: var(--text); background: rgba(255, 255, 255, 0.7); }
[data-theme="light"] select,
[data-theme="light"] input {
  color: var(--text);
  background: #ffffff;
}
[data-theme="light"] .filter-journey,
[data-theme="light"] .controls {
  background: #ffffff;
  box-shadow: var(--shadow);
}
[data-theme="light"] .sync-overview { background: #ffffff; box-shadow: var(--shadow); }
[data-theme="light"] .card {
  background: #ffffff;
  box-shadow: var(--shadow);
}
[data-theme="light"] .kpi,
[data-theme="light"] .identity,
[data-theme="light"] .provider-row {
  background: #f8fafc;
}
[data-theme="light"] .window-badge,
[data-theme="light"] .table-count,
[data-theme="light"] .context-chip,
[data-theme="light"] .source-pill {
  background: #f4f7fa;
}
[data-theme="light"] table { background: #ffffff; }
[data-theme="light"] th { background: #f7f9fc; }
[data-theme="light"] td { color: #49596b; }
[data-theme="light"] td:last-child { color: var(--text); }
[data-theme="light"] tbody tr:hover { background: #f5faf9; }
[data-theme="light"] .cover-pattern {
  background:
    linear-gradient(120deg, rgba(41, 159, 136, 0.2), rgba(79, 111, 216, 0.1)),
    repeating-linear-gradient(135deg, transparent 0 22px, rgba(24, 36, 51, 0.025) 22px 23px);
}
[data-theme="light"] .developer-picker {
  border-color: rgba(255, 255, 255, 0.62);
  background: rgba(255, 255, 255, 0.86);
}
[data-theme="light"] .developer-picker label { color: var(--muted); }
[data-theme="light"] .developer-picker select { border-color: var(--border); color: var(--text); background: #ffffff; }
[data-theme="light"] .presentation-btn { color: #ffffff; }
[data-theme="light"] .avatar-large { border-color: #ffffff; }
[data-theme="light"] .mini-avatar,
[data-theme="light"] .avatar { color: #ffffff; }
[data-theme="light"] .step-number { color: var(--accent); background: #edf8f5; }
[data-theme="light"] .toast { color: var(--text); background: #ffffff; }
[data-theme="light"] .glossary-item { background: #f8fafc; }
[data-theme="light"] .contribution-stats > div { background: #f8fafc; }

.user-session {
  max-width: 180px;
  padding: 8px 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  background: var(--surface);
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}
.user-session:hover { border-color: var(--accent); }

@media (max-width: 980px) {
  .app { padding: 20px; }
  .kpiRow { grid-template-columns: repeat(3, 1fr); }
  .profile-layout { grid-template-columns: 1fr; }
  .profile-sidebar { display: grid; grid-template-columns: 1fr 1fr; }
  .glossary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .glossary-item:nth-child(n) { border-radius: 0; }
}
@media (max-width: 760px) {
  .topbar { grid-template-columns: 1fr auto; }
  .tabs { grid-column: 1 / -1; grid-row: 2; justify-content: stretch; }
  .tab-btn { flex: 1; justify-content: center; }
  .status-badge { grid-column: 2; grid-row: 1; }
  .topbar-actions { grid-column: 2; grid-row: 1; }
  .page-heading { padding-top: 36px; }
  .controls, .grid, .identity-grid { grid-template-columns: 1fr; }
  .chart-card-wide, .tableCard { grid-column: auto; }
  .chart-card { min-height: 360px; }
  .filter-journey { grid-template-columns: 1fr; }
  .step-arrow { display: none; }
  .project-hero { grid-template-columns: auto 1fr; }
  .monthly-time-summary { grid-template-columns: auto 1fr; }
  .monthly-time-summary .secondary-btn { grid-column: 1 / -1; }
  .project-stat { padding: 10px 0 0; border-top: 1px solid var(--border); border-left: 0; }
  .social-profile { padding-left: 105px; }
  .avatar-large { width: 70px; height: 70px; left: 18px; }
  .glossary-grid { grid-template-columns: 1fr; }
  .contribution-stats { grid-template-columns: repeat(2, 1fr); }
  .integration-empty { grid-template-columns: auto 1fr; }
  .integration-empty .secondary-btn { grid-column: 1 / -1; }
  .sync-overview { align-items: stretch; flex-direction: column; }
  .sync-overview-label { padding: 4px; }
  .source-sync-item { min-width: 0; border-top: 1px solid var(--border); border-left: 0; }
}
@media (max-width: 540px) {
  .app { padding: 16px 12px; }
  .subtitle, .status-badge span:last-child { display: none; }
  .page-heading { align-items: flex-start; }
  .page-heading p { max-width: 260px; }
  .btn { width: 42px; justify-content: center; padding: 0; }
  .btn-label, .window-badge, .legend-note { display: none; }
  .hero-card, .identity-card { padding: 17px; }
  .kpiRow { grid-template-columns: repeat(2, 1fr); }
  .kpi .value { font-size: 21px; }
  .chart-card { padding: 17px 12px 4px; }
  .chart { height: 300px; }
  .footer { gap: 8px; flex-direction: column; }
  .profile-sidebar { display: flex; }
  .cover-pattern { height: 84px; }
  .developer-picker { top: 11px; right: 11px; width: min(205px, calc(100% - 22px)); }
  .social-profile { align-items: flex-start; padding: 43px 14px 14px; }
  .avatar-large { top: 51px; bottom: auto; left: 14px; width: 62px; height: 62px; border-radius: 17px; font-size: 18px; }
  .profile-copy { padding-top: 0; }
  .profile-line h1 { font-size: 18px; }
  .profile-score { display: none; }
  .project-hero { gap: 14px; padding: 17px; }
  .project-mark { width: 48px; height: 48px; }
  .metric-glossary summary { grid-template-columns: auto 1fr; padding: 15px; }
  .summary-action { display: none; }
  .glossary-grid { padding: 1px 15px 15px; }
  .method-note { margin: 0 15px 15px; }
  .evidence-card .cardHeader { align-items: stretch; flex-direction: column; }
  .contribution-stats { grid-template-columns: 1fr 1fr; }
}
