/* ==========================================================================
   VISIO COMMUNIS - Light Sandstone Theme (Autentični samostanski Grb iz GRB2.pdf)
   ========================================================================== */

:root {
  /* Fonts */
  --font-heading: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Theme Tokens - Light Sandstone Parchment */
  --bg-body: #F7F5F0;
  --bg-card: #FFFFFF;
  --bg-card-hover: #FCFAF6;
  --bg-header: rgba(255, 255, 255, 0.98);

  --text-main: #1F1D1A;
  --text-muted: #6B645A;
  --text-light: #948C80;

  --border-color: #E6E1D7;
  --border-light: #F0EDE6;

  /* Accents */
  --accent-gold: #B87B28;
  --accent-gold-light: #FAF4EB;
  --accent-olive: #3D5A45;
  --accent-olive-light: #EBF2EC;
  --accent-stone: #5C5549;

  /* Status Colors */
  --status-in-progress: #3D5A45;
  --status-in-progress-bg: #EBF2EC;
  --status-planned: #B87B28;
  --status-planned-bg: #FAF4EB;
  --status-completed: #4A5568;
  --status-completed-bg: #EDF2F7;

  /* Liturgical Colors (prema šifraniku lookup_liturgical_colors) */
  --color-liturgy-white: #F8FAF9;
  --color-liturgy-red: #C96B6B;
  --color-liturgy-green: #7B9982;
  --color-liturgy-pink: #D88B9E;
  --color-liturgy-purple: #8A7B99;
  --color-liturgy-black: #4A4640;

  /* Shadows & Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 2px 8px rgba(31, 29, 26, 0.04);
  --shadow-md: 0 8px 24px rgba(31, 29, 26, 0.06);
  --transition: all 0.25s ease;
}

/* ========================================================================== */
/* T-05 — STRUKTURIRANE @ POVEZNICE                                         */
/* ========================================================================== */

.mention-rich-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.entity-reference-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 100%;
  margin: 0 0.08rem;
  padding: 0.12rem 0.42rem;
  border: 1px solid color-mix(in srgb, var(--accent-olive) 34%, var(--border-light));
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent-olive) 10%, var(--bg-card));
  color: var(--text-main);
  font: inherit;
  line-height: 1.35;
  vertical-align: baseline;
  text-align: left;
  text-decoration: none;
}

button.entity-reference-chip {
  cursor: pointer;
}

button.entity-reference-chip:hover,
button.entity-reference-chip:focus-visible {
  border-color: var(--accent-olive);
  background: color-mix(in srgb, var(--accent-olive) 17%, var(--bg-card));
  outline: none;
}

.entity-reference-chip.is-archived {
  border-style: dashed;
  color: var(--text-muted);
}

.entity-reference-chip.is-unavailable {
  border-color: var(--border-light);
  background: var(--bg-card-hover);
  color: var(--text-muted);
}

.entity-reference-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.entity-reference-status,
.entity-picker-status {
  flex: 0 0 auto;
  padding: 0.06rem 0.32rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text-muted) 12%, transparent);
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.mention-composer-input {
  position: relative;
  flex: 1 1 18rem;
  min-width: 0;
}

.mention-composer-hint {
  display: block;
  margin-top: 0.35rem;
  color: var(--text-muted);
  font-size: 0.76rem;
}

.entity-picker {
  display: grid;
  gap: 0.25rem;
  max-height: 15rem;
  margin-top: 0.35rem;
  padding: 0.35rem;
  overflow-y: auto;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  background: var(--bg-card);
  box-shadow: 0 14px 32px rgba(30, 38, 34, 0.16);
}

.entity-picker[hidden] {
  display: none;
}

.entity-picker-option {
  display: grid;
  grid-template-columns: minmax(5.4rem, auto) minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.58rem 0.65rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text-main);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.entity-picker-option:hover,
.entity-picker-option.is-active {
  border-color: color-mix(in srgb, var(--accent-olive) 30%, var(--border-light));
  background: color-mix(in srgb, var(--accent-olive) 9%, var(--bg-card));
}

.entity-picker-kind {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.entity-picker-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entity-picker-feedback {
  padding: 0.7rem;
  color: var(--text-muted);
  font-size: 0.86rem;
}

.entity-picker-feedback.is-error {
  color: var(--color-danger, #a53b3b);
}

.mention-target-highlight {
  animation: mention-target-pulse 1.8s ease-out;
}

@keyframes mention-target-pulse {
  0%, 35% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-olive) 34%, transparent); }
  100% { box-shadow: 0 0 0 0 transparent; }
}

@media (max-width: 520px) {
  .add-note-box.mention-composer {
    align-items: stretch;
    flex-direction: column;
  }

  .add-note-box.mention-composer > .btn {
    width: 100%;
  }

  .entity-picker {
    max-height: 12rem;
  }

  .entity-picker-option {
    grid-template-columns: 1fr auto;
  }

  .entity-picker-kind {
    grid-column: 1 / -1;
  }

  .entity-reference-chip {
    max-width: calc(100vw - 4rem);
  }
}

/* ========================================================================== */
/* ETAPA 3A v5.5.0 — OSOBNI DASHBOARD I PORUKE NA STOLU                      */
/* ========================================================================== */

.dashboard-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: nowrap;
}

.settings-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: var(--accent-olive);
  line-height: 1;
  cursor: pointer;
  transition: var(--transition);
}

.settings-icon-button:hover {
  background: transparent;
  color: var(--accent-gold);
}

.settings-icon-svg {
  display: block;
  width: 28px;
  height: 28px;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.settings-icon-button:hover .settings-icon-svg {
  transform: rotate(180deg);
}

.settings-icon-button:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.dashboard-personal-sections {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.dashboard-personal-section {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.dashboard-personal-section[hidden],
.dashboard-widget-card[hidden] {
  display: none !important;
}

.dashboard-board-section {
  align-self: stretch;
  width: 100%;
  max-width: none;
}

.dashboard-board-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.8fr);
  min-height: 410px;
}

.dashboard-board-messages {
  min-width: 0;
  border-right: 1px solid var(--border-light);
}

.board-live-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  align-self: stretch;
  gap: 10px;
}

.dashboard-section-heading,
.board-live-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px 17px;
  border-bottom: 1px solid var(--border-light);
}

.dashboard-section-heading h3,
.board-live-header h3 {
  margin: 2px 0 4px;
  color: var(--text-main);
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
}

.dashboard-section-heading p,
.board-live-header p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.board-live-header h3 {
  font-size: 1.65rem;
  letter-spacing: 0.04em;
}

.board-attachments-panel {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 18px;
  min-width: 0;
  padding: 22px 24px 24px;
  background: linear-gradient(145deg, rgba(184, 123, 40, 0.035), rgba(91, 107, 79, 0.025));
}

.board-attachments-heading h3 {
  margin: 2px 0 4px;
  color: var(--text-main);
  font-family: var(--font-heading);
  font-size: 1.35rem;
}

.board-attachments-heading p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.board-dropzone-mockup {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 9px;
  min-height: 250px;
  border: 2px dashed rgba(91, 107, 79, 0.32);
  border-radius: var(--radius-md);
  padding: 28px 20px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--text-muted);
  text-align: center;
}

.board-dropzone-mockup strong {
  max-width: 260px;
  color: var(--text-main);
  font-family: var(--font-heading);
  font-size: 1rem;
}

.board-dropzone-mockup > span:not(.board-mockup-badge) {
  max-width: 280px;
  font-size: 0.76rem;
  line-height: 1.5;
}

.board-dropzone-icon {
  width: 46px;
  height: 46px;
  margin-bottom: 4px;
  color: var(--accent-olive);
}

.board-mockup-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  border: 1px solid rgba(184, 123, 40, 0.26);
  border-radius: 999px;
  padding: 4px 7px;
  background: var(--accent-gold-light);
  color: var(--accent-gold);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.board-file-type-list {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.board-file-type-list span {
  border: 1px solid var(--border-light);
  border-radius: 999px;
  padding: 4px 7px;
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.6rem;
  font-weight: 750;
}

.board-section-settings-modal {
  width: min(92vw, 540px);
}

.board-settings-placeholder {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin: 0 24px 10px;
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 28px 20px;
  background: rgba(91, 107, 79, 0.035);
  color: var(--text-muted);
  text-align: center;
}

.board-settings-placeholder strong {
  color: var(--text-main);
  font-family: var(--font-heading);
}

.board-settings-placeholder span {
  max-width: 390px;
  font-size: 0.8rem;
  line-height: 1.5;
}

.board-settings-placeholder-symbol {
  color: var(--accent-gold);
  font-size: 1.4rem;
}

.board-eyebrow {
  display: block;
  color: var(--accent-gold);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.dashboard-gadgets-section .dashboard-widgets-layout {
  display: grid;
  gap: 24px;
  padding: 18px;
}

.dashboard-gadgets-section .dashboard-widgets-grid {
  justify-self: center;
  margin: 0;
}

.dashboard-gadgets-section .dashboard-widgets-grid[hidden] {
  display: none !important;
}

.dashboard-gadgets-empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-height: 190px;
  padding: 28px 18px;
  color: var(--text-muted);
  text-align: center;
}

.dashboard-gadgets-empty[hidden] {
  display: none !important;
}

.dashboard-gadgets-empty strong {
  color: var(--text-main);
  font-family: var(--font-heading);
  font-size: 1.05rem;
}

.dashboard-gadgets-empty span {
  max-width: 420px;
  font-size: 0.82rem;
}

.dashboard-gadgets-empty .btn {
  margin-top: 8px;
}

.dashboard-gadgets-empty-symbol {
  color: var(--accent-gold);
  font-size: 1.5rem;
}

.form-group[hidden] {
  display: none !important;
}

.form-row > .form-group.form-group-wide {
  grid-column: 1 / -1;
}

.project-initiative-context {
  min-height: 46px;
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border: 1px solid rgba(184, 123, 40, 0.32);
  border-radius: var(--radius-sm);
  background: rgba(184, 123, 40, 0.08);
  color: var(--text-main);
  font-weight: 700;
}

.board-new-message {
  flex: 0 0 auto;
}

.board-live-body {
  padding: 18px;
  background: linear-gradient(180deg, rgba(245, 241, 232, 0.36), rgba(255, 255, 255, 0));
}

.board-pinned-list {
  display: grid;
  gap: 12px;
  margin-bottom: 15px;
}

.board-regular-list {
  display: grid;
  gap: 11px;
  max-height: 450px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-inline: 5px;
  scrollbar-color: rgba(31, 81, 117, 0.35) transparent;
  scrollbar-width: thin;
}

.board-regular-list.is-empty {
  max-height: none;
  overflow: visible;
  padding-inline: 0;
}

.board-post-card {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin-inline: auto;
  box-sizing: border-box;
  padding: 17px 18px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  box-shadow: 0 4px 14px rgba(22, 51, 73, 0.045);
}

.board-post-card.is-pinned {
  border-color: rgba(197, 155, 39, 0.5);
  border-left: 4px solid var(--accent-gold);
  background: linear-gradient(115deg, rgba(255, 249, 229, 0.96), var(--bg-card));
}

.board-post-pin-label {
  margin-bottom: 10px;
  color: #8b6d28;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.09em;
}

.board-post-topline,
.board-post-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.board-post-author {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.board-author-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-olive);
}

.board-post-title {
  margin: 10px 0 6px;
  color: var(--text-main);
  font-family: var(--font-serif);
  font-size: 1.15rem;
  line-height: 1.25;
}

.board-post-content {
  margin-top: 9px;
  color: var(--text-main);
  font-size: 0.91rem;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.board-post-meta {
  align-items: flex-end;
  margin-top: 13px;
  color: var(--text-muted);
  font-size: 0.7rem;
}

.board-post-expiry {
  color: #876b2d;
  font-weight: 700;
  text-align: right;
}

.board-empty-state {
  display: grid;
  place-items: center;
  min-height: 190px;
  padding: 28px;
  color: var(--text-muted);
  text-align: center;
}

.board-empty-state strong {
  margin: 8px 0 4px;
  color: var(--text-main);
  font-family: var(--font-serif);
  font-size: 1.15rem;
}

.board-empty-symbol {
  color: var(--accent-gold);
  font-size: 1.5rem;
}

.board-show-older {
  display: block;
  width: 100%;
  margin-top: 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px;
  background: var(--bg-card);
  color: var(--accent-olive);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.board-editor-modal,
.dashboard-settings-modal,
.superior-unlock-modal {
  position: relative;
  width: min(92vw, 650px);
}

.superior-unlock-modal {
  width: min(92vw, 470px);
}

.board-editor-heading {
  padding-right: 38px;
  margin-bottom: 24px;
}

.board-editor-heading h2 {
  margin: 6px 0 0;
}

.board-editor-form,
.dashboard-settings-modal form,
.superior-unlock-modal form {
  padding: 0 24px 24px;
}

.board-editor-form .form-group {
  margin-bottom: 22px;
}

.board-editor-form .form-group label {
  margin-bottom: 8px;
  line-height: 1.35;
}

.board-editor-form .optional-label {
  margin-left: 0.35em;
  font-style: italic;
}

.board-editor-form .modal-footer {
  margin-top: 4px;
}

.board-character-count {
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 0.7rem;
  text-align: right;
}

.board-expiry-field small {
  display: block;
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 0.72rem;
}

.board-form-error {
  margin: 12px 0;
  border: 1px solid rgba(166, 68, 68, 0.35);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  background: rgba(166, 68, 68, 0.08);
  color: #8f3434;
  font-size: 0.78rem;
}

.board-editor-actions {
  flex-wrap: wrap;
}

.dashboard-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.dashboard-settings-grid-single {
  grid-template-columns: minmax(0, 1fr);
}

.dashboard-settings-fieldset {
  display: grid;
  gap: 9px;
  align-content: start;
  min-width: 0;
  margin: 0 0 16px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px;
}

.dashboard-settings-fieldset legend {
  padding: 0 6px;
  color: var(--text-main);
  font-size: 0.78rem;
  font-weight: 800;
}

.dashboard-order-option,
.dashboard-widget-option {
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 10px 11px;
  cursor: pointer;
}

.dashboard-order-option input,
.dashboard-widget-option input {
  accent-color: var(--accent-olive);
}

.dashboard-order-option span {
  display: grid;
  gap: 2px;
}

.dashboard-order-option small {
  color: var(--text-muted);
  font-size: 0.7rem;
}

.dashboard-widget-option {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 6px 7px 6px 11px;
  color: var(--text-main);
  font-size: 0.84rem;
  font-weight: 650;
  cursor: default;
}

.dashboard-widget-order-list { display: grid; gap: 8px; }
.dashboard-widget-toggle { display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 34px; cursor: pointer; }
.dashboard-widget-toggle span { min-width: 0; overflow-wrap: anywhere; }
.dashboard-widget-toggle input { flex: 0 0 auto; margin: 0; }
.dashboard-widget-order-controls { display: flex; align-items: center; gap: 3px; }
.dashboard-widget-move,
.dashboard-widget-drag-handle { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid transparent; border-radius: 8px; padding: 0; background: transparent; color: var(--text-muted); cursor: pointer; }
.dashboard-widget-move:hover:not(:disabled),
.dashboard-widget-drag-handle:hover { border-color: var(--border-light); background: var(--bg-card-hover); color: var(--accent-olive); }
.dashboard-widget-move:focus-visible,
.dashboard-widget-drag-handle:focus-visible { outline: 2px solid var(--accent-gold); outline-offset: 2px; }
.dashboard-widget-move:disabled { opacity: 0.25; cursor: default; }
.dashboard-widget-move svg,
.dashboard-widget-drag-handle svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dashboard-widget-drag-handle { cursor: grab; touch-action: none; }
.dashboard-widget-drag-handle:active { cursor: grabbing; }
.dashboard-widget-drag-handle svg circle { fill: currentColor; stroke: none; }
.dashboard-widget-option.is-dragging { opacity: 0.48; }
.dashboard-widget-option.is-drop-before::before,
.dashboard-widget-option.is-drop-after::after { content: ''; position: absolute; right: 8px; left: 8px; height: 3px; border-radius: 999px; background: var(--accent-gold); box-shadow: 0 0 0 2px var(--bg-card); }
.dashboard-widget-option.is-drop-before::before { top: -6px; }
.dashboard-widget-option.is-drop-after::after { bottom: -6px; }

@media (max-width: 760px) {
  .dashboard-header-bar,
  .dashboard-section-heading,
  .board-live-header {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-header-actions {
    align-items: center;
    justify-content: flex-end;
    width: 100%;
  }

  .dashboard-gadgets-section .dashboard-section-heading {
    align-items: flex-start;
    flex-direction: row;
  }

  .dashboard-board-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-board-messages {
    border-right: 0;
    border-bottom: 1px solid var(--border-light);
  }

  .board-live-actions {
    align-items: flex-end;
    justify-content: flex-start;
    width: 100%;
  }

  .board-new-message {
    align-self: flex-end;
  }
}

@media (max-width: 640px) {
  .dashboard-personal-sections {
    gap: 16px;
  }

  .dashboard-section-heading,
  .board-live-header {
    padding: 18px;
  }

  .board-live-body {
    padding: 12px;
  }

  .board-attachments-panel {
    padding: 18px;
  }

  .board-dropzone-mockup {
    min-height: 210px;
  }

  .board-settings-placeholder {
    margin-inline: 16px;
  }

  .board-regular-list {
    max-height: none;
    overflow: visible;
    padding-inline: 0;
  }

  .board-post-card {
    padding: 15px;
  }

  .board-post-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .board-post-expiry {
    text-align: left;
  }

  .dashboard-gadgets-section .dashboard-widgets-layout {
    padding: 12px;
    gap: 16px;
  }

  .dashboard-gadgets-section .dashboard-widgets-grid {
    grid-template-columns: 1fr;
  }

  .board-editor-form,
  .dashboard-settings-modal form,
  .superior-unlock-modal form {
    padding: 0 16px 18px;
  }
}

.environment-banner {
  position: sticky;
  top: 0;
  z-index: 10000;
  padding: 0.45rem 1rem;
  background: #8b1e1e;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: center;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body.cokovac-light {
  font-family: var(--font-body);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ==========================================================================
   MONASTERY PROTECTED LOGIN GATEKEEPER (SINGLE MASTER PASSWORD FOR BROTHERS)
   ========================================================================== */
.login-gatekeeper-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(31, 29, 26, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.login-gatekeeper-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.login-gatekeeper-card {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  width: 100%;
  max-width: 440px;
  padding: 36px 32px;
  text-align: center;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gatekeeper-crest {
  width: 64px;
  height: 64px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gatekeeper-logo {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.12));
}

.gatekeeper-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-main);
  line-height: 1.1;
  margin-bottom: 4px;
}

.gatekeeper-sub {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.gatekeeper-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--accent-gold);
  background: var(--accent-gold-light);
  border: 1px solid rgba(184, 123, 40, 0.3);
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 24px;
}

.lock-icon {
  width: 14px;
  height: 14px;
  stroke: var(--accent-gold);
}

.gatekeeper-form {
  width: 100%;
  text-align: left;
}

.gatekeeper-remember {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: -2px 0 14px;
  color: var(--text-muted);
  font-size: 0.84rem;
  cursor: pointer;
}

.gatekeeper-remember input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--accent-gold);
}

.login-error-msg {
  background: rgba(197, 48, 48, 0.08);
  border: 1px solid rgba(197, 48, 48, 0.3);
  color: #C53030;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  text-align: center;
}

.btn-block {
  width: 100%;
  justify-content: center;
  padding: 11px 20px;
  font-size: 0.92rem;
}

/* NOTIFICATIONS BELL & DROPDOWN PANEL */
.notifications-wrapper {
  position: relative;
  display: inline-block;
}

.btn-notif {
  padding: 7px 12px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notif-bell-icon {
  width: 17px;
  height: 17px;
  stroke: currentColor;
}

.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--accent-gold);
  color: #FFFFFF;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 10px;
  border: 2px solid #FFFFFF;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(184, 123, 40, 0.35);
}

.notif-dropdown-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 360px;
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 36px rgba(31, 29, 26, 0.15);
  z-index: 500;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.notif-dropdown-panel.open {
  display: flex;
}

.notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--bg-body);
  border-bottom: 1px solid var(--border-color);
}

.notif-header h4 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
}

