/* ProspectPort CRM Dashboard Styles */
:root {
    --cyber-yellow: #FFD700;
    --cyber-yellow-light: #FFEC8B;
    --cyber-yellow-dark: #CC9900;
    --electric-blue: #00D9FF;
    --hot-pink: #FF006E;
    --neon-green: #39FF14;
    --deep-purple: #6B00FF;
    --void-black: #0A0A0F;
    --dark-grey: #1A1A24;
    --mid-grey: #4A4A5A;
    --light-grey: #B8B8C8;
    --pure-white: #FFFFFF;
    --error-red: #FF4444;
    --success-green: #00C851;
}

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

html, body {
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
    background: var(--void-black);
    color: var(--pure-white);
}

/* Flex layout for footer positioning */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1 0 auto;
    padding: 120px 40px 60px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* Background */
#dotWaveBg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 16px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(180deg, rgba(10, 10, 15, 0.98) 0%, rgba(26, 26, 36, 0.95) 100%);
    backdrop-filter: blur(20px);
    z-index: 1000;
    border-bottom: 2px solid transparent;
    border-image: linear-gradient(90deg, var(--hot-pink), var(--cyber-yellow), var(--electric-blue), var(--hot-pink)) 1;
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { height: 48px; filter: drop-shadow(0 0 15px rgba(255, 0, 110, 0.5)); }
.brand span { font-family: 'Syncopate', sans-serif; font-size: 20px; font-weight: 700; color: var(--cyber-yellow); letter-spacing: 2px; }

.nav-right { display: flex; align-items: center; gap: 24px; }
.nav-links { display: flex; gap: 12px; align-items: center; }

.nav-link {
    color: var(--light-grey);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 50px;
    border: 2px solid transparent;
    background: linear-gradient(135deg, rgba(255, 0, 110, 0.1), rgba(0, 217, 255, 0.1));
    transition: all 0.4s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
}

.nav-link:hover {
    color: var(--pure-white);
    border-color: var(--hot-pink);
    box-shadow: 0 0 30px rgba(255, 0, 110, 0.5);
    transform: translateY(-3px);
}

.nav-link.active {
    color: var(--cyber-yellow);
    border-color: var(--cyber-yellow);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.admin-link { display: none; color: var(--void-black); font-size: 11px; font-weight: 700; padding: 12px 24px; border-radius: 50px; background: linear-gradient(135deg, #FF006E, #FFD700); text-transform: uppercase; text-decoration: none; }
.admin-link.visible { display: block; }

/* Profile Dropdown */
.profile-dropdown-container { position: relative; }
.profile-icon { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--electric-blue); background: linear-gradient(135deg, rgba(0, 217, 255, 0.1), rgba(255, 0, 110, 0.1)); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.profile-icon:hover { transform: scale(1.1); box-shadow: 0 0 20px rgba(0, 217, 255, 0.5); }
.profile-dropdown { position: absolute; top: calc(100% + 12px); right: 0; background: linear-gradient(135deg, rgba(26, 26, 36, 0.98) 0%, rgba(10, 10, 15, 0.99) 100%); border: 1px solid rgba(255, 215, 0, 0.2); border-radius: 12px; padding: 8px 0; min-width: 200px; opacity: 0; visibility: hidden; transform: translateY(-10px); transition: all 0.3s; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5); z-index: 1001; }
.profile-dropdown.active { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-header { padding: 12px 16px; border-bottom: 1px solid rgba(255, 215, 0, 0.1); }
.dropdown-header .user-name { font-weight: 600; color: var(--cyber-yellow); font-size: 14px; }
.dropdown-header .user-email { font-size: 12px; color: var(--light-grey); margin-top: 2px; }
.dropdown-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; color: var(--light-grey); text-decoration: none; font-size: 14px; transition: all 0.3s; border-left: 3px solid transparent; }
.dropdown-item:hover { background: linear-gradient(90deg, rgba(255, 215, 0, 0.1), transparent); color: var(--pure-white); border-left-color: var(--cyber-yellow); }
.dropdown-divider { height: 1px; background: rgba(255, 215, 0, 0.1); margin: 8px 0; }
.dropdown-item.logout { color: #FF4444; }

/* Loading State */
.loading-state { text-align: center; padding: 120px 20px; }
.spinner { width: 60px; height: 60px; border: 3px solid rgba(255, 215, 0, 0.2); border-top-color: var(--cyber-yellow); border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 30px; }
@keyframes spin { 100% { transform: rotate(360deg); } }

/* Dashboard */
#dashboardContent { display: none; }
.page-header { margin-bottom: 40px; text-align: center; }
.page-header h1 { font-family: 'Syncopate', sans-serif; font-size: clamp(28px, 5vw, 42px); color: var(--cyber-yellow); margin-bottom: 12px; letter-spacing: 4px; text-shadow: 0 0 40px rgba(255, 215, 0, 0.3); }
.page-header p { color: var(--light-grey); font-size: 18px; }

/* Stats Grid */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; margin-bottom: 40px; }
.stat-card { background: linear-gradient(135deg, rgba(26, 26, 36, 0.9) 0%, rgba(10, 10, 15, 0.95) 100%); border: 1px solid rgba(255, 215, 0, 0.15); border-radius: 16px; padding: 24px; position: relative; overflow: hidden; transition: all 0.4s; }
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--hot-pink), var(--cyber-yellow), var(--electric-blue)); }
.stat-card:hover { transform: translateY(-5px); border-color: rgba(255, 215, 0, 0.4); box-shadow: 0 20px 40px rgba(255, 215, 0, 0.15); }
.stat-label { font-family: 'Syncopate', sans-serif; font-size: 11px; color: var(--electric-blue); text-transform: uppercase; letter-spacing: 2px; margin-bottom: 12px; }
.stat-value { font-family: 'Syncopate', sans-serif; font-size: 36px; font-weight: 700; color: var(--cyber-yellow); text-shadow: 0 0 20px rgba(255, 215, 0, 0.5); }

