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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0c2888;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 90%;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.container.survey-container {
    max-width: 800px;
}

.header {
    background: #0c2888;
    color: white;
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header.center {
    text-align: center;
    flex-direction: column;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-logo.center {
    justify-content: center;
    flex-direction: column;
}

.header-logo img {
    max-height: 50px;
    width: auto;
    background: white;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.header-logo.center img {
    max-height: 60px;
    margin-bottom: 10px;
}

.header h1 {
    font-size: 2em;
    margin: 0;
}

.header.center h1 {
    margin-bottom: 10px;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.progress-bar {
    background: rgba(255, 255, 255, 0.3);
    height: 8px;
    border-radius: 4px;
    margin-top: 20px;
    overflow: hidden;
}

.progress-fill {
    background: white;
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
}

.content {
    padding: 40px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: white;
    color: #0c2888;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.3);
}

.btn-primary.survey {
    background: #0c2888;
    color: white;
}

.btn-primary.survey:hover {
    box-shadow: 0 5px 15px rgba(12, 40, 136, 0.4);
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.btn-secondary:hover {
    background: #d0d0d0;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

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

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #229954;
}

.btn-small {
    padding: 6px 12px;
    font-size: 14px;
}

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

.questions-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.questions-table th,
.questions-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.questions-table th {
    background: #f0f2f9;
    font-weight: 600;
    color: #0c2888;
}

.questions-table tr:hover {
    background: #f9f9f9;
}

.question-text {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.question-text.full {
    max-width: none;
    font-size: 20px;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.5;
    font-weight: 600;
    white-space: normal;
}

.category-question-cell {
    /* white-space: nowrap; */
    overflow: hidden;
    /* text-overflow: ellipsis; */
    max-width: 400px;
}

.category-question-cell .badge {
    margin-right: 10px;
    vertical-align: middle;
}

.question-text-inline {
    padding-top: 5px;
    vertical-align: middle;
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.badge-type {
    background: #e3f2fd;
    color: #1976d2;
}

.badge-required {
    background: #ffebee;
    color: #c62828;
}

.badge-optional {
    background: #e8f5e9;
    color: #2e7d32;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

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

.modal-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    max-width: 700px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.modal-header h2 {
    color: #0c2888;
}

.close {
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    border: none;
    background: none;
}

.close:hover {
    color: #333;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #0c2888;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
}

.options-container {
    margin-top: 15px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
}

.options-container h3 {
    margin-bottom: 15px;
    color: #0c2888;
}

.options-container.hidden {
    display: none;
}

.option-item {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

.option-item input {
    flex: 1;
}

.option-item button {
    padding: 8px 15px;
}

.add-option-btn {
    margin-top: 10px;
}

.rating-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.labels-container {
    margin-top: 10px;
}

.labels-container.hidden {
    display: none;
}

.label-item {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
    align-items: center;
}

.label-item input {
    flex: 1;
}

.alert {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
}

.alert.show {
    display: block;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state h3 {
    margin-bottom: 10px;
    color: #666;
}

.welcome-screen {
    text-align: center;
}

.welcome-screen h2 {
    color: #333;
    margin-bottom: 20px;
}

.welcome-screen p {
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

.form-group.text-left {
    text-align: left;
}

.question-container {
    display: none;
}

.question-container.active {
    display: block;
}

.category-header {
    background: #f0f2f9;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    border-left: 4px solid #0c2888;
}

.category-header h3 {
    color: #0c2888;
    font-size: 18px;
    margin: 0;
    font-weight: 600;
}

.category-header p {
    color: #666;
    font-size: 14px;
    margin: 5px 0 0 0;
}

.question {
    margin-bottom: 30px;
}

.question-number {
    color: #0c2888;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
}

.question-description {
    font-size: 15px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
    padding: 12px;
    background: #f9f9f9;
    border-left: 3px solid #0c2888;
    border-radius: 4px;
}

.question-required {
    color: #e74c3c;
}

.answer-options {
    margin-top: 20px;
}

.option {
    margin-bottom: 12px;
}

.option input[type="radio"],
.option input[type="checkbox"] {
    margin-right: 10px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.option label {
    display: flex;
    align-items: center;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: normal;
}

.option label:hover {
    border-color: #0c2888;
    background: #f0f2f9;
}

.option input[type="radio"]:checked+label,
.option input[type="checkbox"]:checked+label {
    border-color: #0c2888;
    background: #f0f2f9;
}

.rating-container {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.rating-option {
    flex: 1;
    min-width: 80px;
    max-width: 120px;
}

.rating-option input[type="radio"] {
    display: none;
}

.rating-option label {
    display: block;
    padding: 15px;
    text-align: center;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.rating-option label:hover {
    border-color: #0c2888;
    background: #f0f2f9;
    transform: translateY(-2px);
}

.rating-option input[type="radio"]:checked+label {
    border-color: #0c2888;
    background: #0c2888;
    color: white;
}

.rating-option-value {
    font-size: 24px;
    margin-bottom: 5px;
}

.rating-option-label {
    font-size: 12px;
}

.number-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 18px;
    text-align: center;
}

.text-input {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    resize: vertical;
}

.button-group {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.button-group.flex {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

.btn-full {
    flex: 1;
}

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

.score-screen {
    text-align: center;
    display: none;
}

.score-screen.active {
    display: block;
}

.score-circle {
    width: 200px;
    height: 200px;
    margin: 30px auto;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.score-value {
    font-size: 48px;
    font-weight: bold;
    color: #0c2888;
    z-index: 1;
}

.score-label {
    font-size: 18px;
    color: #666;
    margin-top: 10px;
}

.score-details {
    margin-top: 30px;
    padding: 20px;
    background: #f0f2f9;
    border-radius: 8px;
}

.score-details p {
    margin: 10px 0;
    color: #333;
    font-size: 16px;
}

.error-message {
    background: #fee;
    color: #c33;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
}

.error-message.show {
    display: block;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.loading.hidden {
    display: none;
}

.hidden {
    display: none !important;
}

.text-muted {
    color: #999;
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .header-logo {
        width: 100%;
    }

    .header-logo img {
        max-height: 40px;
        padding: 8px;
    }

    .header h1 {
        font-size: 1.5em;
    }

    .header-actions {
        width: 100%;
        flex-direction: column;
    }

    .header-actions .btn {
        width: 100%;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .rating-options {
        grid-template-columns: 1fr;
    }

    .questions-table {
        font-size: 14px;
    }

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

@media (max-width: 600px) {
    .container {
        margin: 10px;
    }

    .content {
        padding: 20px;
    }

    .header-logo.center img {
        max-height: 40px;
        padding: 8px;
    }

    .header.center h1 {
        font-size: 1.5em;
    }

    .rating-container {
        flex-direction: column;
    }

    .rating-option {
        max-width: 100%;
    }
}