/* css/style.css - Master Stylesheet for Logomish Campaign System */

:root {
    --primary: #667eea;
    --secondary: #764ba2;
    --success: #48bb78;
    --danger: #f56565;
    --warning: #ecc94b;
    --info: #4299e1;
    --dark: #2d3748;
    --light: #f7fafc;
    --gray: #718096;
    --border: #e2e8f0;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f0f2f5;
    overflow: hidden;
    color: var(--dark);
}

/* ==================== DASHBOARD LAYOUT ==================== */
.dashboard {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar Styles */
.sidebar {
    width: 280px;
    background: linear-gradient(180deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    height: 100vh;
    overflow-y: auto;
    position: fixed;
    left: 0;
    top: 0;
    box-shadow: 4px 0 20px rgba(0,0,0,0.1);
}

.sidebar .logo {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar .logo h2 {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.sidebar .nav {
    list-style: none;
    padding: 1.5rem 0;
}

.sidebar .nav li {
    margin: 0.25rem 0;
}

.sidebar .nav a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1.5rem;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s;
    border-left: 4px solid transparent;
    font-weight: 500;
}

.sidebar .nav a i {
    width: 24px;
    font-size: 1.2rem;
}

.sidebar .nav a:hover,
.sidebar .nav a.active {
    background: rgba(255,255,255,0.15);
    color: white;
    border-left-color: white;
}

/* Main Content Area */
.main-content {
    flex: 1;
    margin-left: 280px;
    height: 100vh;
    overflow-y: auto;
    padding: 2rem;
}

/* Custom Scrollbar */
.main-content::-webkit-scrollbar {
    width: 8px;
}

.main-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.main-content::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

.main-content::-webkit-scrollbar-thumb:hover {
    background: var(--secondary);
}

/* Header Section */
.header {
    background: white;
    padding: 1.5rem 2rem;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.header h1 {
    font-size: 2rem;
    color: var(--dark);
}

.header p {
    color: var(--gray);
}

.date-badge {
    background: var(--light);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--dark);
}

/* ==================== STATS CARDS ==================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s;
    position: relative;
    overflow: hidden;
}

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

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.stat-icon.primary { background: rgba(102, 126, 234, 0.1); color: var(--primary); }
.stat-icon.success { background: rgba(72, 187, 120, 0.1); color: var(--success); }
.stat-icon.warning { background: rgba(236, 201, 75, 0.1); color: var(--warning); }
.stat-icon.danger { background: rgba(245, 101, 101, 0.1); color: var(--danger); }

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.2;
}

.stat-label {
    color: var(--gray);
    font-size: 0.9rem;
}

/* ==================== CHARTS ==================== */
.charts-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.chart-container {
    background: white;
    padding: 1.5rem;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.chart-header {
    margin-bottom: 1.5rem;
}

.chart-header h3 {
    color: var(--dark);
    font-size: 1.2rem;
}

canvas {
    width: 100%;
    height: 250px !important;
}

/* ==================== FORMS ==================== */
.form-container {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

.form-container h2 {
    color: var(--dark);
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}

/* ==================== BUTTONS ==================== */
.btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102,126,234,0.3);
}

.btn-small {
    display: inline-block;
    padding: 0.4rem 0.75rem;
    background: var(--light);
    color: var(--dark);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.85rem;
    transition: all 0.3s;
    margin-right: 0.5rem;
    border: none;
    cursor: pointer;
}

.btn-small:hover {
    background: var(--primary);
    color: white;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #c53030;
}




        .campaign-selector {
            background: white;
            padding: 1.5rem;
            border-radius: 20px;
            box-shadow: 0 4px 15px rgba(0,0,0,0.05);
            margin-bottom: 1.5rem;
            display: flex;
            align-items: center;
            gap: 1rem;
            flex-wrap: wrap;
        }
        
        .campaign-selector label {
            font-weight: 600;
            color: var(--dark);
        }
        
        .campaign-selector select {
            padding: 0.75rem 1.5rem;
            border: 2px solid #e2e8f0;
            border-radius: 12px;
            font-size: 0.95rem;
            background: white;
            cursor: pointer;
            min-width: 250px;
        }
        
        .campaign-selector select:focus {
            border-color: var(--primary);
            outline: none;
        }
        
        .campaign-selector button {
            background: var(--primary);
            color: white;
            border: none;
            padding: 0.75rem 1.5rem;
            border-radius: 12px;
            cursor: pointer;
            font-weight: 500;
            transition: all 0.3s;
        }
        
        .campaign-selector button:hover {
            background: var(--secondary);
        }
        
        .tracking-stats {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 1rem;
            margin-top: 1rem;
        }
        
        .tracking-card {
            background: #f8fafc;
            border-radius: 15px;
            padding: 1rem;
            text-align: center;
        }
        
        .tracking-number {
            font-size: 2rem;
            font-weight: 800;
            color: var(--primary);
        }
        
        .tracking-label {
            font-size: 0.85rem;
            color: #64748b;
        }




/* ==================== TABLES ==================== */
table {
    width: 100%;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border-collapse: collapse;
}

thead {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    padding-left: 15px !important;
    padding-right: 15px !important;
}

tr:hover {
    background: var(--light);
}

/* ==================== STATUS BADGES ==================== */
.status, .status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-draft { background: #e2e8f0; color: #4a5568; }
.status-active { background: #c6f6d5; color: #22543d; }
.status-paused { background: #feebc8; color: #744210; }
.status-completed { background: #bee3f8; color: #1e3a8a; }
.status-sent { background: var(--primary); color: white; }
.status-failed { background: var(--danger); color: white; }
.status-pending { background: var(--warning); color: #744210; }
.status-bounced { background: var(--danger); color: white; }
.status-opened { background: var(--success); color: white; }
.status-clicked { background: var(--info); color: white; }

/* ==================== PROGRESS BARS ==================== */
.progress-container {
    margin: 1rem 0;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.progress-bar {
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 4px;
    transition: width 0.3s;
}

/* ==================== CAMPAIGN CARDS ==================== */
.campaigns-grid {
    background: white;
    padding: 1.5rem;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

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

.campaign-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.campaign-card {
    background: var(--light);
    border-radius: 15px;
    padding: 1.5rem;
    transition: all 0.3s;
    border: 1px solid var(--border);
}

.campaign-card:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

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

.campaign-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark);
}

.campaign-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 1rem 0;
    text-align: center;
}

.stat-item {
    padding: 0.5rem;
    background: white;
    border-radius: 10px;
}

.stat-item .value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark);
}

.stat-item .label {
    font-size: 0.75rem;
    color: var(--gray);
}

.campaign-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.campaign-actions {
    display: flex;
    gap: 0.5rem;
}

/* ==================== QUICK ACTIONS GRID ==================== */
.quick-actions {
    background: white;
    padding: 1.5rem;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.action-card {
    background: var(--light);
    border-radius: 12px;
    padding: 1.5rem 1rem;
    text-align: center;
    text-decoration: none;
    color: var(--dark);
    transition: all 0.3s;
    border: 1px solid var(--border);
}

.action-card:hover {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    transform: translateY(-3px);
}

.action-card i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* ==================== UPLOAD AREA ==================== */
.upload-area {
    border: 2px dashed var(--border);
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    margin-bottom: 20px;
    cursor: pointer;
    transition: border-color 0.3s;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--primary);
    background: rgba(102,126,234,0.05);
}

/* ==================== LOGS CONTAINER ==================== */
.logs-container {
    background: #1a1a1a;
    color: #00ff00;
    padding: 20px;
    border-radius: 5px;
    font-family: monospace;
    height: 500px;
    overflow-y: auto;
}

.log-entry {
    margin-bottom: 5px;
    font-size: 12px;
}

.log-entry.error { color: #ff6b6b; }
.log-entry.success { color: #51cf66; }

/* ==================== LEADS PAGE SPECIFIC ==================== */
.leads-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-box {
    background: var(--light);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
}

.stat-box .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
}

.search-box {
    padding: 10px;
    border: 2px solid var(--border);
    border-radius: 8px;
    width: 300px;
    font-size: 14px;
    margin-right: 10px;
}

.search-box:focus {
    border-color: var(--primary);
    outline: none;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.page-link {
    padding: 10px 15px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--dark);
    text-decoration: none;
    transition: all 0.3s;
}

.page-link:hover,
.page-link.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ==================== MODAL ==================== */
.modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    z-index: 1000;
    max-width: 500px;
    width: 90%;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 1024px) {
    .sidebar {
        width: 80px;
    }
    .sidebar .logo h2, 
    .sidebar .nav a span {
        display: block;
    }
    .sidebar .nav a {
        justify-content: center;
        padding: 1rem;
    }
    .sidebar .nav a i {
        margin: 0;
        font-size: 1.5rem;
    }
    .main-content {
        margin-left: 80px;
    }
    .charts-row {
        grid-template-columns: 1fr;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 1rem;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .campaign-cards {
        grid-template-columns: 1fr;
    }
    .header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    .leads-stats {
        grid-template-columns: 1fr;
    }
    .search-box {
        width: 100%;
        margin-bottom: 10px;
    }
    .actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==================== UTILITIES ==================== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-dark { color: var(--dark); }
.text-gray { color: var(--gray); }
.text-white { color: white; }

.bg-white { background: white; }
.bg-light { background: var(--light); }
.bg-primary { background: var(--primary); }
.bg-gradient { background: linear-gradient(135deg, var(--primary), var(--secondary)); }

.hero-logo-bottom {
            max-width: 180px;
            width: 100%;
            height: auto;
            display: inline-block;
            filter: brightness(0) invert(1); /* Makes logo white if it's dark */
            transition: transform 0.3s ease;
        }

        .hero-logo {
            max-width: 380px;
            width: 100%;
            height: auto;
            display: inline-block;
            /* Remove filter property */
            transition: transform 0.3s ease;
        }

        .hero-logo:hover {
            transform: scale(1.05);
        }

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

        /* Responsive logo */
        @media (max-width: 768px) {
            .hero-logo {
                max-width: 200px;
            }
            .logo-container {
                margin-bottom: 20px;
            }
        }