/* static/css/events.css */
body {
  background:#f4f6f9;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size:16px;
}

/* -------------------------
   КАРТКА ОСВІТНЬОЇ ПОСЛУГИ
-------------------------- */
.event-card {
  transition: transform 220ms cubic-bezier(.2,.9,.3,1), box-shadow 220ms cubic-bezier(.2,.9,.3,1);
  will-change: transform;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  backface-visibility: hidden;
  transform-origin: center;
  border-radius:12px;
  background:white;
  padding:14px;
  height:100%;
  box-sizing:border-box;
  overflow: hidden;
  border: 1px solid #00336620; /* легка рамка */
}

.event-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.12);
}

.event-card:active, .event-card.card-pressed {
  transform: translateY(-4px) scale(0.998);
  box-shadow: 0 14px 30px rgba(0,0,0,0.12);
}

/* -------------------------
   ЗАГОЛОВОК ПРОГРАМИ
-------------------------- */
/* Заголовок програми — тепер другий елемент */
.card-title-frame {
    display: flex;
    align-items: center;
    gap:10px;
    padding: 8px 12px;
    border-radius: 10px;
    background: linear-gradient(180deg, #f4f6ff 0%, #ffffff 100%);
    border: 1px solid rgba(75,87,168,0.18);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.7), 0 4px 12px rgba(75,87,168,0.06);
    color: #1f2a60;
    font-weight: 600;
    font-size: 1.08rem;
    line-height: 1.2;
    width: 100%;
    min-width: 0;
    margin-bottom: 12px;
}



