/* Custom Theme CSS - Pinx Theme inspired style for CRM Ebook */

:root {
    --primary-color: #5c67f2;       /* Slate blue / Indigo */
    --accent-color: #0d6efd;        /* Bright theme blue for Ebook CRM style highlights */
    --accent-hover: #0b5ed7;
    --bg-light: #f8f9fa;            /* Light background */
    --card-bg: #ffffff;
    --text-main: #2c3e50;
    --text-muted: #8a99a8;
    --border-color: #f1f3f5;
    
    /* Chart theme colors */
    --chart-pink: #f755a9;
    --chart-blue: #547bf2;
}

body {
    background-color: var(--bg-light) !important;
    color: var(--text-main);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 0.9rem;
    overflow-x: hidden;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Sidebar Styling */
.sidebar {
    width: 260px;
    background-color: #ffffff;
    border-right: 1px solid var(--border-color);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.sidebar-brand {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-logo-icon {
    width: 32px;
    height: 32px;
    background-color: var(--accent-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 1.1rem;
    box-shadow: 0 4px 10px rgba(13, 110, 253, 0.3);
}

.sidebar-brand-name {
    font-weight: 700;
    font-size: 1.2rem;
    color: #2c3e50;
    letter-spacing: -0.5px;
}

.sidebar-brand-dot {
    color: var(--accent-color);
}

.sidebar-menu {
    padding: 20px 14px;
    flex-grow: 1;
    overflow-y: auto;
}

.sidebar-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.8px;
    padding: 10px 12px 6px 12px;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 11px 16px;
    color: #5d6e80;
    font-weight: 550;
    font-size: 0.9rem;
    text-decoration: none;
    border-radius: 12px;
    margin-bottom: 4px;
    transition: all 0.2s ease;
    gap: 12px;
}

.menu-item i {
    font-size: 1.15rem;
    width: 20px;
    text-align: center;
    transition: color 0.2s ease;
}

.menu-item:hover {
    color: #1e293b;
    background-color: #f8f9fa;
}

/* Active Menu Item (Ebook CRM Style) */
.menu-item.active {
    background-color: rgba(13, 110, 253, 0.08) !important;
    color: var(--accent-color) !important;
    font-weight: 600;
}

.menu-item.active i {
    color: var(--accent-color);
}

.menu-submenu {
    list-style: none;
    padding-left: 36px;
    margin-top: 2px;
    margin-bottom: 8px;
}

.menu-submenu-item {
    padding: 6px 12px;
    display: block;
    color: #7f8c8d;
    text-decoration: none;
    font-size: 0.85rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.menu-submenu-item:hover {
    color: #2c3e50;
    background-color: #f8f9fa;
}

.menu-submenu-item.active {
    color: var(--accent-color);
    font-weight: 600;
    background-color: rgba(13, 110, 253, 0.04);
}

/* Main Content Wrapper */
.main-wrapper {
    margin-left: 260px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

/* Top Navbar */
.top-navbar {
    height: 70px;
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 999;
}

.breadcrumb-container {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 500;
}

.breadcrumb-container a {
    color: var(--text-muted);
    text-decoration: none;
}

.breadcrumb-container span.active-crumb {
    color: #2c3e50;
    font-weight: 600;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-input-group {
    position: relative;
    width: 250px;
}

.search-input-group input {
    background-color: #f8f9fa;
    border: none;
    padding: 8px 16px;
    padding-right: 65px;
    border-radius: 20px;
    font-size: 0.8rem;
    width: 100%;
    outline: none;
    transition: background-color 0.2s ease;
}

.search-input-group input:focus {
    background-color: #f1f3f5;
}

.search-shortcut {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.65rem;
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--text-muted);
    font-weight: 600;
    pointer-events: none;
}

.nav-icon-btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #5a6a85;
    text-decoration: none;
    position: relative;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    background: transparent;
}

.nav-icon-btn:hover {
    background-color: #f8f9fa;
    color: #2c3e50;
}

.nav-icon-btn .badge-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background-color: var(--accent-color);
    border-radius: 50%;
    border: 2px solid white;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ffffff;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

/* Premium Cards */
.theme-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.theme-card:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.04);
}

.analytics-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    height: 100%;
}

.sessions-card {
    background: linear-gradient(135deg, #5c67f2 0%, #858dfc 100%);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 24px;
    position: relative;
    overflow: hidden;
    height: 100%;
}

.sessions-card .sessions-chart-container {
    height: 90px;
    margin-top: 15px;
}

/* Pill Selectors */
.pill-tab-container {
    display: inline-flex;
    background-color: #f8f9fa;
    padding: 4px;
    border-radius: 12px;
}

.pill-tab {
    border: none;
    background: transparent;
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    border-radius: 8px;
    transition: all 0.2s;
}

.pill-tab.active {
    background-color: #ffffff;
    color: #2c3e50;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.metric-highlight {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: -0.5px;
}

.trend-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 6px;
}

.trend-badge.up {
    color: var(--accent-color);
    background-color: rgba(13, 110, 253, 0.1);
}

.trend-badge.down {
    color: #e74c3c;
    background-color: rgba(231, 76, 60, 0.1);
}

/* Metric Round Icons */
.metric-icon-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.bg-yellow-light {
    background-color: rgba(241, 196, 15, 0.1);
    color: #f1c40f;
}

.bg-pink-light {
    background-color: rgba(247, 85, 169, 0.1);
    color: #f755a9;
}

/* Authentication Page Styles (Login, Register etc.) */
.auth-bg {
    background-color: #f3f5f8;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 20px;
}

.auth-card {
    background-color: #ffffff;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
    width: 100%;
    max-width: 450px;
    padding: 40px;
    border: 1px solid var(--border-color);
    position: relative;
    z-index: 10;
}

.auth-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 30px;
    text-decoration: none;
}

