#sidebar,
#sidebar .sidebar-inner,
#sidebar .h-100 {
    min-height: 100vh;
    height: auto !important;
}

.role-actions {
    min-width: 140px;
}

.role-btn {
    min-width: 100px;
    margin-bottom: 8px;
    border-radius: 12px;
    font-weight: 600;
}

/* mobile */
@media (max-width: 768px) {

    .role-actions {
        width: 140px;
    }

    .role-btn {
        width: 100% !important;
        min-width: 100% !important;
        display: block;
        font-size: 13px !important;
        padding: 8px 12px;
        margin-bottom: 8px;
        border-radius: 12px;
    }
}

.custom-pagination {
    gap: 8px;
    flex-wrap: wrap;
}

.custom-pagination .page-link {
    min-width: 42px;
    height: 42px;

    border-radius: 12px !important;
    border: 1px solid rgba(15, 23, 42, .08);

    display: flex;
    align-items: center;
    justify-content: center;

    color: #1f2937;
    font-weight: 600;
    background: #fff;

    transition: .2s ease;
}

.custom-pagination .page-link:hover {
    background: rgba(52, 115, 186, .08);
    border-color: rgba(52, 115, 186, .18);
    color: #3473BA;
    transform: translateY(-1px);
}

.custom-pagination .page-item.active .page-link {
    background: #3473BA;
    border-color: #3473BA;
    color: #fff;
}

.custom-pagination .page-item.disabled .page-link {
    opacity: .45;
    cursor: not-allowed;
}

/* mobile */
@media (max-width: 768px) {
    .custom-pagination {
        gap: 6px;
    }

    .custom-pagination .page-link {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
        border-radius: 10px !important;
    }
}

.employee-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    margin-bottom: 24px;
}

/* LEWA STRONA */
.employee-title-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.employee-title-wrap h4 {
    margin: 0;
    font-weight: 700;
    font-size: 32px;
    white-space: nowrap;
}

/* PRAWA STRONA */
.employee-actions-wrap {
    margin-left: auto;
    display: flex;
    justify-content: flex-end;
}

/* STRZAŁKA */
.employee-back-btn {
    width: 42px;
    height: 42px;
    min-width: 42px;

    border-radius: 12px !important;
    border: 1px solid rgba(15, 23, 42, .08) !important;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    background: #fff !important;
    transition: .2s ease;
    box-shadow: none !important;
    padding: 0 !important;
}

.employee-back-btn i {
    font-size: 18px;
    color: #1f2937;
    line-height: 1;
}

.employee-back-btn:hover {
    background: rgba(52, 115, 186, .08) !important;
    border-color: rgba(52, 115, 186, .18) !important;
    transform: translateX(-2px);
}

.employee-back-btn:hover i {
    color: #3473BA;
}

/* PRZYCISK DODAJ */
.employee-add-btn {
    background: #3473BA !important;
    color: #fff !important;
    border: none !important;
    border-radius: 14px !important;

    padding: 12px 18px;
    font-weight: 600;
    font-size: 15px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    white-space: nowrap;
    transition: .2s ease;
}

.employee-add-btn:hover {
    background: #2C629D !important;
    transform: translateY(-1px);
}

/* ==========================
PREMIUM SEARCH
========================== */

.employee-search-form {
    margin-bottom: 24px;
}

.employee-search-box {
    display: flex;
    gap: 14px;
    align-items: center;

    background: #fff;
    padding: 14px;
    border-radius: 24px;

    box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
    border: 1px solid rgba(15, 23, 42, .05);
}

.employee-search-input-wrap {
    position: relative;
    flex: 1;
}

.employee-search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 18px;
    z-index: 2;
}

.employee-search-input {
    height: 58px;
    border-radius: 18px !important;
    border: 1px solid rgba(15, 23, 42, .08) !important;
    padding-left: 54px !important;
    font-size: 15px;
    background: #f8fafc !important;
    box-shadow: none !important;
    transition: .25s ease;
}

.employee-search-input:focus {
    border-color: #3473BA !important;
    background: #fff !important;
    box-shadow: 0 0 0 5px rgba(52, 115, 186, .12) !important;
}

.employee-search-btn {
    min-width: 220px;
    height: 58px;

    border: none !important;
    border-radius: 18px !important;

    background: linear-gradient(135deg, #3473BA, #4E80BD) !important;
    color: #fff !important;

    font-weight: 700;
    font-size: 15px;

    transition: .25s ease;
}

.employee-search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(52, 115, 186, .25);
}

/* mobile */
@media (max-width: 768px) {

    .employee-search-box {
        flex-direction: column;
        padding: 16px;
        border-radius: 20px;
    }

    .employee-search-btn {
        width: 100%;
        min-width: 100%;
    }

    .employee-search-input {
        height: 54px;
    }
}

.premium-role-modal .modal-content {
    border: 0;
    border-radius: 26px;
    overflow: hidden;
    box-shadow: 0 28px 80px rgba(15, 23, 42, .22);
}

.premium-role-modal .modal-header {
    padding: 28px 32px 18px;
    border-bottom: 1px solid #f1f5f9;
    background:
        radial-gradient(circle at top right, rgba(52, 115, 186, .14), transparent 34%),
        linear-gradient(135deg, #ffffff 0%, #F3F7FC 100%);
}

.premium-role-modal .modal-title {
    margin-top: 10px;
    font-size: 28px;
    font-weight: 800;
    color: #111827;
}

.premium-role-modal .modal-subtitle {
    margin: 6px 0 0;
    color: #6b7280;
    font-size: 14px;
}

.premium-role-modal .modal-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(52, 115, 186, .12);
    color: #3473BA;
    font-size: 13px;
    font-weight: 700;
}

