/* dFLEX Overrides v2.0 — minimalne style kompatybilne z Opale */
@import url('https://fonts.googleapis.com/css2?family=Lora:wght@400;500;600;700&family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

/* ============================================================
   Sekcja 0: Opale Blue → Green recolor
   Zamiana #628db6 / #169 na zielona palette #4aa171
   ============================================================ */

/* -- Linki — zielony zamiast niebieskiego (precyzyjne selektory) -- */
/* Nie uzywamy globalnego a{} z !important — lamie inline kolory badge i subject */
#content a,
#sidebar a,
.description a,
.journal a,
a.collapsible,
.modal a,
p.other-formats a,
.pagination a {
  color: #3d8a60;
}
#content a:hover,
#sidebar a:hover,
.description a:hover {
  color: #e5123d;
}

/* -- Header: zielone tlo zamiast niebieskiego -- */
#header { background-color: #2d6e4a !important; }
body .flyout-menu + div #header { background-color: #2d6e4a !important; }
body #header { background-color: #2d6e4a !important; }

/* -- Top menu: ciemnozielone tlo — Glowna, Projekty, Administracja, Zalogowany -- */
#top-menu { background-color: #1e4d33 !important; }
#top-menu a { color: rgba(255, 255, 255, 0.8) !important; }
#top-menu a:hover { color: #fff !important; }
#top-menu #loggedas { color: rgba(255, 255, 255, 0.6) !important; }
#top-menu #loggedas a { color: rgba(255, 255, 255, 0.9) !important; }

/* -- Main menu: selected — zielony border-bottom -- */
#main-menu > ul > li > a.selected { border-bottom-color: #2d6e4a !important; }

/* -- Przyciski submit/button — zielone -- */
input[type=button], input[type=submit], input[type=reset], button:not(.ui-dialog-titlebar-close) {
  background-color: #4aa171 !important;
  border-color: #3d8a60 #3d8a60 #357a54 !important;
  box-shadow: 0 1px 0 #357a54 !important;
}
input[type=button]:hover, input[type=submit]:hover, input[type=reset]:hover, button:not(.ui-dialog-titlebar-close):hover {
  background-color: #3d8a60 !important;
  border-color: #357a54 !important;
}

/* -- Taby (nie main-menu) — zielony tekst -- */
div.tabs:not(#main-menu) > ul > li > a { color: #3d8a60 !important; }

/* -- SVG ikony — zielony stroke zamiast niebieskiego -- */
svg.icon-svg { stroke: #3d8a60 !important; }
svg.icon-svg-filled { fill: #3d8a60 !important; }
a.icon svg.icon-svg:not(.icon-svg-filled),
a.icon-only svg.icon-svg:not(.icon-svg-filled) { stroke: #3d8a60 !important; }
a.icon-edit svg.icon-svg:not(.icon-svg-filled),
a.icon-copy svg.icon-svg:not(.icon-svg-filled),
a.icon-time-add svg.icon-svg:not(.icon-svg-filled) { stroke: #3d8a60 !important; }

/* -- Badge status open — zielony border i tekst -- */
.badge-status-open { border-color: #4aa171 !important; color: #4aa171 !important; }

/* -- Collapsible toggle — zielony -- */
a.collapsible, a.collapsible.icon, .collapsible > legend { color: #3d8a60 !important; }

/* -- Wiki TOC left border + links — zielony -- */
div.wiki .toc a { color: #3d8a60 !important; }
div.wiki .toc-active-prev + .toc { border-left-color: #4aa171 !important; }

/* -- Markdown alert note border — zielony -- */
.markdown-alert-note { border-color: #4aa171 !important; }

/* -- Modal i dialog buttony — zielony tekst -- */
.modal p.buttons a { color: #3d8a60 !important; }
.ui-dialog input[type=button] { color: #3d8a60 !important; }
.ui-dialog input[type=button]:hover, .ui-dialog input[type=button]:focus { color: #3d8a60 !important; }

/* -- Modal/dialog title bar — zielony zamiast niebieskiego -- */
.ui-dialog .ui-dialog-titlebar {
  background: #2d6e4a !important;
  border-color: #245a42 !important;
  color: #fff !important;
}
.ui-dialog .ui-dialog-titlebar .ui-dialog-title {
  color: #fff !important;
}
.ui-dialog .ui-dialog-titlebar .ui-dialog-titlebar-close {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: rgba(255,255,255,0.8) !important;
}
.ui-dialog .ui-dialog-titlebar .ui-dialog-titlebar-close:hover {
  color: #fff !important;
  background: rgba(255,255,255,0.15) !important;
}
.ui-dialog .ui-dialog-titlebar .ui-dialog-titlebar-close .ui-icon {
  filter: brightness(10) !important;
}

/* -- Zaznaczenie wiersza — jasnozielone tlo zamiast niebieskiego -- */
#wrapper table.list tr.context-menu-selection > td,
#wrapper .context-menu-selection > td {
  background-color: #e8f5ee !important;
}

/* -- Issue ID badge — przeniesione do dflex_issue_badge.css -- */

/* -- Status-1 (Nowy) — zielony -- */
.issue.status-1 .attributes td.status, .issue.status-1 .attributes .attribute.status .value {
  background-color: #4aa171 !important;
}

/* -- Gantt bar — zielony -- */
.project.task_todo, .version.task_todo { background-color: #4aa171 !important; border-color: #357a54 !important; }

/* -- Combobox/dropdown highlight — ciemnozielone zamiast niebieskiego -- */
.ui-menu .ui-menu-item.ui-state-focus,
.ui-menu .ui-menu-item.ui-state-active {
  border-color: #2d6e4a !important;
  background-color: #2d6e4a !important;
  color: #fff !important;
}
.ui-menu .ui-menu-item.ui-state-focus a,
.ui-menu .ui-menu-item.ui-state-active a {
  color: #fff !important;
}
.ui-autocomplete .ui-state-focus,
.ui-autocomplete .ui-state-active {
  background-color: #2d6e4a !important;
  border-color: #2d6e4a !important;
  color: #fff !important;
}
/* Tribute autocomplete (@mentions) */
.tribute-container li.highlight,
.tribute-container li:hover {
  background-color: #2d6e4a !important;
  color: #fff !important;
}
/* Project jump dropdown hover */
#project-jump .drdn-content a:hover,
.drdn-content .drdn-items a:hover {
  background-color: #2d6e4a !important;
  color: #fff !important;
}
/* Native select accent */
select, input[type=checkbox], input[type=radio] {
  accent-color: #2d6e4a !important;
}
/* Focus ring na inputach */
input:focus, select:focus, textarea:focus {
  border-color: #4aa171 !important;
  box-shadow: 0 0 0 2px rgba(74, 161, 113, 0.2) !important;
  outline: none !important;
}

/* ============================================================
   Sekcja 1: Issue List
   ============================================================ */

/* -- Zebra striping wylaczone -- */

/* -- Powiekszona czcionka i vertical centering dla WSZYSTKICH list (1.1x) -- */
table.list {
  font-size: 110%;
}

table.list td {
  vertical-align: middle;
}

td.subject,
td.comments,
td.issue {
  white-space: normal;
}

/* -- Status dot: USUNIETY — zastapiony przez .dfx-status-badge -- */

/* -- Tracker line: badge w pierwszej linii -- */
.dfx-tracker-line {
  display: block;
  margin-bottom: 2px;
}

/* -- Status line: druga linia z badge statusu + priorytet -- */
.dfx-status-line {
  display: block;
  font-size: 0.8rem;
}

/* -- Subject line: font-weight 500 -- */
.dfx-subject-line {
  font-weight: 500;
}

/* -- Kolorowanie subject na podstawie trackera -- */
.dfx-subject-colored .dfx-subject-line a {
  color: var(--dfx-subject-color, inherit);
}

/* -- Assignee line: mniejszy font, szary -- */
.dfx-assignee-line {
  font-size: 0.8rem;
  color: #6B7280;
  margin-top: 2px;
}

.dfx-person-icon {
  font-size: 0.5rem;
  vertical-align: middle;
  margin-right: 2px;
}

.dfx-separator {
  color: #D1D5DB;
  margin: 0 4px;
}

.dfx-project-name {
  font-style: italic;
}

/* -- Tracker badge: pastelowy pill z nazwa trackera -- */
.dfx-tracker-badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: lowercase;
  line-height: 1.4;
  white-space: nowrap;
}

/* -- Priority badge: inline w linii przypisanego -- */
.dfx-priority-badge {
  display: inline-block;
  padding: 0 6px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  margin-left: 6px;
  vertical-align: middle;
}

/* -- Rich tooltip na hover nad wierszem issue -- */
.dfx-tooltip {
  position: fixed;
  z-index: 9999;
  max-width: 400px;
  min-width: 300px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-left: 3px solid #4aa171;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1), 0 2px 6px rgba(0, 0, 0, 0.06);
  padding: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s ease;
  font-family: 'Inter', sans-serif;
}

.dfx-tooltip.dfx-tooltip-visible {
  opacity: 1;
}

.dfx-tooltip-header {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  font-family: 'Lora', serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: #2D3436;
  line-height: 1.3;
}

.dfx-tooltip-header .dfx-tooltip-id {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 500;
  color: rgba(45, 52, 54, 0.4);
}

.dfx-tooltip-meta {
  padding: 0.5rem 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.dfx-tooltip-tag {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 9999px;
  font-size: 0.65rem;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
}

.dfx-tooltip-row {
  padding: 0.2rem 1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: rgba(45, 52, 54, 0.45);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.dfx-tooltip-row strong {
  font-weight: 600;
  color: rgba(45, 52, 54, 0.6);
}

.dfx-tooltip-desc {
  padding: 0.6rem 1rem;
  font-size: 0.78rem;
  line-height: 1.45;
  color: #2D3436;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  background: rgba(0, 0, 0, 0.015);
}

.dfx-tooltip-desc:empty {
  display: none;
}

.dfx-tooltip-loading {
  padding: 1rem;
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(45, 52, 54, 0.3);
}

/* -- Kolorowa klamra z lewej strony wiersza wg priorytetu -- */
table.list.issues tr.priority-1 td:first-child { border-left: 4px solid #D1D5DB; }
table.list.issues tr.priority-3 td:first-child { border-left: 4px solid #FB923C; }
table.list.issues tr.priority-4 td:first-child { border-left: 4px solid #EF4444; }

/* PILNE — pulsujacy efekt */
.dfx-priority-badge.dfx-priority-urgent {
  animation: dfx-pulse 2s ease-in-out infinite;
}

@keyframes dfx-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* ============================================================
   Sekcja 1b: Time Entry List
   (przeniesione do dflex_time_entries.css, v2.8.0, 2026-05-22)
   ============================================================ */
/* ============================================================
   Sekcja 1c: Globalne kolory zaznaczenia (jasniejsze niz Opale default)
   ============================================================ */

/* -- Zaznaczenie wiersza — TYLKO tlo, kolory czcionek BEZ ZMIAN -- */
/* Opale default: #628db6 + color:#fff → nadpisujemy tlo, cofamy kolor */
#wrapper table.list tr.context-menu-selection,
#wrapper table.list .context-menu-selection {
  color: unset !important;
}

#wrapper table.list tr.context-menu-selection > td,
#wrapper .context-menu-selection > td {
  background-color: #e8f5ee !important;
  color: unset !important;
}

#wrapper table.list tr.context-menu-selection td a {
  color: unset !important;
}

/* ============================================================
   Sekcja 2: Editor
   ============================================================ */

/* -- Collapsible section: zwijane pola (parent, comment, metadane) -- */
.dfx-collapsible-section {
  margin: 8px 0;
}

.dfx-collapsible-toggle {
  cursor: pointer;
  font-size: 0.85rem;
  color: #6B7280;
  user-select: none;
  padding: 4px 0;
  display: inline-block;
}

.dfx-collapsible-toggle:hover {
  color: #374151;
}

.dfx-collapsible-content {
  overflow: hidden;
  transition: max-height 0.25s ease;
}

.dfx-collapsible-content.collapsed {
  max-height: 0;
}

/* ============================================================
   Sekcja 3: Mermaid
   ============================================================ */

/* ============================================================
   Sekcja 3b: GIF Player — Play/Pause + Restart toolbar
   ============================================================ */

.dfx-gif-player {
  position: relative !important;
  display: inline-block !important;
  cursor: default !important;
}

.dfx-gif-canvas {
  display: block !important;
  max-width: 100% !important;
  height: auto !important;
}

.dfx-gif-overlay {
  position: absolute !important;
  bottom: 8px !important;
  right: 8px !important;
  background: rgba(0, 0, 0, 0.6) !important;
  border-radius: 16px !important;
  display: flex !important;
  align-items: center !important;
  gap: 2px !important;
  padding: 2px 4px !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transition: opacity 0.2s, visibility 0.2s !important;
  user-select: none !important;
  z-index: 2 !important;
}

.dfx-gif-btn {
  background: none !important;
  border: none !important;
  color: #fff !important;
  cursor: pointer !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 28px !important;
  height: 28px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 13px !important;
  line-height: 1 !important;
  border-radius: 50% !important;
  transition: background 0.15s !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  font-family: inherit !important;
}

.dfx-gif-btn:hover {
  background: rgba(255, 255, 255, 0.2) !important;
}

.dfx-gif-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.6) !important;
  outline-offset: 1px !important;
}

/* Hover lub focus-within — toolbar widoczny */
.dfx-gif-player:hover .dfx-gif-overlay,
.dfx-gif-player:focus-within .dfx-gif-overlay {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

/* Gdy zapauzowany — toolbar stale widoczny */
.dfx-gif-player[data-state="paused"] .dfx-gif-overlay {
  opacity: 0.8 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

/* ============================================================
   Sekcja 3c: GitHub Callout Blocks — NOTE/TIP/IMPORTANT/WARNING/CAUTION
   Scope: .wiki blockquote → .dfx-callout (JS post-processing)
   Wariant A: Editorial Slate (oklch)
   !important wymagany — Opale theme nadpisuje details/summary/p
   ============================================================ */

/* -- Callout base -- */
.wiki .dfx-callout {
  border-radius: 6px !important;
  margin-top: 8px !important;
  margin-bottom: 8px !important;
  border: none !important;
  border-left: 3px solid transparent !important;
  font-size: inherit !important;
  line-height: 1.55 !important;
  overflow: hidden !important;
  font-style: normal !important;
  opacity: 1 !important;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}
.wiki div.dfx-callout { padding: 12px 16px 12px 14px !important; }
.wiki .dfx-callout-title {
  display: flex !important; align-items: center !important; gap: 8px !important;
  font-weight: 600 !important; margin-bottom: 6px !important;
  font-style: normal !important; font-size: 14px !important;
}
.wiki .dfx-callout-title .dfx-icon {
  width: 22px !important; height: 22px !important;
  display: inline-flex !important; align-items: center !important; justify-content: center !important;
  flex-shrink: 0 !important;
}
.wiki .dfx-callout-title .dfx-icon svg { width: 16px !important; height: 16px !important; }
.wiki .dfx-callout-body { padding-left: 30px !important; }
.wiki .dfx-callout-body:empty { display: none !important; }
.wiki .dfx-callout :not(pre) > code {
  padding: 1px 5px !important; border-radius: 3px !important;
  font-family: 'JetBrains Mono', ui-monospace, monospace !important; font-size: 0.9em !important;
}
div.wiki .dfx-callout p { margin: 0 !important; }
div.wiki .dfx-callout p + p { margin-top: 8px !important; }
div.wiki .dfx-callout ul, div.wiki .dfx-callout ol { margin: 6px 0 0 18px !important; padding: 0 !important; }

/* -- Collapsible: details/summary — Opale ma summary{display:list-item} -- */
.wiki details.dfx-callout { padding: 0 !important; }
.wiki details.dfx-callout > summary {
  list-style: none !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 8px 14px !important;
  margin: 0 !important;
  cursor: pointer !important;
  outline: none !important;
  font-style: normal !important;
}
.wiki details.dfx-callout > summary::-webkit-details-marker { display: none !important; }
.wiki details.dfx-callout > summary::marker { display: none !important; content: none !important; }
.wiki details.dfx-callout > summary::before { display: none !important; content: none !important; }
.wiki details.dfx-callout > summary .dfx-icon {
  width: 18px !important; height: 18px !important;
  display: inline-flex !important; align-items: center !important; justify-content: center !important;
  flex-shrink: 0 !important;
}
.wiki details.dfx-callout > summary .dfx-icon svg { width: 14px !important; height: 14px !important; }
.wiki details.dfx-callout > summary .dfx-summary-title {
  font-weight: 600 !important; font-size: 14px !important; letter-spacing: -0.005em !important; flex: 1 !important;
  font-style: normal !important;
}
.wiki details.dfx-callout > summary::after {
  content: "" !important;
  width: 14px !important; height: 14px !important;
  background-color: currentColor !important;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M3.22 5.97a.75.75 0 0 1 1.06 0L8 9.69l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L3.22 7.03a.75.75 0 0 1 0-1.06Z'/></svg>") center/contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M3.22 5.97a.75.75 0 0 1 1.06 0L8 9.69l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L3.22 7.03a.75.75 0 0 1 0-1.06Z'/></svg>") center/contain no-repeat;
  flex-shrink: 0 !important;
  margin-left: auto !important;
  transition: transform 0.2s ease !important;
  border: none !important;
}
.wiki details.dfx-callout:not([open]) > summary::after { transform: rotate(-90deg) !important; }
.wiki details.dfx-callout > .dfx-callout-body { padding: 4px 14px 4px 30px !important; }

/* -- NOTE: slate -- */
.wiki .dfx-callout-note {
  background: oklch(97% 0.005 250) !important;
  border-left-color: oklch(55% 0.025 250) !important;
  color: oklch(28% 0.020 250) !important;
}
.wiki .dfx-callout-note .dfx-callout-title,
.wiki .dfx-callout-note .dfx-summary-title { color: oklch(42% 0.030 250) !important; }
.wiki .dfx-callout-note .dfx-icon svg { fill: oklch(42% 0.030 250) !important; }
.wiki .dfx-callout-note :not(pre) > code { background: oklch(93% 0.012 250) !important; color: oklch(28% 0.020 250) !important; }
.wiki details.dfx-callout-note > summary { background: oklch(93% 0.012 250) !important; color: oklch(42% 0.030 250) !important; }

/* -- TIP: sage / teal -- */
.wiki .dfx-callout-tip {
  background: oklch(96.5% 0.022 165) !important;
  border-left-color: oklch(55% 0.080 165) !important;
  color: oklch(26% 0.045 165) !important;
}
.wiki .dfx-callout-tip .dfx-callout-title,
.wiki .dfx-callout-tip .dfx-summary-title { color: oklch(42% 0.090 165) !important; }
.wiki .dfx-callout-tip .dfx-icon svg { fill: oklch(42% 0.090 165) !important; }
.wiki .dfx-callout-tip :not(pre) > code { background: oklch(92% 0.040 165) !important; color: oklch(26% 0.045 165) !important; }
.wiki details.dfx-callout-tip > summary { background: oklch(92% 0.040 165) !important; color: oklch(42% 0.090 165) !important; }

/* -- IMPORTANT: indigo -- */
.wiki .dfx-callout-important {
  background: oklch(96% 0.020 270) !important;
  border-left-color: oklch(52% 0.140 270) !important;
  color: oklch(28% 0.080 270) !important;
}
.wiki .dfx-callout-important .dfx-callout-title,
.wiki .dfx-callout-important .dfx-summary-title { color: oklch(45% 0.150 270) !important; }
.wiki .dfx-callout-important .dfx-icon svg { fill: oklch(45% 0.150 270) !important; }
.wiki .dfx-callout-important :not(pre) > code { background: oklch(92% 0.045 270) !important; color: oklch(28% 0.080 270) !important; }
.wiki details.dfx-callout-important > summary { background: oklch(92% 0.045 270) !important; color: oklch(45% 0.150 270) !important; }

/* -- WARNING: amber -- */
.wiki .dfx-callout-warning {
  background: oklch(96% 0.030 75) !important;
  border-left-color: oklch(60% 0.130 75) !important;
  color: oklch(32% 0.080 60) !important;
}
.wiki .dfx-callout-warning .dfx-callout-title,
.wiki .dfx-callout-warning .dfx-summary-title { color: oklch(50% 0.130 75) !important; }
.wiki .dfx-callout-warning .dfx-icon svg { fill: oklch(50% 0.130 75) !important; }
.wiki .dfx-callout-warning :not(pre) > code { background: oklch(93% 0.060 75) !important; color: oklch(32% 0.080 60) !important; }
.wiki details.dfx-callout-warning > summary { background: oklch(93% 0.060 75) !important; color: oklch(50% 0.130 75) !important; }

/* -- CAUTION: terakota -- */
.wiki .dfx-callout-caution {
  background: oklch(96% 0.022 25) !important;
  border-left-color: oklch(52% 0.130 25) !important;
  color: oklch(30% 0.090 25) !important;
}
.wiki .dfx-callout-caution .dfx-callout-title,
.wiki .dfx-callout-caution .dfx-summary-title { color: oklch(46% 0.140 25) !important; }
.wiki .dfx-callout-caution .dfx-icon svg { fill: oklch(46% 0.140 25) !important; }
.wiki .dfx-callout-caution :not(pre) > code { background: oklch(93% 0.045 25) !important; color: oklch(30% 0.090 25) !important; }
.wiki details.dfx-callout-caution > summary { background: oklch(93% 0.045 25) !important; color: oklch(46% 0.140 25) !important; }

/* -- Print: wymus kolory tla i borderow -- */
@media print {
  .wiki .dfx-callout,
  .wiki .dfx-callout-note,
  .wiki .dfx-callout-tip,
  .wiki .dfx-callout-important,
  .wiki .dfx-callout-warning,
  .wiki .dfx-callout-caution,
  .wiki details.dfx-callout > summary,
  .wiki blockquote {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }
  .wiki details.dfx-callout { open: true; }
  .wiki details.dfx-callout > .dfx-callout-body { display: block !important; }
  .wiki .dfx-callout-note { background: #eef3f8 !important; border-left-color: #7a8a9a !important; }
  .wiki .dfx-callout-tip { background: #e6f5eb !important; border-left-color: #3a9a5c !important; }
  .wiki .dfx-callout-important { background: #f0ebf7 !important; border-left-color: #6a3fbf !important; }
  .wiki .dfx-callout-warning { background: #fef5d4 !important; border-left-color: #b89220 !important; }
  .wiki .dfx-callout-caution { background: #fce8e6 !important; border-left-color: #a52a2a !important; }
  .wiki details.dfx-callout-note > summary { background: #dce6f0 !important; }
  .wiki details.dfx-callout-tip > summary { background: #d4eddc !important; }
  .wiki details.dfx-callout-important > summary { background: #e4daf0 !important; }
  .wiki details.dfx-callout-warning > summary { background: #f5ebc4 !important; }
  .wiki details.dfx-callout-caution > summary { background: #f5d5d0 !important; }
  .wiki blockquote { background: #f5f5f6 !important; border-left-color: #c0c2c5 !important; }
}

/* ============================================================
   Sekcja 4: Issue Detail — Typography & Colors
   Scope: body.controller-issues.action-show
   Mockup: dflex-redmine (brutalist/industrial)
   ============================================================ */

/* -- Globalne fonty dla calej strony issue detail -- */
body.controller-issues.action-show {
  font-family: 'Inter', sans-serif;
  color: #2D3436;
  background-color: #F8F9FA;
}

/* -- Content area — tlo + BAZOWA typografia dla calego issue detail -- */
body.controller-issues.action-show #content {
  background-color: transparent;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  line-height: 1.4;
  color: #2D3436;
}

/* -- Wszystkie label sekcji (Opis, Pliki, Podzagadnienia, Powiazane) — jednolity styl -- */
body.controller-issues.action-show #content > p > strong,
body.controller-issues.action-show .description > p > strong,
body.controller-issues.action-show #issue_tree > p > strong,
body.controller-issues.action-show #relations > p > strong {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(45, 52, 54, 0.4);
}

/* -- Sekcje z labelem — flex z dekoracyjna linia -- */
body.controller-issues.action-show .description > p:first-of-type,
body.controller-issues.action-show #content > hr + p,
body.controller-issues.action-show #issue_tree > p:first-of-type,
body.controller-issues.action-show #relations > p:first-of-type {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.6rem;
  margin: 0.3rem 0;
}

body.controller-issues.action-show .description > p:first-of-type::after,
body.controller-issues.action-show #content > hr + p::after,
body.controller-issues.action-show #issue_tree > p:first-of-type::after,
body.controller-issues.action-show #relations > p:first-of-type::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(0, 0, 0, 0.08);
}

/* -- Strzalka collapsible na oryginalnym naglowku -- */
body.controller-issues.action-show #issue_tree > p:first-of-type .dfx-cf-header-arrow,
body.controller-issues.action-show #relations > p:first-of-type .dfx-cf-header-arrow {
  margin-left: 0.5rem;
}

/* -- Kompaktowa lista podzagadnien/powiazanych -- */
body.controller-issues.action-show #issue_tree table.list.issues,
body.controller-issues.action-show #relations table.list.issues {
  font-size: 0.8rem !important;
}

/* Ukryj zbędne kolumny w kompaktowym widoku */
body.controller-issues.action-show #issue_tree table.list.issues td.assigned_to,
body.controller-issues.action-show #issue_tree table.list.issues th.assigned_to,
body.controller-issues.action-show #issue_tree table.list.issues td.priority,
body.controller-issues.action-show #issue_tree table.list.issues th.priority,
body.controller-issues.action-show #issue_tree table.list.issues td.done_ratio,
body.controller-issues.action-show #issue_tree table.list.issues th.done_ratio,
body.controller-issues.action-show #relations table.list.issues td.assigned_to,
body.controller-issues.action-show #relations table.list.issues th.assigned_to,
body.controller-issues.action-show #relations table.list.issues td.priority,
body.controller-issues.action-show #relations table.list.issues th.priority,
body.controller-issues.action-show #relations table.list.issues td.done_ratio,
body.controller-issues.action-show #relations table.list.issues th.done_ratio {
  display: none !important;
}

/* Kompaktowy wiersz — subject skrócony, ID badge widoczny */
body.controller-issues.action-show #issue_tree table.list.issues td.subject,
body.controller-issues.action-show #relations table.list.issues td.subject {
  max-width: 400px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

/* -- Tabela podzagadnien (kolumny: #, Status, Temat, Przypisany) -- */
.dfx-subtask-table {
  width: 100% !important;
  border-collapse: collapse !important;
  table-layout: fixed !important;
  font-family: 'Inter', sans-serif !important;
}

.dfx-subtask-table thead th {
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 0.6rem !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  color: rgba(45, 52, 54, 0.4) !important;
  padding: 0.3rem 0.4rem !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
  text-align: left !important;
  white-space: nowrap !important;
  background: none !important;
  cursor: pointer !important;
  user-select: none !important;
  position: relative !important;
}

.dfx-subtask-table thead th::after {
  content: '' !important;
  display: inline-block !important;
  margin-left: 0.25rem !important;
  font-size: 0.5rem !important;
  opacity: 0.3 !important;
}

.dfx-subtask-table thead th[data-sort-dir="asc"]::after {
  content: '\25B2' !important;
  opacity: 0.7 !important;
}

.dfx-subtask-table thead th[data-sort-dir="desc"]::after {
  content: '\25BC' !important;
  opacity: 0.7 !important;
}

.dfx-subtask-table thead th:hover {
  color: rgba(45, 52, 54, 0.7) !important;
}

/* Kolumny: Toggle(1)=20, #(2)=60, Status(3)=220, Temat(4)=auto, Przypisany(5)=100 */
.dfx-subtask-table thead th:nth-child(2) { width: 60px !important; }
.dfx-subtask-table thead th:nth-child(3) { width: 220px !important; }
.dfx-subtask-table thead th:nth-child(5) { width: 100px !important; }

.dfx-subtask-table td.dfx-st-status-cell {
  white-space: nowrap !important;
}
.dfx-subtask-table td.dfx-st-status-cell .dfx-status-badge,
.dfx-subtask-table td.dfx-st-status-cell .dfx-tracker-badge,
.dfx-subtask-table td.dfx-st-status-cell .dfx-priority-badge {
  margin-right: 3px !important;
  vertical-align: middle !important;
}

.dfx-subtask-table tbody tr {
  transition: background-color 0.1s !important;
}

.dfx-subtask-table tbody tr:hover {
  background-color: rgba(0, 0, 0, 0.03) !important;
}

.dfx-subtask-table tbody td {
  padding: 0.25rem 0.4rem !important;
  vertical-align: middle !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04) !important;
  font-size: 0.82rem !important;
  background: none !important;
}

.dfx-subtask-table td.dfx-st-subject {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  width: 100% !important;
}

.dfx-subtask-table td.dfx-st-subject a {
  color: #2D3436 !important;
  text-decoration: none !important;
}

.dfx-subtask-table td.dfx-st-subject a:hover {
  text-decoration: underline !important;
  text-underline-offset: 2px !important;
}

.dfx-st-status {
  font-family: 'Inter', sans-serif !important;
  font-size: 0.6rem !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.03em !important;
  white-space: nowrap !important;
  padding: 1px 6px !important;
  border-radius: 3px !important;
  display: inline-block !important;
}

/* -- Ujednolicony status badge — pastelowy pill (wszystkie konteksty) -- */
.dfx-status-badge {
  font-family: 'Inter', sans-serif !important;
  font-size: 0.6rem !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.03em !important;
  white-space: nowrap !important;
  padding: 1px 6px !important;
  border-radius: 3px !important;
  display: inline-block !important;
}


.dfx-subtask-table td.dfx-st-assignee {
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 0.65rem !important;
  color: rgba(45, 52, 54, 0.45) !important;
  white-space: nowrap !important;
}


/* -- Chipy filtra statusow (identyczny styl jak .dfx-st-status w tabeli) -- */
.dfx-st-filter-bar {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.3rem !important;
  padding: 0.35rem 0 0.15rem !important;
}

.dfx-st-radio {
  font-family: 'Inter', sans-serif !important;
  font-size: 0.6rem !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.03em !important;
  background: #F7F8F9 !important;
  color: #2D3436 !important;
  padding: 2px 8px !important;
  border-radius: 3px !important;
  border: 1px solid transparent !important;
  cursor: pointer !important;
  outline: none !important;
  transition: all 0.2s ease !important;
  line-height: 1.4 !important;
  white-space: nowrap !important;
}

.dfx-st-radio:hover {
  color: #000 !important;
  background: #EFF0F2 !important;
}

.dfx-st-radio-active {
  background: #F2FDF8 !important;
  color: #fff !important;
  border-color: rgba(45, 110, 74, 0.25) !important;
  box-shadow: 0 0 6px rgba(45, 110, 74, 0.2) !important;
}

.dfx-st-radio-count {
  font-weight: 400 !important;
  opacity: 0.7 !important;
  margin-left: 0.15rem !important;
}

/* Nagłowek issue: "Wymaganie #2900" — display serif -- */
body.controller-issues.action-show #content > h2 {
  font-family: 'Lora', serif;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: #2D3436;
  margin-bottom: 0.15rem;
}

/* -- Status badge obok naglowka — kolorowy pill -- */
body.controller-issues.action-show .badge {
  font-family: 'Inter', sans-serif;
  font-size: 0.55rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 2px 8px;
  border-radius: 2px;
  vertical-align: middle;
}

body.controller-issues.action-show .badge.dfx-status-badge {
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 2px 8px;
  border-radius: 2px;
  vertical-align: middle;
  border: none;
}

/* -- Caly blok issue.details — pelna szerokosc -- */
body.controller-issues.action-show .issue.details {
  width: 100%;
  max-width: 100%;
}

/* -- Nawigacja Poprzednie/Nastepne — skrajna prawa, mniejsze -- */
body.controller-issues.action-show .issue.details .next-prev-links {
  float: right !important;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: rgba(45, 52, 54, 0.4);
  margin: 0;
  padding: 0;
}

body.controller-issues.action-show .issue.details .next-prev-links a {
  font-size: 0.7rem;
  color: rgba(45, 52, 54, 0.5);
  text-decoration: none;
}

body.controller-issues.action-show .issue.details .next-prev-links a:hover {
  color: #2D3436;
}

/* -- Tytul issue (subject) — pod przyciskami, bez przepelnienia -- */
body.controller-issues.action-show .issue.details .subject {
  width: auto;
  clear: both;
}

body.controller-issues.action-show .issue.details .subject h3 {
  font-family: 'Lora', serif !important;
  font-weight: 700 !important;
  font-size: 1.3rem !important;
  line-height: 1.25 !important;
  letter-spacing: -0.02em;
  color: #2D3436 !important;
  margin: 0.2rem 0 0.4rem 0 !important;
  max-width: 100%;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* -- Author line — lekki tekst -- */
body.controller-issues.action-show .issue.details p.author {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: rgba(45, 52, 54, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
  clear: both;
}

body.controller-issues.action-show .issue.details p.author a {
  color: rgba(45, 52, 54, 0.6);
}

/* -- Atrybuty: label — male uppercase tracking -- */
body.controller-issues.action-show .issue.details .attributes .label {
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(45, 52, 54, 0.4);
}

/* -- Atrybuty: value — mono font -- */
body.controller-issues.action-show .issue.details .attributes .value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 500;
  color: #2D3436;
}

body.controller-issues.action-show .issue.details .attributes .value a {
  color: #2D3436;
}

/* -- Atrybuty: sekcja — brutalist grid z cienkimi borderami -- */
body.controller-issues.action-show .issue.details .attributes {
  background-color: rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: 0;
  margin: 0.5rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
}

body.controller-issues.action-show .issue.details .attributes .splitcontent,
body.controller-issues.action-show .issue.details .attributes .splitcontentleft,
body.controller-issues.action-show .issue.details .attributes .splitcontentright {
  flex: 1;
  min-width: 0;
  padding: 0;
  margin: 0;
  float: none;
  width: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
}

body.controller-issues.action-show .issue.details .attributes .attribute {
  background-color: #fff;
  padding: 0.7rem 1.2rem;
  flex: 1 1 auto;
  min-width: 180px;
}

/* -- Atrybuty: scalony "Szacowany + Przepracowany" czas w jednej kratce -- */
/* Helper buduje dwa wiersze blokowe (.dfx-time-row) w <div class="value">.
   Wiersz 1: szacowany (z fontem .value — mono).
   Wiersz 2: label "Przepracowany czas" w stylu belki + wartość mono. */
body.controller-issues.action-show .issue.details .attributes .estimated-hours .value .dfx-time-row {
  display: block;
  line-height: 1.4;
}

body.controller-issues.action-show .issue.details .attributes .estimated-hours .value .dfx-time-row + .dfx-time-row {
  margin-top: 0.15rem;
}

/* Label drugiego wiersza — taki sam styl jak .label boxa (uppercase tracking, szary) */
body.controller-issues.action-show .issue.details .attributes .estimated-hours .dfx-time-spent-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(45, 52, 54, 0.4);
}

/* Wartosc drugiego wiersza — mono font, identycznie jak .value glowne */
body.controller-issues.action-show .issue.details .attributes .estimated-hours .dfx-time-spent-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 500;
  color: #2D3436;
}

body.controller-issues.action-show .issue.details .attributes .estimated-hours .dfx-time-spent-value a {
  color: #2D3436;
}

/* Ukryj standardowy osobny box "Przepracowany czas" — informacja jest scalona w estimated-hours */
body.controller-issues.action-show .issue.details .attributes .attribute.spent-time {
  display: none !important;
}

/* -- Opis (description) — wyrazny blok, najwazniejsza sekcja -- */
body.controller-issues.action-show .description {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  line-height: 1.4;
  color: #2D3436;
  background-color: #88512805;
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: 1.2rem 2rem;
  margin: 0.5rem 0;
}

/* -- Opis: ukryj naglowek "Opis" -- */
body.controller-issues.action-show .description > p:first-of-type {
  display: none !important;
}

/* -- Opis: przycisk "Cytuj" na lewo -- */
body.controller-issues.action-show .description > .contextual {
  float: none !important;
  text-align: left;
  margin-bottom: 0.3rem;
}

/* -- Lista chatow (notatki z historii) -- */
.dfx-chat-list {
  margin: 0.5rem 0;
  max-width: 100%;
}

.dfx-chat-entry {
  background-color: #88512805;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-left: 4px solid #4aa171;
  padding: 0.8rem 1.5rem;
  margin: 0.3rem 0;
  overflow: visible;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.dfx-chat-entry.dfx-chat-mine {
  border-left-color: #E67E22;
}

.dfx-chat-entry .dfx-chat-header {
  display: flex;
  align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: rgba(45, 52, 54, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.3rem;
  user-select: none;
  overflow: visible;
  position: relative;
}

/* Akcje (Cytuj, Edytuj) — po lewej */
.dfx-chat-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-right: 0.6rem;
  flex-shrink: 0;
}

.dfx-chat-actions a {
  color: rgba(45, 52, 54, 0.35) !important;
  text-decoration: none !important;
}

.dfx-chat-actions a:hover {
  color: rgba(45, 52, 54, 0.7) !important;
}

.dfx-chat-actions svg.icon-svg {
  width: 14px !important;
  height: 14px !important;
}

/* Ukryj etykiety tylko na przyciskach Cytuj/Edytuj, NIE wewnatrz dropdown */
.dfx-chat-actions > a .icon-label { display: none; }

/* Podglad tresci notatki — srodek headera, delikatna czcionka */
.dfx-chat-preview {
  flex: 1;
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 400;
  color: rgba(45, 52, 54, 0.3);
  text-transform: none;
  letter-spacing: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 0.8rem;
  min-width: 0;
}

/* Tekst naglowka — wyrownany do prawej */
.dfx-chat-header-text {
  flex-shrink: 0;
  text-align: right;
  white-space: nowrap;
}

/* Dropdown (Akcje) w chat entries — pozycjonowanie LEFT zamiast RIGHT */
/* Oryginalnie .contextual jest float:right wiec dropdown ma right:0 */
/* W naszym ukladzie akcje sa po lewej — pozycja musi byc left:0 */
.dfx-chat-actions .drdn {
  position: relative;
}

.dfx-chat-actions .drdn .drdn-content {
  left: 0 !important;
  right: auto !important;
  z-index: 9999 !important;
  min-width: 140px;
}

.dfx-chat-entry .dfx-chat-header a {
  color: rgba(45, 52, 54, 0.6) !important;
  text-decoration: none !important;
}

.dfx-chat-entry .dfx-chat-header a.user {
  font-weight: 600;
  color: rgba(45, 52, 54, 0.7) !important;
}

/* Strzalka zwijania */
.dfx-chat-header::after {
  content: '\25BC';
  font-size: 0.55em;
  margin-left: 0.5rem;
  color: rgba(45, 52, 54, 0.25);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.dfx-chat-header[data-dfx-chat-toggle="closed"]::after {
  transform: rotate(-90deg);
}

/* Kontener tresci — zwijanie */
.dfx-chat-content {
  overflow: hidden;
  transition: max-height 0.25s ease, opacity 0.2s ease;
}

.dfx-chat-entry .wiki {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  line-height: 1.4;
  overflow-wrap: break-word;
  word-wrap: break-word;
  max-width: 100%;
}

/* Listy w chat-entry — kompaktowy padding */
.dfx-chat-entry .wiki ul,
.dfx-chat-entry .wiki ol {
  padding-left: 2em !important;
}

/* Naglowki w chat-entry — reset padding-left, bez dekoracyjnej linii ::after */
.dfx-chat-entry .wiki h1,
.dfx-chat-entry .wiki h2,
.dfx-chat-entry .wiki h3 {
  padding-left: 0 !important;
  display: block !important;
  font-size: 0.95rem !important;
  margin: 0.6rem 0 0.3rem 0 !important;
}

.dfx-chat-entry .wiki h4,
.dfx-chat-entry .wiki h5,
.dfx-chat-entry .wiki h6 {
  padding-left: 0 !important;
  font-size: 0.88rem !important;
  margin: 0.5rem 0 0.2rem 0 !important;
}

.dfx-chat-entry .wiki h1::after,
.dfx-chat-entry .wiki h2::after,
.dfx-chat-entry .wiki h3::after {
  display: none !important;
}

/* -- Notatki prywatne w chat-list -- */
.dfx-chat-entry.dfx-chat-private {
  border-left-color: #9B59B6 !important;
  background-color: rgba(155, 89, 182, 0.03) !important;
}

/* Prywatna + moja — priorytet prywatnej (wazniejsza informacja) */
.dfx-chat-entry.dfx-chat-private.dfx-chat-mine {
  border-left-color: #9B59B6 !important;
}

/* Badge prywatnosci */
.dfx-chat-private-badge {
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 0.55rem !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  color: #9B59B6 !important;
  white-space: nowrap !important;
  margin-right: 0.5rem !important;
  flex-shrink: 0 !important;
}

body.controller-issues.action-show .description .wiki {
  font-size: 0.9rem;
  line-height: 1.4;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* ============================================================
   Sekcja 5: Wiki Content — GLOBALNE style brutalist
   Scope: kazdy .wiki w Redmine (issues, wiki pages, journals)
   ============================================================ */

/* -- Wiki: bazowa typografia -- */
.wiki {
  font-family: 'Inter', sans-serif;
  font-size: 0.81rem;
  line-height: 1.4;
  color: #2D3436;
}

/* -- Wiki: paragrafy — czytelne odstepy -- */
.wiki p {
  margin: 0.5rem 0;
  font-size: 14px !important;
}

/* -- Wiki: drukowanie kolorow tla (blockquote, callout, code) -- */
.wiki {
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

/* -- Wiki: blockquote — Editorial Slate (oklch) -- */
.wiki blockquote {
  margin: 12px 0 !important;
  padding: 8px 14px !important;
  border: none !important;
  border-left: 3px solid oklch(82% 0.005 250) !important;
  background: oklch(98.5% 0.003 250) !important;
  color: oklch(38% 0.010 250) !important;
  font-size: 14px !important;
  font-style: normal !important;
  line-height: 1.6 !important;
  border-radius: 0 4px 4px 0 !important;
  opacity: 1 !important;
}
.wiki blockquote > :first-child { margin-top: 0 !important; }
.wiki blockquote > :last-child { margin-bottom: 0 !important; }
.wiki blockquote strong { color: oklch(22% 0.01 250) !important; }

.wiki blockquote p {
  margin: 0.3rem 0 !important;
}

/* Naglowki w blockquote — mniejsze, bez dekoracyjnych linii ::after */
.wiki blockquote h1,
.wiki blockquote h2,
.wiki blockquote h3 {
  font-size: 1rem !important;
  line-height: 1.3 !important;
  margin: 0.6rem 0 0.4rem 0 !important;
}

.wiki blockquote h1::after,
.wiki blockquote h2::after,
.wiki blockquote h3::after {
  display: none !important;
}

/* -- Wiki: naglowki h1-h6 — nadpisanie Opale (div.wiki h1 {font-size:2.25em}) -- */
/* Opale uzywa div.wiki h1..h6 z duzymi fontami + border-bottom */
/* !important wymagany bo Opale laduje sie POZNIEJ niz nasz plugin CSS */
.wiki h1,
.wiki h2,
.wiki h3 {
  font-family: 'Lora', serif !important;
  font-weight: 700 !important;
  color: #2D3436 !important;
  display: flex !important;
  align-items: center;
  gap: 0.8rem;
  border-bottom: none !important;
  padding-bottom: 0 !important;
  line-height: 1.3 !important;
}

.wiki h1::after,
.wiki h2::after,
.wiki h3::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(0, 0, 0, 0.1);
}

/* -- Collapsible headings — chevron + hover -- */
.dfx-heading-chevron {
  flex: none;
  font-size: 0.65em;
  opacity: 0.3;
  user-select: none;
  width: 0.8em;
  text-align: center;
  transition: opacity 0.15s ease;
}
.dfx-collapsible-heading {
  cursor: pointer !important;
}
.dfx-collapsible-heading:hover .dfx-heading-chevron {
  opacity: 0.7;
}
/* Specyficznosc MUSI bic .wiki h1..h3 { display: flex !important } */
.wiki .dfx-section-hidden,
.wiki h1.dfx-section-hidden,
.wiki h2.dfx-section-hidden,
.wiki h3.dfx-section-hidden {
  display: none !important;
}
.dfx-heading-no-line::after {
  display: none !important;
}

/* -- Anchor link (pilcrow) — dyskretny, nie lamie flex -- */
.wiki h1 > a.wiki-anchor,
.wiki h2 > a.wiki-anchor,
.wiki h3 > a.wiki-anchor,
.wiki h4 > a.wiki-anchor,
.wiki h5 > a.wiki-anchor,
.wiki h6 > a.wiki-anchor {
  order: 10;
  flex: none;
  font-size: 0.6em !important;
  opacity: 0.15;
  text-decoration: none !important;
}

.wiki h1 { font-size: 1.19rem !important; margin: 1.2rem 0 0.5rem !important; padding-left: 0 !important; }
.wiki h2 { font-size: 1.07rem !important; margin: 1rem 0 0.4rem !important; padding-left: 1rem !important; }
.wiki h3 { font-size: 0.99rem !important; margin: 0.8rem 0 0.3rem !important; padding-left: 2rem !important; }

.wiki h4,
.wiki h5,
.wiki h6 {
  font-family: 'Inter', sans-serif !important;
  font-weight: 600 !important;
  color: #2D3436 !important;
  border-bottom: none !important;
  padding-bottom: 0 !important;
  line-height: 1.3 !important;
}

.wiki h4 { font-size: 0.95rem !important; margin: 0.6rem 0 0.25rem !important; padding-left: 3rem !important; }
.wiki h5 { font-size: 0.91rem !important; margin: 0.5rem 0 0.2rem !important; padding-left: 4rem !important; }
.wiki h6 { font-size: 0.87rem !important; margin: 0.5rem 0 0.2rem !important; padding-left: 5rem !important; }

/* -- Wiki: listy ol/ul — lepsza typografia, spacing -- */
.wiki ol,
.wiki ul {
  padding-left: 1.5rem;
  margin: 0.6rem 0;
}

.wiki li {
  font-size: 0.9rem;
  font-family: 'IBM Plex Mono', monospace;
  line-height: 1.5;
  margin-bottom: 0.2rem;
}

.wiki li strong {
  font-weight: 600;
  color: #2D3436;
}

.wiki li ul,
.wiki li ol {
  margin: 0.2rem 0;
}

/* -- Wiki: callout box — betonowe tlo + brutalist border -- */
.wiki div.flash,
.wiki div.box,
.wiki .note,
.wiki .tip,
.wiki .warning {
  background-color: #E9ECEF !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  border-radius: 2px;
  padding: 1.5rem 2rem;
  margin: 1.2rem 0;
}

.wiki .note p:first-child,
.wiki .tip p:first-child,
.wiki .warning p:first-child {
  font-family: 'Lora', serif;
  font-weight: 700;
  font-size: 1.1rem;
  margin-top: 0;
}

/* -- Wiki: pre/code — mono z betonowym tlem -- */
.wiki pre {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  background-color: #E9ECEF;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 2px;
  padding: 1rem 1.5rem;
  margin: 0.8rem 0;
  overflow-x: auto;
}

.wiki code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85em;
  background-color: #E9ECEF;
  padding: 0.15rem 0.4rem;
  border-radius: 2px;
}

.wiki pre code {
  background: transparent;
  padding: 0;
}

/* -- Wiki: tabele — czyste brutalist borders -- */
.wiki table {
  border-collapse: collapse;
  border: 1px solid rgba(0, 0, 0, 0.1);
  margin: 0.8rem 0;
  width: 100%;
}

.wiki table th {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(45, 52, 54, 0.5);
  background-color: #F8F9FA;
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: 0.6rem 1rem;
  text-align: left;
}

.wiki table td {
  font-size: 0.9rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: 0.5rem 1rem;
}

/* -- Wiki: linki — subtelne, z underline offset -- */
.wiki a {
  color: #2D3436;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(45, 52, 54, 0.3);
}

.wiki a:hover {
  text-decoration-color: #2D3436;
}

/* -- Wiki: linki WEWNATRZ naglowkow — dziedzicza styl naglowka -- */
.wiki h1 a:not(.wiki-anchor),
.wiki h2 a:not(.wiki-anchor),
.wiki h3 a:not(.wiki-anchor),
.wiki h4 a:not(.wiki-anchor) {
  font-family: inherit;
  font-weight: inherit;
  font-size: inherit;
  color: inherit;
  text-decoration: none;
}

.wiki h1 a:not(.wiki-anchor):hover,
.wiki h2 a:not(.wiki-anchor):hover,
.wiki h3 a:not(.wiki-anchor):hover,
.wiki h4 a:not(.wiki-anchor):hover {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(45, 52, 54, 0.3);
}

/* -- Wiki: external links — ikona i skrocony URL -- */
.wiki a.external {
  word-break: break-all;
}

/* -- Wiki: obrazki — brutalist border -- */
.wiki img {
  border: 1px solid rgba(0, 0, 0, 0.1);
  margin: 0.5rem 0;
  max-width: 100%;
}

/* -- Wiki: hr — subtelne separatory -- */
.wiki hr {
  border: none;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  margin: 1rem 0;
}

/* -- Wiki: details/summary — zwijane sekcje -- */
.wiki details {
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 2px;
  margin: 0.6rem 0;
  background-color: rgba(0, 0, 0, 0.02);
}

.wiki details[open] {
  background-color: rgba(0, 0, 0, 0.015);
}

.wiki details summary {
  display: block;
  cursor: pointer;
  padding: 0.6rem 1rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: #2D3436;
  background-color: rgba(0, 0, 0, 0.03);
  border-bottom: 1px solid transparent;
  list-style: none;
  user-select: none;
  transition: background-color 0.15s;
}

.wiki details summary::-webkit-details-marker {
  display: none;
}

.wiki details summary::before {
  content: '\25B6';
  display: inline-block;
  font-size: 0.65em;
  margin-right: 0.6rem;
  transition: transform 0.2s;
  color: rgba(45, 52, 54, 0.4);
}

.wiki details[open] > summary::before {
  transform: rotate(90deg);
}

.wiki details summary:hover {
  background-color: rgba(0, 0, 0, 0.06);
}

.wiki details[open] > summary {
  border-bottom-color: rgba(0, 0, 0, 0.1);
}

.wiki details > *:not(summary) {
  margin-left: 1rem !important;
  margin-right: 1rem !important;
}

.wiki details > *:not(summary):last-child {
  margin-bottom: 1rem !important;
}

/* tabele wewnatrz details — szerokosc dopasowana do kontenera */
.wiki details > table {
  width: auto !important;
  max-width: calc(100% - 2rem);
}

/* ============================================================
   Sekcja 5b: Wiki Page — dodatkowe style dla body.controller-wiki
   ============================================================ */

/* -- Wiki page: tlo i fonty -- */
body.controller-wiki {
  font-family: 'Inter', sans-serif;
  color: #2D3436;
  background-color: #F8F9FA;
}

body.controller-wiki #content {
  background-color: transparent;
}

/* -- Wiki page: content area — bialy box brutalist -- */
body.controller-wiki .wiki.wiki-page {
  background-color: #88512805;
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: 2rem 2.5rem;
  font-size: 1.05rem;
}

/* -- Wiki page: flexbox layout dla sticky sidebar -- */
body.controller-wiki #main {
  display: flex !important;
  overflow: visible !important;
}
body.controller-wiki #content {
  flex: 1 !important;
  min-width: 0 !important;
  order: 1 !important;
  width: auto !important;
  margin-right: 0 !important;
}

/* -- Wiki page: sidebar — brutalist box, sticky ponizej headera -- */
body.controller-wiki #sidebar {
  float: none !important;
  width: 250px !important;
  flex-shrink: 0 !important;
  order: 2 !important;
  align-self: flex-start !important;
  font-family: 'Inter', sans-serif;
  font-size: 0.77rem;
  background-color: rgba(255, 255, 255, 0.7) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 1.2rem;
  margin-left: 1rem;
  position: sticky !important;
  top: 0;
  max-height: 100vh;
  overflow-y: auto;
}

body.controller-wiki #sidebar h3 {
  font-family: 'Lora', serif;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  color: #2D3436;
  margin-bottom: 0.8rem;
}

/* -- Wiki sidebar: dynamiczny TOC -- */
.dfx-toc {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.dfx-toc-title {
  font-family: 'Lora', serif !important;
  font-weight: 700 !important;
  font-size: 1rem !important;
  color: #2D3436 !important;
  margin: 0 0 0.6rem 0 !important;
}
.dfx-toc-list {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}
.dfx-toc-item {
  margin: 0 !important;
  font-family: 'IBM Plex Mono', monospace !important;
  font-size: 0.72rem !important;
  line-height: 1.3 !important;
}
.dfx-toc-item a {
  display: block;
  padding: 0.25rem 0.5rem;
  color: #636e72 !important;
  text-decoration: none !important;
  border-left: 2px solid transparent;
  transition: all 0.15s ease;
}
.dfx-toc-item a:hover {
  color: #2D3436 !important;
  background: rgba(0, 0, 0, 0.03);
}
.dfx-toc-item.dfx-toc-active a {
  color: #2d6e4a !important;
  border-left-color: #2d6e4a;
  font-weight: 500;
  background: rgba(45, 110, 74, 0.05);
}
/* Wciecia wg poziomu */
.dfx-toc-level-1 a { padding-left: 0.5rem; font-weight: 600; color: #2D3436 !important; }
.dfx-toc-level-2 a { padding-left: 1.2rem; }
.dfx-toc-level-3 a { padding-left: 2.0rem; font-size: 0.68rem; }

/* -- Wiki page: edit section icons — subtelne -- */
body.controller-wiki .contextual.heading-1,
body.controller-wiki .contextual.heading-2,
body.controller-wiki .contextual.heading-3 {
  opacity: 0.3;
  transition: opacity 0.15s ease;
}

body.controller-wiki .contextual.heading-1:hover,
body.controller-wiki .contextual.heading-2:hover,
body.controller-wiki .contextual.heading-3:hover {
  opacity: 1;
}

/* (stare selektory sekcji przeniesione do bloku "BAZOWA typografia" powyzej) */

/* -- Separatory hr — cienkie, jasne -- */
body.controller-issues.action-show .issue.details ~ hr,
body.controller-issues.action-show .issue.details hr {
  border: none;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  margin: 0.5rem 0;
}

/* -- Historia — typography -- */
body.controller-issues.action-show #history .tabs ul li a {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

body.controller-issues.action-show .journal .note-header {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  color: rgba(45, 52, 54, 0.6);
}

body.controller-issues.action-show .journal .details li {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
}

/* -- Sidebar — brutalist box z typography -- */
body.controller-issues.action-show #sidebar {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  background-color: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
}

body.controller-issues.action-show #sidebar h3 {
  font-family: 'Lora', serif;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  color: #2D3436;
  margin-bottom: 0.8rem;
}

/* -- Akcje contextual — subtlne -- */
body.controller-issues.action-show .contextual a {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* -- Pliki (attachments) — brutalist cards -- */
body.controller-issues.action-show .attachments {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
}

body.controller-issues.action-show .attachments p {
  background-color: #E9ECEF;
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 0.6rem 1rem;
  margin-bottom: 2px;
  transition: background-color 0.15s ease;
}

body.controller-issues.action-show .attachments p:hover {
  background-color: #DEE2E6;
}

body.controller-issues.action-show .attachments a.icon-attachment {
  font-weight: 500;
  color: #2D3436;
  text-decoration: none;
}

body.controller-issues.action-show .attachments .size {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: rgba(45, 52, 54, 0.4);
}

body.controller-issues.action-show .attachments .author {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: rgba(45, 52, 54, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================================
   Sekcja 6: Crystal Logo — animowane logo 3D dFLEX
   ============================================================ */

/* -- Kontener logo: centrowany, z glow -- */
.dfx-crystal-wrap {
  display: inline-block !important;
  position: relative !important;
  line-height: 0 !important;
}

.dfx-crystal-wrap::before {
  content: '';
  position: absolute;
  width: 180%;
  height: 180%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  background: radial-gradient(ellipse, rgba(67, 160, 71, 0.15) 0%, transparent 65%);
  z-index: 0;
}

.dfx-crystal-svg {
  display: block !important;
  overflow: visible !important;
  position: relative;
  z-index: 1;
}

.dfx-crystal-svg line {
  stroke-linecap: round !important;
}

.dfx-crystal-svg polygon {
  stroke: none !important;
}

.dfx-crystal-svg circle {
  stroke: none !important;
}

/* -- Wariant w headerze Redmine -- */
#header .dfx-crystal-wrap {
  vertical-align: middle !important;
  margin-right: 8px !important;
}

/* -- Wariant w stopce -- */
#footer .dfx-crystal-wrap {
  margin: 0 auto !important;
  display: block !important;
  text-align: center !important;
}

/* -- Reduced motion: brak glow pulse -- */
@media (prefers-reduced-motion: reduce) {
  .dfx-crystal-wrap::before {
    animation: none !important;
  }
}

/* -- Mobile: mniejszy glow -- */
@media (max-width: 640px) {
  .dfx-crystal-wrap::before {
    width: 140%;
    height: 140%;
  }
}

/* ============================================================
   Sekcja 7: Footer — premium branding
   ============================================================ */

#footer {
  text-align: center;
  padding: 2rem 1rem 1.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  background: transparent;
}

/* -- Wiersz: Lang po lewej, Grabowski po prawej -- */
.dfx-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
}

.dfx-footer-left {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  color: rgba(45, 52, 54, 0.25);
  letter-spacing: 0.03em;
}

.dfx-footer-left a {
  color: rgba(45, 52, 54, 0.35);
  text-decoration: none;
}

.dfx-footer-left a:hover {
  color: rgba(45, 52, 54, 0.6);
}

.dfx-footer-right {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: #2D3436;
  letter-spacing: 0.02em;
}

/* -- POWERED BY FAKTORIA.IO -- */
.dfx-footer-brand {
  margin-bottom: 0.2rem;
}

.dfx-footer-powered {
  font-family: 'Inter', sans-serif;
  font-size: 0.5rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: rgba(45, 52, 54, 0.3);
  text-transform: uppercase;
}

.dfx-footer-logo {
  font-family: 'Lora', serif;
  font-weight: 900;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  color: #4aa171 !important;
  text-decoration: none !important;
  text-transform: uppercase;
}

.dfx-footer-logo:hover {
  color: #2D3436 !important;
}

.dfx-footer-dot {
  color: #2D3436;
}

.dfx-footer-logo:hover .dfx-footer-dot {
  color: #4aa171;
}

/* -- Tagline -- */
.dfx-footer-tagline {
  font-family: 'Inter', sans-serif;
  font-size: 0.5rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: rgba(45, 52, 54, 0.25);
}

/* ============================================================
   Sekcja 8: New Issue Form — przebudowany layout formularza
   ============================================================ */

/* -- Gorny bar: Typ | Projekt | Status | Przypisany | Prywatne — flat, kompaktowy -- */
.dfx-new-issue-topbar {
  display: flex !important;
  align-items: flex-end !important;
  gap: 12px !important;
  background: #FAFAFA !important;
  border: 1px solid #E5E7EB !important;
  border-radius: 6px !important;
  padding: 10px 16px !important;
  margin-bottom: 12px !important;
  flex-wrap: nowrap !important;
}

.dfx-new-issue-topbar .dfx-topbar-field {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  flex-shrink: 1 !important;
  min-width: 0 !important;
}

.dfx-new-issue-topbar .dfx-topbar-field label {
  font-size: 0.6rem !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  color: #9CA3AF !important;
  margin: 0 !important;
  padding: 0 !important;
  width: auto !important;
  text-align: left !important;
  display: block !important;
  float: none !important;
  line-height: 1.2 !important;
}

.dfx-new-issue-topbar .dfx-topbar-field select,
.dfx-new-issue-topbar .dfx-topbar-field input[type="text"] {
  font-size: 0.8rem !important;
  padding: 3px 6px !important;
  height: 28px !important;
  border: 1px solid #D1D5DB !important;
  border-radius: 3px !important;
  background: #fff !important;
  box-shadow: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%239CA3AF'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 6px center !important;
  padding-right: 22px !important;
}

.dfx-new-issue-topbar .dfx-topbar-checkbox {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding-bottom: 2px !important;
  margin-left: auto !important;
  flex-shrink: 0 !important;
}

.dfx-new-issue-topbar .dfx-topbar-checkbox label {
  font-size: 0.8rem !important;
  font-weight: 500 !important;
  color: #374151 !important;
  cursor: pointer !important;
  margin: 0 !important;
  padding: 0 !important;
  width: auto !important;
  text-align: left !important;
  float: none !important;
}

/* -- Blok glowny: Temat + Opis + Zalaczniki (new + edit) -- */
.dfx-issue-form > .box.tabular,
.dfx-issue-form > .box {
  background: #fff !important;
  border: 1px solid #E5E7EB !important;
  border-radius: 6px !important;
  padding: 16px 20px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04) !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* -- Edit mode: fieldset wewnatrz .box — reset border/padding -- */
.dfx-issue-form .box > fieldset.tabular {
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
}
.dfx-issue-form .box > fieldset.tabular > legend {
  display: none !important;
}

/* -- Ukryj oryginalne pola przeniesione do topbar -- */
.dfx-issue-form #all_attributes #issue_is_private_wrap {
  display: none !important;
}

/* -- Temat: jednoliniowy, kompaktowy -- */
.dfx-issue-form #issue_subject {
  width: 100% !important;
  box-sizing: border-box !important;
  font-size: 0.85rem !important;
  padding: 5px 10px !important;
  height: 32px !important;
  border: 1px solid #D1D5DB !important;
  border-radius: 3px !important;
  box-shadow: none !important;
}

/* -- Opis textarea: min=140px, default=245px (1.75x min), bez max limitu -- */
.dfx-issue-form #issue_description {
  width: 100% !important;
  box-sizing: border-box !important;
  min-height: 140px !important;
  height: 245px !important;
  font-size: 0.8rem !important;
  padding: 8px 10px !important;
  border: 1px solid #D1D5DB !important;
  border-radius: 3px !important;
  box-shadow: none !important;
  resize: vertical !important;
}

/* -- Notatki textarea (edit mode) -- */
.dfx-issue-form #issue_notes {
  width: 100% !important;
  box-sizing: border-box !important;
  min-height: 100px !important;
  font-size: 0.8rem !important;
  padding: 8px 10px !important;
  border: 1px solid #D1D5DB !important;
  border-radius: 3px !important;
  box-shadow: none !important;
  resize: vertical !important;
}

/* -- Label styl uppercase — mniejszy, blizej pola -- */
.dfx-issue-form .box label {
  font-size: 0.6rem !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  margin-bottom: 2px !important;
  letter-spacing: 0.08em !important;
  color: #9CA3AF !important;
}

/* -- Globalne resetowanie selectow/inputow — flat design -- */
.dfx-issue-form .box select,
.dfx-issue-form .box input[type="text"] {
  box-shadow: none !important;
  border: 1px solid #D1D5DB !important;
  border-radius: 3px !important;
  background-color: #fff !important;
}

/* -- Zmniejsz gap miedzy label a polem -- */
.dfx-issue-form .box p {
  margin: 6px 0 !important;
}

/* -- Collapsible details/summary bloki -- */
.dfx-new-issue-details {
  background: #fff !important;
  border: 1px solid #E5E7EB !important;
  border-radius: 6px !important;
  margin-top: 20px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04) !important;
}

/* -- Drugi details (obserwatorzy) — dodatkowy margin od pierwszego -- */
.dfx-new-issue-details + .dfx-new-issue-details {
  margin-top: 16px !important;
}

.dfx-new-issue-details > summary {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 12px 20px !important;
  cursor: pointer !important;
  list-style: none !important;
  user-select: none !important;
}

.dfx-new-issue-details > summary::-webkit-details-marker {
  display: none !important;
}

.dfx-new-issue-details > summary .dfx-details-title {
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  color: #374151 !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.dfx-new-issue-details > summary .dfx-details-hint {
  font-size: 0.65rem !important;
  text-transform: uppercase !important;
  font-weight: 500 !important;
  color: #9CA3AF !important;
  letter-spacing: 0.05em !important;
}

.dfx-new-issue-details > summary .dfx-details-chevron {
  transition: transform 0.2s ease !important;
  color: #2D6A4F !important;
  font-size: 1.2rem !important;
}

.dfx-new-issue-details[open] > summary .dfx-details-chevron {
  transform: rotate(180deg) !important;
}

.dfx-new-issue-details > .dfx-details-content {
  padding: 0 20px 20px !important;
  border-top: 1px solid #E5E7EB !important;
}

/* -- Atrybuty w details: grid 2-kolumnowy -- */
.dfx-new-issue-details .dfx-attrs-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 8px 32px !important;
}

.dfx-new-issue-details .dfx-attrs-grid .dfx-attr-row {
  display: grid !important;
  grid-template-columns: 120px 1fr !important;
  align-items: center !important;
  gap: 8px !important;
}

.dfx-new-issue-details .dfx-attrs-grid .dfx-attr-row label {
  font-size: 0.78rem !important;
  color: #6B7280 !important;
  font-weight: 400 !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  margin: 0 !important;
  padding: 0 !important;
  width: auto !important;
  text-align: left !important;
  float: none !important;
}

.dfx-new-issue-details .dfx-attrs-grid .dfx-attr-row select,
.dfx-new-issue-details .dfx-attrs-grid .dfx-attr-row input {
  font-size: 0.85rem !important;
  padding: 4px 8px !important;
  border: 1px solid #D1D5DB !important;
  border-radius: 4px !important;
}

/* -- Obserwatorzy: grid 3 kolumny z hover, wieksza sekcja -- */
.dfx-watchers-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 4px 24px !important;
  min-height: 80px !important;
}

.dfx-watchers-grid label {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-size: 0.85rem !important;
  padding: 6px 8px !important;
  border-radius: 4px !important;
  cursor: pointer !important;
  color: #6B7280 !important;
  font-weight: 400 !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  width: auto !important;
  text-align: left !important;
  float: none !important;
  margin: 0 !important;
}

.dfx-watchers-grid label:hover {
  background: #F9FAFB !important;
}

/* -- Zalaczniki: inline styl -- */
.dfx-attachments-inline {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding-top: 12px !important;
}

.dfx-attachments-inline label {
  text-transform: uppercase !important;
  font-size: 0.65rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.08em !important;
  color: #6B7280 !important;
  white-space: nowrap !important;
  width: auto !important;
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* -- Separator przed przyciskami -- */
.dfx-submit-separator {
  border: none !important;
  border-top: 1px solid #E5E7EB !important;
  margin: 24px 0 16px !important;
}

/* -- Przyciski submit -- */
.dfx-issue-form > input[type="submit"],
.dfx-issue-form input[type="submit"] {
  background-color: #2D6A4F !important;
  border-color: #245A42 !important;
  color: #fff !important;
  font-weight: 500 !important;
  padding: 8px 24px !important;
  border-radius: 4px !important;
  font-size: 0.85rem !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1) !important;
}

.dfx-issue-form input[type="submit"]:hover {
  background-color: #245A42 !important;
}

/* ============================================================
   Sekcja 9: Toast Notifications — eleganckie popupy
   ============================================================ */

/* -- Kontener: prawy gorny rog, z-index nad wszystkim -- */
#dfx-toast-container {
  position: fixed !important;
  top: 16px !important;
  right: 16px !important;
  z-index: 100000 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  pointer-events: none !important;
  max-width: 420px !important;
}

/* -- Toast: biale tlo, cien, lewy border kolorowy -- */
.dfx-toast {
  display: flex !important;
  align-items: flex-start !important;
  gap: 10px !important;
  background: #fff !important;
  border: 1px solid #E5E7EB !important;
  border-left: 4px solid #6B7280 !important;
  border-radius: 6px !important;
  padding: 12px 16px !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.08) !important;
  pointer-events: auto !important;
  opacity: 0 !important;
  transform: translateX(100%) !important;
  transition: opacity 0.3s ease, transform 0.3s ease !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 0.85rem !important;
  line-height: 1.4 !important;
  color: #374151 !important;
  min-width: 280px !important;
}

.dfx-toast-visible {
  opacity: 1 !important;
  transform: translateX(0) !important;
}

.dfx-toast-dismissed {
  opacity: 0 !important;
  transform: translateX(100%) !important;
}

/* -- Typy: kolory lewego bordera i ikony -- */
.dfx-toast-error {
  border-left-color: #DC2626 !important;
}
.dfx-toast-error .dfx-toast-icon {
  color: #DC2626 !important;
}

.dfx-toast-warning {
  border-left-color: #F59E0B !important;
}
.dfx-toast-warning .dfx-toast-icon {
  color: #F59E0B !important;
}

.dfx-toast-notice,
.dfx-toast-success {
  border-left-color: #10B981 !important;
}
.dfx-toast-notice .dfx-toast-icon,
.dfx-toast-success .dfx-toast-icon {
  color: #10B981 !important;
}

/* -- Ikona -- */
.dfx-toast-icon {
  font-size: 1.1rem !important;
  flex-shrink: 0 !important;
  margin-top: 1px !important;
}

/* -- Tresc -- */
.dfx-toast-content {
  flex: 1 !important;
  color: #374151 !important;
}

.dfx-toast-content ul {
  margin: 0 !important;
  padding-left: 16px !important;
}

.dfx-toast-content li {
  margin: 2px 0 !important;
}

/* -- Przycisk zamkniecia -- */
.dfx-toast-close {
  background: none !important;
  border: none !important;
  color: #9CA3AF !important;
  font-size: 1.2rem !important;
  cursor: pointer !important;
  padding: 0 !important;
  margin: -4px -4px 0 0 !important;
  line-height: 1 !important;
  flex-shrink: 0 !important;
  box-shadow: none !important;
}

.dfx-toast-close:hover {
  color: #374151 !important;
  background: none !important;
  box-shadow: none !important;
}

/* ============================================================
   Sekcja 4: Ancestors Tree
   Wciecia + konektory drzewa dla ancestorow na detalu issue
   ============================================================ */

/* Reset Redmine core: div.issue div.subject div div { padding-left: 16px } */
.dfx-ancestors-tree div {
  padding-left: 0 !important;
}

.dfx-ancestors-tree p.dfx-ancestor {
  margin: 1px 0 !important;
  line-height: 1.6 !important;
}

.dfx-tree-connector {
  pointer-events: none !important;
}

/* ============================================================
   Sekcja 5: Collapsible Sub-issues
   Toggle ▶/▼ na rodzicach, domyslnie wnuki zwiniete
   ============================================================ */

.dfx-st-toggle-col,
.dfx-st-toggle-cell {
  width: 20px !important;
  min-width: 20px !important;
  max-width: 20px !important;
  padding: 0 2px !important;
  text-align: center !important;
}

.dfx-tree-toggle {
  display: inline-block !important;
  cursor: pointer !important;
  width: 16px !important;
  text-align: center !important;
  font-size: 9px !important;
  color: #6B7280 !important;
  vertical-align: middle !important;
  -webkit-user-select: none !important;
  user-select: none !important;
  border-radius: 3px !important;
  line-height: 16px !important;
}

.dfx-tree-toggle:hover {
  color: #374151 !important;
  background: #F3F4F6 !important;
}

/* -- Dzieci w grupie — lekko niebieskawe tlo -- */
.dfx-subtask-table tbody tr[data-dfx-level]:not([data-dfx-level="0"]):not(.dfx-st-parent-row) {
  background: rgba(219, 234, 254, 0.35) !important;
}

/* -- Accordion header — wiersz-rodzic w tabeli podzagadnien -- */
.dfx-st-parent-row {
  background: #F1F5F9 !important;
  font-weight: 600 !important;
  cursor: pointer !important;
}

.dfx-st-accordion-header {
  padding: 6px 8px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.dfx-st-accordion-header .issue-badge {
  margin-right: 8px !important;
}

.dfx-st-accordion-link {
  color: #1E40AF !important;
  text-decoration: none !important;
  font-weight: 600 !important;
  font-size: 0.9rem !important;
}

.dfx-st-accordion-link:hover {
  color: #e5123d !important;
  text-decoration: underline !important;
}

/* -- Wiersze-dzieci (level > 0) — subtelne tlo zeby odroznic od level 0 -- */
tr[data-dfx-level="1"] { background: #FAFCFF !important; }
tr[data-dfx-level="2"] { background: #F5F9FF !important; }
tr[data-dfx-level="3"] { background: #F0F5FF !important; }

/* ==========================================================================
   Sekcja: dFLEX General (body.project-dflex-general) - ograniczenia projektu
   Scope wylacznie do projektu o identyfikatorze "dflex-general".
   ========================================================================== */

/* Ukrycie boksu "Uczestnicy" (Members) na przegladzie projektu - dla wszystkich,
   w tym admina. Lista czlonkow pozostaje dostepna w Ustawienia -> Czlonkowie. */
body.project-dflex-general div.members.box {
  display: none !important;
}
