learnix / src /app /admin /users /AdminUsers.css
shashidharak99's picture
Upload files
7d51e81 verified
/* AdminUsers.css β€” User Management page styles */
.au-back-link {
display: inline-flex;
align-items: center;
gap: 0.4rem;
color: #3b82f6;
font-size: 0.85rem;
font-weight: 500;
text-decoration: none;
transition: gap 0.2s ease;
}
.au-back-link:hover { gap: 0.65rem; color: #2563eb; }
.au-error-banner {
background: #fee2e2;
color: #991b1b;
border: 1px solid #fecaca;
border-radius: 8px;
padding: 0.875rem 1.25rem;
font-size: 0.9rem;
font-weight: 500;
margin-bottom: 1.5rem;
}
.au-loading-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 0.75rem;
padding: 4rem 1rem;
color: #6b7280;
font-size: 0.9rem;
}
.au-spinner { animation: au-spin 1s linear infinite; color: #3b82f6; }
@keyframes au-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.au-users-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
gap: 1.25rem;
margin-bottom: 1.5rem;
}
/* Card β€” NO overflow:hidden, it would clip the dropdown */
.au-user-card {
background: #ffffff;
border: 1px solid #e2e8f0;
border-radius: 12px;
padding: 1.25rem;
transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
position: relative;
}
.au-user-card::before {
content: "";
position: absolute;
top: 0; left: 0;
width: 0%;
height: 3px;
border-radius: 12px 12px 0 0;
background: #3b82f6;
transition: width 0.3s ease;
}
.au-user-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,0.09); border-color: #3b82f6; }
.au-user-card:hover::before { width: 100%; }
.au-card-top { display: flex; align-items: center; gap: 0.875rem; margin-bottom: 0.875rem; }
.au-avatar-wrap { flex-shrink: 0; }
.au-avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 2px solid #e2e8f0; }
.au-card-info { flex: 1; min-width: 0; }
.au-user-name { font-size: 0.975rem; font-weight: 600; color: #1f2937; margin: 0 0 0.15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.au-user-usn { font-size: 0.78rem; color: #6b7280; margin: 0; font-family: monospace; letter-spacing: 0.04em; }
.au-role-badge { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.72rem; font-weight: 700; padding: 0.25rem 0.6rem; border-radius: 12px; flex-shrink: 0; white-space: nowrap; }
.au-role-superadmin { background: #fee2e2; color: #dc2626; }
.au-role-admin { background: #ede9fe; color: #7c3aed; }
.au-role-user { background: #f3f4f6; color: #4b5563; }
.au-meta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 0.875rem; }
.au-meta-item { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.78rem; color: #9ca3af; }
.au-role-action {
display: flex;
align-items: center;
gap: 0.75rem;
flex-wrap: wrap;
padding-top: 0.75rem;
border-top: 1px solid #f1f5f9;
}
.au-confirm-wrap { position: relative; display: inline-block; }
.au-role-btn {
display: inline-flex;
align-items: center;
gap: 0.4rem;
font-size: 0.8rem;
font-weight: 600;
padding: 0.45rem 0.9rem;
border-radius: 8px;
border: none;
cursor: pointer;
transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.au-role-btn:disabled { opacity: 0.65; cursor: not-allowed; }
.au-role-btn-make { background: #dbeafe; color: #1d4ed8; }
.au-role-btn-make:hover:not(:disabled) { background: #3b82f6; color: #fff; transform: translateY(-1px); box-shadow: 0 3px 10px rgba(59,130,246,0.3); }
.au-role-btn-remove { background: #fee2e2; color: #dc2626; }
.au-role-btn-remove:hover:not(:disabled) { background: #ef4444; color: #fff; transform: translateY(-1px); box-shadow: 0 3px 10px rgba(239,68,68,0.3); }
.au-role-msg { font-size: 0.78rem; font-weight: 600; color: #10b981; }
.au-own-tag {
display: inline-flex;
align-items: center;
padding: 0.25rem 0.7rem;
background: #fef3c7;
color: #92400e;
font-size: 0.75rem;
font-weight: 700;
border-radius: 10px;
margin-top: 0.75rem;
}
.au-view-more-wrap { display: flex; justify-content: center; margin: 1rem 0 1.5rem; }
.au-view-more-btn {
display: inline-flex;
align-items: center;
gap: 0.5rem;
padding: 0.75rem 2rem;
background: #f8fafc;
border: 1.5px solid #e2e8f0;
border-radius: 8px;
font-size: 0.9rem;
font-weight: 600;
color: #374151;
cursor: pointer;
transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.au-view-more-btn:hover:not(:disabled) { background: #3b82f6; color: #fff; border-color: #3b82f6; transform: translateY(-2px); box-shadow: 0 4px 14px rgba(59,130,246,0.3); }
.au-view-more-btn:disabled { cursor: not-allowed; opacity: 0.7; }
.au-dots { display: inline-flex; gap: 3px; align-items: center; }
.au-dots span { width: 5px; height: 5px; border-radius: 50%; background: currentColor; animation: au-dot-bounce 1s ease infinite; }
.au-dots span:nth-child(2) { animation-delay: 0.15s; }
.au-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes au-dot-bounce { 0%, 80%, 100% { transform: translateY(0); opacity: 0.4; } 40% { transform: translateY(-5px); opacity: 1; } }
.au-all-loaded { text-align: center; color: #9ca3af; font-size: 0.85rem; padding: 1rem 0 2rem; }
.au-empty { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; padding: 4rem 1rem; color: #9ca3af; }
@media (max-width: 640px) { .au-users-grid { grid-template-columns: 1fr; } }
/* ─────────────────────────────────────────────────────────────
Confirm dropdown β€” portal on document.body
position:fixed escapes ALL overflow / stacking contexts
top + left set inline via JS (getBoundingClientRect)
───────────────────────────────────────────────────────────── */
.au-confirm-dropdown {
position: fixed;
min-width: 230px;
background: #ffffff;
border: 1.5px solid #e5e7eb;
border-top: 3px solid #3b82f6;
border-radius: 12px;
box-shadow: 0 8px 30px rgba(0, 0, 0, 0.16);
padding: 1rem;
z-index: 2147483647;
display: flex;
flex-direction: column;
gap: 0.55rem;
animation: au-drop-in 0.18s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes au-drop-in {
from { opacity: 0; transform: translateY(-6px) scale(0.96); }
to { opacity: 1; transform: translateY(0) scale(1); }
}
.au-confirm-dropdown-icon { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; align-self: flex-start; }
.au-confirm-icon-blue { background: #eff6ff; color: #3b82f6; border: 2px solid #bfdbfe; }
.au-confirm-icon-red { background: #fff1f2; color: #ef4444; border: 2px solid #fecdd3; }
.au-confirm-dropdown-title { font-size: 0.9rem; font-weight: 700; color: #1f2937; margin: 0; }
.au-confirm-dropdown-text { font-size: 0.8rem; color: #6b7280; line-height: 1.5; margin: 0; }
.au-confirm-dropdown-actions { display: flex; gap: 0.5rem; margin-top: 0.25rem; }
.au-confirm-dropdown-btn { flex: 1; padding: 0.45rem 0.75rem; border-radius: 7px; border: none; font-size: 0.8rem; font-weight: 600; cursor: pointer; transition: background 0.15s ease; }
.au-confirm-dropdown-btn:active { transform: scale(0.96); }
.au-confirm-cancel { background: #f3f4f6; color: #374151; }
.au-confirm-cancel:hover { background: #e5e7eb; }
.au-confirm-ok-blue { background: #3b82f6; color: #fff; }
.au-confirm-ok-blue:hover { background: #2563eb; }
.au-confirm-ok-red { background: #ef4444; color: #fff; }
.au-confirm-ok-red:hover { background: #dc2626; }