.btn-clear-notif {
  background: transparent;
  border: none;
  color: var(--accent-gold);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.btn-clear-notif:hover {
  text-decoration: underline;
}

.notif-list {
  max-height: 340px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.notif-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.84rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  gap: 12px;
}

.notif-item:last-child {
  border-bottom: none;
}

.notif-item:hover {
  background: var(--accent-gold-light);
}

@keyframes ringBell {
  0% { transform: rotate(0deg); }
  15% { transform: rotate(15deg) scale(1.1); }
  30% { transform: rotate(-15deg) scale(1.1); }
  45% { transform: rotate(10deg) scale(1.1); }
  60% { transform: rotate(-10deg) scale(1.1); }
  75% { transform: rotate(5deg); }
  90% { transform: rotate(-5deg); }
  100% { transform: rotate(0deg); }
}

.notif-ring {
  animation: ringBell 1.6s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.notif-item.unread,
.notif-item-unread {
  background: rgba(250, 244, 235, 0.65);
  border-left: 3px solid var(--accent-gold);
  font-weight: 500;
}

.notif-item.read {
  opacity: 0.72;
}

.notif-icon-box,
.notif-icon-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-body);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notif-icon-box svg,
.notif-icon-circle svg {
  width: 16px;
  height: 16px;
  stroke: var(--accent-gold);
}

.notif-body,
.notif-item-body {
  flex: 1;
  min-width: 0;
}

.notif-title {
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.notif-title-ref {
  font-weight: 700;
  font-size: 0.78rem;
  color: #b45309;
  margin-top: 2px;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notif-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.notif-author {
  font-weight: 700;
  color: var(--text-main);
}

/* BADGE NOVO ON PROJECT CARDS */
.badge-novo {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 10px;
  background: var(--accent-gold);
  color: #FFFFFF;
  letter-spacing: 0.04em;
  margin-left: 6px;
  display: inline-block;
  vertical-align: middle;
}

.btn-lock {
  padding: 7px 12px;
  font-size: 0.82rem;
}

.btn-lock svg {
  width: 15px;
  height: 15px;
}

/* HEADER (AUTENTIČNI GRB IZ GRB2.PDF S LIJEVE STRANE) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-header);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 28px;
}

.header-container {
  max-width: 1360px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand-crest-left {
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-crest-img {
  height: 66px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(184, 123, 40, 0.22)) drop-shadow(0 2px 5px rgba(0, 0, 0, 0.15));
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease;
}

.header-crest-img:hover {
  transform: scale(1.06) translateY(-1px);
  filter: drop-shadow(0 8px 18px rgba(184, 123, 40, 0.35)) drop-shadow(0 3px 6px rgba(0, 0, 0, 0.18));
}

.brand-divider {
  width: 2px;
  height: 52px;
  background: linear-gradient(180deg, rgba(184, 123, 40, 0.04) 0%, rgba(184, 123, 40, 0.75) 50%, rgba(184, 123, 40, 0.04) 100%);
  border-radius: 2px;
  margin: 0 4px;
  box-shadow: 0 0 8px rgba(184, 123, 40, 0.25);
}

.brand-text-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: max-content;
  max-width: 100%;
  padding-bottom: 17px;
}

.brand-institution-tag {
  font-family: var(--font-body);
  font-size: 0.67rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 3px;
  line-height: 1;
  opacity: 0.9;
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 1.88rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #1A1612;
  line-height: 1.02;
  text-transform: uppercase;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
  margin: 0;
  white-space: nowrap;
}

.brand-subtitle {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: auto;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 0.72rem;
  color: #9C6C26;
  letter-spacing: 0.12em;
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
}

.brand-motto-reference {
  flex: 0 0 auto;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}

/* CENTERED TABULA LINK BUTTON */
.header-center-nav {
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-tabula {
  background: var(--accent-gold-light);
  color: var(--accent-gold);
  border: 1.5px solid rgba(184, 123, 40, 0.4);
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
  box-shadow: 0 2px 6px rgba(184, 123, 40, 0.08);
}

.btn-tabula:hover {
  background: var(--accent-gold);
  color: #FFFFFF;
  border-color: var(--accent-gold);
  box-shadow: 0 4px 14px rgba(184, 123, 40, 0.25);
  transform: translateY(-1px);
}

.tabula-icon {
  width: 17px;
  height: 17px;
  stroke: currentColor;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 14px;
}

.search-box {
  position: relative;
  width: 260px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-light);
}

.search-box input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: #FFFFFF;
  color: var(--text-main);
  font-size: 0.85rem;
  font-family: inherit;
  transition: var(--transition);
}

.search-box input:focus {
  outline: none;
  border-color: var(--accent-gold);
}

.user-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.user-selector select {
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: #FFFFFF;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
}

/* SYNC STATUS BADGE IN HEADER (ICON ONLY FOR SPACE SAVING) */
.sync-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-muted);
  transition: all 0.3s ease;
  user-select: none;
  cursor: help;
}

.sync-status-badge .sync-label {
  display: none;
}

.sync-status-badge .sync-icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  stroke: currentColor;
}

.sync-status-badge.synced {
  border-color: rgba(72, 187, 120, 0.4);
  color: #2F855A;
  background: rgba(72, 187, 120, 0.08);
}

.sync-status-badge.saving {
  border-color: rgba(237, 137, 54, 0.4);
  color: #C05621;
  background: rgba(237, 137, 54, 0.08);
}

.sync-status-badge.saving .sync-spinning {
  animation: sync-spin 1.2s linear infinite;
}

.sync-status-badge.error {
  border-color: rgba(245, 101, 101, 0.4);
  color: #C53030;
  background: rgba(245, 101, 101, 0.08);
}

@keyframes sync-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn-primary {
  background: var(--accent-gold);
  color: #FFFFFF;
}

.btn-primary:hover {
  background: #A06B20;
}

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

.btn-secondary:not(:disabled):hover {
  background: var(--accent-gold-light);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

/* STRATEGIC HERO SECTION - ELEGANT WARM SANDSTONE PARCHMENT */
.strategic-section {
  background: linear-gradient(180deg, #EFEAE0 0%, #E5DDD0 100%);
  border-top: 1px solid rgba(184, 123, 40, 0.15);
  border-bottom: 1px solid #E0D7C8;
  padding: 36px 28px;
  box-shadow: inset 0 2px 8px rgba(31, 29, 26, 0.03);
}

.hero-container {
  max-width: 1360px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* PROMINENT PROJECTS SEARCH BAR */
.projects-search-row {
  width: min(66.666%, 820px);
  margin: 0 auto 20px;
}

.hero-search-wrapper {
  width: 100%;
  max-width: 820px;
  margin: 0 auto 6px auto;
}

.prominent-search-box {
  position: relative;
  width: 100%;
}

.prominent-search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--accent-gold);
  pointer-events: none;
  transition: var(--transition);
}

.prominent-search-box input {
  width: 100%;
  padding: 14px 20px 14px 50px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: #FFFFFF;
  color: var(--text-main);
  font-size: 0.96rem;
  font-family: inherit;
  box-shadow: 0 3px 12px rgba(31, 29, 26, 0.04);
  transition: var(--transition);
}

@media (max-width: 680px) {
  .projects-search-row { width: 100%; }
}

.prominent-search-box input:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 4px var(--accent-gold-light), 0 4px 16px rgba(184, 123, 40, 0.12);
}

.section-intro {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 8px auto;
}

.badge-prominent {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  padding: 4px 14px;
  border-radius: 20px;
  background: var(--accent-gold-light);
  color: var(--accent-gold);
  border: 1px solid rgba(184, 123, 40, 0.3);
  margin-bottom: 8px;
  text-transform: lowercase;
}

.section-intro h2 {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.2;
}

.section-intro p {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* FLAGSHIP CARD BASE */
.flagship-card {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 28px 30px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
}

.flagship-top-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.flagship-identity {
  display: flex;
  align-items: center;
  gap: 16px;
}

.flagship-crest-box {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: var(--bg-body);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  flex-shrink: 0;
}

/* EMBLEM 900 SANS-SERIF TYPOGRAPHY LOGO */
.flagship-crest-box.emblem-900 {
  background: var(--accent-gold-light);
  border: 1.5px solid var(--accent-gold);
  box-shadow: 0 2px 6px rgba(184, 123, 40, 0.12);
}

.emblem-number {
  font-family: var(--font-body);
  /* PLUS JAKARTA SANS - SANS SERIF! */
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--accent-gold);
  line-height: 1;
  letter-spacing: -0.03em;
}

.flagship-logo-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.flagship-sub-tag {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent-gold);
  display: block;
}

.flagship-identity h3 {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.2;
}

.flagship-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.owner-pill {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--bg-body);
  padding: 4px 12px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.flagship-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 22px;
}

/* ==========================================================================
   SYNCHRONIZED INTERACTIVE RIBBON TIMELINE & GLASS PARCHMENT PANELS
   ========================================================================== */
.ribbon-timeline-wrapper {
  position: relative;
  background: var(--bg-body);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px 20px 24px 20px;
  margin-top: 10px;
}

/* TRACK BAR CENTERED AT EXACT Y=46px (padding 24px + 22px center - 3px half track) */
.ribbon-track-bar {
  position: absolute;
  top: 43px;
  left: 9%;
  right: 9%;
  height: 6px;
  background: #E6E1D7;
  border-radius: 3px;
  display: flex;
  overflow: hidden;
  z-index: 1;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
}

.ribbon-segment.completed-segment {
  background: #f3dcae;
}

.ribbon-segment.active-segment {
  background: linear-gradient(90deg, #E5C88F 0%, var(--accent-gold) 60%);
}

.ribbon-segment.future-segment {
  background: repeating-linear-gradient(45deg,
      #E6E1D7,
      #E6E1D7 8px,
      #F0EDE6 8px,
      #F0EDE6 16px);
}

.ribbon-stations-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  position: relative;
  z-index: 2;
}

/* SYNCHRONIZED INTERACTIVE STATION GROUP CONTAINER */
.ribbon-station-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
}

.station-node-box {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.station-node {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  transition: var(--transition);
}

.station-node.completed-node {
  background: #D9A95C;
  border-color: var(--accent-gold);
  color: #FFFFFF;
}

.station-node.completed-node svg {
  width: 16px;
  height: 16px;
  stroke: #FFFFFF;
}

.station-node.active-node {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
  color: #FFFFFF;
  box-shadow: 0 0 0 5px var(--accent-gold-light), 0 4px 12px rgba(184, 123, 40, 0.3);
}

.inner-pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #FFFFFF;
}

.station-node.future-node {
  background: #FFFFFF;
  border-color: var(--border-color);
}

.station-node.climax-node {
  width: 40px;
  height: 40px;
  background: var(--accent-gold-light);
  border: 2px solid var(--accent-gold);
  color: var(--accent-gold);
  box-shadow: 0 0 14px rgba(184, 123, 40, 0.3);
}

.station-node.climax-node svg {
  width: 20px;
  height: 20px;
}

/* SEMI-TRANSPARENT GLASS PARCHMENT LABEL CARDS */
.station-label-card {
  width: 100%;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(230, 225, 215, 0.85);
  border-radius: var(--radius-sm);
  padding: 10px 8px;
  margin-top: 10px;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.station-label-card.active-card {
  background: rgba(250, 244, 235, 0.85);
  border-color: rgba(184, 123, 40, 0.4);
}

.station-label-card.climax-card {
  background: rgba(250, 244, 235, 0.9);
  border-color: rgba(184, 123, 40, 0.5);
}

/* SYNCHRONIZED HOVER EFFECT: HOVERING CIRCLE OR CARD HIGHLIGHTS BOTH SIMULTANEOUSLY! */
.ribbon-station-group:hover .station-node {
  transform: scale(1.15);
  border-color: var(--accent-gold);
  box-shadow: 0 4px 14px rgba(184, 123, 40, 0.3);
}

.ribbon-station-group:hover .station-label-card {
  background: rgba(255, 255, 255, 0.98);
  border-color: var(--accent-gold);
  box-shadow: 0 6px 18px rgba(184, 123, 40, 0.18);
  transform: translateY(-3px);
}

.station-year {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1;
}

.active-yr {
  color: var(--accent-gold);
}

.station-name {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-main);
  margin-top: 4px;
}

.station-status {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.completed-txt {
  color: var(--accent-gold);
  font-weight: 600;
}

.active-txt {
  color: var(--accent-gold);
  font-weight: 700;
}

.climax-yr,
.climax-nm,
.climax-st {
  color: var(--accent-gold);
  font-weight: 700;
}

/* MILESTONES GRID FOR INICIJATIVA II */
.milestones-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.milestone-card {
  background: var(--bg-body);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 18px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.milestone-card:hover {
  border-color: var(--accent-gold);
}

.milestone-card.active-milestone {
  border: 1.5px solid var(--accent-gold);
  background: var(--accent-gold-light);
}

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

.milestone-step-tag {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent-gold);
}

.milestone-status-pill {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
}

.milestone-status-pill.in-prog {
  background: var(--status-in-progress-bg);
  color: var(--status-in-progress);
}

.milestone-status-pill.plan {
  background: #FFFFFF;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

.milestone-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.25;
  margin-bottom: 6px;
}

.user-selector span {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.logged-user-display {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-main);
  background: var(--accent-gold-light);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(184, 123, 40, 0.25);
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
}

.logged-user-display:hover {
  border-color: rgba(184, 123, 40, 0.48);
  background: rgba(184, 123, 40, 0.16);
}

.logged-user-display:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 2px;
}

.user-icon {
  width: 18px;
  height: 18px;
  stroke: var(--accent-gold);
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

.active-brother-name {
  color: var(--text-main);
  font-weight: 700;
}

.user-settings-chevron {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  flex: 0 0 auto;
}

.milestone-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.milestone-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-light);
  padding-top: 8px;
}

.link-detail {
  font-weight: 700;
  color: var(--accent-gold);
}

/* MAIN CONTAINER & TOOLBAR */
.main-container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 32px 28px;
  flex: 1;
  width: 100%;
}

.content-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

/* TAB BUTTONS WRAPPER & IDENTICAL BUTTON STYLING WITH VISUAL SEPARATION */
.tab-buttons-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tab-standalone-container,
.tab-buttons-group {
  display: flex;
  gap: 6px;
  background: #FFFFFF;
  padding: 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.tab-btn {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

.tab-btn:hover {
  color: var(--accent-gold);
}

.tab-btn.active {
  background: var(--accent-gold-light);
  color: var(--accent-gold);
  font-weight: 700;
}

/* HIGH-CONTRAST NUMERIC BADGES */
.badge-count {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  background: var(--bg-body);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  line-height: 1.2;
}

.tab-btn.active .badge-count {
  background: var(--accent-gold);
  color: #FFFFFF;
  border-color: var(--accent-gold);
}

.view-switches {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.view-switches select {
  appearance: none;
  -webkit-appearance: none;
  min-width: 150px;
  padding: 8px 38px 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background-color: rgba(255, 253, 249, 0.92);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23756f66' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.view-switches select:hover {
  border-color: rgba(184, 123, 40, 0.42);
  background-color: #fffdf9;
}

.view-switches select:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px var(--accent-gold-light);
}

/* MONOCHROME SVG INLINE ICONS */
.svg-inline-icon {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  vertical-align: middle;
  display: inline-block;
  opacity: 0.75;
}

.card-notes-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* TIME FRAME BADGE / PILL */
.time-frame-pill {
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--bg-body);
  border: 1px solid var(--border-color);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* TAG PILLS */
.tag-pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent-gold);
  background: var(--accent-gold-light);
  border: 1px solid rgba(184, 123, 40, 0.25);
  padding: 2px 8px;
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition);
}

.tag-pill:hover {
  background: var(--accent-gold);
  color: #FFFFFF;
}

/* PROJECTS GRID */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 24px;
}

/* PROJECT CARD */
.project-card {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
  cursor: pointer;
}

.project-card:hover {
  border-color: var(--accent-gold);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.card-category-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 10px;
  background: var(--bg-body);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

.status-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 10px;
}

.status-in_progress {
  background: var(--status-in-progress-bg);
  color: var(--status-in-progress);
}

.status-planned {
  background: var(--status-planned-bg);
  color: var(--status-planned);
}

.status-completed {
  background: var(--status-completed-bg);
  color: var(--status-completed);
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-main);
  margin-bottom: 6px;
}

.card-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 18px;
}

/* PROGRESS BAR */
.progress-container {
  margin-bottom: 16px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.progress-bar-bg {
  height: 5px;
  width: 100%;
  background: var(--bg-body);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--accent-gold);
  border-radius: 3px;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.card-assignee {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-main);
  font-weight: 600;
}

.assignee-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-stone);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
}

/* ATTACHMENTS & DRAG AND DROP STYLING */
.attachments-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.attachment-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-body);
  border: 1px solid var(--border-color);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.attachment-card:hover {
  border-color: var(--accent-gold);
  background: #FFFFFF;
  box-shadow: var(--shadow-sm);
}

.att-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.file-icon {
  width: 24px;
  height: 24px;
  stroke: var(--accent-gold);
  flex-shrink: 0;
}

.att-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
}

.att-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.att-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-att-action {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.btn-att-action svg {
  width: 14px;
  height: 14px;
}

.btn-att-action:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  background: var(--accent-gold-light);
}

.btn-att-action.btn-delete:hover {
  border-color: #C53030;
  color: #C53030;
  background: rgba(197, 48, 48, 0.08);
}

.drop-zone {
  border: 1.5px dashed var(--border-color);
  background: var(--bg-body);
  border-radius: var(--radius-sm);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.drop-zone svg {
  width: 26px;
  height: 26px;
  stroke: var(--accent-gold);
  opacity: 0.8;
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--accent-gold);
  background: var(--accent-gold-light);
  color: var(--text-main);
}

/* EXPANDABLE TASK DRAWER & MARKDOWN EDITOR STYLING */
.checklist-item-wrapper {
  --task-depth: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  margin-left: calc(var(--task-depth) * 28px);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.checklist-item-wrapper[data-task-depth="1"] .checklist-item-editable::before,
.checklist-item-wrapper[data-task-depth="2"] .checklist-item-editable::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: -15px;
  width: 1px;
  background: rgba(184, 123, 40, 0.28);
  pointer-events: none;
}

.checklist-item-wrapper[data-task-depth="2"] .checklist-item-editable::before {
  box-shadow: -28px 0 0 rgba(184, 123, 40, 0.16);
}

.btn-toggle-desc {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  margin-left: auto;
  padding: 0 0 3px;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  transition: var(--transition);
}

.btn-toggle-desc:hover {
  color: var(--accent-gold);
  background: var(--accent-gold-light);
}

.btn-toggle-desc.has-desc {
  color: var(--accent-gold);
}

.task-desc-drawer {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-top: none;
  border-bottom-left-radius: var(--radius-sm);
  border-bottom-right-radius: var(--radius-sm);
  padding: 14px 16px 14px 42px;
  margin-top: -3px;
  margin-bottom: 6px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.task-desc-content {
  font-size: 0.88rem;
  color: var(--text-main);
  line-height: 1.6;
}

.task-desc-check-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 4px 0;
  cursor: pointer;
}
.task-desc-check-item input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 3px 0 0;
  accent-color: var(--accent-gold);
}
.task-desc-check-item input:checked + span {
  color: var(--text-muted);
  text-decoration: line-through;
}

.task-inline-editor-fields {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: end;
  gap: 14px;
  margin-bottom: 10px;
}
.task-inline-title-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: var(--text-muted);
  font-size: .72rem;
  font-weight: 700;
}
.task-inline-title-field input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  background: #fff;
  font: inherit;
  font-size: .88rem;
}
.task-inline-title-field input:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 2px rgba(184,123,40,.1);
}
.task-inline-check-option {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  color: var(--text-muted);
  font-size: .78rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.task-inline-check-option input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent-gold);
}
.task-inline-editor-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.task-desc-h1 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-gold);
  margin: 8px 0 4px 0;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 2px;
}

.task-desc-h2 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-main);
  margin: 6px 0 2px 0;
}

.task-desc-ul,
.task-desc-ol {
  margin-left: 18px;
  margin-top: 4px;
  margin-bottom: 8px;
}

.task-desc-li,
.task-desc-oli {
  margin-bottom: 3px;
}

.editor-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-body);
  padding: 4px 8px;
  border: 1px solid var(--border-color);
  border-top-left-radius: var(--radius-sm);
  border-top-right-radius: var(--radius-sm);
  border-bottom: none;
  flex-wrap: wrap;
}

.toolbar-btn {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
}

.toolbar-btn:hover {
  background: var(--accent-gold-light);
  color: var(--accent-gold);
  border-color: var(--accent-gold);
}

.toolbar-btn.bold-btn {
  font-weight: 900;
}

.toolbar-btn.italic-btn {
  font-style: italic;
}

.task-desc-textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-bottom-left-radius: var(--radius-sm);
  border-bottom-right-radius: var(--radius-sm);
  background: #FFFFFF;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.85rem;
  resize: vertical;
}

.task-desc-textarea:focus {
  outline: none;
  border-color: var(--accent-gold);
}

@media (max-width: 640px) {
  .task-inline-editor-fields { grid-template-columns: 1fr; gap: 6px; }
  .task-inline-check-option { min-height: 30px; }
  .task-inline-editor-actions { flex-wrap: wrap; }
  .task-inline-editor-actions .modal-footer-spacer { display: none; }
  .task-inline-editor-actions .btn-delete-project-discreet { width: 100%; margin-right: auto; }
}

