/* Survey Module CSS - Clean and Modern Design */

/* CSS Variables */
:root {
    --survey-primary: #00B074;
    --survey-secondary: #2B9BFF;
    --survey-light: #EFFDF5;
    --survey-dark: #2d3748;
    --survey-border: #e2e8f0;
    --survey-text: #2d3748;
    --survey-text-light: #718096;
    --survey-bg: #f7fafc;
}

/* Reset and Base Styles */
.survey-fill-wrapper {
    background: var(--survey-bg);
    min-height: 100vh;
    padding: 2rem 0;
}

.survey-fill-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header Card */
.survey-header-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--survey-border);
}

.survey-header-card h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--survey-text);
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.survey-header-card h1 i {
    color: var(--survey-primary);
}

.survey-header-card .survey-description {
    color: var(--survey-text-light);
    font-size: 1rem;
    line-height: 1.6;
    margin-top: 0.5rem;
}

/* Question Block */
.survey-question-block {
    background: white;
    border: 1px solid var(--survey-border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.survey-question-block.survey-required {
    border-left: 4px solid var(--survey-primary);
}

/* Question Header */
.survey-question-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.survey-question-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--survey-primary);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.survey-question-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--survey-text);
    line-height: 1.5;
    flex: 1;
}

.survey-required-badge {
    display: inline-block;
    background: #fee2e2;
    color: #dc2626;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-left: 0.5rem;
    text-transform: uppercase;
}

/* Help Text */
.survey-help-text {
    background: #f0fdf4;
    color: #065f46;
    font-size: 0.875rem;
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 3px solid var(--survey-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.survey-help-text i {
    color: var(--survey-primary);
}

/* Input Fields */
.survey-question-input {
    margin-top: 0.5rem;
}

.survey-question-input .form-control,
.survey-question-input .form-select,
.survey-question-input textarea {
    border: 1px solid var(--survey-border);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    background: white;
    color: var(--survey-text);
    width: 100%;
    transition: border-color 0.2s;
}

.survey-question-input .form-control:focus,
.survey-question-input .form-select:focus,
.survey-question-input textarea:focus {
    border-color: var(--survey-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 176, 116, 0.1);
}

.survey-question-input .form-control::placeholder,
.survey-question-input textarea::placeholder {
    color: #a0aec0;
}

/* Radio and Checkbox */
.survey-radio-group,
.survey-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.survey-question-input .form-check {
    padding: 0.75rem;
    background: #f7fafc;
    border: 1px solid var(--survey-border);
    border-radius: 8px;
    transition: all 0.2s;
    cursor: pointer;
}

.survey-question-input .form-check:hover {
    background: #edf2f7;
    border-color: var(--survey-primary);
}

.survey-question-input .form-check-input {
    width: 1.125rem;
    height: 1.125rem;
    margin-top: 0.125rem;
    cursor: pointer;
}

.survey-question-input .form-check-input:checked {
    background-color: var(--survey-primary);
    border-color: var(--survey-primary);
}

.survey-question-input .form-check-label {
    margin-left: 0.5rem;
    font-size: 1rem;
    color: var(--survey-text);
    cursor: pointer;
}

/* Rating Stars */
.survey-rating-stars {
    display: flex;
    gap: 0.5rem;
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem 0;
}

.survey-rating-stars .star {
    color: #e2e8f0;
    transition: color 0.2s;
}

.survey-rating-stars .star:hover,
.survey-rating-stars .star.active {
    color: #fbbf24;
}

/* Emoji Rating */
.survey-emoji-rating {
    display: flex;
    justify-content: center;
    gap: 1rem;
    font-size: 3rem;
    cursor: pointer;
    padding: 1rem 0;
}

.survey-emoji-rating .emoji {
    transition: transform 0.2s;
    filter: grayscale(0.3);
}

.survey-emoji-rating .emoji:hover {
    transform: scale(1.2);
    filter: grayscale(0);
}

.survey-emoji-rating .emoji.selected {
    transform: scale(1.1);
    filter: grayscale(0);
}

/* Scale Slider */
.survey-scale-container {
    padding: 1rem 0;
}

.survey-scale-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #e2e8f0;
    outline: none;
    -webkit-appearance: none;
}

.survey-scale-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--survey-primary);
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.survey-scale-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--survey-primary);
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.survey-scale-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--survey-text-light);
}

