@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
    --bg-primary: #080B11;
    --bg-secondary: #0F131D;
    --accent-gradient: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
    --accent-glow: rgba(99, 102, 241, 0.3);
    --border-color: rgba(255, 255, 255, 0.08);
    --card-bg: rgba(15, 22, 36, 0.6);
    --text-primary: #F3F4F6;
    --text-secondary: #9CA3AF;
    --text-muted: #6B7280;
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
    --info: #3B82F6;
    --radius-lg: 16px;
    --radius-md: 12px;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

/* Background Aurora Effect */
body::before {
    content: '';
    position: absolute;
    top: -10%;
    left: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
    filter: blur(80px);
    animation: pulseAurora 12s infinite alternate;
}

body::after {
    content: '';
    position: absolute;
    bottom: -10%;
    right: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.06) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
    filter: blur(80px);
    animation: pulseAurora 15s infinite alternate-reverse;
}

@keyframes pulseAurora {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 30px) scale(1.1); }
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Glassmorphism Classes */
.glass-panel {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    border-radius: var(--radius-lg);
}

.glass-card {
    background: rgba(20, 29, 47, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition-smooth);
}

.glass-card:hover {
    transform: translateY(-4px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 12px 24px -10px rgba(99, 102, 241, 0.2);
    background: rgba(20, 29, 47, 0.6);
}

/* Layout Elements */
.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    flex-grow: 1;
}

/* Typography & Titles */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 700;
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Buttons */
.btn-premium {
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    padding: 0.8rem 1.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    text-decoration: none;
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
    filter: brightness(1.1);
}

.btn-premium:active {
    transform: translateY(0);
}

.btn-secondary-premium {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.8rem 1.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-secondary-premium:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-danger-premium {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-md);
    padding: 0.5rem 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    font-size: 0.9rem;
}

.btn-danger-premium:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: var(--danger);
}

/* Form Inputs */
.form-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

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

.input-premium {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.9rem 1.2rem;
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition-smooth);
    outline: none;
    width: 100%;
}

.input-premium:focus {
    border-color: #6366F1;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.15);
    background: rgba(255, 255, 255, 0.05);
}

.input-premium::placeholder {
    color: var(--text-muted);
}

/* Badges */
.badge-premium {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    gap: 0.35rem;
    border: 1px solid transparent;
}

.badge-no-web {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.2);
}

.badge-status-new {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info);
    border-color: rgba(59, 130, 246, 0.2);
}

.badge-status-called {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
    border-color: rgba(245, 158, 11, 0.2);
}

.badge-status-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border-color: rgba(16, 185, 129, 0.2);
}

.badge-status-failed {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.2);
}

/* Login Page specific styles */
.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1.5rem;
    background: var(--bg-primary);
}

.login-card {
    max-width: 450px;
    width: 100%;
    padding: 3rem 2.5rem;
    position: relative;
    overflow: hidden;
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-logo {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

/* Dashboard Structure */
.navbar-premium {
    height: 70px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(8, 11, 17, 0.8);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-smooth);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

/* Grid & Content Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: rgba(99, 102, 241, 0.1);
    color: #6366F1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
}

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

/* Search Bar Section */
.search-hero {
    text-align: center;
    margin-bottom: 3rem;
}

.search-box-wrapper {
    max-width: 750px;
    margin: 2rem auto;
    position: relative;
}

.search-input-container {
    display: flex;
    gap: 0.75rem;
}

.search-input-container .input-premium {
    padding-left: 3rem;
}

.search-icon-inside {
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.2rem;
    pointer-events: none;
}

/* Lead Cards Grid */
.leads-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

.lead-card {
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media(min-width: 768px) {
    .lead-card {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.lead-main {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.lead-title-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.lead-info-row {
    display: flex;
    gap: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.lead-info-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.lead-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
    align-self: flex-start;
}

@media(min-width: 768px) {
    .lead-actions {
        align-self: center;
    }
}

/* Skeleton Loading Animation */
.skeleton-card {
    padding: 1.75rem;
    height: 110px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    margin-bottom: 1rem;
}

.skeleton-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transform: translateX(-100%);
    animation: loadingSkeleton 1.5s infinite;
}

@keyframes loadingSkeleton {
    100% { transform: translateX(100%); }
}

.skeleton-text {
    height: 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

.skeleton-title { width: 40%; height: 20px; }
.skeleton-subtitle { width: 70%; }

/* Alerts */
.alert-premium {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid transparent;
}

.alert-success-premium {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border-color: rgba(16, 185, 129, 0.2);
}

.alert-danger-premium {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.2);
}

/* Table styles for CRM */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.table-premium {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.table-premium th {
    padding: 1rem 1.25rem;
    color: var(--text-secondary);
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.85rem;
    text-transform: uppercase;
}

.table-premium td {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 0.95rem;
}

.table-premium tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Modal Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-smooth);
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-container {
    width: 90%;
    max-width: 550px;
    transform: translateY(20px);
    transition: var(--transition-smooth);
}

.modal-overlay.open .modal-container {
    transform: translateY(0);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

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

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