:root {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --success-color: #10b981;
    --error-color: #ef4444;
    --text-primary: #1a1a1a;
    --text-secondary: #6b7280;
    --bg-primary: rgba(255, 255, 255, 0.95);
    --bg-secondary: rgba(248, 250, 252, 0.8);
    --border-color: rgba(226, 232, 240, 1);
    --glass-bg: rgba(248, 250, 252, 0.8);
    --shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 40px 0 rgba(0, 0, 0, 0.12);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: var(--text-primary);
    background: #ffffff;
    background-image:
        radial-gradient(ellipse at 20% 30%, rgba(59, 130, 246, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(37, 99, 235, 0.06) 0%, transparent 50%),
        linear-gradient(180deg, #fafafa 0%, #ffffff 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.view {
    display: none;
    width: 100%;
    max-width: 1200px;
    animation: fadeIn 0.5s ease-in;
}

.view.active {
    display: block;
}

#landing-view .container {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 40px);
    padding-top: 60px;
}

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

.container {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

header {
    text-align: center;
    margin-bottom: 50px;
}

h1 {
    font-size: 4rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    letter-spacing: -2px;
}

.subtitle {
    font-size: 1.35rem;
    color: var(--text-secondary);
    font-weight: 300;
}

.info-section-home {
    max-width: 700px;
    margin: 0 auto 50px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.6;
}

.input-section {
    max-width: 650px;
    margin: 0 auto;
}

input[type="url"],
input[type="email"] {
    width: 100%;
    padding: 18px 24px;
    font-size: 1.05rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    margin-bottom: 15px;
    transition: all 0.3s;
}

input[type="url"]::placeholder,
input[type="email"]::placeholder {
    color: var(--text-secondary);
}

input[type="url"]:focus,
input[type="email"]:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.05);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    border-color: var(--primary-color);
}

.primary-btn {
    width: 100%;
    padding: 18px 32px;
    font-size: 1.15rem;
    font-weight: 600;
    color: #ffffff;
    background: var(--primary-color);
    border: none;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s, transform 0.1s;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
}

.primary-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(59, 130, 246, 0.4);
}

.primary-btn:active {
    transform: translateY(0);
}

.primary-btn:disabled {
    background: #e5e7eb;
    cursor: not-allowed;
    box-shadow: none;
    color: var(--text-secondary);
}


