/* ----------------------------------------------------
   WEBLEADS DASHBOARD CSS STYLING
   Theme: Sleek Premium Glassmorphic Dark Mode
   ---------------------------------------------------- */

:root {
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    /* Harmonious Curated Colors (HSL) */
    --bg-dark: hsl(222, 47%, 7%);
    --bg-card: hsla(223, 47%, 12%, 0.45);
    --border-glass: hsla(222, 100%, 95%, 0.08);
    --border-glowing: hsla(217, 91%, 60%, 0.25);
    
    --text-primary: hsl(0, 0%, 100%);
    --text-secondary: hsl(218, 15%, 75%);
    --text-muted: hsl(218, 12%, 55%);
    
    --primary: hsl(217, 91%, 60%);
    --primary-glow: hsla(217, 91%, 60%, 0.4);
    --primary-hover: hsl(217, 100%, 65%);
    
    --success: hsl(142, 71%, 45%);
    --success-glow: hsla(142, 71%, 45%, 0.35);
    --success-hover: hsl(142, 76%, 50%);
    
    --warning: hsl(38, 92%, 50%);
    --danger: hsl(350, 89%, 60%);
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.hidden {
    display: none !important;
}

/* 1. Global / Reset Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.5;
}

/* 2. Background Glowing Orbs */
.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    z-index: -1;
    opacity: 0.25;
    pointer-events: none;
}

.orb-1 {
    top: -10%;
    left: 10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, hsl(217, 91%, 60%) 0%, transparent 80%);
}

.orb-2 {
    bottom: 10%;
    right: 5%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, hsl(142, 71%, 45%) 0%, transparent 80%);
}

.orb-3 {
    top: 40%;
    left: 40%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, hsl(280, 85%, 60%) 0%, transparent 80%);
}

/* 3. Glassmorphic Card Engine */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: var(--transition-smooth);
}

.glass-card:hover {
    border-color: var(--border-glowing);
    box-shadow: 0 12px 40px 0 rgba(10, 40, 100, 0.45);
}

/* 4. Login Form View */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100%;
    padding: 24px;
    position: relative;
    z-index: 10;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    padding: 40px;
    margin: auto;
}

.logo-area {
    text-align: center;
    margin-bottom: 32px;
}

.logo-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 12px;
    animation: pulse 2.5s infinite alternate;
}

.logo-area h2, .header-logo h1 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.logo-area h2 span, .header-logo h1 span {
    background: linear-gradient(135deg, hsl(217, 91%, 60%), hsl(142, 71%, 45%));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-area p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 6px;
}

/* 5. Inputs, Buttons & Selects */
.input-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.input-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-group input, .input-group select, .input-group textarea, select, textarea {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: var(--transition-smooth);
}

.input-group input:focus, .input-group select:focus, .input-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
    background: rgba(0, 0, 0, 0.4);
}

textarea {
    resize: none;
    height: 100px;
}

/* Buttons System */
.btn {
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    text-align: center;
    display: inline-block;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--text-primary);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-glow:hover {
    box-shadow: 0 0 20px var(--primary-glow);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    border: 1px solid var(--border-glass);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}

.btn-success {
    background-color: var(--success);
    color: var(--text-primary);
    box-shadow: 0 4px 14px var(--success-glow);
}

.btn-success:hover {
    background-color: var(--success-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--success-glow);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.btn-xs {
    padding: 4px 8px;
    font-size: 0.75rem;
    border-radius: 4px;
}

/* 6. Dashboard View Container */
.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 40px;
}

.glass-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card);
    backdrop-filter: blur(15px);
    border: 1px solid var(--border-glass);
    padding: 16px 32px;
    border-radius: var(--radius-md);
    margin-bottom: 32px;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-logo .logo-icon {
    font-size: 1.8rem;
    margin-bottom: 0;
}

.header-profile {
    display: flex;
    align-items: center;
    gap: 20px;
}

