/* Lead Gen SaaS Premium Theme Styles */

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

:root {
    --bg-color: #f8fafc;
    --sidebar-bg: #0f172a;
    --sidebar-text: #94a3b8;
    --sidebar-active: #ffffff;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --text-main: #1e293b;
    --card-bg: rgba(255, 255, 255, 0.95);
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
}

* { box-sizing: border-box; }

/* Layout */
.lg-saas-container {
    display: flex;
    min-height: 100vh;
}

.lg-saas-sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    padding: 30px 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.lg-logo {
    color: white;
    font-size: 24px;
    font-weight: 800;
    padding: 0 30px 40px;
    letter-spacing: -1px;
}

.lg-nav {
    display: flex;
    flex-direction: column;
}

.lg-nav-section-title {
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 30px 5px;
    user-select: none;
}

.lg-nav a {
    color: var(--sidebar-text);
    text-decoration: none;
    padding: 15px 30px;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.lg-nav a:hover, .lg-nav a.active {
    color: var(--sidebar-active);
    background: rgba(255,255,255,0.05);
    border-left-color: var(--primary);
}

.lg-logout { margin-top: 30px; color: #ef4444 !important; }

.lg-saas-main {
    flex: 1;
    margin-left: 260px;
    padding: 40px 50px;
}

/* Header UI */
.lg-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.lg-topbar h1 {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.5px;
}

.lg-credit-badge {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}
.lg-credit-badge strong { font-weight: 800; font-size: 16px; margin-right: 5px; }

/* Cards */
.lg-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

.lg-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 35px;
    box-shadow: 0 10px 40px -10px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.03);
    backdrop-filter: blur(10px);
}