.survey-scale-value-display {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--survey-primary);
    margin: 0.5rem 0;
    padding: 0.5rem 1rem;
    background: var(--survey-light);
    border-radius: 8px;
    display: inline-block;
}

/* Error Message */
.survey-error-message {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: #fee2e2;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.survey-btn {
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    text-decoration: none;
}

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

.survey-btn-primary:hover {
    background: #00995d;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 176, 116, 0.3);
}

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

.survey-btn-secondary:hover {
    background: #f7fafc;
    border-color: var(--survey-primary);
    color: var(--survey-text);
}

/* Builder Styles */
.survey-builder-wrapper {
    background: var(--survey-bg);
    min-height: 100vh;
    padding: 2rem 0;
}

/* Question Card Styles */
.survey-question-card {
    border: 1px solid var(--survey-border);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: white;
    transition: all 0.2s;
}

.survey-question-card:hover {
    border-color: var(--survey-primary);
    box-shadow: 0 2px 8px rgba(0, 176, 116, 0.1);
}

.survey-question-handle {
    cursor: move;
    color: var(--survey-text-light);
    font-size: 1.25rem;
}

.survey-question-handle:hover {
    color: var(--survey-primary);
}

.survey-badge-required {
    display: inline-block;
    background: #fee2e2;
    color: #dc2626;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
}

.survey-question-type-badge {
    display: inline-block;
    background: var(--survey-light);
    color: var(--survey-primary);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    margin-top: 0.5rem;
}

.survey-header-modern {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--survey-border);
}

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

.survey-header-modern .text-muted {
    color: var(--survey-text-light);
    font-size: 0.95rem;
}

.survey-card {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--survey-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.survey-card-header {
    background: var(--survey-primary);
    color: white;
    padding: 1rem 1.5rem;
    font-weight: 600;
    font-size: 1rem;
}

.survey-card-body {
    padding: 1.5rem;
}

.survey-question-card {
    border: 1px solid var(--survey-border);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: white;
    transition: all 0.2s;
}

.survey-question-card:hover {
    border-color: var(--survey-primary);
    box-shadow: 0 2px 8px rgba(0, 176, 116, 0.1);
}

/* Sortable styles */
.sortable-ghost {
    opacity: 0.4;
    background: var(--survey-light);
    border: 2px dashed var(--survey-primary);
}

.sortable-chosen {
    cursor: move;
}

.sortable-drag {
    opacity: 0.8;
    transform: rotate(2deg);
}

/* List Styles */
.surveys-wrapper {
    background: var(--survey-bg);
    min-height: 100vh;
    padding: 2rem 0;
}

.surveys-wrapper .container {
    max-width: 1200px;
}

.survey-list-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--survey-border);
    padding: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    overflow: hidden;
}

.survey-list-card:hover {
    box-shadow: 0 8px 24px rgba(0, 176, 116, 0.12);
    transform: translateY(-4px);
    border-color: var(--survey-primary);
}

/* Card Header Section */
.survey-card-header-section {
    padding: 1.5rem 1.5rem 1rem 1.5rem;
    border-bottom: 1px solid var(--survey-border);
}

.survey-card-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.survey-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--survey-text);
    margin: 0;
    line-height: 1.4;
    flex: 1;
    word-wrap: break-word;
}

.survey-status-badge {
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.3px;
}

.survey-status-active {
    background: linear-gradient(135deg, var(--survey-primary) 0%, #00995d 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(0, 176, 116, 0.2);
}

.survey-status-inactive {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

/* Card Description */
.survey-card-description {
    color: var(--survey-text-light);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 1rem 1.5rem;
    min-height: 3rem;
}

/* Card Stats */
.survey-card-stats {
    display: flex;
    gap: 1.5rem;
    padding: 1rem 1.5rem;
    background: #f8fafc;
    border-top: 1px solid var(--survey-border);
    border-bottom: 1px solid var(--survey-border);
    margin-top: auto;
}

.survey-stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--survey-text-light);
    font-size: 0.875rem;
}

