/* ============================================
   GSC Monster Dashboard Styles
   Professional SAAS Dashboard Design
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Brand Colors - GSC Monster Palette */
    --primary-blue: #2196F3;
    --primary-cyan: #1ABC9C;
    --primary-green: #27AE60;
    --accent-yellow: #F1C40F;
    --accent-orange: #F39C12;
    --accent-red: #E74C3C;
    
    /* Gradient Combinations */
    --gradient-primary: linear-gradient(135deg, #2196F3 0%, #1ABC9C 100%);
    --gradient-success: linear-gradient(135deg, #27AE60 0%, #1ABC9C 100%);
    --gradient-warning: linear-gradient(135deg, #F39C12 0%, #F1C40F 100%);
    --gradient-error: linear-gradient(135deg, #E74C3C 0%, #F39C12 100%);
    --gradient-card: linear-gradient(135deg, rgba(33, 150, 243, 0.08) 0%, rgba(26, 188, 156, 0.08) 100%);
    --gradient-hero: linear-gradient(135deg, #2196F3 0%, #1ABC9C 50%, #27AE60 100%);
    
    /* Dark Tones */
    --dark-primary: #1A2332;
    --dark-secondary: #2C3E50;
    --dark-blue: #1557b0;
    
    /* Text Colors */
    --text-primary: #1A2332;
    --text-secondary: #5f6368;
    --text-light: #8A8A8A;
    
    /* Background Colors */
    --bg-page: #F0F2F5;
    --bg-white: #FFFFFF;
    --bg-light: #F8FAFB;
    --bg-cards: #FAFBFC;
    --bg-hover: rgba(33, 150, 243, 0.06);
    
    /* Border & Shadow */
    --border-light: #E3E6E8;
    --border-medium: #D1D5DA;
    --shadow-sm: 0 2px 8px rgba(26, 35, 50, 0.06);
    --shadow-md: 0 4px 16px rgba(26, 35, 50, 0.1);
    --shadow-lg: 0 8px 32px rgba(26, 35, 50, 0.14);
    --shadow-hover: 0 12px 40px rgba(33, 150, 243, 0.2);
    
    /* Transitions */
    --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-page);
    padding: 24px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

.header {
    background: var(--bg-white);
    padding: 24px 36px;
    border-radius: 16px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
}

.header-logo {
    padding: 0 30px;
    height: 80px;
    overflow: visible;
    display: flex;
    align-items: center;
}

.header-logo img {
    margin-top: 15px;
    margin-bottom: 0px;
    margin-left: -45px;
    margin-right: 0px;
    filter: drop-shadow(0 4px 12px rgba(33, 150, 243, 0.2));
    transition: var(--transition-smooth);
}

.header-logo img:hover {
    filter: drop-shadow(0 6px 16px rgba(33, 150, 243, 0.3));
    transform: scale(1.02);
}

.header h1 {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 28px;
    margin: 0;
    display: flex;
    align-items: center;
    height: 100%;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.header h1 img {
    display: block;
    object-fit: contain;
}

.accounts-section {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.account-badge {
    background: var(--bg-white);
    color: var(--primary-blue);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    border: 1.5px solid var(--border-light);
    transition: var(--transition-smooth);
    box-shadow: 0 1px 3px rgba(26, 35, 50, 0.05);
}

.account-badge:hover {
    border-color: var(--primary-cyan);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.15);
}

.account-badge .remove {
    cursor: pointer;
    font-weight: bold;
    transition: var(--transition-fast);
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 16px;
    opacity: 0.6;
}

.account-badge .remove:hover {
    transform: scale(1.2);
    background: rgba(231, 76, 60, 0.1);
    color: var(--accent-red);
    opacity: 1;
}

.add-account-btn {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 8px 18px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition-smooth);
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.2);
}

.add-account-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.add-account-btn:active {
    transform: translateY(0);
}

.controls {
    background: var(--bg-white);
    padding: 28px 36px;
    border-radius: 16px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
}

.control-group {
    margin-bottom: 24px;
}

.control-group:last-child {
    margin-bottom: 0;
}

.control-group label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.date-controls {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.quick-date-btn {
    padding: 10px 20px;
    border: 2px solid var(--border-light);
    background: var(--bg-white);
    color: var(--text-secondary);
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.quick-date-btn:hover {
    background: var(--bg-hover);
    border-color: var(--primary-cyan);
    color: var(--primary-blue);
    transform: translateY(-2px);
}

.quick-date-btn.active {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.date-separator {
    width: 2px;
    height: 28px;
    background: var(--border-light);
    margin: 0 8px;
    border-radius: 2px;
}

.refresh-btn {
    padding: 10px 14px;
    border: 2px solid var(--border-light);
    background: var(--bg-white);
    color: var(--primary-blue);
    border-radius: 10px;
    cursor: pointer;
    font-size: 18px;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    font-weight: bold;
}

.refresh-btn:hover {
    background: var(--gradient-card);
    border-color: var(--primary-cyan);
    transform: rotate(90deg) scale(1.05);
}

.refresh-btn:active {
    background: var(--bg-hover);
    transform: rotate(180deg) scale(0.95);
}

.date-inputs {
    display: flex;
    gap: 12px;
    align-items: center;
}

.date-inputs input {
    padding: 10px 16px;
    border: 2px solid var(--border-light);
    border-radius: 10px;
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
    transition: var(--transition-fast);
}

.date-inputs input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.metrics-toggle {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    padding: 20px 24px;
    background: var(--gradient-card);
    border-radius: 12px;
    border: 1px solid rgba(33, 150, 243, 0.1);
}

.metric-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    transition: var(--transition-fast);
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 6px;
}

.metric-checkbox:hover {
    background: rgba(33, 150, 243, 0.08);
}

.metric-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary-blue);
}

.metric-checkbox.active {
    color: var(--primary-blue);
    font-weight: 700;
}

.stats-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-white);
    padding: 24px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition-smooth);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card h3 {
    color: var(--text-secondary);
    font-size: 11px;
    margin-bottom: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.stat-card .value {
    font-size: 32px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
}

.unified-stats {
    display: flex;
    background: var(--bg-white);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    margin-bottom: 24px;
    border: 1px solid var(--border-light);
}

.unified-stats-section {
    display: flex;
    width: 50%;
    padding: 28px;
}

.unified-stats-gsc {
    background: linear-gradient(135deg, #FFFFFF 0%, #F8FAFB 100%);
    border-right: 2px solid var(--border-light);
}

.unified-stats-ahrefs {
    background: linear-gradient(135deg, #E8F4FD 0%, #F0F8FF 100%);
}

.unified-stat {
    flex: 1;
    text-align: center;
    padding: 0 16px;
}

.unified-stat h3 {
    color: var(--text-secondary);
    font-size: 11px;
    margin-bottom: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.unified-stat .value {
    font-size: 28px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.unified-stat .stat-comparison {
    font-size: 12px;
    margin-top: 6px;
    font-weight: 600;
}

.stat-card.ahrefs {
    background: linear-gradient(135deg, #F8FAFB 0%, #FFFFFF 100%);
    border: 2px solid var(--border-light);
}

.stat-card.ahrefs h3 {
    color: var(--primary-blue);
    font-size: 15px;
    margin-bottom: 16px;
    font-weight: 700;
}

.ahrefs-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.ahrefs-metric {
    display: flex;
    flex-direction: column;
    padding: 12px;
    background: var(--bg-white);
    border-radius: 10px;
    border: 1px solid var(--border-light);
    transition: var(--transition-smooth);
}

.ahrefs-metric:hover {
    border-color: var(--primary-cyan);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.ahrefs-label {
    font-size: 10px;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.8px;
    margin-bottom: 6px;
}

.ahrefs-value {
    font-size: 22px;
    font-weight: 800;
    background: var(--gradient-success);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ahrefs-updated {
    text-align: center;
    font-style: italic;
    color: var(--text-light);
    font-size: 12px;
}

.sites-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

.site-card {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
    position: relative;
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.site-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition-smooth);
}

.site-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: transparent;
}

.site-card:hover::before {
    opacity: 1;
}

.site-card.favorited {
    border: 2px solid var(--accent-yellow);
    box-shadow: 0 4px 16px rgba(241, 196, 15, 0.25);
}

.site-card.favorited::before {
    display: none;
}

.favorite-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    font-size: 22px;
    cursor: pointer;
    padding: 8px;
    line-height: 1;
    transition: var(--transition-smooth);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.favorite-btn:hover {
    transform: scale(1.2) rotate(10deg);
    background: rgba(241, 196, 15, 0.15);
}

.favorite-btn.active {
    color: var(--accent-yellow);
    background: rgba(241, 196, 15, 0.2);
}

.site-card-header {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding-right: 50px;
}

.site-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    border-radius: 6px;
    box-shadow: var(--shadow-sm);
}

.site-card-header h3 {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 700;
    word-break: break-word;
    flex: 1;
    line-height: 1.4;
}

.dr-badge {
    display: inline-block;
    padding: 4px 10px;
    margin-left: 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    vertical-align: middle;
    cursor: help;
    transition: var(--transition-smooth);
    letter-spacing: 0.5px;
}

.dr-badge:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: var(--shadow-md);
}

.dr-badge.dr-success {
    background: var(--gradient-success);
    color: white;
    border: 1px solid rgba(39, 174, 96, 0.3);
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.25);
}

.dr-badge.dr-checking {
    background: var(--gradient-primary);
    color: white;
    border: 1px solid rgba(33, 150, 243, 0.3);
    animation: pulse 1.5s ease-in-out infinite;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.25);
}

@keyframes pulse {
    0%, 100% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.85;
        transform: scale(0.98);
    }
}

.dr-badge.dr-pending {
    background: var(--gradient-warning);
    color: white;
    border: 1px solid rgba(243, 156, 18, 0.3);
    box-shadow: 0 2px 8px rgba(243, 156, 18, 0.25);
}

.dr-badge.dr-error {
    background: var(--gradient-error);
    color: white;
    border: 1px solid rgba(231, 76, 60, 0.3);
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.25);
}

.site-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.site-stat {
    flex: 1;
}

.site-stat .label {
    color: var(--text-secondary);
    font-size: 11px;
    margin-bottom: 6px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.site-stat .value {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 20px;
}

.site-chart-container {
    height: 120px;
    position: relative;
    margin-top: 20px;
    border-radius: 8px;
    overflow: hidden;
}

.loading {
    text-align: center;
    padding: 60px;
    color: var(--text-secondary);
    font-weight: 500;
}

.no-data {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-secondary);
}

.no-data-icon {
    font-size: 56px;
    margin-bottom: 24px;
    opacity: 0.4;
    filter: grayscale(1);
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: var(--bg-white);
    border: 2px solid var(--border-light);
    border-radius: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition-smooth);
    margin-bottom: 24px;
}