.profile-email {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* 7. Bento Grid Dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.col-span-2 {
    grid-column: span 2;
}

.col-span-3 {
    grid-column: span 3;
}

.grid-card {
    padding: 32px;
    display: flex;
    flex-direction: column;
}

.card-header {
    margin-bottom: 24px;
}

.card-header h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.card-header p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.card-body {
    flex-grow: 1;
}

.input-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* Utility spacers */
.margin-top-sm { margin-top: 12px; }
.margin-top-md { margin-top: 24px; }
.margin-top-lg { margin-top: 36px; }
.flex-col { display: flex; flex-direction: column; }
.justify-between { justify-content: space-between; }
.h-full { height: 100%; }
.align-center { align-items: center; }
.flex-row { display: flex; flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.gap-md { gap: 16px; }

/* 8. Service Account Badge (CRM Sync Section) */
.service-account-badge {
    background: rgba(0, 0, 0, 0.35);
    border: 1px dashed var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 16px;
}

.badge-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.badge-copy-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
    gap: 12px;
}

.badge-copy-container code {
    background: #000;
    color: hsl(142, 71%, 45%);
    font-family: monospace;
    font-size: 0.85rem;
    padding: 6px 10px;
    border-radius: 4px;
    word-break: break-all;
    flex-grow: 1;
}

.badge-help {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 8px;
}

/* 9. Live Status Indicator */
.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-indicator.idle {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}
.status-indicator.idle .status-dot { background: var(--text-muted); }

.status-indicator.running {
    background: rgba(38, 92, 255, 0.15);
    color: var(--primary);
}
.status-indicator.running .status-dot {
    background: var(--primary);
    animation: pulse 1s infinite alternate;
}

.status-indicator.completed {
    background: rgba(142, 71, 45, 0.15);
    color: var(--success);
}
.status-indicator.completed .status-dot { background: var(--success); }

.status-indicator.failed {
    background: rgba(255, 0, 0, 0.15);
    color: var(--danger);
}
.status-indicator.failed .status-dot { background: var(--danger); }

/* 10. Console Logs Wrapper & History */
.console-wrapper {
    background: #000;
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 20px;
    height: 220px;
    overflow-y: auto;
}

.console-wrapper pre {
    color: #4af626; /* Matrix Green color */
    font-family: "Courier New", Courier, monospace;
    font-size: 0.85rem;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Campaign History Styling */
.history-item {
    padding: 12px;
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.history-item:last-child {
    border-bottom: none;
}

.history-info h4 {
    font-weight: 600;
    color: var(--text-primary);
}

.history-info p {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-top: 2px;
}

.history-badge {
    background: rgba(142, 71, 45, 0.15);
    color: var(--success);
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
}

/* 11. Leads Database Table & Advanced Filters Section */
.pill-badge {
    background: linear-gradient(135deg, var(--primary), var(--success));
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 20px;
}

.table-section {
    padding-bottom: 24px;
}

/* Filter Controls Box */
.filter-controls-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 16px 24px;
    gap: 24px;
    flex-wrap: wrap;
}

.search-bar-wrapper {
    position: relative;
    flex-grow: 1;
    max-width: 500px;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
}

.search-bar-wrapper input {
    width: 100%;
    padding: 10px 16px 10px 48px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: var(--transition-smooth);
}

.search-bar-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
    background: rgba(0, 0, 0, 0.5);
}

.dropdown-filters-wrapper {
    display: flex;
    gap: 16px;
    align-items: center;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filter-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-group select {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 8px 16px;
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    min-width: 140px;
}

.filter-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.15);
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.88rem; /* Premium compact SaaS sizing */
}

th, td {
    padding: 12px 18px; /* Tighter padding for elegant spacing */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

th {
    background-color: rgba(255, 255, 255, 0.02) !important;
    color: rgba(255, 255, 255, 0.4) !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    font-size: 0.68rem !important;
    letter-spacing: 1px !important;
    padding: 10px 18px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

tr {
    cursor: pointer;
    transition: var(--transition-smooth);
}

tr:hover td {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

tr:hover td strong {
    color: var(--primary);
}

td a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-smooth);
}

td a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }

/* Outreach badge button inside table */
.outreach-badge {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(142, 71, 45, 0.15);
    color: var(--success);
    font-weight: 600;
    font-size: 0.8rem;
    border-radius: 6px;
    border: 1px solid rgba(142, 71, 45, 0.3);
    cursor: pointer;
    transition: var(--transition-smooth);
    text-align: center;
}

.outreach-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(100, 200, 100, 0.2);
}

/* CRM status pill inside table */
/* CRM status pill inside table */
.crm-status-pill {
    padding: 5px 12px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 700;
    text-align: center;
    display: inline-block;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Status specific glassmorphic styles */
.crm-status-pill.not_started, 
.crm-status-pill.not-started { 
    background: rgba(255, 255, 255, 0.04) !important; 
    color: rgba(255, 255, 255, 0.5) !important; 
    border: 1px solid rgba(255, 255, 255, 0.08) !important; 
}

.crm-status-pill.approved_for_outreach,
.crm-status-pill.approved-for-outreach { 
    background: rgba(16, 185, 129, 0.12) !important; 
    color: #10b981 !important; 
    border: 1px solid rgba(16, 185, 129, 0.25) !important; 
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.08);
}

.crm-status-pill.email_1_sent,
.crm-status-pill.email-1-sent { 
    background: rgba(139, 92, 246, 0.12) !important; 
    color: #a78bfa !important; 
    border: 1px solid rgba(139, 92, 246, 0.25) !important; 
}

.crm-status-pill.follow_up_sent,
.crm-status-pill.follow-up-sent { 
    background: rgba(59, 130, 246, 0.12) !important; 
    color: #60a5fa !important; 
    border: 1px solid rgba(59, 130, 246, 0.25) !important; 
}

