/* ==========================================================================
   SURVEY KEPUASAN MASYARAKAT (SKM) - MODERN DESIGN SYSTEM
   ========================================================================== */

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

:root {
    --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Color Palette */
    --primary: #2563EB;
    --primary-hover: #1D4ED8;
    --primary-light: #EFF6FF;
    --secondary: #06B6D4;

    --bg-main: #F8FAFC;
    --bg-card: #FFFFFF;
    --bg-sidebar: #0F172A;
    --text-main: #0F172A;
    --text-muted: #64748B;
    --text-light: #94A3B8;

    --border: #E2E8F0;
    --border-hover: #CBD5E1;

    /* Status Colors */
    --success: #10B981;
    --success-light: #D1FAE5;
    --info: #3B82F6;
    --info-light: #DBEAFE;
    --warning: #F59E0B;
    --warning-light: #FEF3C7;
    --danger: #EF4444;
    --danger-light: #FEE2E2;

    /* Shadows & Radius */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 8px 16px -2px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 20px 30px -5px rgba(15, 23, 42, 0.12);
    --shadow-glow: 0 0 25px rgba(37, 99, 235, 0.2);

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Admin Page Scroll & Selection Override */
body.admin-page {
    overflow-y: auto !important;
    height: auto !important;
    user-select: text !important;
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
}

body.admin-page .main-wrapper {
    height: auto !important;
    min-height: 100vh;
    overflow-y: visible !important;
    padding-bottom: 4rem;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    /* Kiosk Mode: Disable text selection across public view */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Custom Sleek, Short & Rounded Scrollbar inside Card & Input Areas */
#questionInputArea::-webkit-scrollbar,
.options-list::-webkit-scrollbar,
.table-responsive::-webkit-scrollbar,
::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}

#questionInputArea::-webkit-scrollbar-track,
.options-list::-webkit-scrollbar-track,
.table-responsive::-webkit-scrollbar-track,
::-webkit-scrollbar-track {
    background: #F1F5F9;
    border-radius: 10px;
    margin: 8px 0; /* Shortens the scrollbar track nicely! */
}

#questionInputArea::-webkit-scrollbar-thumb,
.options-list::-webkit-scrollbar-thumb,
.table-responsive::-webkit-scrollbar-thumb,
::-webkit-scrollbar-thumb {
    background: #3B82F6;
    border-radius: 10px;
}

#questionInputArea::-webkit-scrollbar-thumb:hover,
.options-list::-webkit-scrollbar-thumb:hover,
.table-responsive::-webkit-scrollbar-thumb:hover,
::-webkit-scrollbar-thumb:hover {
    background: #2563EB;
}

/* Enable text selection inside Admin Panel & form text inputs */
#adminView,
#adminView *,
input[type="text"],
textarea,
.form-control {
    user-select: text !important;
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
}

/* Floating Admin Lock Button for Fullscreen Kiosk - Discreet & Blended */
.floating-admin-btn {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(226, 232, 240, 0.3);
    color: rgba(148, 163, 184, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    text-decoration: none;
    z-index: 9999;
    transition: all 0.3s ease;
    border: 1px solid rgba(226, 232, 240, 0.4);
    opacity: 0.3;
}

.floating-admin-btn:hover {
    opacity: 1;
    background: var(--primary);
    color: #FFFFFF;
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

/* App Header & Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0.85rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-main);
}

.brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #FFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.brand-text h2 {
    font-size: 1.15rem;
    line-height: 1.2;
}

.brand-text p {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* App Main Container (Upper-Center Kiosk Ergonomics) */
.main-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
    min-height: 100vh;
}

/* Welcome Container & Single Line Title */
.welcome-container {
    max-width: 1200px;
    width: 95%;
    margin: 0 auto;
    text-align: center;
}

.welcome-title {
    font-size: clamp(1.1rem, 2.7vw, 2.2rem) !important;
    font-weight: 800;
    color: var(--text-main);
    white-space: nowrap !important;
    overflow: visible;
    margin-bottom: 1rem;
    line-height: 1.25;
    letter-spacing: -0.02em;
    width: 100%;
    display: block;
}

/* Glass Card */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    padding: 2rem;
    transition: var(--transition);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: #FFF;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

.btn-outline {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-success {
    background: linear-gradient(135deg, #10B981, #059669);
    color: #FFF;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-danger {
    background: #FEE2E2;
    color: #DC2626;
}

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

.btn-sm {
    padding: 0.4rem 0.85rem;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: 1.2rem 3rem;
    font-size: 1.3rem;
    border-radius: var(--radius-lg);
    gap: 0.85rem;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.4);
    letter-spacing: -0.01em;
}

.btn-lg:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 14px 35px rgba(37, 99, 235, 0.5);
}

.btn-lg:active {
    transform: translateY(0) scale(0.98);
}

#startSurveyBtn {
    animation: kioskBtnPulse 2.5s infinite;
}

@keyframes kioskBtnPulse {
    0% {
        box-shadow: 0 10px 30px rgba(37, 99, 235, 0.4);
    }

    50% {
        box-shadow: 0 14px 40px rgba(37, 99, 235, 0.65), 0 0 0 12px rgba(37, 99, 235, 0.12);
    }

    100% {
        box-shadow: 0 10px 30px rgba(37, 99, 235, 0.4);
    }
}

/* ==========================================================================
   1. FEATURE: WELCOME / PENYAPAAN SCREEN WITH ANIMATION
   ========================================================================== */
.welcome-container {
    min-height: 75vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding: 2rem 1rem;
}

.welcome-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(37, 99, 235, 0.2);
}