/* MODALS & CHECKLIST DRAG/REORDER */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(18, 16, 14, 0.75);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  width: 100%;
  max-width: 740px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 32px;
  position: relative;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0 0 3px;
  border-radius: 50%;
  background: transparent;
  border: none;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  transition: transform .2s ease, color .18s ease, background-color .18s ease;
}

.modal-close:hover {
  transform: rotate(90deg);
  color: var(--text-main);
  background: var(--bg-body);
}

.checklist-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.checklist-item-editable {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-body);
  border: 1px solid var(--border-light);
  font-size: 0.88rem;
  transition: var(--transition);
  user-select: none;
}

.checklist-item-editable:hover {
  border-color: var(--accent-gold);
  background: #FFFFFF;
  box-shadow: var(--shadow-sm);
}

.task-drag-grip {
  appearance: none;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  margin: -3px 0 -3px -5px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: grab;
  color: var(--text-light);
  font-size: 1rem;
  letter-spacing: -2px;
  line-height: 1;
  padding: 0 2px 0 0;
  user-select: none;
  touch-action: none;
  transition: color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.task-drag-grip:hover,
.task-drag-grip:focus-visible,
.task-drag-grip.is-keyboard-grabbed {
  color: var(--accent-gold);
  background: var(--accent-gold-light);
}

.task-drag-grip:focus-visible,
.task-drag-grip.is-keyboard-grabbed {
  outline: 2px solid rgba(184, 123, 40, 0.45);
  outline-offset: 2px;
}

.task-drag-grip:active,
.is-task-dragging .task-drag-grip {
  cursor: grabbing;
  color: var(--accent-gold);
  transform: scale(1.06);
}

.checklist-container.is-task-sorting {
  user-select: none;
}

.checklist-item-wrapper.is-task-dragging .checklist-item-editable {
  opacity: 0.58;
  transform: scale(0.992);
  box-shadow: var(--shadow-sm);
}

.checklist-item-wrapper.is-task-dragging-child .checklist-item-editable {
  opacity: 0.72;
}

.checklist-item-wrapper.task-drop-before::before,
.checklist-item-wrapper.task-drop-after::after {
  content: "";
  position: absolute;
  z-index: 2;
  left: calc(10px + var(--task-drop-shift, 0px));
  right: 10px;
  height: 3px;
  border-radius: 3px;
  background: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(184, 123, 40, 0.12);
  pointer-events: none;
}

.checklist-item-wrapper.task-drop-before::before {
  top: -4px;
}

.checklist-item-wrapper.task-drop-after::after {
  bottom: -4px;
}

.checklist-item-wrapper.task-drop-invalid::before,
.checklist-item-wrapper.task-drop-invalid::after {
  background: repeating-linear-gradient(90deg, #A64B3C 0 9px, transparent 9px 14px);
  box-shadow: 0 0 0 3px rgba(166, 75, 60, 0.1);
}

.btn-delete-task {
  background: transparent;
  border: none;
  color: var(--text-light);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: var(--transition);
  margin-left: 4px;
}

.btn-delete-task:hover {
  color: #C53030;
  background: rgba(197, 48, 48, 0.08);
}

.add-task-box {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  margin-bottom: 20px;
}

.add-task-box > input[type="text"] {
  flex: 1;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-color);
  background: #FFFFFF;
  color: var(--text-main);
  font-size: 0.85rem;
}

.add-task-box > input[type="text"]:focus {
  outline: none;
  border-style: solid;
  border-color: var(--accent-gold);
}

.new-task-check-option {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  padding: 0 4px;
  color: var(--text-muted);
  font-size: .78rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.new-task-check-option input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent-gold);
  cursor: pointer;
}

.new-project-task-button {
  flex: 0 0 auto;
  justify-content: center;
  min-width: 112px;
  padding: 6px 14px;
  font-size: .82rem;
}

.task-item-title { flex: 1; min-width: 0; }
.checklist-item-wrapper.is-heading .task-item-title { font-weight: 700; }

@media (max-width: 640px) {
  .add-task-box { flex-wrap: wrap; }
  .add-task-box > input[type="text"] { flex-basis: 100%; }
  .new-task-check-option { margin-right: auto; }
}

.modal-header h3 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-main);
}

.modal-header p {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 18px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

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

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-body);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.88rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-gold);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

.modal-detail-title {
  font-family: var(--font-heading);
  font-size: 2.1rem;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 14px;
  color: var(--text-main);
  overflow-wrap: anywhere;
}

.modal-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  background: var(--bg-body);
  padding: 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
  font-size: 0.82rem;
}

.meta-item-label {
  color: var(--text-muted);
  font-size: 0.72rem;
}

.meta-item-value {
  color: var(--text-main);
  font-weight: 600;
}

.modal-section-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-main);
  margin: 20px 0 10px 0;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 6px;
}

.notes-feed {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.note-bubble {
  background: var(--bg-body);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent-gold);
  font-size: 0.85rem;
}

.note-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.btn-delete-note {
  background: transparent;
  border: none;
  padding: 2px 5px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.65;
  transition: all 0.2s ease;
}

.btn-delete-note:hover {
  opacity: 1;
  background: rgba(239, 68, 68, 0.12);
}

.btn-delete-note svg {
  stroke: #ef4444;
  width: 14px;
  height: 14px;
}

.btn-delete-project-discreet {
  background: transparent;
  border: 1px solid var(--border-color);
  color: #dc2626;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  opacity: 0.7;
  transition: all 0.2s ease;
}

.btn-delete-project-discreet:hover {
  opacity: 1;
  background: rgba(220, 38, 38, 0.08);
  border-color: #dc2626;
}

.note-author {
  font-weight: 700;
  color: var(--text-main);
  font-size: 0.78rem;
}

.note-date {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.7rem;
}

.add-note-box {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.add-note-box input {
  flex: 1;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-body);
  color: var(--text-main);
}

/* FOOTER */
.site-footer {
  border-top: 1px solid var(--border-color);
  padding: 24px 28px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  background: #FFFFFF;
  margin-top: auto;
}

.footer-quote {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1rem;
  color: var(--accent-gold);
  margin-top: 4px;
}

/* ==========================================================================
   AUDIT LOG TABLE & STYLES (FAZA 3)
   ========================================================================== */
.audit-log-modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 960px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  padding: 36px 40px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.audit-table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

.audit-log-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.92rem;
  text-align: left;
}

.audit-log-table th {
  background: var(--bg-alt);
  padding: 14px 18px;
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--border-color);
  white-space: nowrap;
}

.audit-log-table td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
  line-height: 1.45;
}

.audit-log-table tbody tr:last-child td {
  border-bottom: none;
}

.audit-log-table tbody tr {
  transition: background-color 0.15s ease;
}

.audit-log-table tbody tr:hover {
  background: var(--bg-hover, rgba(0, 0, 0, 0.035));
}

.audit-time {
  white-space: nowrap;
  font-size: 0.82rem;
}

.audit-brother {
  font-weight: 600;
  color: var(--text-main);
}

.audit-type-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.74rem;
  font-weight: 700;
  background: var(--bg-alt);
  color: var(--text-dark);
  border: 1px solid var(--border-color);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.audit-type-badge.project {
  background: rgba(184, 134, 11, 0.12);
  color: #8c6600;
  border-color: rgba(184, 134, 11, 0.25);
}

.audit-type-badge.task {
  background: rgba(46, 125, 50, 0.12);
  color: #1e5e22;
  border-color: rgba(46, 125, 50, 0.25);
}

.audit-type-badge.note {
  background: rgba(30, 136, 229, 0.12);
  color: #135da4;
  border-color: rgba(30, 136, 229, 0.25);
}

.audit-action {
  font-weight: 600;
  color: var(--text-main);
}

.audit-details {
  color: var(--text-muted);
  font-size: 0.86rem;
  max-width: 280px;
  overflow-wrap: break-word;
}

/* RESPONSIVE */
@media (max-width: 1240px) {
  .site-header {
    padding: 12px 18px;
  }

  .header-container {
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px 16px;
  }

  .header-controls {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
  }
}

@media (max-width: 900px) {
  .ribbon-track-bar {
    display: none;
  }

  .ribbon-stations-grid,
  .milestones-grid {
    grid-template-columns: 1fr;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .brand-title {
    font-size: 1.55rem;
  }

  .brand-subtitle {
    font-size: 0.66rem;
    letter-spacing: 0.1em;
  }

  .search-box {
    width: 100%;
  }

  .flagship-top-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .tab-buttons-wrapper {
    flex-direction: column;
    align-items: stretch;
  }

  .modal-meta-grid {
    grid-template-columns: 1fr 1fr !important;
  }
}

@media (max-width: 680px) {
  .header-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
  }

  .brand {
    justify-content: center;
  }

  .header-controls {
    justify-content: center;
    width: 100%;
  }
}

/* ==========================================================================
   VISIO COMMUNIS - HERO CENTRALNA NAVIGACIJA (APP SWITCHER)
   ========================================================================== */

.hero-switcher-container {
  max-width: 1360px;
  margin: 24px auto 20px;
  padding: 0 28px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 90;
}

.app-switcher {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-alt);
  padding: 6px 8px;
  border-radius: 99px;
  border: 1px solid var(--border-light);
  box-shadow: 0 8px 24px rgba(184, 123, 40, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04), inset 0 1px 2px rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.3s ease;
}

.app-switcher:hover {
  box-shadow: 0 10px 30px rgba(184, 123, 40, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06), inset 0 1px 2px rgba(255, 255, 255, 0.95);
}

.switcher-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 28px;
  border-radius: 99px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.switcher-btn[hidden] {
  display: none !important;
}

.switcher-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.65);
  transform: translateY(-1px);
}

.switcher-btn.active {
  background: #FFFFFF;
  color: var(--text-main);
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(184, 123, 40, 0.18), 0 2px 4px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(184, 123, 40, 0.28);
}

.switcher-icon {
  width: 18px;
  height: 18px;
  opacity: 0.85;
  transition: all 0.25s ease;
}

.switcher-btn:hover .switcher-icon {
  opacity: 1;
  transform: scale(1.08);
}

.switcher-btn.active .switcher-icon {
  stroke: var(--accent-gold);
  opacity: 1;
  transform: scale(1.05);
}

.notifications-nav-badge {
  position: absolute;
  top: 1px;
  right: 8px;
  min-width: 20px;
  padding: 2px 5px;
  border: 2px solid var(--bg-alt);
  border-radius: 999px;
  background: var(--accent-gold);
  color: #fff;
  font-size: .65rem;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}

.notifications-nav-badge[hidden] {
  display: none !important;
}

.notifications-nav-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  padding: 2px 5px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--accent-gold);
  color: #fff;
  box-shadow: 0 2px 6px rgba(184, 123, 40, .35);
  font-size: .65rem;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}

/* RESPONSIVE HERO SWITCHER */
@media (max-width: 680px) {
  .hero-switcher-container {
    margin: 16px auto 14px;
    padding: 0 16px;
  }

  .app-switcher {
    width: 100%;
    max-width: 100%;
    justify-content: space-between;
    gap: 4px;
    padding: 4px 6px;
  }

  .switcher-btn {
    flex: 1;
    padding: 8px 12px;
    font-size: 0.88rem;
    gap: 6px;
  }

  .switcher-icon {
    width: 16px;
    height: 16px;
  }
}

/* ==========================================================================
   VISIO COMMUNIS - SAMOSTANSKI KALENDAR SUČELJE
   ========================================================================== */

.calendar-container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 10px 0 40px 0;
}

.calendar-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding: 0 10px;
}

.calendar-nav-center {
  display: flex;
  align-items: center;
  gap: 12px;
}

.calendar-nav-left,
.calendar-nav-right {
  flex: 1 1 0;
  display: flex;
  align-items: center;
}

.calendar-nav-right {
  justify-content: flex-end;
}

.calendar-liturgy-settings {
  color: var(--accent-olive);
}

.liturgy-data-settings-modal {
  width: min(94vw, 820px);
}

.liturgy-settings-heading {
  padding-right: 40px;
}

.liturgy-settings-heading h2 {
  margin: 6px 0 8px;
}

.liturgy-settings-body {
  display: grid;
  gap: 18px;
  padding: 0 4px 8px;
}

.liturgy-import-year {
  display: grid;
  grid-template-columns: minmax(120px, auto) minmax(120px, 180px);
  align-items: center;
  gap: 14px;
  font-weight: 700;
}

.liturgy-import-status {
  padding: 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-alt);
}

.liturgy-import-status-row {
  display: flex;
  align-items: center;
  gap: 11px;
}

.liturgy-import-status-row div,
.liturgy-import-history {
  display: grid;
  gap: 3px;
}

.liturgy-import-status-row small,
.liturgy-import-history small,
.liturgy-import-history span {
  color: var(--text-muted);
  font-size: 0.74rem;
}

.liturgy-import-status-dot {
  width: 11px;
  height: 11px;
  flex: 0 0 11px;
  border-radius: 50%;
  background: var(--danger, #a33a32);
  box-shadow: 0 0 0 4px rgba(170, 77, 67, 0.1);
}

.liturgy-import-status-dot.is-ready {
  background: var(--accent-olive);
  box-shadow: 0 0 0 4px rgba(93, 112, 75, 0.12);
}

.liturgy-import-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.liturgy-import-facts span {
  padding: 7px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: 0.76rem;
}

.liturgy-import-history {
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--border-light);
}

.liturgy-import-preview {
  border: 1px solid rgba(135, 112, 78, 0.28);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #fff;
}

.liturgy-preview-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: #f3eee5;
}

.liturgy-preview-heading small {
  color: var(--text-muted);
}

.liturgy-diff-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-bottom: 1px solid var(--border-light);
}

.liturgy-diff-grid > div {
  display: grid;
  gap: 2px;
  padding: 14px;
  text-align: center;
  border-right: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.liturgy-diff-grid > div:nth-child(5n) {
  border-right: 0;
}

.liturgy-diff-grid > div:nth-last-child(-n+5) {
  border-bottom: 0;
}

.liturgy-diff-grid strong {
  color: var(--accent-olive);
  font-size: 1.2rem;
}

.liturgy-diff-grid span {
  color: var(--text-muted);
  font-size: 0.7rem;
}

.liturgy-diff-details {
  max-height: 280px;
  overflow-y: auto;
  padding: 8px 16px;
}

.liturgy-diff-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border-light);
}

.liturgy-diff-item > span {
  color: var(--accent-gold);
  font-size: 1.1rem;
  font-weight: 800;
}

.liturgy-diff-item > div {
  display: grid;
  gap: 2px;
}

.liturgy-diff-item small {
  color: var(--text-muted);
  font-size: 0.7rem;
}

.liturgy-import-safety,
.liturgy-import-warning,
.liturgy-no-diff,
.liturgy-import-success {
  margin: 0;
  padding: 13px 16px;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.liturgy-import-warning {
  margin: 0;
  border-top: 1px solid rgba(184, 123, 40, 0.22);
  padding: 13px 16px;
  background: rgba(184, 123, 40, 0.08);
  color: #76551d;
  font-size: 0.78rem;
}

.liturgy-import-success {
  color: var(--accent-olive);
  font-weight: 700;
}

.liturgy-import-actions {
  flex-wrap: wrap;
}

.liturgy-import-actions [hidden],
.liturgy-import-preview[hidden] {
  display: none !important;
}

@media (max-width: 700px) {
  .calendar-top-bar {
    gap: 8px;
  }
  .calendar-nav-left,
  .calendar-nav-right {
    flex: 0 0 auto;
  }
  .liturgy-import-year {
    grid-template-columns: 1fr;
  }
  .liturgy-preview-heading {
    display: grid;
  }
  .liturgy-diff-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .liturgy-diff-grid > div:nth-child(2n) {
    border-right: 0;
  }
  .liturgy-diff-grid > div:nth-child(5n):not(:nth-child(2n)) {
    border-right: 1px solid var(--border-light);
  }
  .liturgy-diff-grid > div:nth-last-child(-n+5) {
    border-bottom: 1px solid var(--border-light);
  }
  .liturgy-diff-grid > div:nth-last-child(-n+2) {
    border-bottom: 0;
  }
}

.btn-calendar-today {
  min-width: 0;
  padding: 8px 15px;
  border-radius: 999px;
  border-color: var(--border-color);
  background: rgba(255, 253, 249, 0.92);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  box-shadow: none;
  transition: color var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
}

.btn-calendar-today:hover {
  color: var(--text-main);
  border-color: rgba(184, 123, 40, 0.42);
  background: #fffdf9;
  box-shadow: 0 4px 12px rgba(88, 64, 30, 0.08);
}

.btn-icon-calendar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 1.3rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-icon-calendar:hover {
  background: var(--accent-olive);
  color: #fff;
  border-color: var(--accent-olive);
}

.btn-month-year-picker {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}

.btn-month-year-picker:hover {
  background: var(--bg-alt);
}

.month-year-title {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 0.02em;
}

.calendar-table-wrapper {
  overflow-x: auto;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.monastery-calendar-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-family: var(--font-body);
}

.monastery-calendar-table th,
.monastery-calendar-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-light);
  border-right: 1px solid var(--border-light);
  vertical-align: middle;
}

.monastery-calendar-table th:last-child,
.monastery-calendar-table td:last-child {
  border-right: none;
}

.monastery-calendar-table thead tr {
  background: #f3eee5;
}

.monastery-calendar-table thead th {
  position: sticky;
  top: 99px;
  z-index: 12;
  background: #f3eee5;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 750;
  color: var(--text-main);
  letter-spacing: 0.055em;
  text-transform: uppercase;
  border-bottom-color: rgba(135, 112, 78, 0.3);
  box-shadow: 0 2px 6px rgba(70, 53, 30, 0.055);
}

.monastery-calendar-table thead th.th-initial {
  text-align: center;
  width: 48px;
  font-size: 0.84rem;
  font-weight: 800;
  color: #3f3a34;
  background: #f3eee5;
  letter-spacing: 0.025em;
}

.th-day {
  width: 90px;
}

.th-liturgy {
  min-width: 280px;
}

.th-notes {
  width: 32%;
}

.th-guests {
  width: 70px;
  text-align: center;
}

@media (min-width: 901px) {
  .calendar-table-wrapper {
    overflow: visible;
  }
}

@media (min-width: 901px) and (max-width: 1240px) {
  .monastery-calendar-table thead th {
    top: 91px;
  }
}

@media (max-width: 900px) {
  .monastery-calendar-table thead th {
    position: static;
  }
}

.calendar-day-row:hover {
  background: rgba(0, 0, 0, 0.015);
}

/* Tekući dan nema zasjenjen cijeli redak, označava ga crveni okvir (today-frame) na polju dana */

.calendar-day-row.sunday {
  background: rgba(140, 150, 110, 0.12);
  font-weight: 500;
}

.calendar-day-row.sunday:hover {
  background: rgba(140, 150, 110, 0.18);
}

.td-absence {
  text-align: center;
  cursor: pointer;
  width: 48px;
  position: relative;
  transition: background var(--transition-fast);
  user-select: none;
  -webkit-user-select: none;
}

.td-absence:hover {
  background: rgba(0, 0, 0, 0.04);
}

.td-absence.absent {
  background: rgba(168, 50, 50, 0.08);
}

.td-absence.absent-series {
  background: rgba(37, 99, 235, 0.095);
}

.td-absence.absent-series:hover {
  background: rgba(37, 99, 235, 0.14);
}

.absence-x {
  color: #A83232;
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 1.45rem;
  line-height: 1;
  display: inline-block;
  letter-spacing: -0.02em;
  transition: transform 0.15s ease, color 0.15s ease;
}

.td-absence.absent-series .absence-x {
  color: #2563eb;
}

.td-day {
  white-space: nowrap;
  font-size: 0.95rem;
  color: var(--text-main);
}

.day-name-short {
  display: inline-block;
  width: 26px;
  color: var(--text-muted);
  font-weight: 500;
}

.day-num {
  font-weight: 600;
}

.td-day.today-frame,
.td-day.today-badge {
  border: 2px solid #A83232 !important;
  background: rgba(168, 50, 50, 0.04);
}

.td-day.today-frame .day-name-short,
.td-day.today-frame .day-num,
.td-day.today-badge .day-name-short,
.td-day.today-badge .day-num {
  color: #A83232;
  font-weight: 700;
}

/* Liturgijski stilovi (Mirniji izgled - Svi fontovi su Sans, uravnotežena hijerarhija) */
.td-liturgy {
  font-size: 0.92rem;
  font-family: var(--font-body);
}