.crm-status-pill.closed_replied,
.crm-status-pill.closed-replied { 
    background: rgba(245, 158, 11, 0.12) !important; 
    color: #fbbf24 !important; 
    border: 1px solid rgba(245, 158, 11, 0.25) !important; 
}

.crm-status-pill.closed_positive,
.crm-status-pill.closed-positive { 
    background: rgba(16, 185, 129, 0.18) !important; 
    color: #34d399 !important; 
    border: 1px solid rgba(16, 185, 129, 0.35) !important; 
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.15);
}

.crm-status-pill.closed_opted_out,
.crm-status-pill.closed-opted-out { 
    background: rgba(239, 68, 68, 0.12) !important; 
    color: #f87171 !important; 
    border: 1px solid rgba(239, 68, 68, 0.25) !important; 
}

.crm-status-pill.closed_bounced,
.crm-status-pill.closed-bounced { 
    background: rgba(220, 38, 38, 0.12) !important; 
    color: #f87171 !important; 
    border: 1px solid rgba(220, 38, 38, 0.25) !important; 
}

.crm-status-pill.closed_no_reply,
.crm-status-pill.closed-no-reply { 
    background: rgba(107, 114, 128, 0.12) !important; 
    color: #9ca3af !important; 
    border: 1px solid rgba(107, 114, 128, 0.25) !important; 
}

.crm-status-pill.manual_follow_up_required,
.crm-status-pill.manual-follow-up-required { 
    background: rgba(249, 115, 22, 0.15) !important; 
    color: #fb923c !important; 
    border: 1px solid rgba(249, 115, 22, 0.3) !important; 
    box-shadow: 0 0 10px rgba(249, 115, 22, 0.12);
    animation: status-pulse 2s infinite ease-in-out;
}

@keyframes status-pulse {
    0% { opacity: 0.85; }
    50% { opacity: 1; box-shadow: 0 0 15px rgba(249, 115, 22, 0.25); }
    100% { opacity: 0.85; }
}

/* 12. SLIDE-OUT OUTREACH PANEL */
.side-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1000;
    display: flex;
    justify-content: flex-end;
    transition: var(--transition-smooth);
}

.panel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    transition: var(--transition-smooth);
}

.panel-content {
    position: relative;
    width: 100%;
    max-width: 520px;
    height: 100%;
    background: hsla(223, 47%, 10%, 0.85);
    border-left: 1px solid var(--border-glass);
    padding: 32px 40px;
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
    transform: translateX(0);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 10;
}

.panel-body {
    flex: 1;
    overflow-y: auto;
    margin-top: 16px;
    padding-right: 8px;
}

/* Styled Scrollbars for details panel body */
.panel-body::-webkit-scrollbar {
    width: 6px;
}
.panel-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 3px;
}
.panel-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 3px;
    transition: background 0.3s ease;
}
.panel-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Animation for panel entry */
.side-panel.hidden {
    display: none !important;
}

.contact-badges-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.info-badge {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.btn-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-close:hover {
    color: var(--text-primary);
}

/* Status editor inside panel */
.status-editor-container {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-glass);
    padding: 24px;
    border-radius: var(--radius-md);
}

.status-editor-container h4, .outreach-template-container h4 {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

.premium-select {
    width: 100%;
    cursor: pointer;
}

/* Outreach Template box */
.badge-label-small {
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(142, 71, 45, 0.15);
    padding: 4px 10px;
    border-radius: 10px;
}

.template-console-box {
    background: #000;
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 16px;
    height: 180px;
}

.template-console-box textarea {
    width: 100%;
    height: 100%;
    background: none;
    border: none;
    color: hsl(218, 15%, 85%);
    font-family: monospace;
    font-size: 0.8rem;
    padding: 0;
    line-height: 1.4;
    overflow-y: auto;
}

.template-console-box textarea:focus {
    box-shadow: none;
    background: none;
}

/* Scraped Details Grid inside Panel */
.details-grid-container {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.details-grid-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.details-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.details-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.details-value {
    font-size: 0.88rem;
    color: var(--text-primary);
    word-break: break-word;
}

.details-value-link {
    font-size: 0.88rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    word-break: break-all;
    transition: var(--transition-smooth);
}

.details-value-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}


/* 13. Footer */
.dashboard-footer {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 40px;
}

/* 14. Keyframe Animations */
@keyframes pulse {
    0% { transform: scale(1); filter: drop-shadow(0 0 2px var(--primary-glow)); }
    100% { transform: scale(1.05); filter: drop-shadow(0 0 15px var(--primary-glow)); }
}

/* 15. Responsive Styling */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .col-span-2, .col-span-3 {
        grid-column: span 1;
    }
    .dashboard-container {
        padding: 16px 20px;
    }
}

/* ====================================================
   16. SIDEBAR MENU & PROFESSIONAL APP LAYOUT
   ==================================================== */