/* Landing Panel */
.landing-panel {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 60px 40px;
    box-shadow: var(--shadow-lg);
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.logo-icon-topleft {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.signin-container {
    text-align: center;
    margin-top: 20px;
    font-size: 0.95rem;
}

.signin-text {
    color: var(--text-secondary);
    margin-right: 6px;
}

.signin-link-below {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.signin-link-below:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.badges-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.time-badge {
    display: inline-block;
    padding: 8px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Footer */
.home-footer {
    text-align: center;
    margin-top: auto;
    padding-top: 30px;
    padding-bottom: 30px;
    border-top: 1px solid var(--border-color);
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: var(--primary-color);
}

.footer-separator {
    color: var(--text-secondary);
    opacity: 0.5;
}

.footer-copyright {
    font-size: 0.85rem;
    color: var(--text-secondary);
    opacity: 0.7;
}

@media (max-width: 768px) {
    #landing-view .container {
        padding-top: 20px;
    }

    .landing-panel {
        padding: 40px 24px;
    }

    .signin-container {
        font-size: 0.9rem;
    }

    .badges-container {
        flex-direction: column;
        gap: 12px;
    }

    .home-footer {
        padding-top: 24px;
        padding-bottom: 20px;
    }

    .footer-links {
        flex-direction: column;
        gap: 8px;
    }

    .footer-separator {
        display: none;
    }
}

/* Loading Screen */
.loading-content {
    text-align: center;
}

.loader {
    width: 80px;
    height: 80px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    margin: 0 auto 30px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

#loading-title {
    font-size: 2rem;
    margin-bottom: 10px;
}

#loading-message {
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.loading-steps {
    max-width: 400px;
    margin: 0 auto;
    text-align: left;
}

.loading-step {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    margin-bottom: 10px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.loading-step.active {
    background: #faf5ff;
    border-color: var(--primary-color);
}

.loading-step.completed {
    background: #f0fdf4;
    border-color: var(--success-color);
}

/* Email Collection */
.email-content {
    text-align: center;
    max-width: 650px;
    margin: 0 auto;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-color);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin: 0 auto 30px;
    box-shadow: 0 4px 20px rgba(168, 85, 247, 0.4);
}

.email-content h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.email-message {
    color: var(--text-secondary);
    margin-bottom: 35px;
    font-size: 1.1rem;
}

.questions-preview {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 35px;
    text-align: left;
}

.questions-preview h3 {
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.questions-preview ul {
    list-style: none;
}

.questions-preview li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.questions-preview li:last-child {
    border-bottom: none;
}

/* Dashboard */
.dashboard-header {
    text-align: center;
    margin-bottom: 35px;
}

.dashboard-header h1 {
    font-size: 2.5rem;
}

#analyzed-url {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 10px;
}

.progress-section {
    margin-bottom: 40px;
}

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

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s ease;
    width: 0%;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
}

.progress-text {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.results-table {
    overflow-x: auto;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

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

thead {
    position: relative;
    z-index: 1;
}

th {
    background: #f9fafb;
    padding: 18px;
    text-align: left;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
}

td {
    padding: 18px;
    border-bottom: 1px solid var(--border-color);
}

tr:last-child td {
    border-bottom: none;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Expandable row styles */
.question-row {
    cursor: pointer;
    transition: background-color 0.2s;
}

.question-row:hover {
    background: #dbeafe;
}

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

.expand-icon {
    color: var(--primary-color);
    font-size: 0.7rem;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.question-row[data-expanded="true"] .expand-icon {
    transform: rotate(90deg);
}

.question-text {
    flex: 1;
}

.details-row {
    background: #eff6ff;
}

.details-row td {
    padding: 0 !important;
    border: none !important;
}

.details-row-wrapper {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    opacity: 0;
}

.details-row.expanding .details-row-wrapper {
    max-height: 2000px;
    opacity: 1;
}

.details-content {
    padding: 20px 30px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@keyframes slideDown {
    from {
        transform: translateY(-10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.details-row.expanding .details-content {
    animation: slideDown 0.3s ease;
}

.answer-section h4 {
    margin: 0 0 12px 0;
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.answer-box {
    padding: 15px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
}

.answer-box.recommended {
    border-left: 4px solid var(--success-color);
    background: #f0fdf4;
}

.answer-box.not-recommended {
    border-left: 4px solid var(--error-color);
    background: #fef2f2;
}

.answer-box.error-box {
    border-left: 4px solid var(--error-color);
    background: #fef2f2;
    color: var(--error-color);
}

.answer-box.loading-box {
    border-left: 4px solid #f59e0b;
    background: #fffbeb;
    color: #d97706;
}

.answer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.answer-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.answer-text {
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 0.9rem;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.answer-text-wrapper {
    position: relative;
}

.answer-text.collapsed {
    max-height: 150px;
    overflow: hidden;
    position: relative;
}

.answer-box.recommended .answer-text.collapsed.has-overflow::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(to bottom, transparent, #f0fdf4);
    pointer-events: none;
}

.answer-box.not-recommended .answer-text.collapsed.has-overflow::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(to bottom, transparent, #fef2f2);
    pointer-events: none;
}

.answer-text.expanded {
    max-height: none;
}

.see-more-btn {
    display: none;
    margin-top: 8px;
    padding: 6px 16px;
    font-size: 0.85rem;
    color: var(--primary-color);
    background: transparent;
    border: 1px solid var(--primary-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

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

/* Responsive for smaller screens */
@media (max-width: 768px) {
    .details-content {
        grid-template-columns: 1fr;
    }
}

.status-loading {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid #fcd34d;
}

.status-yes {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #86efac;
}

.status-no {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fca5a5;
}

.status-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fca5a5;
}

.status-na {
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #d1d5db;
    opacity: 0.7;
}

.status-na.tooltip-trigger {
    cursor: help;
}

.status-na.tooltip-trigger .tooltip {
    /* Show below the badge instead of above */
    bottom: auto;
    top: calc(100% + 4px);
    transform: translateX(-50%);
}

.status-na.tooltip-trigger .tooltip::after {
    /* Flip arrow to point up */
    top: auto;
    bottom: 100%;
    border-top-color: transparent;
    border-bottom-color: rgba(17, 24, 39, 0.95);
}

.status-na.tooltip-trigger:hover .tooltip {
    transform: translateX(-50%) translateY(4px);
}

/* Provider logos in table header */
.provider-col {
    text-align: center;
    width: 100px;
    padding: 12px 8px;
    overflow: visible;
    position: relative;
}

.provider-logo {
    height: 24px;
    width: 24px;
    display: inline-block;
    vertical-align: middle;
    filter: brightness(0.2);
    opacity: 0.8;
}

.provider-cell {
    text-align: center;
    vertical-align: middle;
    overflow: visible;
    position: relative;
}

/* Tooltips */
.tooltip-trigger {
    position: relative;
    cursor: help;
    display: inline-block;
}

.tooltip {
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(17, 24, 39, 0.95);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
    pointer-events: none;
    z-index: 10000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-transform: none;
    letter-spacing: normal;
}

.tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(17, 24, 39, 0.95);
}

.tooltip-trigger:hover .tooltip {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(-4px);
}

.tooltip a {
    color: #60a5fa;
    text-decoration: none;
    font-weight: 500;
}

.tooltip a:hover {
    color: #93c5fd;
    text-decoration: underline;
}

/* Provider logo tooltip */
.provider-logo-wrapper {
    position: relative;
    display: inline-block;
    z-index: 1;
}

.provider-logo-wrapper .tooltip {
    white-space: nowrap;
    font-size: 0.75rem;
    padding: 6px 10px;
    z-index: 10001;
    /* Show below the logo instead of above to avoid clipping */
    bottom: auto;
    top: calc(100% + 4px);
    transform: translateX(-50%);
}

.provider-logo-wrapper .tooltip::after {
    /* Flip arrow to point up */
    top: auto;
    bottom: 100%;
    border-top-color: transparent;
    border-bottom-color: rgba(17, 24, 39, 0.95);
}

.provider-logo-wrapper:hover .tooltip {
    transform: translateX(-50%) translateY(4px);
}

.prompt-spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Add Question Section */
.add-question-section {
    margin-top: 40px;
    padding: 25px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-color);
}

.add-question-section h3 {
    margin-bottom: 8px;
    font-size: 1.3rem;
}

.add-question-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.add-question-form {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.add-question-form input {
    flex: 1;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: border-color 0.2s, background 0.2s;
}

.add-question-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: #dbeafe;
}

.add-question-form input::placeholder {
    color: #9ca3af;
}

.btn-primary {
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

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

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.question-counter {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}

.error-message {
    color: var(--error-color);
    font-size: 0.9rem;
    margin: 8px 0 0 0;
}

@media (max-width: 768px) {
    .add-question-form {
        flex-direction: column;
    }
}

.summary-section {
    margin-top: 40px;
    padding: 25px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-color);
}

.summary-section h3 {
    margin-bottom: 12px;
    font-size: 1.3rem;
}

#summary-text {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 1.05rem;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 40px 25px;
    }

    .logo-icon-topleft {
        width: 32px;
        height: 32px;
        top: 15px;
        left: 15px;
    }

    h1 {
        font-size: 2.5rem;
        letter-spacing: -1px;
    }

    .subtitle {
        font-size: 1.1rem;
    }

    table {
        font-size: 0.9rem;
    }

    th, td {
        padding: 12px;
    }
}

/* ===== DASHBOARD PAGE ===== */
.chart-section {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
}

.chart-section h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.chart-container {
    position: relative;
    height: 400px;
    margin-top: 20px;
}

/* Summary Cards */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.summary-card {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow);
}

.summary-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.summary-value {
    color: var(--text-primary);
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 4px;
}

.summary-detail {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.trend-up {
    color: var(--success-color) !important;
}

.trend-down {
    color: var(--error-color) !important;
}

/* Chart Header */
.chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.chart-header h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin: 0;
}

/* Time Range Selector */
.time-range-selector {
    display: flex;
    gap: 8px;
    background: rgba(248, 250, 252, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 4px;
}

.time-range-btn {
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.time-range-btn:hover {
    color: var(--primary-color);
    background: rgba(59, 130, 246, 0.08);
}

.time-range-btn.active {
    color: #ffffff;
    background: var(--primary-color);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* Chart Actions */
.chart-actions {
    display: flex;
    gap: 8px;
}

.export-btn {
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.export-btn:hover {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.export-btn:active {
    transform: translateY(0);
}

/* Dashboard Responsive */
@media (max-width: 768px) {
    .summary-cards {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .summary-card {
        padding: 20px;
    }

    .summary-value {
        font-size: 2rem;
    }

    .chart-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .time-range-selector {
        width: 100%;
        overflow-x: auto;
        scrollbar-width: thin;
    }

    .time-range-btn {
        padding: 8px 12px;
        font-size: 0.8125rem;
    }

    .chart-actions {
        width: 100%;
    }

    .export-btn {
        flex: 1;
        justify-content: center;
    }
}

.config-section {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
}

.config-section h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.config-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.config-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.config-item label {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.95rem;
}

.config-item small {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.config-toggle {
    flex-direction: row;
    align-items: center;
}

.config-toggle label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.config-select,
.config-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.config-select:focus,
.config-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: #faf5ff;
}

.config-select {
    cursor: pointer;
}

.config-select option {
    background: #ffffff;
    color: var(--text-primary);
}

.config-input[type="number"] {
    width: 150px;
}

.config-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.config-slider {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: #e5e7eb;
    border-radius: 5px;
    outline: none;
    cursor: pointer;
}

.config-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: -6px;
}

.config-slider::-webkit-slider-thumb:hover {
    background: var(--primary-hover);
    transform: scale(1.1);
}

.config-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.config-slider::-moz-range-thumb:hover {
    background: var(--primary-hover);
    transform: scale(1.1);
}

.config-slider::-webkit-slider-runnable-track {
    height: 6px;
    border-radius: 5px;
    background: transparent;
}

.config-slider::-moz-range-track {
    height: 6px;
    border-radius: 5px;
    background: #e5e7eb;
}

.config-slider::-moz-range-progress {
    height: 6px;
    border-radius: 5px;
    background: var(--primary-color);
}

.config-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.35);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.save-status {
    font-size: 0.9rem;
    font-weight: 500;
}

/* ===== SIDEBAR LAYOUT ===== */
/* Dashboard page body override */
.sidebar ~ .main-content {
    /* This selector ensures we only apply when sidebar exists */
}

body:has(.sidebar) {
    display: block;
    padding: 0;
}

/* Fixed Top Header */
.top-header {
    position: fixed;
    top: 0;
    left: 280px;
    right: 0;
    height: 60px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 40px;
    z-index: 999;
}

.top-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    letter-spacing: -0.5px;
}

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 280px;
    background: var(--bg-primary);
    border-right: 1px solid var(--border-color);
    z-index: 1000;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-content {
    padding: 15px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Mobile Close Button in Sidebar */
.mobile-close-btn {
    display: none;
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    padding: 8px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    z-index: 10;
    transition: all 0.2s ease;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
}

.mobile-close-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
}

@media (max-width: 1024px) {
    .mobile-close-btn {
        display: flex;
    }
}

/* Combined Logo and URL Header */
.sidebar-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    text-align: center;
    cursor: pointer;
    transition: opacity 0.2s;
}

.sidebar-header:hover {
    opacity: 0.8;
}

.sidebar-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
}

.logo-text {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    white-space: nowrap;
}

.separator {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.url-value {
    font-size: 0.85rem;
    color: var(--text-secondary);
    word-wrap: break-word;
    font-weight: 500;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.change-site-icon {
    color: var(--primary-color);
    font-size: 0.6rem;
    opacity: 0.6;
    transition: opacity 0.2s, transform 0.2s;
}

.sidebar-header:hover .change-site-icon {
    opacity: 1;
}

.sidebar-header.active .change-site-icon {
    transform: rotate(180deg);
}

/* Sites Dropdown */
.sites-dropdown {
    position: absolute;
    top: 100%;
    left: 15px;
    right: 15px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    margin-top: 5px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1001;
    display: none;
}

.sites-dropdown.active {
    display: block;
}

.dropdown-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: #f3f4f6;
}

.dropdown-item.new-site {
    color: var(--primary-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dropdown-item.site-option {
    color: var(--text-primary);
}

.dropdown-item.site-option .site-url {
    font-weight: 500;
    display: block;
}

.dropdown-item.site-option .site-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
    display: block;
}

.sidebar-header {
    position: relative;
}

/* Navigation */
.sidebar-nav {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav-section-header {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #9ca3af;
    padding: 15px 8px 5px 8px;
    margin-top: 8px;
}

.nav-section-header:first-child {
    margin-top: 0;
}

.nav-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
    gap: 15px;
}

.nav-item:hover {
    background: var(--glass-bg);
}

.nav-item.active {
    background: #e5e7eb;
    color: var(--primary-color);
}

.nav-item.active .nav-text,
.nav-item.active .nav-icon {
    color: var(--primary-color);
}

.nav-icon {
    width: 20px;
    font-size: 18px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: inherit;
}

.nav-icon i {
    color: inherit;
}

.nav-text {
    font-weight: 500;
    font-size: 0.9rem;
}


/* Info styling */
.info-item {
    margin-bottom: 0;
}

.info-label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.info-value {
    display: block;
    font-size: 0.85rem;
    color: var(--text-primary);
    word-wrap: break-word;
}

/* User / Email at bottom */
.sidebar-user {
    margin-top: auto;
    padding: 15px 0 0 0;
    border-top: 1px solid var(--border-color);
}

.sidebar-user .upgrade-btn {
    width: 100%;
    margin-top: 12px;
    padding: 10px 15px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.sidebar-user .upgrade-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.sidebar-user .upgrade-btn i {
    font-size: 0.9rem;
}

/* When user has subscription, make button more subtle like logout button */
.sidebar-user .upgrade-btn.has-subscription {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-weight: 500;
    box-shadow: none;
}

.sidebar-user .upgrade-btn.has-subscription:hover {
    background: rgba(59, 130, 246, 0.05);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: none;
    box-shadow: none;
}

/* Hide crown icon when user has subscription */
.sidebar-user .upgrade-btn.has-subscription i {
    display: none;
}

.sidebar-user .logout-btn {
    width: 100%;
    margin-top: 12px;
    padding: 10px 15px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.sidebar-user .logout-btn:hover {
    background: #fef2f2;
    border-color: var(--error-color);
    color: var(--error-color);
}

.sidebar-user .logout-btn i {
    font-size: 0.9rem;
}

/* User Profile Dropdown */
.user-profile-section {
    position: relative;
    margin-top: 12px;
}

.user-profile-btn {
    width: 100%;
    padding: 12px;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
}

.user-profile-btn:hover {
    background: rgba(59, 130, 246, 0.05);
    border-color: var(--primary-color);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-avatar i {
    color: white;
    font-size: 0.9rem;
}

.user-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: left;
    min-width: 0;
}

.user-email {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-plan {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.dropdown-icon {
    font-size: 0.75rem;
    color: var(--text-secondary);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.user-profile-section.active .dropdown-icon {
    transform: rotate(180deg);
}

.user-dropdown {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    margin-bottom: 8px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.2s ease;
    z-index: 1000;
    overflow: hidden;
}

.user-profile-section.active .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: background 0.15s ease;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.dropdown-item:hover {
    background: #f3f4f6;
}

.dropdown-item i {
    width: 18px;
    font-size: 0.95rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 4px 0;
}

.dropdown-item.logout-item {
    color: var(--error-color);
}

.dropdown-item.logout-item:hover {
    background: #fef2f2;
}

.dropdown-item.logout-item i {
    color: var(--error-color);
}

.user-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-content {
    margin-left: 280px;
    margin-top: 60px;
    min-height: calc(100vh - 60px);
    padding: 40px;
}

.dashboard-header {
    margin-bottom: 30px;
}

.dashboard-header h1 {
    font-size: 1.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

/* ===== SUMMARY SECTION ===== */
.summary-section {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.1) 0%, rgba(147, 51, 234, 0.1) 100%);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 25px 30px;
    margin-bottom: 30px;
}

.summary-section h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.summary-section p {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text-primary);
}

/* ===== ADD QUESTION INTEGRATED ROW ===== */
.add-question-row {
    background: #dbeafe;
}

.add-question-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
}

.add-question-inline input {
    flex: 1;
    padding: 12px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.add-question-inline input:focus {
    border-color: var(--primary-color);
    background: #dbeafe;
}

.add-question-inline input::placeholder {
    color: var(--text-secondary);
}

.btn-add {
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-add:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.4);
}

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

.question-counter {
    color: var(--text-secondary);
    font-size: 0.9rem;
    white-space: nowrap;
    min-width: 60px;
}

/* ===== ACTION BUTTONS ===== */
.actions-cell {
    display: flex;
    gap: 6px;
    justify-content: center;
    align-items: center;
}

.refresh-btn,
.delete-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    opacity: 0.6;
}

.refresh-btn:hover {
    background: rgba(59, 130, 246, 0.1);
    opacity: 1;
    transform: scale(1.1);
}

.delete-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    opacity: 1;
    transform: scale(1.1);
}

.question-cell {
    display: flex;
    align-items: center;
}

/* ===== RESPONSIVE UPDATES ===== */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-280px);
        transition: transform 0.3s ease;
        top: 0;
        height: 100vh;
    }

    .sidebar.mobile-open {
        transform: translateX(0);
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.15);
    }

    .main-content {
        margin-left: 0;
        margin-top: 60px;
    }

    .top-header {
        left: 0;
        padding: 0 20px 0 60px;
    }

    /* Mobile menu toggle button */
    .mobile-menu-btn {
        position: fixed;
        top: 10px;
        left: 10px;
        z-index: 1001;
        background: transparent;
        border: none;
        padding: 5px;
        font-size: 1.5rem;
        cursor: pointer;
        color: var(--primary-color);
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        transition: all 0.2s ease;
        border-radius: 8px;
    }

    .mobile-menu-btn:hover {
        background: rgba(59, 130, 246, 0.1);
    }

    /* Hide hamburger when sidebar is open */
    .sidebar.mobile-open ~ .mobile-menu-btn,
    body:has(.sidebar.mobile-open) .mobile-menu-btn {
        display: none;
    }

    /* Mobile backdrop */
    .mobile-backdrop {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(2px);
        z-index: 999;
    }

    .mobile-backdrop.active {
        display: block;
    }
}

@media (max-width: 768px) {
    .dashboard-header h1 {
        font-size: 1.5rem;
    }

    .add-question-inline {
        flex-wrap: wrap;
    }

    .add-question-inline input {
        flex: 1 1 100%;
    }

    .main-content {
        padding: 20px;
    }

    .top-header h1 {
        font-size: 1.25rem;
    }
}

/* ===== DELETE MODAL ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-primary);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    max-width: 450px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

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

.modal-content h3 {
    margin: 0 0 15px 0;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.8rem;
    line-height: 1;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

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

.modal-close:active {
    transform: scale(0.95);
}

.modal-body {
    margin-top: 20px;
}

.modal-content p {
    margin: 0 0 25px 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

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

.btn-secondary {
    padding: 12px 24px;
    background: var(--glass-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.btn-secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-danger {
    padding: 12px 24px;
    background: var(--error-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* Auth Modal Styles */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.95rem;
}

.modal-input {
    padding: 12px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.modal-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.05);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.modal-input::placeholder {
    color: var(--text-secondary);
}

.auth-hint {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 12px 0 0 0;
    text-align: center;
}

/* Login Page */
.password-group {
    margin-top: 15px;
    margin-bottom: 15px;
}

.password-group input[type="password"] {
    width: 100%;
    padding: 18px 24px;
    font-size: 1.05rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    transition: border-color 0.3s ease, background 0.3s ease;
    outline: none;
}

.password-group input[type="password"]:focus {
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.08);
}

.password-group input[type="password"]::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

/* Verification Page */
#verify-loader {
    margin: 0 auto 30px;
}

#verify-actions {
    gap: 15px;
    flex-wrap: wrap;
}

#verify-actions .primary-btn {
    padding: 18px 32px;
    font-size: 1.15rem;
    flex: 1;
    min-width: 180px;
}

#verify-actions .primary-btn:only-child {
    flex: 0;
}

#auth-modal-title,
#set-password-modal h3 {
    color: var(--text-primary);
    margin-bottom: 10px;
}