.premium-role-modal .modal-body {
    padding: 28px 32px;
}

.premium-role-modal .form-label {
    font-size: 14px;
    font-weight: 800;
    color: #374151;
}

.premium-input-icon {
    position: relative;
}

.premium-input-icon i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #3473BA;
    font-size: 18px;
}

.premium-input-icon .form-control {
    min-height: 56px;
    padding-left: 48px;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    font-size: 15px;
    box-shadow: none;
}

.premium-input-icon .form-control:focus {
    border-color: #3473BA;
    box-shadow: 0 0 0 4px rgba(52, 115, 186, .12);
}

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

.permissions-header small {
    color: #6b7280;
    font-size: 13px;
}

.permissions-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 18px;
    border-radius: 22px;
    background: #f8fafc;
    border: 1px solid #eef2f7;
}

.permission-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #374151;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s ease;
    user-select: none;
}

.permission-pill i {
    color: #9ca3af;
    font-size: 17px;
}

.permission-pill:hover {
    transform: translateY(-1px);
    border-color: rgba(52, 115, 186, .35);
    box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
}

.premium-role-modal .btn-check:checked+.permission-pill {
    background: linear-gradient(135deg, #3473BA, #4E80BD);
    border-color: #3473BA;
    color: #ffffff;
    box-shadow: 0 12px 26px rgba(52, 115, 186, .28);
}

.premium-role-modal .btn-check:checked+.permission-pill i {
    color: #ffffff;
}

.premium-role-modal .modal-footer {
    padding: 20px 32px 30px;
    border-top: 0;
    display: flex;
    gap: 12px;
}

.btn-light-premium,
.btn-orange-premium {
    min-height: 52px;
    border-radius: 16px;
    font-weight: 800;
    padding: 0 22px;
}

.btn-light-premium {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #e5e7eb;
}

.btn-light-premium:hover {
    background: #e5e7eb;
}

.btn-orange-premium {
    flex: 1;
    background: linear-gradient(135deg, #3473BA, #4E80BD);
    color: #ffffff;
    border: 0;
    box-shadow: 0 14px 30px rgba(52, 115, 186, .28);
}

.btn-orange-premium:hover {
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 18px 38px rgba(52, 115, 186, .34);
}

@media (max-width: 576px) {
    .premium-role-modal .modal-dialog {
        margin: 12px;
    }

    .premium-role-modal .modal-header,
    .premium-role-modal .modal-body,
    .premium-role-modal .modal-footer {
        padding-left: 20px;
        padding-right: 20px;
    }

    .premium-role-modal .modal-title {
        font-size: 23px;
    }

    .permissions-grid {
        gap: 10px;
        padding: 14px;
    }

    .permission-pill {
        width: 100%;
        justify-content: center;
    }

    .premium-role-modal .modal-footer {
        flex-direction: column-reverse;
    }

    .btn-light-premium,
    .btn-orange-premium {
        width: 100%;
    }
}

.premium-delete-modal .modal-content {
    border: 0;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 28px 70px rgba(15, 23, 42, .22);
}

.premium-delete-modal .modal-header {
    padding: 20px 20px 0;
}

.premium-delete-modal .btn-close {
    margin-left: auto;
}

.premium-delete-modal .modal-body {
    padding: 10px 35px 30px;
}

.delete-icon-wrapper {
    width: 95px;
    height: 95px;
    margin: 0 auto 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle, rgba(239, 68, 68, .15), rgba(239, 68, 68, .08));
    border: 1px solid rgba(239, 68, 68, .15);
}

.delete-icon-wrapper i {
    font-size: 42px;
    color: #ef4444;
}

.delete-title {
    font-size: 30px;
    font-weight: 800;
    color: #111827;
    margin-bottom: 10px;
}

.delete-description {
    color: #6b7280;
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 20px;
}

.delete-warning {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fed7aa;
    border-radius: 999px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 700;
}

.premium-delete-modal .modal-footer {
    display: flex;
    gap: 12px;
    padding: 0 32px 32px;
}

.btn-cancel-delete,
.btn-confirm-delete {
    flex: 1;
    min-height: 54px;
    border-radius: 18px;
    font-size: 15px;
    font-weight: 800;
}

.btn-cancel-delete {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #e5e7eb;
}

.btn-cancel-delete:hover {
    background: #e5e7eb;
}

.btn-confirm-delete {
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 14px 28px rgba(239, 68, 68, .25);
}

.btn-confirm-delete:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(239, 68, 68, .35);
}

@media (max-width: 576px) {
    .premium-delete-modal .modal-dialog {
        margin: 14px;
    }

    .premium-delete-modal .modal-footer {
        flex-direction: column-reverse;
        padding: 0 20px 24px;
    }

    .btn-cancel-delete,
    .btn-confirm-delete {
        width: 100%;
    }

    .delete-title {
        font-size: 24px;
    }

    .delete-icon-wrapper {
        width: 80px;
        height: 80px;
    }
}


/* ======================
MOBILE
====================== */
@media (max-width: 768px) {

    .employee-page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    /* strzałka + tytuł w jednym rzędzie */
    .employee-title-wrap {
        width: 100%;
        justify-content: flex-start;
    }

    .employee-title-wrap h4 {
        font-size: 24px;
    }

    .employee-back-btn {
        width: 38px;
        height: 38px;
        min-width: 38px;
    }

    .employee-back-btn i {
        font-size: 16px;
    }

    /* przycisk pod spodem */
    .employee-actions-wrap {
        width: 100%;
        margin-left: 0;
    }

    .employee-add-btn {
        width: 100%;
        justify-content: center;
        font-size: 14px;
        padding: 12px;
    }
}