/* Animation Keyframes for Slide Fade In/Out */
@keyframes slideFadeUp {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideFadeOut {
    0% {
        opacity: 1;
        transform: translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateY(-30px);
    }
}

.animate-slide-up {
    animation: slideFadeUp 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-slide-out {
    animation: slideFadeOut 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.welcome-title {
    font-size: 2.75rem;
    line-height: 1.25;
    margin-bottom: 1.25rem;
    color: var(--text-main);
    max-width: 750px;
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1), transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
}

.welcome-title.title-fading {
    opacity: 0 !important;
    transform: translateY(-12px) !important;
}

.welcome-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2.5rem auto;
}

.welcome-illustration {
    width: 140px;
    height: 140px;
    margin-bottom: 2rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #E0F2FE, #DBEAFE);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.2);
    position: relative;
}

.welcome-illustration::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px dashed var(--primary);
    animation: spin 20s linear infinite;
    opacity: 0.4;
}

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

/* Waving Hand Animation */
@keyframes wave-animation {
    0% { transform: rotate(0.0deg); }
    10% { transform: rotate(14.0deg); }
    20% { transform: rotate(-8.0deg); }
    30% { transform: rotate(14.0deg); }
    40% { transform: rotate(-4.0deg); }
    50% { transform: rotate(10.0deg); }
    60% { transform: rotate(0.0deg); }
    100% { transform: rotate(0.0deg); }
}

.animate-wave {
    display: inline-block;
    transform-origin: 70% 70%;
    animation: wave-animation 1.8s 1 ease-in-out forwards;
}

/* Public View Container (Upper-Center Kiosk Ergonomics) */
#publicView {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 1.5rem;
}

/* ==========================================================================
   2. FEATURE: PUBLIC SURVEY ENGINE (PER PERTANYAAN)
   ========================================================================== */
.survey-card {
    width: 100%;
    max-width: 760px;
    margin: 1.5rem auto 2.5rem auto;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 2.25rem 2.5rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    position: relative;
}

/* Progress Header */
.survey-progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.progress-step-badge {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-light);
    padding: 0.35rem 0.9rem;
    border-radius: 30px;
}

.progress-bar-track {
    height: 8px;
    background: #F1F5F9;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 20px;
    transition: width 0.4s ease;
}

.question-title {
    font-size: 1.65rem;
    line-height: 1.35;
    color: var(--text-main);
    margin-bottom: 0.6rem;
}

.question-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* Answer Inputs Styling */

/* TYPE: EMOTICON RATING */
.emoticon-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin: 2rem 0;
}

.emoticon-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 0.75rem;
    border-radius: var(--radius-lg);
    border: 2px solid var(--border);
    background: #FAF5FF;
    background: #FFF;
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

.emoticon-option:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.12);
}

.emoticon-option.selected {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.2);
    transform: translateY(-4px) scale(1.03);
}

.emoticon-icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
    transition: transform 0.3s ease;
}

.emoticon-option:hover .emoticon-icon {
    transform: scale(1.18);
}

.emoticon-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
}

/* TYPE: STAR RATING */
.star-rating-container {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin: 2.5rem 0;
}