.card-title-frame .title-text {
  flex: 1 1 auto;
  min-width: 0;
  word-break: break-word;
  overflow-wrap: anywhere;
  max-height: 3.6em;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* -------------------------
   СТРУКТУРОВАНИЙ БЛОК ІНФО
-------------------------- */
.info-block {
  font-size: 0.92rem;
  line-height: 1.28;
  color: #333;
  margin-bottom: 10px;
}

.info-block div {
  padding: 3px 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.info-block div:last-child {
  border-bottom: none;
}

.info-label {
  font-weight: 600;
  color: #1f2a60;
}

/* -------------------------
   БЛОК "МІСЦЯ"
-------------------------- */
.places-block {
  background: #f4f7ff;
  border: 1px solid #dce6ff;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.9rem;
  line-height: 1.25;
  color: #1f2a60;
  margin-bottom: 10px;
  overflow: visible !important;
}

/* -------------------------
   ВАРТІСТЬ
-------------------------- */
.card-price-row {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:6px;
}

.card-price-label {
  color:#6c757d;
  font-size:0.9rem;
}

.card-price-right {
  text-align:right;
  min-width:120px;
  display:flex;
  flex-direction:column;
  align-items:flex-end;
}

.price-highlight {
  font-size:1.2rem;
  font-weight:800;
  color:#198754;
}

.per-month-small {
  font-size:0.9rem;
  color:#d9534f;
  font-weight:700;
  margin-top:4px;
}

/* -------------------------
   БЮДЖЕТНІ ТА БПР БЕЙДЖІ
-------------------------- */
.bpr-pill {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    background: linear-gradient(180deg, #f8f9fc 0%, #eef1f7 100%); /* світлий, нейтральний фон */
    border: 1px solid rgba(120,130,160,0.25); /* легка рамка */
    color: #2f3a5f; /* темно-синій текст замість чорного */
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 3px 8px rgba(0,0,0,0.05); /* дуже легка тінь */
}

.budget-pill {
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:4px 8px;
  border-radius:999px;
  background: linear-gradient(180deg, #eef9f0 0%, #f6fbf7 100%);
  border: 1px solid rgba(40,167,69,0.10);
  color:#1f6f3f;
  font-weight:600;
  font-size:0.82rem;
  box-shadow: 0 4px 10px rgba(31,111,63,0.04);
}

/* -------------------------
   СПЕЦФОНД — тепер як бюджет
-------------------------- */
.special-fund-note {
    display: inline-block;
    margin-top: 8px;
    margin-bottom: 12px;
    padding: 6px 10px;
    border-radius: 999px; /* така сама форма як у budget-pill */

    /* 🔥 залишаємо твій попередній фон */
    background: #f9f4dd;

    /* 🔥 рамка тепер як у budget-pill */
    border: 1px solid rgba(40,167,69,0.10);

    /* 🔥 залишаємо твій колір тексту */
    color: #6c5a00;

    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.2;

    box-shadow: 0 4px 10px rgba(31,111,63,0.04); /* така сама тінь */
}
@media (max-width: 576px) {
    .special-fund-note {
        display: inline-block;
        padding: 6px 10px;
        font-size: 0.85rem;
    }
}
/* -------------------------
   КНОПКА "ЗАРЕЄСТРУВАТИСЯ"
-------------------------- */
.btn-register {
  background-color: #28a745;
  border: 2px solid #28a745;
  color: #000 !important;
  font-weight: 700;
  border-radius: 10px;
  padding: 8px 14px;
  transition: all 180ms ease;
  box-shadow: 0 4px 10px rgba(40,167,69,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 1rem;
}

.btn-register:hover:not(:disabled) {
  background-color: #218838;
  border-color: #218838;
  color: #fff !important;
  transform: translateY(-3px);
  box-shadow: 0 6px 14px rgba(40,167,69,0.35);
}

/* -------------------------
   КНОПКА "ДОДАТКОВА ІНФОРМАЦІЯ"
-------------------------- */
.btn-info-blue {
  background-color: #0d6efd;
  border: 2px solid #0d6efd;
  color: #000 !important;
  font-weight: 700;
  border-radius: 10px;
  padding: 8px 14px;
  transition: all 180ms ease;
  box-shadow: 0 4px 10px rgba(13,110,253,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 1rem;
}

.btn-info-blue:hover:not(:disabled) {
  background-color: #0b5ed7;
  border-color: #0b5ed7;
  color: #fff !important;
  transform: translateY(-3px);
  box-shadow: 0 6px 14px rgba(13,110,253,0.35);
}

/* -------------------------
   АДАПТИВНІСТЬ
-------------------------- */
@media (max-width:576px) {
  body { font-size:14px; }

  .card-title-frame {
    font-size:1rem;
    padding:6px 10px;
  }

  .btn-register,
  .btn-info-blue {
    width: 100%;
    padding: 10px 16px;
    font-size: 1rem;
  }
}

/* -------------------------
   КОЛЬОРИ РАМКИ ЗА ТИПОМ
-------------------------- */
.border-primary   { border-color: #0d6efd !important; }
.border-success   { border-color: #198754 !important; }
.border-warning   { border-color: #ffc107 !important; }
.border-info      { border-color: #0dcaf0 !important; }
.border-danger    { border-color: #dc3545 !important; }
.border-secondary { border-color: #6c757d !important; }
.border-dark      { border-color: #212529 !important; }

/* -------------------------
   ЛОГОТИП У ШАПЦІ
-------------------------- */
.nav-logo {
  height: 58px;
}
/* Блок типу — тепер головний елемент картки */
.type-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 10px;
    background: #eef4ff;
    border: 1px solid #cdd9ff;
    color: #1f2a60;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 10px;
    box-shadow: 0 3px 8px rgba(75,87,168,0.08);
}

#infoModal .modal-content {
    border-radius: 14px;
    border: 2px solid #00336620;
    background: #f8faff;
    box-shadow: 0 8px 28px rgba(0,0,0,0.15);
    padding: 6px;
}

#infoModal .info-section {
    background: white;
    border: 1px solid #e5e8f0;
    border-radius: 10px;
    padding: 12px 14px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.btn-info-blue,
.btn-register {
    display: block;
    width: 100%;
    margin-top: 10px;
}

.price-highlight {
    color: #000 !important;
}

.start-date-block {
    background: #f4f7ff;
    border: 1px solid #dce6ff;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 0.9rem;
    line-height: 1.25;
    color: #1f2a60;
    margin-top: 12px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.03);
}

.start-date-block .label {
    font-weight: 600;
    color: #1f2a60;
}

.start-date-block .icon {
    font-size: 1.1rem;
    opacity: 0.8;
}

.icon-title { color: #003366; }          /* темно-синій */
.icon-date { color: #0d6efd; }           /* синій */
.icon-duration { color: #d63384; }       /* рожевий */
.icon-places { color: #198754; }         /* зелений */
.icon-price { color: #fd7e14; }          /* помаранчевий */
.icon-info { color: #6f42c1; }           /* фіолетовий */
.icon-register { color: #dc3545; }       /* червоний */
.icon-apply { color: #20c997; }          /* бірюзовий */

/* container list */
.card-list {
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #eef1f6;
}

/* card separator + subtle divider */
.card-list .applicant-card {
  border-bottom: 1px solid rgba(15,23,42,0.04);
  transition: background .18s ease, transform .12s ease, box-shadow .18s ease;
  background: linear-gradient(180deg,#ffffff,#fbfdff);
}
.card-list .applicant-card:last-child { border-bottom: none; }

/* card body layout */
.applicant-card .card-body {
  display:flex;
  gap:18px;
  align-items:flex-start;
  padding:16px;
}
.applicant-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 36px rgba(12,18,30,0.06);
}

/* left column content */
/* БАЗОВИЙ СТИЛЬ ДЛЯ ДЕСКТОПУ */
.program-title {
  font-weight: 600;
  color: #0a3a75;
  font-size: 0.95rem;
  line-height: 1.1;

  background: #ffffff;
  border: 1px solid #e3ba1c;
  padding: 6px 10px;
  border-radius: 8px;

  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;

  margin-bottom: 6px;
}

/* МОБІЛЬНИЙ ПЕРЕЗАПИС — ПІСЛЯ БАЗОВОГО! */
@media (max-width: 768px) {
  .program-title {
    font-size: 0.88rem;
    padding: 5px 8px;
    border-radius: 6px;
    -webkit-line-clamp: 3;
    border: 1px solid #dfe4ea;
    background: #fdfdfb;
  }
}



.price-highlight {
  color: #0b1220;
  font-weight: 500;     /* було 700 */
  font-size: 0.9rem;    /* трохи менше */
}

.meta {
  color: #6c757d;
  font-size: 0.88rem;
  font-weight: 400;
}

/* badges modern */
.badges .badge {
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius:10px;
  font-weight:700;
  font-size:0.86rem;
  color:#fff;
  box-shadow: 0 6px 18px rgba(12,18,24,0.04);
}
.badge-icon { font-size:1rem; opacity:0.95; }

/* financing */
.badge-funding[data-financing="budget"] {
  background: #e8f7f3;      /* світлий зелено-бірюзовий */
  color: #0f766e;
  border: 1px solid #c8eee5;
}

.badge-funding[data-financing="contract"] {
  background: #ffffff;      /* світлий зелено-бірюзовий */
  color: #705e2d;
  border: 1px solid #e8ddb3;
}

.badge-funding[data-financing=""],
.badge-funding[data-financing="unknown"] {
  background: #f1f1f1;
  color: #6c757d;
  border: 1px solid #e0e0e0;
}
.badge-funding {
  font-size: 0.78rem !important;
  padding: 4px 8px !important;
  font-weight: 500 !important;
  box-shadow: none !important;
}



/* status — glass subtle */
/*.badge-status {*/
/*  color:#0b1220;*/
/*  background: rgba(255,255,255,0.92);*/
/*  border:1px solid rgba(11,18,32,0.06);*/
/*  box-shadow: 0 6px 18px rgba(11,18,32,0.03);*/
/*}*/

/*!* exact status colors *!*/
/*.badge-status[data-status="status_1"] { background: linear-gradient(90deg,#fff7ed,#fff1d6); color:#7a4b00; border-color: rgba(122,75,0,0.06); }*/
/*.badge-status[data-status="status_2"] { background: linear-gradient(90deg,#eef2ff,#e6edff); color:#0f3b66; border-color: rgba(15,59,102,0.06); }*/
/*.badge-status[data-status="status_3"] { background: linear-gradient(90deg,#f0fdf4,#e6fbec); color:#0f5132; border-color: rgba(15,81,50,0.06); }*/
/*.badge-status[data-status="status_4"] { background: linear-gradient(90deg,#fff0f6,#ffe6ee); color:#6b1220; border-color: rgba(107,18,32,0.06); }*/
/*.badge-status[data-status="status_5"] { background: linear-gradient(90deg,#f8fafc,#eef2f6); color:#2b2f36; border-color: rgba(43,47,54,0.04); }*/
/*.badge-status[data-status="status_6"] { background: linear-gradient(90deg,#fffbea,#fff3d6); color:#6b4b00; border-color: rgba(107,75,0,0.06); }*/

/*!* thin left accent for quick scan *!*/
/*.applicant-card.status-status_1 { border-left: 4px solid #ffcf5c; }*/
/*.applicant-card.status-status_2 { border-left: 4px solid #9fc5ff; }*/
/*.applicant-card.status-status_3 { border-left: 4px solid #9fd9b8; }*/
/*.applicant-card.status-status_4 { border-left: 4px solid #f3a6ad; }*/
/*.applicant-card.status-status_5 { border-left: 4px solid #cfcfd1; }*/
/*.applicant-card.status-status_6 { border-left: 4px solid #ffe69a; }*/



/* Базовий стиль бейджа */
.badge-status {
    padding: 4px 8px;
    border-radius: 4px;
    color: #fff;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
}

/* --- КОЛЬОРИ ДЛЯ ВСІХ СТАТУСІВ --- */

/* NEW */
.badge-status[data-status="new"],
.status-new {
    background-color: #6c757d;
    color: #fff;
}

/* IN WORK */
.badge-status[data-status="in_work"],
.status-in_work {
    background-color: #0d6efd;
    color: #fff;
}

/* DOCUMENTS SIGNED */
.badge-status[data-status="documents_signed"],
.status-documents_signed {
    background-color: #20c997;
    color: #fff;
}

/* AWAITING PAYMENT */
.badge-status[data-status="awaiting_payment"],
.status-awaiting_payment {
    background-color: #ffc107;
    color: #f6f6f6;
}

/* PAID */
.badge-status[data-status="paid"],
.status-paid {
    background-color: #198754;
    color: #fff;
}

/* TRANSFERRED TO DEPARTMENT */
.badge-status[data-status="transferred_to_department"],
.status-transferred_to_department {
    background-color: #6610f2;
    color: #fff;
}

/* COMPLETED */
.badge-status[data-status="completed"],
.status-completed {
    background-color: #0dcaf0;
    color: #fdfbfb;
}

/* REJECTED */
.badge-status[data-status="rejected"],
.status-rejected {
    background-color: #dc3545;
    color: #fff;
}

/* actions */
.card-actions .btn { min-width:110px; }

/* divider line between cards more visible on hover (optional) */
.card-list .applicant-card:hover { border-bottom-color: rgba(15,23,42,0.06); }

/* responsive */
@media (max-width:720px) {
  .applicant-card .card-body { flex-direction:column; gap:12px; }
  .card-actions { width:100%; display:flex; gap:8px; justify-content:flex-end; }
  .card-actions .btn { width:auto; }
}



.card-modern { border:0; border-radius:1rem; box-shadow:0 6px 24px rgba(15,23,42,0.06); }
.doc-icon-btn { width:48px; height:48px; border-radius:50%; background:#0d6efd; color:#fff; display:inline-flex; align-items:center; justify-content:center; font-size:20px; border:none; box-shadow:0 6px 18px rgba(13,110,253,0.12); }
.doc-icon-btn:active { transform:translateY(1px); }
.doc-card { border-radius:.75rem; background:#fff; padding:.6rem .9rem; border:1px solid #e6e9ee; display:flex; align-items:center; gap:.75rem; }
.preview-img { width:56px; height:56px; object-fit:cover; border-radius:.5rem; border:1px solid #e6e9ee; flex:0 0 56px; cursor:pointer; }
.doc-icon { width:56px; height:56px; background:#eef2ff; border-radius:.5rem; display:flex; align-items:center; justify-content:center; font-size:22px; color:#4338ca; flex:0 0 56px; cursor:pointer; }
.delete-btn { border:none; background:#fee2e2; color:#b91c1c; border-radius:.5rem; padding:.25rem .5rem; font-size:14px; }
.small-muted { font-size:.85rem; color:#6b7280; }
.apply-all-note { font-size:.82rem; color:#6b7280; margin-top:.25rem; }
.upload-hint { font-size:.85rem; color:#6b7280; margin-top:.5rem; }
.pdf-thumb-canvas { width:56px; height:56px; border-radius:.5rem; border:1px solid #e6e9ee; object-fit:cover; cursor:pointer; }
@media (max-width: 576px) {
.doc-icon-btn { width:56px; height:56px; font-size:22px; }
.preview-img, .doc-icon, .pdf-thumb-canvas { width:64px; height:64px; flex:0 0 64px; }
}
.modal-img { max-width: 100%; max-height: 80vh; display:block; margin:0 auto; }
.modal-pdf { width:100%; height:80vh; border:0; }
.docs-footer { margin-top:.75rem; display:flex; flex-direction:column; gap:.5rem; }
.docs-footer .upload-row { display:flex; gap:.5rem; align-items:center; flex-wrap:wrap; }
.btn-view-all { margin-left: auto; }
.modal-docs-body { max-height: 70vh; overflow:auto; padding: .5rem; }

/* Глобальний заголовок ПІБ над списком */
#applicant-global-header {
  background: linear-gradient(180deg,#ffffff,#f8fbff);
  border: 1px solid rgba(13,110,253,0.08);
  padding: 10px 14px;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(13,110,253,0.04);
  margin-bottom: 12px;
}
#applicant-global-header .global-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0b1220;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#applicant-global-header .small-muted { color: #6c757d; font-size: .85rem; }

#applicant-global-header .header-divider {
  margin: 6px 0 8px 0;
  height: 1px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 1px;
}

/* На мобільних — компактніше */
@media (max-width:720px) {
  #applicant-global-header { padding: 8px 10px; border-radius: 8px; }
  #applicant-global-header .global-name { font-size: 1rem; }
}

/* Класичні кнопки для дій у картці */
.btn-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 110px;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid #d0d4da;
  background: #ffffff;
  color: #0b1220 !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transition: 0.15s ease;
}

.btn-card:hover {
  background: #f3f4f6;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.08);
}

/* Primary look — Переглянути */
.btn-card.view {
  border-color: rgba(13,110,253,0.12);
  background: linear-gradient(180deg,#ffffff,#f1f7ff);
  color: #0d6efd;
}
.btn-card.view:hover:not(:disabled) {
  background: linear-gradient(180deg,#e9f2ff,#dbeeff);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(13,110,253,0.08);
}

/* Secondary look — Редагувати */
.btn-card.edit {
  border-color: rgba(108,117,125,0.08);
  background: linear-gradient(180deg,#ffffff,#fbfbfc);
  color: #495057;
}
.btn-card.edit:hover:not(:disabled) {
  background: linear-gradient(180deg,#f3f4f6,#eef0f3);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(33,37,41,0.06);
}

/* Focus / keyboard accessibility */
.btn-card:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(13,110,253,0.12);
  border-color: rgba(13,110,253,0.18);
}

/* Small / compact variant for narrow screens */
.btn-card.btn-sm {
  min-width: 92px;
  padding: 6px 10px;
  font-size: 0.85rem;
}

/* Ensure consistent spacing in card actions */
.card-actions { display:flex; gap:10px; align-items:center; }

/* Внутрішній контейнер картки */
.applicant-card .card-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 12px;
}

/* Основний текст */
.applicant-card .card-main {
  flex: 1; /* займає весь доступний простір */
}

/* Кнопки внизу */
.applicant-card .card-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: auto; /* притискає блок до низу */
}

/* Базовий фон картки */
.card-list .applicant-card {
  background: #ffffff;
  transition: background .18s ease, transform .12s ease, box-shadow .18s ease;
}

/* Кожна друга картка — ледь блакитна */
.card-list .applicant-card:nth-child(even) {
  background: #f7faff; /* дуже світлий синьо-білий */
}

/* Hover-ефект однаковий для всіх */
.card-list .applicant-card:hover {
  background: #f0f6ff;
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(12,18,30,0.05);
}

.card-index {
  font-weight: 600;
  font-size: 1rem;
  color: #0a3a75;
  margin-bottom: 6px;
  opacity: 0.85;
}
@media (max-width: 768px) {
  .card-index {
    font-size: 0.9rem;
    margin-bottom: 4px;
  }
}

.card-app-number {
  font-weight: 600;
  font-size: 0.9rem;
  color: #0a3a75;
  margin-bottom: 6px;
  opacity: 0.9;
}
@media (max-width: 768px) {
  .card-app-number {
    font-size: 0.85rem;
    margin-bottom: 4px;
  }
}

/* Примітка до статусу */
/* Примітка до статусу — компактна, виразна, адаптивна */
.status-note {
    margin-top: 0.5rem;
    padding: 0.55rem 0.75rem;

    background: #fff7d6;                 /* м’який теплий фон */
    border-left: 3px solid #ffb300;      /* акцентна смуга */
    border-radius: 6px;

    font-size: 0.85rem;
    font-weight: 500;
    color: #5a4500;
    line-height: 1.35;

    white-space: pre-wrap;               /* перенос рядків */
    overflow: visible !important;        /* не обрізати */
    max-height: none !important;         /* не обмежувати висоту */
}

/* Адаптивність — на мобільних примітка стає ще компактнішою */
@media (max-width: 576px) {
    .status-note {
        padding: 0.5rem 0.65rem;
        font-size: 0.82rem;
        line-height: 1.3;
        border-left-width: 3px;
    }
}

/* Розгорнути примітку (додається клас JS при кліку) */
.status-note.expanded {
  max-height: none;
  background: rgba(0,0,0,0.03);
}

/* Кнопка "показати більше" поруч з приміткою (необов'язково) */
.status-note-toggle {
  display: inline-block;
  margin-left: 0.5rem;
  font-size: 0.82rem;
  color: #0d6efd;
  cursor: pointer;
  text-decoration: none;
}

/* Посилання на підписання договору */
.contract-link {
  margin-top: 0.45rem;
  font-size: 0.9rem;
}
.contract-link a {
  color: #0d6efd;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
}
.contract-link a:hover {
  text-decoration: underline;
}

/* Мобільні правки: трохи зменшити відступи */
@media (max-width: 576px) {
  .status-note { font-size: 0.85rem; padding: 0.35rem 0.5rem; }
  .contract-link { font-size: 0.88rem; }
}

/* Дозволяємо перенос тексту в бейджах */
.badge {
    white-space: normal !important;
}

/* Особливо важливо для довгого тексту фінансування */
.badge-funding,
.badge-funding .badge-label {
    white-space: normal !important;
    max-width: 100%;
}

/* У формі редагування блок прихований за замовчуванням */
.applicant-accordion-form .legal-entity-block {
    display: none;
}

/* Показувати, коли JS додає клас visible */
.applicant-accordion-form .legal-entity-block.visible {
    display: block;
}

/* Бейдж: юридична особа */
.badge-legal-entity {
    display: inline-flex;
    align-items: center;

    padding: 4px 8px;
    border-radius: 999px;

    background: #baae61;          /* теплий жовтий фон */
    border: 1px solid #ffe29a;    /* м’яка рамка */
    color: #7a5a00;               /* контрастний текст */

    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;          /* НЕ переносимо, бо текст короткий */
}

/* Адаптивність */
@media (max-width: 576px) {
    .badge-legal-entity {
        font-size: 0.75rem;
        padding: 3px 7px;
    }
}

#allDocsModalBody .doc-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    margin-bottom: 20px;
}

.event-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-actions {
    margin-top: auto;        /* притискає весь блок вниз */
    display: flex;
    flex-direction: column;
    gap: 8px;                /* відступ між кнопками */
}

/* ВАЖЛИВО: прибрати margin-top у самих кнопок */
.event-card .btn-info-blue,
.event-card .btn-register {
    margin-top: 0 !important;
}