.back-btn:hover {
    background: var(--gradient-card);
    border-color: var(--primary-cyan);
    color: var(--primary-blue);
    transform: translateX(-4px);
}

.site-header {
    background: var(--bg-white);
    padding: 36px;
    border-radius: 16px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.site-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
}

.site-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.site-header h1 {
    color: var(--text-primary);
    font-size: 32px;
    margin-bottom: 12px;
    word-break: break-word;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.site-header h1 a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
    background: linear-gradient(to right, var(--primary-blue), var(--primary-cyan));
    background-size: 0% 2px;
    background-repeat: no-repeat;
    background-position: left bottom;
}

.site-header h1 a:hover {
    background-size: 100% 2px;
}

.site-header .period {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
}

.action-buttons {
    display: flex;
    gap: 12px;
}

.action-btn {
    padding: 12px 24px;
    border: 2px solid var(--primary-blue);
    background: var(--bg-white);
    color: var(--primary-blue);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    text-decoration: none;
}

.action-btn:hover {
    background: var(--gradient-card);
    border-color: var(--primary-cyan);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.action-btn.primary {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.4);
}

.period-comparison {
    background: var(--gradient-card);
    padding: 20px 28px;
    border-radius: 12px;
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(33, 150, 243, 0.15);
}

.period-comparison label {
    font-size: 14px;
    color: var(--text-primary);
    margin-right: 12px;
    font-weight: 600;
}

