/* --- Root Variables --- */
:root {
    --bg-main: #0a0a0a;
    /* Deep matte background */
    --bg-card: #141414;
    /* Widget/Card background */
    --bg-sidebar: #0d0d0d;
    /* Sidebar background */
    --border-color: #1a1a1a;
    /* Subtle borders */
    --text-main: #ffffff;
    --text-muted: #444444;
    /* Darker grey for headers */
    --text-nav: #888888;
    /* Sidebar link color */
    --accent-red: #ff4d4d;
    /* For logout/danger items */
}

/* --- General Styles --- */
body {
    background-color: var(--bg-main) !important;
    color: var(--text-main);
    font-family: 'Inter', -apple-system, sans-serif;
    overflow-x: hidden;
}

/* --- Sidebar Layout --- */
.sidebar {
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    padding: 30px 20px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
}

/* Sidebar Branding */
.brand-logo {
    background: #fff;
    color: #000;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: 900;
    margin-right: 12px;
}

.brand-text {
    line-height: 1.2;
}

/* Sidebar Navigation - FIX FOR BLUE LINKS */
.category-label {
    color: var(--text-muted);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 20px 0 10px 0;
    font-weight: bold;
}

.nav-link.custom-nav {
    color: var(--text-nav) !important;
    padding: 8px 0 !important;
    /* Align with category labels */
    font-size: 0.9rem;
    transition: 0.2s ease;
    background: transparent !important;
    /* Removes blue hover boxes */
}

.nav-link.custom-nav:hover,
.nav-link.custom-nav.active {
    color: #fff !important;
    text-decoration: none;
}

.nav-link.custom-nav.text-danger {
    color: var(--accent-red) !important;
}

.nav-link.custom-nav i {
    margin-right: 10px;
    color: inherit;
}

/* Sidebar Footer (Status Items) */
.sidebar-footer {
    position: absolute;
    bottom: 30px;
    left: 20px;
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-item {
    margin-top: 5px;
}

/* --- Main Content Area --- */
main {
    margin-left: 16.666667%;
    /* Offset for col-md-2 */
    padding-top: 50px;
    min-height: 100vh;
}

/* Card/Widget Styling */
.card-widget {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
}

/* --- Table Refinements --- */
.table {
    table-layout: fixed;
    /* Forces the width percentages we set in HTML */
    width: 100%;
    color: var(--text-main) !important;
}

/* Ensure consistent spacing for the start of the action column */
.table td:last-child {
    padding-left: 10px !important;
    /* Small gap from the License Key column */
    padding-right: 0 !important;
}

.table thead th {
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted) !important;
    border-bottom: 1px solid var(--border-color) !important;
    padding-bottom: 15px;
}

.table td {
    padding: 18px 0 !important;
    /* Breathing room like the original image */
    border-bottom: 1px solid #141414 !important;
    vertical-align: middle;
    background: transparent !important;
}

/* License Key Block */
.license-key {
    background: #0f0f0f;
    border: 1px solid var(--border-color);
    color: #666;
    /* Muted key like Arcane */
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
}

/* --- Button Styling --- */
.btn-outline-light {
    border-color: #222222 !important;
    color: #fff !important;
    font-size: 10px !important;
    font-weight: bold;
    letter-spacing: 1px;
    padding: 5px 15px !important;
    border-radius: 6px;
    text-transform: uppercase;
}

.btn-outline-light:hover {
    background: #fff !important;
    color: #000 !important;
    border-color: #fff !important;
}

/* --- Small Credit Footer --- */
.system-footer {
    position: fixed;
    bottom: 10px;
    right: 20px;
    z-index: 1;
    opacity: 0.5;
}

/* Role Badges Styling */
.role-badge {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    padding: 2px 0;
    display: inline-block;
}

/* Matte Red for Admin */
.role-admin {
    color: #ff4d4d;
    text-shadow: 0 0 10px rgba(255, 77, 77, 0.2);
}

