:root {
    --admin-bg: #0a0a0a;
    --sidebar-bg: #111111;
    --content-bg: #000000;
    --card-bg: #1a1a1a;
    --border-color: rgba(255, 255, 255, 0.1);
    --text-primary: #f5f5f5;
    --text-secondary: #888;
    --accent: #ffffff;
    --accent-glow: rgba(255, 255, 255, 0.5);
    --danger: #ff4757;
    --success: #2ed573;
    --unused: #ffc107;
    --sidebar-width: 260px;
}

.admin-body { 
    background-color: var(--admin-bg); 
    color: var(--text-primary); 
    font-family: 'Poppins', sans-serif; 
    margin: 0;
    padding: 0;
}

.admin-container { 
    display: flex; 
    min-height: 100vh; 
}

.sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    padding: 1.5rem 0;
    display: flex;
    flex-direction: column;
}

.sidebar-header { 
    display: flex; 
    justify-content: center;
    align-items: center; 
    margin-bottom: 2rem; 
    padding: 0 1rem;
}

.sidebar-header .logo {
    background-image: url('../images/NoNameNobg.webp');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    display: block;
    width: 220px;
    height: 100px;
    transition: all 0.3s ease;
}

.sidebar-header .logo:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.sidebar-nav ul { 
    list-style: none; 
    padding-left: 0;
    margin: 0 1rem;
}

.sidebar-nav ul li .nav-link, 
.sidebar-footer .nav-link { 
    display: flex; 
    align-items: center; 
    gap: 0.75rem; 
    padding: 0.85rem 1.25rem;
    margin: 0.25rem 0;
    border-radius: 8px; 
    color: var(--text-secondary); 
    text-decoration: none; 
    font-weight: 500; 
    transition: all 0.3s; 
    white-space: nowrap; 
}

.sidebar-nav ul li .nav-link:hover,
.sidebar-footer .nav-link:hover { 
    background-color: var(--card-bg); 
    color: var(--text-primary); 
}

.sidebar-nav ul li .nav-link.active { 
    background-color: var(--accent); 
    color: #000; 
    box-shadow: 0 0 15px var(--accent-glow); 
}

.sidebar-nav .nav-link i { 
    font-size: 1.2rem; 
    width: 24px; 
    text-align: center; 
}

.sidebar-footer { 
    margin-top: auto; 
    padding: 0 1rem;
}

.main-content {
    flex-grow: 1;
    background-color: var(--content-bg);
    padding: 1.5rem 2.5rem;
    overflow-y: auto;
}

.main-header { 
    display: flex; 
    justify-content: flex-end; 
    align-items: center; 
    margin-bottom: 2rem; 
}

.search-filter-container {
    display: flex;
    gap: 15px;
    margin-bottom: 1.5rem;
    align-items: center;
}

.search-bar {
    position: relative;
    flex: 1;
    max-width: 400px;
    margin-bottom: 0;
}

.styled-select {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 5px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    width: 106%;
    appearance: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding-right: 5rem;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="white"><polygon points="0,0 12,0 6,6"/></svg>');
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 10px;
}

.styled-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

.search-bar i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.search-bar input {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    font-size: 1rem;
    width: 85%;
    transition: all 0.3s ease;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

.search-bar input:focus + i {
    color: var(--accent);
}

.filter-dropdown {
    position: relative;
}

.filter-dropdown select {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 0.75rem 1rem 0.75rem 1rem;
    font-size: 1rem;
    min-width: 120px;
    appearance: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding-right: 2.5rem;
}

.filter-dropdown select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

.filter-dropdown::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
}

.filter-dropdown:hover::after {
    color: var(--accent);
}

.license-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1.5rem;
}

.btn-license {
    background-color: var(--accent);
    color: #000;
    border: none;
    border-radius: 8px;
    padding: 0.85rem 1.25rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 0 15px var(--accent-glow);
}

.btn-license:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px var(--accent-glow);
}

.page-section { 
    display: none; 
}

.page-section.active { 
    display: block; 
    animation: fadeIn 0.5s ease-out;
}

.stat-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 1.5rem; 
    margin-bottom: 2rem;
}

