/* Qikleads CRM - Modern Design inspired by Linear, Stripe, Vercel */

:root {
    --primary: #10A9B1;
    --primary-dark: #0E9199;
    --primary-light: #E6F7F8;
    --success: #00D084;
    --danger: #F44336;
    --warning: #FF9800;
    --text-primary: #1A1A1A;
    --text-secondary: #6B7280;
    --text-tertiary: #9CA3AF;
    --bg-primary: #FFFFFF;
    --bg-secondary: #F9FAFB;
    --bg-tertiary: #F3F4F6;
    --border: #E5E7EB;
    --border-light: #F3F4F6;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 8px;
    --radius-lg: 12px;
    --transition: all 0.2s ease;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    color: var(--text-primary);
    background: var(--bg-secondary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }

p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.login-box {
    background: var(--bg-primary);
    padding: 48px;
    border-radius: 0;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 420px;
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

.login-logo p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

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

.form-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 1px solid var(--border);
    border-radius: 0;
    background: var(--bg-primary);
    transition: var(--transition);
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-input::placeholder {
    color: var(--text-tertiary);
}

/* Custom Select/Dropdown */
select.form-input,
select.custom-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 44px;
    cursor: pointer;
}

select.form-input:hover,
select.custom-select:hover {
    border-color: var(--primary);
}

select.form-input:focus,
select.custom-select:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%235E6AD2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 500;
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    font-family: inherit;
    gap: 8px;
}

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

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

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-secondary);
}

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

.btn-danger:hover {
    background: #d32f2f;
}

.btn-full {
    width: 100%;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

/* Dashboard Layout */
.dashboard {
    display: flex;
    min-height: 100vh;
    background: var(--bg-secondary);
}

/* Sidebar */
.sidebar {
    width: 240px;
    background: var(--bg-primary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border);
}

.sidebar-logo {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 15px;
    transition: var(--transition);
    gap: 12px;
    position: relative;
}

.nav-item:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 500;
}

.nav-icon {
    width: 20px;
    height: 20px;
    opacity: 0.6;
}

.nav-item.active .nav-icon {
    opacity: 1;
}

.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: var(--danger);
    color: white;
    border-radius: 0;
    font-size: 12px;
    font-weight: 600;
    margin-left: auto;
}

.nav-item.active .nav-badge {
    background: var(--primary);
}

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

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.user-details {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 12px;
    color: var(--text-tertiary);
    text-transform: capitalize;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 240px;
    padding: 32px;
    max-width: 1400px;
}

.page-header {
    margin-bottom: 32px;
}

.page-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.page-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
}

/* Cards */
.card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 0;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

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

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.card-actions {
    display: flex;
    gap: 8px;
}

/* Welcome Screen */
.welcome-screen {
    text-align: center;
    padding: 80px 20px;
}

.welcome-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 40px;
}

.welcome-screen h1 {
    font-size: 36px;
    margin-bottom: 16px;
}

.welcome-screen p {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 32px;
}

.welcome-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-top: 48px;
}

.feature-card {
    padding: 32px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 0;
    text-align: left;
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-light);
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    font-size: 24px;
}

.feature-card h3 {
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 14px;
}

/* Table */
.table-container {
    overflow-x: auto;
}

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

.table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}

.table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-light);
    font-size: 14px;
}

.table tbody tr:hover {
    background: var(--bg-secondary);
}

.table tbody tr[onclick] {
    cursor: pointer;
    transition: var(--transition);
}

.table tbody tr[onclick]:hover {
    background: var(--bg-secondary);
    transform: scale(1.002);
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 0;
}

.badge-primary {
    background: var(--primary-light);
    color: var(--primary);
}

.badge-success {
    background: #E7F9F0;
    color: #00D084;
}

.badge-danger {
    background: #FFEBEE;
    color: #F44336;
}

/* Alert */
.alert {
    padding: 14px 18px;
    border-radius: 0;
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-success {
    background: #E7F9F0;
    color: #00945E;
    border: 1px solid #B7F0D7;
}

.alert-error {
    background: #FFEBEE;
    color: #C62828;
    border: 1px solid #FFCDD2;
}

.alert-info {
    background: var(--primary-light);
    color: var(--primary-dark);
    border: 1px solid #C7D0FF;
}

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

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-primary);
    border-radius: 0;
    padding: 32px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    margin-bottom: 24px;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
}

