/* ============================================
   AutoLeads - Play Store Scraper
   Modern Dark Theme with Gradients
   ============================================ */

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a24;
    --bg-card-hover: #22222e;
    --accent-primary: #00d4aa;
    --accent-secondary: #00b894;
    --accent-gradient: linear-gradient(135deg, #00d4aa 0%, #00b894 100%);
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #6a6a7a;
    --border-color: #2a2a3a;
    --success: #00d4aa;
    --warning: #ffc107;
    --error: #ff4757;
    --star-color: #ffc107;
    --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);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

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

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background Pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(0, 212, 170, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(0, 184, 148, 0.06) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(0, 212, 170, 0.03) 0%, transparent 60%);
    pointer-events: none;
    z-index: -1;
}

/* Header */
.header {
    background: rgba(18, 18, 26, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
}

.logo i {
    font-size: 32px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.nav-tab {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.nav-tab.active {
    background: var(--accent-gradient);
    color: var(--bg-primary);
}

.nav-tab i {
    font-size: 16px;
}

/* Main Content */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 24px;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.section-header h1 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-header h1 i {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 16px;
}

/* Filters Card */
.filters-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-end;
    margin-bottom: 32px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 160px;
}

.filter-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-group select,
.filter-group input[type="text"],
.filter-group input[type="number"] {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-group select:hover,
.filter-group input[type="text"]:hover,
.filter-group input[type="number"]:hover {
    border-color: var(--accent-primary);
}

.filter-group select:focus,
.filter-group input[type="text"]:focus,
.filter-group input[type="number"]:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.2);
}

.filter-group input[type="number"] {
    cursor: text;
}

.filter-group input[type="number"]::-webkit-inner-spin-button,
.filter-group input[type="number"]::-webkit-outer-spin-button {
    opacity: 1;
    cursor: pointer;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    text-transform: none;
    font-size: 14px;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-primary);
    cursor: pointer;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent-gradient);
    color: var(--bg-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 212, 170, 0.3);
}

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

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

/* Search Box */
.search-box {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.search-box input {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 24px;
    color: var(--text-primary);
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.2);
}

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

/* Suggestions */
.suggestions-box {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.suggestion-chip {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.suggestion-chip:hover {
    background: var(--accent-gradient);
    color: var(--bg-primary);
    border-color: transparent;
}

/* Results Header */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 16px 20px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

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

.results-info span {
    color: var(--accent-primary);
    font-weight: 700;
}

.results-actions {
    display: flex;
    gap: 12px;
}

/* Apps Grid */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

/* App Card */
.app-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.app-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-primary);
}

.app-card:hover::before {
    opacity: 1;
}

.app-card-header {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.app-icon {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-md);
    object-fit: cover;
    flex-shrink: 0;
}

.app-info {
    flex: 1;
    min-width: 0;
}

.app-rank {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--accent-gradient);
    color: var(--bg-primary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.app-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-developer {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-rating {
    display: flex;
    align-items: center;
    gap: 6px;
}

.app-rating i {
    color: var(--star-color);
    font-size: 14px;
}

.app-rating span {
    font-size: 14px;
    font-weight: 600;
}

.app-card-body {
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
}

.app-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.app-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}

.app-meta-item i {
    color: var(--accent-primary);
}

.app-email {
    margin-top: 12px;
    padding: 10px 14px;
    background: rgba(0, 212, 170, 0.1);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.app-email i {
    color: var(--accent-primary);
}

.app-email a {
    color: var(--accent-primary);
    text-decoration: none;
    word-break: break-all;
}

.app-email a:hover {
    text-decoration: underline;
}

/* App Detail Card */
.app-detail-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
}

.app-detail-header {
    display: flex;
    gap: 24px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.app-detail-icon {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-lg);
    object-fit: cover;
}

.app-detail-info h2 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
}

.app-detail-developer {
    font-size: 16px;
    color: var(--accent-primary);
    margin-bottom: 12px;
}

.app-detail-stats {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

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

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

.app-detail-section {
    margin-bottom: 24px;
}

.app-detail-section h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.app-detail-section h3 i {
    color: var(--accent-primary);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.contact-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.contact-item i {
    width: 40px;
    height: 40px;
    background: rgba(0, 212, 170, 0.15);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    font-size: 18px;
}

.contact-item-content {
    flex: 1;
    min-width: 0;
}

.contact-item-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contact-item-value {
    font-size: 14px;
    color: var(--text-primary);
    word-break: break-all;
}

.contact-item-value a {
    color: var(--accent-primary);
    text-decoration: none;
}

.contact-item-value a:hover {
    text-decoration: underline;
}

/* Bulk Input */
.bulk-input-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
}

.bulk-input-card label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.bulk-input-card textarea {
    width: 100%;
    min-height: 200px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: 'Fira Code', monospace;
    line-height: 1.8;
    resize: vertical;
    margin-bottom: 16px;
}

.bulk-input-card textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
}

/* Progress Bar */
.bulk-progress {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 24px;
}

.progress-bar {
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease;
}

