/* =========================================
   ROLE BASED ACCESS PAGE
   ========================================= */

.role-page {
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.role-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.role-page-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 4px 0;
    line-height: 1.2;
}

.role-page-subtitle {
    font-size: 12px;
    color: #9ca3af;
    margin: 0;
    font-weight: 400;
}

.role-add-btn {
    background-color: var(--primary-color);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.role-add-btn:hover {
    filter: brightness(95%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.16), 0 2px 6px -1px rgba(0, 0, 0, 0.08);
}

.role-add-btn:active {
    transform: translateY(1px) scale(0.985);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.role-card {
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #E2E8F0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.role-filter-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    background-color: #ffffff;
    padding: 10px 16px;
    border-radius: 6px;
    border: 1px solid #d9e0e7;
    box-sizing: border-box;
    align-items: center;
    height: 65px;
    width: 100%;
}

.role-search-wrapper {
    position: relative;
    width: 220px;
}

.role-search-select {
    width: 100%;
    appearance: none;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 7px 32px 7px 12px;
    font-size: 12.5px;
    color: #9ca3af;
    cursor: pointer;
    outline: none;
}

.role-search-chevron {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #aab0bc;
    font-size: 11px;
}

.role-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11.5px;
}

.role-table thead tr { border-bottom: 1px solid #e1e5ea; }

.role-table th {
    padding: 10px 18px;
    text-align: left;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    font-style: normal !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #555555 !important;
    background-color: var(--page-bg, #F2F2F2);
    border-bottom: 1px solid #e1e5ea;
    white-space: nowrap;
    height: 45px;
    box-sizing: border-box;
}

.role-table td {
    padding: 10px 18px;
    font-size: 11.5px;
    color: #151515;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    height: 50px;
    box-sizing: border-box;
}

.role-table tbody tr:last-child td { border-bottom: none; }
.role-table tbody tr:hover td { background-color: #f8fafc; }

/* Render text exactly as stored, preserving multiple consecutive spaces. */
.role-table td.preserve-spaces {
    white-space: pre-wrap;
    word-break: break-word;
}

.role-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.2px;
    height: 24px;
    box-sizing: border-box;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.role-status-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.06);
}

    .role-status-badge.active {
        background-color: #E8F6ED;
        color: #16A34A;
    }
.role-status-badge.inactive { background-color: #f3f4f6; color: #6b7280; }

.role-action-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center !important;
}

.role-toggle {
    position: relative;
    width: 34px;
    height: 18px;
    flex-shrink: 0;
}

.role-toggle input { opacity: 0; width: 0; height: 0; }

.role-toggle-slider {
    position: absolute;
    inset: 0;
    background-color: #d1d5db;
    border-radius: 18px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.role-toggle input:checked + .role-toggle-slider { background-color: #22c55e; }

.role-toggle-slider::before {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    left: 3px;
    top: 3px;
    background: #ffffff;
    border-radius: 50%;
    transition: transform 0.2s;
}

.role-toggle input:checked + .role-toggle-slider::before { transform: translateX(16px); }

.role-action-cell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.role-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid #d9e0e7;
    background-color: #ffffff;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s;
    box-sizing: border-box;
    padding: 0;
}

.role-icon-btn svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke-width: 2;
}

.role-icon-btn.edit {
    border-color: #d9e0e7;
    background-color: #ffffff;
}

.role-icon-btn.edit:hover {
    background-color: #FFE5E5;
    border-color: #FF0000;
}

.role-icon-btn.edit:hover svg {
    stroke: #FF0000;
}

.role-icon-btn.edit svg {
    stroke: #4a5568;
}

.role-icon-btn.delete {
    border-color: #eaeaea;
    background-color: #ffffff;
}

.role-icon-btn.delete:hover {
    background-color: #fee2e2;
    border-color: #ef4444;
}

.role-icon-btn.delete svg {
    stroke: #ef4444;
}

