/* =============================================
   Analytics Dashboard - Main Stylesheet
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    /* Dark Theme (Default) */
    --bg-primary: #0f0f14;
    --bg-secondary: #1a1a24;
    --bg-card: #22222e;
    --bg-hover: #2a2a3a;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #6b6b7b;
    --border-color: #2d2d3d;
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --sidebar-width: 260px;
    --header-height: 70px;
    --transition: all 0.3s ease;
}

[data-theme="light"],
body[data-theme="light"] {
    --bg-primary: #f5f7fa;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-hover: #f0f2f5;
    --text-primary: #1a1a2e;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
}

html[data-theme="light"] body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    transition: var(--transition);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

/* =============================================
   Login Page
   ============================================= */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: var(--accent-gradient);
    border-radius: 50%;
    filter: blur(150px);
    opacity: 0.15;
    top: -200px;
    right: -200px;
}

.login-container::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: var(--accent-secondary);
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.1;
    bottom: -100px;
    left: -100px;
}

.login-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 48px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
}

.login-logo {
    text-align: center;
    margin-bottom: 40px;
}

.login-logo i {
    font-size: 48px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-logo h1 {
    font-size: 28px;
    font-weight: 700;
    margin-top: 16px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-logo p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 8px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.input-group {
    position: relative;
}

.input-group i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 18px;
    transition: var(--transition);
}

.input-group input {
    width: 100%;
    padding: 16px 16px 16px 50px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    color: var(--text-primary);
    transition: var(--transition);
}

.input-group input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.input-group input:focus + i,
.input-group input:focus ~ i {
    color: var(--accent-primary);
}

.input-group .toggle-password {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    left: auto;
    cursor: pointer;
    color: var(--text-muted);
}

.input-group .toggle-password:hover {
    color: var(--accent-primary);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-group input {
    display: none;
}

.checkbox-group .checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.checkbox-group input:checked + .checkmark {
    background: var(--accent-gradient);
    border-color: transparent;
}

.checkbox-group .checkmark i {
    font-size: 12px;
    color: white;
    opacity: 0;
    transition: var(--transition);
}

.checkbox-group input:checked + .checkmark i {
    opacity: 1;
}

.checkbox-group span {
    font-size: 14px;
    color: var(--text-secondary);
}

.forgot-link {
    font-size: 14px;
    color: var(--accent-primary);
    font-weight: 500;
    transition: var(--transition);
}

.forgot-link:hover {
    color: var(--accent-secondary);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 32px;
    border: none;
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    width: 100%;
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(99, 102, 241, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
}

.alert {
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 14px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--danger);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--success);
}

/* =============================================
   Dashboard Layout
   ============================================= */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    position: fixed;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    z-index: 100;
}

.sidebar.collapsed {
    width: 80px;
}