#auth-modal-message,
#set-password-modal p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* Competitors Page Styles */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

.loading-state .spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-state p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.no-data-state {
    padding: 60px 20px;
    text-align: center;
    color: var(--text-secondary);
    background: var(--glass-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.ranking-section {
    margin-bottom: 30px;
}

.ranking-section h3 {
    margin-bottom: 20px;
    color: var(--text-primary);
    font-size: 1.3rem;
}

.ranking-card {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    display: flex;
    gap: 30px;
    align-items: center;
    box-shadow: var(--shadow);
}

.ranking-position {
    text-align: center;
    padding-right: 30px;
    border-right: 2px solid var(--border-color);
}

.rank-number {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 8px;
    color: var(--primary-color);
}

.rank-context {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.ranking-details {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.detail-item {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 0;
}

.detail-label {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.detail-value {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
}

.competitors-section h3 {
    margin-bottom: 20px;
    color: var(--text-primary);
    font-size: 1.3rem;
}

.competitors-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.competitor-card {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.2s ease;
}

.competitor-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
    transform: translateX(4px);
}

.competitor-card.own-site {
    background: #dbeafe;
    border-color: var(--primary-color);
}

.competitor-position {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    min-width: 40px;
}

.competitor-domain {
    flex: 1;
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 500;
}

.competitor-mentions {
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding: 6px 14px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 20px;
}

/* Upgrade Notice */
.upgrade-notice {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(37, 99, 235, 0.1) 100%);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 25px 30px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.upgrade-notice i {
    font-size: 2rem;
    color: var(--primary-color);
    flex-shrink: 0;
}

.upgrade-notice-content {
    flex: 1;
}

.upgrade-notice-content strong {
    display: block;
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.upgrade-notice-content p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.95rem;
}

.upgrade-notice .btn-primary {
    flex-shrink: 0;
    white-space: nowrap;
}

/* Blurred competitor domain and mentions */
.competitor-domain.blurred,
.competitor-mentions.blurred,
.detail-value.blurred {
    filter: blur(6px);
    user-select: none;
    pointer-events: none;
}

/* Blurred indicators in improve page */
.indicator-row.blurred-row td {
    filter: blur(6px);
    user-select: none;
    pointer-events: none;
}

.indicator-row.blurred-row {
    opacity: 0.7;
}

/* Status background colors for indicator rows */
.indicator-row.status-good {
    background: rgba(34, 197, 94, 0.08);
}

.indicator-row.status-average {
    background: rgba(251, 191, 36, 0.08);
}

.indicator-row.status-bad {
    background: rgba(239, 68, 68, 0.08);
}

.indicator-row.status-good:hover {
    background: rgba(34, 197, 94, 0.12);
}

.indicator-row.status-average:hover {
    background: rgba(251, 191, 36, 0.12);
}

.indicator-row.status-bad:hover {
    background: rgba(239, 68, 68, 0.12);
}

/* Upgrade notice row in table */
.upgrade-notice-row {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(37, 99, 235, 0.05) 100%);
}

.upgrade-notice-row td {
    padding: 0 !important;
}

.upgrade-notice-inline {
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 20px 25px;
    margin: 12px;
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(37, 99, 235, 0.08) 100%);
}

.upgrade-notice-inline i {
    font-size: 1.5rem;
    color: var(--primary-color);
    flex-shrink: 0;
}

.upgrade-notice-inline-content {
    flex: 1;
}

.upgrade-notice-inline-content strong {
    display: block;
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.upgrade-notice-inline-content p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.upgrade-notice-inline .btn-primary {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 10px 20px;
}

/* Responsive adjustments for competitors page */
@media (max-width: 768px) {
    .ranking-card {
        flex-direction: column;
        gap: 20px;
    }

    .ranking-position {
        padding-right: 0;
        border-right: none;
        border-bottom: 2px solid var(--border-color);
        padding-bottom: 20px;
        width: 100%;
    }

    .rank-number {
        font-size: 2.5rem;
    }

    .competitor-card {
        flex-wrap: wrap;
        gap: 12px;
    }

    .competitor-position {
        min-width: 30px;
    }

    .competitor-domain {
        flex-basis: 100%;
        order: 3;
    }

    .competitor-mentions {
        margin-left: auto;
    }

    .upgrade-notice {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .upgrade-notice .btn-primary {
        width: 100%;
    }
}

/* Subscription Page Styles */
.subscription-status {
    margin-bottom: 40px;
}

.status-card {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.status-header {
    padding: 20px 30px;
    border-bottom: 1px solid var(--border-color);
}

.status-header h3 {
    color: var(--text-primary);
    font-size: 1.3rem;
    margin: 0;
}

.status-body {
    padding: 30px;
}

.plan-badge {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.plan-badge.free {
    background: rgba(156, 163, 175, 0.2);
    color: #4b5563;
}

.plan-badge.active {
    background: rgba(34, 197, 94, 0.2);
    color: #16a34a;
}

.plan-badge.inactive {
    background: rgba(239, 68, 68, 0.2);
    color: #dc2626;
}

.plan-description {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 25px;
}

.plan-limits {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.limit-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(59, 130, 246, 0.05);
    border-radius: 8px;
}

.limit-label {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.limit-value {
    color: var(--text-primary);
    font-weight: 600;
}

.subscription-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(59, 130, 246, 0.05);
    border-radius: 8px;
}

.detail-row.warning {
    background: rgba(239, 68, 68, 0.1);
}

.status-active {
    color: #16a34a;
    font-weight: 600;
}

.status-inactive {
    color: #dc2626;
    font-weight: 600;
}

.plans-section {
    margin-bottom: 40px;
}

.plans-section h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.plans-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 30px;
}

/* Billing Toggle */
.billing-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
}

.billing-option {
    font-size: 1rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.billing-option.active {
    color: var(--primary-color);
    font-weight: 600;
}

.savings-badge {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.billing-toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
    background: var(--border-color);
    border-radius: 13px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.billing-toggle-switch.active {
    background: var(--primary-color);
}

.billing-toggle-slider {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.billing-toggle-switch.active .billing-toggle-slider {
    transform: translateX(24px);
}

.billing-info {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 8px;
}

.pricing-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.pricing-card {
    background: var(--glass-bg);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    position: relative;
}

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

.pricing-card.featured {
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.2);
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    padding: 6px 20px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.plan-header {
    text-align: center;
    margin-bottom: 30px;
}

.plan-header h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.plan-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 5px;
}

.price {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
}

.period {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.plan-features {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.feature i {
    color: var(--success-color);
    font-size: 1rem;
}

.feature.disabled {
    color: var(--text-secondary);
    opacity: 0.6;
}

.feature.disabled i {
    color: var(--text-secondary);
}

.plan-btn {
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    border: 2px solid var(--border-color);
    background: white;
    color: var(--text-primary);
}

.plan-btn:hover {
    background: var(--bg-secondary);
    transform: translateY(-2px);
}

.plan-btn.primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    border: none;
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.plan-btn.primary:hover {
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.plan-btn.current-plan {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: not-allowed;
    border-color: var(--border-color);
}

.manage-section {
    margin-bottom: 40px;
}

.manage-card {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
}

.manage-card h3 {
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.manage-card p {
    color: var(--text-secondary);
    margin-bottom: 25px;
    font-size: 1rem;
}

.loader-small {
    width: 30px;
    height: 30px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 15px;
}

/* Invoice History Section */
.invoice-history {
    margin-bottom: 40px;
}

.invoice-card {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.invoice-header {
    padding: 20px 30px;
    border-bottom: 1px solid var(--border-color);
}

.invoice-header h3 {
    color: var(--text-primary);
    font-size: 1.3rem;
    margin: 0;
}

.invoice-body {
    padding: 30px;
}

/* Invoice Table */
.invoice-table {
    width: 100%;
    border-collapse: collapse;
}

.invoice-table thead {
    background: #f9fafb;
    border-radius: 8px;
}

.invoice-table th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-color);
}

.invoice-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s ease;
}

.invoice-table tbody tr:hover {
    background: rgba(59, 130, 246, 0.03);
}

.invoice-table tbody tr:last-child {
    border-bottom: none;
}

.invoice-table td {
    padding: 16px;
    vertical-align: middle;
    color: var(--text-primary);
}

/* Status Badge in Invoice Table */
.invoice-table .status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: capitalize;
}

.invoice-table .status-badge.paid {
    background: rgba(34, 197, 94, 0.2);
    color: #16a34a;
}

.invoice-table .status-badge.pending {
    background: rgba(251, 191, 36, 0.2);
    color: #d97706;
}

.invoice-table .status-badge.failed {
    background: rgba(239, 68, 68, 0.2);
    color: #dc2626;
}

/* Download Button */
.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-download:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    transform: translateY(-1px);
}

.btn-download i {
    font-size: 0.875rem;
}

/* Responsive subscription page */
@media (max-width: 768px) {
    .pricing-cards {
        grid-template-columns: 1fr;
    }

    .plans-section h2 {
        font-size: 2rem;
    }

    .price {
        font-size: 2.5rem;
    }

    /* Invoice table responsive */
    .invoice-body {
        padding: 15px;
        overflow-x: auto;
    }

    .invoice-table {
        font-size: 0.85rem;
    }

    .invoice-table th,
    .invoice-table td {
        padding: 12px 10px;
    }
}

/* ========== AI PLATFORMS PAGE ========== */
.info-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
}

.info-section p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

.platforms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.platform-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.platform-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 212, 255, 0.15);
}

.platform-card.active {
    border-color: var(--primary-color);
    background: rgba(0, 212, 255, 0.05);
}

.platform-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    position: relative;
}

.platform-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    overflow: hidden;
}

.platform-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.platform-name {
    flex: 1;
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.platform-lock {
    color: var(--text-secondary);
    font-size: 1.2rem;
}

.platform-body {
    min-height: 80px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 20px;
}

.platform-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    width: 100%;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color);
    transition: background 0.3s ease;
    border-radius: 30px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    top: 4px;
    background-color: white;
    transition: transform 0.3s ease;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--primary-color);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(30px);
}

