/* Roles Page CSS */
.rl-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 24px;
}

.rl-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.rl-header-left h2 {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  display: inline-block;
  margin-right: 8px;
}

.rl-breadcrumb { font-size: 11px; color: #6b7280; display: inline-block; }

.rl-btn-outline {
  border: 1px solid #e5e7eb;
  background: #fff;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  transition: 0.2s;
}
.rl-btn-outline:hover { background: #f9fafb; }

.rl-btn-primary {
  background: #3b82f6;
  border: none;
  padding: 7px 16px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  transition: 0.2s;
}
.rl-btn-primary:hover { background: #2563eb; }

/* Card */
.rl-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  margin-bottom: 24px;
  overflow: hidden;
}

.rl-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid #e5e7eb;
  flex-wrap: wrap;
  gap: 12px;
}

.rl-card-title { font-size: 14px; font-weight: 700; color: #111827; }
.rl-card-body { padding: 24px; }

/* Search */
.rl-search-box { position: relative; }
.rl-search-box input {
  padding: 7px 12px 7px 32px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 12px;
  width: 200px;
  outline: none;
  transition: border-color 0.2s;
}
.rl-search-box input:focus { border-color: #3b82f6; }
.rl-search-box i {
  position: absolute;
  left: 10px; top: 50%;
  transform: translateY(-50%);
  color: #9ca3af; font-size: 12px;
}

/* Roles Grid */
.rl-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 24px;
}

@media (max-width: 1024px) { .rl-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .rl-grid { grid-template-columns: 1fr; } }

/* Role Card */
.rl-role-card {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 20px;
  position: relative;
  transition: box-shadow 0.2s;
}
.rl-role-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.06); }

.rl-role-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}

.rl-role-name {
  font-size: 13px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 4px;
}

.rl-role-count { font-size: 11px; color: #6b7280; }

.rl-role-actions { display: flex; gap: 8px; }
.rl-role-actions i { color: #9ca3af; font-size: 14px; cursor: pointer; transition: 0.2s; }
.rl-role-actions i:hover { color: #3b82f6; }

.rl-avatars {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}
.rl-avatars img {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid #fff;
  margin-left: -8px;
}
.rl-avatars img:first-child { margin-left: 0; }
.rl-avatars-more {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: #6366f1;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: -8px;
  border: 2px solid #fff;
}

.rl-edit-btn {
  width: 100%;
  padding: 7px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #fff;
  font-size: 11px;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  transition: 0.2s;
  text-align: center;
}
.rl-edit-btn:hover { background: #f3f4f6; }

/* Add role card */
.rl-add-card {
  border: 2px dashed #e5e7eb;
  border-radius: 10px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 160px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.rl-add-card:hover { border-color: #3b82f6; background: #eff6ff; }
.rl-add-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: #eff6ff;
  color: #3b82f6;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  margin-bottom: 10px;
}
.rl-add-label { font-size: 12px; font-weight: 600; color: #374151; }
.rl-add-sub { font-size: 11px; color: #9ca3af; margin-top: 4px; }

/* Table section */
.rl-table-wrapper { overflow-x: auto; }
.rl-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
}
.rl-table th {
  text-align: left;
  padding: 11px 16px;
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}
.rl-table td {
  padding: 12px 16px;
  font-size: 12px;
  color: #374151;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: middle;
}
.rl-table tr:last-child td { border-bottom: none; }
.rl-table tr:hover td { background: #fdfdfd; }

.rl-checkbox { width: 15px; height: 15px; accent-color: #3b82f6; cursor: pointer; }

.rl-role-badge {
  display: inline-flex; align-items: center;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
}
.rl-badge-admin    { background: #fef3c7; color: #92400e; }
.rl-badge-dev      { background: #dcfce7; color: #166534; }
.rl-badge-analyst  { background: #dbeafe; color: #1e40af; }
.rl-badge-editor   { background: #ede9fe; color: #5b21b6; }
.rl-badge-support  { background: #fce7f3; color: #9d174d; }
.rl-badge-designer { background: #ffedd5; color: #9a3412; }
.rl-badge-manager  { background: #e0f2fe; color: #0369a1; }

.rl-status-active { background: #dcfce7; color: #166534; font-size: 9px; font-weight: 700; padding: 3px 8px; border-radius: 4px; display: inline-block; }
.rl-status-inactive { background: #fee2e2; color: #991b1b; font-size: 9px; font-weight: 700; padding: 3px 8px; border-radius: 4px; display: inline-block; }

.rl-pagination-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-top: 1px solid #e5e7eb;
  flex-wrap: wrap;
  gap: 8px;
}
.rl-show-entries { font-size: 11px; color: #6b7280; }
.rl-select { padding: 3px 6px; border: 1px solid #e5e7eb; border-radius: 4px; margin: 0 4px; font-size: 11px; outline: none; }
.rl-pagination { display: flex; align-items: center; gap: 4px; font-size: 11px; color: #6b7280; }
.rl-page-btn { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; border-radius: 4px; cursor: pointer; transition: 0.2s; }
.rl-page-btn:hover { background: #f3f4f6; color: #111827; }
.rl-page-active { background: #f3f4f6; color: #111827; font-weight: 600; }

/* FAQ */
.rl-faq-title { font-size: 14px; font-weight: 700; color: #111827; margin-bottom: 16px; }
.rl-faq-item { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-bottom: 1px solid #f3f4f6; cursor: pointer; }
.rl-faq-item:last-child { border-bottom: none; }
.rl-faq-q { font-size: 12px; font-weight: 500; color: #374151; }
.rl-faq-icon { color: #9ca3af; font-size: 13px; }
.rl-faq-item:hover .rl-faq-q { color: #111827; }

/* Illus grid */
.rl-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 640px) { .rl-grid-2 { grid-template-columns: 1fr; } }

.rl-illus-card {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
  padding: 24px; display: flex; flex-direction: column;
  position: relative; overflow: hidden; min-height: 175px;
}
.rl-illus-card-title { font-size: 14px; font-weight: 700; color: #111827; margin-bottom: 10px; }
.rl-illus-card p { font-size: 11px; color: #6b7280; line-height: 1.5; margin-bottom: 20px; max-width: 55%; }
.rl-illus-card a { font-size: 10px; font-weight: 700; color: #3b82f6; text-transform: uppercase; text-decoration: none; }
.rl-illus-card a:hover { text-decoration: underline; }
.rl-illus-img { position: absolute; right: 16px; bottom: 16px; width: 140px; height: auto; }