.period-comparison input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary-blue);
}

.comparison-dates {
    display: flex;
    gap: 12px;
    align-items: center;
}

.stat-card.comparison {
    position: relative;
}

.stat-comparison {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
    font-size: 14px;
    font-weight: 600;
}

.stat-comparison .arrow {
    font-size: 20px;
}

.stat-comparison.positive {
    color: var(--primary-green);
}

.stat-comparison.negative {
    color: var(--accent-red);
}

.data-tables {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 24px;
}

.data-table-card {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 28px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
}

.data-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.data-table-card h3 {
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.export-btn {
    padding: 8px 16px;
    border: 2px solid var(--border-light);
    background: var(--bg-white);
    color: var(--text-secondary);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.export-btn:hover {
    background: var(--gradient-card);
    border-color: var(--primary-cyan);
    color: var(--primary-blue);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: var(--gradient-card);
}

.data-table th {
    text-align: left;
    padding: 14px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    cursor: pointer;
    user-select: none;
    letter-spacing: 0.5px;
    transition: var(--transition-fast);
}

.data-table th:hover {
    background: rgba(33, 150, 243, 0.12);
}

.data-table td {
    padding: 14px;
    border-bottom: 1px solid var(--border-light);
    font-size: 14px;
    color: var(--text-primary);
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr {
    transition: var(--transition-fast);
}

.data-table tbody tr:hover {
    background: var(--bg-hover);
}

.metric-value {
    font-weight: 600;
}

.position-change {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
}

.position-change.up {
    background: linear-gradient(135deg, #E6F4EA 0%, #D4EDDA 100%);
    color: var(--primary-green);
}

.position-change.down {
    background: linear-gradient(135deg, #FCE8E6 0%, #F8D7DA 100%);
    color: var(--accent-red);
}

.position-change.neutral {
    background: var(--bg-light);
    color: var(--text-secondary);
}

.ctr-anomaly {
    background: linear-gradient(135deg, #FFF3CD 0%, #FFF8DC 100%);
    border-left: 3px solid var(--accent-yellow);
}

.chart-card {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 32px;
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
    position: relative;
    border: 1px solid var(--border-light);
}

.chart-card h3 {
    color: var(--text-primary);
    font-size: 20px;
    margin-bottom: 24px;
    font-weight: 700;
}

.chart-container-large {
    height: 300px;
    position: relative;
}

.analytics-card {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 28px;
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
    border: 1px solid var(--border-light);
}

.analytics-card h3 {
    color: var(--text-primary);
    font-size: 20px;
    margin-bottom: 20px;
    font-weight: 700;
}

.integration-placeholder {
    background: var(--gradient-card);
    border: 2px dashed var(--primary-cyan);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    color: var(--text-secondary);
}

.integration-placeholder h4 {
    font-size: 18px;
    margin-bottom: 12px;
    color: var(--text-primary);
    font-weight: 700;
}

.integration-placeholder p {
    font-size: 14px;
    margin-bottom: 20px;
}

.show-more-container {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid var(--border-light);
}

.show-more-btn {
    padding: 10px 24px;
    border: 2px solid var(--primary-blue);
    background: var(--bg-white);
    color: var(--primary-blue);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    margin: 0 6px;
}

.show-more-btn:hover {
    background: var(--gradient-card);
    border-color: var(--primary-cyan);
    transform: translateY(-2px);
}

.fi {
    width: 20px;
    height: 15px;
    display: inline-block;
    margin-right: 10px;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-top: 1px solid var(--border-light);
    background: var(--bg-light);
    border-radius: 0 0 12px 12px;
}

.table-summary {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 600;
}

.rows-per-page {
    padding: 8px 16px;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    background: var(--bg-white);
    font-weight: 600;
    transition: var(--transition-fast);
}

.rows-per-page:hover {
    border-color: var(--primary-blue);
}

@media (max-width: 1200px) {
    .data-tables {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1400px) {
    .sites-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .sites-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .container {
        padding: 0;
    }
}

@media (max-width: 600px) {
    .stats-cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    body {
        padding: 0;
    }
    
    .header {
        padding: 16px 20px;
        border-radius: 0;
        margin-bottom: 20px;
    }
    
    .header h1 {
        font-size: 22px;
    }
    
    .accounts-section {
        padding: 0;
        overflow: hidden;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    #googleAccounts {
        display: flex;
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }
    
    .account-badge {
        font-size: 12px;
        padding: 8px 12px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        box-sizing: border-box;
        min-height: 40px;
        gap: 8px;
    }
    
    .account-badge > span:first-child {
        flex: 1;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        min-width: 0;
    }
    
    .account-badge .remove {
        font-size: 18px;
        width: 28px;
        height: 28px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        margin: 0;
    }
    
    .add-account-btn {
        padding: 10px;
        font-size: 13px;
        width: 100%;
        box-sizing: border-box;
        margin-top: 6px;
        min-height: 40px;
    }
    
    .controls {
        padding: 20px;
        border-radius: 0;
        margin-bottom: 20px;
    }
    
    .date-controls {
        flex-direction: column;
        gap: 12px;
    }
    
    .date-inputs {
        flex-direction: column;
        width: 100%;
    }
    
    .date-inputs input {
        width: 100%;
    }
    
    .quick-date-btn {
        font-size: 12px;
        padding: 10px 16px;
        flex: 1;
        min-width: 75px;
    }
    
    .metrics-toggle {
        padding: 16px 20px;
        gap: 10px;
    }
    
    .metric-checkbox {
        font-size: 13px;
    }
    
    .stats-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 0 20px;
    }
    
    .stat-card {
        padding: 18px;
    }
    
    .stat-card h3 {
        font-size: 11px;
    }
    
    .stat-card .value {
        font-size: 24px;
    }
    
    .sites-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 20px;
    }
    
    .site-card {
        padding: 20px;
    }
    
    .site-card-header h3 {
        font-size: 15px;
    }
    
    .favorite-btn {
        font-size: 20px;
        width: 36px;
        height: 36px;
        top: 16px;
        right: 16px;
    }
    
    .site-stats-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
    
    .site-stat .label {
        font-size: 10px;
    }
    
    .site-stat .value {
        font-size: 18px;
    }
    
    .site-chart-container {
        height: 150px;
        margin-top: 16px;
    }
    
    .no-data {
        padding: 40px 20px;
    }
    
    .no-data-icon {
        font-size: 44px;
    }
    
    .no-data p {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 14px 16px;
    }
    
    .header h1 {
        font-size: 20px;
    }
    
    .account-badge {
        font-size: 12px;
        padding: 7px 10px;
    }
    
    .add-account-btn {
        font-size: 12px;
        padding: 9px;
    }
    
    .stats-cards {
        grid-template-columns: 1fr;
        padding: 0 16px;
    }
    
    .stat-card .value {
        font-size: 28px;
    }
    
    .sites-grid {
        padding: 0 16px;
    }
    
    .site-stats-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .quick-date-btn {
        font-size: 11px;
        padding: 8px 12px;
        min-width: 65px;
    }
}

@media (max-width: 768px) and (orientation: landscape) {
    .stats-cards {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .sites-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (hover: none) and (pointer: coarse) {
    .site-card {
        cursor: pointer;
        -webkit-tap-highlight-color: rgba(33, 150, 243, 0.1);
    }
    
    .site-card:active {
        transform: scale(0.98);
        transition: transform 0.1s;
    }
    
    .favorite-btn:active,
    .add-account-btn:active,
    .quick-date-btn:active,
    .metric-checkbox:active {
        transform: scale(0.95);
        transition: transform 0.1s;
    }
    
    .favorite-btn,
    .account-badge .remove {
        min-width: 44px;
        min-height: 44px;
    }
}

.bulk-checker-card,
.bulk-history-card {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 28px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
}

.bulk-checker-card h2,
.bulk-history-card h2 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 24px;
    color: var(--text-primary);
    font-weight: 800;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 13px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-light);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition-fast);
    font-weight: 500;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.form-control[readonly] {
    background: var(--bg-light);
    cursor: not-allowed;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.bulk-textarea {
    font-family: 'Courier New', monospace;
    resize: vertical;
    min-height: 300px;
}

.url-counter {
    text-align: right;
    margin-top: 10px;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 600;
}

.btn-large {
    padding: 14px 36px;
    font-size: 16px;
    font-weight: 600;
}

.card-header-with-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.btn-small {
    padding: 8px 20px;
    font-size: 13px;
}

.progress-bar-container {
    position: relative;
    width: 100%;
    height: 28px;
    background: var(--bg-light);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

.progress-bar-fill {
    height: 100%;
    background: var(--gradient-success);
    transition: width 0.3s ease;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.3);
}

.progress-bar-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
}

.badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    letter-spacing: 0.3px;
}

.badge-success {
    background: linear-gradient(135deg, #E6F4EA 0%, #D4EDDA 100%);
    color: var(--primary-green);
}

.badge-warning {
    background: linear-gradient(135deg, #FEF7E0 0%, #FFF3CD 100%);
    color: var(--accent-orange);
}

.badge-info {
    background: linear-gradient(135deg, #E8F4FD 0%, #D1E7FD 100%);
    color: var(--primary-blue);
}

.badge-error {
    background: linear-gradient(135deg, #FCE8E6 0%, #F8D7DA 100%);
    color: var(--accent-red);
}

.btn-download {
    background: var(--gradient-success);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.25);
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.35);
}

.btn-download:active {
    transform: scale(0.98);
}

.navigation-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 28px;
    border-bottom: 2px solid var(--border-light);
}

.nav-tab {
    padding: 14px 28px;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 600;
    border-bottom: 3px solid transparent;
    transition: var(--transition-smooth);
    font-size: 15px;
}

.nav-tab:hover {
    color: var(--primary-blue);
    background: var(--gradient-card);
    border-radius: 8px 8px 0 0;
}

.nav-tab.active {
    color: var(--primary-blue);
    border-bottom-color: var(--primary-blue);
}

.note-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 35, 50, 0.7);
    backdrop-filter: blur(4px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.note-modal-content {
    background: var(--bg-white);
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 20px 60px rgba(26, 35, 50, 0.3);
    animation: modalSlideIn 0.3s ease-out;
    overflow: hidden;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.note-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    border-bottom: 2px solid var(--border-light);
    background: var(--gradient-card);
}

.note-modal-header h3 {
    margin: 0;
    font-size: 22px;
    color: var(--text-primary);
    font-weight: 800;
}

.note-modal-close {
    background: rgba(231, 76, 60, 0.1);
    border: none;
    font-size: 28px;
    color: var(--accent-red);
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition-smooth);
    font-weight: bold;
}

.note-modal-close:hover {
    background: var(--accent-red);
    color: white;
    transform: rotate(90deg);
}

.note-modal-body {
    padding: 28px;
}

.note-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 14px;
    padding: 20px 28px;
    border-top: 2px solid var(--border-light);
    background: var(--bg-light);
}

.btn-primary,
.btn-secondary {
    padding: 12px 28px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.4);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-secondary);
    border: 2px solid var(--border-medium);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--primary-cyan);
}

