/* ClickGuard Pro CSS - Modern Dark Theme & Glassmorphism Design System */

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

:root {
    --bg-main: #0a0a12;
    --bg-gradient: radial-gradient(circle at 50% 0%, #17152d 0%, #07070d 100%);
    --panel-bg: rgba(20, 18, 38, 0.6);
    --panel-border: rgba(255, 255, 255, 0.08);
    --panel-border-hover: rgba(139, 92, 246, 0.25);
    
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    --primary: #8b5cf6;
    --primary-glow: rgba(139, 92, 246, 0.4);
    --primary-hover: #7c3aed;
    --accent: #d946ef;
    
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.1);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.1);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.1);
    --info: #3b82f6;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
    --font: 'Outfit', sans-serif;
}

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

body {
    background: var(--bg-main);
    background-image: var(--bg-gradient);
    color: var(--text-primary);
    font-family: var(--font);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Authentication pages layout */
.auth-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
    position: relative;
}

.auth-wrapper::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: var(--primary-glow);
    filter: blur(120px);
    border-radius: 50%;
    top: 20%;
    left: 20%;
    z-index: 0;
}

.auth-card {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 3rem 2.5rem;
    border-radius: 24px;
    width: 100%;
    max-width: 460px;
    box-shadow: var(--shadow);
    z-index: 10;
    transition: var(--transition);
}

.auth-card:hover {
    border-color: var(--panel-border-hover);
}

.auth-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.brand-logo {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--text-primary) 30%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.auth-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Inputs & Form styling */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.95rem;
    transition: var(--transition);
    outline: none;
}

.form-input:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%239ca3af' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 1rem center;
    background-repeat: no-repeat;
    background-size: 1.25rem;
    padding-right: 2.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    border: none;
    border-radius: 12px;
    padding: 0.9rem 1.5rem;
    color: #fff;
    font-family: var(--font);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 20px -4px var(--primary-glow);
    gap: 0.5rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px -2px var(--primary-glow);
    background: linear-gradient(135deg, var(--primary-hover) 0%, #6d28d9 100%);
}

.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--panel-border);
    box-shadow: none;
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-secondary);
    box-shadow: none;
}

.btn-danger {
    background: var(--danger);
    box-shadow: 0 4px 14px var(--danger-bg);
}

.btn-danger:hover {
    background: #dc2626;
    box-shadow: 0 6px 18px var(--danger-bg);
}

.auth-footer {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.auth-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.auth-link:hover {
    color: var(--accent);
}

.alert {
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid transparent;
}

.alert-danger {
    background: var(--danger-bg);
    border-color: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.alert-success {
    background: var(--success-bg);
    border-color: rgba(16, 185, 129, 0.2);
    color: #86efac;
}

/* Dashboard Panel Main Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: 280px;
    background: rgba(15, 13, 30, 0.85);
    border-right: 1px solid var(--panel-border);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: var(--transition);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 3rem;
    color: #fff;
    gap: 0.5rem;
}

.sidebar-logo span {
    background: linear-gradient(135deg, #fff 30%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.85rem 1.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    transition: var(--transition);
    gap: 0.85rem;
}

.nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.03);
    padding-left: 1.5rem;
}

.nav-link.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(139, 92, 246, 0.05) 100%);
    border-left: 3px solid var(--primary);
    border-radius: 8px 12px 12px 8px;
}

.sidebar-footer {
    border-top: 1px solid var(--panel-border);
    padding-top: 1.5rem;
    margin-top: 1.5rem;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    box-shadow: 0 0 10px var(--primary-glow);
}

.user-info {
    overflow: hidden;
}

.user-name {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.user-plan {
    font-size: 0.75rem;
    color: var(--primary);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Main Content Area */
.main-content {
    margin-left: 280px;
    flex: 1;
    padding: 2.5rem;
    position: relative;
    max-width: 1400px;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.page-title {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.page-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* Stats grid cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stats-card {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.stats-card:hover {
    border-color: var(--panel-border-hover);
    transform: translateY(-2px);
}

.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.stats-title {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.stats-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stats-value {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
    letter-spacing: -0.5px;
}

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

/* Charts and Live Feed grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.panel {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 24px;
    padding: 1.75rem;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.panel-title {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.2px;
}

/* Tables styling */
.table-container {
    overflow-x: auto;
    width: 100%;
}

.table-custom {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.table-custom th {
    padding: 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table-custom td {
    padding: 1rem;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
}

.table-custom tr:last-child td {
    border-bottom: none;
}

.table-custom tr {
    transition: var(--transition);
}

.table-custom tr:hover td {
    background: rgba(255, 255, 255, 0.02);
    color: #fff;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: var(--success-bg);
    color: var(--success);
}

.badge-danger {
    background: var(--danger-bg);
    color: var(--danger);
}

.badge-warning {
    background: var(--warning-bg);
    color: var(--warning);
}

.badge-info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info);
}

/* Settings, Code views */
.code-box {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.25rem;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    color: #a78bfa;
    position: relative;
    overflow-x: auto;
    white-space: pre;
    margin-bottom: 1rem;
}

.copy-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font);
}

.copy-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
}

/* Modal and layout specifics */
.flex-row-gap {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.input-reason {
    flex: 1;
}

.live-feed-item {
    padding: 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.live-feed-item:hover {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
}

.feed-left {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.feed-ip {
    font-weight: 600;
    font-size: 0.95rem;
}

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

.feed-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Responsiveness adjustments */
@media (max-width: 768px) {
    .sidebar {
        width: 80px;
        padding: 2rem 0.5rem;
    }
    
    .sidebar-logo span,
    .user-info,
    .nav-link span {
        display: none;
    }
    
    .sidebar-logo {
        justify-content: center;
        margin-bottom: 2rem;
    }
    
    .nav-link {
        justify-content: center;
        padding: 0.85rem;
    }
    
    .main-content {
        margin-left: 80px;
        padding: 1.5rem;
    }
    
    .header-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}