.star-btn {
    font-size: 2.75rem;
    color: #CBD5E1;
    cursor: pointer;
    transition: var(--transition);
}

.star-btn:hover,
.star-btn.active {
    color: #F59E0B;
    transform: scale(1.2);
    text-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

/* Star Pop Animation */
@keyframes popStarAnim {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.45) rotate(-12deg);
    }

    100% {
        transform: scale(1.2) rotate(0deg);
    }
}

.star-btn.pop-star {
    animation: popStarAnim 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Sad Shake Animation for 1 Star */
@keyframes sadShakeAnim {
    0% { transform: scale(1) rotate(0deg); }
    20% { transform: scale(1.25) rotate(-18deg); color: #EF4444; }
    40% { transform: scale(1.25) rotate(18deg); color: #EF4444; }
    60% { transform: scale(1.15) rotate(-10deg); color: #EF4444; }
    80% { transform: scale(1.05) rotate(10deg); }
    100% { transform: scale(1.2) rotate(0deg); }
}

.star-btn.shake-sad {
    animation: sadShakeAnim 0.45s ease-in-out;
}

.star-particle.sad-particle {
    font-size: 1.25rem;
    filter: drop-shadow(0 2px 6px rgba(239, 68, 68, 0.5));
}

/* Star Particle Explosion Splash */
.star-particle {
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    font-size: 1.2rem;
    line-height: 1;
    transform: translate(-50%, -50%) scale(0.4);
    opacity: 1;
    animation: starParticleFly 0.65s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    text-shadow: 0 0 12px rgba(245, 158, 11, 0.7);
    user-select: none;
}

@keyframes starParticleFly {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0.5) rotate(0deg);
    }

    50% {
        opacity: 1;
        transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(1.3) rotate(180deg);
    }

    100% {
        opacity: 0;
        transform: translate(calc(-50% + var(--tx) * 1.25), calc(-50% + var(--ty) * 1.25)) scale(0.1) rotate(360deg);
    }
}

/* Dynamic Rating Feedback Banner (Inside Card Right Below Options) */
.rating-feedback-banner-inside,
.rating-feedback-banner-outside {
    width: 100%;
    margin: 1.25rem 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.4;
    box-sizing: border-box;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    animation: feedbackFadeSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@media (max-width: 640px) {
    .rating-feedback-banner-inside,
    .rating-feedback-banner-outside {
        padding: 0.75rem 0.9rem;
        gap: 0.65rem;
        font-size: 0.85rem;
        margin: 0.85rem 0 0.4rem 0;
    }
}

@keyframes feedbackFadeSlideUp {
    0% {
        opacity: 0;
        transform: translateY(12px) scale(0.97);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.rating-feedback-banner-inside.level-1,
.rating-feedback-banner-outside.level-1 {
    background: #FEF2F2;
    border: 1px solid #FCA5A5;
    color: #991B1B;
}

.rating-feedback-banner-inside.level-2,
.rating-feedback-banner-outside.level-2 {
    background: #FFFBEB;
    border: 1px solid #FDE68A;
    color: #92400E;
}

.rating-feedback-banner-inside.level-3,
.rating-feedback-banner-outside.level-3 {
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    color: #1E40AF;
}

.rating-feedback-banner-inside.level-4,
.rating-feedback-banner-outside.level-4 {
    background: #ECFDF5;
    border: 1px solid #A7F3D0;
    color: #065F46;
}

.rating-feedback-banner-inside.level-5,
.rating-feedback-banner-outside.level-5 {
    background: linear-gradient(135deg, #FEF3C7, #FEF9C3);
    border: 1px solid #FDE68A;
    color: #78350F;
    box-shadow: 0 8px 22px rgba(245, 158, 11, 0.25);
}

.rating-feedback-banner-outside .feedback-icon {
    font-size: 1.65rem;
    flex-shrink: 0;
}

/* Inline Clickable Text Link inside Feedback Banner */
.inline-feedback-link {
    color: #2563EB;
    font-weight: 700;
    font-size: 0.86rem;
    text-decoration: underline;
    text-underline-offset: 3px;
    margin-left: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.inline-feedback-link:hover {
    color: #1D4ED8;
    transform: translateX(2px);
}

/* TYPE: RADIO & CHECKBOX CARDS (Exclusive Scroll Container) */
#questionInputArea {
    width: 100%;
    max-height: 38vh;
    overflow-y: auto;
    padding-right: 14px;
    margin: 1.25rem 0 1rem 0;
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin: 1.25rem 0;
}

.option-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    border-radius: var(--radius-md);
    border: 2px solid var(--border);
    background: #FFF;
    cursor: pointer;
    transition: var(--transition);
}

.option-card:hover {
    border-color: var(--primary);
    background: #F8FAFC;
}

.option-card.selected {
    border-color: var(--primary);
    background: var(--primary-light);
}

.option-card input[type="radio"],
.option-card input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
    cursor: pointer;
}

.option-card-label {
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--text-main);
    flex: 1;
}

/* TYPE: TEXT INPUT */
.survey-textarea {
    width: 100%;
    min-height: 140px;
    padding: 1.1rem;
    border-radius: var(--radius-md);
    border: 2px solid var(--border);
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-main);
    transition: var(--transition);
    resize: vertical;
    margin: 1.5rem 0;
}

.survey-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.survey-input-name {
    width: 100%;
    padding: 0.9rem 1.1rem;
    border-radius: var(--radius-md);
    border: 2px solid var(--border);
    font-family: var(--font-body);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.survey-input-name:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

/* Navigation Controls */
.survey-nav-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

/* Thank You Screen */
.thankyou-card {
    text-align: center;
    padding: 3.5rem 2rem;
}

.thankyou-icon {
    width: 90px;
    height: 90px;
    background: var(--success-light);
    color: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin: 0 auto 1.5rem auto;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.25);
}

/* ==========================================================================
   3. FEATURE: ADMIN DASHBOARD & MANAGEMENT
   ========================================================================== */
.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-nav-tabs {
    display: flex;
    gap: 0.5rem;
    background: #E2E8F0;
    padding: 0.35rem;
    border-radius: var(--radius-md);
}

.tab-btn {
    padding: 0.6rem 1.25rem;
    border: none;
    background: transparent;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.tab-btn.active {
    background: #FFF;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* Metrics Cards Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: var(--transition);
}

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

.stat-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

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

.stat-icon.success {
    background: var(--success-light);
    color: var(--success);
}

.stat-icon.warning {
    background: var(--warning-light);
    color: var(--warning);
}

.stat-icon.info {
    background: var(--info-light);
    color: var(--info);
}

.stat-info h3 {
    font-size: 1.75rem;
    line-height: 1.2;
}

.stat-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

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

.chart-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.chart-card h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Table Styling */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

.custom-table th {
    background: #F8FAFC;
    padding: 1rem 1.25rem;
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.custom-table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-main);
    vertical-align: middle;
}

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

.custom-table tr:hover td {
    background: #F8FAFC;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
}

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

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

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

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

/* Modal Dialog */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background: var(--bg-card);
    width: 100%;
    max-width: 600px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-backdrop.active .modal-card {
    transform: translateY(0);
}

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

.modal-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-muted);
    cursor: pointer;
}