.app-layout {
    display: flex;
    min-height: 100vh;
    width: 100vw;
    background-color: var(--bg-dark);
    position: relative;
    overflow: hidden;
}

/* Sidebar navigation */
.sidebar {
    width: 280px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    border-radius: 0 !important;
    border: none;
    border-right: 1px solid var(--border-glass);
    background: hsla(223, 47%, 9%, 0.8) !important;
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 48px;
}

.sidebar-brand h2 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.sidebar-brand h2 span {
    background: linear-gradient(135deg, hsl(217, 91%, 60%), hsl(142, 71%, 45%));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-grow: 1;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 0.88rem;
    font-weight: 500;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-align: left;
    transition: var(--transition-smooth);
    width: 100%;
    position: relative;
}

.menu-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 0;
    background-color: var(--primary);
    border-radius: 2px;
    transition: var(--transition-smooth);
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
}

.menu-item.active {
    background: rgba(38, 92, 255, 0.1);
    color: var(--text-primary);
    font-weight: 600;
    border: 1px solid rgba(38, 92, 255, 0.15);
}

.menu-item.active::before {
    height: 60%;
}

.menu-item.active .menu-icon {
    transform: scale(1.1);
}

.menu-icon {
    font-size: 1.2rem;
    transition: var(--transition-smooth);
}

.sidebar-footer {
    border-top: 1px solid var(--border-glass);
    padding-top: 24px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 14px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--success));
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 0 10px var(--primary-glow);
}

.user-meta h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
}

.user-meta p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Right Main Workspace styles */
.main-workspace {
    flex-grow: 1;
    margin-left: 280px;
    padding: 40px 48px;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.workspace-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 20px;
}

.workspace-header h1 {
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: -0.3px;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.workspace-content {
    flex-grow: 1;
    position: relative;
}

/* Animations and tab transitions */
@keyframes pageFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tab-page {
    animation: pageFadeIn 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

/* Console Page specific layout styling */
.console-tab-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Responsive sidebar tweaks */
@media (max-width: 1024px) {
    .app-layout {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 20px;
        border-right: none;
        border-bottom: 1px solid var(--border-glass);
    }
    .sidebar-brand {
        margin-bottom: 20px;
        justify-content: center;
    }
    .sidebar-menu {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }
    .menu-item {
        width: auto;
    }
    .menu-item.active::before {
        height: 4px;
        width: 40%;
        left: 30%;
        top: auto;
        bottom: 0;
        transform: none;
    }
    .main-workspace {
        margin-left: 0;
        padding: 24px 20px;
        height: auto;
        overflow-y: visible;
    }
}

/* ====================================================
   17. PREMIUM ABOVE-TABLE FILTER SEGMENTS (RADIO BUTTONS)
   ==================================================== */
.filters-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.status-segment-wrapper {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.status-segment-wrapper .filter-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-segments {
    display: flex;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 4px;
    gap: 4px;
    flex-wrap: wrap;
    align-items: center;
}

.segment-item {
    cursor: pointer;
    display: inline-block;
}

.segment-item input[type="radio"] {
    display: none !important; /* Hide standard radio input */
}

.segment-button {
    display: inline-block;
    padding: 8px 16px;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: 6px;
    transition: var(--transition-smooth);
}

.segment-item:hover .segment-button {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

/* Selected state specific HSL glows */
.segment-item input[type="radio"]:checked + .segment-button {
    background: var(--primary);
    color: var(--text-primary);
    box-shadow: 0 0 12px var(--primary-glow);
}

.segment-item input[type="radio"]:checked[value="all"] + .segment-button {
    background: var(--primary);
    box-shadow: 0 0 12px var(--primary-glow);
}

.segment-item input[type="radio"]:checked[value="Not Contacted"] + .segment-button {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    box-shadow: none;
}

.segment-item input[type="radio"]:checked[value="Contacted"] + .segment-button {
    background: hsla(217, 91%, 60%, 0.9);
    box-shadow: 0 0 12px var(--primary-glow);
}

.segment-item input[type="radio"]:checked[value="Interested"] + .segment-button {
    background: var(--success);
    color: var(--text-primary);
    box-shadow: 0 0 12px var(--success-glow);
}

.segment-item input[type="radio"]:checked[value="Not Interested"] + .segment-button {
    background: var(--danger);
    color: var(--text-primary);
    box-shadow: 0 0 12px rgba(255, 0, 0, 0.3);
}

.segment-item input[type="radio"]:checked[value="Meeting Booked"] + .segment-button {
    background: linear-gradient(135deg, var(--primary), var(--success));
    color: var(--text-primary);
    box-shadow: 0 0 12px var(--success-glow);
}

/* ====================================================
   18. CRM OVERVIEW ANALYTICS & PROGRESS BARS
   ==================================================== */
.overview-item {
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    margin-bottom: 12px;
    transition: var(--transition-smooth);
}

.overview-item:hover {
    border-color: var(--border-glowing);
    background: rgba(255, 255, 255, 0.02);
}

.overview-item:last-child {
    margin-bottom: 0;
}

.overview-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.overview-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

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

.progress-track {
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--success));
    border-radius: 4px;
    transition: width 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 0 10px var(--primary-glow);
}

.email-tab-grid-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 1024px) {
    .analytics-grid-row, .email-tab-grid-row {
        grid-template-columns: 1fr !important;
    }
}

/* ====================================================
   BORDERLESS MODERN TOOLBARS & GLOWING PILL SEGMENTS
   ==================================================== */
.toolbar-container {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}

.toolbar-container .search-bar-wrapper {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px; /* Premium capsule style */
    padding: 2px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition-smooth);
}

