/* =============================
   MONTHLY TARGETS — PAGE STYLES
================================ */

/* =============================
   FILTER CARD
================================ */

.mt-filters-card {
    border-radius: 12px;
    border: 1px solid rgba(148,163,184,.35);
    background: #f8fafc;
    padding: 14px 16px !important;
}

.mt-filters-header {
    margin-bottom: 8px;
}

.mt-filters-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 2px;
    color: #0f172a;
}

.mt-filters-subtitle {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 0;
}

.mt-filters-card label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 600;
    color: #64748b;
}

/* form layout */

.mt-filters-form.form-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    margin-left: -6px;
    margin-right: -6px;
}

.mt-filters-card .mt-filter-col {
    padding-left: 6px;
    padding-right: 6px;
    margin-bottom: 10px;
}

.mt-filters-card .form-control {
    font-size: 13px;
    height: calc(1.9rem + 2px);
}

.mt-filters-card .btn,
.mt-filters-card .btn-block {
    font-size: 13px;
}

.mt-filter-reset-wrap {
    text-align: right;
}

/* =============================
   DESKTOP TABLE
================================ */

.mt-table-desktop {
    /* по умолчанию видно, на мобиле спрячем */
}

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

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

.table-monthly thead th {
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    background: #f9fafb;
    white-space: nowrap;
}

.table-monthly tbody td {
    font-size: 13px;
    vertical-align: middle;
}

.table-monthly tbody tr:nth-child(even) {
    background-color: #f9fafb;
}
.table-monthly tbody tr:nth-child(odd) {
    background-color: #ffffff;
}
.table-monthly tbody tr:hover {
    background-color: #e5f3ff;
}

.table-monthly td.text-right {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
}

/* actions */

.actions-cell {
    white-space: nowrap;
}

.actions-cell .btn-group {
    display: inline-flex;
    gap: 4px;
}

/* =============================
   MOBILE CARDS
================================ */

.mt-mobile-list {
    display: none; /* на десктопе не показываем */
    margin-top: 8px;
    display: none;
}

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

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

.mt-mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 6px;
}

.mt-mobile-cabinet {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mt-mobile-cabinet-slug {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    background: #eef2ff;
    color: #4338ca;
    font-size: 11px;
    font-weight: 600;
}

.mt-mobile-cabinet-name {
    font-size: 13px;
    font-weight: 500;
    color: #0f172a;
}

.mt-mobile-cabinet-global {
    font-size: 13px;
    font-style: italic;
    color: #6b7280;
}

.mt-mobile-month {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #374151;
    white-space: nowrap;
}

/* body */

.mt-mobile-body {
    border-top: 1px dashed #e5e7eb;
    padding-top: 6px;
    margin-top: 4px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mt-mobile-section-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #9ca3af;
    margin-bottom: 2px;
}

.mt-mobile-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    font-size: 12px;
    padding: 2px 0;
}

.mt-mobile-label {
    color: #6b7280;
}

.mt-mobile-value {
    font-weight: 600;
    color: #111827;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
}

/* actions */

.mt-mobile-actions {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* =============================
   PAGINATION
================================ */

.monthly-pagination {
    padding: 6px 8px;
    font-size: 13px;
}


/* =============================
   RESPONSIVE
================================ */

@media (max-width: 991.98px) {

    .mt-filters-card {
        padding: 10px 12px !important;
    }

    .table-monthly tbody td {
        font-size: 12px;
    }
}


@media (max-width: 767.98px) {

    /* FILTERS */

    .mt-filters-form.form-row {
        flex-direction: column;
        align-items: stretch;
    }

    .mt-filters-card .mt-filter-col {
        width: 100%;
        max-width: 100%;
    }

    .mt-filter-submit,
    .mt-filter-reset {
        width: 100%;
    }

    .mt-filter-reset-wrap {
        text-align: left;
    }

    /* SWITCH VIEW: MOBILE vs DESKTOP */

    .mt-table-desktop {
        display: none; /* таблицу на телефоне прячем */
    }

    .mt-mobile-list {
        display: block; /* показываем карточки */
    }

    /* таблица, если вдруг останется видна где-то */

    .table-monthly-wrapper {
        max-height: none;
    }

    .table-monthly {
        min-width: 720px; /* если кто-то скроллит горизонтально на планшете */
    }

    .table-monthly thead th,
    .table-monthly tbody td {
        padding: 6px 8px;
        font-size: 11px;
    }

    /* actions stack */

    .actions-cell {
        white-space: normal;
    }

    .actions-cell .btn-group {
        flex-direction: column;
        width: 100%;
    }

    .actions-cell .btn {
        width: 100%;
        text-align: center;
    }
}


@media (max-width: 575.98px) {

    .mt-filters-title {
        font-size: 14px;
    }

    .mt-filters-subtitle {
        font-size: 11px;
    }

    .mt-mobile-card {
        padding: 8px 10px;
    }

    .mt-mobile-row {
        font-size: 11px;
    }

    .monthly-pagination {
        padding: 4px 6px;
        font-size: 12px;
    }
}

/* =============================
   ADD "CREATE TARGET" BUTTON
================================ */

.mt-add-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    padding: 7px 16px;
    border-radius: 999px;

    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
    color: #ffffff !important;

    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;

    border: none;

    box-shadow:
        0 2px 6px rgba(37,99,235,.25),
        0 8px 16px rgba(79,70,229,.22);

    transition:
        transform .12s ease,
        box-shadow .15s ease,
        filter .15s ease;
}

.mt-add-btn i {
    font-size: 12px;
    transition: transform .15s ease;
}

/* hover */

.mt-add-btn:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);

    box-shadow:
        0 4px 10px rgba(37,99,235,.25),
        0 12px 22px rgba(79,70,229,.28);

    color: #ffffff !important;
    text-decoration: none;
}

.mt-add-btn:hover i {
    transform: rotate(90deg);
}

/* active */

.mt-add-btn:active {
    transform: translateY(0);

    box-shadow:
        0 2px 6px rgba(37,99,235,.2),
        0 6px 14px rgba(79,70,229,.18);
}

/* =============================
   MOBILE ADAPTATION
================================ */

@media (max-width: 767.98px) {

    .mt-add-btn {
        width: 100%;
        padding: 10px 14px;
        font-size: 14px;
    }

}
