:root {
    --bg-color: #0f111a;
    --panel-bg: rgba(25, 28, 41, 0.6);
    --panel-border: rgba(255, 255, 255, 0.08);
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --sidebar-width: 250px;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(239, 68, 68, 0.1), transparent 25%);
    background-attachment: fixed;
    min-height: 100vh;
}

/* Glassmorphism utility */
.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

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

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: rgba(15, 17, 26, 0.8);
    border-right: 1px solid var(--panel-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    backdrop-filter: blur(10px);
    z-index: 100;
    overflow-y: auto;
}

.sidebar-header {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--panel-border);
}

.sidebar-header .logo-icon {
    font-size: 28px;
    color: var(--primary);
}

.sidebar-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.sidebar-nav {
    flex: 1;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 500;
    cursor: pointer;
}

.nav-item i {
    font-size: 20px;
}

.nav-item:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
    color: var(--text-main);
    background: var(--primary);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

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

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
}

.top-header {
    height: 70px;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--panel-border);
    background: rgba(15, 17, 26, 0.6);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 50;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid var(--panel-border);
    width: 300px;
}

.search-bar input {
    background: transparent;
    border: none;
    color: var(--text-main);
    outline: none;
    width: 100%;
}

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

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

.notification-bell {
    position: relative;
    font-size: 22px;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
}

.notification-bell:hover {
    color: var(--text-main);
}

.notification-bell .badge {
    position: absolute;
    top: -2px;
    right: -4px;
    background: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: bold;
    height: 16px;
    width: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.avatar img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
}

.content-wrapper {
    padding: 32px;
}

/* Dashboard Specifics */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.dashboard-header h1 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.dashboard-header p {
    color: var(--text-muted);
}

.btn {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

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

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

.btn-icon {
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--panel-border);
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 6px 12px;
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

/* Metrics */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.metric-card {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.2s;
}

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

.metric-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.bg-primary-light { background: rgba(99, 102, 241, 0.15); color: var(--primary); }
.bg-danger-light { background: rgba(239, 68, 68, 0.15); color: var(--danger); }
.bg-success-light { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.bg-warning-light { background: rgba(245, 158, 11, 0.15); color: var(--warning); }

.metric-info h3 {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 4px;
}

.metric-value {
    font-size: 1.8rem;
    font-weight: 700;
}

/* Tables */
.table-container {
    padding: 24px;
}

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

.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 12px 16px;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--panel-border);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    font-size: 0.95rem;
}

.table-row:hover {
    background: rgba(255, 255, 255, 0.02);
}

.company-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.company-avatar {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
}

.company-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    max-width: 320px;
}

.company-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #f8fafc;
    cursor: pointer;
    transition: color 0.15s ease;
    word-break: break-word;
}

.company-name:hover {
    color: #60a5fa;
}

.company-website {
    font-size: 0.8rem;
    color: #94a3b8;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.15s ease;
    word-break: break-all;
}

.company-website:hover {
    color: #38bdf8;
    text-decoration: underline;
}

/* Contact Info items */
.contact-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.contact-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.15s ease;
    word-break: break-all;
}

.contact-item:hover {
    color: #ffffff;
    text-decoration: underline;
}

.contact-item.email i {
    color: #60a5fa;
    font-size: 1rem;
}

.contact-item.phone i {
    color: #34d399;
    font-size: 1rem;
}

/* Action buttons */
.action-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.btn-danger-outline {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.btn-danger-outline:hover {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
}

.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

.badge-success { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.badge-danger { background: rgba(239, 68, 68, 0.15); color: var(--danger); }
.badge-secondary { background: rgba(148, 163, 184, 0.15); color: var(--text-muted); }

.score-bar-container {
    width: 100px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin-bottom: 4px;
    overflow: hidden;
}

.score-bar {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b, #10b981);
    border-radius: 3px;
}

.score-value {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.empty-state {
    text-align: center;
    padding: 40px !important;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    width: 600px;
    max-width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 30px;
    position: relative;
    animation: modalFadeIn 0.3s ease;
}

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

.close-modal {
    color: var(--text-muted);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover {
    color: white;
}

.modal h2 {
    margin-bottom: 20px;
    color: var(--primary);
}

.modal-body {
    line-height: 1.6;
    color: var(--text-main);
}

.modal-body h3 {
    margin-top: 15px;
    margin-bottom: 8px;
    color: var(--primary-hover);
    font-size: 1.1rem;
}

.modal-body ul {
    padding-left: 20px;
    margin-bottom: 10px;
}

.modal-body li {
    margin-bottom: 4px;
}
