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

:root {
    --font-family: 'Inter', sans-serif;
    --font-display: 'Outfit', sans-serif;
    
    /* DEFAULT THEME: SaaS Premium Dark Mode (Glassmorphism) */
    --bg-primary: #070914; /* Extremely deep dark space */
    --bg-secondary: rgba(20, 26, 46, 0.45); /* Frosted translucent card backdrop */
    --bg-sidebar: #06080e; /* Matte dark sidebar */
    --sidebar-text: #94a3b8;
    --sidebar-text-active: #ffffff;
    --sidebar-link-active-bg: rgba(99, 102, 241, 0.15);
    
    --text-primary: #f8fafc; /* Crisp slate white */
    --text-secondary: #94a3b8; /* Slate gray labels */
    --text-muted: #475569;
    --border-color: rgba(255, 255, 255, 0.07);
    --card-border: 1px solid rgba(255, 255, 255, 0.07);
    --hover-bg: rgba(255, 255, 255, 0.03);
    
    --primary-color: #6366f1; /* Indigo neon */
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --success-color: #10b981; /* Emerald neon */
    --success-gradient: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
    --warning-color: #f59e0b; /* Amber neon */
    --danger-color: #ef4444; /* Coral neon */
    --info-color: #06b6d4; /* Cyan neon */
    
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
    --card-hover-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.55), 0 0 20px rgba(99, 102, 241, 0.08);
}

[data-theme="light"] {
    /* LIGHT THEME: SaaS Premium White Glassmorphism */
    --bg-primary: #f8fafc; /* Clean background */
    --bg-secondary: rgba(255, 255, 255, 0.65); /* Translucent light card backdrop */
    --bg-sidebar: #0f172a; /* Keep dark sidebar for elegant contrast */
    --sidebar-text: #94a3b8;
    --sidebar-text-active: #ffffff;
    --sidebar-link-active-bg: rgba(255, 255, 255, 0.08);
    
    --text-primary: #0f172a; /* Dark slate text */
    --text-secondary: #64748b; /* Slate gray labels */
    --text-muted: #94a3b8;
    --border-color: rgba(15, 23, 42, 0.08);
    --card-border: 1px solid rgba(15, 23, 42, 0.08);
    --hover-bg: rgba(15, 23, 42, 0.02);
    
    --primary-color: #6366f1;
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --success-color: #10b981;
    --success-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #06b6d4;
    
    --card-shadow: 0 4px 18px -2px rgba(15, 23, 42, 0.05);
    --card-hover-shadow: 0 10px 25px -3px rgba(15, 23, 42, 0.1);
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-primary);
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.08) 0px, transparent 40%),
        radial-gradient(at 50% 0%, rgba(6, 182, 212, 0.06) 0px, transparent 45%),
        radial-gradient(at 100% 100%, rgba(139, 92, 246, 0.06) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease, background-image 0.3s ease;
    overflow-x: hidden;
    font-size: 0.875rem;
}

[data-theme="light"] body {
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.03) 0px, transparent 40%),
        radial-gradient(at 50% 0%, rgba(6, 182, 212, 0.02) 0px, transparent 45%),
        radial-gradient(at 100% 100%, rgba(139, 92, 246, 0.02) 0px, transparent 50%);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Layout Wrapper */
#app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styling (Velzon Dark Menu style) */
#sidebar {
    width: 250px;
    background-color: var(--bg-sidebar);
    color: var(--sidebar-text);
    border-right: 1px solid var(--border-color);
    padding: 1.5rem 0.75rem;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#sidebar .brand {
    padding: 0 1rem 1.5rem 1rem;
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 800;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* User profile section inside sidebar */
.sidebar-profile {
    padding: 1.5rem 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-profile img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 0.5rem;
    border: 2px solid rgba(99, 102, 241, 0.3) !important;
    padding: 2px;
    transition: all 0.3s ease;
}

.sidebar-profile img:hover {
    border-color: var(--primary-color) !important;
    transform: scale(1.05) rotate(3deg);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
}

.sidebar-profile .profile-social-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.03);
}