#progress-text {
    font-size: 14px;
    color: var(--text-secondary);
}

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

.bulk-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.bulk-table th,
.bulk-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.bulk-table th {
    background: var(--bg-secondary);
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

.bulk-table td {
    font-size: 14px;
}

.bulk-table tr:hover td {
    background: var(--bg-card-hover);
}

.bulk-table .email-cell {
    color: var(--accent-primary);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 24px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlide 0.3s ease;
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--bg-secondary);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: var(--text-primary);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1;
}

.modal-close:hover {
    background: var(--error);
}

.modal-body {
    padding: 32px;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 15, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    text-align: center;
}

.loading-spinner i {
    font-size: 48px;
    color: var(--accent-primary);
    margin-bottom: 16px;
}

.loading-spinner p {
    font-size: 18px;
    color: var(--text-secondary);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    box-shadow: var(--shadow-lg);
    animation: toastSlide 0.3s ease;
}

@keyframes toastSlide {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--error);
}

.toast i {
    font-size: 20px;
}

.toast.success i {
    color: var(--success);
}

.toast.error i {
    color: var(--error);
}

/* Screenshots */
.screenshots-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 12px;
}

.screenshot-img {
    height: 200px;
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 24px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 18px;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 16px;
    }

    .nav-tabs {
        width: 100%;
        justify-content: center;
    }

    .nav-tab {
        padding: 8px 12px;
        font-size: 12px;
    }

    .nav-tab span {
        display: none;
    }

    .section-header h1 {
        font-size: 24px;
    }

    .filters-card {
        flex-direction: column;
    }

    .filter-group {
        width: 100%;
    }

    .search-box {
        flex-direction: column;
    }

    .apps-grid {
        grid-template-columns: 1fr;
    }

    .results-header {
        flex-direction: column;
        gap: 16px;
    }

    .app-detail-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

/* ============================================
   Email Section Styles
   ============================================ */

.app-emails-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.app-email {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(0, 212, 170, 0.08);
    border-radius: 8px;
    margin-bottom: 6px;
    border: 1px solid rgba(0, 212, 170, 0.15);
}

.app-email:last-child {
    margin-bottom: 0;
}

.app-email.no-email {
    background: rgba(106, 106, 122, 0.1);
    border-color: rgba(106, 106, 122, 0.2);
}

.app-email .email-content {
    flex: 1;
    min-width: 0;
}

.app-email .email-label {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.app-email .email-link {
    display: block;
    color: var(--accent-primary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-email .email-link:hover {
    text-decoration: underline;
}

/* Email Highlight Section in Details */
.email-highlight-section {
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.1) 0%, rgba(0, 184, 148, 0.05) 100%);
    border: 1px solid rgba(0, 212, 170, 0.3);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 20px;
}

.email-highlight-section h3 {
    color: var(--accent-primary);
    margin-bottom: 16px;
}

.email-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.email-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.email-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.email-card.primary-email {
    border-color: var(--accent-primary);
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.12) 0%, rgba(0, 212, 170, 0.04) 100%);
}

.email-card.secondary-email {
    border-color: #ff6b6b;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.12) 0%, rgba(255, 107, 107, 0.04) 100%);
}

.email-card.no-email-card {
    background: rgba(106, 106, 122, 0.1);
    border-color: rgba(106, 106, 122, 0.3);
    justify-content: center;
    padding: 24px;
}

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

.primary-email .email-card-icon {
    background: rgba(0, 212, 170, 0.2);
    color: var(--accent-primary);
}

.secondary-email .email-card-icon {
    background: rgba(255, 107, 107, 0.2);
    color: #ff6b6b;
}

.email-card-content {
    flex: 1;
    min-width: 0;
}

.email-card-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.email-card-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    word-break: break-all;
}

.email-card-value:hover {
    color: var(--accent-primary);
}

.copy-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

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

/* Bulk Table Email Cells */
.bulk-table .email-cell {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--accent-primary);
}

/* Responsive Email Cards */
@media (max-width: 768px) {
    .email-cards-grid {
        grid-template-columns: 1fr;
    }

    .email-card {
        padding: 12px;
    }

    .email-card-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .email-card-value {
        font-size: 13px;
    }
}

/* ============================================
   Reviews Section Styles
   ============================================ */

.reviews-filters-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
}

.reviews-filters-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
}

.reviews-filters-row .filter-group {
    flex: 1;
    min-width: 160px;
}

.reviews-filters-row .filter-group input[type="text"] {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.reviews-filters-row .filter-group input[type="text"]:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.2);
}

.reviews-stats-bar {
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.1) 0%, rgba(0, 184, 148, 0.06) 100%);
    border: 1px solid rgba(0, 212, 170, 0.25);
    border-radius: var(--radius-lg);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 24px;
}

.reviews-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.reviews-stat i {
    color: var(--accent-primary);
    font-size: 16px;
}

.reviews-stat strong {
    color: var(--accent-primary);
    font-weight: 700;
    font-size: 16px;
}

