/* LokSpandan AI - Premium Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-dark: #090d16;
    --bg-card: rgba(17, 24, 39, 0.55);
    --bg-card-hover: rgba(31, 41, 55, 0.75);
    --border-color: rgba(255, 255, 255, 0.06);
    --border-highlight: rgba(99, 102, 241, 0.25);
    
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
    --accent-gradient: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    --emerald-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
    
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #4b5563;
    
    --primary: #6366f1;
    --accent: #06b6d4;
    --emerald: #10b981;
    --rose: #f43f5e;
    
    --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    --shadow-premium: 0 20px 40px -15px rgba(0, 0, 0, 0.7), 0 1px 1px 0 rgba(255, 255, 255, 0.05) inset;
    --shadow-neon: 0 0 20px rgba(99, 102, 241, 0.15);
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-main);
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Glassmorphism utility */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-premium);
    transition: var(--transition-smooth);
}

.glass-panel:hover {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(17, 24, 39, 0.65);
}

/* App shell layouts */
#shell-view {
    flex-direction: column;
    min-height: 100vh;
}

#app-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header styling */
header {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(9, 13, 22, 0.7);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(to right, #f3f4f6, #9ca3af);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    white-space: nowrap;
}

.logo-text span {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 16px;
}

.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-admin {
    background: rgba(236, 72, 153, 0.1);
    color: #f472b6;
    border: 1px solid rgba(236, 72, 153, 0.2);
}

.badge-paid {
    background: rgba(99, 102, 241, 0.1);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.badge-surveyor {
    background: rgba(6, 182, 212, 0.1);
    color: #22d3ee;
    border: 1px solid rgba(6, 182, 212, 0.2);
}

/* Layout body wrapper */
.main-wrapper {
    display: flex;
    flex: 1;
    position: relative;
}

/* Sidebar navigation for Desktop */
aside {
    width: 260px;
    border-right: 1px solid var(--border-color);
    background: rgba(9, 13, 22, 0.35);
    padding: 32px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0;
}

@media (max-width: 1024px) {
    aside {
        display: none;
    }
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition-fast);
    border: 1px solid transparent;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-primary);
}

.nav-link.active {
    background: rgba(99, 102, 241, 0.08);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.15);
    box-shadow: var(--shadow-neon);
}

/* Bottom Navigation Bar for Mobile/Tablet */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: rgba(9, 13, 22, 0.95);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--border-color);
    z-index: 99;
    align-items: center;
    justify-content: space-around;
    padding-bottom: env(safe-area-inset-bottom);
}

@media (max-width: 1024px) {
    .mobile-nav {
        display: flex;
    }
    main {
        padding-bottom: 96px !important;
    }
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    flex: 1;
    height: 100%;
}

.mobile-nav-item svg {
    width: 22px;
    height: 22px;
}

.mobile-nav-item.active {
    color: #a5b4fc;
}

/* Main content container */
main {
    flex: 1;
    padding: 40px 48px;
    overflow-y: auto;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

@media (max-width: 640px) {
    main {
        padding: 20px;
    }
}

/* Authentication Page */
.auth-container {
    max-width: 440px;
    width: 100%;
    margin: auto;
    padding: 40px 32px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.auth-header {
    text-align: center;
}

.auth-title {
    font-size: 30px;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
    letter-spacing: -1px;
}

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

/* UI Elements: Forms and Inputs */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
}

.form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.2px;
}