.sidebar-profile .profile-social-btn:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

#sidebar .nav-link {
    color: var(--sidebar-text);
    padding: 0.65rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    font-size: 0.85rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    margin-bottom: 0.15rem;
}

#sidebar .nav-link:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.05);
}

#sidebar .nav-link.active {
    color: #ffffff !important;
    background: var(--primary-gradient) !important;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

#sidebar .nav-link i {
    font-size: 1.1rem;
}

/* Content Area */
#content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background-color: var(--bg-primary);
}

/* Top Navbar style */
.main-navbar {
    background-color: var(--bg-secondary);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Cards & Layout Containers */
.card-custom {
    background-color: var(--bg-secondary);
    backdrop-filter: blur(16px);
    border: var(--card-border);
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    margin-bottom: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-custom:hover {
    box-shadow: var(--card-hover-shadow);
    transform: translateY(-2px);
}

.card-custom .card-header {
    background: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.25rem;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.card-custom .card-body {
    padding: 1.25rem;
}

/* Velzon Flat Rectangular KPI Metric Widgets */
.metric-card-velzon {
    background-color: var(--bg-secondary);
    backdrop-filter: blur(16px);
    border: var(--card-border);
    border-radius: 10px;
    box-shadow: var(--card-shadow);
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.metric-card-velzon.card-info { border-left: 4px solid var(--info-color) !important; }
.metric-card-velzon.card-success { border-left: 4px solid var(--success-color) !important; }
.metric-card-velzon.card-warning { border-left: 4px solid var(--warning-color) !important; }
.metric-card-velzon.card-primary { border-left: 4px solid var(--primary-color) !important; }

.metric-card-velzon:hover {
    transform: translateY(-3px);
    box-shadow: var(--card-hover-shadow);
    border-color: rgba(99, 102, 241, 0.3) !important;
}

.metric-card-velzon .metric-info {
    flex: 1;
}

.metric-card-velzon .metric-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 0.5rem;
}

.metric-card-velzon .metric-value {
    font-family: var(--font-display);
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--text-primary) !important;
    line-height: 1.1;
    margin-bottom: 0.25rem;
}

.metric-card-velzon .metric-badge {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Accent badge backgrounds for metrics */
.badge-blue-soft {
    background-color: rgba(6, 182, 212, 0.1) !important;
    color: var(--info-color) !important;
}

.badge-green-soft {
    background-color: rgba(16, 185, 129, 0.1) !important;
    color: var(--success-color) !important;
}

.badge-orange-soft {
    background-color: rgba(245, 158, 11, 0.1) !important;
    color: var(--warning-color) !important;
}

.badge-purple-soft {
    background-color: rgba(139, 92, 246, 0.1) !important;
    color: #8b5cf6 !important;
}

/* Zebra Striped Tables with Flat Slate Headers */
.table-custom, table.table {
    margin: 0;
    width: 100%;
}

.table-custom th, table.table th {
    font-family: var(--font-family);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.6px;
    color: var(--text-secondary) !important;
    background-color: var(--hover-bg) !important; /* Flat Slate background */
    border-bottom: 1px solid var(--border-color) !important;
    padding: 0.9rem 1.1rem !important;
}

.table-custom td, table.table td {
    padding: 0.9rem 1.1rem !important;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    background-color: transparent !important;
}

.table-custom tbody tr:hover, table.table tbody tr:hover {
    background-color: var(--hover-bg) !important;
}

/* Premium Form Elements */
.form-control-custom, select.form-select, input.form-control {
    background-color: var(--bg-primary) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    border-radius: 6px !important;
    padding: 0.58rem 0.95rem;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.form-control-custom:focus, select.form-select:focus, input.form-control:focus {
    background-color: var(--bg-secondary) !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15) !important;
    outline: none;
}

.btn-primary-custom, .btn-primary {
    background: var(--primary-gradient) !important;
    border: none !important;
    color: #ffffff !important;
    padding: 0.6rem 1.35rem !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25) !important;
    transition: all 0.2s ease !important;
}

.btn-primary-custom:hover, .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(99, 102, 241, 0.35) !important;
}

.btn-outline-secondary {
    border-radius: 6px !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-secondary) !important;
    background-color: var(--bg-secondary) !important;
    padding: 0.6rem 1.35rem !important;
    transition: all 0.2s ease;
}

