/* Global Core Stylesheet - Lead Management System */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-main: #0a0e17;
    --bg-glow: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.12) 0%, rgba(16, 185, 129, 0.03) 50%, transparent 100%);
    --bg-glass: rgba(255, 255, 255, 0.03);
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-glass-focus: rgba(99, 102, 241, 0.3);
    
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.4);
    
    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.3);
    --warning: #f59e0b;
    --warning-glow: rgba(245, 158, 11, 0.3);
    --danger: #ef4444;
    --danger-glow: rgba(239, 68, 68, 0.3);
    --info: #06b6d4;
    --info-glow: rgba(6, 182, 212, 0.3);
    
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-dark: #111827;
}

/* Reset and base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-main);
    background-image: var(--bg-glow);
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-size: cover;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

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

/* Header & Navigation */
header {
    background: rgba(10, 14, 23, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-glass);
    padding: 16px 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #a5b4fc 0%, #6366f1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-user-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

.nav-user-info {
    text-align: right;
}

.nav-user-name {
    font-size: 0.95rem;
    font-weight: 600;
}

.nav-user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-logout {
    padding: 8px 16px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 8px;
    color: #f87171;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-logout:hover {
    background: var(--danger);
    color: white;
    box-shadow: 0 0 12px var(--danger-glow);
}

/* Standard Layout Container */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
    flex: 1;
}

/* Glassmorphism Panel */
.glass-panel {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    padding: 24px;
    margin-bottom: 24px;
}

/* Glassmorphism Inputs */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-main);
}

.form-control, .form-select, textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.form-select option {
    background-color: var(--bg-main);
    color: var(--text-main);
}

/* Interactive Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    border: none;
    border-radius: 10px;
    color: white;
    padding: 12px 24px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px var(--primary-glow);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.6);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    border: none;
    border-radius: 10px;
    color: white;
    padding: 12px 24px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px var(--success-glow);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.6);
}

/* Small Buttons (Action bars) */
.btn-sm {
    padding: 8px 14px;
    font-size: 0.85rem;
    border-radius: 8px;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    border: 1px solid var(--border-glass);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: var(--bg-glass);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

.btn-call {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #34d399;
}
.btn-call:hover {
    background: var(--success);
    color: white;
    box-shadow: 0 0 10px var(--success-glow);
}

.btn-whatsapp {
    background: rgba(37, 211, 102, 0.1);
    border: 1px solid rgba(37, 211, 102, 0.2);
    color: #4ade80;
}
.btn-whatsapp:hover {
    background: #25d366;
    color: white;
    box-shadow: 0 0 10px rgba(37, 211, 102, 0.4);
}

.btn-interested {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
}
.btn-interested:hover {
    background: var(--primary);
    color: white;
    box-shadow: 0 0 10px var(--primary-glow);
}

/* Grid & Column layouts */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.two-col-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

@media (max-width: 992px) {
    .two-col-grid {
        grid-template-columns: 1fr;
    }
}

/* Stat Cards */
.stat-card-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.15);
}

.stat-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    filter: blur(40px);
    z-index: 0;
}

.stat-card.primary::after { background: var(--primary); }
.stat-card.success::after { background: var(--success); }
.stat-card.warning::after { background: var(--warning); }
.stat-card.danger::after { background: var(--danger); }

.stat-val {
    font-family: 'Outfit', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 4px;
    z-index: 1;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 1;
}

/* Tab Bar */
.tab-bar {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 12px;
    margin-bottom: 20px;
    overflow-x: auto;
}

.tab-btn {
    padding: 10px 18px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-muted);
    font-family: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-main);
}

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

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

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

table.glass-table th {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-glass);
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

table.glass-table td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    font-size: 0.95rem;
    color: var(--text-main);
    vertical-align: middle;
}

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

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-new { background: rgba(6, 182, 212, 0.12); color: #22d3ee; border: 1px solid rgba(6, 182, 212, 0.2); }
.badge-called { background: rgba(245, 158, 11, 0.12); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.2); }
.badge-interested { background: rgba(99, 102, 241, 0.12); color: #a5b4fc; border: 1px solid rgba(99, 102, 241, 0.2); }
.badge-solved { background: rgba(239, 68, 68, 0.12); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.2); }
.badge-completed { background: rgba(16, 185, 129, 0.12); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.2); }

/* Card components */
.card-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.detail-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    border-radius: 14px;
    padding: 16px;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
}

.detail-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.12);
}

/* Modal window styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

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

.modal-content {
    background: var(--bg-main);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    padding: 28px;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.open .modal-content {
    transform: scale(1);
}

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

.modal-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
}

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

.modal-close:hover {
    color: var(--text-main);
}

/* Attendance widget */
.attendance-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
}

.location-indicator {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Slide animation for Staff Carousel */
.slider-container {
    position: relative;
    width: 100%;
    height: 150px;
    overflow: hidden;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-glass);
}

.slider-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.slide-item {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 16px;
    gap: 16px;
    box-sizing: border-box;
}

.slide-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--success);
    box-shadow: 0 0 12px var(--success-glow);
}

.slide-info h4 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.slide-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.slide-time {
    font-size: 0.75rem;
    color: var(--success);
    margin-top: 4px;
    font-weight: 500;
}

/* TV screen style adaptations */
.tv-layout {
    max-width: 100%;
    padding: 16px;
    height: 100vh;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 20px;
    overflow: hidden;
}

.tv-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
    overflow: hidden;
}

.tv-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
    overflow: hidden;
}

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

.tv-header-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
}

.tv-scroll-panel {
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
}

.tv-project-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.tv-proj-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tv-proj-logo {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
}

.tv-proj-text h5 {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    margin-bottom: 2px;
}

.tv-proj-text p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Animations */
@keyframes pulse {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); opacity: 0.8; }
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    display: inline-block;
    box-shadow: 0 0 8px var(--success);
    animation: pulse 2s infinite ease-in-out;
}
