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

        :root {
            --blue-primary: #2B5F8A;
            --blue-hover: #1E4566;
            --blue-light: #E8F0F8;
            --blue-dark: #1A3A5C;
            --bg-page: #F5F7FA;
            --text-primary: #1A1A2E;
            --text-secondary: #5A6573;
            --text-muted: #8B95A5;
            --white: #FFFFFF;
            --success: #3D9970;
            --error: #B54242;
            --border: #D1D9E0;
            --shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.06);
            --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.08);
            --shadow-strong: 0 8px 32px rgba(43, 95, 138, 0.15);
        }

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

        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            background: var(--bg-page);
            color: var(--text-primary);
            line-height: 1.5;
            min-height: 100vh;
        }

        /* ===== START PAGE ===== */
        .start-page {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            min-height: 100vh;
            padding: 40px 24px;
            position: relative;
            background: linear-gradient(180deg, var(--bg-page) 0%, var(--white) 100%);
        }

        .start-page::before {
            content: '';
            position: absolute;
            top: -100px;
            right: -100px;
            width: 400px;
            height: 400px;
            background: radial-gradient(circle, var(--blue-light) 0%, transparent 70%);
            opacity: 0.6;
            pointer-events: none;
        }

        .start-page::after {
            content: '';
            position: absolute;
            bottom: -150px;
            left: -150px;
            width: 500px;
            height: 500px;
            background: radial-gradient(circle, var(--blue-light) 0%, transparent 70%);
            opacity: 0.4;
            pointer-events: none;
        }

        .start-content {
            position: relative;
            z-index: 1;
            max-width: 560px;
            width: 100%;
            text-align: center;
        }

        /* ===== LOGO ===== */
        .logo-block {
            margin-bottom: 32px;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 20px;
        }

        .logo-icon {
            width: 140px;
            height: 140px;
            background: var(--white);
            border-radius: 16px;
            box-shadow: var(--shadow-medium);
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            overflow: visible;
        }

        .logo-icon svg {
            width: 100px;
            height: 78px;
            color: var(--blue-primary);
            overflow: visible !important;
        }

        /* ===== GAUGE ANIMATIONS ===== */
        .center-dot {
            animation: centerPulse 3s ease-in-out infinite;
        }

        @keyframes centerPulse {
            0%, 100% { opacity: 1; r: 5.5; }
            50% { opacity: 0.75; r: 5; }
        }

        .center-glow {
            animation: glowPulse 3s ease-in-out infinite;
        }

        @keyframes glowPulse {
            0%, 100% { opacity: 0.18; }
            50% { opacity: 0.08; }
        }

        .logo-text {
            font-size: 40px;
            font-weight: 800;
            color: var(--text-primary);
            letter-spacing: -0.5px;
            line-height: 1.2;
        }

        .logo-text span {
            color: var(--blue-primary);
        }

        .logo-subtitle {
            font-size: 17px;
            color: var(--text-secondary);
            font-weight: 400;
            margin-top: 6px;
        }

        /* ===== SWIPE SLIDER ===== */
        .swipe-container {
            position: relative;
            width: 100%;
            height: 64px;
            background: var(--bg-page);
            border-radius: 14px;
            overflow: hidden;
            user-select: none;
            touch-action: none;
        }

        .swipe-track {
            position: absolute;
            top: 0;
            left: 0;
            height: 100%;
            width: 0;
            background: var(--blue-light);
            border-radius: 12px;
            transition: width 0.15s ease-out;
            pointer-events: none;
        }

        .swipe-thumb {
            position: absolute;
            top: 6px;
            left: 6px;
            width: 104px;
            height: 52px;
            background: var(--blue-primary);
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: grab;
            box-shadow: 0 2px 12px rgba(43, 95, 138, 0.35);
            transition: transform 0.15s ease-out, background 0.2s ease;
            z-index: 2;
            touch-action: none;
        }

        .swipe-thumb:active {
            cursor: grabbing;
            transform: scale(1.05);
            background: var(--blue-hover);
        }

        .swipe-thumb svg {
            width: 22px;
            height: 22px;
            color: var(--white);
            flex-shrink: 0;
        }

        .swipe-label {
            position: absolute;
            top: 0;
            left: 120px;
            right: 16px;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 15px;
            font-weight: 600;
            color: var(--blue-primary);
            pointer-events: none;
            transition: opacity 0.2s ease;
            gap: 8px;
        }

        .swipe-label svg {
            width: 18px;
            height: 18px;
            color: var(--blue-primary);
        }

        .swipe-container.unlocked .swipe-thumb {
            background: var(--success);
            box-shadow: 0 2px 8px rgba(61, 153, 112, 0.3);
        }

        .swipe-container.unlocked .swipe-track {
            background: rgba(61, 153, 112, 0.12);
        }

        .swipe-container.unlocked .swipe-label {
            color: var(--success);
        }

        .swipe-container.unlocked .swipe-label svg {
            color: var(--success);
        }

        /* ===== SERVICE EVALUATION ===== */
        .service-eval-page {
            max-width: 680px;
            margin: 0 auto;
            padding: 32px 24px 48px;
        }

        .eval-progress-section {
            margin-bottom: 32px;
        }

        .eval-progress-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
        }

        .eval-progress-label {
            font-size: 14px;
            font-weight: 600;
            color: var(--text-secondary);
        }

        .eval-progress-count {
            font-size: 13px;
            color: var(--text-muted);
        }

        .eval-progress-track {
            height: 8px;
            background: var(--border-light);
            border-radius: 4px;
            overflow: hidden;
        }

        .eval-progress-fill {
            height: 100%;
            background: var(--blue-primary);
            border-radius: 4px;
            transition: width 0.4s ease;
        }

        .service-eval-card {
            background: var(--white);
            border-radius: 20px;
            box-shadow: var(--shadow-soft);
            padding: 32px;
            margin-bottom: 24px;
        }

        .service-eval-name {
            font-size: 18px;
            font-weight: 700;
            color: var(--text-primary);
            margin-bottom: 8px;
            line-height: 1.4;
        }

        .service-eval-question {
            font-size: 15px;
            color: var(--text-secondary);
            margin-bottom: 28px;
        }

        .emoji-container {
            display: flex;
            justify-content: center;
            gap: 32px;
            margin-bottom: 4px;
        }

        .emoji-btn {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
            background: none;
            border: 2px solid transparent;
            border-radius: 16px;
            padding: 16px 20px;
            cursor: pointer;
            transition: all 0.25s ease;
            font-family: inherit;
        }

        .emoji-btn:hover {
            background: var(--bg-page);
            transform: translateY(-3px);
        }

        .emoji-btn.selected-negative {
            background: var(--bg-page);
            border-color: #C44;
            box-shadow: 0 4px 16px rgba(196, 68, 68, 0.12);
        }

        .emoji-btn.selected-neutral {
            background: var(--bg-page);
            border-color: #D4A72E;
            box-shadow: 0 4px 16px rgba(212, 167, 46, 0.12);
        }

        .emoji-btn.selected-positive {
            background: var(--bg-page);
            border-color: #3D9970;
            box-shadow: 0 4px 16px rgba(61, 153, 112, 0.12);
        }

        .emoji-face {
            width: 56px;
            height: 56px;
        }

        .emoji-label {
            font-size: 13px;
            font-weight: 500;
            color: var(--text-secondary);
        }

        .params-block {
            margin-top: 24px;
            padding-top: 24px;
            border-top: 1px solid var(--border-light);
            display: none;
        }

        .params-block.visible {
            display: block;
            animation: fadeInUp 0.3s ease;
        }

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

        .params-title {
            font-size: 14px;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 14px;
        }

        .params-list {
            display: flex;
            flex-direction: column;
            gap: 10px;
            margin-bottom: 20px;
        }

        .param-checkbox {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px 16px;
            background: var(--bg-page);
            border-radius: 12px;
            cursor: pointer;
            transition: all 0.2s ease;
            border: 1.5px solid transparent;
        }

        .param-checkbox:hover {
            border-color: var(--blue-primary);
            background: rgba(43, 95, 138, 0.04);
        }

        .param-checkbox input[type="checkbox"] {
            width: 20px;
            height: 20px;
            accent-color: var(--blue-primary);
            flex-shrink: 0;
            cursor: pointer;
        }

        .param-checkbox span {
            font-size: 14px;
            color: var(--text-secondary);
            line-height: 1.4;
        }
        /* === Mood-colored checkboxes === */
        /* Negative (red) */
        #paramsList.mood-negative .param-checkbox input[type="checkbox"] {
            accent-color: #C44;
        }
        #paramsList.mood-negative .param-checkbox:hover {
            border-color: rgba(204, 68, 68, 0.6);
            background: rgba(204, 68, 68, 0.05);
        }
        #paramsList.mood-negative .param-checkbox:has(input:checked) {
            border-color: #C44;
            background: rgba(204, 68, 68, 0.07);
        }
        /* Neutral (yellow) */
        #paramsList.mood-neutral .param-checkbox input[type="checkbox"] {
            accent-color: #D4A72E;
        }
        #paramsList.mood-neutral .param-checkbox:hover {
            border-color: rgba(212, 167, 46, 0.6);
            background: rgba(212, 167, 46, 0.05);
        }
        #paramsList.mood-neutral .param-checkbox:has(input:checked) {
            border-color: #D4A72E;
            background: rgba(212, 167, 46, 0.07);
        }
        /* Positive (green) */
        #paramsList.mood-positive .param-checkbox input[type="checkbox"] {
            accent-color: #3D9970;
        }
        #paramsList.mood-positive .param-checkbox:hover {
            border-color: rgba(61, 153, 112, 0.6);
            background: rgba(61, 153, 112, 0.05);
        }
        #paramsList.mood-positive .param-checkbox:has(input:checked) {
            border-color: #3D9970;
            background: rgba(61, 153, 112, 0.07);
        }


        .comment-block {
            margin-top: 20px;
        }

        .comment-label {
            font-size: 14px;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 4px;
            display: block;
        }

        .comment-label .required-mark {
            color: #C44;
            margin-left: 2px;
        }

        .comment-hint {
            font-size: 12px;
            color: var(--text-muted);
            margin-bottom: 10px;
            line-height: 1.5;
        }

        .comment-textarea {
            width: 100%;
            min-height: 100px;
            border: 1.5px solid var(--border-light);
            border-radius: 12px;
            padding: 14px 16px;
            font-size: 14px;
            font-family: inherit;
            color: var(--text-primary);
            background: var(--bg-page);
            resize: vertical;
            transition: border-color 0.2s ease, box-shadow 0.2s ease;
            box-sizing: border-box;
        }

        .comment-textarea:focus {
            outline: none;
            border-color: var(--blue-primary);
            box-shadow: 0 0 0 3px rgba(43, 95, 138, 0.1);
        }

        .comment-textarea.error {
            border-color: #C44;
            box-shadow: 0 0 0 3px rgba(196, 68, 68, 0.1);
        }

        .error-msg {
            font-size: 12px;
            color: #C44;
            margin-top: 6px;
            display: none;
        }

        .error-msg.visible {
            display: block;
        }

        .eval-nav-row {
            display: flex;
            justify-content: center;
            align-items: center;
            margin-top: 8px;
            gap: 12px;
        }

        .eval-btn-next {
            height: 56px;
            padding: 0 48px;
            background: var(--blue-primary);
            color: var(--white);
            border: none;
            border-radius: 14px;
            font-size: 16px;
            font-weight: 600;
            font-family: inherit;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            box-shadow: 0 4px 16px rgba(43, 95, 138, 0.2);
            transition: all 0.2s ease;
        }

        .eval-btn-next:hover {
            background: var(--blue-hover);
            transform: translateY(-1px);
            box-shadow: 0 6px 20px rgba(43, 95, 138, 0.25);
        }

        .eval-btn-next:disabled {
            background: #C5CDD6;
            cursor: not-allowed;
            transform: none;
            box-shadow: none;
        }

        .eval-btn-next svg {
            width: 20px;
            height: 20px;
        }

        .eval-btn-skip {
            height: 44px;
            padding: 0 32px;
            background: none;
            color: var(--text-muted);
            border: 1.5px solid var(--border-light);
            border-radius: 12px;
            font-size: 14px;
            font-weight: 500;
            font-family: inherit;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .eval-btn-skip:hover {
            border-color: var(--text-secondary);
            color: var(--text-secondary);
        }

        @media (max-width: 640px) {
            .service-eval-card {
                padding: 24px 20px;
            }

            .emoji-container {
                gap: 16px;
            }

            .emoji-btn {
                padding: 12px 14px;
            }

            .emoji-face {
                width: 48px;
                height: 48px;
            }

            .service-eval-name {
                font-size: 16px;
            }
        }

        /* ===== FINAL FEEDBACK PAGE ===== */
        .final-feedback-page {
            display: none;
            max-width: 680px;
            margin: 0 auto;
            padding: 32px 24px 48px;
        }

        .final-feedback-page.active {
            display: block;
        }

        .final-feedback-card {
            background: var(--white);
            border-radius: 20px;
            box-shadow: var(--shadow-soft);
            padding: 32px;
            margin-bottom: 24px;
        }

        .final-feedback-title {
            font-size: 20px;
            font-weight: 700;
            color: var(--text-primary);
            margin-bottom: 8px;
        }

        .final-feedback-subtitle {
            font-size: 14px;
            color: var(--text-secondary);
            margin-bottom: 28px;
            line-height: 1.6;
        }

        .final-field {
            margin-bottom: 24px;
        }

        .final-field:last-child {
            margin-bottom: 0;
        }

        .final-field-label {
            font-size: 14px;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 6px;
            display: block;
        }

        .final-field-hint {
            font-size: 12px;
            color: var(--text-muted);
            margin-bottom: 10px;
            line-height: 1.5;
        }

        .final-textarea {
            width: 100%;
            min-height: 90px;
            border: 1.5px solid var(--border-light);
            border-radius: 12px;
            padding: 14px 16px;
            font-size: 14px;
            font-family: inherit;
            color: var(--text-primary);
            background: var(--bg-page);
            resize: vertical;
            transition: border-color 0.2s ease, box-shadow 0.2s ease;
            box-sizing: border-box;
        }

        .final-textarea:focus {
            outline: none;
            border-color: var(--blue-primary);
            box-shadow: 0 0 0 3px rgba(43, 95, 138, 0.1);
        }

        .final-textarea::placeholder {
            color: var(--text-muted);
        }

        .final-btn-submit {
            width: 100%;
            height: 56px;
            background: var(--success);
            color: var(--white);
            border: none;
            border-radius: 14px;
            font-size: 16px;
            font-weight: 600;
            font-family: inherit;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            box-shadow: 0 4px 16px rgba(61, 153, 112, 0.25);
            transition: all 0.2s ease;
        }

        .final-btn-submit:hover {
            background: #358F6A;
            transform: translateY(-1px);
            box-shadow: 0 6px 20px rgba(61, 153, 112, 0.3);
        }

        .final-btn-submit svg {
            width: 20px;
            height: 20px;
        }

        @media (max-width: 640px) {
            .final-feedback-card {
                padding: 24px 20px;
            }

            .final-feedback-title {
                font-size: 18px;
            }
        }

        /* ===== SERVICE CARD ===== */
        .service-card {
            background: var(--white);
            border-radius: 16px;
            padding: 40px 36px;
            box-shadow: var(--shadow-strong);
            margin-bottom: 32px;
            border: 1px solid var(--blue-light);
        }

        .service-title {
            font-size: 22px;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
        }

        .service-title svg {
            width: 24px;
            height: 24px;
            color: var(--blue-primary);
            flex-shrink: 0;
        }

        .service-description {
            font-size: 15px;
            color: var(--text-secondary);
            line-height: 1.7;
            margin-bottom: 28px;
        }

        .service-features {
            display: flex;
            flex-direction: column;
            gap: 12px;
            margin-bottom: 32px;
            text-align: left;
        }

        .feature-item {
            display: flex;
            align-items: flex-start;
            gap: 12px;
            padding: 12px 16px;
            background: var(--bg-page);
            border-radius: 10px;
            transition: all 200ms ease-out;
        }

        .feature-item:hover {
            background: var(--blue-light);
            transform: translateX(4px);
        }

        .feature-icon {
            width: 36px;
            height: 36px;
            background: var(--white);
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            box-shadow: var(--shadow-soft);
        }

        .feature-icon svg {
            width: 18px;
            height: 18px;
            color: var(--blue-primary);
        }

        .feature-text {
            font-size: 14px;
            color: var(--text-primary);
            font-weight: 500;
            line-height: 1.5;
            padding-top: 2px;
        }

        .feature-text small {
            display: block;
            font-size: 12px;
            color: var(--text-secondary);
            font-weight: 400;
            margin-top: 2px;
        }

        /* ===== START BUTTON ===== */
        .btn-start {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            width: 100%;
            height: 56px;
            padding: 0 32px;
            border-radius: 12px;
            background: var(--blue-primary);
            color: var(--white);
            font-family: inherit;
            font-size: 16px;
            font-weight: 600;
            border: none;
            cursor: pointer;
            transition: all 200ms ease-out;
            box-shadow: 0 4px 12px rgba(43, 95, 138, 0.3);
            position: relative;
            overflow: hidden;
        }

        .btn-start::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
            transition: left 500ms ease-out;
        }

        .btn-start:hover::before {
            left: 100%;
        }

        .btn-start:hover {
            background: var(--blue-hover);
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(43, 95, 138, 0.4);
        }

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

        .btn-start svg {
            width: 20px;
            height: 20px;
        }

        /* ===== OUROBOROS CREDIT ===== */
        .ouroboros-credit {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            margin-top: 24px;
            padding: 10px 20px;
            background: var(--white);
            border-radius: 24px;
            box-shadow: var(--shadow-soft);
            border: 1px solid var(--blue-light);
            font-size: 12px;
            color: var(--text-muted);
            font-weight: 400;
        }

        .ouroboros-credit svg {
            width: 16px;
            height: 16px;
            color: var(--blue-primary);
            flex-shrink: 0;
        }

        .ouroboros-credit strong {
            color: var(--blue-primary);
            font-weight: 600;
        }

        /* ===== ADMIN LINK ===== */
        .admin-link {
            margin-top: 20px;
            text-align: center;
        }

        .admin-link a {
            font-size: 12px;
            color: var(--text-muted);
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 6px 14px;
            border-radius: 6px;
            transition: all 200ms ease-out;
            border: 1px solid transparent;
        }

        .admin-link a:hover {
            color: var(--blue-primary);
            background: var(--blue-light);
            border-color: var(--blue-light);
        }

        .admin-link a svg {
            width: 14px;
            height: 14px;
        }

        /* ===== FOOTER ===== */
        .start-footer {
            position: absolute;
            bottom: 24px;
            left: 0;
            right: 0;
            text-align: center;
            font-size: 11px;
            color: var(--text-muted);
            z-index: 1;
        }

        /* ===== SURVEY PAGES (hidden initially) ===== */
        .survey-wrapper {
            display: none;
        }

        .survey-wrapper.active {
            display: block;
        }

        /* ===== HEADER ===== */
        .header {
            background: var(--white);
            border-bottom: 1px solid var(--border);
            padding: 16px 24px;
            position: sticky;
            top: 0;
            z-index: 100;
        }

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

        .header-left {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .header-logo {
            width: 32px;
            height: 32px;
            background: var(--blue-light);
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .header-logo svg {
            width: 18px;
            height: 18px;
            color: var(--blue-primary);
        }

        .header-title-text {
            font-size: 16px;
            font-weight: 600;
            color: var(--text-primary);
        }

        .header-anon {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 12px;
            color: var(--text-secondary);
            white-space: nowrap;
        }

        .header-anon svg {
            width: 16px;
            height: 16px;
            color: var(--success);
        }

        /* ===== PROGRESS BAR ===== */
        .progress-section {
            background: var(--white);
            padding: 12px 24px 16px;
            border-bottom: 1px solid var(--border);
        }

        .progress-inner {
            max-width: 720px;
            margin: 0 auto;
        }

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

        .progress-label {
            font-size: 13px;
            font-weight: 500;
            color: var(--blue-primary);
        }

        .progress-time {
            display: flex;
            align-items: center;
            gap: 4px;
            font-size: 12px;
            color: var(--text-secondary);
        }

        .progress-time svg {
            width: 14px;
            height: 14px;
        }

        .progress-bar-track {
            height: 6px;
            background: var(--blue-light);
            border-radius: 3px;
            overflow: hidden;
        }

        .progress-bar-fill {
            height: 100%;
            background: var(--blue-primary);
            border-radius: 3px;
            transition: width 400ms ease-out;
        }

        /* ===== MAIN CONTENT ===== */
        .main {
            max-width: 720px;
            margin: 0 auto;
            padding: 24px 16px 40px;
        }

        /* ===== QUESTION CARD ===== */
        .question-card {
            background: var(--white);
            border-radius: 12px;
            padding: 28px 32px;
            box-shadow: var(--shadow-soft);
            margin-bottom: 16px;
            animation: cardAppear 300ms ease-out;
        }

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

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

        .question-icon {
            width: 40px;
            height: 40px;
            background: var(--blue-light);
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .question-icon svg {
            width: 22px;
            height: 22px;
            color: var(--blue-primary);
        }

        .question-text-block {
            flex: 1;
        }

        .question-number {
            font-size: 12px;
            font-weight: 500;
            color: var(--blue-primary);
            margin-bottom: 4px;
        }

        .question-text {
            font-size: 16px;
            font-weight: 500;
            color: var(--text-primary);
            line-height: 1.5;
        }

        .question-required {
            display: inline-flex;
            align-items: center;
            gap: 2px;
            font-size: 12px;
            color: var(--error);
            margin-top: 6px;
        }

        .question-required svg {
            width: 12px;
            height: 12px;
        }

        .question-description {
            font-size: 14px;
            color: var(--text-secondary);
            margin-top: 8px;
            padding-left: 52px;
        }

        /* ===== SCALE BUTTONS ===== */
        .scale-container {
            display: flex;
            gap: 8px;
            justify-content: center;
            flex-wrap: wrap;
            margin-top: 20px;
            padding-left: 52px;
        }

        .scale-btn {
            width: 48px;
            height: 48px;
            border: 1px solid var(--border);
            border-radius: 8px;
            background: var(--white);
            color: var(--text-secondary);
            font-size: 16px;
            font-weight: 500;
            font-family: inherit;
            cursor: pointer;
            transition: all 150ms ease-in-out;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .scale-btn:hover {
            background: var(--blue-light);
            border-color: var(--blue-primary);
            color: var(--blue-primary);
            transform: scale(1.05);
        }

        .scale-btn.active {
            background: var(--blue-primary);
            border-color: var(--blue-primary);
            color: var(--white);
            transform: scale(1.05);
        }

        .scale-labels {
            display: flex;
            justify-content: space-between;
            padding-left: 52px;
            margin-top: 8px;
            font-size: 12px;
            color: var(--text-secondary);
        }

        /* ===== STAR RATING ===== */
        .star-container {
            display: flex;
            gap: 8px;
            justify-content: center;
            padding-left: 52px;
            margin-top: 20px;
        }

        .star-btn {
            background: none;
            border: none;
            cursor: pointer;
            padding: 4px;
            transition: transform 150ms ease-in-out;
        }

        .star-btn:hover {
            transform: scale(1.15);
        }

        .star-btn svg {
            width: 36px;
            height: 36px;
            color: var(--border);
            transition: color 150ms ease-in-out;
        }

        .star-btn.active svg,
        .star-btn:hover svg {
            color: var(--blue-primary);
        }

        .star-labels {
            display: flex;
            justify-content: space-between;
            padding-left: 52px;
            margin-top: 8px;
            font-size: 12px;
            color: var(--text-secondary);
        }

        /* ===== RADIO OPTIONS ===== */
        .radio-group {
            display: flex;
            flex-direction: column;
            gap: 8px;
            padding-left: 52px;
            margin-top: 16px;
        }

        .radio-option {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 14px 16px;
            border: 1px solid var(--border);
            border-radius: 8px;
            background: var(--white);
            cursor: pointer;
            transition: all 150ms ease-in-out;
            font-size: 15px;
            color: var(--text-primary);
        }

        .radio-option:hover {
            background: var(--blue-light);
            border-color: var(--blue-primary);
        }

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

        .radio-circle {
            width: 20px;
            height: 20px;
            border: 2px solid var(--border);
            border-radius: 50%;
            flex-shrink: 0;
            transition: all 150ms ease-in-out;
            position: relative;
        }

        .radio-option.selected .radio-circle {
            border-color: var(--blue-primary);
            background: var(--blue-primary);
        }

        .radio-option.selected .radio-circle::after {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 8px;
            height: 8px;
            background: var(--white);
            border-radius: 50%;
        }

        /* ===== TEXTAREA ===== */
        .textarea-wrapper {
            padding-left: 52px;
            margin-top: 16px;
        }

        .textarea-field {
            width: 100%;
            min-height: 120px;
            padding: 14px 16px;
            border: 1px solid var(--border);
            border-radius: 8px;
            background: var(--white);
            font-family: inherit;
            font-size: 15px;
            color: var(--text-primary);
            resize: vertical;
            transition: all 200ms ease-out;
            line-height: 1.6;
        }

        .textarea-field::placeholder {
            color: var(--text-muted);
        }

        .textarea-field:focus {
            outline: none;
            border-color: var(--blue-primary);
            box-shadow: 0 0 0 3px rgba(43, 95, 138, 0.15);
        }

        .textarea-counter {
            text-align: right;
            font-size: 12px;
            color: var(--text-secondary);
            margin-top: 6px;
        }

        /* ===== NAVIGATION BUTTONS ===== */
        .nav-buttons {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 24px;
            gap: 12px;
        }

        .btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            height: 48px;
            padding: 0 28px;
            border-radius: 8px;
            font-family: inherit;
            font-size: 15px;
            font-weight: 500;
            cursor: pointer;
            transition: all 200ms ease-out;
            border: none;
            text-decoration: none;
        }

        .btn-primary {
            background: var(--blue-primary);
            color: var(--white);
        }

        .btn-primary:hover {
            background: var(--blue-hover);
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(43, 95, 138, 0.25);
        }

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

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

        .btn svg {
            width: 18px;
            height: 18px;
        }

        .btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            transform: none !important;
            box-shadow: none !important;
        }

        /* ===== THANK YOU PAGE ===== */
        .thank-you-page {
            display: none;
            text-align: center;
            padding: 60px 24px;
            animation: cardAppear 500ms ease-out;
        }

        .thank-you-page.active {
            display: block;
        }

        .thank-you-icon {
            width: 80px;
            height: 80px;
            margin: 0 auto 24px;
            color: var(--success);
            animation: iconPop 500ms ease-out;
        }

        @keyframes iconPop {
            0% { transform: scale(0.5) rotate(-10deg); opacity: 0; }
            60% { transform: scale(1.1) rotate(2deg); }
            100% { transform: scale(1) rotate(0deg); opacity: 1; }
        }

        .thank-you-title {
            font-size: 24px;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 12px;
        }

        .thank-you-desc {
            font-size: 16px;
            color: var(--text-secondary);
            margin-bottom: 32px;
            max-width: 400px;
            margin-left: auto;
            margin-right: auto;
        }

        /* ===== ERROR STATE ===== */
        .question-card.error {
            border: 1px solid var(--error);
            animation: shake 300ms ease-in-out;
        }

        @keyframes shake {
            0%, 100% { transform: translateX(0); }
            25% { transform: translateX(-6px); }
            75% { transform: translateX(6px); }
        }

        .error-tooltip {
            display: none;
            align-items: center;
            gap: 6px;
            padding: 10px 14px;
            background: #FDE8E8;
            border-radius: 6px;
            margin-top: 12px;
            margin-left: 52px;
            font-size: 13px;
            color: var(--error);
        }

        .question-card.error .error-tooltip {
            display: flex;
        }

        .error-tooltip svg {
            width: 16px;
            height: 16px;
            flex-shrink: 0;
        }

        /* ===== PAGE INDICATORS ===== */
        .page-indicator {
            text-align: center;
            margin-bottom: 20px;
        }

        .page-dots {
            display: flex;
            gap: 8px;
            justify-content: center;
        }

        .page-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: var(--border);
            transition: all 200ms ease-out;
        }

        .page-dot.active {
            background: var(--blue-primary);
            width: 24px;
            border-radius: 4px;
        }

        .page-dot.completed {
            background: var(--success);
        }

        /* ===== RESPONSIVE ===== */
        @media (max-width: 768px) {
            .start-page {
                padding: 24px 16px;
                justify-content: flex-start;
                padding-top: 60px;
            }

            .logo-text {
                font-size: 32px;
            }

            .logo-subtitle {
                font-size: 15px;
            }

            .service-card {
                padding: 28px 20px;
            }

            .service-title {
                font-size: 18px;
            }

            .btn-start {
                height: 52px;
                font-size: 15px;
            }

            .header-inner {
                padding: 0;
            }

            .header-title-text {
                font-size: 14px;
            }

            .question-card {
                padding: 20px 16px;
            }

            .question-header {
                gap: 10px;
            }

            .question-icon {
                width: 36px;
                height: 36px;
            }

            .question-icon svg {
                width: 18px;
                height: 18px;
            }

            .scale-container,
            .radio-group,
            .textarea-wrapper,
            .question-description,
            .scale-labels,
            .star-container,
            .star-labels,
            .error-tooltip {
                padding-left: 0;
            }

            .scale-btn {
                width: 40px;
                height: 40px;
                font-size: 14px;
            }

            .btn {
                height: 52px;
                flex: 1;
            }

            .nav-buttons {
                flex-direction: row;
            }

            .thank-you-title {
                font-size: 20px;
            }
        }

        /* ===== SURVEY INFO PAGE ===== */
        .survey-info-page {
            display: none;
            flex-direction: column;
            align-items: center;
            max-width: 680px;
            margin: 0 auto;
            padding: 32px 24px 48px;
            gap: 0;
        }

        .survey-info-page.active {
            display: flex;
        }

        /* Info Header */
        .info-header {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 12px;
            margin-bottom: 28px;
        }

        .info-header .logo-icon {
            width: 80px;
            height: 80px;
            border-radius: 16px;
        }

        .info-header .logo-icon svg {
            width: 58px;
            height: 46px;
        }

        .info-header-title {
            font-size: 28px;
            font-weight: 800;
            color: var(--text-primary);
            letter-spacing: -0.5px;
            line-height: 1.2;
        }

        .info-header-title span {
            color: var(--blue-primary);
        }

        .info-slogan {
            font-size: 16px;
            font-weight: 600;
            color: var(--blue-primary);
            text-align: center;
            letter-spacing: 0.3px;
        }

        /* Motivation Text */
        .motivation-block {
            background: var(--white);
            border-radius: 16px;
            box-shadow: var(--shadow-soft);
            padding: 28px 32px;
            margin-bottom: 24px;
            width: 100%;
        }

        .motivation-block p {
            font-size: 15px;
            line-height: 1.75;
            color: var(--text-secondary);
            margin-bottom: 14px;
        }

        .motivation-block p:last-child {
            margin-bottom: 0;
        }

        .motivation-block strong {
            color: var(--text-primary);
            font-weight: 600;
        }

        /* Info Cards Grid */
        .info-cards {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 12px;
            width: 100%;
            margin-bottom: 24px;
        }

        .info-card {
            background: var(--white);
            border-radius: 14px;
            box-shadow: var(--shadow-soft);
            padding: 20px 18px;
            display: flex;
            flex-direction: column;
            gap: 8px;
            transition: transform 0.2s ease, box-shadow 0.2s ease;
        }

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

        .info-card-icon {
            width: 40px;
            height: 40px;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 4px;
        }

        .info-card-icon svg {
            width: 22px;
            height: 22px;
        }

        .info-card-title {
            font-size: 14px;
            font-weight: 700;
            color: var(--text-primary);
            line-height: 1.3;
        }

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

        /* Period Block */
        .info-period {
            background: var(--white);
            border-radius: 14px;
            box-shadow: var(--shadow-soft);
            padding: 20px 28px;
            width: 100%;
            display: flex;
            flex-direction: column;
            gap: 14px;
            margin-bottom: 24px;
        }

        .period-row {
            display: flex;
            align-items: center;
            gap: 14px;
        }

        .period-icon {
            width: 40px;
            height: 40px;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .period-icon svg {
            width: 22px;
            height: 22px;
        }

        .period-text {
            font-size: 14px;
            color: var(--text-secondary);
            line-height: 1.5;
        }

        .period-text strong {
            color: var(--text-primary);
            font-weight: 600;
        }

        /* Start Button */
        .info-btn-start {
            width: 100%;
            height: 56px;
            background: var(--blue-primary);
            color: var(--white);
            border: none;
            border-radius: 14px;
            font-size: 16px;
            font-weight: 600;
            font-family: inherit;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            box-shadow: 0 4px 16px rgba(43, 95, 138, 0.2);
            transition: all 0.2s ease;
        }

        .info-btn-start:hover {
            background: var(--blue-hover);
            transform: translateY(-1px);
            box-shadow: 0 6px 20px rgba(43, 95, 138, 0.25);
        }

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

        .info-btn-start svg {
            width: 20px;
            height: 20px;
        }

        /* ===== ADMIN LOGIN PAGE ===== */
        .admin-login-page {
            display: none;
            min-height: 100vh;
            background: var(--bg-page);
            align-items: center;
            justify-content: center;
            padding: 24px;
        }

        .admin-login-page.active {
            display: flex;
        }

        .admin-login-card {
            background: var(--white);
            border-radius: 20px;
            box-shadow: var(--shadow-medium);
            padding: 40px 36px;
            width: 100%;
            max-width: 420px;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 24px;
        }

        .admin-login-header {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 16px;
        }

        .admin-login-header .logo-icon {
            width: 80px;
            height: 80px;
            border-radius: 16px;
        }

        .admin-login-header .logo-icon svg {
            width: 58px;
            height: 46px;
        }

        .admin-login-title {
            font-size: 22px;
            font-weight: 700;
            color: var(--text-primary);
            text-align: center;
        }

        .admin-login-subtitle {
            font-size: 14px;
            color: var(--text-secondary);
            text-align: center;
        }

        .admin-form {
            width: 100%;
            display: flex;
            flex-direction: column;
            gap: 16px;
        }

        .form-group {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .form-group label {
            font-size: 14px;
            font-weight: 500;
            color: var(--text-primary);
        }

        .form-group input {
            height: 48px;
            border: 1.5px solid var(--border-light);
            border-radius: 12px;
            padding: 0 16px;
            font-size: 15px;
            font-family: inherit;
            color: var(--text-primary);
            background: var(--bg-page);
            transition: border-color 0.2s ease, box-shadow 0.2s ease;
        }

        .form-group input:focus {
            outline: none;
            border-color: var(--blue-primary);
            box-shadow: 0 0 0 3px rgba(43, 95, 138, 0.1);
        }

        .form-group input::placeholder {
            color: var(--text-muted);
        }

        .admin-btn-login {
            width: 100%;
            height: 52px;
            background: var(--blue-primary);
            color: var(--white);
            border: none;
            border-radius: 14px;
            font-size: 16px;
            font-weight: 600;
            font-family: inherit;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            box-shadow: 0 4px 16px rgba(43, 95, 138, 0.2);
            transition: all 0.2s ease;
            margin-top: 8px;
        }

        .admin-btn-login:hover {
            background: var(--blue-hover);
            transform: translateY(-1px);
            box-shadow: 0 6px 20px rgba(43, 95, 138, 0.25);
        }

        .admin-btn-login svg {
            width: 20px;
            height: 20px;
        }

        .admin-back-link {
            font-size: 14px;
            color: var(--text-muted);
            text-decoration: none;
            display: flex;
            align-items: center;
            gap: 6px;
            transition: color 0.2s ease;
            cursor: pointer;
            background: none;
            border: none;
            font-family: inherit;
            padding: 8px;
        }

        .admin-back-link:hover {
            color: var(--blue-primary);
        }

        .admin-back-link svg {
            width: 16px;
            height: 16px;
        }

        /* Info page responsive */
        @media (max-width: 640px) {
            .info-cards {
                grid-template-columns: 1fr;
            }

            .motivation-block {
                padding: 22px 20px;
            }

            .info-header-title {
                font-size: 24px;
            }
        }

        @media (max-width: 480px) {
            .scale-container {
                gap: 6px;
            }

            .scale-btn {
                width: 36px;
                height: 36px;
                font-size: 13px;
            }

            .star-btn svg {
                width: 30px;
                height: 30px;
            }

            .logo-icon {
                width: 112px;
                height: 112px;
            }

            .logo-icon svg {
                width: 80px;
                height: 68px;
            }
        }

        /* ===== HIDE/SHOW PAGES ===== */
        .survey-page {
            display: none;
        }

        .survey-page.active {
            display: block;
        }
/* ===== ADMIN PANEL ===== */
.admin-panel {
    display: none;
    min-height: 100vh;
    background: linear-gradient(135deg, #f8fafe 0%, #e8f0f8 100%);
    padding: 20px;
}
.admin-panel.active { display: block; }
.admin-panel-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 20px; background: #fff; border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06); margin-bottom: 20px;
}
.admin-panel-title { font-size: 18px; font-weight: 700; color: #1A1A2E; }
.admin-panel-logout {
    padding: 8px 16px; background: #f0f0f0; border: none; border-radius: 8px;
    cursor: pointer; font-size: 14px; color: #555;
}
.admin-panel-logout:hover { background: #e0e0e0; }
.admin-survey-card {
    background: #fff; border-radius: 12px; padding: 16px 20px;
    margin-bottom: 12px; box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.admin-survey-top {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 10px;
}
.admin-survey-title { font-size: 16px; font-weight: 600; color: #1A1A2E; }
.admin-survey-badge {
    padding: 4px 10px; border-radius: 12px; font-size: 12px; font-weight: 600;
}
.admin-survey-badge.active { background: #d4edda; color: #155724; }
.admin-survey-badge.inactive { background: #f0f0f0; color: #888; }
.admin-survey-info {
    display: flex; gap: 16px; font-size: 13px; color: #666; margin-bottom: 12px;
}
.admin-survey-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-btn {
    padding: 7px 14px; border: none; border-radius: 8px;
    cursor: pointer; font-size: 13px; font-weight: 500; transition: all 0.15s;
}
.admin-btn-retake { background: #e8f0f8; color: #2B5F8A; }
.admin-btn-retake:hover { background: #d0e4f5; }
.admin-btn-retake.on { background: #d4edda; color: #155724; }
.admin-btn-activate { background: #d4edda; color: #155724; }
.admin-btn-activate:hover { background: #c3e6cb; }
.admin-btn-deactivate { background: #f8d7da; color: #721c24; }
.admin-btn-deactivate:hover { background: #f5c6cb; }

/* ===== ADMIN TABS ===== */
.admin-tabs {
    display: flex; gap: 0; background: #fff; border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06); margin-bottom: 20px;
    overflow: hidden;
}
.admin-tab {
    flex: 1; padding: 12px 20px; border: none; background: transparent;
    font-size: 14px; font-weight: 600; color: #888; cursor: pointer;
    transition: all 0.2s; border-bottom: 3px solid transparent;
}
.admin-tab:hover { color: #2B5F8A; background: #f8fafe; }
.admin-tab.active {
    color: #2B5F8A; border-bottom-color: #2B5F8A; background: #f0f7ff;
}
.admin-tab-pane { display: none; }
.admin-tab-pane.active { display: block; }

/* ===== CONSTRUCTOR ===== */
.constructor-wrapper {
    max-width: 900px; margin: 0 auto;
}
.constructor-header {
    display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
    margin-bottom: 20px;
}
.constructor-select {
    flex: 1; min-width: 200px; padding: 10px 14px; border: 2px solid #e0e0e0;
    border-radius: 10px; font-size: 14px; background: #fff; color: #1A1A2E;
    cursor: pointer; appearance: auto;
}
.constructor-select:focus {
    border-color: #2B5F8A; outline: none;
    box-shadow: 0 0 0 3px rgba(43,95,138,0.1);
}
.constructor-meta {
    background: #fff; border-radius: 14px; padding: 24px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06); margin-bottom: 20px;
}
.constructor-field {
    margin-bottom: 16px;
}
.constructor-field label {
    display: block; font-size: 13px; font-weight: 600; color: #555;
    margin-bottom: 6px;
}
.constructor-field input,
.constructor-field textarea,
.constructor-field select {
    width: 100%; padding: 10px 14px; border: 2px solid #e8e8e8;
    border-radius: 10px; font-size: 14px; color: #1A1A2E;
    background: #fafbfc; transition: border-color 0.2s;
    box-sizing: border-box;
}
.constructor-field input:focus,
.constructor-field textarea:focus {
    border-color: #2B5F8A; outline: none; background: #fff;
    box-shadow: 0 0 0 3px rgba(43,95,138,0.08);
}
.constructor-row {
    display: flex; gap: 16px;
}
.constructor-row .constructor-field { flex: 1; }

.constructor-services-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 14px; margin-top: 8px;
}
.constructor-services-header h3 {
    font-size: 16px; font-weight: 700; color: #1A1A2E; margin: 0;
}

/* Service card in constructor */
.constructor-service-card {
    background: #fff; border-radius: 14px; padding: 20px;
    margin-bottom: 14px; box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-left: 4px solid #2B5F8A; position: relative;
}
.constructor-service-card .svc-header {
    display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
}
.constructor-service-card .svc-number {
    width: 32px; height: 32px; border-radius: 50%; background: #2B5F8A;
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 700; flex-shrink: 0;
}
.constructor-service-card .svc-name-input {
    flex: 1; padding: 8px 12px; border: 2px solid #e8e8e8; border-radius: 8px;
    font-size: 14px; font-weight: 600; color: #1A1A2E;
}
.constructor-service-card .svc-name-input:focus {
    border-color: #2B5F8A; outline: none;
}
.constructor-service-card .svc-block-input {
    width: 200px; padding: 8px 12px; border: 2px solid #e8e8e8;
    border-radius: 8px; font-size: 13px; color: #666;
}
.constructor-service-card .svc-block-input:focus {
    border-color: #D4A72E; outline: none;
}
.constructor-service-card .svc-block-input::placeholder {
    color: #bbb;
}

/* Reorder & remove buttons */
.svc-controls {
    display: flex; gap: 4px; align-items: center;
}
.svc-controls button {
    width: 30px; height: 30px; border: none; border-radius: 6px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    font-size: 16px; transition: all 0.15s;
}
.svc-btn-up, .svc-btn-down {
    background: #e8f0f8; color: #2B5F8A;
}
.svc-btn-up:hover, .svc-btn-down:hover { background: #d0e4f5; }
.svc-btn-remove {
    background: #f8d7da; color: #721c24;
}
.svc-btn-remove:hover { background: #f5c6cb; }

/* Parameters section inside service card */
.svc-params-section {
    margin-top: 14px; padding-top: 14px; border-top: 1px solid #f0f0f0;
}
.svc-params-section h4 {
    font-size: 13px; font-weight: 600; margin: 0 0 8px 0;
}
.svc-params-section h4.negative-title { color: #C44; }
.svc-params-section h4.positive-title { color: #3D9970; }

.param-row {
    display: flex; align-items: center; gap: 8px; margin-bottom: 6px;
}
.param-row input {
    flex: 1; padding: 7px 10px; border: 1.5px solid #e8e8e8; border-radius: 6px;
    font-size: 13px; color: #1A1A2E;
}
.param-row input:focus {
    border-color: #2B5F8A; outline: none;
}
.param-row .param-remove {
    width: 26px; height: 26px; border: none; border-radius: 6px;
    background: #f8d7da; color: #721c24; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; flex-shrink: 0;
}
.param-row .param-remove:hover { background: #f5c6cb; }

.btn-add-param {
    padding: 5px 12px; border: 1.5px dashed #ccc; border-radius: 6px;
    background: transparent; color: #888; cursor: pointer; font-size: 12px;
    margin-top: 4px; transition: all 0.15s;
}
.btn-add-param:hover {
    border-color: #2B5F8A; color: #2B5F8A;
}

.constructor-actions {
    text-align: center; padding: 20px 0;
}
.constructor-save-btn {
    padding: 12px 40px !important; font-size: 15px !important;
    font-weight: 600 !important; border-radius: 12px !important;
}
.constructor-empty {
    text-align: center; color: #999; padding: 60px 20px;
    font-size: 15px;
}

/* ===== Stats lifecycle badges & buttons ===== */
.admin-survey-badges {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}
.admin-survey-badge.stats-collecting {
    background: rgba(52, 199, 89, 0.18);
    color: #27ae60;
    border: 1px solid rgba(52, 199, 89, 0.35);
    animation: stats-pulse 2s infinite;
}
.admin-survey-badge.stats-finalized {
    background: rgba(120, 120, 150, 0.18);
    color: #999;
    border: 1px solid rgba(150, 150, 180, 0.25);
}
@keyframes stats-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}
.admin-btn-start-stats {
    background: rgba(52, 199, 89, 0.12);
    color: #27ae60;
    border: 1px solid rgba(52, 199, 89, 0.30);
}
.admin-btn-start-stats:hover {
    background: rgba(52, 199, 89, 0.25);
}
.admin-btn-finalize {
    background: rgba(255, 159, 10, 0.12);
    color: #e67e22;
    border: 1px solid rgba(255, 159, 10, 0.30);
}
.admin-btn-finalize:hover {
    background: rgba(255, 159, 10, 0.25);
}


/* ===== Survey Statistics Page ===== */
.stats-overlay {
    position: fixed;
    inset: 0;
    background: #f0f2f5;
    overflow-y: auto;
    z-index: 1000;
}

.stats-page {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 0 60px;
}

.stats-page-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background: #fff;
    border-bottom: 1px solid #e0e4ea;
    position: sticky;
    top: 0;
    z-index: 10;
}

.stats-back-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    padding: 7px 14px;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}
.stats-back-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.stats-back-btn:hover { background: #f3f4f6; }

.stats-page-title {
    flex: 1;
    font-size: 16px;
    font-weight: 700;
    color: #1a1a2e;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stats-export-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #1a7a3a;
    color: #fff;
    border-radius: 8px;
    padding: 7px 14px;
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s;
    flex-shrink: 0;
}
.stats-export-btn svg { width: 15px; height: 15px; }
.stats-export-btn:hover { background: #15652f; }

.stats-page-body {
    padding: 20px 24px 0;
}

/* KPI Grid */
.stats-kpi-section { margin-bottom: 20px; }
.stats-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.stats-kpi {
    background: #fff;
    border-radius: 12px;
    padding: 16px 18px;
    border: 1px solid #e8ebf0;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.stats-kpi-muted .kpi-value { color: #9ca3af; }
.kpi-value {
    font-size: 28px;
    font-weight: 800;
    color: #1a1a2e;
    line-height: 1.1;
}
.kpi-label {
    font-size: 11px;
    color: #6b7280;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Section cards */
.stats-section-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e8ebf0;
    padding: 18px 20px;
    margin-bottom: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.stats-section-title {
    font-size: 14px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f2f5;
}

/* Tables */
.stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.stats-table th {
    text-align: left;
    padding: 8px 10px;
    background: #f8f9fb;
    color: #6b7280;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid #e8ebf0;
}
.stats-table td {
    padding: 9px 10px;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
}
.stats-table tr:last-child td { border-bottom: none; }
.stats-table .td-rank { color: #9ca3af; font-weight: 700; text-align: center; width: 36px; }
.stats-table .td-skip { font-weight: 700; color: #e74c3c; text-align: center; width: 100px; }
.stats-table .td-param { font-weight: 700; color: #374151; text-align: center; width: 100px; }

/* Service tab navigation */
.stats-services-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}
.stats-services-title {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a2e;
}
.stats-service-tabs-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 14px;
    padding-bottom: 3px;
}
.stats-service-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
    padding-bottom: 2px;
}
.stats-svc-tab {
    flex-shrink: 0;
    background: #fff;
    border: 1.5px solid #e0e4ea;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 12px;
    color: #374151;
    cursor: pointer;
    transition: all 0.15s;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.stats-svc-tab.active {
    background: #1a1a2e;
    border-color: #1a1a2e;
    color: #fff;
}
.stats-svc-tab:hover:not(.active) { background: #f3f4f6; }

/* Service detail pane */
.stats-service-pane { padding-bottom: 40px; }

/* Main score card */
.stats-main-score-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e8ebf0;
    padding: 20px 24px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.main-score-circle {
    flex-shrink: 0;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    border: 5px solid #27ae60;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}
.main-score-value {
    font-size: 20px;
    font-weight: 900;
    color: #27ae60;
}
.main-score-info { flex: 1; }
.main-score-label {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 6px;
}
.main-score-formula {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 4px;
    line-height: 1.4;
}
.main-score-detail {
    font-size: 12px;
    color: #e74c3c;
    background: #fef2f2;
    border-radius: 6px;
    padding: 4px 8px;
    display: inline-block;
    margin-top: 4px;
}

/* Emoji distribution bars */
.stats-totals-row {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.stats-totals-row b { color: #1a1a2e; }

.emoji-bar-row {
    display: grid;
    grid-template-columns: 145px 1fr 90px;
    align-items: center;
    gap: 10px;
    margin-bottom: 9px;
}
.emoji-bar-label { font-size: 13px; color: #374151; white-space: nowrap; }
.emoji-bar-track {
    height: 10px;
    background: #f0f2f5;
    border-radius: 5px;
    overflow: hidden;
}
.emoji-bar-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.4s ease;
    min-width: 2px;
}
.emoji-bar-stats { font-size: 12px; color: #6b7280; text-align: right; white-space: nowrap; }

/* Comments list */
.stats-comments-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 360px;
    overflow-y: auto;
}
.stats-comment-item {
    background: #f8f9fb;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    color: #374151;
    line-height: 1.5;
    border-left: 3px solid #d0d5dd;
}

/* State indicators */
.stats-loading, .stats-error, .stats-empty {
    padding: 32px;
    text-align: center;
    color: #9ca3af;
    font-size: 14px;
}
.stats-error { color: #e74c3c; }

/* "Статистика по опросу" button in admin survey card */
.admin-btn-stats {
    background: linear-gradient(135deg, #1e3a5f, #2d5a9e);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 7px 14px;
    font-size: 12px;
    cursor: pointer;
    transition: opacity 0.15s;
    white-space: nowrap;
}
.admin-btn-stats:hover { opacity: 0.85; }

/* Mobile */
@media (max-width: 640px) {
    .stats-page-body { padding: 12px 12px 0; }
    .stats-page-header { padding: 12px 14px; gap: 8px; }
    .stats-page-title { font-size: 13px; }
    .stats-back-btn span, .stats-export-btn span { display: none; }
    .stats-kpi-grid { grid-template-columns: 1fr 1fr; }
    .emoji-bar-row { grid-template-columns: 110px 1fr 70px; }
    .main-score-circle { width: 72px; height: 72px; }
    .main-score-value { font-size: 16px; }
    .stats-main-score-card { gap: 14px; }
}