.notes-popup {
    position: fixed;
    background: var(--bg-white);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    z-index: 9998;
    min-width: 320px;
    max-width: 440px;
    max-height: 540px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: popupFadeIn 0.2s ease-out;
    border: 1px solid var(--border-light);
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.notes-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--gradient-card);
    border-bottom: 2px solid var(--border-light);
    font-weight: 700;
    color: var(--text-primary);
    font-size: 15px;
}

.notes-popup-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition-smooth);
}

.notes-popup-close:hover {
    background: rgba(231, 76, 60, 0.1);
    color: var(--accent-red);
    transform: rotate(90deg);
}

.notes-popup-list {
    overflow-y: auto;
    max-height: 480px;
}

.note-item {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition-fast);
}

.note-item:last-child {
    border-bottom: none;
}

.note-item:hover {
    background: var(--gradient-card);
}

.note-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.note-type-badge {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 12px;
    background: var(--gradient-primary);
    color: white;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.note-item-actions {
    display: flex;
    gap: 6px;
}

.note-item-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: var(--transition-smooth);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.note-item-btn:hover {
    background: rgba(33, 150, 243, 0.1);
    transform: scale(1.1);
}

.note-item-content {
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin-bottom: 8px;
    font-weight: 500;
}

.note-item-preview {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.note-item-time {
    font-size: 12px;
    color: var(--text-light);
    font-weight: 600;
}

.tabs-container {
    display: flex;
    gap: 0;
    margin: 28px 0 0 0;
    border-bottom: 2px solid var(--border-light);
}

.tab-btn {
    padding: 14px 28px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
    bottom: -2px;
}

.tab-btn:hover {
    color: var(--primary-blue);
    background: var(--gradient-card);
}

.tab-btn.active {
    color: var(--primary-blue);
    border-bottom-color: var(--primary-blue);
}

.backlinks-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.backlinks-header h3 {
    margin: 0;
    font-weight: 700;
}

.backlinks-count {
    font-size: 14px;
    color: var(--text-secondary);
    padding: 6px 14px;
    background: var(--gradient-card);
    border-radius: 14px;
    font-weight: 700;
}

.backlinks-table {
    width: 100%;
}

.backlinks-table thead th {
    background: var(--gradient-card);
    cursor: pointer;
    user-select: none;
}

.backlinks-table thead th:hover {
    background: rgba(33, 150, 243, 0.12);
}

.backlinks-table thead th:last-child {
    cursor: default;
}

.backlinks-table thead th:last-child:hover {
    background: var(--gradient-card);
}

.sort-indicator {
    font-size: 12px;
    color: var(--primary-blue);
    margin-left: 6px;
}

.backlink-url {
    max-width: 400px;
}

.backlink-url a {
    color: var(--primary-blue);
    text-decoration: none;
    word-break: break-all;
    font-weight: 500;
    transition: var(--transition-fast);
}

.backlink-url a:hover {
    color: var(--primary-cyan);
    text-decoration: underline;
}

.backlink-status {
    text-align: center;
    font-size: 18px;
}

.backlink-actions {
    text-align: center;
    white-space: nowrap;
}

.backlink-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    transition: var(--transition-smooth);
}

.backlink-btn:hover:not(:disabled) {
    background: var(--gradient-card);
    transform: scale(1.15);
}

.backlink-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.check-progress {
    padding: 20px;
    background: var(--gradient-card);
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid rgba(33, 150, 243, 0.15);
}

.progress-bar {
    width: 100%;
    height: 32px;
    background: var(--bg-light);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

.progress-fill {
    height: 100%;
    background: var(--gradient-success);
    transition: width 0.3s ease;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.3);
}

.progress-text {
    margin-top: 10px;
    text-align: center;
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 700;
}

.backlink-check-btn {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 4px 6px;
    margin-left: 10px;
    opacity: 0.5;
    transition: var(--transition-smooth);
    border-radius: 6px;
}

.backlink-check-btn:hover {
    opacity: 1;
    background: var(--gradient-card);
    transform: scale(1.2);
}

.backlink-check-btn:disabled {
    opacity: 0.25;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .card-header-with-action {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .navigation-tabs {
        flex-direction: column;
        border-bottom: none;
    }

    .nav-tab {
        border-bottom: 1px solid var(--border-light);
        border-left: 3px solid transparent;
    }

    .nav-tab.active {
        border-left-color: var(--primary-blue);
        border-bottom-color: var(--border-light);
    }

    .note-modal-content {
        width: 95%;
        margin: 20px;
    }

    .notes-popup {
        max-width: 90%;
        left: 5% !important;
        right: 5%;
    }

    .backlinks-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .backlink-url {
        max-width: 200px;
    }

    .tabs-container {
        flex-direction: column;
        border-bottom: none;
    }

    .tab-btn {
        border-bottom: 1px solid var(--border-light);
        border-left: 3px solid transparent;
        bottom: 0;
        text-align: left;
    }

    .tab-btn.active {
        border-left-color: var(--primary-blue);
        border-bottom-color: var(--border-light);
    }
}