.toolbar-container .search-bar-wrapper .search-icon {
    position: static !important;
    transform: none !important;
    display: inline-flex;
    align-items: center;
    left: auto;
    top: auto;
    padding: 0;
    margin: 0;
}

.toolbar-container .search-bar-wrapper:focus-within {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 12px rgba(38, 92, 255, 0.2);
}

.toolbar-container .search-bar-wrapper input {
    background: none !important;
    border: none !important;
    outline: none !important;
    color: #fff !important;
    padding: 6px 0 !important;
    width: 100% !important;
    font-size: 0.85rem !important;
}

.toolbar-container .filter-group {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
}

.toolbar-container .filter-group label {
    display: inline-block !important;
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    color: rgba(255, 255, 255, 0.4) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    margin: 0 !important;
    white-space: nowrap !important;
}

.toolbar-container select {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #fff !important;
    border-radius: 20px !important;
    padding: 5px 12px !important;
    font-size: 0.8rem !important;
    outline: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease-in-out !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
    background-size: 12px !important;
    padding-right: 28px !important;
}

.toolbar-container select:focus {
    border-color: var(--primary) !important;
    background-color: rgba(255, 255, 255, 0.05) !important;
    box-shadow: 0 0 12px rgba(38, 92, 255, 0.2) !important;
}

/* Borderless segmented pill categories */
.status-segments {
    background: none !important;
    border: none !important;
    padding: 0 !important;
    gap: 8px !important;
}

.segment-button {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 20px !important; /* Fully rounded capsule tabs */
    color: var(--text-secondary) !important;
    padding: 8px 18px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    transition: var(--transition-smooth) !important;
}

.segment-button:hover {
    background: rgba(255, 255, 255, 0.07) !important;
    color: #fff !important;
}

.segment-item input[type="radio"]:checked + .segment-button {
    background: linear-gradient(135deg, var(--primary), var(--primary-glow)) !important;
    color: #fff !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 12px rgba(38, 92, 255, 0.35) !important;
}


/* ==========================================================================
   14. Transversal FAB and Action Control Center
   ========================================================================== */
.fab-container {
    position: fixed;
    right: 32px;
    bottom: 32px;
    z-index: 9999;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.fab-container:hover {
    transform: scale(1.1) rotate(5deg);
}

.fab-container:active {
    transform: scale(0.95);
}

.fab-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-glow), var(--success));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(38, 92, 255, 0.4), 
                inset 0 2px 8px rgba(255, 255, 255, 0.3);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.fab-icon {
    font-size: 1.6rem;
    color: #fff;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    animation: pulse-glow 2s infinite alternate;
}

.fab-status-indicator {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #6c757d; /* Grey by default (idle) */
    border: 2px solid #0b0f19;
    transition: background-color 0.3s ease;
}

.fab-status-indicator.running {
    background: #00f0ff; /* Neon cyan */
    box-shadow: 0 0 8px #00f0ff;
    animation: flash-pulse 1.5s infinite;
}

.fab-tooltip {
    position: absolute;
    right: 76px;
    top: 50%;
    transform: translateY(-50%) translateX(10px);
    background: rgba(10, 15, 30, 0.9);
    border: 1px solid var(--border-glass);
    color: #fff;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
}

.fab-container:hover .fab-tooltip {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* Frosted Quick Launch Card positioning */
.overlay-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(5, 7, 12, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.overlay-backdrop.hidden {
    opacity: 0;
    pointer-events: none;
}

.quick-launch-card {
    background: linear-gradient(135deg, rgba(16, 22, 40, 0.85), rgba(10, 14, 26, 0.95)) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6), 
                inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    transform: scale(1) translateY(0);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.15);
}

.overlay-backdrop.hidden .quick-launch-card {
    transform: scale(0.9) translateY(20px);
}

/* Animations */
@keyframes flash-pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

@keyframes pulse-glow {
    0% { transform: scale(1); filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.5)); }
    100% { transform: scale(1.1); filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.8)); }
}

/* ==========================================================================
   15. Dual-Column Outreach log hub grid layout
   ========================================================================== */
.outreach-history-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
    align-items: start;
    width: 100%;
}