/* Dashboard Grid */
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 24px; margin-bottom: 40px; }
.card { background: linear-gradient(135deg, rgba(26, 26, 36, 0.9) 0%, rgba(10, 10, 15, 0.95) 100%); border: 1px solid rgba(255, 215, 0, 0.15); border-radius: 16px; padding: 24px; transition: all 0.4s; }
.card:hover { border-color: rgba(255, 215, 0, 0.3); box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3); }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.card-title { font-family: 'Syncopate', sans-serif; font-size: 14px; color: var(--electric-blue); text-transform: uppercase; letter-spacing: 2px; }
.card-action { color: var(--cyber-yellow); text-decoration: none; font-size: 12px; font-weight: 600; }

/* Activity */
.activity-list { display: flex; flex-direction: column; gap: 12px; }
.activity-item { display: flex; gap: 12px; padding: 12px; background: rgba(255, 255, 255, 0.03); border-radius: 10px; border-left: 3px solid var(--electric-blue); transition: all 0.3s; }
.activity-item:hover { background: rgba(255, 255, 255, 0.06); transform: translateX(5px); }
.activity-icon { font-size: 20px; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: rgba(0, 217, 255, 0.1); border-radius: 10px; }
.activity-content { flex: 1; }
.activity-title { font-weight: 600; color: var(--pure-white); font-size: 14px; margin-bottom: 4px; }
.activity-desc { color: var(--light-grey); font-size: 12px; margin-bottom: 4px; }
.activity-time { color: var(--mid-grey); font-size: 11px; font-family: 'Space Mono', monospace; }

/* Follow-ups */
.follow-up-list { display: flex; flex-direction: column; gap: 10px; }
.follow-up-item { display: flex; justify-content: space-between; align-items: center; padding: 12px; background: rgba(255, 255, 255, 0.03); border-radius: 10px; border-left: 3px solid var(--hot-pink); transition: all 0.3s; }
.follow-up-item:hover { background: rgba(255, 255, 255, 0.06); }
.follow-up-company { font-weight: 600; color: var(--pure-white); font-size: 14px; }
.follow-up-contact { color: var(--light-grey); font-size: 12px; }
.follow-up-date { color: var(--cyber-yellow); font-size: 12px; font-weight: 600; font-family: 'Space Mono', monospace; }

/* Pipeline */
.pipeline-overview { display: flex; gap: 16px; height: 200px; align-items: flex-end; padding-bottom: 20px; }
.pipeline-bar-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.pipeline-bar { width: 100%; min-height: 20px; border-radius: 8px 8px 0 0; transition: all 0.4s; box-shadow: 0 0 20px currentColor; }
.pipeline-bar-info { text-align: center; }
.pipeline-bar-stage { font-size: 11px; color: var(--light-grey); text-transform: uppercase; letter-spacing: 1px; }
.pipeline-bar-count { font-size: 14px; font-weight: 600; color: var(--pure-white); }
.pipeline-bar-value { font-size: 11px; color: var(--cyber-yellow); font-family: 'Space Mono', monospace; }