.reviews-stat-actions {
    margin-left: auto;
    display: flex;
    gap: 10px;
}

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

.reviews-progress {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 24px;
    text-align: center;
}

.reviews-progress-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--accent-primary);
    font-size: 16px;
    font-weight: 600;
}

.reviews-progress-inner i {
    font-size: 24px;
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.review-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    transition: all 0.3s ease;
}

.review-card:hover {
    border-color: rgba(0, 212, 170, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.review-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.review-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.review-avatar-placeholder {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-primary);
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
}

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

.review-username {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.review-date {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.review-stars {
    display: flex;
    gap: 3px;
    flex-shrink: 0;
}

.review-stars i {
    font-size: 14px;
    color: var(--star-color);
}

.review-stars i.empty {
    color: var(--border-color);
}

.review-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    word-break: break-word;
}

.review-text mark {
    background: rgba(0, 212, 170, 0.3);
    color: var(--text-primary);
    padding: 1px 4px;
    border-radius: 3px;
}

.review-score-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.review-score-badge.score-5 {
    background: rgba(0, 200, 83, 0.2);
    color: #00c853;
}

.review-score-badge.score-4 {
    background: rgba(100, 221, 23, 0.2);
    color: #64dd17;
}

.review-score-badge.score-3 {
    background: rgba(255, 171, 0, 0.2);
    color: #ffab00;
}

.review-score-badge.score-2 {
    background: rgba(255, 109, 0, 0.2);
    color: #ff6d00;
}

.review-score-badge.score-1 {
    background: rgba(255, 23, 68, 0.2);
    color: #ff1744;
}

.reviews-empty {
    text-align: center;
    padding: 60px 24px;
    color: var(--text-muted);
}

.reviews-empty i {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
    display: block;
}

.reviews-empty p {
    font-size: 18px;
}

@media (max-width: 768px) {
    .reviews-filters-row {
        flex-direction: column;
    }

    .reviews-filters-row .filter-group {
        width: 100%;
    }

    .reviews-stats-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .reviews-stat-actions {
        margin-left: 0;
        width: 100%;
    }

    .review-card-header {
        flex-wrap: wrap;
    }
}

/* ============================================
   Logout Button
   ============================================ */
.btn-logout {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 12px;
    flex-shrink: 0;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.5);
    transform: translateY(-1px);
}

/* ============================================
   People Dashboard
   ============================================ */
.people-actions-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.people-search-box {
    position: relative;
    flex: 1;
    min-width: 200px;
    max-width: 400px;
}

.people-search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.people-search-box input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    transition: border-color 0.3s;
}

.people-search-box input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.15);
}

.people-action-buttons {
    display: flex;
    gap: 10px;
}

.people-stats-bar {
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.1) 0%, rgba(0, 184, 148, 0.06) 100%);
    border: 1px solid rgba(0, 212, 170, 0.2);
    border-radius: 12px;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 20px;
}

.people-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.people-stat i {
    color: var(--accent-primary);
}

.people-stat strong {
    color: var(--text-primary);
    font-size: 1.1rem;
}

.people-table-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    overflow-x: auto;
}

.people-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
}

.people-table thead {
    background: rgba(0, 212, 170, 0.08);
}

.people-table th {
    padding: 14px 16px;
    text-align: left;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.people-table td {
    padding: 12px 16px;
    font-size: 0.9rem;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(42, 47, 62, 0.5);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.people-table tbody tr {
    transition: background 0.2s;
}

.people-table tbody tr:hover {
    background: rgba(0, 212, 170, 0.04);
}

.people-table .actions-cell {
    display: flex;
    gap: 6px;
    white-space: nowrap;
}

.people-table .btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.people-table .btn-icon.edit {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
}

.people-table .btn-icon.edit:hover {
    background: rgba(99, 102, 241, 0.3);
}

.people-table .btn-icon.delete {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.people-table .btn-icon.delete:hover {
    background: rgba(239, 68, 68, 0.3);
}

.people-empty {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
}

.people-empty i {
    font-size: 2.5rem;
    margin-bottom: 12px;
    opacity: 0.5;
    color: var(--accent-primary);
}

.people-empty p {
    font-size: 0.95rem;
}

/* Person Modal */
.person-modal-content {
    max-width: 560px;
    width: 90%;
}

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

.modal-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-header h3 i {
    color: var(--accent-primary);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 0;
}

.form-row .form-group {
    flex: 1;
}

.person-modal-content .form-group {
    margin-bottom: 16px;
}

.person-modal-content .form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.person-modal-content .form-group input,
.person-modal-content .form-group textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    transition: border-color 0.3s;
}

.person-modal-content .form-group input:focus,
.person-modal-content .form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.15);
}

.person-modal-content .form-group textarea {
    resize: vertical;
    min-height: 80px;
}

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

/* Responsive People Dashboard */
@media (max-width: 768px) {
    .people-actions-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .people-search-box {
        max-width: none;
    }

    .people-action-buttons {
        justify-content: flex-end;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .btn-logout {
        padding: 6px 10px;
        font-size: 0.75rem;
    }
}