.survey-stat-item i {
    color: var(--survey-primary);
    font-size: 0.9rem;
    width: 16px;
    text-align: center;
}

.survey-stat-item span {
    font-weight: 500;
}

/* Card Actions */
.survey-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: white;
}

.survey-action-btn {
    border-radius: 8px;
    padding: 0.65rem 1rem;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s;
    border: 1px solid;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    text-decoration: none;
    background: white;
    min-height: 38px;
}

.survey-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.survey-action-btn-primary {
    color: var(--survey-primary);
    border-color: var(--survey-primary);
}

.survey-action-btn-primary:hover {
    background: var(--survey-primary);
    color: white;
    border-color: var(--survey-primary);
}

.survey-action-btn-secondary {
    color: var(--survey-secondary);
    border-color: var(--survey-secondary);
}

.survey-action-btn-secondary:hover {
    background: var(--survey-secondary);
    color: white;
    border-color: var(--survey-secondary);
}

.survey-action-btn-outline {
    color: var(--survey-text-light);
    border-color: var(--survey-border);
}

.survey-action-btn-outline:hover {
    background: var(--survey-bg);
    color: var(--survey-text);
    border-color: var(--survey-primary);
}

.survey-action-btn-danger {
    color: #dc2626;
    border-color: #dc2626;
}

.survey-action-btn-danger:hover {
    background: #dc2626;
    color: white;
    border-color: #dc2626;
}

/* Legacy styles for backward compatibility */
.survey-list-card .text-muted {
    color: var(--survey-text-light);
    font-size: 0.875rem;
    line-height: 1.5;
}

.survey-list-card .border-top {
    border-top: 1px solid var(--survey-border) !important;
    margin-top: auto;
    padding-top: 0.75rem;
}

.survey-list-card .d-flex.gap-2 {
    margin-top: 0.75rem;
}

.survey-list-card .d-flex.gap-2 .survey-btn-sm {
    flex: 1;
    min-width: calc(50% - 0.25rem);
    justify-content: center;
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
}

/* Empty State */
.survey-empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--survey-text-light);
}

.survey-empty-state-card {
    background: white;
    border-radius: 12px;
    padding: 3rem 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--survey-border);
    text-align: center;
}

.survey-empty-state-card i {
    font-size: 3rem;
    color: var(--survey-primary);
    opacity: 0.5;
    margin-bottom: 1rem;
}

