| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775 |
- /* Admin Panel Specific Styles */
- /* Extend the container for admin panel to accommodate wider content */
- .admin-container {
- background: var(--container-bg);
- border-radius: 15px;
- box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
- overflow: hidden;
- width: 100%;
- max-width: 1200px;
- margin: 20px;
- transition: background 0.3s ease;
- min-height: 600px;
- }
- /* Header controls */
- .header-controls {
- position: absolute;
- top: 20px;
- right: 20px;
- display: flex;
- gap: 8px;
- align-items: center;
- }
- .header-btn {
- background: rgba(255, 255, 255, 0.2);
- border: 1px solid rgba(255, 255, 255, 0.3);
- border-radius: 50%;
- width: 40px;
- height: 40px;
- display: flex;
- align-items: center;
- justify-content: center;
- cursor: pointer;
- transition: all 0.3s ease;
- backdrop-filter: blur(10px);
- color: var(--header-text);
- }
- .header-btn:hover {
- background: rgba(255, 255, 255, 0.3);
- transform: scale(1.1);
- }
- .header-btn svg {
- transition: all 0.3s ease;
- }
- /* Admin controls section */
- .admin-controls {
- padding: 20px;
- background: var(--section-bg);
- border-bottom: 1px solid var(--border-color);
- transition: all 0.3s ease;
- }
- /* Stats cards */
- .stats-container {
- display: grid;
- grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
- gap: 15px;
- margin-bottom: 20px;
- }
- .stat-card {
- background: var(--user-details-bg);
- padding: 20px;
- border-radius: 10px;
- text-align: center;
- border: 2px solid transparent;
- transition: all 0.3s ease;
- box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
- }
- .stat-card:hover {
- border-color: var(--tab-border);
- transform: translateY(-2px);
- }
- .stat-card h3 {
- font-size: 2rem;
- font-weight: bold;
- color: var(--tab-active-text);
- margin: 0 0 5px 0;
- transition: color 0.3s ease;
- }
- .stat-card p {
- font-size: 0.9rem;
- color: var(--text-secondary);
- margin: 0;
- transition: color 0.3s ease;
- }
- /* Control buttons */
- .control-buttons {
- display: flex;
- gap: 10px;
- flex-wrap: wrap;
- }
- .action-btn.secondary {
- background: var(--user-info-bg);
- color: var(--text-primary);
- border: 2px solid var(--border-color);
- }
- .action-btn.secondary:hover {
- background: var(--tab-active-bg);
- border-color: var(--tab-border);
- }
- .action-btn svg {
- margin-right: 5px;
- vertical-align: middle;
- }
- /* Users section */
- .users-section {
- padding: 20px;
- }
- .section-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: 20px;
- flex-wrap: wrap;
- gap: 15px;
- }
- .section-header h2 {
- color: var(--text-primary);
- margin: 0;
- font-size: 1.5rem;
- transition: color 0.3s ease;
- }
- /* Search container */
- .search-container {
- position: relative;
- min-width: 250px;
- }
- .search-container input {
- width: 100%;
- padding: 10px 40px 10px 15px;
- border: 2px solid var(--input-border);
- border-radius: 25px;
- background: var(--input-bg);
- color: var(--input-text);
- font-size: 0.9rem;
- transition: all 0.3s ease;
- }
- .search-container input:focus {
- outline: none;
- border-color: var(--input-focus-border);
- box-shadow: 0 0 0 3px var(--input-focus-shadow);
- }
- .search-icon {
- position: absolute;
- right: 12px;
- top: 50%;
- transform: translateY(-50%);
- color: var(--text-secondary);
- pointer-events: none;
- transition: color 0.3s ease;
- }
- /* Table styles */
- .table-container {
- background: var(--user-details-bg);
- border-radius: 10px;
- overflow: hidden;
- box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
- transition: background 0.3s ease;
- }
- .users-table {
- width: 100%;
- border-collapse: collapse;
- font-size: 0.9rem;
- }
- .users-table th,
- .users-table td {
- padding: 15px 12px;
- text-align: left;
- border-bottom: 1px solid var(--border-color);
- transition: border-color 0.3s ease;
- }
- .users-table th {
- background: var(--section-bg);
- font-weight: 600;
- color: var(--text-primary);
- text-transform: uppercase;
- font-size: 0.8rem;
- letter-spacing: 0.5px;
- transition: all 0.3s ease;
- }
- .users-table tbody tr:hover {
- background: var(--section-bg);
- transition: background 0.3s ease;
- }
- .users-table tbody tr:last-child td {
- border-bottom: none;
- }
- /* Table cell content */
- .users-table .user-info {
- display: block !important;
- padding: 0;
- background: none;
- border: none;
- }
- .username {
- font-weight: 600;
- color: var(--text-primary);
- transition: color 0.3s ease;
- display: inline !important;
- }
- .email {
- color: var(--text-secondary);
- font-size: 0.85rem;
- transition: color 0.3s ease;
- }
- /* Role badges */
- .roles {
- display: flex;
- gap: 5px;
- flex-wrap: wrap;
- }
- .role-badge {
- display: inline-block;
- padding: 3px 8px;
- border-radius: 12px;
- font-size: 0.7rem;
- font-weight: 600;
- text-transform: uppercase;
- letter-spacing: 0.5px;
- transition: all 0.3s ease;
- }
- .role-badge.admin {
- background: linear-gradient(135deg, #ff6b6b, #ee5a52);
- color: white;
- }
- .role-badge.user {
- background: var(--section-bg);
- color: var(--text-secondary);
- border: 1px solid var(--border-color);
- }
- .role-badge.moderator {
- background: linear-gradient(135deg, #4ecdc4, #44a08d);
- color: white;
- }
- .role-badge.service {
- background: linear-gradient(135deg, #667eea, #764ba2);
- color: white;
- }
- .role-badge.system {
- background: linear-gradient(135deg, #2d3748, #4a5568);
- color: white;
- }
- .role-badge.vpn {
- background: linear-gradient(135deg, #48bb78, #38a169);
- color: white;
- }
- .role-badge.tester {
- background: linear-gradient(135deg, #ed8936, #dd6b20);
- color: white;
- }
- /* Default/fallback style for any unknown roles */
- .role-badge:not(.admin):not(.user):not(.moderator):not(.service):not(.system):not(.vpn):not(.tester) {
- background: linear-gradient(135deg, #718096, #4a5568);
- color: white;
- border: 1px solid var(--border-color);
- }
- /* Status badges */
- .status-badge {
- display: inline-block;
- padding: 4px 10px;
- border-radius: 15px;
- font-size: 0.75rem;
- font-weight: 600;
- text-transform: uppercase;
- letter-spacing: 0.5px;
- transition: all 0.3s ease;
- }
- .status-badge.active {
- background: var(--message-success-bg);
- color: var(--message-success-text);
- border: 1px solid var(--message-success-border);
- }
- .status-badge.inactive {
- background: var(--message-error-bg);
- color: var(--message-error-text);
- border: 1px solid var(--message-error-border);
- }
- /* Last login */
- .last-login {
- color: var(--text-secondary);
- font-size: 0.8rem;
- transition: color 0.3s ease;
- }
- /* Action buttons in table */
- .action-buttons {
- display: flex;
- gap: 5px;
- }
- .action-btn.small {
- padding: 6px 8px;
- font-size: 0.8rem;
- min-width: auto;
- width: auto;
- display: inline-flex;
- align-items: center;
- justify-content: center;
- }
- .action-btn.small svg {
- margin: 0;
- }
- /* Loading states */
- .loading-container {
- text-align: center;
- padding: 40px 20px;
- color: var(--text-secondary);
- }
- .loading-spinner {
- display: inline-block;
- width: 32px;
- height: 32px;
- border: 3px solid var(--border-color);
- border-radius: 50%;
- border-top-color: var(--tab-border);
- animation: spin 1s ease-in-out infinite;
- margin-bottom: 15px;
- }
- /* Empty state */
- .empty-state {
- text-align: center;
- padding: 60px 20px;
- color: var(--text-secondary);
- }
- .empty-state h3 {
- color: var(--text-primary);
- margin: 15px 0 10px 0;
- transition: color 0.3s ease;
- }
- .empty-state p {
- margin: 0;
- font-size: 0.9rem;
- }
- .empty-state svg {
- margin-bottom: 15px;
- }
- /* Responsive design */
- @media (max-width: 768px) {
- .admin-container {
- margin: 10px;
- max-width: none;
- }
- .header-controls {
- position: relative;
- top: 15px;
- right: auto;
- justify-content: center;
- margin-top: 15px;
- }
- .stats-container {
- grid-template-columns: 1fr;
- gap: 10px;
- }
- .section-header {
- flex-direction: column;
- align-items: stretch;
- }
- .search-container {
- min-width: auto;
- }
- /* Make table horizontally scrollable on mobile */
- .table-container {
- overflow-x: auto;
- }
- .users-table {
- min-width: 700px;
- }
- .users-table th,
- .users-table td {
- padding: 10px 8px;
- white-space: nowrap;
- }
- .roles {
- flex-direction: column;
- gap: 3px;
- }
- .action-buttons {
- flex-direction: column;
- gap: 3px;
- }
- }
- @media (max-width: 480px) {
- .users-section {
- padding: 15px;
- }
- .admin-controls {
- padding: 15px;
- }
- .stat-card {
- padding: 15px;
- }
- .stat-card h3 {
- font-size: 1.5rem;
- }
- }
- /* Edit User Modal */
- .modal {
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- background: rgba(0, 0, 0, 0.6);
- display: flex;
- align-items: center;
- justify-content: center;
- z-index: 1000;
- backdrop-filter: blur(4px);
- }
- .modal-content {
- background: var(--container-bg);
- border-radius: 15px;
- box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
- width: 100%;
- max-width: 500px;
- max-height: 90vh;
- overflow-y: auto;
- margin: 20px;
- transition: all 0.3s ease;
- }
- .modal-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 25px 30px 20px;
- border-bottom: 1px solid var(--border-color);
- }
- .modal-header h3 {
- margin: 0;
- color: var(--text-primary);
- font-size: 1.4rem;
- transition: color 0.3s ease;
- }
- .close-btn {
- background: none;
- border: none;
- color: var(--text-secondary);
- cursor: pointer;
- padding: 5px;
- border-radius: 50%;
- transition: all 0.3s ease;
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 24px;
- line-height: 1;
- }
- .close-btn:hover {
- background: var(--section-bg);
- color: var(--text-primary);
- transform: scale(1.1);
- }
- .form-section {
- padding: 20px 30px;
- border-bottom: 1px solid var(--border-color);
- }
- .form-section:last-of-type {
- border-bottom: none;
- }
- .section-label {
- display: block;
- font-weight: 600;
- color: var(--text-primary);
- margin-bottom: 15px;
- font-size: 1rem;
- transition: color 0.3s ease;
- }
- /* Toggle Switch */
- .toggle-switch {
- display: flex;
- align-items: center;
- gap: 12px;
- cursor: pointer;
- padding: 8px 0;
- }
- .toggle-switch input[type="checkbox"] {
- display: none;
- }
- .toggle-slider {
- position: relative;
- width: 50px;
- height: 24px;
- background: var(--border-color);
- border-radius: 24px;
- transition: all 0.3s ease;
- }
- .toggle-slider::before {
- content: '';
- position: absolute;
- top: 2px;
- left: 2px;
- width: 20px;
- height: 20px;
- background: white;
- border-radius: 50%;
- transition: all 0.3s ease;
- box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
- }
- .toggle-switch input[type="checkbox"]:checked + .toggle-slider {
- background: var(--tab-border);
- }
- .toggle-switch input[type="checkbox"]:checked + .toggle-slider::before {
- transform: translateX(26px);
- }
- .toggle-label {
- color: var(--text-primary);
- font-weight: 500;
- transition: color 0.3s ease;
- }
- /* Role Checkboxes */
- .roles-grid {
- display: grid;
- grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
- gap: 12px;
- }
- .role-checkbox {
- display: flex;
- align-items: center;
- gap: 10px;
- cursor: pointer;
- padding: 12px;
- border: 2px solid var(--border-color);
- border-radius: 8px;
- transition: all 0.3s ease;
- background: var(--user-details-bg);
- }
- .role-checkbox:hover {
- border-color: var(--tab-border);
- background: var(--section-bg);
- }
- .role-checkbox input[type="checkbox"] {
- display: none;
- }
- .role-checkmark {
- width: 18px;
- height: 18px;
- border: 2px solid var(--border-color);
- border-radius: 4px;
- position: relative;
- transition: all 0.3s ease;
- flex-shrink: 0;
- }
- .role-checkmark::after {
- content: '';
- position: absolute;
- top: 2px;
- left: 5px;
- width: 4px;
- height: 8px;
- border: solid white;
- border-width: 0 2px 2px 0;
- transform: rotate(45deg);
- opacity: 0;
- transition: opacity 0.3s ease;
- }
- .role-checkbox input[type="checkbox"]:checked + .role-checkmark {
- background: var(--tab-border);
- border-color: var(--tab-border);
- }
- .role-checkbox input[type="checkbox"]:checked + .role-checkmark::after {
- opacity: 1;
- }
- .role-name {
- font-size: 0.85rem;
- font-weight: 500;
- color: var(--text-primary);
- text-transform: uppercase;
- letter-spacing: 0.5px;
- transition: color 0.3s ease;
- }
- /* Modal Buttons */
- .modal-buttons {
- display: flex;
- gap: 12px;
- padding: 25px 30px;
- justify-content: flex-end;
- }
- .btn-primary, .btn-secondary {
- padding: 12px 24px;
- border: none;
- border-radius: 8px;
- font-weight: 600;
- cursor: pointer;
- transition: all 0.3s ease;
- font-size: 0.9rem;
- }
- .btn-primary {
- background: var(--button-gradient);
- color: var(--button-text);
- }
- .btn-primary:hover {
- transform: translateY(-2px);
- box-shadow: 0 5px 15px var(--button-hover-shadow);
- }
- .btn-primary:disabled {
- background: var(--button-disabled-bg);
- cursor: not-allowed;
- transform: none;
- box-shadow: none;
- }
- .btn-secondary {
- background: var(--section-bg);
- color: var(--text-primary);
- border: 2px solid var(--border-color);
- }
- .btn-secondary:hover {
- background: var(--tab-active-bg);
- border-color: var(--tab-border);
- }
- /* Modal Message */
- .modal-message {
- margin-top: 15px;
- padding: 12px;
- border-radius: 6px;
- text-align: center;
- font-weight: 500;
- font-size: 0.9rem;
- }
- .modal-message.success {
- background: var(--message-success-bg);
- color: var(--message-success-text);
- border: 1px solid var(--message-success-border);
- }
- .modal-message.error {
- background: var(--message-error-bg);
- color: var(--message-error-text);
- border: 1px solid var(--message-error-border);
- }
- /* Mobile Modal Responsiveness */
- @media (max-width: 768px) {
- .modal-content {
- max-width: none;
- margin: 10px;
- max-height: 95vh;
- }
- .modal-header,
- .form-section,
- .modal-buttons {
- padding-left: 20px;
- padding-right: 20px;
- }
- .roles-grid {
- grid-template-columns: 1fr 1fr;
- gap: 8px;
- }
- .role-checkbox {
- padding: 10px;
- font-size: 0.8rem;
- }
- .modal-buttons {
- flex-direction: column;
- }
- }
- /* Dark theme adjustments */
- [data-theme="dark"] .modal {
- background: rgba(0, 0, 0, 0.8);
- }
- [data-theme="dark"] .modal-content {
- box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
- }
- [data-theme="dark"] .table-container {
- box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
- }
- [data-theme="dark"] .stat-card {
- box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
- }
|