.form-input {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 14px;
    transition: var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-textarea {
    width: 100%;
    min-height: 110px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 14px;
    resize: vertical;
    transition: var(--transition-fast);
}

.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* Select drop down custom premium styling */
select.question-type-select, select.form-input {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='white' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

select option {
    background-color: #0f172a;
    color: var(--text-primary);
    padding: 12px;
}

.btn {
    height: 48px;
    padding: 0 26px;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition-fast);
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 14px rgba(168, 85, 247, 0.35);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
}

.btn-danger {
    background: rgba(244, 63, 94, 0.1);
    color: #f43f5e;
    border: 1px solid rgba(244, 63, 94, 0.2);
}

.btn-danger:hover {
    background: rgba(244, 63, 94, 0.2);
}

.btn-sm {
    height: 38px;
    padding: 0 16px;
    font-size: 13px;
    border-radius: 10px;
}

/* Quick Mode Switcher */
.demo-accounts {
    margin-top: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    font-size: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.demo-account-chip {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid transparent;
    transition: var(--transition-fast);
}

.demo-account-chip:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(99, 102, 241, 0.2);
}

/* Dashboard views */
.view-section {
    display: none;
}

.view-section.active {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

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

/* Page Header & KPI Cards Grid */
.page-title-area {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    gap: 20px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 24px;
}

.page-title {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -1px;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.kpi-card {
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

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

.kpi-value {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -1.5px;
}

.kpi-trend {
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
}

.trend-up { color: #10b981; }
.trend-down { color: #f43f5e; }

/* Grid Dashboard layouts */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 32px;
    margin-bottom: 40px;
}

@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
}

.table-container {
    overflow-x: auto;
    width: 100%;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

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

td {
    padding: 18px 20px;
    font-size: 14px;
    border-bottom: 1px solid var(--border-color);
    color: #e2e8f0;
}

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

tr:hover td {
    background: rgba(255, 255, 255, 0.01);
}

/* Custom question builder UI */
.builder-area {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 32px;
}

@media (max-width: 1200px) {
    .builder-area {
        grid-template-columns: 1fr;
    }
}

.question-card {
    padding: 24px;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.question-type-select {
    padding: 8px 16px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
}

.question-options-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
    padding-left: 12px;
    border-left: 2px solid rgba(99, 102, 241, 0.2);
}

.option-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Insights Dashboard Components */
.insights-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 32px;
    margin-bottom: 40px;
}

@media (max-width: 1024px) {
    .insights-grid {
        grid-template-columns: 1fr;
    }
}

/* High Intelligence Analysis Panel */
.ai-summary-card {
    border: 1px solid rgba(168, 85, 247, 0.2);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.04) 0%, rgba(168, 85, 247, 0.06) 100%);
    padding: 32px;
    border-radius: 16px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-neon);
}

.ai-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.ai-badge {
    background: var(--primary-gradient);
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ai-title {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.ai-insights-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.ai-insight-item {
    display: flex;
    gap: 14px;
    line-height: 1.6;
}

.ai-insight-bullet {
    width: 26px;
    height: 26px;
    background: rgba(168, 85, 247, 0.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #d8b4fe;
    font-size: 14px;
}

/* Modern Dynamic Chart drawing styles */
.chart-container {
    height: 260px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 24px 12px 12px 12px;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.chart-bar-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    height: 100%;
    justify-content: flex-end;
    gap: 12px;
}

.chart-bar {
    width: 45%;
    border-radius: 8px 8px 0 0;
    background: var(--primary-gradient);
    transition: height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.2);
}

.chart-bar::after {
    content: attr(data-value);
    position: absolute;
    top: -26px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
}

.chart-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    text-align: center;
}

/* Pie Chart using SVG */
.donut-chart {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    height: 200px;
}

.donut-segment {
    transition: stroke-dashoffset 0.6s ease-in-out;
}

.donut-label {
    position: absolute;
    text-align: center;
}

.donut-val {
    font-size: 28px;
    font-weight: 800;
}

.donut-txt {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

/* Public Survey form filler view */
.public-survey-wrapper {
    max-width: 650px;
    margin: 40px auto;
    width: 100%;
}

.survey-header-banner {
    padding: 40px;
    border-radius: 16px 16px 0 0;
    background: var(--primary-gradient);
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.survey-body {
    padding: 40px;
    border-radius: 0 0 16px 16px;
    border-top: none;
}

.survey-question-block {
    margin-bottom: 32px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.question-text {
    font-size: 16px;
    font-weight: 600;
    color: #f3f4f6;
}

/* Star Rating Style */
.star-rating {
    display: flex;
    gap: 10px;
}

.star-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 32px;
    color: #374151;
    transition: var(--transition-fast);
}

.star-btn.selected {
    color: #fbbf24; /* Amber star color */
    transform: scale(1.18);
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.4);
}

/* Sentiment Slider styling */
.sentiment-slider-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sentiment-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.slider-input {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    outline: none;
}

.slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #818cf8;
    cursor: pointer;
    box-shadow: 0 0 10px #818cf8;
    transition: var(--transition-fast);
}

.slider-input::-webkit-slider-thumb:hover {
    transform: scale(1.25);
}

/* Toast message alert */
.toast {
    position: fixed;
    bottom: 32px;
    right: 32px;
    padding: 14px 28px;
    background: #10b981;
    color: white;
    border-radius: 12px;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
    z-index: 1000;
    display: none;
    animation: slideUp 0.3s ease-out;
}

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

/* Action Bar inside Dashboard cards */
.card-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* User management specific rows */
.user-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
}
.user-row:last-child {
    border-bottom: none;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
}

.user-role-label {
    font-size: 11px;
    color: var(--text-secondary);
}

/* Surveyor dynamic assign view */
.surveyor-card {
    padding: 20px;
    margin-bottom: 14px;
    cursor: pointer;
    border: 1px solid var(--border-color);
    transition: var(--transition-fast);
}

.surveyor-card:hover {
    border-color: rgba(99, 102, 241, 0.4);
    background: rgba(255, 255, 255, 0.02);
    transform: translateY(-2px);
}

/* === ADVANCED LIGHTWEIGHT FORM STYLES === */

/* Signature Canvas */
.signature-pad-container {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 400px;
}

.signature-canvas {
    background: #0d1220;
    border-radius: 8px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    cursor: crosshair;
    touch-action: none;
    width: 100%;
    height: 120px;
}

/* Likert Matrix Grid */
.matrix-container {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.matrix-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
}

.matrix-table th, .matrix-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

.matrix-table th {
    background: rgba(255, 255, 255, 0.02);
    font-weight: 700;
    color: var(--text-secondary);
}

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

.matrix-radio-cell {
    text-align: center;
}

.matrix-radio-cell input[type="radio"] {
    cursor: pointer;
    accent-color: var(--primary);
    width: 16px;
    height: 16px;
}

/* Matrix card view for Mobile displays */
@media (max-width: 640px) {
    .matrix-table {
        display: block;
    }
    .matrix-table thead {
        display: none; /* Hide standard columns header */
    }
    .matrix-table tbody, .matrix-table tr, .matrix-table td {
        display: block;
        width: 100%;
    }
    .matrix-table tr {
        border-bottom: 2px solid rgba(255, 255, 255, 0.06);
        padding: 12px 0;
    }
    .matrix-table td {
        border: none;
        padding: 8px 12px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .matrix-table td::before {
        content: attr(data-col-label);
        font-weight: 600;
        color: var(--text-secondary);
        font-size: 12px;
    }
    .matrix-table td.matrix-row-label {
        font-weight: 700;
        font-size: 14px;
        color: var(--primary);
        display: block;
        border-bottom: 1px solid rgba(255, 255, 255, 0.03);
        padding-bottom: 6px;
    }
    .matrix-table td.matrix-row-label::before {
        content: none;
    }
}

/* Emoji / Reactions */
.emoji-btn-group {
    display: flex;
    gap: 12px;
}

.emoji-btn {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.emoji-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: scale(1.15);
}

.emoji-btn.selected {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--primary);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.3);
    transform: scale(1.2);
}