.survey-empty-state-card h4 {
    color: var(--survey-text);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.survey-empty-state-card p {
    color: var(--survey-text-light);
    margin-bottom: 1.5rem;
}

/* Small Buttons */
.survey-btn-sm {
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s;
    border: 1px solid;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    text-decoration: none;
    background: white;
}

.survey-btn-sm-outline-primary {
    color: var(--survey-primary);
    border-color: var(--survey-primary);
}

.survey-btn-sm-outline-primary:hover {
    background: var(--survey-primary);
    color: white;
}

.survey-btn-sm-outline-secondary {
    color: var(--survey-text-light);
    border-color: var(--survey-border);
}

.survey-btn-sm-outline-secondary:hover {
    background: var(--survey-bg);
    color: var(--survey-text);
    border-color: var(--survey-primary);
}

.survey-btn-sm-outline-danger {
    color: #dc2626;
    border-color: #dc2626;
}

.survey-btn-sm-outline-danger:hover {
    background: #dc2626;
    color: white;
}

/* Responsive adjustments for list cards */
@media (max-width: 768px) {
    .survey-card-actions {
        grid-template-columns: 1fr;
    }
    
    .survey-card-stats {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .survey-card-title-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .survey-status-badge {
        align-self: flex-start;
    }
}

.survey-header-section {
    background: white;
    border-radius: 16px;
    padding: 1.75rem 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--survey-border);
}

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

.survey-header-section p {
    color: var(--survey-text-light);
    font-size: 0.95rem;
    margin: 0.25rem 0 0 0;
}

/* Create Button */
.survey-btn-create {
    background: var(--survey-primary);
    color: white;
    border-radius: 10px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(0, 176, 116, 0.2);
}

.survey-btn-create:hover {
    background: #00995d;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 176, 116, 0.3);
}

.survey-btn-create i {
    color: white !important;
}

/* Responsive */
@media (max-width: 768px) {
    .survey-fill-wrapper {
        padding: 1rem 0;
    }
    
    .survey-header-card,
    .survey-question-block {
        padding: 1rem;
    }
    
    .survey-header-card h1 {
        font-size: 1.5rem;
    }
    
    .survey-question-number {
        width: 32px;
        height: 32px;
        font-size: 0.875rem;
    }
    
    .survey-question-text {
        font-size: 1rem;
    }
    
    .survey-actions {
        flex-direction: column;
    }
    
    .survey-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================================================
   Survey Admin Dashboard (sa- prefix)
   ========================================================================== */
:root {
    --sa-primary: #00b074;
    --sa-primary-light: #33c38f;
    --sa-primary-dark: #00845a;
    --sa-success: #00b074;
    --sa-warning: #f59e0b;
    --sa-danger: #ef4444;
    --sa-info: #00c48c;
    --sa-dark: #1e293b;
    --sa-text: #334155;
    --sa-text-light: #64748b;
    --sa-border: #e2e8f0;
    --sa-bg: #f8fafc;
    --sa-card-bg: #ffffff;
}

.sa-page-wrapper {
    background: var(--sa-bg);
    min-height: 100vh;
}

.sa-hero-header {
    background: linear-gradient(135deg, var(--sa-primary) 0%, #1fd18f 100%);
    padding: 2.5rem 0;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.sa-hero-header::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.sa-hero-content {
    position: relative;
    z-index: 1;
}

.sa-hero-header h1 {
    color: #fff;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sa-hero-header h1 i {
    font-size: 1.75rem;
    opacity: 0.9;
}

.sa-hero-subtitle {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
    margin: 0;
}

.sa-hero-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.sa-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
}

.sa-btn.sa-btn-ghost {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.sa-btn.sa-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

.sa-btn-back {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.sa-btn-back:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    transform: translateX(-3px);
}

.sa-btn-create {
    background: #fff;
    color: var(--sa-primary);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.sa-btn-create:hover {
    color: var(--sa-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.sa-main-content {
    padding: 0 1rem 3rem;
}

.sa-alert {
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: none;
    font-weight: 500;
    animation: sa-slide-down 0.3s ease;
}

.sa-alert-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
}

.sa-alert-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
}

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

.sa-stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.sa-stat-card {
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid var(--sa-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s;
}

.sa-stat-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

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

.sa-stat-icon.purple {
    background: linear-gradient(135deg, #d4f7ea 0%, #b2f0d8 100%);
    color: #048f60;
}

.sa-stat-icon.green {
    background: linear-gradient(135deg, #c8f2e2 0%, #a0e8cf 100%);
    color: #007a51;
}

.sa-stat-icon.blue {
    background: linear-gradient(135deg, #e0f9ef 0%, #c2f3df 100%);
    color: #00a26b;
}

.sa-stat-info h3 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--sa-dark);
    margin: 0;
}

.sa-stat-info p {
    font-size: 0.85rem;
    color: var(--sa-text-light);
    margin: 0.25rem 0 0;
}

.sa-surveys-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
}

.sa-survey-card {
    background: #fff;
    border-radius: 20px;
    border: 1px solid var(--sa-border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sa-survey-card:hover {
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.12);
    transform: translateY(-4px);
    border-color: var(--sa-primary-light);
}

.sa-card-top {
    padding: 1.5rem 1.5rem 1rem;
}

.sa-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.sa-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--sa-dark);
    margin: 0;
    line-height: 1.4;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-width: 0;
    word-wrap: break-word;
}

.sa-status {
    padding: 0.35rem 0.85rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
    align-self: flex-start;
    height: fit-content;
    line-height: 1.2;
}

.sa-status-active {
    background: linear-gradient(135deg, var(--sa-success) 0%, #34d399 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.sa-status-inactive {
    background: #f1f5f9;
    color: #64748b;
}

.sa-card-desc {
    color: var(--sa-text-light);
    font-size: 0.9rem;
    line-height: 1.6;
    min-height: 2.8rem;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sa-card-meta {
    display: flex;
    gap: 1.5rem;
    padding: 1rem 1.5rem;
    background: #f8fafc;
    border-top: 1px solid var(--sa-border);
}

.sa-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--sa-text-light);
    font-size: 0.85rem;
}

.sa-meta-item i {
    color: var(--sa-primary);
}

.sa-meta-item strong {
    color: var(--sa-text);
    font-weight: 600;
}

.sa-card-actions,
.sa-card-actions-row2 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    padding: 1rem 1.5rem;
}

.sa-card-actions-row2 {
    padding-top: 0;
    padding-bottom: 1.25rem;
}

.sa-action-btn {
    border: 1px solid var(--sa-border);
    border-radius: 12px;
    background: #fff;
    color: var(--sa-text);
    text-align: center;
    padding: 0.75rem 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.sa-action-btn i {
    font-size: 1rem;
    transition: transform 0.2s;
}

.sa-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.sa-action-btn.edit:hover {
    border-color: var(--sa-primary);
    color: var(--sa-primary);
    background: #f5f3ff;
}

.sa-action-btn.stats:hover {
    border-color: var(--sa-info);
    color: var(--sa-info);
    background: #ecfeff;
}

.sa-action-btn.share:hover {
    border-color: var(--sa-success);
    color: var(--sa-success);
    background: #e3f9ef;
}

.sa-action-btn.copy:hover {
    border-color: var(--sa-primary);
    color: var(--sa-primary);
    background: #ddf6ec;
}

.sa-action-btn.delete:hover {
    border-color: var(--sa-danger);
    color: var(--sa-danger);
    background: #fef2f2;
}

.sa-action-btn.delete:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.sa-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: #fff;
    border-radius: 24px;
    border: 2px dashed var(--sa-border);
}

.sa-empty-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.sa-empty-icon i {
    font-size: 2.5rem;
    color: var(--sa-primary);
}

.sa-empty-state h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--sa-dark);
    margin-bottom: 0.5rem;
}

.sa-empty-state p {
    color: var(--sa-text-light);
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

/* Modern táblázat stílus - Survey modulhoz illeszkedő */
.sa-data-table {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.sa-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    background: transparent;
}

.sa-table thead {
    background: transparent;
}

.sa-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    white-space: nowrap;
    border-bottom: 1px solid #e2e8f0;
    background: transparent;
}

.sa-table tbody tr {
    background: transparent;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.15s ease;
}

.sa-table tbody tr:hover {
    background: rgba(0, 176, 116, 0.02);
}

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

.sa-table td {
    padding: 0.875rem 1rem;
    text-align: left;
    vertical-align: middle;
    font-size: 0.9rem;
    font-weight: 500;
    color: #1e293b;
}

.sa-table .text-end {
    text-align: right;
}

.sa-link {
    color: var(--sa-primary);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    background: rgba(0, 176, 116, 0.08);
}

.sa-link:hover {
    background: var(--sa-primary);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 176, 116, 0.2);
}

.sa-link i {
    font-size: 0.75rem;
}

.sa-list-empty {
    border: 1px dashed var(--sa-border);
    border-radius: 16px;
}

.sa-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    font-weight: 600;
    color: var(--sa-text);
}