.toggle-switch input:disabled + .toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.toggle-label {
    flex: 1;
    font-weight: 500;
    color: var(--text-primary);
}

.default-badge {
    background: rgba(0, 212, 255, 0.2);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.platform-card .upgrade-notice-inline {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(37, 99, 235, 0.05) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 10px;
    padding: 16px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.platform-card .upgrade-notice-inline p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.4;
}

.platform-card .upgrade-notice-inline .btn-primary {
    margin: 0;
}

.btn-sm {
    padding: 10px 24px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Responsive AI Platforms */
@media (max-width: 768px) {
    .platforms-grid {
        grid-template-columns: 1fr;
    }

    .info-section {
        padding: 15px;
    }

    .platform-card {
        padding: 20px;
    }
}

/* Settings Page */
.settings-section {
    margin-bottom: 30px;
}

.section-card {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.section-card h2 {
    margin: 0 0 10px 0;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.section-description {
    color: var(--text-secondary);
    margin: 0 0 25px 0;
    font-size: 0.95rem;
}

.info-row {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.info-row:last-child {
    border-bottom: none;
}

.info-row .info-label {
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 150px;
}

.info-row .info-value {
    color: var(--text-primary);
}

.settings-form {
    max-width: 500px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form-group input[type="password"],
.form-group input[type="text"],
.form-group input[type="email"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    transition: border-color 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-hint {
    display: block;
    margin-top: 5px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.form-error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #dc2626;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.form-success {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #15803d;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

/* Responsive Settings */
@media (max-width: 768px) {
    .section-card {
        padding: 20px;
    }

    .info-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .info-row .info-label {
        min-width: auto;
        margin-bottom: 5px;
    }

    .settings-form {
        max-width: 100%;
    }
}

/* ============================================================================
   IMPROVE PAGE - TECHNICAL ANALYSIS
   ============================================================================ */

/* No Analysis State */
.no-analysis-state {
    text-align: center;
    padding: 80px 40px;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.no-analysis-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 30px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--primary-color);
}

.no-analysis-state h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.no-analysis-state p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 32px;
    line-height: 1.6;
}

.run-analysis-btn {
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.run-analysis-btn i {
    font-size: 0.9rem;
}

/* Analysis Overview Cards */
.analysis-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.overview-card {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease;
}

.overview-card .overview-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.overview-card.good .overview-icon {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.overview-card.average .overview-icon {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.overview-card.bad .overview-icon {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.overview-card.score .overview-icon {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.overview-info {
    flex: 1;
}

.overview-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
    font-weight: 500;
}

.overview-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

/* Indicators Section */
/* Category Scores Grid */
.category-scores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.category-card {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.category-chart {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: conic-gradient(
        var(--primary-color) 0deg,
        var(--primary-color) 0deg,
        #e5e7eb 0deg
    );
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: background 0.6s ease;
}

.category-chart-inner {
    width: 85px;
    height: 85px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-chart-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.category-card-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
}

@media (max-width: 768px) {
    .category-scores-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.indicators-section {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
    box-shadow: var(--shadow);
}

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

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

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

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

.indicators-table thead {
    background: #f9fafb;
    border-radius: 8px;
}

.indicators-table th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-color);
}

.indicators-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s ease;
}

.indicators-table tbody tr:hover {
    background: rgba(59, 130, 246, 0.03);
}

.indicators-table tbody tr:last-child {
    border-bottom: none;
}

.indicators-table td {
    padding: 16px;
    vertical-align: middle;
}

.indicator-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.indicator-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Category Badge */
.category-badge-wrapper {
    display: inline-block;
    position: relative;
}

.category-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid;
    white-space: nowrap;
}
/* Status Indicators */
.status-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.status-indicator.status-good {
    color: #10b981;
}

.status-indicator.status-average {
    color: #f59e0b;
}

.status-indicator.status-bad {
    color: #ef4444;
}

/* Responsive - Improve Page */
@media (max-width: 768px) {
    .analysis-overview {
        grid-template-columns: 1fr;
    }

    .overview-card {
        padding: 20px;
    }

    .overview-card .overview-icon {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }

    .overview-value {
        font-size: 1.75rem;
    }

    .indicators-section {
        padding: 20px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .section-header h2 {
        font-size: 1.25rem;
    }

    /* Make table responsive */
    .indicators-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .indicators-table table {
        min-width: 600px;
    }

    .indicators-table th,
    .indicators-table td {
        padding: 12px;
        font-size: 0.85rem;
    }
}

/* ========================================================================== */
/* Measure Page Styles */
/* ========================================================================== */

/* Glass Card - Modern card with glass morphism effect */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 10px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.glass-card:hover {
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.1), 0 16px 24px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.glass-card h2 {
    margin: 0 0 16px 0;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
}

.glass-card > p {
    margin: 0 0 20px 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Code Block Container */
.code-block-container {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    overflow: hidden;
    margin: 20px 0;
}

.code-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(59, 130, 246, 0.05);
    border-bottom: 1px solid rgba(59, 130, 246, 0.1);
}

.code-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.code-block {
    margin: 0;
    padding: 20px;
    background: rgba(248, 250, 252, 0.8);
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-primary);
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

.code-block code {
    font-family: inherit;
}

.code-block span {
    color: var(--primary-color);
    font-weight: 600;
}

/* Info Box */
.info-box {
    margin-top: 24px;
    padding: 20px;
    background: rgba(59, 130, 246, 0.05);
    border-left: 4px solid var(--primary-color);
    border-radius: 4px;
}

.info-box h4 {
    margin: 0 0 12px 0;
    color: var(--text-primary);
    font-size: 1rem;
}

.info-box ul {
    margin: 0;
    padding-left: 20px;
}

.info-box li {
    margin-bottom: 8px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* UTM Examples */
.utm-examples {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.utm-example {
    padding: 16px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.utm-example:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.utm-example h4 {
    margin: 0 0 8px 0;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.utm-example code {
    display: block;
    padding: 8px 12px;
    background: rgba(248, 250, 252, 0.8);
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    color: var(--primary-color);
    word-break: break-all;
}

/* Stats Summary */
.stats-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 24px 0;
}

.stat-box {
    padding: 24px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(37, 99, 235, 0.05) 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    border-color: var(--primary-color);
}

.stat-box h3 {
    margin: 0 0 8px 0;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-box p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Sources Table Container */
.sources-table-container {
    margin-top: 32px;
}

.sources-table-container h3 {
    margin: 0 0 16px 0;
    color: var(--text-primary);
    font-size: 1.1rem;
}

/* Button Variants */
.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

/* Test Flow Styles */
.test-step {
    margin: 20px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 8px;
}

.test-link-container,
.test-verify-container {
    margin: 20px 0;
    padding: 16px;
    background: rgba(59, 130, 246, 0.05);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.test-link-container p,
.test-verify-container p {
    margin: 0 0 12px 0;
    color: var(--text-secondary);
}

.test-link-btn {
    display: inline-block;
    text-decoration: none;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.test-link-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.test-result {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 24px;
    border-radius: 12px;
    margin-top: 20px;
}

.test-result.success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.05) 100%);
    border: 2px solid #10b981;
}

.test-result.failure {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.05) 100%);
    border: 2px solid #ef4444;
}

.result-icon {
    font-size: 2.5rem;
    font-weight: bold;
    flex-shrink: 0;
}

.test-result.success .result-icon {
    color: #10b981;
}

.test-result.failure .result-icon {
    color: #ef4444;
}

.result-content {
    flex: 1;
}

.result-content h3 {
    margin: 0 0 8px 0;
    color: var(--text-primary);
    font-size: 1.2rem;
}

.result-content p {
    margin: 0 0 16px 0;
    color: var(--text-secondary);
}

.debug-list {
    margin: 16px 0;
    padding-left: 20px;
}

.debug-list li {
    margin-bottom: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.debug-list strong {
    color: var(--text-primary);
}

.debug-list code {
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

/* Tracking Empty State */
.tracking-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(37, 99, 235, 0.02) 100%);
    border-radius: 12px;
    border: 2px dashed rgba(59, 130, 246, 0.2);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.6;
}

.tracking-empty-state h4 {
    margin: 0 0 12px 0;
    font-size: 1.3rem;
    color: var(--text-primary);
}

.tracking-empty-state p {
    margin: 0 0 24px 0;
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 400px;
}

.tracking-empty-state .btn-primary {
    padding: 12px 32px;
    font-size: 1rem;
    text-decoration: none;
}

/* Responsive adjustments for measure page */
@media (max-width: 768px) {
    .utm-examples {
        grid-template-columns: 1fr;
    }

    .stats-summary {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .stat-box {
        padding: 16px;
    }

    .stat-box h3 {
        font-size: 1.5rem;
    }

    .code-block {
        font-size: 0.8rem;
        padding: 16px;
    }

    .test-result {
        flex-direction: column;
        gap: 12px;
    }

    .result-icon {
        font-size: 2rem;
    }

    .tracking-empty-state {
        padding: 40px 20px;
    }

    .empty-state-icon {
        font-size: 3rem;
    }

    .tracking-empty-state h4 {
        font-size: 1.1rem;
    }
}

/* ==================== SUPERADMIN PAGE ==================== */

.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

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

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

.stat-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    min-width: 60px;
    text-align: center;
}

.stat-info h3 {
    font-size: 2rem;
    margin: 0 0 4px 0;
    color: var(--text-primary);
}

.stat-info p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.search-section {
    padding: 20px;
    margin-bottom: 20px;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 16px;
    transition: border-color 0.2s;
}

.search-bar:focus-within {
    border-color: var(--primary-color);
}

.search-bar i {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.search-bar input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    color: var(--text-primary);
}

.table-section {
    padding: 24px;
}

.table-section h2 {
    margin: 0 0 20px 0;
    color: var(--text-primary);
}

.table-container {
    overflow-x: auto;
    margin-bottom: 20px;
}

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

.data-table thead {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
}

.data-table th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table th:first-child {
    border-top-left-radius: 8px;
}

.data-table th:last-child {
    border-top-right-radius: 8px;
}

.data-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s;
}

.data-table tbody tr:hover {
    background-color: rgba(59, 130, 246, 0.05);
}

.data-table td {
    padding: 14px 16px;
    color: var(--text-primary);
}

.subscription-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: capitalize;
}

.subscription-badge.free {
    background: #e5e7eb;
    color: #6b7280;
}

.subscription-badge.active {
    background: #dcfce7;
    color: #16a34a;
}

.subscription-badge.pro {
    background: #dbeafe;
    color: #2563eb;
}

.subscription-badge.enterprise {
    background: #fef3c7;
    color: #d97706;
}

.subscription-badge.canceled,
.subscription-badge.past_due {
    background: #fee2e2;
    color: #dc2626;
}

.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
}

.pagination button {
    display: flex;
    align-items: center;
    gap: 8px;
}

#page-info {
    color: var(--text-secondary);
    font-weight: 500;
}

.website-info-section {
    margin-bottom: 30px;
}

.website-info-section h3 {
    margin: 0 0 16px 0;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 8px;
}

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

.info-item {
    padding: 12px;
    background: rgba(59, 130, 246, 0.05);
    border-radius: 8px;
}

.info-item strong {
    display: block;
    margin-bottom: 4px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-item span {
    color: var(--text-primary);
    font-size: 1rem;
}

.questions-section {
    margin-top: 30px;
}

.questions-section h3 {
    margin: 0 0 16px 0;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 8px;
}

.question-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.question-card h4 {
    margin: 0 0 12px 0;
    color: var(--text-primary);
    font-size: 1rem;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.result-item {
    padding: 10px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.02);
}

.result-item .provider-name {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.85rem;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.result-item .status {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.result-item.recommended {
    background: rgba(34, 197, 94, 0.1);
    border-color: #22c55e;
}

.result-item.not-recommended {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
}

@media (max-width: 768px) {
    .stats-overview {
        grid-template-columns: 1fr;
    }

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

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

/* ==================== FEEDBACK WIDGET ==================== */

.feedback-button {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    padding: 8px 16px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-primary);
    border: 1px solid #e5e7eb;
    font-size: 0.9rem;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    z-index: 10;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.feedback-button:hover {
    background: white;
    border-color: var(--primary-color);
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.2);
}

.feedback-button:active {
    transform: scale(0.98);
}

.feedback-button i {
    font-size: 1rem;
    color: var(--primary-color);
}

.feedback-shortcut {
    padding: 3px 8px;
    background: linear-gradient(180deg, #ffffff 0%, #f3f4f6 100%);
    border: 1.5px solid #d1d5db;
    border-radius: 4px;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05),
                inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    color: #374151;
}

/* Feedback modal positioning - top right corner */
#feedback-modal.active {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 80px 24px 24px 24px; /* Extra top padding for header clearance */
}

#feedback-modal .feedback-modal-content {
    margin: 0;
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    background: white;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15),
                0 0 0 1px rgba(0, 0, 0, 0.05);
    position: relative;
}

#feedback-modal .feedback-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6b7280;
    font-size: 1rem;
    padding: 0;
}

#feedback-modal .feedback-modal-close:hover {
    background: #e5e7eb;
    color: #374151;
    transform: scale(1.05);
}

#feedback-modal .feedback-modal-close:active {
    transform: scale(0.95);
}

#feedback-modal .feedback-modal-content h2 {
    color: #111827;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

#feedback-modal .feedback-modal-content h2 i {
    color: var(--primary-color);
}

/* Feedback form styling to match reference */
#feedback-modal textarea {
    width: 100%;
    padding: 12px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    resize: vertical;
    min-height: 120px;
    transition: border-color 0.2s;
    background: white;
}

#feedback-modal textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

#feedback-modal textarea::placeholder {
    color: #9ca3af;
}