/* Form Controls */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    font-family: var(--font-body);
    font-size: 0.95rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Custom Dropdown Component — see Export & Action Menus section below */

/* Discreet Floating Kiosk Admin Trigger */
.kiosk-admin-trigger {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.08);
    color: #94A3B8;
    border: 1px solid rgba(15, 23, 42, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    cursor: pointer;
    z-index: 100;
    opacity: 0.35;
    transition: all 0.25s ease;
}

.kiosk-admin-trigger:hover {
    opacity: 1;
    background: var(--primary);
    color: #FFF;
    border-color: var(--primary);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* ==========================================================================
   VIRTUAL ON-SCREEN KEYBOARD (STANDARD CLEAN LAYOUT)
   ========================================================================== */
.virtual-keyboard-container {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    width: 100%;
    max-width: 820px;
    background: #0F172A;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: none;
    padding: 0.85rem 1rem 1.1rem 1rem;
    z-index: 9999;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
    pointer-events: none;
    visibility: hidden;
}

.virtual-keyboard-container.active {
    transform: translateX(-50%) translateY(0);
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.5);
    pointer-events: auto;
    visibility: visible;
}

.virtual-keyboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.keyboard-title {
    color: #94A3B8;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.keyboard-close-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #CBD5E1;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    line-height: 1;
}

.keyboard-close-btn:hover {
    background: #EF4444;
    color: #FFF;
}