.stat-card { 
    background: var(--card-bg); 
    border-radius: 12px; 
    padding: 1.5rem; 
    display: flex; 
    align-items: center; 
    gap: 1.5rem; 
    border: 1px solid var(--border-color); 
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon { 
    font-size: 2rem; 
    color: var(--accent); 
}

.stat-info p { 
    margin: 0; 
    color: var(--text-secondary); 
    font-size: 0.9rem;
}

.stat-info span { 
    font-size: 2rem; 
    font-weight: 700; 
    color: var(--accent);
}

/* Table Styles */
.table-container { 
    background-color: var(--card-bg); 
    border-radius: 12px; 
    border: 1px solid var(--border-color); 
    overflow-x: auto; 
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

table { 
    width: 100%; 
    border-collapse: collapse; 
}

th, td { 
    padding: 1rem 1.5rem; 
    text-align: left; 
}

th { 
    font-weight: 600; 
    color: var(--text-secondary); 
    text-transform: uppercase; 
    font-size: 0.8rem; 
    background-color: rgba(255, 255, 255, 0.05);
    position: sticky;
    top: 0;
}

tbody tr { 
    border-bottom: 1px solid var(--border-color); 
    transition: all 0.2s ease;
}

tbody tr:last-child { 
    border-bottom: none; 
}

tbody tr:hover { 
    background-color: rgba(255, 255, 255, 0.03); 
}

.status {
    display: inline-block;
    width: 9px;
    height: 9px; 
    border-radius: 50%;
    margin-right: 6px; 
    position: relative;
    animation: breathe 3s ease-in-out infinite;
}

.status::after {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border-radius: 50%;
    opacity: 0;
    animation: pulse-glow 2.5s infinite;
}

@keyframes pulse-glow {
    0% {
        transform: scale(0.9);
        opacity: 0;
    }
    50% {
        opacity: 0.7;
    }
    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

@keyframes breathe {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1); 
    }
}

.status.active {
    background-color: var(--success);
    box-shadow: 0 0 10px var(--success); 
}
.status.active::after {
    box-shadow: 0 0 8px var(--success); 
}

.status.banned {
    background-color: var(--danger);
    box-shadow: 0 0 10px var(--danger);
}
.status.banned::after {
    box-shadow: 0 0 8px var(--danger);
}

.status.unused {
    background-color: var(--unused);
    box-shadow: 0 0 10px var(--unused);
}
.status.unused::after {
    box-shadow: 0 0 8px var(--unused);
}

.status {
    will-change: transform, box-shadow;
    backface-visibility: hidden;
}

.actions { 
    display: flex; 
    gap: 8px; 
}

.action-btn { 
    background: rgba(255, 255, 255, 0.1); 
    border: none; 
    border-radius: 5px; 
    color: var(--text-primary); 
    width: 32px; 
    height: 32px; 
    cursor: pointer; 
    transition: all 0.3s; 
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-btn.edit:hover { 
    background-color: var(--accent); 
    color: #000; 
}

.action-btn.ban:hover { 
    background-color: var(--danger); 
    color: white;
}

.action-btn.unban:hover { 
    background-color: var(--success); 
    color: white;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1001;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-content {
    position: relative;
    background: var(--sidebar-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    max-height: 90vh;
    overflow-y: auto;
    animation: scaleIn 0.3s ease-out;
    z-index: 1002;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.modal.active { 
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal.active .modal-content {
    transform: translateY(0);
}

.modal-overlay { 
    position: absolute; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.7); 
    backdrop-filter: blur(5px); 
    animation: fadeIn 0.3s; 
}

.modal-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 1.5rem; 
    border-bottom: 1px solid var(--border-color); 
}

.modal-header h3 { 
    margin: 0; 
    font-size: 1.3rem;
}

.close-modal { 
    background: none; 
    border: none; 
    font-size: 1.8rem; 
    color: var(--text-secondary); 
    cursor: pointer; 
    transition: color 0.3s;
}

.close-modal:hover {
    color: var(--accent);
}

.modal-form { 
    padding: 1.5rem; 
}

.form-group { 
    margin-bottom: 1.5rem;
    margin-right: auto;
    max-width: 425px; 
}

.form-group label { 
    display: block; 
    margin-bottom: 0.5rem; 
    font-weight: 500; 
    color: var(--text-secondary); 
    font-size: 0.9rem;
}

.form-group input { 
    width: 100%; 
    background: var(--admin-bg); 
    border: 1px solid var(--border-color); 
    color: var(--text-primary); 
    border-radius: 5px; 
    padding: 0.75rem; 
    font-size: 1rem; 
    transition: border-color 0.3s;
}

.form-group input:focus { 
    outline: none; 
    border-color: var(--accent); 
}

.form-group .input-group { 
    display: flex; 
    align-items: center; 
}

.form-group .input-group input { 
    border-radius: 5px 0 0 5px; 
    flex: 1;
}

.form-group .input-group span { 
    background: var(--card-bg); 
    padding: 0.75rem; 
    border-radius: 0 5px 5px 0; 
    border: 1px solid var(--border-color); 
    border-left: none; 
    font-size: 0.9rem;
}

.modal-actions { 
    display: flex; 
    justify-content: flex-end; 
    gap: 1rem; 
    padding: 1.5rem; 
    border-top: 1px solid var(--border-color); 
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--accent);
    color: #000;
}

.btn-primary:hover {
    background-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 255, 255, 0.2);
}

.btn-secondary {
    background-color: var(--card-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

@keyframes fadeIn { 
    from { opacity: 0; } 
    to { opacity: 1; } 
}

@keyframes scaleIn { 
    from { 
        opacity: 0; 
        transform: scale(0.95); 
    } 
    to { 
        opacity: 1; 
        transform: scale(1); 
    } 
}

@keyframes fadeInRow {
    from { 
        opacity: 0;
        transform: translateY(-10px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .admin-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        padding: 1rem;
    }
    
    .main-content {
        padding: 1.5rem;
    }
    
    .stat-grid {
        grid-template-columns: 1fr 1fr;
    }

    .search-filter-container {
        flex-direction: column;
        align-items: stretch;
    }

    .search-bar {
        max-width: 100%;
    }

    .filter-dropdown select {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .stat-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
    }
}