.feedback-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(59, 130, 246, 0.08);
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    border: 1px solid rgba(59, 130, 246, 0.15);
}

.feedback-hint i {
    color: var(--primary-color);
    font-size: 1rem;
}

.feedback-hint kbd {
    padding: 3px 8px;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 0.75rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    font-weight: 600;
}

.char-count {
    text-align: right;
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 6px;
}

#feedback-modal .modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

#feedback-modal .modal-actions button {
    flex: 1;
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

#feedback-modal .btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #e5e7eb;
}

#feedback-modal .btn-secondary:hover {
    background: #e5e7eb;
}

#feedback-modal .btn-primary {
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#feedback-modal .btn-primary:hover {
    background: var(--primary-hover);
}

#feedback-modal .btn-primary i {
    font-size: 0.875rem;
}

#feedback-success {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 768px) {
    .feedback-button {
        padding: 6px 12px;
        font-size: 0.85rem;
        top: 12px;
        right: 16px;
    }

    .feedback-button span {
        display: none; /* Hide text on mobile, show only icon */
    }

    .feedback-hint {
        font-size: 0.8rem;
        padding: 10px 12px;
    }

    .feedback-hint kbd {
        padding: 2px 6px;
        font-size: 0.7rem;
    }

    #feedback-modal.active {
        padding: 60px 16px 16px 16px;
    }

    #feedback-modal .modal-content {
        width: 95%;
    }

    #feedback-modal .modal-actions {
        flex-direction: column;
    }

    #feedback-modal .modal-actions button {
        width: 100%;
    }
}