.auth-logo-icon {
    width: 44px;
    height: 44px;
    background-color: var(--accent-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 1.4rem;
    box-shadow: 0 4px 14px rgba(13, 110, 253, 0.4);
}

.auth-title {
    font-weight: 700;
    font-size: 1.4rem;
    color: #2c3e50;
    margin-top: 5px;
    margin-bottom: 5px;
    text-align: center;
}

.auth-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 25px;
}

.custom-form-group {
    margin-bottom: 20px;
}

.custom-form-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 8px;
    display: block;
}

.custom-form-control {
    background-color: #f8f9fa;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 0.85rem;
    color: #2d3748;
    width: 100%;
    transition: all 0.25s ease;
}

.custom-form-control:focus {
    background-color: #ffffff;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
    outline: none;
}

.btn-theme-primary {
    background-color: var(--accent-color);
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 12px;
    border-radius: 12px;
    border: none;
    width: 100%;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(13, 110, 253, 0.25);
}

.btn-theme-primary:hover {
    background-color: var(--accent-hover);
    color: white;
    box-shadow: 0 6px 18px rgba(13, 110, 253, 0.35);
}

.auth-footer-link {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 600;
}

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

/* Landing Page Welcome Styles */
.landing-nav {
    padding: 20px 0;
    background: transparent;
}

.hero-section {
    padding: 80px 0 100px 0;
    position: relative;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(13, 110, 253, 0.1);
    color: var(--accent-hover);
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 25px;
    border: 1px solid rgba(13, 110, 253, 0.15);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 850;
    line-height: 1.1;
    color: #1e293b;
    letter-spacing: -1.5px;
    margin-bottom: 20px;
}

.hero-title-highlight {
    background: linear-gradient(135deg, var(--accent-hover) 0%, var(--primary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto 35px auto;
    line-height: 1.6;
}

.landing-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.015);
    height: 100%;
    transition: transform 0.3s;
}

.landing-card:hover {
    transform: translateY(-5px);
}

.landing-card-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.footer-nav {
    border-top: 1px solid var(--border-color);
    padding: 30px 0;
    margin-top: 80px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Mobile Sidebar Toggle Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 998;
    display: none;
}

@media (max-width: 992px) {
    .sidebar {
        left: -260px;
    }
    .sidebar.show {
        left: 0;
    }
    .sidebar-overlay.show {
        display: block;
    }
    .main-wrapper {
        margin-left: 0 !important;
    }
}