/* Choice Sorting / Ranking list */
.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 400px;
}

.ranking-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
}

.ranking-actions {
    display: flex;
    gap: 6px;
}

.ranking-btn {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 12px;
}

.ranking-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* Date Range */
.date-range-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    max-width: 400px;
}

@media (max-width: 480px) {
    .date-range-container {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* === SEO PRODUCT LANDING PAGE STYLES === */

/* Landing header wrapper overrides standard header */
.landing-header {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(9, 13, 22, 0.45);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 90;
}

/* --- Mobile Hamburger Navigation Drawer --- */
.nav-toggle-label {
    display: none;
    cursor: pointer;
    width: 48px;
    height: 48px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    z-index: 100;
    position: relative;
    border-radius: 50%;
    transition: background 0.2s ease;
}
.nav-toggle-label:hover {
    background: rgba(255, 255, 255, 0.05);
}
.nav-toggle-label .bar {
    width: 22px;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hamburger animations when checked */
#nav-toggle:checked + .nav-toggle-label .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
#nav-toggle:checked + .nav-toggle-label .bar:nth-child(2) {
    opacity: 0;
}
#nav-toggle:checked + .nav-toggle-label .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
    .landing-header {
        height: 72px;
        display: flex;
        flex-direction: row !important;
        align-items: center;
        justify-content: space-between;
        padding: 0 20px;
    }
    .landing-header .logo-container {
        z-index: 100;
    }
    .nav-toggle-label {
        display: flex; /* Show hamburger button on mobile */
    }
    .landing-nav-menu {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        height: 100vh !important;
        width: 100vw !important;
        background: rgba(9, 13, 22, 0.98) !important;
        backdrop-filter: blur(24px) !important;
        -webkit-backdrop-filter: blur(24px) !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 20px !important;
        padding: 100px 40px 40px 40px !important;
        transform: translateY(-100%) !important;
        opacity: 0 !important;
        pointer-events: none !important;
        transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
        z-index: 95 !important;
        box-sizing: border-box !important;
        margin: 0 !important;
        overflow-y: auto !important;
    }
    #nav-toggle:checked ~ .landing-nav-menu {
        transform: translateY(0) !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }
    /* Style links as large buttons inside mobile drawer */
    .landing-nav-menu .nav-link,
    .landing-nav-menu button {
        width: 80% !important;
        max-width: 280px !important;
        min-height: 48px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 12px 24px !important;
        font-size: 16px !important;
        font-weight: 700 !important;
        border-radius: 12px !important;
        text-decoration: none !important;
        box-sizing: border-box !important;
        transition: all 0.2s ease !important;
        margin: 4px 0 !important;
    }
    .landing-nav-menu .nav-link {
        background: rgba(255, 255, 255, 0.03) !important;
        border: 1px solid rgba(255, 255, 255, 0.06) !important;
        color: var(--text-primary) !important;
    }
    .landing-nav-menu .nav-link:hover {
        background: rgba(255, 255, 255, 0.08) !important;
        border-color: rgba(255, 255, 255, 0.12) !important;
    }
    .landing-nav-menu button {
        margin-top: 12px !important;
    }
}