/* Feedback Status Badges */
.feedback-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: capitalize;
}

.feedback-status-badge.new {
    background: #dbeafe;
    color: #1e40af;
}

.feedback-status-badge.in_progress {
    background: #fef3c7;
    color: #b45309;
}

.feedback-status-badge.resolved {
    background: #dcfce7;
    color: #16a34a;
}

.feedback-status-badge.dismissed {
    background: #e5e7eb;
    color: #6b7280;
}

/* Feedback Filters */
.filter-btn {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    margin-right: 8px;
    font-size: 0.9rem;
}

.filter-btn:hover {
    background: rgba(59, 130, 246, 0.05);
    border-color: var(--primary-color);
}

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

.feedback-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

/* Feedback modal title and label styling */
#feedback-modal h2 {
    font-size: 1.25rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}

#feedback-modal h2 i {
    color: var(--primary-color);
}

#feedback-modal label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 0.95rem;
}

#feedback-modal .form-group {
    margin-bottom: 16px;
}

/* ===================================
   Measure Page (Track AI Traffic)
   =================================== */

/* Page Introduction */
.page-intro {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(37, 99, 235, 0.05) 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
}

.intro-text {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.intro-benefits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: white;
    border-radius: 8px;
    border: 1px solid rgba(59, 130, 246, 0.15);
    font-size: 0.95rem;
    color: var(--text-primary);
}