/* Matte Purple for Reseller */
.role-reseller {
    color: #a370f7;
    text-shadow: 0 0 10px rgba(163, 112, 247, 0.2);
}

/* Action Button Styling */
.gap-2 {
    gap: 0.5rem !important;
}

.btn-sm {
    padding: 4px 8px !important;
    font-size: 12px !important;
    border-radius: 6px !important;
    transition: all 0.2s ease;
}

/* Specific colors for the actions to stay within the matte theme */
.btn-outline-info {
    color: #0dcaf0 !important;
    border-color: #0dcaf044 !important;
}

.btn-outline-info:hover {
    background-color: #0dcaf0 !important;
    color: #000 !important;
}

.btn-outline-danger {
    color: #ff4d4d !important;
    border-color: #ff4d4d44 !important;
}

.btn-outline-danger:hover {
    background-color: #ff4d4d !important;
    color: #fff !important;
}

/* Badge for banned state */
.badge {
    padding: 3px 6px;
    letter-spacing: 0.5px;
    font-weight: 800;
}

/* Action Buttons Container */
.action-group {
    display: flex !important;
    gap: 12px;
    justify-content: flex-start;
    /* Aligns buttons with the 'A' in 'Actions' */
    float: none !important;
    /* Remove any previous float */
}

/* Base Action Button Style */
.action-btn {
    background: #161616 !important;
    border: 1px solid #222 !important;
    color: #555 !important;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px !important;
    transition: all 0.2s ease;
}

.action-btn i {
    font-size: 14px;
}

/* Hover Effects */
.action-btn:hover {
    color: #fff;
    border-color: #444;
    background: #222;
}

/* HWID Reset Specific (Info) */
.action-btn.info:hover {
    color: #0dcaf0;
    border-color: #0dcaf044;
}

/* Ban Button (Danger) */
.action-btn.danger.active {
    color: #ff4d4d;
    border-color: #ff4d4d44;
    background: rgba(255, 77, 77, 0.1);
}

.action-btn.danger:hover {
    color: #ff4d4d;
    border-color: #ff4d4d88;
}

/* Banned Badge Styling */
.badge-banned {
    background: rgba(255, 77, 77, 0.15);
    color: #ff4d4d;
    font-size: 8px;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    font-weight: 800;
    text-transform: uppercase;
    margin-left: 8px;
    vertical-align: middle;
}

/* Minimalist Nexus Login Button */
.btn-nexus-login {
    background: #1a1a1a !important;
    border: 1px solid #222 !important;
    color: #888 !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
}

.btn-nexus-login i {
    color: #444;
    /* Muted icon color */
    transition: all 0.3s ease;
}

.btn-nexus-login:hover {
    background: #fff !important;
    color: #000 !important;
    border-color: #fff !important;
    transform: translateY(-1px);
}

.btn-nexus-login:hover i {
    color: #000;
    /* Icon turns black on white background */
}

/* Subtle label for the login page */
.extra-small {
    font-size: 9px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #333;
}

/* Premium Arcane Login Button */
/* Premium Arcane Login Button - Icon on Right Edition */
.btn-arcane-login {
    background: transparent !important;
    border: 1px solid #222 !important;
    /* Subtle border from your reference */
    color: #666 !important;
    /* Muted text */
    padding: 16px 24px !important;
    border-radius: 4px !important;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
    position: relative;
}

.btn-arcane-login i {
    color: #444;
    /* Darker icon initially */
    transition: transform 0.3s ease, color 0.4s ease;
}

/* Hover State: High Contrast */
.btn-arcane-login:hover {
    background: #ffffff !important;
    color: #000000 !important;
    border-color: #ffffff !important;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.btn-arcane-login:hover i {
    color: #000000;
    transform: translateX(3px);
    /* Subtle "entry" animation for the icon */
}

/* Background Texture for Login */
body.login-page {
    background: radial-gradient(circle at center, #0f0f0f 0%, #050505 100%) !important;
}