/* custom.css — локальні правки стилів Perfex CRM (crm.sok.agency).
   Perfex підхоплює цей файл сам (assets_helper.php: if file_exists assets/css/custom.css),
   після style.css. Ядро CRM не чіпаємо. 27.10.2026 */

/* Коментарі задач: нумерація списку з 10 і далі не влазила у margin-left:16px
   (reset.css прибирає padding у ol/ul). Даємо місце під 2–3 цифри. */
.tc-content ol,
.tc-content ul {
    margin-left: 0;
    padding-left: 28px;
}
.tc-content ul {
    padding-left: 22px;
}
.tc-content ol ol,
.tc-content ol ul,
.tc-content ul ol,
.tc-content ul ul {
    margin-top: 2px;
    margin-bottom: 2px;
}
.tc-content li {
    margin-bottom: 2px;
}

/* SOK 20.11.2026: пошук угорі.
   1) Задачі в результатах: назва, «проєкт · клієнт», завершені — сірим на сірому тлі з позначкою.
   2) На широкому екрані (від 1200px) поле пошуку тягнеться на весь вільний рядок шапки,
      а список результатів — на всю ширину поля, рядки широкі: назва, одразу за нею проєкт · клієнт.
   На телефоні й вузьких екранах лишається як було (лише нові підписи під назвою). */
ul.search-results a.sok-sr-row { white-space: normal; }
ul.search-results .sok-sr-meta { display: block; color: #8a94a0; }
ul.search-results .sok-sr-badge { float: right; margin-left: 8px; font-weight: normal; }
ul.search-results a.sok-search-task-done { color: #8a94a0; background-color: #f3f4f6; }
ul.search-results a.sok-search-task-done:hover { color: #5c6670; background-color: #eceef1; }

@media (min-width: 1200px) {
    #header { display: flex; align-items: stretch; }
    #header > nav { flex: 1 1 auto; display: flex; min-width: 0; }
    #header > nav > ul.navbar-right {
        flex: 1 1 auto; display: flex; align-items: center; justify-content: flex-end;
        float: none; margin-left: 24px; min-width: 0;
    }
    #header > nav > ul.navbar-right > li { float: none; flex: 0 0 auto; }
    #header > nav > ul.navbar-right > li#top_search { flex: 1 1 auto; width: auto; min-width: 200px; }
    #top_search input,
    #top_search input:hover,
    #top_search input:focus,
    #top_search input:active {
        height: 40px; margin: 0; padding: 0 18px; border-radius: 20px;
        background-color: rgba(255, 255, 255, 0.12); text-align: left;
    }
    #top_search input:hover { background-color: rgba(255, 255, 255, 0.18); }
    #top_search input:focus { background-color: rgba(255, 255, 255, 0.24); box-shadow: none; }
    #top_search input::placeholder { color: rgba(255, 255, 255, 0.6); }
    #top_search_button button { width: 50px; padding-left: 0; }

    #top_search_dropdown,
    #top_search #search-history {
        width: 100%; top: calc(100% + 12px); left: 0; right: 0;
        border-radius: 8px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18); border: 0;
        max-height: 70vh;
    }
    ul.search-results > li > a { padding: 8px 18px; }
    ul.search-results .dropdown-header { padding-left: 18px; }
    ul.search-results a.sok-sr-row { display: flex; align-items: baseline; gap: 16px; }
    /* 20.11: проєкт і клієнт — одразу після назви, позначка «завершено» — праворуч */
    ul.search-results a.sok-sr-row .sok-sr-title { flex: 0 1 auto; min-width: 0; }
    ul.search-results a.sok-sr-row .sok-sr-meta { flex: 0 1 auto; text-align: left; font-size: 12px; }
    ul.search-results a.sok-sr-row .sok-sr-badge { order: 3; float: none; margin-left: auto; flex: 0 0 auto; }
}

/* SOK 22.11.2026: віджет «Останні запущені задачі» */
.sok-recent-tasks .sok-rt-list { list-style: none; margin: 0; padding: 0 5px; }
.sok-recent-tasks .sok-rt-item { padding: 8px 0; border-bottom: 1px solid #eef0f3; }
.sok-recent-tasks .sok-rt-item:last-child { border-bottom: 0; }
.sok-recent-tasks .sok-rt-title { font-weight: 600; }
.sok-recent-tasks .sok-rt-badge { float: right; margin-top: 2px; }
.sok-recent-tasks .sok-rt-meta { color: #8a94a0; font-size: 12px; }
.sok-recent-tasks .sok-rt-stats { font-size: 12px; color: #5b6573; margin-top: 3px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.sok-recent-tasks .sok-rt-stats .text-danger, .sok-recent-tasks .sok-rt-stats .text-danger b { color: #e3342f; }
.sok-recent-tasks .sok-rt-done .sok-rt-title { color: #8a94a0; }
.sok-recent-tasks .sok-rt-live { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #22c55e; margin-right: 4px; vertical-align: middle; }
.sok-recent-tasks .sok-rt-filters { display: flex; flex-wrap: wrap; }
.sok-recent-tasks .sok-rt-day { padding: 10px 0 2px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: #8a94a0; border-bottom: 1px solid #eef0f3; }
.sok-recent-tasks .sok-rt-day:first-child { padding-top: 0; }
