/* ==========================================================================
   FIVERR PULSE // CYBER-DARK FUTURISTIC DESIGN SYSTEM
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
    --bg-darkest: #050811;
    --bg-base: #090e1a;
    --bg-card: rgba(15, 23, 42, 0.75);
    --bg-card-hover: rgba(22, 33, 58, 0.85);
    --bg-glass: rgba(13, 20, 36, 0.65);
    --border-subtle: rgba(56, 189, 248, 0.12);
    --border-bright: rgba(56, 189, 248, 0.4);
    
    --neon-blue: #00f0ff;
    --neon-cyan: #38bdf8;
    --neon-green: #00ff88;
    --neon-red: #ff2e63;
    --neon-purple: #a855f7;
    --neon-amber: #f59e0b;

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --glow-blue: 0 0 25px rgba(0, 240, 255, 0.25);
    --glow-green: 0 0 25px rgba(0, 255, 136, 0.3);
    --glow-red: 0 0 25px rgba(255, 46, 99, 0.3);

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-darkest);
    background-image: 
        radial-gradient(at 0% 0%, rgba(56, 189, 248, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(168, 85, 247, 0.06) 0px, transparent 50%),
        radial-gradient(at 50% 50%, rgba(0, 255, 136, 0.03) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-darkest);
}
::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--neon-cyan);
}

/* Header & Navigation */
.navbar {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-subtle);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0.85rem 1.5rem;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 800;
    font-size: 1.35rem;
    letter-spacing: -0.5px;
}

.brand-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #00f0ff, #3b82f6);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--glow-blue);
    color: #000;
    font-weight: 900;
    font-size: 1.1rem;
}

.brand-badge {
    background: rgba(0, 240, 255, 0.12);
    border: 1px solid var(--border-bright);
    color: var(--neon-blue);
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-family: var(--font-mono);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link:hover, .nav-link.active {
    color: var(--neon-blue);
    background: rgba(0, 240, 255, 0.08);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-menu-btn {
    display: none;
    background: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    font-size: 1.25rem;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

/* Main Layout */
.app-container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    flex: 1;
}

/* Grid & Cards */
.cyber-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.cyber-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.cyber-card:hover {
    border-color: var(--border-bright);
    box-shadow: 0 12px 35px rgba(0, 240, 255, 0.1);
    transform: translateY(-2px);
}

.cyber-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--neon-blue), transparent);
    opacity: 0.6;
}

/* Quick Stat Counters */
.stat-box {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-icon.blue { background: rgba(0, 240, 255, 0.12); color: var(--neon-blue); border: 1px solid rgba(0, 240, 255, 0.25); }
.stat-icon.green { background: rgba(0, 255, 136, 0.12); color: var(--neon-green); border: 1px solid rgba(0, 255, 136, 0.25); }
.stat-icon.red { background: rgba(255, 46, 99, 0.12); color: var(--neon-red); border: 1px solid rgba(255, 46, 99, 0.25); }
.stat-icon.purple { background: rgba(168, 85, 247, 0.12); color: var(--neon-purple); border: 1px solid rgba(168, 85, 247, 0.25); }

.stat-val {
    font-size: 2.1rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.5px;
    font-family: var(--font-mono);
}

.stat-title {
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

/* Status Badges */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: 0.5px;
    font-family: var(--font-mono);
}

.status-pill.online {
    background: rgba(0, 255, 136, 0.12);
    color: var(--neon-green);
    border: 1px solid rgba(0, 255, 136, 0.35);
    box-shadow: var(--glow-green);
}

.status-pill.offline {
    background: rgba(255, 46, 99, 0.12);
    color: var(--neon-red);
    border: 1px solid rgba(255, 46, 99, 0.35);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    position: relative;
}

.pulse-dot.green {
    background: var(--neon-green);
    box-shadow: 0 0 10px var(--neon-green);
    animation: pulse 1.8s infinite;
}

.pulse-dot.red {
    background: var(--neon-red);
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(0, 255, 136, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 255, 136, 0); }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-decoration: none;
    font-family: var(--font-main);
}

.btn-primary {
    background: linear-gradient(135deg, #00f0ff, #0077ff);
    color: #000;
    box-shadow: var(--glow-blue);
}

.btn-primary:hover {
    filter: brightness(1.15);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, #00ff88, #059669);
    color: #000;
    box-shadow: var(--glow-green);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-bright);
    color: var(--neon-blue);
}

.btn-outline:hover {
    background: rgba(0, 240, 255, 0.1);
}

.btn-danger {
    background: rgba(255, 46, 99, 0.15);
    border: 1px solid rgba(255, 46, 99, 0.35);
    color: var(--neon-red);
}

.btn-danger:hover {
    background: var(--neon-red);
    color: #fff;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(10, 15, 28, 0.8);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--neon-blue);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Modern Cyber Table */
.table-responsive {
    overflow-x: auto;
}

.cyber-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}

