.perm-table-wrap {
    overflow-x: auto;
}

.perm-actions {
    display: flex;
    gap: 8px;
}

.perm-action-btn {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.perm-action-btn.edit {
    background: #dbeafe;
    color: #2563eb;
}

.perm-action-btn.edit:hover {
    background: #2563eb;
    color: #fff;
}

.perm-action-btn.delete {
    background: #fee2e2;
    color: #dc2626;
}

.perm-action-btn.delete:hover {
    background: #dc2626;
    color: #fff;
}

.perm-modal .modal-content {
    border-radius: 12px;
    border: none;
}

.perm-modal .modal-header,
.perm-modal .modal-footer {
    background: #f8fafc;
}

.perm-form-group {
    margin-bottom: 20px;
}

.perm-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
}

.perm-form-group input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.perm-user-section {
    margin-bottom: 24px;
}

.perm-user-section h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
}

.perm-user-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.perm-user-column {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
}

.perm-user-column-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.perm-user-search input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}

.perm-user-list {
    height: 180px;
    overflow-y: auto;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.perm-user-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 8px;
    border-bottom: 1px solid #e2e8f0;
    cursor: pointer;
}

.perm-user-item:last-child {
    border-bottom: none;
}

.perm-user-item .name {
    font-size: 13px;
    font-weight: 500;
}

.perm-empty {
    padding: 24px;
    text-align: center;
    color: #64748b;
    font-size: 13px;
}

.perm-permission-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

.perm-permission-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.perm-permission-search {
    flex: 1;
    min-width: 200px;
    max-width: 400px;
    position: relative;
}

.perm-permission-search input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.perm-permission-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 14px;
}

.perm-check-all {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #64748b;
}

.perm-permission-list {
    max-height: 450px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
}

.perm-permission-group {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.perm-permission-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.perm-permission-parent label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
}

.perm-permission-children {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px 16px;
    padding-left: 26px;
}

.perm-permission-child label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.perm-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.perm-btn-primary {
    background: #2563eb;
    color: #fff;
}

.perm-btn-outline {
    background: transparent;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.perm-btn-danger {
    background: #dc2626;
    color: #fff;
}

.perm-delete-footer {
    justify-content: center;
    gap: 12px;
}

@media (max-width: 768px) {
    .perm-user-columns {
        grid-template-columns: 1fr;
    }

    .perm-permission-children {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .perm-permission-children {
        grid-template-columns: 1fr;
    }
}