.sidebar-header {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-logo {
    width: 42px;
    height: 42px;
    background: var(--accent-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-logo i {
    font-size: 20px;
    color: white;
}

.sidebar-brand {
    overflow: hidden;
    white-space: nowrap;
}

.sidebar-brand h2 {
    font-size: 18px;
    font-weight: 700;
}

.sidebar-brand span {
    font-size: 12px;
    color: var(--text-muted);
}

.sidebar.collapsed .sidebar-brand {
    display: none;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 12px;
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 24px;
}

.nav-section-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0 12px;
    margin-bottom: 12px;
}

.sidebar.collapsed .nav-section-title {
    display: none;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
    transition: var(--transition);
    position: relative;
}

.nav-item i {
    font-size: 20px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.nav-item .badge {
    margin-left: auto;
    background: var(--danger);
    color: white;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 20px;
}

.sidebar.collapsed .nav-item span,
.sidebar.collapsed .nav-item .badge {
    display: none;
}

.sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 14px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

.user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-hover);
    border-radius: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
}

.user-info {
    overflow: hidden;
}

.user-info h4 {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-info span {
    font-size: 12px;
    color: var(--text-muted);
}

.sidebar.collapsed .user-info {
    display: none;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: var(--transition);
}

.sidebar.collapsed ~ .main-content {
    margin-left: 80px;
}

/* Header */
.header {
    height: var(--header-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.toggle-sidebar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--bg-hover);
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: var(--transition);
}

.toggle-sidebar:hover {
    background: var(--accent-primary);
    color: white;
}

.page-title h1 {
    font-size: 22px;
    font-weight: 600;
}

.page-title p {
    font-size: 13px;
    color: var(--text-muted);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-search {
    position: relative;
}

.header-search input {
    width: 280px;
    padding: 12px 16px 12px 44px;
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: var(--text-primary);
    transition: var(--transition);
}

.header-search input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.header-search i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-btn {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: var(--transition);
    position: relative;
}

.header-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.header-btn .notification-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
}

.theme-toggle {
    display: flex;
    align-items: center;
    background: var(--bg-hover);
    border-radius: 10px;
    padding: 4px;
    border: 1px solid var(--border-color);
}

.theme-toggle button {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: var(--transition);
}

.theme-toggle button.active {
    background: var(--accent-gradient);
    color: white;
}

/* Dashboard Content */
.dashboard-content {
    padding: 32px;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.stat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.stat-icon.purple {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-primary);
}

.stat-icon.green {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.stat-icon.blue {
    background: rgba(59, 130, 246, 0.15);
    color: var(--info);
}

.stat-icon.orange {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 500;
}

.stat-trend.up {
    color: var(--success);
}

.stat-trend.down {
    color: var(--danger);
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-title i {
    color: var(--accent-primary);
}

.card-body {
    padding: 24px;
}

.card-actions {
    display: flex;
    gap: 8px;
}

.card-btn {
    padding: 8px 16px;
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.card-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.card-btn.active {
    background: var(--accent-gradient);
    border-color: transparent;
    color: white;
}

/* Grid Layout */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.grid-3 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

/* Chart Container */
.chart-container {
    height: 300px;
    position: relative;
}

/* Table */
.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--bg-secondary);
}

.data-table td {
    font-size: 14px;
}

.data-table tbody tr {
    transition: var(--transition);
}

.data-table tbody tr:hover {
    background: var(--bg-hover);
}

.platform-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
}

.platform-badge.google {
    background: rgba(66, 133, 244, 0.15);
    color: #4285f4;
}

.platform-badge.meta {
    background: rgba(24, 119, 242, 0.15);
    color: #1877f2;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.active {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.status-badge.paused {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* Progress Bar */
.progress-bar {
    height: 8px;
    background: var(--bg-hover);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar .progress {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 10px;
    transition: width 0.5s ease;
}

/* Loading */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Stats Grid 4 columns */
.stats-grid-4 {
    grid-template-columns: repeat(4, 1fr);
    margin-top: 24px;
    margin-bottom: 24px;
}

/* Bio Links */
.bio-links-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bio-link-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    transition: var(--transition);
}

.bio-link-item:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.bio-link-item i {
    font-size: 18px;
    color: var(--accent-primary);
}

.bio-link-item span {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Page Header Card */
.page-header-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.page-header-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.page-header-icon {
    width: 56px;
    height: 56px;
    background: var(--accent-gradient);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.page-header-icon i {
    font-size: 28px;
    color: white;
}

.page-header-text h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
}

.page-header-text p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Competitors Grid V2 */
.competitors-grid-v2 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.competitor-card-v2 {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 24px;
    transition: var(--transition);
}

.competitor-card-v2:hover {
    border-color: var(--accent-primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Card Header */
.cc-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.cc-avatar {
    position: relative;
    flex-shrink: 0;
}

.cc-avatar img,
.cc-avatar-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border-color);
}

.cc-avatar-placeholder {
    background: var(--bg-hover);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cc-avatar-placeholder i {
    font-size: 28px;
    color: var(--text-muted);
}

.cc-verified {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 22px;
    height: 22px;
    background: var(--bg-card);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cc-verified i {
    font-size: 18px;
    color: #3b82f6;
}

.cc-info {
    flex: 1;
    min-width: 0;
}

.cc-info h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cc-username {
    font-size: 13px;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: var(--transition);
}

.cc-username:hover {
    color: var(--accent-primary);
}

.cc-username i {
    font-size: 12px;
}

.cc-status {
    flex-shrink: 0;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: block;
}

.status-indicator.active {
    background: var(--success);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.6);
}

.status-indicator.error {
    background: var(--danger);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.6);
}

.status-indicator.inactive {
    background: var(--text-muted);
}

/* Card Bio */
.cc-bio {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
    min-height: 42px;
}

.cc-bio-empty {
    color: var(--text-muted);
    font-style: italic;
}

/* Card Stats */
.cc-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 16px;
}

.cc-stat {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cc-stat-icon {
    width: 36px;
    height: 36px;
    background: var(--bg-hover);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cc-stat-icon i {
    font-size: 16px;
    color: var(--accent-primary);
}

.cc-stat-content {
    display: flex;
    flex-direction: column;
}

.cc-stat-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.cc-stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Card Footer */
.cc-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cc-sync {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.cc-actions {
    display: flex;
    gap: 8px;
}

.cc-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition);
}

.cc-btn:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.cc-btn-danger:hover {
    background: var(--danger);
    border-color: var(--danger);
}

/* Form Hints */
.form-hint {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
}

/* Competitors Grid */
.competitors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.competitor-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    transition: var(--transition);
}

.competitor-card:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-md);
}

.competitor-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.competitor-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--bg-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.competitor-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.competitor-avatar i {
    font-size: 24px;
    color: var(--text-muted);
}

.competitor-info {
    flex: 1;
    min-width: 0;
}

.competitor-info h4 {
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.competitor-username {
    font-size: 13px;
    color: var(--text-muted);
}

.verified-badge {
    color: #3b82f6;
    font-size: 16px;
}

.competitor-status {
    flex-shrink: 0;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: block;
}

.status-dot.active {
    background: var(--success);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.status-dot.error {
    background: var(--danger);
}

.status-dot.inactive {
    background: var(--text-muted);
}

.competitor-bio {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 16px;
}

.competitor-stats {
    display: flex;
    justify-content: space-between;
    padding: 16px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 16px;
}

.competitor-stats .stat-item {
    text-align: center;
}

.competitor-stats .stat-number {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.competitor-stats .stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.competitor-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sync-time {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.competitor-actions {
    display: flex;
    gap: 8px;
}

/* Profile Detail Page */
.competitor-detail {
    max-width: 1000px;
}

.profile-header-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
}

.profile-cover {
    height: 120px;
    background: var(--accent-gradient);
}

.profile-main {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    padding: 0 24px 24px;
    margin-top: -50px;
    flex-wrap: wrap;
}

.profile-avatar-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 4px solid var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.profile-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar-large i {
    font-size: 48px;
    color: var(--text-muted);
}

.profile-header-info {
    flex: 1;
    min-width: 200px;
    padding-top: 60px;
}

.profile-header-info h1 {
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.profile-username {
    display: block;
    font-size: 15px;
    color: var(--text-muted);
    margin-top: 4px;
}

.profile-bio {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-top: 12px;
}

.profile-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--accent-primary);
    margin-top: 8px;
}

.profile-link:hover {
    color: var(--accent-secondary);
}

.profile-header-actions {
    display: flex;
    gap: 10px;
    padding-top: 60px;
    flex-wrap: wrap;
}

/* Info List */
.info-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.info-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.info-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.info-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
    padding: 40px 20px;
}

.empty-icon {
    width: 120px;
    height: 120px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.empty-icon i {
    font-size: 48px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.empty-state h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.empty-state p {
    font-size: 15px;
    color: var(--text-secondary);
    max-width: 400px;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 8px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.btn-icon:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.btn-icon.danger:hover {
    border-color: var(--danger);
    color: var(--danger);
}

/* Links */
.link-primary {
    color: var(--accent-primary);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
}

.link-primary:hover {
    color: var(--accent-secondary);
}

.text-muted {
    color: var(--text-muted);
}

/* Form Enhancements */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group .required {
    color: var(--danger);
}

.select-group {
    position: relative;
}

.select-group select {
    width: 100%;
    padding: 16px;
    padding-right: 45px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    color: var(--text-primary);
    cursor: pointer;
    appearance: none;
    transition: var(--transition);
}

.select-group select:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.select-group i {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.btn-secondary {
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    border-color: var(--text-muted);
    color: var(--text-primary);
}

/* Responsive */
@media (max-width: 1400px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1200px) {
    .grid-3 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 992px) {
    :root {
        --sidebar-width: 280px;
    }
    
    .sidebar {
        transform: translateX(-100%);
        z-index: 1000;
        box-shadow: var(--shadow-lg);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0 !important;
        width: 100%;
    }
    
    .header-search {
        display: none;
    }
    
    .grid-2 {
        grid-template-columns: 1fr;
    }
    
    .sidebar-overlay.active {
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    .stats-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .stats-grid-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .header {
        padding: 0 16px;
        height: 60px;
    }
    
    .dashboard-content {
        padding: 16px;
    }
    
    .page-title h1 {
        font-size: 16px;
    }
    
    .page-title p {
        display: none;
    }
    
    .header-right {
        gap: 8px;
    }
    
    .header-btn {
        width: 38px;
        height: 38px;
    }
    
    .theme-toggle {
        padding: 3px;
    }
    
    .theme-toggle button {
        width: 32px;
        height: 32px;
    }
    
    .card {
        border-radius: 12px;
    }
    
    .card-header {
        padding: 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .card-body {
        padding: 16px;
    }
    
    .stat-card {
        padding: 20px;
        border-radius: 12px;
    }
    
    .stat-value {
        font-size: 24px;
    }
    
    .stat-icon {
        width: 42px;
        height: 42px;
        font-size: 18px;
    }
    
    .data-table th,
    .data-table td {
        padding: 12px 10px;
        font-size: 13px;
    }
    
    .table-container {
        margin: 0 -16px;
        padding: 0 16px;
    }
    
    .login-box {
        padding: 32px 24px;
        border-radius: 20px;
        margin: 16px;
    }
    
    .login-logo h1 {
        font-size: 22px;
    }
    
    .login-logo i {
        font-size: 40px;
    }
    
    .input-group input {
        padding: 14px 14px 14px 46px;
        font-size: 14px;
    }
    
    .btn {
        padding: 14px 24px;
        font-size: 14px;
    }
    
    .chart-container {
        height: 250px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
    }
    
    /* Competitors Responsive */
    .competitors-grid {
        grid-template-columns: 1fr;
    }
    
    .competitors-grid-v2 {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .competitor-card-v2 {
        padding: 20px;
    }
    
    .cc-avatar img,
    .cc-avatar-placeholder {
        width: 56px;
        height: 56px;
    }
    
    .cc-stats {
        gap: 8px;
    }
    
    .cc-stat-icon {
        display: none;
    }
    
    .cc-stat {
        text-align: center;
        justify-content: center;
    }
    
    .cc-stat-content {
        align-items: center;
    }
    
    .page-header-card {
        flex-direction: column;
        text-align: center;
    }
    
    .page-header-content {
        flex-direction: column;
    }
    
    .page-header-card .btn {
        width: 100%;
    }
    
    .profile-main {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 0 16px 20px;
    }
    
    .profile-avatar-large {
        margin-top: -60px;
    }
    
    .profile-header-info {
        padding-top: 16px;
    }
    
    .profile-header-info h1 {
        justify-content: center;
        font-size: 20px;
    }
    
    .profile-header-actions {
        padding-top: 16px;
        justify-content: center;
        width: 100%;
    }
    
    .profile-header-actions .btn {
        flex: 1;
    }
    
    .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

@media (max-width: 480px) {
    .header-actions {
        gap: 4px;
    }
    
    .header-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .theme-toggle button {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
    
    .toggle-sidebar {
        width: 36px;
        height: 36px;
    }
    
    .page-title h1 {
        font-size: 15px;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .stat-card {
        padding: 16px;
    }
    
    .stat-value {
        font-size: 22px;
    }
    
    .stat-label {
        font-size: 12px;
    }
    
    .card-title {
        font-size: 14px;
    }
    
    .login-box {
        padding: 28px 20px;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
}