.cyber-table th {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.75rem 1rem;
    text-align: left;
    border: none;
}

.cyber-table td {
    background: var(--bg-card);
    padding: 1rem;
    font-size: 0.9rem;
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

.cyber-table tr td:first-child {
    border-left: 1px solid var(--border-subtle);
    border-top-left-radius: var(--radius-sm);
    border-bottom-left-radius: var(--radius-sm);
}

.cyber-table tr td:last-child {
    border-right: 1px solid var(--border-subtle);
    border-top-right-radius: var(--radius-sm);
    border-bottom-right-radius: var(--radius-sm);
}

.cyber-table tr:hover td {
    background: var(--bg-card-hover);
    border-color: var(--border-bright);
}

/* Futuristic Target Profile Card */
.target-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
}

.target-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    position: relative;
    transition: var(--transition);
}

.target-card.is-online {
    border-color: rgba(0, 255, 136, 0.4);
    box-shadow: 0 10px 30px rgba(0, 255, 136, 0.08);
}

.target-card.is-offline {
    border-color: rgba(255, 46, 99, 0.3);
}

.target-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.target-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 1px solid var(--border-bright);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--neon-cyan);
    font-size: 1.1rem;
}

.user-name-title {
    font-weight: 700;
    font-size: 1.15rem;
    color: #fff;
    text-decoration: none;
    display: block;
}

.user-name-title:hover {
    color: var(--neon-blue);
}

.user-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.target-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 1.25rem 0;
    background: rgba(10, 15, 28, 0.6);
    padding: 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
}

.metric-item {
    font-size: 0.8rem;
}

.metric-item .label {
    color: var(--text-muted);
    display: block;
    margin-bottom: 2px;
}

.metric-item .val {
    font-weight: 600;
    font-family: var(--font-mono);
    color: #fff;
}

.target-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-subtle);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(4, 7, 15, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.modal-overlay.active {
    display: flex;
}

.cyber-modal {
    background: var(--bg-base);
    border: 1px solid var(--border-bright);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 580px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), var(--glow-blue);
    overflow: hidden;
    animation: modalPop 0.25s ease-out;
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}

.modal-body {
    padding: 1.5rem;
    max-height: 80vh;
    overflow-y: auto;
}

/* Flash alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    color: var(--neon-green);
}

.alert-danger {
    background: rgba(255, 46, 99, 0.1);
    border: 1px solid rgba(255, 46, 99, 0.3);
    color: var(--neon-red);
}

/* Footer */
.footer {
    border-top: 1px solid var(--border-subtle);
    padding: 1.5rem;
    background: var(--bg-glass);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: auto;
}

/* Toast Container */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: #0f172a;
    border: 1px solid var(--border-bright);
    color: #fff;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    min-width: 280px;
    animation: toastIn 0.3s ease;
}

.toast.success { border-color: var(--neon-green); }
.toast.error { border-color: var(--neon-red); }

@keyframes toastIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-base);
        padding: 1rem;
        border-bottom: 1px solid var(--border-subtle);
    }
    .nav-links.show {
        display: flex;
    }
    .mobile-menu-btn {
        display: block;
    }
    .target-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   ROLE SECURITY & USER / ADMIN VISUAL IDENTITY SYSTEM
   ========================================================================== */
.role-badge-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    line-height: 1;
}

.role-badge-btn.admin-badge-btn {
    border-color: rgba(245, 158, 11, 0.45);
    background: rgba(245, 158, 11, 0.08);
    color: #fef08a;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.15);
}
.role-badge-btn.admin-badge-btn:hover {
    border-color: var(--neon-amber);
    background: rgba(245, 158, 11, 0.18);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.35);
    color: #fff;
}

.role-badge-btn.user-badge-btn {
    border-color: rgba(56, 189, 248, 0.35);
    background: rgba(56, 189, 248, 0.06);
    color: #e0f2fe;
}
.role-badge-btn.user-badge-btn:hover {
    border-color: var(--neon-cyan);
    background: rgba(56, 189, 248, 0.16);
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.25);
    color: #fff;
}

.role-icon {
    font-size: 1.15rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.role-pill {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    padding: 2px 7px;
    border-radius: 4px;
    text-transform: uppercase;
    font-family: var(--font-mono);
}
.role-pill.pill-admin {
    background: rgba(245, 158, 11, 0.22);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.5);
}
.role-pill.pill-user {
    background: rgba(0, 255, 136, 0.15);
    color: var(--neon-green);
    border: 1px solid rgba(0, 255, 136, 0.4);
}

.security-scope-card {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    font-size: 0.85rem;
    line-height: 1.45;
}
.security-scope-card.admin-scope {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #fde68a;
}
.security-scope-card.user-scope {
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: #bae6fd;
}

/* User Management Table in Admin Area */
.user-row {
    transition: var(--transition);
}
.user-row:hover {
    background: rgba(56, 189, 248, 0.04);
}