.liturgy-solemnity {
  font-family: var(--font-body);
  color: #A83232;
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.liturgy-sunday {
  font-family: var(--font-body);
  color: var(--text-main);
  font-weight: 650;
  font-size: 0.93rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.liturgy-feast {
  font-family: var(--font-body);
  color: var(--text-main);
  font-weight: 500;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.liturgy-memorial-obligatory,
.liturgy-memorial {
  font-family: var(--font-body);
  font-style: normal;
  font-weight: 480;
  font-size: 0.92rem;
  color: var(--text-main);
}

.liturgy-ferial {
  font-family: var(--font-body);
  font-style: normal;
  font-weight: 400;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.liturgy-memorial-optional {
  font-family: var(--font-body);
  font-style: normal;
  font-weight: 300;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Diskretni prikaz za drugi / dopunski naslov dana u kalendaru (da ne konkurira glavnome) */
.td-liturgy .liturgy-secondary-title {
  display: inline;
  font-family: var(--font-body);
  font-weight: 380 !important;
  font-size: 0.84rem !important;
  color: var(--text-muted) !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  font-style: normal !important;
  opacity: 0.9;
}

.td-notes {
  cursor: pointer;
  color: var(--text-main);
  font-size: 0.9rem;
  line-height: 1.4;
  transition: background var(--transition-fast);
}

.td-notes:hover {
  background: rgba(0, 0, 0, 0.03);
}

.td-guests {
  text-align: center;
  cursor: pointer;
}

.guest-count-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-muted);
  background: var(--bg-alt);
  transition: all var(--transition-fast);
}

.guest-count-box.has-guests {
  background: #e4eadf;
  border-color: rgba(91, 112, 69, 0.28);
  color: #4f613f;
  font-weight: 700;
}

.guest-count-box.has-guest-note {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.92), 0 0 0 3px rgba(91, 112, 69, 0.2);
}

.td-guests:hover .guest-count-box {
  transform: scale(1.08);
}

/* ==========================================================================
   KALENDAR MODALI I DIJALOZI
   ========================================================================== */

.mypicker-card {
  max-width: 360px !important;
  padding: 24px !important;
}

.mypicker-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 38px;
  margin-bottom: 20px;
}

.mypicker-year {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
}

.btn-picker-arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mypicker-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.btn-picker-month {
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: var(--bg-alt);
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 500;
  transition: all var(--transition-fast);
}

.btn-picker-month:hover {
  background: var(--border-light);
}

.btn-picker-month.active {
  background: var(--accent-olive);
  color: #fff;
  border-color: var(--accent-olive);
}

.absence-detail-card,
.day-note-card {
  max-width: 420px !important;
  padding: 24px !important;
}

.absence-modal-header,
.note-modal-header {
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 10px;
}

.absence-modal-header h4,
.note-modal-header h4 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin: 0;
}

.date-hr-picker {
  display: flex;
  gap: 10px;
  align-items: center;
}

.date-hr-picker .select-day {
  width: 90px;
  flex-shrink: 0;
  text-align: center;
  font-weight: 600;
}

.date-hr-picker .select-month {
  flex-grow: 1;
  font-weight: 500;
}

.absence-modal-footer,
.note-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
}

.absence-actions-right {
  display: flex;
  gap: 10px;
}

.btn-absence-delete {
  background: transparent;
  border: 1px solid var(--border-light);
  color: #A83232;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-absence-delete:hover {
  background: rgba(168, 50, 50, 0.1);
  border-color: #A83232;
}

.trash-icon {
  width: 18px;
  height: 18px;
}

.btn-absence-cancel {
  background: var(--bg-alt);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 500;
  transition: all 0.15s ease;
}

.btn-absence-cancel:hover {
  background: rgba(0, 0, 0, 0.08);
  color: #000;
}

.btn-absence-save {
  background: var(--accent-olive);
  border: none;
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn-absence-save:hover {
  background: #3a5c2d;
}

/* Popover za broj gostiju */
.guest-popover-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.35);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.guest-popover-backdrop.open {
  display: flex;
}

.guest-popover-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 20px;
  width: min(420px, calc(100vw - 32px));
  position: relative;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.guest-popover-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 14px;
  text-align: center;
}

.guest-stays-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-right: 28px;
  position: relative;
}

.guest-stays-header .guest-popover-title {
  margin-bottom: 3px;
  text-align: left;
}

.guest-stays-summary {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.guest-modal-close {
  top: -8px;
  right: -8px;
}

.guest-stays-list {
  display: grid;
  gap: 9px;
  margin: 18px 0;
  max-height: min(50vh, 360px);
  overflow-y: auto;
}

.guest-stays-empty {
  padding: 22px 14px;
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-align: center;
  font-size: 0.9rem;
}

.guest-stay-item {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-alt);
}

.guest-stay-main {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  padding: 11px 12px;
  border: 0;
  background: transparent;
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
}

.guest-stay-main:hover {
  background: rgba(91, 112, 69, 0.08);
}

.guest-stay-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 50%;
  color: #fff;
  background: var(--accent-olive);
  font-weight: 700;
}

.guest-stay-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.guest-stay-copy strong,
.guest-stay-copy small {
  overflow-wrap: anywhere;
}

.guest-stay-copy small {
  color: var(--text-muted);
}

.guest-stay-delete {
  width: 42px;
  border: 0;
  border-left: 1px solid var(--border-light);
  background: transparent;
  color: #A83232;
  font-size: 1.35rem;
  cursor: pointer;
}

.guest-stay-delete:hover {
  background: rgba(168, 50, 50, 0.1);
}

.guest-add-stay {
  width: 100%;
  justify-content: center;
}

.guest-stay-form {
  margin-top: 18px;
}

.guest-date-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.guest-stay-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.guest-stay-form-actions button:disabled {
  opacity: 0.6;
  cursor: wait;
}

.calendar-day-row.calendar-target-flash {
  animation: calendarTargetFlash 2.4s ease;
}

@keyframes calendarTargetFlash {
  0%, 35% { background: rgba(198, 157, 66, 0.28); }
  100% { background: transparent; }
}

@media (max-width: 520px) {
  .guest-popover-card {
    padding: 18px;
  }

  .guest-date-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

.guest-numbers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.btn-guest-num {
  height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-alt);
  font-size: 1.15rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-guest-num:hover {
  background: var(--border-light);
}

.btn-guest-num.active {
  background: var(--accent-olive);
  color: #fff;
  border-color: var(--accent-olive);
}

/* Toast obavijesti kalendara */
.calendar-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #2D3128;
  color: #fff;
  padding: 10px 20px;
  border-radius: 99px;
  font-size: 0.92rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 2000;
}

.calendar-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ==========================================================================
   VISIO COMMUNIS - ZAJEDNIČKI STOL (DASHBOARD • DANAS NA ĆOKOVCU)
   ========================================================================== */

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

@keyframes livePulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.dashboard-container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px 32px 80px 32px;
  animation: fadeInDashboard 0.35s ease-out;
}

/* 1. HERO ZAGLAVLJE PLOČE */
.dashboard-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 44px;
  padding: 26px 36px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.dashboard-header-title-box {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-crest-icon {
  font-size: 1.8rem;
  color: var(--accent-gold);
  line-height: 1;
}

.dashboard-main-title {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.1;
  letter-spacing: 0.02em;
}

.dashboard-main-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.dashboard-live-clock {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--bg-body);
  border: 1px solid var(--border-light);
  border-radius: 9999px;
  font-size: 0.88rem;
  color: var(--text-main);
  font-weight: 500;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-olive);
  box-shadow: 0 0 0 3px rgba(61, 90, 69, 0.18);
  animation: livePulse 2s infinite;
}

/* 2. MREŽA KOMPAKTNIH WIDGETA - PRIRODNA ŠIRINA I CENTRIRANJE */
.dashboard-widgets-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-content: center;
  gap: 24px;
  width: 100%;
  max-width: 460px;
  margin-bottom: 64px;
}

.dashboard-widgets-grid[data-visible-count="2"] {
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  max-width: 944px;
}

.dashboard-widgets-grid[data-visible-count="3"] {
  grid-template-columns: repeat(3, minmax(280px, 1fr));
  max-width: 1428px;
}

.dashboard-widgets-grid[data-visible-count="4"] {
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  max-width: 944px;
}

.dashboard-widgets-grid[data-visible-count="5"] {
  grid-template-columns: repeat(3, minmax(280px, 1fr));
  max-width: 1428px;
}

.dashboard-widgets-grid > .card-widget-ferries {
  grid-column: 1 / -1;
  justify-self: center;
  width: min(calc(100vw - 96px), 1428px);
  max-width: 1428px;
}

@media (max-width: 990px) {
  .dashboard-widgets-grid[data-visible-count="3"] {
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    max-width: 944px;
  }

  .dashboard-widgets-grid[data-visible-count="5"] {
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    max-width: 944px;
  }

  .dashboard-widgets-grid[data-visible-count="3"] > .dashboard-widget-card.is-last-visible-compact {
    grid-column: 1 / -1;
    justify-self: center;
    width: min(100%, 460px);
  }
}

@media (max-width: 700px) {
  .dashboard-widgets-grid,
  .dashboard-widgets-grid[data-visible-count="2"],
  .dashboard-widgets-grid[data-visible-count="3"],
  .dashboard-widgets-grid[data-visible-count="4"],
  .dashboard-widgets-grid[data-visible-count="5"] {
    grid-template-columns: minmax(0, 1fr);
    max-width: 460px;
  }

  .dashboard-widgets-grid[data-visible-count="3"] > .dashboard-widget-card.is-last-visible-compact {
    grid-column: auto;
    width: auto;
  }

  .dashboard-widgets-grid > .card-widget-ferries {
    grid-column: 1 / -1;
    width: 100%;
  }
}

@media (max-width: 640px) {
  .dashboard-header-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

.dashboard-widget-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
}

.dashboard-widget-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card-widget-liturgy::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #B87B28, #E2B96E);
}

.dashboard-widgets-grid.has-expanded-directory {
  grid-template-columns: repeat(3, minmax(280px, 1fr));
  max-width: 1428px;
}

.card-widget-liturgy.is-directory-expanded.directory-columns-2 {
  grid-column: span 2;
}

.card-widget-liturgy.is-directory-expanded.directory-columns-3 {
  grid-column: span 3;
}

.card-widget-liturgy.is-directory-expanded {
  justify-self: stretch;
  width: 100%;
}

@media (max-width: 990px) {
  .dashboard-widgets-grid.has-expanded-directory {
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    max-width: 944px;
  }

  .card-widget-liturgy.is-directory-expanded.directory-columns-3 {
    grid-column: span 2;
  }
}

.dashboard-widgets-grid.dashboard-grid-is-animating > .dashboard-widget-card {
  pointer-events: none;
}

.dashboard-widgets-grid.dashboard-grid-is-animating > .dashboard-widget-card:hover {
  transform: none;
}

.card-widget-presence::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3D5A45, #678F72);
}

.card-widget-weather::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3D5A45, #8a9d75);
}

.card-widget-waste::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #4CBE38, #FDDC04, #079CE2, #845321);
}

.card-widget-waste .widget-card-title { color: #2f6f2a; }
.waste-provider-logo { width: 21px; height: 24px; object-fit: contain; }
.card-widget-waste .waste-widget-header { display: grid; grid-template-columns: minmax(0, 1fr); align-items: stretch; justify-content: stretch; gap: 13px; }
.waste-widget-heading-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.waste-week-navigation { display: grid; grid-template-columns: 36px minmax(0, 1fr) 36px; align-items: center; gap: 7px; width: min(100%, 330px); margin-inline: auto; }
.waste-week-navigation > button { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--border-light); border-radius: 50%; background: var(--bg-card); color: var(--accent-olive); cursor: pointer; transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease; }
.waste-week-navigation > button:hover { border-color: #4CBE38; background: var(--bg-card-hover); transform: translateY(-1px); }
.waste-week-navigation svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.waste-week-navigation-label { display: grid; gap: 3px; min-width: 0; text-align: center; }
.waste-week-navigation-label strong { color: var(--text-muted); font-size: 0.63rem; font-weight: 800; letter-spacing: 0.075em; line-height: 1.1; text-transform: uppercase; }
.waste-week-navigation-label span { color: var(--text-main); font-family: var(--font-heading); font-size: 0.96rem; font-weight: 700; line-height: 1.1; }
.waste-week-return { display: inline-flex; align-items: center; gap: 4px; border: 1px solid rgba(61, 90, 69, 0.24); border-radius: 999px; padding: 5px 9px; background: rgba(61, 90, 69, 0.07); color: var(--accent-olive); font: inherit; font-size: 0.64rem; font-weight: 800; cursor: pointer; }
.waste-week-return svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.waste-week-navigation > button:focus-visible, .waste-week-return:focus-visible { outline: 3px solid rgba(76, 190, 56, 0.24); outline-offset: 2px; }
.widget-waste-body { padding: 18px 22px 20px; }
.waste-week-list { margin: 0; padding: 0; border: 1px solid var(--border-light); border-radius: 13px; background: var(--bg-card); list-style: none; overflow: hidden; }
.waste-week-day { display: grid; grid-template-columns: 104px minmax(0, 1fr); min-height: 46px; border-bottom: 1px solid var(--border-light); background: var(--bg-card); }
.waste-week-day:last-child { border-bottom: 0; }
.waste-week-day.is-today { position: relative; z-index: 1; box-shadow: inset 4px 0 0 var(--accent-olive), inset 0 0 0 1px rgba(61, 90, 69, 0.55); }
.waste-week-day.is-empty { color: var(--text-muted); }
.waste-day-label { display: grid; grid-template-columns: auto auto; align-content: center; justify-content: start; gap: 2px 8px; padding: 7px 11px 7px 14px; border-right: 1px solid var(--border-light); background: rgba(61, 90, 69, 0.025); font-size: 0.69rem; text-transform: uppercase; }
.waste-day-label > span { font-weight: 850; color: var(--text-main); }
.waste-day-label time { color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.waste-day-label strong { grid-column: 1 / -1; color: var(--accent-olive); font-size: 0.58rem; letter-spacing: 0.08em; }
.waste-day-events { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); min-width: 0; }
.waste-service-item { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 7px 14px 7px 18px; border-right: 1px solid rgba(0, 0, 0, 0.06); background: color-mix(in srgb, var(--waste-color) 13%, var(--bg-card)); box-shadow: inset 6px 0 0 var(--waste-color); }
.waste-service-item:last-child { border-right: 0; }
.waste-service-item strong { overflow: hidden; color: var(--text-main); font-size: 0.78rem; font-weight: 800; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
.waste-service-item small { color: var(--text-muted); font-size: 0.64rem; font-weight: 700; line-height: 1.1; white-space: nowrap; }
.waste-service-icon { width: 25px; height: 25px; margin-left: auto; flex: 0 0 auto; color: var(--text-muted); opacity: 0.22; }
.waste-service-item:not(:only-child) .waste-service-icon { width: 19px; height: 19px; }
.waste-service-yard { --waste-color: #d2b36f; background: #f6edd9; }
.waste-service-holiday { --waste-color: #e63a4f; background: #fff1f2; }
.waste-service-holiday strong { color: #a61b34; }
.waste-no-service { align-self: center; padding: 10px 16px; color: var(--text-muted); font-size: 0.69rem; }
.waste-widget-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 7px; font-size: 0.68rem; }
.waste-widget-footer a { color: var(--accent-olive); font-weight: 700; }
.waste-calendar-notice { margin: 0; color: var(--text-muted); font-size: 0.82rem; line-height: 1.6; }

@media (max-width: 420px) {
  .waste-week-day { grid-template-columns: 96px minmax(0, 1fr); }
  .widget-waste-body { padding-inline: 16px; }
  .waste-week-navigation-label span { font-size: 0.9rem; }
  .waste-service-item { padding-inline: 15px 9px; }
  .waste-service-icon { width: 22px; height: 22px; }
}

.card-widget-ferries::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #0069AA, #60A5FA);
}

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

.widget-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-main);
  text-transform: uppercase;
}

.widget-svg-icon, .widget-icon {
  width: 16px;
  height: 16px;
  color: var(--accent-gold);
}

.widget-subtitle {
  font-size: 0.75rem;
  color: var(--text-light);
}

.widget-card-body {
  padding: 28px 30px 30px 30px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 20px;
}

.widget-card-footer {
  padding: 16px 30px;
  background: var(--bg-body);
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-widget-link {
  background: none;
  border: none;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-gold);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  transition: opacity 0.2s;
}

.btn-widget-link:hover {
  opacity: 0.8;
}

.arrow-icon {
  width: 14px;
  height: 14px;
  transition: transform 0.2s;
}

.btn-widget-link:hover .arrow-icon {
  transform: translateX(3px);
}

.refresh-icon {
  transition: transform 0.5s ease;
}

.btn-widget-link:hover .refresh-icon {
  transform: rotate(180deg);
}

/* 2.1 Liturgijski widget */
.liturgy-directory-header {
  gap: 18px;
}

@media (min-width: 821px) {
  .card-widget-liturgy.is-directory-expanded .liturgy-directory-header {
    position: relative;
    min-height: 75px;
    justify-content: flex-start;
  }

  .card-widget-liturgy.is-directory-expanded .liturgy-date-navigation {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
}

.liturgy-date-navigation {
  display: grid;
  grid-template-columns: 34px minmax(136px, auto) 34px;
  align-items: center;
  gap: 5px;
}

.liturgy-date-navigation > button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border-light);
  border-radius: 50%;
  background: var(--bg-body);
  color: var(--accent-olive);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.liturgy-date-navigation > button:hover {
  border-color: var(--accent-gold);
  background: var(--bg-card-hover);
  transform: translateY(-1px);
}

.liturgy-date-navigation > button:focus-visible,
.liturgy-directory-expand:focus-visible,
.liturgy-return-today:focus-visible {
  outline: 3px solid rgba(184, 123, 40, 0.28);
  outline-offset: 2px;
}

.liturgy-date-navigation svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.liturgy-date-navigation-label {
  display: grid;
  gap: 3px;
  min-width: 0;
  text-align: center;
}

.liturgy-date-navigation-label strong {
  color: var(--text-muted);
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.075em;
  line-height: 1.1;
  text-transform: uppercase;
}

.liturgy-date-navigation-label span {
  color: var(--text-main);
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.05;
  white-space: nowrap;
}

.liturgy-header-context {
  display: none;
}

@media (min-width: 821px) {
  .card-widget-liturgy.is-directory-expanded .liturgy-header-context {
    display: block;
    margin-left: auto;
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.035em;
    line-height: 1.25;
    white-space: nowrap;
  }
}

.liturgy-directory-layout {
  display: grid;
  min-width: 0;
}

.card-widget-liturgy.is-directory-expanded.directory-columns-2 .liturgy-directory-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 24px;
}

.card-widget-liturgy.is-directory-expanded.directory-columns-3 .liturgy-directory-layout {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 24px;
}

.card-widget-liturgy.is-directory-expanded.directory-columns-2 .liturgy-directory-details {
  grid-column: 2;
}

.card-widget-liturgy.is-directory-expanded.directory-columns-3 .liturgy-directory-details {
  grid-column: 2 / span 2;
}

.liturgy-directory-summary {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  min-width: 0;
}

.liturgy-return-today {
  border: 0;
  border-bottom: 1px solid currentColor;
  padding: 0 0 2px;
  background: transparent;
  color: var(--accent-olive);
  font: inherit;
  font-size: 0.73rem;
  font-weight: 700;
  cursor: pointer;
}

.liturgy-directory-unavailable {
  border-left: 3px solid var(--accent-gold);
  padding: 8px 10px;
  color: var(--text-muted);
  font-size: 0.75rem;
  line-height: 1.45;
}

