/* =============================
   ФІЛЬТР
================================ */

.notes-filter-card {
    padding: 14px 16px !important;
    border-radius: 12px;
}

.notes-filter-header {
    margin-bottom: 8px;
}

.notes-filter-title {
    font-size: 16px;
    font-weight: 600;
}

.notes-filter-subtitle {
    font-size: 12px;
    color: #6b7280;
    max-width: 620px;
}

.notes-filter-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px 16px;
    margin-top: 8px;
}

.notes-filter-group {
    display: flex;
    flex-direction: column;
    min-width: 180px;
    flex: 1 1 180px;
}

.notes-filter-group--date {
    max-width: 170px;
}

.notes-filter-group--search {
    min-width: 220px;
    flex: 2 1 260px;
}

.notes-filter-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #9ca3af;
    margin-bottom: 3px;
}

.notes-filter-group .form-control {
    font-size: 13px;
    height: calc(1.9rem + 2px);
}

.notes-filter-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.notes-filter-reset {
    padding-left: 0;
    font-size: 12px;
}

.notes-summary-line {
    margin-top: 6px;
}

/* =============================
   ТАБЛИЦЯ (DESKTOP/TABLET)
================================ */

.notes-table-card {
    border-radius: 12px;
    overflow: hidden;
}

.notes-table-header {
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.notes-table-wrapper {
    max-height: 70vh;
    overflow-y: auto;
}

.notes-table {
    border-collapse: separate;
    border-spacing: 0;
}

.notes-table thead th {
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    font-size: 12px;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
}

.notes-table th,
.notes-table td {
    vertical-align: top;
    font-size: 13px;
}

/* Широка колонка "Зміст" */
.notes-content-head {
    width: 55%;
    min-width: 260px;
}

/* Ячейка "Зміст" */
.notes-content-cell {
    max-width: 760px;
    padding: 8px 12px !important;
    vertical-align: top !important;
}

/* Текст нотатки */
.notes-content-text {
    display: block;
    margin: 0;
    padding: 0;
    white-space: normal !important;
    word-break: break-word;
    text-align: left !important;
    line-height: 1.4;
}

/* Тімлід: імʼя + емейл */
.notes-tl-name {
    font-weight: 500;
}

.notes-tl-email {
    font-size: 12px;
    color: #6b7280;
}

/* Пагінація під таблицею */
.notes-pagination {
    border-top: 1px solid #e5e7eb;
    padding-top: 6px;
    display: flex;
    justify-content: flex-end;
}

/* =============================
   МОБІЛЬНІ КАРТКИ
================================ */

.notes-mobile-list {
    display: none; /* показуємо тільки на мобайлі */
    margin-top: 10px;
}

.notes-mobile-card {
    border-radius: 12px;
    padding: 10px 12px;
    background: radial-gradient(circle at top left, #eef2ff 0, #ffffff 50%, #f9fafb 100%);
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.04);
}

.notes-mobile-card + .notes-mobile-card {
    margin-top: 8px;
}

.notes-mobile-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 4px;
}

.notes-mobile-date {
    font-size: 12px;
    font-weight: 600;
    color: #111827;
}

.notes-mobile-tl {
    text-align: right;
}

.notes-mobile-tl-name {
    font-size: 13px;
    font-weight: 500;
    color: #111827;
}

.notes-mobile-tl-email {
    font-size: 11px;
    color: #6b7280;
}

.notes-mobile-title {
    margin-top: 4px;
    font-size: 13px;
    font-weight: 600;
    color: #111827;
}

.notes-mobile-content {
    margin-top: 4px;
    font-size: 12px;
    color: #374151;
    white-space: pre-line;
}

.notes-mobile-pagination {
    margin-top: 8px;
    display: flex;
    justify-content: flex-end;
}

/* =============================
   ADAPTIVE
================================ */

@media (max-width: 991.98px) {
    .notes-table th,
    .notes-table td {
        font-size: 12px;
    }

    .notes-filter-form {
        flex-wrap: wrap;
    }
}

@media (max-width: 767.98px) {
    /* Фільтр в одну колонку */
    .notes-filter-card {
        padding: 10px 12px !important;
    }

    .notes-filter-form {
        flex-direction: column;
        align-items: stretch;
    }

    .notes-filter-group,
    .notes-filter-group--date,
    .notes-filter-group--search {
        width: 100%;
        max-width: 100%;
        flex: 1 1 auto;
    }

    .notes-filter-actions {
        margin-left: 0;
        justify-content: flex-start;
    }

    /* Ховаємо табличний вид, показуємо картки */
    .notes-table-card {
        display: none;
    }

    .notes-mobile-list {
        display: block;
    }
}

@media (max-width: 575.98px) {
    .notes-filter-title {
        font-size: 15px;
    }

    .notes-filter-subtitle {
        font-size: 11px;
    }

    .notes-mobile-card {
        padding: 9px 10px;
    }

    .notes-mobile-content {
        font-size: 11.5px;
    }
}