/* Views */
.view-container { display: none; }
.view-container.active { display: block; }

/* Leads Controls */
.leads-controls { display: flex; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.search-box { flex: 1; min-width: 250px; position: relative; }
.search-box input { width: 100%; padding: 12px 16px 12px 44px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 215, 0, 0.2); border-radius: 12px; color: var(--pure-white); font-size: 14px; }
.search-box input:focus { outline: none; border-color: var(--cyber-yellow); box-shadow: 0 0 20px rgba(255, 215, 0, 0.2); }
.filter-select { padding: 12px 16px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 215, 0, 0.2); border-radius: 12px; color: var(--pure-white); font-size: 14px; min-width: 150px; }

/* Buttons */
.btn { padding: 12px 24px; border-radius: 12px; font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.3s; border: none; display: inline-flex; align-items: center; gap: 8px; }
.btn-primary { background: linear-gradient(135deg, var(--cyber-yellow), var(--cyber-yellow-dark)); color: var(--void-black); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(255, 215, 0, 0.4); }
.btn-secondary { background: rgba(255, 255, 255, 0.1); color: var(--pure-white); border: 1px solid rgba(255, 255, 255, 0.2); }

/* Table */
.leads-table-container { overflow-x: auto; background: rgba(26, 26, 36, 0.5); border-radius: 16px; border: 1px solid rgba(255, 215, 0, 0.1); }
.leads-table { width: 100%; border-collapse: collapse; }
.leads-table th, .leads-table td { padding: 16px; text-align: left; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.leads-table th { font-family: 'Syncopate', sans-serif; font-size: 11px; color: var(--electric-blue); text-transform: uppercase; letter-spacing: 1px; }
.leads-table tr:hover { background: rgba(255, 255, 255, 0.03); }
.lead-company { font-weight: 600; color: var(--pure-white); }
.lead-contact { font-size: 12px; color: var(--light-grey); }

/* Badges */
.status-badge { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.status-new { background: rgba(0, 217, 255, 0.2); color: var(--electric-blue); }
.status-contacted { background: rgba(255, 215, 0, 0.2); color: var(--cyber-yellow); }
.status-qualified { background: rgba(57, 255, 20, 0.2); color: var(--neon-green); }
.status-proposal { background: rgba(255, 0, 110, 0.2); color: var(--hot-pink); }
.status-negotiation { background: rgba(107, 0, 255, 0.2); color: var(--deep-purple); }
.status-closed_won { background: rgba(0, 200, 81, 0.2); color: var(--success-green); }
.status-closed_lost { background: rgba(255, 68, 68, 0.2); color: var(--error-red); }

.priority-badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.priority-high { background: var(--error-red); color: white; }
.priority-medium { background: var(--cyber-yellow); color: var(--void-black); }
.priority-low { background: var(--neon-green); color: var(--void-black); }

.action-buttons { display: flex; gap: 8px; }
.btn-icon { width: 32px; height: 32px; border-radius: 8px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.3s; }
.btn-icon:hover { background: rgba(255, 215, 0, 0.2); border-color: var(--cyber-yellow); transform: scale(1.1); }

/* Kanban */
.kanban-board { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; overflow-x: auto; padding-bottom: 20px; }
.kanban-column { background: rgba(26, 26, 36, 0.5); border-radius: 16px; padding: 16px; min-height: 400px; }
.kanban-header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 12px; border-bottom: 3px solid; margin-bottom: 16px; }
.kanban-title { font-weight: 600; color: var(--pure-white); font-size: 14px; }
.kanban-count { background: rgba(255, 255, 255, 0.1); padding: 2px 10px; border-radius: 12px; font-size: 12px; color: var(--light-grey); }
.kanban-cards { display: flex; flex-direction: column; gap: 12px; min-height: 300px; }
.kanban-card { background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px; padding: 16px; cursor: grab; transition: all 0.3s; }
.kanban-card:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3); border-color: rgba(255, 215, 0, 0.3); }
.kanban-card.dragging { opacity: 0.5; cursor: grabbing; }
.kanban-cards.drag-over { background: rgba(255, 215, 0, 0.05); border-radius: 8px; }
.kanban-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.kanban-card-value { font-family: 'Space Mono', monospace; color: var(--cyber-yellow); font-size: 12px; font-weight: 700; }
.kanban-card-company { font-weight: 600; color: var(--pure-white); margin-bottom: 4px; }
.kanban-card-contact { font-size: 12px; color: var(--light-grey); margin-bottom: 12px; }
.kanban-card-footer { display: flex; justify-content: space-between; align-items: center; }
.kanban-card-date { font-size: 11px; color: var(--mid-grey); font-family: 'Space Mono', monospace; }