.sa-pagination a {
    color: var(--sa-primary);
    text-decoration: none;
}

.sa-pagination a:hover {
    text-decoration: underline;
}

.sa-link {
    color: var(--sa-primary);
    font-weight: 600;
    text-decoration: none;
}

.sa-link:hover {
    text-decoration: underline;
}

.sa-modal .modal-content {
    border-radius: 20px;
    border: none;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.sa-modal .modal-header {
    background: linear-gradient(135deg, var(--sa-primary) 0%, #1fd18f 100%);
    color: #fff;
    border-radius: 20px 20px 0 0;
    border: none;
}

.sa-modal .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.8;
}
.share-modal .modal-header {
    background: linear-gradient(135deg, var(--sa-primary) 0%, #1fd18f 100%);
    color: #fff;
}
.share-modal .modal-title {
    color: #fff;
    font-weight: 700;
}
.share-modal .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

.sa-share-input {
    display: flex;
    gap: 0.75rem;
}

.sa-share-input input {
    flex: 1;
    border: 2px solid var(--sa-border);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
}

.sa-share-input button {
    background: linear-gradient(135deg, var(--sa-primary) 0%, #1fd18f 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1.25rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.sa-share-input button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 176, 116, 0.25);
}

.sa-copy-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    margin-top: 1rem;
    display: none;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.sa-copy-success.show {
    display: flex;
}

.sa-badge-soft {
    background: rgba(0, 176, 116, 0.1);
    color: var(--sa-primary);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.sa-progress {
    width: 100%;
    height: 8px;
    background: var(--sa-border);
    border-radius: 999px;
    overflow: hidden;
}

.sa-progress-bar {
    height: 100%;
    background: linear-gradient(135deg, var(--sa-primary) 0%, #1fd18f 100%);
}

.sa-distribution-row {
    margin-bottom: 1rem;
}

.sa-distribution-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--sa-text);
    margin-bottom: 0.35rem;
}

.sa-meta-tile {
    background: #fff;
    border: 1px solid var(--sa-border);
    border-radius: 16px;
    padding: 1rem;
}

.sa-meta-tile span {
    display: block;
    font-size: 0.8rem;
    color: var(--sa-text-light);
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sa-meta-tile strong {
    font-size: 1.1rem;
    color: var(--sa-dark);
}

.sa-answer-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.75rem;
    background: rgba(0, 176, 116, 0.12);
    color: var(--sa-primary);
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.85rem;
    margin: 0.2rem 0.3rem 0.2rem 0;
}

.sa-answer-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.text-end {
    text-align: right;
}

.sa-list-empty .text-muted {
    color: var(--sa-text-light) !important;
}

.sa-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    color: #fff;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 9999;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: sa-toast-in 0.3s ease;
    max-width: 400px;
}

.sa-toast.success {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
}

.sa-toast.error {
    background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
}

.sa-toast-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
}

@keyframes sa-toast-in {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (max-width: 768px) {
    .sa-hero-header {
        padding: 1.5rem 0;
    }
    .sa-hero-header h1 {
        font-size: 1.5rem;
    }
    .sa-hero-actions {
        flex-direction: column;
        width: 100%;
    }
    .sa-btn {
        width: 100%;
        justify-content: center;
    }
    .sa-surveys-grid {
        grid-template-columns: 1fr;
    }
    .sa-card-actions,
    .sa-card-actions-row2 {
        grid-template-columns: repeat(2, 1fr);
    }
    .sa-stats-bar {
        grid-template-columns: 1fr;
    }
}

/* Confirm dialog */
.sa-confirm-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    animation: sa-confirm-fade 0.2s ease;
}

.sa-confirm-modal {
    background: #fff;
    width: min(420px, calc(100% - 2rem));
    border-radius: 18px;
    box-shadow: 0 25px 50px rgba(15, 23, 42, 0.25);
    padding: 1.75rem;
    text-align: center;
    animation: sa-confirm-pop 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.sa-confirm-modal h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--sa-dark);
    margin-bottom: 0.75rem;
}