.btn-outline-secondary:hover {
    background-color: var(--hover-bg) !important;
    border-color: var(--text-muted) !important;
    color: var(--text-primary) !important;
}

/* Custom Badges (Soft background fills) */
.badge-custom {
    padding: 0.4em 0.7em;
    font-weight: 600;
    border-radius: 6px;
    font-size: 0.725rem;
}

/* List group style */
.list-group-item {
    background: transparent !important;
    border-color: var(--border-color) !important;
    padding: 0.9rem 1.35rem !important;
    transition: background-color 0.2s ease;
}
.list-group-item:hover {
    background-color: var(--hover-bg) !important;
}

/* Auth views */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #05070c;
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(6, 182, 212, 0.08) 0px, transparent 50%);
    padding: 1.5rem;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background-color: rgba(17, 24, 39, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    color: #f8fafc;
}

/* Theme Toggle */
.theme-toggle-btn {
    cursor: pointer;
    font-size: 1.15rem;
    color: var(--text-secondary);
    background: none;
    border: none;
    padding: 0.4rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.theme-toggle-btn:hover {
    background-color: var(--hover-bg);
    color: var(--text-primary);
}

/* Modals */
.modal-content {
    background-color: var(--bg-secondary) !important;
    border: var(--card-border) !important;
    border-radius: 12px !important;
    backdrop-filter: blur(20px);
}
.modal-header, .modal-footer {
    border-color: var(--border-color) !important;
    padding: 1.1rem 1.6rem !important;
}
.modal-body {
    padding: 1.6rem !important;
}

/* Responsive adjustment settings */
@media (max-width: 991px) {
    #app-layout {
        flex-direction: column;
    }
    #sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 1rem;
    }
    #sidebar .brand {
        padding-bottom: 1rem;
        justify-content: center;
        border-bottom: none;
    }
    #sidebar .nav-pills {
        display: flex;
        flex-direction: row !important;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-top: 0.5rem !important;
    }
    #sidebar .nav-link {
        margin-bottom: 0;
        padding: 0.5rem 0.85rem;
    }
}

/* Global SaaS Style Component Enhancements */
.badge {
    font-weight: 600 !important;
    letter-spacing: 0.3px;
    padding: 0.45em 0.8em !important;
    border-radius: 6px !important;
    font-size: 0.725rem !important;
    text-transform: capitalize;
}
.badge.bg-success {
    background-color: rgba(16, 185, 129, 0.1) !important;
    color: #10b981 !important;
    border: 1px solid rgba(16, 185, 129, 0.2) !important;
}
.badge.bg-warning {
    background-color: rgba(245, 158, 11, 0.1) !important;
    color: #f59e0b !important;
    border: 1px solid rgba(245, 158, 11, 0.2) !important;
}
.badge.bg-danger {
    background-color: rgba(239, 68, 68, 0.1) !important;
    color: #ef4444 !important;
    border: 1px solid rgba(239, 68, 68, 0.2) !important;
}
.badge.bg-primary {
    background-color: rgba(99, 102, 241, 0.1) !important;
    color: #6366f1 !important;
    border: 1px solid rgba(99, 102, 241, 0.2) !important;
}
.badge.bg-info {
    background-color: rgba(6, 182, 212, 0.1) !important;
    color: #06b6d4 !important;
    border: 1px solid rgba(6, 182, 212, 0.2) !important;
}
.badge.bg-secondary {
    background-color: rgba(148, 163, 184, 0.1) !important;
    color: #94a3b8 !important;
    border: 1px solid rgba(148, 163, 184, 0.2) !important;
}