.modal-footer {
    margin-top: 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* File Grid */
.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.file-item {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 0;
    padding: 16px;
    transition: var(--transition);
    cursor: pointer;
}

.file-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.file-icon {
    width: 48px;
    height: 48px;
    background: var(--bg-secondary);
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    font-size: 24px;
}

.file-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
    word-break: break-word;
}

.file-meta {
    font-size: 12px;
    color: var(--text-tertiary);
    display: flex;
    justify-content: space-between;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    width: 64px;
    height: 64px;
    background: var(--bg-tertiary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 32px;
    color: var(--text-tertiary);
}

.empty-state h3 {
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.empty-state p {
    color: var(--text-tertiary);
    font-size: 14px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 0;
    padding: 24px;
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Mobile Header */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    z-index: 900;
    align-items: center;
    padding: 0 16px;
    gap: 16px;
}

.mobile-menu-btn {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    border-radius: 4px;
    transition: var(--transition);
}

.mobile-menu-btn:hover {
    background: var(--bg-secondary);
}

.mobile-menu-btn svg {
    width: 24px;
    height: 24px;
}

.mobile-logo {
    flex: 1;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

.mobile-logo img {
    max-height: 32px;
    max-width: 120px;
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Responsive Styles */
@media (max-width: 768px) {
    /* Show mobile header */
    .mobile-header {
        display: flex;
    }
    
    /* Adjust sidebar for mobile */
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 999;
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    /* Adjust main content */
    .main-content {
        margin-left: 0;
        padding: 76px 16px 20px;
        width: 100%;
    }
    
    /* Typography adjustments */
    .page-title {
        font-size: 24px;
    }
    
    .page-subtitle {
        font-size: 14px;
    }
    
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }
    h3 { font-size: 1.125rem; }
    
    /* Login page */
    .login-box {
        padding: 32px 24px;
    }
    
    /* Cards */
    .card {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .card-actions {
        width: 100%;
    }
    
    .card-actions .btn {
        flex: 1;
    }
    
    /* Stats Grid */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    /* Tables */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table {
        min-width: 600px;
    }
    
    .table th,
    .table td {
        padding: 12px 8px;
        font-size: 13px;
    }
    
    /* Forms */
    .filters-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-actions {
        flex-direction: column;
    }
    
    .filter-actions .btn {
        width: 100%;
    }
    
    /* Modals */
    .modal-content {
        width: 95%;
        padding: 24px 16px;
        max-height: 85vh;
    }
    
    .modal-footer {
        flex-direction: column-reverse;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
    
    /* File Grid */
    .file-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }
    
    /* Welcome Features */
    .welcome-features {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    /* Info Grid */
    .info-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    /* Buttons */
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .btn-sm {
        padding: 8px 14px;
        font-size: 13px;
    }
    
    /* Pagination */
    .pagination {
        justify-content: center;
    }
    
    .pagination-btn,
    .pagination-number {
        padding: 8px 12px;
        font-size: 13px;
        min-width: 32px;
        height: 32px;
    }
    
    /* Tabs */
    .tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .tabs::-webkit-scrollbar {
        display: none;
    }
    
    .tab-item {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    /* Subscription Card */
    .subscription-card {
        padding: 24px 16px;
    }
    
    .subscription-price {
        font-size: 36px;
    }
    
    /* Notes */
    .note-item {
        padding: 12px;
    }
    
    .note-meta {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
    
    /* Data Sources */
    .data-source-header {
        flex-direction: column;
    }
    
    .data-source-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .data-source-actions .btn {
        width: 100%;
    }
}

/* Tablet Responsive */
@media (min-width: 769px) and (max-width: 1024px) {
    .main-content {
        padding: 24px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    .main-content {
        padding: 70px 12px 16px;
    }
    
    .page-title {
        font-size: 20px;
    }
    
    .card {
        padding: 12px;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .form-input {
        padding: 10px 14px;
        font-size: 14px;
    }
    
    .table th,
    .table td {
        padding: 10px 6px;
        font-size: 12px;
    }
    
    .badge {
        font-size: 11px;
        padding: 3px 8px;
    }
    
    .alert {
        padding: 12px 14px;
        font-size: 13px;
    }
}

/* Landscape Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .sidebar {
        overflow-y: auto;
    }
    
    .modal-content {
        max-height: 90vh;
        overflow-y: auto;
    }
}

/* Tabs */
.tabs {
    display: flex;
    gap: 8px;
    border-bottom: 2px solid var(--border);
    margin-bottom: 32px;
    overflow-x: auto;
}

.tab {
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    margin-bottom: -2px;
}

.tab:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Subscription Cards */
.subscription-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 32px;
    border-radius: 0;
    margin-bottom: 24px;
}

.subscription-card h3 {
    color: white;
    margin-bottom: 8px;
}

.subscription-card p {
    color: rgba(255, 255, 255, 0.9);
}

.subscription-price {
    font-size: 48px;
    font-weight: 700;
    margin: 16px 0;
}

.subscription-price span {
    font-size: 20px;
    font-weight: 400;
    opacity: 0.9;
}

.subscription-features {
    list-style: none;
    padding: 0;
    margin: 24px 0;
}

.subscription-features li {
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.subscription-features li::before {
    content: '✓';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    font-weight: 700;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.info-item {
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 0;
}

.info-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 24px 0 12px;
    flex-wrap: wrap;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 0;
    text-decoration: none;
    transition: var(--transition);
}

.pagination-btn:hover:not(.disabled) {
    background: var(--bg-secondary);
    border-color: var(--primary);
    color: var(--primary);
}

.pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 0;
    text-decoration: none;
    transition: var(--transition);
}

.pagination-number:hover:not(.active) {
    background: var(--bg-secondary);
    border-color: var(--primary);
    color: var(--primary);
}

.pagination-number.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.pagination-ellipsis {
    padding: 0 4px;
    color: var(--text-tertiary);
}

.pagination-info {
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

/* Filters */
.filters {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 0;
    padding: 20px;
    margin-bottom: 24px;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    align-items: end;
}

.filter-actions {
    display: flex;
    gap: 8px;
}

/* Custom Select Wrapper (if needed) */
.custom-select-wrapper {
    position: relative;
    display: block;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--border);
    margin-bottom: 24px;
    overflow-x: auto;
}

.tab-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: var(--transition);
    white-space: nowrap;
    position: relative;
}

.tab-item:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.tab-item.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: 0;
    font-size: 12px;
    font-weight: 600;
}

.tab-item.active .tab-badge {
    background: var(--primary-light);
    color: var(--primary);
}

.tab-item:hover .tab-badge {
    background: var(--border);
}

/* Notes */
.note-item {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 0;
    padding: 16px;
    margin-bottom: 16px;
    transition: var(--transition);
}

.note-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.note-content {
    margin-bottom: 12px;
}

.note-text {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-primary);
    white-space: pre-wrap;
}

.note-edit-area {
    width: 100%;
    min-height: 100px;
    resize: vertical;
}

.note-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-secondary);
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

.note-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
    border-radius: 0;
}

.btn-icon:hover {
    background: var(--bg-secondary);
    color: var(--primary);
}

/* Utilities */
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }

/* Data Sources */
.data-sources-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
}

.data-source-item {
    border: 1px solid var(--border);
    border-radius: 0;
    padding: 20px;
    transition: var(--transition);
}

.data-source-item:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.data-source-header {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.data-source-icon {
    width: 40px;
    height: 40px;
    border-radius: 0;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.data-source-content {
    flex: 1;
    min-width: 0;
}

.data-source-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.data-source-url {
    display: inline-flex;
    align-items: center;
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 8px;
    word-break: break-all;
}

.data-source-url:hover {
    text-decoration: underline;
}

.data-source-description {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin-top: 8px;
    margin-bottom: 8px;
}

.data-source-meta {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-top: 8px;
}

.data-source-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* Logout Confirmation Modal */
#logoutModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    background-color: rgba(0, 0, 0, 0.5);
}

#logoutModal .modal-content {
    max-width: 400px;
    text-align: center;
    background: white;
    padding: 32px;
    border: 1px solid var(--border);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 10001;
}

.logout-modal-content {
    max-width: 400px;
    text-align: center;
}

.logout-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: #fee;
    border: 2px solid #fcc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c33;
}

.logout-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.logout-message {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.6;
}

.logout-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* Blur effect for main content */
.blur-background {
    filter: blur(4px);
    transition: filter 0.3s ease;
}

/* Sidebar Section Labels */
.nav-section-label {
    padding: 16px 20px 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.nav-section-label:not(:first-child) {
    margin-top: 8px;
}