.campaigns-sidebar {
    height: calc(100vh - 180px);
    display: flex;
    flex-direction: column;
}

.campaigns-list-wrapper::-webkit-scrollbar {
    width: 4px;
}

.campaigns-list-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

/* Campaign Card elements */
.campaign-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 14px;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.campaign-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(38, 92, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.campaign-card.active {
    background: rgba(38, 92, 255, 0.1);
    border-color: var(--primary);
    box-shadow: 0 0 16px rgba(38, 92, 255, 0.25);
}

.campaign-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.campaign-card-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.4;
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.campaign-card-meta {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.campaign-card-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    background: rgba(0, 0, 0, 0.15);
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.campaign-card-stats span strong {
    color: #fff;
}

.campaign-card-status-pill {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
}

.campaign-card-status-pill.running {
    background: rgba(0, 240, 255, 0.15);
    color: #00f0ff;
    border: 1px solid rgba(0, 240, 255, 0.3);
    box-shadow: 0 0 6px rgba(0, 240, 255, 0.2);
}

.campaign-card-status-pill.completed {
    background: rgba(46, 213, 115, 0.15);
    color: var(--success);
    border: 1px solid rgba(46, 213, 115, 0.3);
}

.campaign-card-status-pill.failed {
    background: rgba(255, 71, 87, 0.15);
    color: var(--danger);
    border: 1px solid rgba(255, 71, 87, 0.3);
}

/* Local pills in target leads table */
.pill-filteractive {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    padding: 4px 12px;
    border-radius: 14px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.pill-filteractive:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.pill-filteractive.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-glow));
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 8px rgba(38, 92, 255, 0.3);
}

.pulsing {
    animation: flash-pulse 1.5s infinite;
}

@media (max-width: 992px) {
    .outreach-history-grid {
        grid-template-columns: 1fr;
    }
    .campaigns-sidebar {
        height: auto;
    }
}

/* Responsive adjustment for KPI Analytics Grid */
@media (max-width: 1200px) {
    .kpi-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}
@media (max-width: 768px) {
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}
@media (max-width: 480px) {
    .kpi-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Lucide Monochrome SVG Icon Styles */
.menu-icon i, .heading-icon, .kpi-icon i, .search-icon i, .subtab-icon {
    display: inline-block;
    vertical-align: middle;
    stroke-width: 2px;
}

.menu-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-right: 12px;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.menu-item.active .menu-icon {
    color: var(--primary-light);
}

.menu-icon i, .menu-icon svg {
    width: 16px;
    height: 16px;
    stroke-width: 2px;
}

.heading-icon {
    width: 14px;
    height: 14px;
    margin-right: 6px;
    color: var(--primary-light) !important;
    stroke-width: 2px;
    display: inline-block;
}

.kpi-icon i, .kpi-icon svg {
    width: 32px !important;
    height: 32px !important;
    stroke-width: 1.5px !important;
    color: var(--text-muted);
}

.search-icon i, .search-icon svg {
    width: 14px;
    height: 14px;
    opacity: 0.6;
    display: inline-block;
}

.subtab-icon {
    width: 14px;
    height: 14px;
    margin-right: 6px;
    stroke-width: 2px;
    display: inline-block;
}

/* ==========================================================================
   10. Polish Edits: Premium Segmented Sub-Tabs, Glassmorphic Selects & Inputs
   ========================================================================== */

/* Segmented Control Capsule Tab Bar */
.settings-subtabs {
    display: inline-flex !important;
    background: rgba(10, 15, 30, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 4px !important;
    border-radius: 30px !important; /* Capsule outline */
    gap: 4px !important;
    width: fit-content;
}

/* Modal segmented subtabs span full width horizontally */
.quick-launch-card .settings-subtabs {
    display: flex !important;
    width: 100% !important;
    box-sizing: border-box;
}

.settings-subtab-btn {
    background: none !important;
    border: none !important;
    color: var(--text-secondary) !important;
    padding: 8px 18px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.2px !important;
    border-radius: 20px !important; /* Capsule inner button */
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    user-select: none;
}

.settings-subtab-btn:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.05) !important;
}