.benefit-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* Card Header with Badge */
.card-header-with-badge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 12px;
}

.card-header-with-badge h2 {
    margin: 0;
}

.step-badge {
    display: inline-block;
    padding: 6px 12px;
    background: var(--primary-color);
    color: white;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.step-badge-optional {
    background: var(--text-secondary);
}

.section-description {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.section-description code {
    background: rgba(59, 130, 246, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--primary-color);
    font-family: 'Monaco', 'Courier New', monospace;
}

/* Enhanced Info Box */
.info-box-explained {
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.info-box-explained h4 {
    color: var(--primary-color);
    margin-bottom: 12px;
    font-size: 1.1rem;
}

.info-intro {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: 16px;
    font-weight: 500;
}

.explained-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.explained-list li {
    padding: 12px 0;
    border-bottom: 1px solid rgba(59, 130, 246, 0.1);
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-primary);
}

.explained-list li:last-child {
    border-bottom: none;
}

.explained-list li strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 4px;
}

.explained-list li code {
    background: rgba(59, 130, 246, 0.15);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85em;
    color: var(--primary-color);
    font-family: 'Monaco', 'Courier New', monospace;
}

/* Test Steps */
.test-step {
    margin-top: 20px;
}

.test-link-container,
.test-verify-container {
    background: rgba(248, 250, 252, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
}

.test-step-title {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.test-step-description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.test-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none !important;
}

/* Responsive Measure Page */
@media (max-width: 768px) {
    .page-intro {
        padding: 20px;
    }

    .intro-benefits {
        grid-template-columns: 1fr;
    }

    .benefit-item {
        padding: 10px 14px;
    }

    .card-header-with-badge {
        flex-direction: column;
        align-items: flex-start;
    }

    .test-link-container,
    .test-verify-container {
        padding: 16px;
    }
}

/* ===================================
   Alerts Page (Monitoring Configuration)
   =================================== */

/* Enhanced Config Items */
.config-item-enhanced {
    background: rgba(248, 250, 252, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.config-header {
    margin-bottom: 12px;
}

.config-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.config-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.config-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.95rem;
    color: var(--text-primary);
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.config-select:hover {
    border-color: var(--primary-color);
}

.config-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.config-description {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-top: 10px;
    margin-bottom: 0;
}

/* Toggle Switch Styling */
.config-label-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.config-checkbox {
    display: none;
}

.toggle-switch {
    position: relative;
    width: 48px;
    height: 26px;
    background: #e5e7eb;
    border-radius: 13px;
    transition: background 0.3s ease;
    flex-shrink: 0;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.config-checkbox:checked + .toggle-switch {
    background: var(--primary-color);
}

.config-checkbox:checked + .toggle-switch::after {
    transform: translateX(22px);
}

.config-label-text {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
}

/* Threshold Input Group */
.threshold-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.threshold-input-group .config-input {
    flex: 0 0 100px;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.95rem;
    color: var(--text-primary);
    background: white;
    transition: all 0.2s ease;
}

.threshold-input-group .config-input:hover:not(:disabled) {
    border-color: var(--primary-color);
}

.threshold-input-group .config-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.threshold-input-group .config-input:disabled {
    background: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
}

.threshold-unit {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Config Actions */
.config-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.save-status {
    font-size: 0.9rem;
    color: var(--success-color);
    font-weight: 500;
}

/* Responsive Alerts Page */
@media (max-width: 768px) {
    .config-item-enhanced {
        padding: 16px;
    }

    .config-label,
    .config-label-text {
        font-size: 0.95rem;
    }

    .config-icon {
        font-size: 1.1rem;
    }

    .threshold-input-group {
        flex-direction: column;
        align-items: flex-start;
    }

    .threshold-input-group .config-input {
        width: 100%;
    }

    .config-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .config-actions button {
        width: 100%;
    }
}

/* ===================================
   Prompts Page (Questions/Results)
   =================================== */

/* Summary Section Enhanced */
.summary-section {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(5, 150, 105, 0.05) 100%);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 30px;
}

.summary-header {
    margin-bottom: 12px;
}

.summary-header h3 {
    margin: 0;
    color: var(--success-color);
    font-size: 1.2rem;
}

.summary-content {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-primary);
    margin: 0;
}

/* Card Header Explained */
.card-header-explained {
    margin-bottom: 24px;
}

.card-header-explained h2 {
    margin: 0 0 8px 0;
}

/* Add Question Container */
.add-question-container {
    background: rgba(248, 250, 252, 0.6);
    border-radius: 8px;
    padding: 20px;
}

.add-question-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: var(--text-primary);
    font-size: 1rem;
}

.add-question-icon {
    font-size: 1.2rem;
    color: var(--primary-color);
}

.add-question-hint {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.add-question-inline {
    display: flex;
    gap: 12px;
    align-items: stretch;
    margin-bottom: 12px;
}

.add-question-inline input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.add-question-inline input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.add-question-inline .btn-add {
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.add-question-inline .btn-add:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.add-question-inline .btn-add:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    transform: none;
}

.add-question-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
}

.question-counter {
    font-weight: 600;
    color: var(--primary-color);
}

.counter-hint {
    color: var(--text-secondary);
}

/* Error Message */
.error-message {
    color: var(--error-color);
    font-size: 0.9rem;
    margin-top: 8px;
}

/* Responsive Prompts Page */
@media (max-width: 768px) {
    .add-question-container {
        padding: 16px;
    }

    .add-question-inline {
        flex-direction: column;
    }

    .add-question-inline .btn-add {
        width: 100%;
        justify-content: center;
    }

    .add-question-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}