.virtual-keyboard-body {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    width: 100%;
}

.vk-row {
    display: flex;
    gap: 0.35rem;
    width: 100%;
}

.vk-key {
    flex: 1;
    height: 44px;
    background: #1E293B;
    color: #F8FAFC;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 7px;
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    transition: all 0.12s ease;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.3);
}

.vk-key:hover {
    background: #334155;
    color: #FFF;
    border-color: rgba(255, 255, 255, 0.2);
}

.vk-key:active {
    transform: translateY(2px);
    box-shadow: 0 0 0 rgba(0, 0, 0, 0.3);
    background: #2563EB;
}

.vk-key.vk-key-special {
    flex: 1.5;
    font-size: 0.9rem;
}

.vk-key.vk-accent {
    background: #334155;
}

.vk-key.vk-accent.active {
    background: #2563EB;
    color: #FFF;
}

.vk-key.vk-primary {
    flex: 2;
    background: #2563EB;
    color: #FFF;
    font-size: 0.9rem;
}

.vk-key.vk-primary:hover {
    background: #1D4ED8;
}

.vk-key.vk-danger {
    flex: 1.5;
    background: rgba(239, 68, 68, 0.3);
    color: #FCA5A5;
    border-color: rgba(239, 68, 68, 0.4);
}

.vk-key.vk-danger:hover {
    background: #EF4444;
    color: #FFF;
}

.vk-key.vk-space {
    flex: 6;
    background: #1E293B;
    font-size: 0.85rem;
    color: #94A3B8;
}

/* Hide / Show Utilities */
.d-none {
    display: none !important;
}

/* Navigation actions container inside survey card */
.survey-nav-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
    width: 100%;
}

/* Responsive adjustments */
@media (max-width: 850px) {
    .emoticon-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.85rem;
    }
}

@media (max-width: 640px) {
    .welcome-title {
        font-size: 1.65rem !important;
        white-space: normal !important;
    }

    .survey-card {
        padding: 1.25rem 1rem !important;
        margin: 0.5rem auto 1.5rem auto !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .emoticon-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.65rem !important;
        margin: 1.25rem 0 !important;
    }

    .emoticon-option {
        padding: 1.1rem 0.5rem !important;
    }

    .emoticon-icon {
        font-size: 2.25rem !important;
        margin-bottom: 0.4rem !important;
    }

    .emoticon-label {
        font-size: 0.82rem !important;
    }

    .star-rating-container {
        gap: 0.35rem !important;
        margin: 1.5rem 0 !important;
    }

    .star-btn {
        font-size: 2.2rem !important;
    }

    .survey-nav-actions {
        flex-direction: column-reverse !important;
        gap: 0.75rem !important;
        margin-top: 1.5rem !important;
        padding-top: 1rem !important;
    }

    .survey-nav-actions .btn {
        width: 100% !important;
        justify-content: center !important;
    }

    .navbar {
        padding: 0.75rem 1rem;
    }

    .brand-text h2 {
        font-size: 0.95rem;
    }

    .modal-card {
        padding: 1.5rem 1.25rem !important;
        width: 92% !important;
    }

    /* Hide Kiosk Admin Floating Lock Button on Mobile devices */
    .floating-admin-btn,
    #navAdminBtn {
        display: none !important;
    }
}

/* ==========================================================================
   4. PRINT STYLESHEET (FOR CERTIFIED REPORTS & EXPORT)
   ========================================================================== */
@media print {
    body {
        background: #FFF !important;
        color: #000 !important;
        padding: 0 !important;
    }

    .navbar,
    .admin-nav-tabs,
    .btn,
    .navbar-actions,
    .modal-backdrop {
        display: none !important;
    }

    .main-wrapper {
        max-width: 100% !important;
        padding: 0 !important;
    }

    .print-only-header {
        display: block !important;
        text-align: center;
        margin-bottom: 2rem;
        border-bottom: 2px solid #000;
        padding-bottom: 1rem;
    }

    .print-only-header h2 {
        font-size: 1.5rem;
        text-transform: uppercase;
    }

    .card {
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
    }

    .custom-table th,
    .custom-table td {
        border: 1px solid #000 !important;
        padding: 0.5rem !important;
        font-size: 0.85rem !important;
    }
}

.print-only-header {
    display: none;
}