.lg-card h3 { margin: 0 0 15px 0; font-size: 20px; }
.lg-card p { color: #64748b; line-height: 1.6; margin-bottom: 25px; }

/* Forms */
.lg-form-row {
    display: grid;
    grid-template-columns: 2fr 2fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.lg-form-group { display: flex; flex-direction: column; }
.lg-form-group label { font-size: 13px; font-weight: 600; color: #475569; margin-bottom: 8px; }
.lg-form-group input {
    padding: 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.2s;
}
.lg-form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* App Hub Grid (Pabbly Style) */
.lg-hub-intro {
    font-size: 15px;
    color: #475569;
    margin-bottom: 30px;
}

.lg-app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.lg-app-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    border: 1px solid #f1f5f9;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}
.lg-app-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.lg-app-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.lg-app-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}
.lg-icon-blue { background: #eff6ff; color: #3b82f6; }
.lg-icon-purple { background: #faf5ff; color: #a855f7; }
.lg-icon-green { background: #f0fdf4; color: #22c55e; }
.lg-icon-teal { background: #f0fdfa; color: #14b8a6; }

.lg-app-card h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: #1e293b;
}

.lg-app-card p {
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 25px 0;
    flex-grow: 1; /* Pushes buttons to bottom */
}

.lg-app-actions {
    display: flex;
    gap: 10px;
}

.lg-btn-app {
    padding: 9px 18px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}
.lg-btn-app.primary {
    background: #0ea5e9;
    color: white;
}
.lg-btn-app.primary:hover {
    background: #0284c7;
}
.lg-btn-app.disabled {
    background: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
    border-color: #e2e8f0;
}

/* Buttons */
.lg-btn {
    padding: 14px 28px;
    border-radius: 8px;
    border: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.lg-btn-primary {
    background: #0f172a; color: white; width: 100%;
    box-shadow: 0 4px 15px rgba(15, 23, 42, 0.15);
}
.lg-btn-primary:hover:not(:disabled) {
    background: #1e293b; transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.2);
}
.lg-btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.lg-btn-success { background: #10b981; color: white; display: inline-block; padding: 12px 24px;}
.lg-btn-success:hover { background: #059669; }

.lg-btn-outline { background: transparent; border: 2px solid #e2e8f0; color: #475569; }
.lg-btn-outline:hover { border-color: #cbd5e1; background: #f8fafc; }

/* Progress Bar */
.lg-progress-bar-bg {
    width: 100%; height: 12px; background: #e2e8f0; border-radius: 20px; overflow: hidden;
}
.lg-progress-bar-fill {
    height: 100%; background: linear-gradient(90deg, #3b82f6, #60a5fa);
    width: 0%; border-radius: 20px; transition: width 0.4s ease;
}

/* Pricing Grids */
.lg-pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 20px;
}

.lg-pricing-card {
    background: white; border-radius: 16px; padding: 40px 30px;
    text-align: center; box-shadow: 0 10px 40px -10px rgba(0,0,0,0.05);
    position: relative;
    border: 1px solid rgba(0,0,0,0.03);
}

.lg-pricing-card h3 { margin: 0; font-size: 18px; color: #64748b; text-transform: uppercase; letter-spacing: 1px;}
.lg-price { font-size: 48px; font-weight: 800; color: #0f172a; margin: 15px 0 5px; }

.lg-popular { border: 2px solid var(--primary); transform: scale(1.02); }
.lg-popular-badge {
    position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
    background: var(--primary); color: white; padding: 6px 16px;
    border-radius: 50px; font-size: 12px; font-weight: 700;
}

/* Tables */
.lg-table-responsive { overflow-x: auto; }
.lg-jobs-table { width: 100%; border-collapse: collapse; }
.lg-jobs-table th { text-align: left; padding: 15px; color: #64748b; font-size: 13px; font-weight: 600; border-bottom: 2px solid #e2e8f0; text-transform: uppercase; }
.lg-jobs-table td { padding: 16px 15px; border-bottom: 1px solid #f1f5f9; font-size: 14px; color: #334155; }
.lg-status { padding: 6px 12px; border-radius: 50px; font-size: 12px; font-weight: 600; }
.lg-status-completed { background: #d1fae5; color: #065f46; }
.lg-status-processing { background: #e0f2fe; color: #0369a1; }
.lg-status-failed { background: #fee2e2; color: #991b1b; }

/* Live Extraction UI */
.lg-extraction-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}
.lg-extraction-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
}

.lg-pulse-dot {
    width: 12px;
    height: 12px;
    background: #3b82f6;
    border-radius: 50%;
    animation: pulse-glow 1.5s infinite;
    flex-shrink: 0;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.5); }
    50% { box-shadow: 0 0 0 8px rgba(59, 130, 246, 0); }
}

.lg-batch-label {
    font-size: 12px;
    font-weight: 600;
    background: #e0f2fe;
    color: #0369a1;
    padding: 4px 12px;
    border-radius: 50px;
    margin-left: auto;
}

.lg-progress-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #475569;
}

/* Live Data Feed */
.lg-live-feed {
    margin-top: 25px;
    border-top: 1px solid #e2e8f0;
    padding-top: 20px;
}
.lg-live-feed h5 {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 600;
    color: #334155;
}

.lg-live-table-wrap {
    max-height: 320px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}
.lg-live-table-wrap::-webkit-scrollbar { width: 6px; }
.lg-live-table-wrap::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }

.lg-live-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.lg-live-table thead {
    position: sticky;
    top: 0;
    background: #f1f5f9;
    z-index: 1;
}
.lg-live-table th {
    text-align: left;
    padding: 10px 12px;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e2e8f0;
}
.lg-live-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    vertical-align: middle;
}
.lg-live-table tr:hover { background: #f8fafc; }

/* Row animation */
@keyframes slideIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}
.lg-lead-row-animate {
    animation: slideIn 0.3s ease forwards;
}

/* Success Message */
.lg-success-msg {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-radius: 12px;
    margin-bottom: 15px;
}
.lg-success-msg h3 { margin: 8px 0 5px; color: #065f46; font-size: 22px; }
.lg-success-msg p { color: #047857; margin: 0; font-size: 15px; }

/* Dashboard Stats Row */
.lg-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}
.lg-stat-card {
    background: white;
    border-radius: 14px;
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.04);
}
.lg-stat-icon {
    font-size: 28px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border-radius: 12px;
}
.lg-stat-info { display: flex; flex-direction: column; }
.lg-stat-value { font-size: 26px; font-weight: 800; color: #0f172a; }
.lg-stat-label { font-size: 13px; color: #94a3b8; font-weight: 500; }

/* Profile Stats */
.lg-profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}
.lg-stat-item {
    text-align: center;
    padding: 20px 10px;
    background: #f8fafc;
    border-radius: 12px;
}
.lg-stat-item .lg-stat-value { display: block; font-size: 30px; font-weight: 800; color: #0f172a; }
.lg-stat-item .lg-stat-label { display: block; font-size: 12px; color: #94a3b8; font-weight: 500; margin-top: 5px; }

/* Small Buttons */
.lg-btn-sm { padding: 8px 16px; font-size: 13px; border-radius: 6px; }