.settings-subtab-btn.active {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Ensure data-lucide icons inside tabs are perfectly aligned and styled */
.settings-subtab-btn i, .settings-subtab-btn svg {
    width: 14px !important;
    height: 14px !important;
    stroke-width: 2.2px !important;
    opacity: 0.9;
    display: inline-block;
}

/* Ultra-Premium Glassmorphic Select Dropdowns */
.premium-select {
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #fff !important;
    border-radius: 8px !important;
    padding: 8px 36px 8px 14px !important; /* Adjusted spacing to fit height perfectly */
    font-size: 0.85rem !important;
    height: 38px !important;
    line-height: 1.4 !important;
    outline: none !important;
    cursor: pointer !important;
    transition: var(--transition-smooth) !important;
    appearance: none !important; /* Reset default browser dropdown styles */
    -webkit-appearance: none !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba%28255%2c255%2c255%2c0.6%29' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 14px !important;
    width: 100%;
    box-sizing: border-box;
}

.premium-select:focus {
    border-color: var(--primary) !important;
    background-color: rgba(255, 255, 255, 0.05) !important;
    box-shadow: 0 0 12px rgba(38, 92, 255, 0.25) !important;
}

.premium-select option {
    background: #0d111a !important;
    color: #fff !important;
}

/* Ultra-Premium Glassmorphic Small Inputs */
.premium-input-small {
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #fff !important;
    border-radius: 8px !important;
    padding: 8px 12px !important;
    font-size: 0.85rem !important;
    height: 38px !important;
    line-height: 1.4 !important;
    outline: none !important;
    transition: var(--transition-smooth) !important;
    width: 100%;
    box-sizing: border-box;
}

.premium-input-small:focus {
    border-color: var(--primary) !important;
    background-color: rgba(255, 255, 255, 0.05) !important;
    box-shadow: 0 0 12px rgba(38, 92, 255, 0.25) !important;
}


/* ====================================================
   17. OUTREACH COMMAND CENTER & EVENT TIMELINE
   ==================================================== */

.board-card {
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s ease, border-color 0.25s ease;
    cursor: pointer;
}

.board-card:hover {
    transform: translateY(-4px);
}

.rose-gold-border {
    border: 1px solid rgba(224, 169, 109, 0.2) !important;
}

.rose-gold-border:hover {
    border-color: #e0a96d !important;
    box-shadow: 0 4px 20px rgba(224, 169, 109, 0.15) !important;
}

.emerald-border {
    border: 1px solid rgba(46, 213, 115, 0.2) !important;
}

.emerald-border:hover {
    border-color: var(--success) !important;
    box-shadow: 0 4px 20px rgba(46, 213, 115, 0.15) !important;
}

.blue-border {
    border: 1px solid rgba(0, 168, 255, 0.2) !important;
}

.blue-border:hover {
    border-color: var(--primary) !important;
    box-shadow: 0 4px 20px rgba(0, 168, 255, 0.15) !important;
}

.ruby-red-border {
    border: 1px solid rgba(255, 71, 87, 0.3) !important;
}

.ruby-red-border:hover {
    border-color: #ff4757 !important;
    box-shadow: 0 4px 20px rgba(255, 71, 87, 0.2) !important;
}

.gray-border {
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.gray-border:hover {
    border-color: rgba(255, 255, 255, 0.25) !important;
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1) !important;
}

@keyframes pulseRed {
    0% { border-color: rgba(255, 71, 87, 0.3); box-shadow: 0 0 4px rgba(255, 71, 87, 0.1); }
    100% { border-color: rgba(255, 71, 87, 0.7); box-shadow: 0 0 12px rgba(255, 71, 87, 0.3); }
}

.pulse-red {
    animation: pulseRed 2s infinite alternate !important;
}

@keyframes blink {
    0% { opacity: 0.3; }
    100% { opacity: 1; }
}

/* Timeline Layout */
.timeline-item {
    display: flex;
    gap: 12px;
    position: relative;
    padding-bottom: 12px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 14px;
    bottom: -8px;
    width: 2px;
    background: rgba(255, 255, 255, 0.08);
}

.timeline-item:last-child::before {
    display: none;
}

.timeline-marker {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 3px solid #0d111a;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
    margin-top: 2px;
}

.timeline-marker.success {
    background: var(--success) !important;
}

.timeline-marker.primary {
    background: var(--primary) !important;
}

.timeline-marker.warning {
    background: var(--warning) !important;
}

.timeline-marker.danger {
    background: #ff4757 !important;
}

.timeline-marker.gold {
    background: #e0a96d !important;
}

.timeline-content {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    border-radius: 6px;
    padding: 8px 12px;
    flex-grow: 1;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.timeline-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
}

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

.timeline-actor {
    font-size: 0.62rem;
    font-weight: 600;
    padding: 1px 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.8);
    margin-left: 8px;
    text-transform: uppercase;
}

.timeline-meta {
    font-size: 0.72rem;
    color: var(--text-secondary);
    line-height: 1.4;
    word-break: break-word;
}

/* ====================================================
   17. PREMIUM SYSTEM UPGRADES & MICRO-WIDGETS
   ==================================================== */
.th-icon {
    width: 12px;
    height: 12px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 6px;
    opacity: 0.6;
}

.status-pill-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.status-dot-pulse {
    animation: status-dot-pulse-anim 1.5s infinite alternate;
}

@keyframes status-dot-pulse-anim {
    0% { transform: scale(0.85); opacity: 0.6; }
    100% { transform: scale(1.35); opacity: 1; box-shadow: 0 0 8px currentColor; }
}