/* Beautiful custom alerts */
.alert {
    border-radius: 8px !important;
    border: 1px solid transparent !important;
}
.alert-success {
    background-color: rgba(16, 185, 129, 0.08) !important;
    color: #10b981 !important;
    border-color: rgba(16, 185, 129, 0.18) !important;
}
.alert-danger {
    background-color: rgba(239, 68, 68, 0.08) !important;
    color: #ef4444 !important;
    border-color: rgba(239, 68, 68, 0.18) !important;
}
.alert-warning {
    background-color: rgba(245, 158, 11, 0.08) !important;
    color: #f59e0b !important;
    border-color: rgba(245, 158, 11, 0.18) !important;
}
.alert-info {
    background-color: rgba(6, 182, 212, 0.08) !important;
    color: #06b6d4 !important;
    border-color: rgba(6, 182, 212, 0.18) !important;
}

/* Progress bar updates */
.progress {
    border-radius: 10px !important;
    background-color: rgba(255, 255, 255, 0.05) !important;
    overflow: hidden;
}
.progress-bar {
    background: var(--primary-gradient) !important;
    border-radius: 10px !important;
    box-shadow: 0 2px 5px rgba(99, 102, 241, 0.2);
}

/* Accent lines for lists and card widgets */
.list-group-item {
    border-color: var(--border-color) !important;
}
.card-custom .card-header {
    font-weight: 700;
    letter-spacing: -0.01em;
}
input::placeholder {
    color: var(--text-muted) !important;
    opacity: 0.6 !important;
}

/* Ambient Neon Glow Blobs behind layout */
body::before {
    content: "";
    position: fixed;
    top: -15%;
    left: -15%;
    width: 50%;
    height: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, transparent 80%);
    z-index: -1;
    pointer-events: none;
    filter: blur(80px);
}
body::after {
    content: "";
    position: fixed;
    bottom: -15%;
    right: -15%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.08) 0%, transparent 80%);
    z-index: -1;
    pointer-events: none;
    filter: blur(100px);
}

[data-theme="light"] body::before {
    background: radial-gradient(circle, rgba(99, 102, 241, 0.04) 0%, transparent 80%);
}
[data-theme="light"] body::after {
    background: radial-gradient(circle, rgba(6, 182, 212, 0.03) 0%, transparent 80%);
}

/* Glowing card indicators & outlines */
.metric-card-velzon {
    position: relative;
    overflow: hidden;
    border-bottom: 2px solid transparent !important;
}
.metric-card-velzon.card-info { border-bottom: 2.5px solid var(--info-color) !important; border-left: none !important; }
.metric-card-velzon.card-success { border-bottom: 2.5px solid var(--success-color) !important; border-left: none !important; }
.metric-card-velzon.card-warning { border-bottom: 2.5px solid var(--warning-color) !important; border-left: none !important; }
.metric-card-velzon.card-primary { border-bottom: 2.5px solid var(--primary-color) !important; border-left: none !important; }

/* Enhanced hover borders & shadows */
.card-custom:hover, .metric-card-velzon:hover {
    border-color: rgba(99, 102, 241, 0.25) !important;
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.5), 0 0 20px 0 rgba(99, 102, 241, 0.1) !important;
    transform: translateY(-4px);
}

[data-theme="light"] .card-custom:hover, [data-theme="light"] .metric-card-velzon:hover {
    border-color: rgba(99, 102, 241, 0.2) !important;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08) !important;
}

/* Custom Comparison Pills */
.comparison-pill {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: var(--text-primary) !important;
    transition: all 0.25s ease;
    border-radius: 50px !important;
    padding: 0.5rem 1rem !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}
.comparison-pill:hover {
    background: rgba(255, 255, 255, 0.09) !important;
    transform: translateY(-1px);
    border-color: rgba(99, 102, 241, 0.3) !important;
}
[data-theme="light"] .comparison-pill {
    background: rgba(15, 23, 42, 0.04) !important;
    border: 1px solid rgba(15, 23, 42, 0.08) !important;
    color: var(--text-primary) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

/* Input search bar adjustments */
#domain-search-input {
    background-color: rgba(0, 0, 0, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: var(--text-primary) !important;
    border-radius: 8px !important;
    font-size: 0.88rem !important;
}
#domain-search-input:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.2) !important;
}
[data-theme="light"] #domain-search-input {
    background-color: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
}