.liturgy-directory-details {
  display: grid;
  align-items: start;
  gap: 24px;
  min-width: 0;
  animation: liturgyDirectoryReveal 0.42s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.card-widget-liturgy.directory-detail-columns-1 .liturgy-directory-details {
  grid-template-columns: minmax(0, 1fr);
}

.card-widget-liturgy.directory-detail-columns-2 .liturgy-directory-details {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@keyframes liturgyDirectoryReveal {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

.liturgy-directory-section {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 15px;
  background: color-mix(in srgb, var(--bg-body) 72%, transparent);
}

.liturgy-directory-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
  color: var(--accent-gold);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.liturgy-directory-section-heading strong {
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(184, 123, 40, 0.11);
  color: var(--accent-gold-dark, #93641f);
  font-size: 0.66rem;
}

.liturgy-celebration-item,
.liturgy-readings-entry,
.liturgy-anniversary-item {
  min-width: 0;
  border-bottom: 1px solid var(--border-light);
  padding: 3px 0 11px;
}

.liturgy-celebration-item:last-child,
.liturgy-readings-entry:last-child,
.liturgy-anniversary-item:last-child {
  border-bottom: 0;
  padding-bottom: 2px;
}

.liturgy-celebration-item > .liturgy-readings-entry {
  margin: 13px 0 0 19px;
  border-top: 1px solid var(--border-light);
  border-bottom: 0;
  padding: 11px 0 0;
}

.liturgy-celebration-item > .liturgy-readings-entry.is-source-only {
  padding-top: 9px;
}

.liturgy-readings-entry.is-source-only .liturgy-readings-source {
  margin-bottom: 0;
}

.liturgy-celebration-heading {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--text-main);
  line-height: 1.38;
}

.liturgy-celebration-heading strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-family: var(--font-heading);
  font-size: 0.93rem;
}

.liturgy-alternative-prefix {
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.liturgy-directory-color-dot {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
}

.liturgy-entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 8px 0 0 19px;
}

.liturgy-entry-meta > span {
  border-radius: 999px;
  padding: 3px 7px;
  background: var(--bg-card-hover);
  color: var(--text-muted);
  font-size: 0.62rem;
  line-height: 1.25;
}

.liturgy-entry-meta .liturgy-local-badge {
  background: rgba(61, 90, 69, 0.12);
  color: var(--accent-olive);
  font-weight: 700;
}

.liturgy-entry-meta .liturgy-source-removed {
  background: rgba(166, 68, 68, 0.1);
  color: #8f3434;
}

.liturgy-primary-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.liturgy-primary-meta > span {
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.64rem;
  font-weight: 700;
  line-height: 1.25;
}

.liturgy-primary-meta .liturgy-local-badge {
  background: rgba(61, 90, 69, 0.12);
  color: var(--accent-olive);
}

.liturgy-primary-meta .liturgy-source-removed {
  background: rgba(166, 68, 68, 0.1);
  color: #8f3434;
}

.liturgy-readings-entry h5 {
  margin: 0 0 10px;
  color: var(--text-main);
  font-family: var(--font-heading);
  font-size: 0.88rem;
  line-height: 1.35;
}

.liturgy-readings-source {
  margin-bottom: 7px;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.35;
}

.liturgy-readings-source.is-proper,
.liturgy-readings-source.is-mixed {
  color: var(--accent-olive);
}

.liturgy-mass-block + .liturgy-mass-block {
  margin-top: 13px;
  border-top: 1px dashed var(--border-color);
  padding-top: 12px;
}

.liturgy-mass-block h6 {
  margin: 0 0 7px;
  color: var(--accent-olive);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.liturgy-reading-row {
  display: grid;
  grid-template-columns: minmax(104px, 0.75fr) minmax(0, 1.35fr);
  gap: 9px;
  padding: 5px 0;
}

.liturgy-reading-row small {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 5px;
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.liturgy-reading-proper-badge {
  border-radius: 999px;
  padding: 1px 5px;
  background: rgba(61, 90, 69, 0.11);
  color: var(--accent-olive);
  font-size: 0.55rem;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.liturgy-reading-row strong {
  min-width: 0;
  color: var(--text-main);
  font-size: 0.84rem;
  font-weight: 650;
  line-height: 1.42;
  overflow-wrap: anywhere;
}

.liturgy-reading-link {
  display: grid;
  justify-items: start;
  min-width: 0;
  border: 0;
  border-radius: 8px;
  padding: 3px 5px;
  background: transparent;
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.liturgy-reading-link:hover {
  background: rgba(184, 123, 40, 0.1);
  color: var(--accent-gold-dark, #93641f);
}

.liturgy-reading-link:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 2px;
}

.liturgy-reading-link > span {
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.42;
  overflow-wrap: anywhere;
}

.liturgy-reading-link > em {
  margin-top: 2px;
  color: var(--accent-olive);
  font-size: 0.6rem;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.liturgy-reading-modal-backdrop {
  z-index: 260;
}

.liturgy-reading-modal-card {
  max-width: 820px;
  padding: 34px clamp(20px, 5vw, 48px) 42px;
}

.liturgy-reading-modal-content {
  display: grid;
  gap: 24px;
}

.liturgy-reading-modal-heading {
  margin-bottom: 24px;
  padding-right: 36px;
}

.liturgy-reading-document {
  display: grid;
  gap: 16px;
}

.liturgy-reading-loading,
.liturgy-reading-fetch-warning,
.liturgy-reading-fetch-error {
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  color: var(--text-muted);
  background: var(--bg-body);
  font-size: 0.84rem;
}

.liturgy-reading-fetch-warning {
  background: rgba(184, 123, 40, 0.1);
  color: #76551d;
}

.liturgy-reading-fetch-error {
  background: rgba(166, 68, 68, 0.08);
  color: #8f3434;
}

.liturgy-reading-document + .liturgy-reading-document {
  border-top: 1px solid var(--border-color);
  padding-top: 26px;
}

.liturgy-reading-document > header {
  margin-bottom: 4px;
}

.liturgy-reading-document > header > div {
  display: grid;
  gap: 4px;
}

.liturgy-reading-option-label,
.liturgy-reading-type {
  color: var(--accent-olive);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.liturgy-reading-document h3 {
  margin: 0;
  color: var(--text-main);
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 3vw, 1.55rem);
}

.liturgy-reading-incipit {
  margin: 0;
  color: var(--accent-gold-dark, #93641f);
  font-family: var(--font-heading);
  font-size: 1.04rem;
  font-style: italic;
  line-height: 1.55;
}

.liturgy-reading-intro,
.liturgy-reading-closing {
  margin: 0;
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.65;
}

.liturgy-reading-body p,
.liturgy-reading-refrain p,
.liturgy-reading-note p {
  margin: 0 0 1em;
  color: var(--text-main);
  font-size: 1rem;
  line-height: 1.78;
}

.liturgy-reading-refrain,
.liturgy-reading-note {
  margin: 0;
  border-left: 3px solid var(--accent-gold);
  padding: 12px 16px;
  background: rgba(184, 123, 40, 0.07);
}

.liturgy-reading-refrain > strong,
.liturgy-reading-note > strong {
  display: block;
  margin-bottom: 7px;
  color: var(--accent-gold-dark, #93641f);
  font-size: 0.7rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.liturgy-reading-refrain p:last-child,
.liturgy-reading-note p:last-child,
.liturgy-reading-body p:last-child {
  margin-bottom: 0;
}

.liturgy-reading-note {
  border-left-color: var(--accent-olive);
  background: rgba(61, 90, 69, 0.07);
}

.liturgy-reading-note > strong {
  color: var(--accent-olive);
}

.liturgy-reading-unavailable {
  color: var(--text-muted) !important;
  font-style: italic;
}

.liturgy-readings-gap {
  display: grid;
  gap: 3px;
  margin-top: 10px;
  border-radius: 9px;
  padding: 9px 10px;
  background: rgba(184, 123, 40, 0.09);
  color: #76551d;
}

.liturgy-readings-gap strong {
  font-size: 0.68rem;
}

.liturgy-readings-gap span {
  font-size: 0.66rem;
  line-height: 1.4;
}

.liturgy-anniversary-item {
  display: grid;
  gap: 3px;
}

.liturgy-anniversary-item > strong {
  color: var(--text-main);
  font-family: var(--font-heading);
  font-size: 0.86rem;
}

.liturgy-anniversary-item > span {
  color: var(--accent-olive);
  font-size: 0.67rem;
  font-weight: 700;
}

.liturgy-anniversary-item p {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 0.7rem;
  line-height: 1.45;
}

.liturgy-directory-footer {
  justify-content: space-between;
  gap: 8px;
}

.liturgy-directory-footer > .btn-widget-link { flex: 1; min-width: 0; text-align: left; }
.liturgy-directory-footer > .btn-widget-link .arrow-icon { flex-shrink: 0; }

.liturgy-directory-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

.liturgy-directory-refresh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 11px;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.liturgy-directory-refresh:hover:not(:disabled) {
  color: var(--accent-gold-dark, #93641f);
  background: var(--bg-card-hover);
}

.liturgy-directory-refresh:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 3px;
}

.liturgy-directory-refresh:disabled { opacity: 0.45; cursor: wait; }
.liturgy-directory-refresh svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.liturgy-refresh-notice { flex: 0 1 auto; min-width: min-content; text-align: right; overflow-wrap: break-word; font-size: 0.78rem; color: var(--text-muted); }
.liturgy-refresh-notice:empty { display: none; }
.liturgy-refresh-notice.is-error { color: var(--danger-color, #a43b35); }

.liturgy-directory-expand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(184, 123, 40, 0.28);
  border-radius: 999px;
  padding: 7px 10px 7px 12px;
  background: rgba(184, 123, 40, 0.07);
  color: var(--accent-gold-dark, #93641f);
  font: inherit;
  font-size: 0.7rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.liturgy-directory-expand:hover {
  border-color: var(--accent-gold);
  background: rgba(184, 123, 40, 0.13);
  transform: translateY(-1px);
}

.liturgy-directory-expand svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.liturgy-expand-mobile-icon {
  display: none;
}

.widget-liturgy-badge-wrap {
  display: flex;
}

.widget-rank-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.liturgy-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.06);
}

.widget-liturgy-title {
  font-family: var(--font-heading);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
  margin: 0;
}

.widget-liturgy-color-label {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.liturgy-summary-readings {
  display: grid;
  gap: 10px;
  width: 100%;
  border-top: 1px solid var(--border-light);
  padding-top: 14px;
}

.liturgy-summary-readings-heading {
  color: var(--accent-olive);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.075em;
}

.liturgy-summary-readings .liturgy-readings-entry {
  width: 100%;
  border-bottom: 0;
  padding: 0;
}

@media (min-width: 821px) and (max-width: 990px) {
  .card-widget-liturgy.is-directory-expanded.directory-columns-3 .liturgy-directory-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card-widget-liturgy.is-directory-expanded.directory-columns-3 .liturgy-directory-details {
    grid-column: 2;
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 820px) {
  .card-widget-liturgy.is-directory-expanded .liturgy-directory-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
  }

  .liturgy-directory-details {
    grid-column: auto !important;
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 700px) {
  .dashboard-widgets-grid.has-expanded-directory {
    grid-template-columns: minmax(0, 1fr);
    max-width: 460px;
  }

  .card-widget-liturgy.is-directory-expanded {
    grid-column: auto;
  }

  .liturgy-directory-header {
    align-items: stretch;
    flex-direction: column;
  }

  .liturgy-date-navigation {
    grid-template-columns: 38px minmax(0, 1fr) 38px;
    width: 100%;
  }

  .liturgy-date-navigation > button {
    width: 38px;
    height: 38px;
  }

  .liturgy-reading-modal-backdrop {
    align-items: flex-end;
    padding: 10px;
  }

  .liturgy-reading-modal-card {
    max-height: 92vh;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    padding: 28px 20px 34px;
  }

  .liturgy-expand-desktop-icon {
    display: none;
  }

  .liturgy-expand-mobile-icon {
    display: block;
    transition: transform 0.28s ease;
  }

  .liturgy-directory-expand[aria-expanded="true"] .liturgy-expand-mobile-icon {
    transform: rotate(180deg);
  }
}

@media (max-width: 430px) {
  .liturgy-reading-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .liturgy-directory-footer {
    align-items: center;
    flex-direction: row;
  }

  .liturgy-directory-expand {
    padding: 10px;
  }

  .liturgy-directory-expand span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .liturgy-directory-details {
    animation: none;
  }

  .liturgy-date-navigation > button,
  .liturgy-directory-expand,
  .liturgy-expand-mobile-icon {
    transition: none;
  }
}

/* 2.2 Prisutnost bratstva i napomene */
.presence-chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.presence-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 600;
}

.present-chip {
  background: var(--accent-olive-light);
  color: var(--accent-olive);
  border: 1px solid rgba(61, 90, 69, 0.22);
}

.absent-chip {
  background: #FEE2E2;
  color: #991B1B;
  border: 1px solid #FCA5A5;
  opacity: 1;
}

.chip-status-icon {
  font-size: 0.78rem;
  font-weight: 800;
}

.guest-status-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bg-body);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  font-size: 0.84rem;
  color: var(--text-muted);
}

.guest-status-bar.active-guests {
  background: #FEF3C7;
  border-color: #FDE68A;
  color: #92400E;
}

.guest-svg-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.guest-status-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.guest-stay-today-notes {
  display: block;
  overflow-wrap: anywhere;
  opacity: 0.88;
}

.day-note-callout {
  padding: 10px 12px;
  background: #FFFBEB;
  border-left: 3px solid var(--accent-gold);
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  color: var(--text-main);
}

.day-note-callout.empty-note {
  background: var(--bg-body);
  border-left-color: var(--border-color);
}

.note-header-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.72rem;
  color: var(--accent-gold);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.note-pin-icon {
  width: 13px;
  height: 13px;
}

/* 2.3 Vremenski widget */
.card-widget-weather .widget-card-title { color: var(--accent-olive); }
.card-widget-weather .widget-weather-body { gap: 16px; padding: 22px 24px; }
.weather-main-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.weather-temp-wrap { display: flex; align-items: flex-start; }
.weather-temp-value { font-size: 3.4rem; font-weight: 800; line-height: 1.1; letter-spacing: -0.04em; color: var(--text-main); }
.weather-unit { font-size: 1.15rem; color: var(--text-muted); padding-top: 6px; }
.weather-feels { margin-top: 6px; font-size: 0.76rem; color: var(--text-muted); line-height: 1.5; }
.weather-current-sky { display: grid; justify-items: end; gap: 8px; text-align: right; max-width: 45%; font-size: 0.82rem; }
.weather-symbol { display: inline-block; font-size: 1.4rem; line-height: 1.3; }
.weather-current-sky .weather-symbol { font-size: 2.6rem; }
.weather-summary { margin: 0; font-size: 0.82rem; line-height: 1.6; }
.weather-section-label { color: var(--text-muted); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.06em; margin-bottom: 14px; }
.weather-hourly { min-width: 0; border-block: 1px solid var(--border-color); padding: 14px 0 10px; }
.weather-hours { display: grid; grid-auto-flow: column; grid-auto-columns: 52px; justify-content: start; gap: 8px; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: var(--border-color) transparent; padding-bottom: 10px; }
.weather-hours:focus-visible { outline: 2px solid var(--accent-olive); outline-offset: 3px; border-radius: 3px; }
.weather-hour { scroll-snap-align: start; display: grid; justify-items: center; gap: 8px; font-size: 0.82rem; }
.weather-hour time { color: var(--text-muted); font-size: 0.7rem; font-variant-numeric: tabular-nums; }
.weather-rain { color: #386b88; font-size: 0.74rem; }
.weather-rain-key { margin: 12px 0 0; font-size: 0.68rem; color: var(--text-muted); }
.weather-wind-card { display: flex; align-items: center; gap: 12px; padding: 12px; background: #f1f4ed; border: 1px solid #dce4d7; border-radius: var(--radius-sm); color: var(--accent-olive); }
.weather-wind-card.strong-wind { background: #fff1f2; border-color: #fecdd3; color: #9f2441; }
.wind-icon-wrap { font-size: 1.8rem; }
.wind-info-wrap { flex: 1; min-width: 0; }
.wind-name-title { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px; font-size: 0.82rem; }
.wind-speed-val { font-size: 0.78rem; white-space: nowrap; font-weight: 700; }
.wind-desc-sub { font-size: 0.74rem; margin-top: 4px; }
.weather-daily-range { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 0.76rem; color: var(--text-muted); }
.weather-week { border-top: 1px solid var(--border-color); padding-top: 4px; }
.weather-week summary { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; color: var(--accent-olive); font-size: 0.84rem; font-weight: 700; list-style: none; }
.weather-week summary::-webkit-details-marker { display: none; }
.weather-expand-icon { font-size: 1.2rem; }
.weather-week[open] .weather-expand-icon { transform: rotate(180deg); }
.weather-week table { width: 100%; border-collapse: collapse; font-size: 0.78rem; }
.weather-week caption { text-align: left; color: var(--text-muted); font-size: 0.7rem; padding: 0 0 10px; }
.weather-week th, .weather-week td { text-align: left; padding: 10px 3px; border-bottom: 1px solid var(--border-light); }
.weather-week thead th { font-size: 0.66rem; color: var(--text-muted); font-weight: 500; }
.weather-week tbody th { font-weight: 500; text-transform: capitalize; }
.weather-week time small { display: block; margin-top: 3px; color: var(--text-muted); font-size: 0.68rem; }
.weather-week th:last-child, .weather-week td:last-child { text-align: right; white-space: nowrap; }
.weather-week-range { font-variant-numeric: tabular-nums; }
.weather-week-range > span { color: var(--text-muted); }
.weather-week .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.weather-notice { margin: 0; color: var(--text-muted); font-size: 0.8rem; line-height: 1.6; }
.card-widget-weather .weather-footer { display: flex; flex-direction: column; align-items: stretch; gap: 10px; padding: 14px 24px; }
.weather-footer > div { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; font-size: 0.66rem; color: var(--text-muted); }
.weather-footer a { color: var(--accent-olive); }
.weather-footer .btn-refresh-weather { align-self: flex-start; }
@media (max-width: 600px) {
  .card-widget-weather .widget-card-header { padding: 20px 18px 14px; }
  .card-widget-weather .widget-weather-body { padding: 18px; }
  .card-widget-weather .weather-footer { padding: 14px 18px; }
}

/* 2.4 Trajektni widget (Jadrolinija Adriatic Blue #0069AA • 3 stupca + okretanje) */
.btn-jadrolinija-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  background: rgba(0, 105, 170, 0.06);
  border: 1px solid rgba(0, 105, 170, 0.22);
  border-radius: 9999px;
  color: #0069AA;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0, 105, 170, 0.08);
  cursor: pointer;
}

.btn-jadrolinija-link:hover {
  background: #0069AA;
  color: #FFFFFF;
  border-color: #0069AA;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 105, 170, 0.28);
}

.btn-jadrolinija-link .jadrolinija-anchor-icon {
  width: 16px;
  height: 16px;
  transition: transform 0.25s ease, color 0.25s ease;
}

.btn-jadrolinija-link:hover .jadrolinija-anchor-icon {
  color: #FBBF24;
  transform: rotate(-14deg) scale(1.15);
}

.external-link-sm-icon {
  width: 12px;
  height: 12px;
  opacity: 0.6;
  transition: opacity 0.2s, transform 0.2s;
}

.btn-jadrolinija-link:hover .external-link-sm-icon {
  opacity: 1;
  transform: translate(2px, -2px);
}
.ferry-direction-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(135deg, #0069AA 0%, #005086 100%);
  color: #FFFFFF;
  border: 1px solid #004D7A;
  border-radius: var(--radius-sm);
  padding: 14px 22px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 105, 170, 0.22);
  margin-bottom: 24px;
}

.ferry-daytype-badge {
  font-size: 0.88rem;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: 0.04em;
  background: rgba(255, 255, 255, 0.16);
  padding: 4px 14px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  white-space: nowrap;
}

.ferry-direction-banner:hover {
  background: linear-gradient(135deg, #005086 0%, #0069AA 100%);
  box-shadow: 0 4px 10px rgba(0, 105, 170, 0.32);
}

.ferry-dir-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: #FFFFFF;
}

.dir-route-highlight {
  font-weight: 800;
  color: #FBBF24; /* Jadrolinija gold */
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.ferry-flip-icon-inline {
  width: 18px;
  height: 18px;
  color: #FBBF24;
  margin-left: 6px;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ferry-direction-banner:hover .ferry-flip-icon-inline {
  transform: rotate(180deg) scale(1.15);
}

.ferry-3col-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
}

@media (max-width: 768px) {
  .ferry-3col-grid {
    grid-template-columns: 1fr;
  }
}

.ferry-col-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-body);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 28px 30px;
  cursor: pointer;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  position: relative;
}

.ferry-col-card:hover {
  transform: translateY(-4px);
  border-color: #0069AA;
  box-shadow: 0 8px 20px rgba(0, 105, 170, 0.12);
}

.ferry-col-card.is-fastest-card {
  border: 2px solid #0069AA !important;
  background: linear-gradient(180deg, rgba(0, 105, 170, 0.08) 0%, var(--bg-body) 100%) !important;
  box-shadow: 0 6px 18px rgba(0, 105, 170, 0.15);
}

.ferry-fastest-badge {
  display: inline-block;
  align-self: flex-start;
  background: #0069AA;
  color: #FFFFFF;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
  letter-spacing: 0.04em;
  box-shadow: 0 2px 4px rgba(0, 105, 170, 0.25);
}

.ferry-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.ferry-line-num {
  font-size: 0.82rem;
  font-weight: 800;
  color: #FFFFFF;
  background: #0069AA;
  padding: 3px 10px;
  border-radius: 6px;
  letter-spacing: 0.02em;
}

.ferry-col-route {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--text-main);
  text-align: right;
  flex: 1;
}

.ferry-col-type {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.ferry-col-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0 20px 0;
  padding-bottom: 18px;
  border-bottom: 1px dashed var(--border-light);
}

.ferry-time-large {
  font-size: 2.25rem;
  font-weight: 900;
  color: #0069AA;
  font-family: var(--font-body);
  line-height: 1;
}

.ferry-countdown-badge {
  padding: 5px 12px;
  background: rgba(0, 105, 170, 0.12);
  color: #0069AA;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 800;
}

.ferry-countdown-badge.fastest-badge {
  background: #0069AA;
  color: #FBBF24;
}

.ferry-countdown-badge.immediate {
  display: inline-flex;
  flex: 0 0 28px;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 50%;
  background: #DC2626;
  color: #FFFFFF;
  font-size: 1rem;
  line-height: 1;
  animation: livePulse 1.2s infinite;
}

.ferry-immediate-symbol {
  transform: translateY(-0.02em);
}

.ferry-departure-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.ferry-departure-control {
  min-height: 32px;
  padding: 4px 7px;
  border: 0;
  background: transparent;
  color: #0069AA;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.ferry-departure-control:hover,
.ferry-departure-control:focus-visible {
  text-decoration: underline;
}

.ferry-collapse-control {
  color: var(--text-muted);
}

.ferry-upcoming-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
  padding-top: 6px;
}

.upcoming-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.upcoming-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ferry-time-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  background: var(--bg-card);
  border: 1px solid #0069AA;
  color: #0069AA;
  font-size: 1.05rem;
  font-weight: 800;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.ferry-no-later {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}

.ferry-footer-note {
  font-size: 0.74rem;
  color: var(--text-light);
}

/* Autobusni gadget Liburnija 205 */
.card-widget-bus {
  position: relative;
}
.card-widget-bus::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1;
  height: 4px;
  background: linear-gradient(90deg, #123c70, #ed641c);
}
.bus-widget-header {
  padding-top: 20px;
}
.btn-liburnija-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border: 1px solid rgba(18, 60, 112, 0.24);
  border-radius: 999px;
  background: rgba(18, 60, 112, 0.055);
  color: #123c70;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.055em;
  text-decoration: none;
}
.btn-liburnija-link b {
  padding: 1px 7px;
  border-radius: 999px;
  background: #ed641c;
  color: #fff;
  font-size: 0.72rem;
}
.btn-liburnija-link:hover {
  border-color: #123c70;
  background: #123c70;
  color: #fff;
}
.bus-header-icon {
  width: 17px;
  height: 17px;
}
.widget-bus-body {
  align-items: center;
}
.bus-direction-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  width: min(100%, 620px);
  padding: 13px 18px;
  border: 1px solid #c94f0e;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #ed641c 0%, #d95412 100%);
  box-shadow: 0 3px 9px rgba(201, 79, 14, 0.23);
  color: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.22s ease, opacity 0.22s ease, box-shadow 0.2s ease;
  transform-style: preserve-3d;
}
.bus-direction-banner > span {
  min-width: 0;
  font-size: 0.94rem;
  font-weight: 750;
}
.bus-direction-banner > em {
  padding: 4px 10px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  background: rgba(18, 60, 112, 0.22);
  color: #fff;
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 800;
  text-align: center;
}
.bus-direction-banner:hover {
  box-shadow: 0 5px 14px rgba(201, 79, 14, 0.3);
}
.bus-flip-icon {
  width: 18px;
  height: 18px;
  color: #fff;
}
.bus-route-card {
  width: min(100%, 460px);
  padding: 24px 26px;
  border: 1px solid rgba(18, 60, 112, 0.2);
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(18, 60, 112, 0.055), var(--bg-body) 52%);
  box-shadow: 0 5px 16px rgba(18, 60, 112, 0.08);
  cursor: pointer;
  perspective: 900px;
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.22s ease, box-shadow 0.2s ease;
  transform-style: preserve-3d;
}
.bus-route-card:hover {
  border-color: #123c70;
  box-shadow: 0 8px 22px rgba(18, 60, 112, 0.13);
}
.bus-route-card.card-flipping-out,
.bus-direction-banner.text-flipping-out {
  transform: rotateY(90deg) scale(0.97);
  opacity: 0.12;
}
.bus-route-card.card-flipping-in,
.bus-direction-banner.text-flipping-in {
  transform: rotateY(-90deg) scale(0.97);
  opacity: 0.12;
}
.bus-route-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}
.bus-route-heading strong {
  min-width: 0;
  color: var(--text-main);
  font-size: 1rem;
  text-align: right;
  overflow-wrap: anywhere;
}
.bus-line-number {
  padding: 4px 11px;
  border-radius: 7px;
  background: #ed641c;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 900;
}
.bus-service-type {
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 0.78rem;
}
.bus-next-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 18px 0;
  padding-bottom: 17px;
  border-bottom: 1px dashed var(--border-color);
}
.bus-time-large {
  color: #123c70;
  font-size: 2.35rem;
  font-weight: 900;
  line-height: 1;
}
.bus-countdown {
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(237, 100, 28, 0.12);
  color: #c94f0e;
  font-size: 0.82rem;
  font-weight: 850;
  text-align: center;
}
.bus-countdown.immediate {
  background: #fff1f1;
  color: #c62828;
  animation: livePulse 1.2s infinite;
}
.bus-upcoming-box {
  display: grid;
  gap: 9px;
}
.bus-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.bus-time-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border: 1px solid #123c70;
  border-radius: 8px;
  background: #fff;
  color: #123c70;
  font-size: 0.98rem;
  font-weight: 850;
}
.bus-no-later {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-style: italic;
}
.bus-widget-footer {
  justify-content: center;
  color: var(--text-light);
  font-size: 0.74rem;
  text-align: center;
}
.bus-validity-warning {
  display: grid;
  gap: 2px;
  width: min(100%, 620px);
  padding: 10px 13px;
  border: 1px solid #f2c7ad;
  border-left: 4px solid #ed641c;
  border-radius: 8px;
  background: #fff7f2;
  color: #8d390e;
  font-size: 0.82rem;
}
.bus-admin-modal {
  width: min(94vw, 720px);
  padding: 32px 36px;
}
.bus-admin-help {
  margin: -8px 0 20px;
  font-size: 0.84rem;
}
.bus-validity-grid,
.bus-admin-selector-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 18px;
  margin-bottom: 18px;
}
.bus-admin-field,
.bus-times-field {
  display: grid;
  align-content: start;
  gap: 8px;
  color: var(--text-main);
  font-size: 0.84rem;
  font-weight: 750;
}
.bus-admin-field > label,
.bus-admin-field > span:first-child,
.bus-times-field > span:first-child {
  min-height: 20px;
  line-height: 20px;
}
.bus-field-optional {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
}
.bus-admin-field .form-input,
.bus-admin-field .form-select,
.bus-times-field .form-input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text-main);
  font-family: var(--font-body);
}
.bus-admin-field .form-input,
.bus-admin-field .form-select {
  height: 44px;
  padding: 9px 12px;
  font-size: 0.9rem;
  font-weight: 600;
}
.bus-admin-field .form-input:focus,
.bus-admin-field .form-select:focus,
.bus-times-field .form-input:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(184, 123, 40, 0.12);
}
.bus-validity-action {
  min-height: 20px;
  line-height: 20px;
}
.bus-times-field textarea {
  min-height: 150px;
  padding: 12px 14px;
  resize: vertical;
  font: 750 0.95rem/1.6 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.bus-times-field small {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 500;
}
.bus-clear-validity {
  justify-self: start;
  border: 0;
  padding: 0;
  background: transparent;
  color: #123c70;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 750;
  text-decoration: underline;
  cursor: pointer;
}

/* Synchronized 3D Flip za sve 3 Trajektne Kartice i Tekst Smjera (Istovremeno) */
.ferry-3col-grid {
  perspective: 1200px;
}

.ferry-col-card {
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.22s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  transform-style: preserve-3d;
}

.ferry-col-card.card-flipping-out {
  transform: rotateY(90deg) scale(0.96);
  opacity: 0.15;
}

.ferry-col-card.card-flipping-in {
  transform: rotateY(-90deg) scale(0.96);
  opacity: 0.15;
}

.ferry-dir-label {
  perspective: 600px;
}

.dir-route-highlight {
  display: inline-block;
  transition: transform 0.22s ease, opacity 0.22s ease;
  transform-style: preserve-3d;
}

.dir-route-highlight.text-flipping-out {
  transform: rotateX(90deg);
  opacity: 0;
}

.dir-route-highlight.text-flipping-in {
  transform: rotateX(-90deg);
  opacity: 0;
}

/* ==========================================================================
   FERRY LIVE ALERT BANNER & FERRY ADMIN MODAL STYLES (SQLite • v5.1.6)
   ========================================================================== */
.ferry-live-alert-banner {
  background: linear-gradient(135deg, #FFF3CD 0%, #FFE69C 100%);
  border: 1px solid #FFECB5;
  border-left: 4px solid #d9534f;
  color: #664d03;
  padding: 10px 14px;
  border-radius: 8px;
  margin: 0 16px 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  box-shadow: 0 2px 8px rgba(217, 83, 79, 0.15);
}
.ferry-alert-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}
.ferry-alert-text strong {
  color: #842029;
  font-weight: 700;
  margin-right: 4px;
}
.widget-subtitle-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ferry-admin-modal {
  max-width: 980px !important;
  width: 95% !important;
  padding: 36px 40px !important;
}
.ferry-admin-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 4px 0 24px; padding: 5px; border: 1px solid var(--border-light); border-radius: 12px; background: var(--bg-card-hover, rgba(255,255,255,0.04)); }
.ferry-admin-tab { border: 1px solid transparent; border-radius: 9px; padding: 10px 8px; background: transparent; color: var(--text-muted); font: inherit; font-weight: 800; cursor: pointer; }
.ferry-admin-tab span { display: block; margin-top: 2px; font-size: 0.72rem; font-weight: 600; }
.ferry-admin-tab.active { background: #0069AA; color: #fff; box-shadow: 0 4px 12px rgba(0,105,170,0.22); }
.ferry-line-mode-summary { margin: -12px 0 22px; padding: 10px 12px; border-left: 3px solid #0069AA; background: rgba(0,105,170,0.07); color: var(--text-muted); border-radius: 0 8px 8px 0; font-size: 0.84rem; line-height: 1.45; }
.ferry-line-mode-summary strong { color: var(--text-main); }
.ferry-rules-help { margin-bottom: 14px; font-size: 0.86rem; line-height: 1.5; }
.ferry-rule-card { border: 1px solid var(--border-light); border-radius: 10px; margin-bottom: 12px; overflow: hidden; }
.ferry-rule-card-heading { padding: 11px 14px; background: var(--bg-card-hover, rgba(255,255,255,0.04)); display: flex; align-items: center; gap: 8px; }
.ferry-rule-card-heading strong { display: inline-block; min-width: 30px; color: #0069AA; font-size: 1.05rem; }
.ferry-rule-card-heading span { color: var(--text-muted); font-size: 0.82rem; }
.ferry-rule-delete-marker { margin-left: auto; border: 0; background: transparent; color: #b42318; font: inherit; font-size: 0.78rem; font-weight: 700; cursor: pointer; }
.ferry-rule-card-body { padding: 14px; display: grid; gap: 12px; }
.ferry-rule-field { display: grid; gap: 6px; color: var(--text-main); font-size: 0.84rem; font-weight: 700; }
.ferry-rule-field small { color: var(--text-muted); font-weight: 400; }
.ferry-rule-groups { display: grid; gap: 10px; }
.ferry-rule-group { padding: 12px; border: 1px dashed var(--border-light); border-radius: 9px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ferry-rule-group-heading { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; }
.ferry-rule-remove { border: 0; background: transparent; color: var(--text-muted); font-size: 1.4rem; cursor: pointer; }
.ferry-rule-checks { display: flex; flex-wrap: wrap; gap: 6px 12px; font-weight: 500; }
.ferry-rule-ranges { display: grid; gap: 7px; }
.ferry-rule-range-row { display: flex; align-items: center; gap: 7px; }
.ferry-month-day-input,
.ferry-rule-range-row .flatpickr-input + .form-input-sm { width: 82px !important; cursor: pointer; }
.ferry-add-range { justify-self: start; padding: 6px 10px; font-size: 0.78rem; }
.ferry-rule-add-group { justify-self: start; }
.ferry-rules-empty { padding: 18px; border: 1px dashed var(--border-light); border-radius: 9px; display: grid; gap: 4px; color: var(--text-muted); text-align: center; }
.ferry-rules-empty strong { color: var(--text-main); }
.ferry-add-marker { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ferry-add-marker > span { margin-right: auto; color: var(--text-muted); font-size: 0.8rem; }
.ferry-rules-actions { display: flex; justify-content: flex-end; margin-top: 14px; }
.ferry-seasons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 12px;
}
@media (max-width: 640px) {
  .ferry-admin-modal { padding: 24px 18px !important; }
  .ferry-admin-tabs { grid-template-columns: 1fr; }
  .ferry-admin-tab span { display: inline; margin-left: 4px; }
  .ferry-rule-group { grid-template-columns: 1fr; }
  .ferry-rule-group-heading { grid-column: 1; }
  .ferry-seasons-grid {
    grid-template-columns: 1fr;
  }
}
.season-edit-box {
  background: var(--bg-body);
  border: 1px solid var(--border-color);
  padding: 18px 20px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}
.season-inputs {
  display: flex;
  align-items: center;
  gap: 10px;
}
.form-input-sm {
  width: 76px;
  padding: 7px 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: monospace;
  background: #FFFFFF;
  color: var(--text-main);
}
.form-input-sm:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 2px rgba(197, 155, 39, 0.15);
}
.schedule-selector-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1.3fr;
  gap: 12px;
  margin: 16px 0;
}
@media (max-width: 700px) {
  .schedule-selector-row {
    grid-template-columns: 1fr;
  }
}

/* Mobilni prikaz: kompaktno zaglavlje i trajektni gadget bez rezanja sadržaja. */
@media (max-width: 680px) {
  .site-header {
    position: relative;
    padding: 10px 12px;
  }

  .header-container {
    gap: 9px;
  }

  .brand {
    width: 100%;
    gap: 10px;
  }

  .brand-crest-left,
  .header-crest-img {
    height: 48px;
  }

  .brand-divider {
    height: 38px;
    margin: 0 1px;
  }

  .brand-text-wrapper {
    min-width: 0;
    padding-bottom: 13px;
  }

  .brand-title {
    font-size: clamp(1.18rem, 6.2vw, 1.42rem);
    letter-spacing: 0.025em;
  }

  .brand-subtitle {
    gap: 5px;
    font-size: clamp(0.47rem, 2.45vw, 0.58rem);
    letter-spacing: 0.07em;
  }

  .header-controls {
    flex-wrap: nowrap;
    gap: 7px;
  }

  #appVersionHeader {
    display: none !important;
  }

  .logged-user-display {
    min-width: 0;
    padding: 6px 10px;
  }

  .active-brother-name {
    max-width: 112px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .header-controls > div:last-child {
    flex: 0 0 auto;
    gap: 5px !important;
    margin-left: 0 !important;
    padding-left: 7px !important;
  }

  .btn-notif,
  .btn-lock {
    width: 38px;
    height: 38px;
    padding: 0;
  }

  .hero-switcher-container {
    margin-top: 10px;
  }

  .dashboard-container {
    padding: 10px 8px 56px;
  }

  .dashboard-header-bar {
    margin-bottom: 18px;
    padding: 18px;
  }

  .dashboard-personal-section {
    border-radius: 10px;
  }

  .dashboard-gadgets-section .dashboard-widgets-layout {
    min-width: 0;
    padding: 8px;
  }

  .dashboard-widget-card,
  .dashboard-widgets-grid,
  .card-widget-ferries,
  .card-widget-bus {
    min-width: 0;
    max-width: 100%;
  }

  .widget-card-header {
    gap: 10px;
    padding: 16px 14px 12px;
  }

  .widget-card-header > * {
    min-width: 0;
  }

  .widget-card-body {
    min-width: 0;
    gap: 14px;
    padding: 16px 14px 18px;
  }

  .widget-ferry-body {
    padding-inline: 10px;
  }

  .widget-card-footer {
    gap: 10px;
    padding: 13px 14px;
  }

  .ferry-direction-banner {
    align-items: stretch;
    margin-bottom: 16px;
    padding: 12px 14px;
  }

  .ferry-dir-label {
    min-width: 0;
    flex-wrap: wrap;
    gap: 5px 8px;
  }

  .ferry-daytype-badge {
    flex: 0 1 auto;
    max-width: 48%;
    padding: 4px 9px;
    white-space: normal;
    text-align: center;
    line-height: 1.25;
  }

  .ferry-3col-grid {
    min-width: 0;
    gap: 16px;
  }

  .ferry-col-card {
    min-width: 0;
    padding: 16px 12px;
  }

  .ferry-col-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 8px 10px;
  }

  .ferry-col-route {
    min-width: 0;
    overflow-wrap: anywhere;
    line-height: 1.35;
  }

  .ferry-col-main {
    min-width: 0;
    gap: 10px;
    margin: 13px 0 15px;
    padding-bottom: 15px;
  }

  .ferry-time-large {
    min-width: 0;
    font-size: clamp(1.9rem, 11vw, 2.25rem);
  }

  .ferry-countdown-badge {
    flex: 0 1 auto;
    padding: 5px 9px;
    font-size: 0.78rem;
    line-height: 1.2;
    text-align: center;
  }

  .ferry-countdown-badge.immediate {
    flex-basis: 28px;
    padding: 0;
    font-size: 1rem;
  }

  .ferry-time-pill {
    padding: 5px 11px;
    font-size: 0.95rem;
  }

  .bus-direction-banner {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 10px;
    padding: 12px 14px;
  }

  .bus-direction-banner > em {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .bus-route-card {
    min-width: 0;
    padding: 17px 16px;
  }

  .bus-next-row {
    min-width: 0;
    gap: 10px;
    margin: 14px 0;
    padding-bottom: 14px;
  }

  .bus-time-large {
    min-width: 0;
    font-size: clamp(1.9rem, 11vw, 2.3rem);
  }

  .bus-countdown {
    flex: 0 1 auto;
    padding: 5px 9px;
    font-size: 0.76rem;
  }

  .bus-time-pill {
    padding: 5px 10px;
    font-size: 0.92rem;
  }

  .bus-admin-modal {
    padding: 24px 18px;
  }

  .bus-validity-grid,
  .bus-admin-selector-grid {
    grid-template-columns: 1fr;
  }

  .bus-validity-grid > .bus-admin-field:first-child .bus-validity-action {
    display: none;
  }
}

@media (max-width: 360px) {
  .brand-title {
    font-size: 1.08rem;
  }

  .brand-subtitle {
    font-size: 0.45rem;
  }

  .active-brother-name {
    max-width: 78px;
  }

  .hero-switcher-container {
    padding-inline: 8px;
  }

  .app-switcher {
    gap: 2px;
    padding-inline: 3px;
  }

  .switcher-btn {
    min-width: 0;
    gap: 3px;
    padding: 7px 5px;
    font-size: 0.76rem;
  }

  .switcher-icon {
    width: 14px;
    height: 14px;
  }

  .ferry-direction-banner {
    flex-direction: column;
  }

  .ferry-daytype-badge {
    align-self: flex-start;
    max-width: 100%;
  }

  .bus-direction-banner {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

/* ==========================================================================
   ETAPA 2 v5.4.0 — SMIRENE, PONOVNO UPOTREBLJIVE VIZUALIZACIJE INICIJATIVA
   ========================================================================== */
.legacy-strategic-section[hidden] { display: none !important; }
.initiatives-section { padding-top: 34px; }
.initiatives-toolbar {
  max-width: 1360px;
  margin: 0 auto 12px;
  display: flex;
  justify-content: flex-end;
}
.btn-new-initiative {
  padding: 7px 13px;
  font-size: .82rem;
}
.btn-new-initiative:disabled {
  cursor: not-allowed;
  opacity: .46;
  color: var(--text-muted);
  background: rgba(255,255,255,.62);
  border-color: var(--border-light);
  box-shadow: none;
  transform: none;
}
.initiatives-section-heading {
  max-width: 1360px;
  margin: 0 auto 18px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
}
.initiatives-section-heading span,
.initiative-kicker {
  color: var(--accent-gold);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .13em;
}
.initiatives-section-heading h2 {
  margin: 4px 0 0;
  font-family: var(--font-heading);
  font-size: clamp(1.45rem, 2vw, 2rem);
  font-weight: 600;
}
.initiative-showcase {
  max-width: 1360px;
  margin: 0 auto 24px;
  padding: clamp(20px, 3vw, 32px);
  padding-left: clamp(24px, calc(3vw + 10px), 42px);
  padding-right: clamp(24px, calc(3vw + 10px), 42px);
  padding-bottom: 10px;
  border: 1px solid rgba(184,123,40,.26);
  border-radius: 18px;
  background-color: #fffdf9;
  background-image: radial-gradient(circle, rgba(154,112,53,.09) .7px, transparent .8px);
  background-size: 26px 26px;
  box-shadow: 0 16px 40px rgba(64,50,28,.08);
}
.initiative-showcase:not(:last-child) { margin-bottom: 100px; }
.initiative-showcase-header {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: stretch;
  gap: 18px;
}
.initiative-logo {
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  border: 1px solid rgba(184,123,40,.3);
  border-radius: 16px;
  background: var(--accent-gold-light);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.initiative-logo.large { width: 118px; height: 118px; }
.initiative-showcase-header > .initiative-logo {
  position: relative;
  width: 78px;
  height: auto;
  min-height: 0;
  align-self: stretch;
}
.initiative-showcase-header > .initiative-logo .initiative-logo-image {
  position: absolute;
  inset: 0;
}
.initiative-logo-image {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
}
.initiative-emblem-text { color: var(--accent-gold); font-size: 1.45rem; font-weight: 800; }
.initiative-heading-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.initiative-heading-copy h3 {
  margin: 0 0 5px;
  color: var(--text-main);
  font-family: var(--font-heading);
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  font-weight: 600;
}
.initiative-heading-copy p { max-width: 830px; margin: 0; color: var(--text-muted); line-height: 1.55; }
.initiative-header-actions { display: flex; align-items: center; align-self: center; gap: 12px; }
.initiative-leader {
  padding: 6px 11px;
  border-radius: 999px;
  background: var(--bg-body);
  color: var(--text-muted);
  font-size: .78rem;
}
.btn-icon-edit {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  background: #fff;
  color: var(--accent-gold);
  font-size: 1.05rem;
  cursor: pointer;
  transition: var(--transition);
}
.btn-icon-edit:hover {
  border-color: var(--accent-gold);
  background: var(--accent-gold-light);
  box-shadow: 0 5px 12px rgba(103,72,30,.12);
  transform: translateY(-1px);
}
.initiative-projects { margin-top: 42px; }
.initiative-project {
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
  transition: transform .2s cubic-bezier(.2,.75,.3,1), border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
}
.initiative-timeline {
  --timeline-card-width: 250px;
  --timeline-gap: 44px;
  display: flex;
  gap: var(--timeline-gap);
  position: relative;
  overflow-x: auto;
  overflow-y: visible;
  padding: 12px 10px 38px;
  margin-left: -10px;
  margin-right: -10px;
  margin-bottom: -18px;
  scroll-snap-type: x proximity;
  scroll-padding-inline: 10px;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(184,123,40,.42) transparent;
}
.initiative-timeline::-webkit-scrollbar { height: 6px; }
.initiative-timeline::-webkit-scrollbar-track { background: transparent; }
.initiative-timeline::-webkit-scrollbar-thumb { background: rgba(184,123,40,.38); border-radius: 999px; }
.initiative-timeline:focus-visible {
  outline: 2px solid rgba(184,123,40,.38);
  outline-offset: 4px;
  border-radius: 12px;
}
.initiative-timeline .initiative-project {
  position: relative;
  z-index: 1;
  flex: 0 0 var(--timeline-card-width);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 31px;
  border: 0;
  background: transparent;
  text-align: center;
  scroll-snap-align: start;
}
.initiative-timeline .initiative-project::before,
.initiative-timeline .initiative-project:last-child::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: 20px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg,rgba(184,123,40,.3),rgba(184,123,40,.58));
}
.initiative-timeline .initiative-project:not(:first-child)::before {
  right: calc(50% + 21px);
  width: calc(var(--timeline-card-width) + var(--timeline-gap) - 42px);
}
.initiative-timeline .initiative-project:first-child::before {
  right: calc(50% + 21px);
  width: calc((var(--timeline-card-width) - 42px) / 2);
}
.initiative-timeline .initiative-project:last-child::after {
  left: calc(50% + 21px);
  width: calc((var(--timeline-card-width) - 42px) / 2);
  background: linear-gradient(90deg,rgba(184,123,40,.58),rgba(184,123,40,.18));
}
.initiative-project-marker {
  position: relative;
  z-index: 2;
  width: 42px;
  height: 42px;
  border: 2px solid #d8cbb7;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  font-weight: 800;
  transition: color .2s ease, background-color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s cubic-bezier(.2,.75,.3,1);
}
.initiative-timeline .initiative-project-marker {
  font-family: var(--font-heading);
  font-size: 1.16rem;
  font-weight: 750;
}
.initiative-project-copy {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 132px;
  padding: 15px 14px 34px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: rgba(250,248,244,.95);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease, transform .2s cubic-bezier(.2,.75,.3,1);
}
.initiative-project-copy strong { font-family: var(--font-heading); font-size: clamp(1.2rem,1.35vw,1.4rem); line-height: 1.25; }
.initiative-timeline .initiative-project-copy { gap: 14px; padding: 18px 16px 36px; }
.initiative-timeline .initiative-project-copy::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: -7px;
  left: 50%;
  width: 13px;
  height: 13px;
  border-top: 1px solid var(--border-color);
  border-left: 1px solid var(--border-color);
  background: rgb(250,248,244);
  transform: translateX(-50%) rotate(45deg);
  pointer-events: none;
  transition: border-color .2s ease, background-color .2s ease;
}
.initiative-key-moment {
  color: var(--accent-gold-dark,#93641f);
  font-size: .79rem;
  line-height: 1.3;
  font-weight: 650;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.initiative-key-moment-label,
.initiative-key-moment-date { display: block; }
.initiative-key-moment-date {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 9px;
  color: rgba(26, 22, 18, 0.62);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.initiative-task-ratio {
  position: absolute;
  right: 12px;
  bottom: 9px;
  color: var(--text-muted);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .02em;
}
.initiative-project.is-complete .initiative-project-marker { background: #d7e7d9; border-color: #6f9276; color: #45674c; }
.initiative-project.is-complete .initiative-project-copy { background: rgba(247,249,246,.95); }
.initiative-timeline .initiative-project.is-complete .initiative-project-copy::before { background: rgb(247,249,246); }
.initiative-project.is-focus .initiative-project-marker {
  color: #fff;
  border-color: var(--accent-gold);
  background: var(--accent-gold);
  box-shadow: 0 0 0 5px rgba(184,123,40,.22);
}
.initiative-steps { display: flex; flex-direction: column; gap: 10px; max-width: 980px; margin-left: auto; margin-right: auto; }
.initiative-steps .initiative-project {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 13px 15px;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background: var(--bg-body);
}
.initiative-steps .initiative-project:nth-child(even) { margin-left: 4%; width: 96%; }
.initiative-steps .initiative-project-copy { min-height: 52px; padding: 0 44px 0 0; border: 0; background: transparent; }
.initiative-steps .initiative-task-ratio { right: 0; bottom: 0; }
.initiative-map {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: flex-start;
  column-gap: 48px;
  row-gap: 28px;
}
.initiative-map .initiative-project {
  flex: 1 1 260px;
  width: 100%;
  max-width: 320px;
  min-height: 150px;
  padding: 18px;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  background: linear-gradient(145deg,#fff,var(--bg-body));
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.initiative-map .initiative-project-copy { min-height: 88px; padding: 0 0 24px; border: 0; background: transparent; }
.initiative-map .initiative-task-ratio { right: 0; bottom: 0; }
@media (hover: hover) and (pointer: fine) {
  .initiative-project:hover {
    z-index: 4;
    transform: translateY(-3px) scale(1.025);
  }
  .initiative-timeline .initiative-project:hover {
    transform: none;
  }
  .initiative-timeline .initiative-project:hover .initiative-project-marker,
  .initiative-timeline .initiative-project:hover .initiative-project-copy {
    transform: translateY(-3px) scale(1.025);
  }
  .initiative-timeline .initiative-project:hover .initiative-project-copy {
    border-color: rgba(184,123,40,.4);
    background: #fff;
    box-shadow: 0 13px 24px rgba(64,50,28,.16);
  }
  .initiative-timeline .initiative-project:hover .initiative-project-copy::before {
    border-color: rgba(184,123,40,.4);
    background: #fff;
  }
  .initiative-project:hover .initiative-project-marker {
    box-shadow: 0 10px 18px rgba(64,50,28,.2);
  }
  .initiative-project.is-focus:hover .initiative-project-marker {
    box-shadow: 0 0 0 5px rgba(184,123,40,.22), 0 10px 18px rgba(64,50,28,.22);
  }
  .initiative-steps .initiative-project:hover,
  .initiative-map .initiative-project:hover {
    border-color: rgba(184,123,40,.4);
    background-color: #fff;
    box-shadow: 0 13px 24px rgba(64,50,28,.16);
  }
}
.initiative-showcase-footer {
  min-height: 36px;
  margin-top: 9px;
  padding-top: 0;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: .8rem;
}
.initiative-map + .initiative-showcase-footer { margin-top: 24px; }
.initiative-add-project {
  margin-left: auto;
  font-size: 1.25rem;
  line-height: 1;
}
.initiative-empty,.projects-empty {
  max-width: 1360px;
  margin: 0 auto;
  padding: 36px;
  border: 1px dashed var(--border-color);
  border-radius: 15px;
  background: rgba(255,255,255,.7);
  text-align: center;
}
.project-card { position: relative; }
.project-card-actions { position: absolute; top: 14px; right: 14px; z-index: 2; }
.project-card .card-title { margin-right: 42px; }
.project-status-row { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin: 0 0 8px; }
.project-card-owner,
.project-card-activity,
.project-card-stat {
  display: inline-flex;
  align-items: center;
}
.project-card-owner {
  min-width: 0;
  gap: 6px;
  color: var(--text-muted);
  font-weight: 500;
}
.project-card-owner span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-card-activity { flex: 0 0 auto; gap: 14px; }
.project-card-stat {
  gap: 5px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.project-card-meta-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  opacity: .78;
}

/* ========================================================================== */
/* T-03 — ZAJEDNIČKE KOMPONENTE DATOTEKA                                    */
/* ========================================================================== */

.project-content-files,
.board-editor-files {
  margin-top: 28px;
}

.project-content-files > .modal-section-title {
  margin-top: 0;
}

.content-file-list {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.content-file-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  background: var(--bg-card, #fff);
}

.content-file-card.is-uploading,
.content-file-card.is-queued {
  border-color: rgba(197, 155, 39, 0.5);
  background: rgba(197, 155, 39, 0.06);
}

.content-file-card.is-error,
.content-file-card.is-unavailable {
  border-color: rgba(185, 74, 72, 0.4);
  background: rgba(185, 74, 72, 0.05);
}

.content-file-icon,
.content-file-drop-icon {
  display: grid;
  place-items: center;
  color: var(--primary, #8a6b21);
}

.content-file-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.content-file-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.content-file-name {
  overflow: hidden;
  color: var(--text-main);
  font-size: 0.86rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content-file-meta,
.content-file-message {
  color: var(--text-muted);
  font-size: 0.74rem;
  line-height: 1.35;
}

.content-file-card.is-error .content-file-message,
.content-file-card.is-unavailable .content-file-message {
  color: #9f3f3d;
}

.content-file-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.content-file-action {
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
}

.content-file-action:hover,
.content-file-action:focus-visible {
  border-color: var(--border-light);
  color: var(--primary, #8a6b21);
  background: rgba(197, 155, 39, 0.08);
  outline: none;
}

.content-file-action.is-danger:hover,
.content-file-action.is-danger:focus-visible {
  color: #a33f3d;
  background: rgba(185, 74, 72, 0.08);
}

.content-file-action svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.content-files-empty {
  padding: 12px;
  border: 1px dashed var(--border-light);
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 0.82rem;
  text-align: center;
}

.content-file-dropzone {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding: 14px;
  border: 1.5px dashed rgba(138, 107, 33, 0.45);
  border-radius: 12px;
  background: rgba(197, 155, 39, 0.04);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.content-file-dropzone.is-drag-over {
  border-color: var(--primary, #8a6b21);
  background: rgba(197, 155, 39, 0.12);
  transform: translateY(-1px);
}

.content-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.content-file-drop-icon svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.content-file-dropzone > div:nth-of-type(2) {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.content-file-dropzone strong {
  color: var(--text-main);
  font-size: 0.84rem;
}

.content-file-dropzone span {
  color: var(--text-muted);
  font-size: 0.73rem;
  line-height: 1.35;
}

.board-post-files {
  margin-top: 12px;
}

.board-post-files .content-file-card,
.board-recent-files .content-file-card {
  padding: 8px 9px;
  background: rgba(255, 255, 255, 0.72);
}

.board-recent-files {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.board-recent-files > strong {
  color: var(--text-main);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

@media (max-width: 640px) {
  .content-file-card {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .content-file-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
    border-top: 1px solid var(--border-light);
    padding-top: 6px;
  }

  .content-file-dropzone {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .content-file-browse {
    grid-column: 1 / -1;
    width: 100%;
  }
}
.calm-progress { margin: 14px 0; color: var(--text-muted); font-size: .76rem; }
.calm-progress > div { margin-top: 6px; height: 4px; background: #ece7de; border-radius: 8px; overflow: hidden; }
.calm-progress i { display: block; height: 100%; background: linear-gradient(90deg,#cfaa65,var(--accent-gold)); border-radius: inherit; }
.project-detail-progress { margin: 18px 0 22px; }
.project-detail-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-right: 58px;
}
.project-detail-edit {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 15px;
  border-radius: 999px;
  color: var(--text-main);
  background: #fff;
  box-shadow: 0 2px 8px rgba(51, 43, 33, .04);
  transition: transform .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.project-detail-edit:hover {
  transform: translateY(-2px);
  color: var(--accent-gold-dark, #9a6b24);
  border-color: rgba(184, 130, 52, .5);
  background: #fffdf9;
  box-shadow: 0 7px 18px rgba(88, 64, 30, .12);
}
.project-detail-tags { margin: 0 0 14px; }
.project-meta-grid { grid-template-columns: repeat(auto-fit,minmax(150px,1fr)) !important; }
.project-detail-description { margin: 18px 0 22px; line-height: 1.65; white-space: pre-wrap; }
.project-detail-footer {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto minmax(0,1fr);
  align-items: center;
  gap: 18px;
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px dashed var(--border-color);
}
.project-detail-archive { justify-self: start; }
.project-detail-done { justify-self: end; min-width: 96px; justify-content: center; }
.project-auto-save-status {
  justify-self: center;
  color: var(--text-muted);
  font-size: .78rem;
  font-weight: 600;
  text-align: center;
}
.project-auto-save-status.synced { color: #52705a; }
.project-auto-save-status.saving { color: var(--accent-gold); }
.project-auto-save-status.error { color: var(--danger, #a33a32); }

/* T-09: modalni pregled i puni projektni radni prostor */
.project-modal-preview-label,
.project-workspace-mode-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 10px;
  color: var(--text-muted);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .1em;
}
.project-preview-section { margin-top: 26px; }
.project-preview-help,
.project-workspace-edit-hint,
.project-preview-empty {
  color: var(--text-muted);
  font-size: .8rem;
  line-height: 1.5;
}
.project-preview-help { margin: -2px 0 12px; }
.project-preview-empty { margin: 10px 0; font-style: italic; }
.project-preview-tasks { display: grid; gap: 8px; }
.project-preview-task {
  margin-left: calc(var(--task-depth) * 28px);
  padding: 11px 13px;
  border: 1px solid var(--border-light);
  border-radius: 11px;
  background: #fff;
}
.project-preview-task.is-heading {
  margin-top: 7px;
  background: var(--bg-body);
  border-style: dashed;
}
.project-preview-task-row { display: flex; align-items: flex-start; gap: 10px; }
.project-preview-task-row input[type="checkbox"] { flex: 0 0 auto; margin-top: 2px; }
.project-preview-task-title { color: var(--text-main); font-size: .9rem; line-height: 1.45; }
.project-preview-task-title.is-done { text-decoration: line-through; opacity: .62; }
.project-preview-task.is-heading .project-preview-task-title { font-weight: 750; }
.project-preview-heading-marker { width: 8px; height: 8px; margin: 6px 3px 0; border-radius: 50%; background: var(--accent-gold); }
.project-preview-task-description {
  margin: 8px 0 0 26px;
  color: var(--text-muted);
  font-size: .82rem;
  line-height: 1.55;
}
.project-preview-task-description .task-desc-check-item input:disabled { opacity: .7; }
.project-preview-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid var(--border-light);
}
.project-workspace[hidden],
#projectsOverview[hidden] { display: none !important; }
.project-workspace {
  min-height: 62vh;
  padding: 26px 20px 60px;
  background: linear-gradient(180deg, rgba(248,245,239,.75), rgba(255,255,255,.25));
}
.project-workspace-shell {
  display: grid;
  gap: 20px;
  width: min(1120px, 100%);
  margin: 0 auto;
}
.project-workspace-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.project-workspace-back {
  border: 0;
  padding: 8px 2px;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: .86rem;
  font-weight: 700;
  cursor: pointer;
}
.project-workspace-back:hover { color: var(--accent-gold-dark, #9a6b24); }
.project-workspace-mode { display: flex; align-items: center; gap: 12px; }
.project-workspace-mode-label { margin: 0; }
.project-workspace-card {
  padding: clamp(20px, 3.5vw, 38px);
  border: 1px solid rgba(92,76,54,.13);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(55,44,29,.07);
}
.project-workspace-title {
  margin: 6px 0 14px;
  color: var(--text-main);
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 4vw, 2.65rem);
  line-height: 1.12;
}
.project-workspace-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}
.project-workspace-section-heading h2 { margin: 2px 0 0; font-family: var(--font-heading); font-size: 1.35rem; }
.project-workspace-section-heading .initiative-kicker { display: block; margin-bottom: 2px; }
.project-workspace-danger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-color: rgba(163,58,50,.18);
  box-shadow: none;
}
.project-workspace-danger h2 { margin: 0 0 4px; font-family: var(--font-heading); font-size: 1.2rem; }
.project-workspace-danger p { margin: 0; color: var(--text-muted); font-size: .84rem; }
.project-workspace-missing { text-align: center; }
.project-workspace-missing h1 { font-family: var(--font-heading); }
.entity-edit-form .modal-header { margin-bottom: 22px; }
.entity-edit-form .modal-header h2 { margin: 4px 0; font-family: var(--font-heading); }
.optional-time-details { margin: 18px 0; padding: 14px 16px; border: 1px solid var(--border-color); border-radius: 12px; background: var(--bg-body); }
.optional-time-details summary { cursor: pointer; font-weight: 700; color: var(--text-main); }
.optional-time-details summary span,.optional-label { color: var(--text-muted); font-size: .72rem; font-weight: 500; }
.optional-time-details[open] summary { margin-bottom: 15px; }
.completion-field { margin: 14px 0; }
.completion-check { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--text-main); }
.completion-field small { display: block; margin: 5px 0 0 24px; color: var(--text-muted); line-height: 1.45; }
.initiative-editor-main { display: grid; grid-template-columns: 150px minmax(0,1fr); gap: 26px; }
.initiative-logo-editor { display: flex; flex-direction: column; align-items: center; gap: 9px; }
.initiative-logo-editor small { color: var(--text-muted); text-align: center; }
.initiative-logo-editor input:not([type="hidden"]) { width: 100%; text-align: center; }
.logo-upload-button { cursor: pointer; }
.initiative-logo-remove {
  border: 0;
  padding: 2px 4px;
  background: transparent;
  color: var(--danger, #a33a32);
  font: inherit;
  font-size: .78rem;
  font-weight: 650;
  cursor: pointer;
}
.initiative-logo-remove:hover { text-decoration: underline; }
.modal-footer-spacer { flex: 1; }

@media (max-width: 900px) {
  .initiative-showcase-header { grid-template-columns: auto 1fr; }
  .initiative-header-actions { grid-column: 1 / -1; justify-content: space-between; }
  .initiative-timeline { --timeline-card-width: 230px; }
}
@media (max-width: 640px) {
  .initiatives-section { padding-left: 14px; padding-right: 14px; }
  .initiatives-section-heading,.project-detail-heading { align-items: stretch; flex-direction: column; }
  .initiatives-toolbar { margin-bottom: 10px; }
  .initiative-showcase-header { grid-template-columns: 52px 1fr; gap: 12px; }
  .initiative-showcase-header > .initiative-logo { width: 52px; height: 52px; min-height: 52px; align-self: center; border-radius: 12px; }
  .initiative-header-actions { align-items: center; }
  .initiative-timeline { --timeline-card-width: 220px; }
  .initiative-steps .initiative-project,.initiative-steps .initiative-project:nth-child(even) { width: 100%; margin-left: 0; grid-template-columns: auto 1fr; }
  .initiative-map .initiative-project { flex-basis: 100%; max-width: none; }
  .initiative-editor-main { grid-template-columns: 1fr; }
  .initiative-logo-editor { margin-bottom: 8px; }
  .entity-edit-form .form-row { grid-template-columns: 1fr; }
  .project-detail-heading { padding-right: 42px; }
  .project-detail-edit { align-self: flex-start; }
  .project-detail-footer { grid-template-columns: 1fr auto; }
  .project-auto-save-status { grid-column: 1 / -1; grid-row: 1; }
  .project-detail-archive { grid-column: 1; grid-row: 2; }
  .project-detail-done { grid-column: 2; grid-row: 2; }
  .project-workspace { padding: 16px 12px 42px; }
  .project-workspace-toolbar,
  .project-workspace-section-heading,
  .project-workspace-danger { align-items: stretch; flex-direction: column; }
  .project-workspace-mode { justify-content: space-between; }
  .project-workspace-card { padding: 20px 16px; border-radius: 14px; }
  .project-preview-task { margin-left: calc(var(--task-depth) * 13px); }
  .project-preview-footer { flex-direction: column-reverse; }
  .project-preview-footer .btn { width: 100%; justify-content: center; }
}

/* Hrvatski birač datuma — smiren prikaz unutar modalnih obrazaca */
.flatpickr-calendar {
  width: 318px;
  padding: 10px;
  border: 1px solid rgba(184,123,40,.24);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(45,36,24,.18);
  font-family: var(--font-body);
}
.flatpickr-calendar::before,
.flatpickr-calendar::after { display: none; }
.flatpickr-months {
  height: 44px;
  align-items: center;
  margin-bottom: 6px;
}
.flatpickr-months .flatpickr-month { height: 44px; color: var(--text-main); }
.flatpickr-current-month {
  height: 44px;
  padding-top: 9px;
  font-family: var(--font-heading);
  font-size: 1.05rem;
}
.flatpickr-current-month .cur-month { margin-left: 0; font-weight: 650; }
.flatpickr-current-month .numInputWrapper { width: 72px; margin-left: 7px; }
.flatpickr-current-month input.cur-year {
  color: var(--text-main);
  font: inherit;
  font-weight: 600;
}
.flatpickr-current-month .numInputWrapper span { display: none; }
.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
  top: 8px;
  width: 34px;
  height: 34px;
  padding: 7px;
  border-radius: 50%;
  color: var(--text-muted);
  transition: color .18s ease, background-color .18s ease, transform .18s ease;
}
.flatpickr-months .flatpickr-prev-month:hover,
.flatpickr-months .flatpickr-next-month:hover {
  color: var(--accent-gold);
  background: var(--accent-gold-light);
  transform: translateY(-1px);
}
.flatpickr-months .flatpickr-prev-month svg,
.flatpickr-months .flatpickr-next-month svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.flatpickr-months .flatpickr-prev-month:hover svg,
.flatpickr-months .flatpickr-next-month:hover svg,
.flatpickr-months .flatpickr-prev-month:hover svg path,
.flatpickr-months .flatpickr-next-month:hover svg path {
  fill: none;
  stroke: currentColor;
}
.flatpickr-weekdays { height: 30px; }
span.flatpickr-weekday {
  color: var(--text-muted);
  font-size: .72rem;
  font-weight: 700;
}
.flatpickr-days,
.dayContainer { width: 298px; min-width: 298px; max-width: 298px; }
.flatpickr-day {
  width: 40px;
  max-width: 40px;
  height: 40px;
  line-height: 40px;
  margin: 1px;
  border-radius: 50%;
  color: var(--text-main);
}
.flatpickr-day:hover,
.flatpickr-day:focus {
  border-color: var(--accent-gold-light);
  background: var(--accent-gold-light);
}
.flatpickr-day.today { border-color: rgba(184,123,40,.55); }
.flatpickr-day.selected,
.flatpickr-day.selected:hover,
.flatpickr-day.selected:focus {
  border-color: var(--accent-gold);
  background: var(--accent-gold);
  color: #fff;
}
.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay { color: #bbb3a7; }

.schedule-selector-row .form-select {
  width: 100%;
  padding: 10px 14px;
  font-size: 0.92rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: #FFFFFF;
  color: var(--text-main);
  font-weight: 600;
}
.schedule-selector-row .form-select:focus {
  outline: none;
  border-color: var(--accent-gold);
}
.schedule-times-editor {
  margin-bottom: 8px;
}
.schedule-times-editor textarea {
  width: 100%;
  font-family: monospace;
  font-size: 1.05rem;
  padding: 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-body);
  color: var(--text-main);
  line-height: 1.8;
  letter-spacing: 0.04em;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.03);
}
.schedule-times-editor textarea:focus {
  outline: none;
  border-color: var(--accent-gold);
}
.badge-season {
  background: linear-gradient(135deg, #0069AA 0%, #005086 100%);
  color: #FFFFFF;
  padding: 4px 14px;
  border-radius: 9999px;
  font-size: 0.88rem;
  font-weight: 700;
  display: inline-block;
  letter-spacing: 0.04em;
  box-shadow: 0 2px 6px rgba(0, 105, 170, 0.2);
}

/* ==========================================================================
   T-04 v5.9.0 — ARHIVA SADRŽAJA I SIGURNO VRAĆANJE
   ========================================================================== */
.archive-view-content {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 28px 64px;
}

.archive-shell {
  min-width: 0;
}

.archive-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.archive-eyebrow {
  display: block;
  margin-bottom: 6px;
  color: var(--accent-gold);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .14em;
}

.archive-header h2 {
  margin: 0;
  color: var(--text-main);
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
}

.archive-header p {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--text-muted);
  line-height: 1.65;
}

.archive-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-bottom: 20px;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.archive-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 9px 14px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: var(--bg-card);
  color: var(--text-muted);
  font: inherit;
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
}

.archive-filter span {
  min-width: 1.45rem;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--bg-alt);
  color: var(--text-main);
  text-align: center;
  font-size: .72rem;
}

.archive-filter:hover,
.archive-filter:focus-visible,
.archive-filter.is-active {
  border-color: rgba(184, 123, 40, .45);
  background: #fff;
  color: var(--text-main);
  outline: none;
  box-shadow: 0 4px 14px rgba(184, 123, 40, .1);
}

.archive-filter.is-active span {
  background: rgba(184, 123, 40, .14);
  color: var(--accent-gold-dark, #8f5f1c);
}

.archive-feedback {
  min-height: 1.3rem;
  color: var(--text-muted);
  font-size: .9rem;
}

.archive-list {
  display: grid;
  gap: 16px;
}

.archive-item {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow: 0 8px 26px rgba(55, 45, 31, .06);
}

.archive-item.is-expired {
  border-style: dashed;
}

.archive-item.is-parent-blocked {
  border-color: rgba(184, 123, 40, .42);
}

.archive-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.archive-item-head > div {
  min-width: 0;
}

.archive-item h3 {
  overflow-wrap: anywhere;
  margin: 7px 0 4px;
  color: var(--text-main);
  font-family: var(--font-heading);
  font-size: 1.55rem;
}

.archive-item-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.archive-type-badge,
.archive-status-badge {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.archive-type-badge {
  background: var(--bg-alt);
  color: var(--text-muted);
}

.archive-status-badge.is-archived {
  background: rgba(95, 109, 96, .12);
  color: #526553;
}

.archive-status-badge.is-expired {
  background: rgba(184, 123, 40, .12);
  color: #855917;
}

.archive-origin,
.archive-author,
.archive-lifecycle-meta,
.archive-context-note {
  margin: 0;
  color: var(--text-muted);
  font-size: .84rem;
}

.archive-lifecycle-meta {
  margin-top: 14px;
}

.archive-summary {
  max-width: 850px;
  margin: 14px 0 0;
  color: var(--text-main);
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.archive-author {
  margin-top: 8px;
}

.archive-parent-warning {
  margin-top: 14px;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  background: rgba(184, 123, 40, .1);
  color: #6f4c18;
  font-size: .86rem;
  line-height: 1.5;
}

.archive-children-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.archive-children-summary > span {
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--bg-alt);
  color: var(--text-muted);
  font-size: .78rem;
  font-weight: 700;
}

.archive-children-summary .archive-parent-warning {
  flex-basis: 100%;
}

.archive-context-details {
  margin-top: 16px;
  border-top: 1px solid var(--border-light);
  padding-top: 12px;
}

.archive-context-details summary {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: var(--text-main);
  font-size: .88rem;
  font-weight: 750;
  cursor: pointer;
}

.archive-context-details summary span {
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--bg-alt);
  color: var(--text-muted);
  font-size: .72rem;
}

.archive-context-group {
  margin-top: 14px;
}

.archive-task-list,
.archive-note-list {
  display: grid;
  gap: 7px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.archive-task-list li {
  display: flex;
  gap: 8px;
  margin-left: calc(var(--archive-depth, 0) * 18px);
  color: var(--text-main);
  font-size: .86rem;
  overflow-wrap: anywhere;
}

.archive-task-state {
  flex: 0 0 1.1rem;
  color: var(--accent-gold);
  text-align: center;
}

.archive-note-list li {
  display: grid;
  gap: 3px;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  color: var(--text-main);
  font-size: .84rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.archive-note-list li span {
  color: var(--text-muted);
  font-size: .74rem;
}

.archive-files .content-file-list {
  margin-top: 12px;
}

.archive-empty {
  display: grid;
  gap: 6px;
  place-items: center;
  padding: 44px 22px;
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
  text-align: center;
}

.archive-empty strong {
  color: var(--text-main);
}

@media (max-width: 680px) {
  .switcher-btn {
    min-width: 0;
    padding-inline: 7px;
    font-size: .8rem;
  }

  .archive-view-content {
    padding: 18px 16px 48px;
  }

  .archive-header,
  .archive-item-head {
    flex-direction: column;
  }

  .archive-refresh,
  .archive-restore-button {
    width: 100%;
  }

  .archive-item {
    padding: 17px;
  }

  .archive-item h3 {
    font-size: 1.35rem;
  }

  .archive-context-details summary {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .switcher-btn {
    flex-direction: column;
    gap: 2px;
    padding: 6px 3px;
    font-size: .7rem;
  }
}

/* ==========================================================================
   OSOBNA NAVIGACIJA I MOBILNI IZBORNIK
   ========================================================================== */

.navigation-settings-modal {
  width: min(94vw, 760px);
}

.navigation-view-option,
.navigation-default-option {
  min-height: 62px;
}

.navigation-default-option:has(input:disabled) {
  opacity: .48;
  cursor: not-allowed;
}

@media (max-width: 639px) {
  .navigation-settings-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 520px) {
  .hero-switcher-container {
    padding-inline: 12px;
  }

  .app-switcher {
    width: auto;
    max-width: 100%;
    justify-content: center;
    gap: 5px;
    padding: 5px;
  }

  .switcher-btn {
    flex: 0 1 52px;
    min-width: 44px;
    min-height: 44px;
    padding: 9px;
    gap: 0;
  }

  .switcher-icon {
    width: 23px;
    height: 23px;
  }

  .switcher-label {
    display: none;
  }

  .user-settings-chevron {
    display: none;
  }
}

/* Personal projects share the existing project layout. */
.personal-projects-heading { margin-bottom: 1.5rem; }
.personal-projects-heading h2 { margin: 0 0 .4rem; }
.personal-projects-heading p { margin: 0; color: var(--text-muted); }

/* ==========================================================================
   T-13 — OBAVIJESTI I OGLASNA PLOČA ZAJEDNICE
   ========================================================================== */

.notifications-view-shell {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 10px 28px 64px;
  box-sizing: border-box;
}

.notifications-view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  padding: 17px 20px 17px 22px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: linear-gradient(125deg, rgba(250, 244, 235, .82), var(--bg-card));
  box-shadow: var(--shadow-sm);
}

.notifications-view-header h2 {
  margin: 2px 0 0;
  color: var(--text-main);
  font-family: var(--font-heading);
  font-size: 1.55rem;
  letter-spacing: .015em;
}

.notifications-section-heading p {
  max-width: 720px;
  margin: 0;
  color: var(--text-muted);
  line-height: 1.6;
}

.notifications-read-all {
  flex: 0 0 auto;
}

.notifications-read-all:disabled {
  cursor: default;
  opacity: .52;
}

.community-board-tabs {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px;
  border: 1px solid rgba(151, 132, 88, .18);
  border-radius: 15px;
  background: rgba(255, 255, 255, .58);
}

.community-board-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: .88rem;
  font-weight: 750;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease, color .2s ease;
}

.community-board-tab span {
  min-width: 1.35rem;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(91, 107, 79, .09);
  font-size: .7rem;
  text-align: center;
}

.community-board-tab:hover,
.community-board-tab:focus-visible {
  background: rgba(255, 255, 255, .82);
  color: var(--text-main);
  outline: none;
}

.community-board-tab:focus-visible {
  box-shadow: 0 0 0 3px rgba(184, 123, 40, .18);
}

.community-board-tab.is-active {
  border-color: rgba(184, 123, 40, .24);
  background: #fff;
  color: var(--text-main);
  box-shadow: 0 4px 13px rgba(70, 62, 43, .1);
}

.community-board-tab.is-active span {
  background: rgba(184, 123, 40, .14);
  color: var(--accent-gold);
}

.community-board-tab.has-unread:not(.is-active)::after {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-gold);
  content: '';
}

.prayer-intentions-host {
  margin: 0;
}

.prayer-section {
  overflow: hidden;
  border: 1px solid rgba(151, 132, 88, .28);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(255, 252, 245, .98), rgba(247, 243, 231, .92));
  box-shadow: var(--shadow-sm);
}

.prayer-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 26px 20px;
  border-bottom: 1px solid rgba(151, 132, 88, .18);
}

.prayer-section-header h3 {
  margin: 3px 0 5px;
  color: var(--text-main);
  font-family: var(--font-heading);
  font-size: 1.7rem;
}

.prayer-section-header p,
.prayer-empty-state p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.55;
}

.prayer-section-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.prayer-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
  padding: 20px;
}

.prayer-card {
  min-width: 0;
  min-height: 205px;
  border: 1px solid rgba(151, 132, 88, .25);
  border-radius: 14px;
  background: rgba(255, 255, 255, .84);
  box-shadow: 0 5px 18px rgba(70, 62, 43, .06);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  transform-style: preserve-3d;
}

.prayer-card:hover,
.prayer-card:focus-within {
  border-color: rgba(151, 132, 88, .48);
  box-shadow: 0 8px 24px rgba(70, 62, 43, .11);
}

.prayer-card.is-open {
  transform: rotateY(1deg) translateY(-2px);
}

.prayer-card-front {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 203px;
  padding: 28px 18px 20px;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: var(--text-main);
  font: inherit;
  text-align: center;
  cursor: pointer;
}

.prayer-card-front[hidden],
.prayer-card-details[hidden] {
  display: none;
}

.prayer-card-front:focus-visible,
.prayer-card-close:focus-visible {
  outline: 3px solid rgba(184, 123, 40, .35);
  outline-offset: 2px;
}

.prayer-card-front strong {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  line-height: 1.25;
}

.prayer-card-cross {
  position: absolute;
  top: 12px;
  right: 15px;
  color: #6f5840;
  font-family: Georgia, serif;
  font-size: 1.25rem;
}

.prayer-card-category {
  color: var(--text-muted);
  font-size: .82rem;
}

.prayer-card-details {
  min-height: 203px;
  padding: 18px;
  box-sizing: border-box;
}

.prayer-card-detail-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-heading);
  font-size: 1.12rem;
}

.prayer-card-close {
  min-width: 36px;
  min-height: 36px;
  border: 1px solid var(--border-light);
  border-radius: 50%;
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
}

.prayer-card-intention {
  margin: 14px 0;
  color: var(--text-main);
  line-height: 1.5;
  white-space: pre-wrap;
}

.prayer-card-age {
  margin: 0;
  color: var(--text-muted);
  font-size: .76rem;
}

.prayer-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 16px;
}

.prayer-card-actions .btn {
  min-height: 36px;
  padding: 7px 10px;
  font-size: .74rem;
}

.prayer-archive-button { color: #7b452d; }

.prayer-empty-state {
  display: grid;
  justify-items: center;
  gap: 7px;
  padding: 34px 24px 38px;
  text-align: center;
}

.prayer-empty-state > span {
  color: rgba(111, 88, 64, .65);
  font-size: 1.8rem;
}

.prayer-editor-modal { max-width: 590px; }

.prayer-deceased-toggle {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 18px 0;
  color: var(--text-main);
  line-height: 1.4;
}

.prayer-deceased-toggle input {
  width: 20px;
  height: 20px;
  margin-top: 1px;
  accent-color: var(--accent-olive);
}

.notifications-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 0;
  padding: 2px 1px 5px;
  scrollbar-width: thin;
}

.notifications-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 9px 14px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: var(--bg-card);
  color: var(--text-muted);
  font: inherit;
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
}

.notifications-filter span {
  min-width: 1.45rem;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--bg-alt);
  color: var(--text-main);
  font-size: .72rem;
  text-align: center;
}

.notifications-filter:hover,
.notifications-filter:focus-visible,
.notifications-filter.is-active {
  border-color: rgba(184, 123, 40, .45);
  background: #fff;
  color: var(--text-main);
  outline: none;
  box-shadow: 0 4px 14px rgba(184, 123, 40, .1);
}

.notifications-filter.is-active span {
  background: rgba(184, 123, 40, .14);
  color: var(--accent-gold);
}

.notifications-content {
  display: grid;
  gap: 22px;
}

.notifications-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.notifications-tab-sections {
  display: grid;
  gap: 22px;
}

.notifications-board-section,
.notifications-activity-section,
.notifications-files-section {
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.notifications-files-section .board-attachments-panel {
  min-height: 410px;
}

.notifications-board-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, .8fr);
  min-height: 410px;
}

.notifications-board-layout.without-attachments {
  grid-template-columns: minmax(0, 1fr);
}

.notifications-board-messages {
  min-width: 0;
  border-right: 1px solid var(--border-light);
}

.notifications-board-layout.without-attachments .notifications-board-messages {
  border-right: 0;
}

.notifications-view-shell .board-regular-list {
  max-height: none;
  overflow: visible;
}

.board-post-card.is-unread {
  border-left: 4px solid var(--accent-gold);
  background: linear-gradient(115deg, rgba(250, 244, 235, .72), var(--bg-card));
}

.board-post-read-button {
  margin-left: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent-gold);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.board-post-read-button:hover,
.board-post-read-button:focus-visible {
  text-decoration: underline;
  outline: none;
}

.notifications-section-heading {
  padding: 22px 24px 17px;
  border-bottom: 1px solid var(--border-light);
}

.notifications-section-heading h3 {
  margin: 2px 0 4px;
  color: var(--text-main);
  font-family: var(--font-heading);
  font-size: 1.65rem;
}

.notifications-activity-list {
  max-height: none;
  overflow: visible;
}

.notifications-activity-list .notif-item {
  padding: 17px 20px;
}

@media (max-width: 760px) {
  .notifications-view-shell {
    padding: 8px 16px 48px;
  }

  .notifications-view-header {
    align-items: stretch;
    flex-direction: column;
    padding: 18px 20px;
  }

  .community-board-tabs {
    overflow-x: auto;
  }

  .community-board-tab {
    flex: 1 0 auto;
  }

  .notifications-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .notifications-read-all {
    width: 100%;
  }

  .prayer-section-header {
    flex-direction: column;
    padding: 21px 20px 18px;
  }

  .prayer-section-actions {
    justify-content: space-between;
    width: 100%;
  }

  .notifications-board-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .notifications-board-messages {
    border-right: 0;
    border-bottom: 1px solid var(--border-light);
  }
}

@media (max-width: 520px) {
  .notifications-nav-badge {
    top: -3px;
    right: -3px;
  }

  .notifications-filter {
    padding: 8px 11px;
  }

  .community-board-tab {
    gap: 6px;
    padding: 8px 11px;
    font-size: .82rem;
  }

  .prayer-card-grid {
    grid-template-columns: minmax(0, 1fr);
    padding: 14px;
  }

  .prayer-section-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .prayer-section-actions .btn {
    width: 100%;
  }
}

@media (max-width: 600px) {
  #projectsOverview .tab-buttons-wrapper { min-width: 0; max-width: 100%; }
  #projectsOverview .tab-buttons-group { flex-wrap: wrap; }
  #projectsOverview .tab-btn { flex: 1 1 auto; }
}

/* Owner-managed project sharing. */
.project-sharing-form > p { color: var(--text-muted); margin: 0 0 1rem; line-height: 1.5; }
.project-sharing-form fieldset { min-width: 0; border: 1px solid var(--border-color); border-radius: 10px; padding: 1rem; }
.project-sharing-member { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: .5rem 0; }
.project-sharing-member select { width: auto; max-width: 65%; }
.project-sharing-help { margin-top: 1rem !important; font-size: .85rem; }
.project-access-label { color: var(--text-muted); font-size: .85rem; }

/* Odabir dana u vremenskoj kartici. */
.weather-hourly-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.weather-hourly-heading .weather-section-label { margin: 0; text-transform: uppercase; }
.weather-today-button { border: 1px solid var(--border-color); border-radius: var(--radius-sm); background: var(--bg-card); color: var(--accent-olive); font: inherit; font-size: 0.76rem; padding: 8px 12px; cursor: pointer; min-height: 36px; }
.weather-hourly .weather-summary { margin-bottom: 14px; }
.weather-week tbody tr { cursor: pointer; }
.weather-week tbody tr:hover { background: rgba(61, 90, 69, 0.04); }
.weather-week tbody tr.is-selected { background: rgba(61, 90, 69, 0.10); }
.weather-day-button { display: block; width: 100%; min-height: 44px; border: 0; padding: 0; background: transparent; color: inherit; font: inherit; text-align: left; text-transform: capitalize; cursor: pointer; }
.weather-day-button[aria-pressed="true"] { color: var(--accent-olive); font-weight: 700; }
.weather-day-button:focus-visible, .weather-today-button:focus-visible { outline: 2px solid var(--accent-olive); outline-offset: 2px; border-radius: 3px; }