.sa-confirm-modal p {
    color: var(--sa-text-light);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.sa-confirm-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.sa-confirm-actions button {
    flex: 1;
    border: none;
    border-radius: 12px;
    padding: 0.85rem 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.sa-confirm-cancel {
    background: #f1f5f9;
    color: #475569;
}

.sa-confirm-cancel:hover {
    box-shadow: inset 0 0 0 1px #e2e8f0;
}

.sa-confirm-accept {
    background: linear-gradient(135deg, var(--sa-primary) 0%, #1fd18f 100%);
    color: #fff;
    box-shadow: 0 8px 18px rgba(0, 176, 116, 0.35);
}

.sa-confirm-accept:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(0, 176, 116, 0.4);
}

.sa-confirm-accept.sa-confirm-danger {
    background: linear-gradient(135deg, var(--sa-danger) 0%, #f87171 100%);
    color: #fff;
    box-shadow: 0 8px 18px rgba(239, 68, 68, 0.35);
}

.sa-confirm-accept.sa-confirm-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(239, 68, 68, 0.4);
}

@keyframes sa-confirm-fade {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes sa-confirm-pop {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Survey Builder - Readonly fields */
#questionModal input[readonly],
#questionModal input[readonly]:focus {
    background-color: #f8f9fa;
    cursor: not-allowed;
    opacity: 0.7;
}