/* Unified pipeline status styling classes */
.crm-status-pill.email-sent {
    background: rgba(139, 92, 246, 0.12) !important;
    color: #a78bfa !important;
    border: 1px solid rgba(139, 92, 246, 0.25) !important;
}

.crm-status-pill.manual-contact {
    background: rgba(245, 158, 11, 0.12) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(245, 158, 11, 0.25) !important;
}

.crm-status-pill.response-received {
    background: rgba(6, 182, 212, 0.12) !important;
    color: #22d3ee !important;
    border: 1px solid rgba(6, 182, 212, 0.25) !important;
}

.crm-status-pill.interested {
    background: rgba(16, 185, 129, 0.15) !important;
    color: #34d399 !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.08);
}

.crm-status-pill.meeting-booked {
    background: rgba(16, 185, 129, 0.18) !important;
    color: #34d399 !important;
    border: 1px solid rgba(16, 185, 129, 0.35) !important;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.15);
    animation: status-pulse 2s infinite ease-in-out;
}

.crm-status-pill.not-interested {
    background: rgba(107, 114, 128, 0.12) !important;
    color: #9ca3af !important;
    border: 1px solid rgba(107, 114, 128, 0.25) !important;
}

.crm-status-pill.failed {
    background: rgba(239, 68, 68, 0.12) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.25) !important;
}

.crm-status-pill.queued {
    background: rgba(59, 130, 246, 0.12) !important;
    color: #60a5fa !important;
    border: 1px solid rgba(59, 130, 246, 0.25) !important;
}

/* 3-dots Actions Dropdown Menu */
.actions-dropdown {
    position: relative;
    display: inline-block;
}

.actions-dropdown-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.actions-dropdown-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

.actions-dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 6px;
    background: rgba(15, 11, 23, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 100;
    min-width: 180px;
    overflow: hidden;
    animation: actionsDropdownFadeIn 0.2s ease-in-out;
}

.actions-dropdown-content.show {
    display: block;
}

.actions-dropdown-item {
    width: 100%;
    padding: 10px 16px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.actions-dropdown-item i {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

.actions-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.actions-dropdown-item:hover i {
    opacity: 1;
}

.actions-dropdown-item.approve-item:hover {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.actions-dropdown-item.reject-item:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

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

/* ==========================================================================
   21. TEMPLATE LIBRARY & STUDIO DRAWER STYLING
   ========================================================================== */
.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.template-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    height: 100%;
    min-height: 240px;
    box-sizing: border-box;
}

.template-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--card-border-gradient, linear-gradient(90deg, var(--primary), var(--secondary)));
    opacity: 0.8;
}

.template-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4), 0 0 15px rgba(255, 255, 255, 0.05);
    transform: translateY(-4px);
}

.template-card-header {
    margin-bottom: 16px;
}

.template-card-header h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 6px;
}

.template-card-header .template-version-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--primary);
    background: rgba(38, 92, 255, 0.12);
    border: 1px solid rgba(38, 92, 255, 0.25);
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.template-card-body {
    margin-bottom: 24px;
    flex-grow: 1;
}

.template-card-body p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.template-color-preview {
    display: flex;
    gap: 6px;
    margin-top: 14px;
    align-items: center;
}

.color-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: inline-block;
}

/* Template Editor Studio Custom Drawer */
.custom-drawer {
    position: fixed;
    top: 0;
    right: -480px; /* Hidden offscreen by default */
    width: 460px;
    height: 100vh;
    background: rgba(12, 8, 20, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.6);
    z-index: 1000;
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-sizing: border-box;
}

.custom-drawer.show {
    right: 0; /* Slide in! */
}

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

.drawer-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
}

.drawer-header .close-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}

.drawer-header .close-btn:hover {
    color: #fff;
}

.drawer-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 3px;
    gap: 4px;
    margin-bottom: 20px;
}

.drawer-tab-btn {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 8px 0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.drawer-tab-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.02);
}

.drawer-tab-btn.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 0 10px var(--primary-glow);
}

.drawer-body {
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 4px;
}

/* Custom Scrollbars for Drawer Body */
.drawer-body::-webkit-scrollbar {
    width: 4px;
}

.drawer-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.drawer-tab-content {
    animation: drawerTabFadeIn 0.3s ease-in-out forwards;
}

@keyframes drawerTabFadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-section {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-md);
    padding: 18px;
    margin-bottom: 20px;
}

.form-section h4 {
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
    border-left: 2px solid var(--primary);
    padding-left: 10px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.form-group label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
}

.form-input, .form-select {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: #fff;
    padding: 10px 14px;
    font-size: 0.82rem;
    outline: none;
    font-family: inherit;
    transition: all 0.25s ease;
    box-sizing: border-box;
}

.form-input:focus, .form-select:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 10px rgba(38, 92, 255, 0.2);
}

.service-row-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.service-row-item .remove-service-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: var(--danger);
    font-size: 1rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.service-row-item .remove-service-btn:hover {
    opacity: 1;
}