/* Custom Centered Modal Dialog System */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.modal-card {
    background: #FFFFFF;
    border-radius: 24px;
    width: 92%;
    max-width: 580px;
    max-height: 82vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35);
    border: 1px solid rgba(226, 232, 240, 0.9);
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-backdrop.active .modal-card {
    transform: scale(1);
}

.modal-header {
    padding: 1.25rem 1.75rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #F8FAFC;
    flex-shrink: 0;
}

.modal-header h3 {
    font-size: 1.2rem;
    margin: 0;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 1.6rem;
    line-height: 1;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.2rem 0.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    color: var(--danger);
    background: #FEE2E2;
}

/* Internal Scroll Area inside Modal Card Body */
#detailModalBody,
#questionModal form,
#feedbackNoteModal .modal-card > div:not(.modal-header),
#adminLoginModal .modal-card > div:not(.modal-header) {
    overflow-y: auto !important;
    max-height: calc(82vh - 65px);
    padding: 1.75rem;
    box-sizing: border-box;
}

#detailModalBody::-webkit-scrollbar,
#questionModal form::-webkit-scrollbar,
#feedbackNoteModal .modal-card > div::-webkit-scrollbar {
    width: 7px;
}

#detailModalBody::-webkit-scrollbar-thumb,
#questionModal form::-webkit-scrollbar-thumb,
#feedbackNoteModal .modal-card > div::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

/* ==============================
   THANK YOU CARD & CHECKMARK ANIMATION
   ============================== */
.thankyou-card {
    text-align: center;
    padding: 3.5rem 2rem;
}

.thankyou-icon {
    width: 88px;
    height: 88px;
    margin: 0 auto 1.75rem auto;
    border-radius: 50%;
    background: linear-gradient(135deg, #DCFCE7, #D1FAE5);
    color: #10B981;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.75rem;
    box-shadow: 0 12px 30px rgba(16, 185, 129, 0.25);
    animation: checkmarkPop 0.85s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes checkmarkPop {
    0% {
        opacity: 0;
        transform: scale(0.1) rotate(-30deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.18) rotate(10deg);
    }
    70% {
        transform: scale(0.92) rotate(-4deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

/* Thank You Card slide-in */
#thankYouScreen.animate-slide-up {
    animation: slideFadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* ==========================================
   DROPDOWN MENU STYLING (Export & Action Menus)
   ========================================== */
.dropdown-wrapper {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 1050;
    display: none;
    min-width: 210px;
    padding: 0.5rem 0;
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-main);
    text-align: left;
    list-style: none;
    background-color: #ffffff;
    background-clip: padding-box;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    animation: dropdownFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.dropdown-menu.show {
    display: block !important;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.65rem 1rem;
    clear: both;
    font-weight: 500;
    color: #334155;
    text-align: inherit;
    text-decoration: none;
    white-space: nowrap;
    background-color: transparent;
    border: 0;
    cursor: pointer;
    transition: all 0.15s ease;
}

.dropdown-item:hover {
    color: var(--primary);
    background-color: #F1F5F9;
}

.dropdown-divider {
    height: 0;
    margin: 0.4rem 0;
    overflow: hidden;
    border-top: 1px solid #E2E8F0;
}

/* ==========================================
   PRINT STYLES FOR LAPORAN (PDF / PRINTING)
   ========================================== */
@media print {
    /* Hide non-printable elements */
    .admin-sidebar,
    .admin-header,
    .tab-navigation,
    .btn,
    .dropdown-wrapper,
    #clearAllRespondentsBtn,
    .modal-backdrop,
    .floating-admin-btn,
    #tenantTokenBadge,
    #newTenantAlert {
        display: none !important;
    }

    body, .admin-page, .admin-main {
        background: #ffffff !important;
        color: #000000 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .admin-content, .admin-tab-content, .card {
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
    }

    #tab_reports {
        display: block !important;
    }

    .table-responsive {
        overflow: visible !important;
    }

    .custom-table {
        width: 100% !important;
        border-collapse: collapse !important;
        font-size: 10pt !important;
    }

    .custom-table th, .custom-table td {
        border: 1px solid #cbd5e1 !important;
        padding: 6px 10px !important;
        color: #000000 !important;
    }

    .custom-table th {
        background-color: #f1f5f9 !important;
        font-weight: bold !important;
    }

    .badge {
        border: 1px solid #64748b !important;
        color: #000000 !important;
        background: transparent !important;
    }
}