/* Hero section */
.hero-section {
    padding: 100px 40px 60px 40px;
    display: flex;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: "";
    position: absolute;
    top: -10%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 400px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, rgba(9, 13, 22, 0) 70%);
    z-index: -1;
    pointer-events: none;
}

.hero-content {
    max-width: 840px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.hero-badge {
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.hero-title {
    font-size: 48px;
    font-weight: 800;
    letter-spacing: -1.5px;
    line-height: 1.15;
    background: linear-gradient(135deg, #f3f4f6 0%, #d1d5db 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-title span {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 680px;
}

.hero-cta-group {
    display: flex;
    gap: 16px;
    margin-top: 10px;
}

@media (max-width: 640px) {
    .hero-section {
        padding: 60px 20px 40px 20px;
    }
    .hero-title {
        font-size: 32px;
        letter-spacing: -0.5px;
    }
    .hero-cta-group {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
    }
}

/* Features Grid */
.features-section {
    padding: 80px 40px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.section-title {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.75px;
    margin-bottom: 12px;
}

.section-title span {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 48px auto;
    line-height: 1.5;
}

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

.feature-card {
    padding: 32px 24px;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: var(--transition-smooth);
}

.feature-card:hover {
    border-color: rgba(99, 102, 241, 0.25);
    box-shadow: 0 10px 30px -15px rgba(99, 102, 241, 0.15);
}

.feature-icon {
    font-size: 28px;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-card h3 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.25px;
    color: var(--text-primary);
}

.feature-card p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

@media (max-width: 640px) {
    .features-section {
        padding: 40px 20px;
    }
}

/* FAQ Accordion Section */
.faq-section {
    padding: 60px 40px;
    max-width: 840px;
    margin: 0 auto;
    text-align: center;
}

.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 40px;
    text-align: left;
}

.faq-item {
    padding: 0;
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.faq-question {
    padding: 20px 24px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    transition: var(--transition-fast);
}

.faq-question::after {
    content: "+";
    font-size: 20px;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.faq-item.open .faq-question::after {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 24px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), padding 0.35s ease;
}

.faq-item.open .faq-answer {
    max-height: 200px;
    padding-bottom: 20px;
}

@media (max-width: 640px) {
    .faq-section {
        padding: 40px 20px;
    }
}

/* Footer layout */
.landing-footer {
    padding: 40px 20px;
    text-align: center;
    border-top: 1px solid var(--border-color);
    background: rgba(9, 13, 22, 0.25);
    margin-top: 60px;
}

.landing-footer p {
    font-size: 12px;
    color: var(--text-muted);
}

/* Authentication overlay */
.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.auth-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.auth-overlay .auth-container {
    max-width: 440px;
    width: 100%;
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: relative;
    border-color: var(--border-highlight);
    background: rgba(17, 24, 39, 0.85);
}

.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.modal-close-btn:hover {
    color: var(--text-primary);
}

/* Modal animation */
.animate-slide {
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.auth-overlay.active .animate-slide {
    transform: translateY(0);
}

/* === PRICING PACKAGES & LOADER ANIMATIONS === */

.packages-section {
    padding: 80px 40px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    margin-top: 48px;
}

.package-card {
    padding: 40px 32px;
    display: flex;
    flex-direction: column;
    text-align: center;
    border-radius: 20px;
    transition: var(--transition-smooth);
    min-height: 480px;
    position: relative;
}

.package-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.8);
}

/* Spinner Loader Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-width: 640px) {
    .packages-section {
        padding: 40px 20px;
    }
    .packages-grid {
        gap: 20px;
    }
}

/* Mobile Header User-Profile Adaptations */
@media (max-width: 768px) {
    #header-user-name {
        display: none !important;
    }
    header {
        padding: 0 16px !important;
    }
}

/* --- Global Dashboard Mobile Optimizations --- */
@media (max-width: 768px) {
    /* Main container padding adjustments */
    main {
        padding: 20px 16px !important;
    }
    
    /* Page Titles */
    .page-title-area {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 16px !important;
        padding-bottom: 16px !important;
        margin-bottom: 24px !important;
    }
    .page-title {
        font-size: 24px !important;
        text-align: left !important;
    }
    
    /* Layout wraps inside forms and grids */
    .content-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    
    /* KPI grids */
    .kpi-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
        margin-bottom: 24px !important;
    }
    .kpi-card {
        padding: 18px !important;
    }
    .kpi-value {
        font-size: 28px !important;
    }
    
    /* Buttons in headers */
    .page-title-area > div:last-child {
        width: 100% !important;
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
    }
    .page-title-area button {
        flex: 1 !important;
        min-width: 130px !important;
        justify-content: center !important;
    }
    
    /* Tables sizing & responsive card conversion on mobile */
    .table-container table:not(.insights-table), 
    .table-container table:not(.insights-table) thead, 
    .table-container table:not(.insights-table) tbody, 
    .table-container table:not(.insights-table) th, 
    .table-container table:not(.insights-table) td, 
    .table-container table:not(.insights-table) tr {
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .table-container table:not(.insights-table) thead {
        position: absolute !important;
        top: -9999px !important;
        left: -9999px !important;
    }
    
    .table-container table:not(.insights-table) tr {
        border: 1px solid var(--border-color) !important;
        border-radius: 14px !important;
        background: rgba(255, 255, 255, 0.02) !important;
        margin-bottom: 16px !important;
        padding: 12px 16px !important;
        box-shadow: 0 4px 20px rgba(0,0,0,0.15) !important;
    }
    
    .table-container table:not(.insights-table) td {
        border: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
        position: relative !important;
        padding: 10px 0 !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        text-align: right !important;
        font-size: 13px !important;
        min-height: 40px !important;
    }
    
    .table-container table:not(.insights-table) td:last-child {
        border-bottom: none !important;
        justify-content: flex-end !important;
        gap: 8px !important;
    }
    
    .table-container table:not(.insights-table) td::before {
        content: attr(data-label);
        font-weight: 700 !important;
        color: var(--text-secondary) !important;
        text-align: left !important;
        font-size: 11px !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
        flex-shrink: 0 !important;
        margin-right: 12px !important;
    }
    
    /* Keep insights responses spreadsheet scrollable */
    .insights-table {
        display: table !important;
        width: 100% !important;
    }
    .insights-table th, .insights-table td {
        display: table-cell !important;
        padding: 12px 10px !important;
        font-size: 13px !important;
        white-space: nowrap !important;
    }
}