/* Modals */
.modal { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(10, 10, 15, 0.95); z-index: 2000; justify-content: center; align-items: center; padding: 20px; }
.modal-content { background: linear-gradient(135deg, rgba(26, 26, 36, 0.98) 0%, rgba(10, 10, 15, 0.99) 100%); border: 1px solid rgba(255, 215, 0, 0.3); border-radius: 20px; padding: 32px; max-width: 600px; width: 100%; max-height: 90vh; overflow-y: auto; position: relative; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.modal-title { font-family: 'Syncopate', sans-serif; font-size: 20px; color: var(--cyber-yellow); }
.modal-close { background: none; border: none; color: var(--light-grey); font-size: 24px; cursor: pointer; padding: 0; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 8px; transition: all 0.3s; }
.modal-close:hover { background: rgba(255, 255, 255, 0.1); color: var(--pure-white); }

/* Form */
.form-group { margin-bottom: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-label { display: block; color: var(--light-grey); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; font-weight: 600; }
.form-input, .form-select, .form-textarea { width: 100%; padding: 12px 16px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 215, 0, 0.2); border-radius: 10px; color: var(--pure-white); font-size: 14px; transition: all 0.3s; }
.form-input:focus, .form-select:focus, .form-textarea:focus { outline: none; border-color: var(--cyber-yellow); box-shadow: 0 0 20px rgba(255, 215, 0, 0.2); }
.form-textarea { min-height: 100px; resize: vertical; }
.form-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 24px; }

/* Toast */
.toast { position: fixed; bottom: 24px; right: 24px; padding: 16px 24px; border-radius: 12px; color: white; font-weight: 600; transform: translateY(100px); opacity: 0; transition: all 0.3s; z-index: 3000; }
.toast.show { transform: translateY(0); opacity: 1; }
.toast-success { background: linear-gradient(135deg, var(--neon-green), #00a844); }
.toast-error { background: linear-gradient(135deg, var(--error-red), #cc0000); }

/* Empty States */
.empty-state { text-align: center; padding: 40px 20px; color: var(--light-grey); }
.empty-icon { font-size: 48px; margin-bottom: 16px; }
.empty-title { font-size: 18px; font-weight: 600; color: var(--pure-white); margin-bottom: 8px; }
.empty-subtitle { font-size: 14px; margin-bottom: 20px; }
.empty-table { text-align: center; padding: 60px 20px; }

/* Footer - FIXED AT BOTTOM */
footer {
    background: linear-gradient(180deg, rgba(26, 26, 36, 0.98) 0%, rgba(10, 10, 15, 0.99) 100%);
    border-top: 2px solid transparent;
    border-image: linear-gradient(90deg, var(--electric-blue), var(--hot-pink), var(--cyber-yellow), var(--hot-pink), var(--electric-blue)) 1;
    padding: 40px;
    flex-shrink: 0;
    margin-top: auto;
}

.footer-content { max-width: 1200px; margin: 0 auto; text-align: center; }
.footer-brand { font-family: 'Syncopate', sans-serif; font-size: 22px; background: linear-gradient(135deg, var(--hot-pink) 0%, var(--cyber-yellow) 50%, var(--electric-blue) 100%); background-size: 200% 200%; -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; letter-spacing: 3px; font-weight: 700; animation: brandGradient 4s ease infinite; margin-bottom: 12px; }
@keyframes brandGradient { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
.footer-bottom { max-width: 1200px; margin: 20px auto 0; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.1); text-align: center; color: var(--mid-grey); font-size: 13px; }

/* Mobile */
@media (max-width: 768px) {
    .site-header { padding: 16px 20px; }
    .brand img { height: 36px; }
    main { padding: 100px 20px 40px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .kanban-board { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
    .nav-links { display: none; }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0; }

/* Focus styles for keyboard navigation */
.nav-link:focus-visible, .btn:focus-visible, .btn-icon:focus-visible, .form-input:focus-visible, .dropdown-item:focus-visible { outline: 2px solid var(--cyber-yellow); outline-offset: 2px; }
