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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
    line-height: 1.5;
    color: #1f2328;
    background-color: #ffffff;
    font-size: 14px;
}

.container {
    max-width: 1800px;
    margin: 0 auto;
    padding: 24px;
    padding-top: 88px; /* Account for sticky header */
}

/* Ensure all pages with sticky header have proper top padding */
body:has(.sticky-header) .container,
body:has(.sticky-header) .admin-container,
body:has(.sticky-header) .dashboard-container {
    padding-top: 88px;
}

header {
    text-align: center;
    margin-bottom: 32px;
    padding-bottom: 16px;
    padding-top: 16px;
    border-bottom: 1px solid #d1d9e0;
}

header h1 {
    font-size: 32px;
    font-weight: 600;
    color: #1f2328;
    margin-bottom: 8px;
}

header p {
    font-size: 16px;
    color: #656d76;
}

.feedback-form {
    background: #ffffff;
    border: 1px solid #d1d9e0;
    border-radius: 12px;
    padding: 24px;
}

.form-section {
    margin-bottom: 24px;
}

.form-section h2 {
    color: #1f2328;
    margin-bottom: 16px;
    font-size: 20px;
    font-weight: 600;
    border-bottom: 1px solid #d1d9e0;
    padding-bottom: 8px;
}

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #1f2328;
    font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="date"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d9e0;
    border-radius: 6px;
    font-size: 14px;
    background-color: #ffffff;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #24292f;
    box-shadow: inset 0 1px 0 rgba(208, 215, 222, 0.2), 0 0 0 2px rgba(36, 41, 47, 0.3);
}

.radio-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px;
    margin-top: 6px;
}

/* Option width classes for flexible layouts */
.radio-group.custom-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.radio-group .option-width-full {
    flex: 0 0 100%;
}

.radio-group .option-width-half {
    flex: 0 0 calc(50% - 4px);
}

.radio-group .option-width-third {
    flex: 0 0 calc(33.333% - 5.33px);
}

.radio-group .option-width-quarter {
    flex: 0 0 calc(25% - 6px);
}

.radio-group .option-width-fifth {
    flex: 0 0 calc(20% - 6.4px);
}

.radio-group label {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
    padding: 8px 12px;
    border: 1px solid #d1d9e0;
    border-radius: 6px;
    background-color: #f6f8fa;
    transition: all 0.15s ease-in-out;
    font-size: 14px;
}

.radio-group label:hover {
    background-color: #f3f4f6;
    border-color: #afb8c1;
}

.radio-group input[type="radio"]:checked + label,
.radio-group label:has(input[type="radio"]:checked) {
    background-color: #e5e7ea;
    border-color: #24292f;
    color: #24292f;
}

.radio-group input[type="radio"],
.radio-group input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #0969da;
    outline: none;
    flex-shrink: 0;
}

.radio-group input[type="radio"]:focus {
    outline: none;
    box-shadow: none;
}

.radio-group input[type="radio"]:focus-visible {
    outline: none;
    box-shadow: none;
}

.submit-btn {
    background-color: #24292f;
    color: #ffffff;
    border: 1px solid rgba(36, 41, 47, 0.4);
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
    width: 100%;
    display: block;
    margin: 24px auto 0;
}

.submit-btn:hover {
    background-color: #1c2128;
}

.submit-btn:disabled {
    background-color: #8c959f;
    border-color: rgba(140, 149, 159, 0.4);
    cursor: not-allowed;
}

.loading {
    text-align: center;
    padding: 32px;
    background: #ffffff;
    border: 1px solid #d1d9e0;
    border-radius: 12px;
}

.loading.hidden {
    display: none;
}

.spinner {
    border: 2px solid #f6f8fa;
    border-top: 2px solid #24292f;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

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

.error {
    color: #d1242f;
    font-size: 12px;
    margin-top: 4px;
}

.success {
    color: #1f883d;
    font-size: 12px;
    margin-top: 4px;
}

/* Custom Modal Styles */
.custom-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.custom-modal-content {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 500px;
    width: 90%;
    text-align: center;
}

.custom-modal-content h3 {
    color: #24292f;
    margin: 0 0 15px 0;
    font-size: 1.3rem;
}

.custom-modal-content p {
    color: #656d76;
    margin: 0 0 25px 0;
    line-height: 1.6;
}

.custom-modal-content button {
    margin: 0 auto;
}

/* Certificate Styles */
.certificate-container {
    background: #ffffff;
    border: 1px solid #d1d9e0;
    border-radius: 12px;
    padding: 60px;
    text-align: center;
    max-width: 100%;
    width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

.certificate {
    border: 2px solid #24292f;
    padding: 32px;
    margin: 16px 0;
    background: #f6f8fa;
    position: relative;
    border-radius: 8px;
    min-height: 400px;
}

.certificate::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    bottom: 12px;
    border: 1px solid #656d76;
    pointer-events: none;
    border-radius: 4px;
}

.certificate h1 {
    font-size: 28px;
    color: #24292f;
    margin-bottom: 16px;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

.certificate .participant-name {
    font-size: 24px;
    color: #1f2328;
    margin: 16px 0;
    font-weight: 600;
    border-bottom: 2px solid #1f2328;
    display: inline-block;
    padding-bottom: 4px;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

.certificate .completion-text {
    font-size: 16px;
    color: #656d76;
    margin: 16px 0;
    line-height: 1.5;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

.certificate .date {
    font-size: 14px;
    color: #656d76;
    margin-top: 24px;
}

.download-btn {
    background-color: #24292f;
    color: #ffffff;
    border: 1px solid rgba(36, 41, 47, 0.4);
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    margin: 16px 8px;
    transition: background-color 0.15s ease-in-out;
    min-width: 140px;
}

.download-btn:hover {
    background-color: #1c2128;
}

.back-btn {
    background-color: #24292f;
    color: #ffffff;
    border: 1px solid rgba(36, 41, 47, 0.4);
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    margin: 16px 8px;
    transition: background-color 0.15s ease-in-out;
    min-width: 140px;
}

.back-btn:hover {
    background-color: #1c2128;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .feedback-form {
        padding: 20px;
    }
    
    .radio-group {
        gap: 8px;
    }
    
    .certificate h1 {
        font-size: 2rem;
    }
    
    .certificate .participant-name {
        font-size: 1.5rem;
    }
}
/* Admin Panel Styles */
.admin-container {
    max-width: 1800px; /* Match public page width */
    margin: 0 auto;
    padding: 24px;
}

.admin-header {
    background: #ffffff;
    border: 1px solid #d1d9e0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.admin-header h1 {
    font-size: 24px;
    font-weight: 600;
    color: #1f2328;
    margin-bottom: 8px;
}

.admin-header p {
    color: #656d76;
    font-size: 16px;
}

.settings-content-box {
    background: #ffffff;
    border: 1px solid #d1d9e0;
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
}

.admin-content-box {
    background: #ffffff;
    border: 1px solid #d1d9e0;
    border-radius: 12px;
    padding: 0;
    overflow: visible;
}

.public-content-box {
    background: #ffffff;
    border: 1px solid #d1d9e0;
    border-radius: 12px;
    padding: 24px;
    margin-top: 24px;
}

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

.stat-card {
    background: #ffffff;
    border: 1px solid #d1d9e0;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.stat-number {
    font-size: 32px;
    font-weight: 600;
    color: #24292f;
    display: block;
    margin-bottom: 4px;
}

.stat-card div:last-child {
    font-size: 14px;
    color: #656d76;
    font-weight: 500;
}

.participants-table {
    background: #ffffff;
    border: 1px solid #d1d9e0;
    border-radius: 12px;
    overflow: hidden;
}

.table-header {
    background: #f6f8fa;
    border-bottom: 1px solid #d1d9e0;
    padding: 20px;
    position: relative;
    z-index: 1000;
}

.table-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: #1f2328;
    margin-bottom: 16px;
}

.table-controls {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.table-controls-row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.admin-filters-row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: nowrap;
    overflow-x: auto;
    position: relative;
    z-index: 1001;
}

.admin-filters-row .filter-select,
.admin-filters-row .custom-dropdown-select {
    flex: 0 1 auto;
    min-width: 140px;
    max-width: 180px;
}

.admin-clear-filters-btn {
    height: 38px !important;
    white-space: nowrap !important;
    min-width: 140px !important;
    flex-shrink: 0 !important;
}

.table-content {
    max-height: 600px;
    overflow-y: auto;
    overflow-x: auto;
    width: 100%;
    position: relative;
    z-index: 1;
}

table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
    min-width: 1400px;
}

th, td {
    padding: 8px 12px; /* Reduced from 12px 16px for more compact table */
    text-align: left;
    border-bottom: 1px solid #d1d9e0;
    font-size: 14px; /* Reduced from 15px */
    white-space: nowrap;
}

th {
    background: #f6f8fa;
    font-weight: 600;
    color: #1f2328;
    position: sticky;
    top: 0;
    border-bottom: 1px solid #d1d9e0;
    z-index: 10;
}

td {
    color: #1f2328;
}

/* Participants table - Optimized column widths (Total: 100%) */
#participantsTable {
    table-layout: fixed;
    width: 100%;
}

#participantsTable th:nth-child(1),
#participantsTable td:nth-child(1) {
    /* Participant name and email - 18% */
    width: 18%;
    white-space: normal;
}

#participantsTable th:nth-child(2),
#participantsTable td:nth-child(2) {
    /* Phone - 10% */
    width: 10%;
}

#participantsTable th:nth-child(3),
#participantsTable td:nth-child(3) {
    /* Form - 10% */
    width: 10%;
}

#participantsTable th:nth-child(4),
#participantsTable td:nth-child(4) {
    /* Satisfaction - 11% */
    width: 11%;
}

#participantsTable th:nth-child(5),
#participantsTable td:nth-child(5) {
    /* Content Quality - 11% */
    width: 11%;
}

#participantsTable th:nth-child(6),
#participantsTable td:nth-child(6) {
    /* Recommendation - 11% */
    width: 11%;
}

#participantsTable th:nth-child(7),
#participantsTable td:nth-child(7) {
    /* Submitted date - 12% */
    width: 12%;
}

#participantsTable th:nth-child(8),
#participantsTable td:nth-child(8) {
    /* Actions - 17% (fits 3 buttons) */
    width: 17%;
    white-space: nowrap;
}

/* Action buttons in table - compact size */
/* Removed - consolidated below */

#participantsTable .delete-btn {
    background-color: #cf222e;
}

#participantsTable .delete-btn:hover {
    background-color: #a40e26;
}

/* Align action buttons to the right */
#participantsTable td:last-child,
#submissionsTable td:last-child,
#clientsTable td:last-child {
    text-align: right;
    padding-right: 16px;
}

#participantsTable th:last-child,
#submissionsTable th:last-child,
#clientsTable th:last-child {
    text-align: right;
    padding-right: 16px;
}

/* Compact action buttons for all tables */
#participantsTable .action-btn,
#submissionsTable .action-btn,
#clientsTable .action-btn {
    padding: 6px 10px;
    font-size: 12px;
    min-width: auto;
    margin: 1px;
    display: inline-block;
    white-space: nowrap;
}

.action-btn {
    background-color: #24292f;
    color: #ffffff;
    border: 1px solid rgba(36, 41, 47, 0.4);
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    margin: 2px;
    transition: background-color 0.15s ease-in-out;
    white-space: nowrap;
    min-width: auto;
    display: inline-block;
}

.action-btn:hover {
    background-color: #1c2128;
}

/* Export CSV button specific styling */
.action-btn[onclick*="exportData"]:hover {
    background-color: #1c2128 !important;
}

/* Form Questions Drag and Drop Styles */
.questions-list {
    margin: 20px 0;
}

.question-item {
    background-color: #ffffff;
    border: 1px solid #d1d9e0;
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 12px;
    position: relative;
    transition: all 0.2s ease;
    cursor: move;
}

.question-item:hover {
    border-color: #24292f;
    box-shadow: 0 2px 8px rgba(36, 41, 47, 0.1);
}

.question-item.dragging {
    opacity: 0.5;
    transform: rotate(2deg);
    box-shadow: 0 4px 16px rgba(36, 41, 47, 0.2);
}

.question-item.drag-over {
    border-color: #0969da;
    background-color: #f6f8fa;
}

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

.question-drag-handle {
    display: flex;
    align-items: center;
    color: #656d76;
    font-size: 18px;
    cursor: grab;
    padding: 4px;
    margin-right: 12px;
}

.question-drag-handle:active {
    cursor: grabbing;
}

.question-content {
    flex: 1;
}

.question-title {
    font-weight: 600;
    color: #24292f;
    margin-bottom: 4px;
}

.question-meta {
    font-size: 14px;
    color: #656d76;
}

.question-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.question-reorder-buttons {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-right: 8px;
}

.reorder-btn {
    background: #f6f8fa;
    border: 1px solid #d1d9e0;
    border-radius: 4px;
    width: 24px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    color: #656d76;
    transition: all 0.15s ease;
}

.reorder-btn:hover {
    background-color: #ffffff;
    border-color: #24292f;
    color: #24292f;
}

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

.reorder-btn:disabled:hover {
    background-color: #f6f8fa;
    border-color: #d1d9e0;
    color: #656d76;
}

.section-description {
    color: #656d76;
    font-size: 14px;
    margin-bottom: 16px;
    font-style: italic;
}

/* Export Data Container */
.export-data-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.export-data-container p {
    margin: 0;
    flex: 1;
}

.export-data-container .action-buttons {
    flex-shrink: 0;
    display: flex;
    gap: 12px;
}

/* Danger Zone Styles */
.danger-zone {
    margin-top: 40px;
}

.danger-zone h3 {
    color: #d1242f;
    margin-bottom: 12px;
}

.danger-warning {
    color: #d1242f;
    font-size: 14px;
    margin-bottom: 20px;
    padding: 12px;
    background-color: #ffebee;
    border: 1px solid #f85149;
    border-radius: 4px;
}

.danger-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.danger-action-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border: 1px solid #f85149;
    border-radius: 4px;
    background-color: #ffffff;
}

.danger-action-info h4 {
    color: #24292f;
    margin: 0 0 4px 0;
    font-size: 16px;
}

.danger-action-info p {
    color: #656d76;
    margin: 0;
    font-size: 14px;
}

.danger-btn {
    background-color: #d1242f;
    border-color: #d1242f;
    color: #ffffff;
}

.danger-btn:hover {
    background-color: #b91c1c;
    border-color: #b91c1c;
}

/* Danger Modal Styles */
.danger-modal-content {
    text-align: center;
}

.danger-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.danger-modal-content h3 {
    color: #d1242f;
    margin-bottom: 16px;
}

.danger-modal-content ul {
    text-align: left;
    margin: 16px 0;
    padding-left: 20px;
}

.danger-modal-content li {
    margin-bottom: 8px;
    color: #24292f;
}

.danger-warning-text {
    color: #d1242f;
    font-weight: 600;
    margin: 20px 0 16px 0;
}

/* Import/Export Tab Styles */
.import-export-settings {
    max-width: 800px;
}

.import-section {
    margin-top: 20px;
}

.file-upload-area {
    border: 2px dashed #d1d9e0;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    background-color: #f6f8fa;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.file-upload-area:hover {
    border-color: #24292f;
    background-color: #ffffff;
}

.file-upload-area.dragover {
    border-color: #0969da;
    background-color: #dbeafe;
}

.upload-content {
    pointer-events: none;
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.file-info {
    background-color: #f6f8fa;
    border: 1px solid #d1d9e0;
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 20px;
}

.import-progress {
    background-color: #f6f8fa;
    border: 1px solid #d1d9e0;
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 20px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e1e4e8;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background-color: #28a745;
    width: 0%;
    transition: width 0.3s ease;
}

.import-results {
    background-color: #f6f8fa;
    border: 1px solid #d1d9e0;
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 20px;
}

.csv-template {
    background-color: #f6f8fa;
    border: 1px solid #d1d9e0;
    border-radius: 6px;
    padding: 20px;
    margin-top: 30px;
}

.template-example {
    background-color: #ffffff;
    border: 1px solid #d1d9e0;
    border-radius: 4px;
    padding: 12px;
    margin: 12px 0;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 14px;
}

.template-example code {
    background: none;
    padding: 0;
    color: #24292f;
}

.delete-btn {
    background-color: #d1242f !important;
    border-color: rgba(209, 36, 47, 0.4) !important;
}

.delete-btn:hover {
    background-color: #b91c1c !important;
}

/* Certificate Settings */
.certificate-settings {
    background: #ffffff;
    border: 1px solid #d1d9e0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.certificate-settings h2 {
    font-size: 20px;
    font-weight: 600;
    color: #1f2328;
    margin-bottom: 16px;
    border-bottom: 1px solid #d1d9e0;
    padding-bottom: 8px;
}

.settings-section {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #d1d9e0;
}

.settings-section:last-child {
    border-bottom: none;
}

.settings-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1f2328;
    margin-bottom: 16px;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.text-settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.setting-item label {
    font-weight: 500;
    color: #1f2328;
    font-size: 14px;
    display: block;
    margin-bottom: 6px;
}

.password-change-form .setting-item label {
    font-weight: 600;
}

.setting-item input[type="file"],
.setting-item input[type="text"],
.setting-item input[type="password"],
.setting-item textarea {
    padding: 8px 12px;
    border: 1px solid #d1d9e0;
    border-radius: 6px;
    font-size: 14px;
    background-color: #ffffff;
    width: 100%;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    color: #1f2328;
}

.setting-item input[type="file"] {
    cursor: pointer;
}

.setting-item input[type="text"]:focus,
.setting-item input[type="password"]:focus,
.setting-item textarea:focus {
    outline: none;
    border-color: #24292f;
    box-shadow: inset 0 1px 0 rgba(208, 215, 222, 0.2), 0 0 0 2px rgba(36, 41, 47, 0.3);
}

.setting-item input[type="password"]::placeholder {
    color: #656d76;
    opacity: 1;
}

.setting-item.full-width {
    grid-column: 1 / -1;
}

/* Old delete-image-btn styles removed - now using new styles at line 3601 */

.image-preview {
    min-height: 100px;
    border: 2px dashed #d1d9e0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f6f8fa;
    position: relative;
    overflow: hidden;
}

.image-preview img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
}

.image-preview.empty::after {
    content: 'No image uploaded';
    color: #656d76;
    font-size: 14px;
}

.search-box {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d9e0;
    border-radius: 6px;
    font-size: 14px;
    background-color: #ffffff;
}

.search-box:focus {
    outline: none;
    border-color: #24292f;
    box-shadow: inset 0 1px 0 rgba(208, 215, 222, 0.2), 0 0 0 2px rgba(36, 41, 47, 0.3);
}

.filters {
    display: flex;
    gap: 12px;
    flex-wrap: nowrap;
    align-items: center;
    flex: 1;
}

.search-box {
    height: 38px;
    flex: 1;
    min-width: 250px;
}

.filter-select {
    padding: 6px 8px;
    border: 1px solid #d1d9e0;
    border-radius: 6px;
    font-size: 14px;
    background-color: #ffffff;
    color: #1f2328;
}

.filter-select:focus {
    outline: none;
    border-color: #24292f;
    box-shadow: inset 0 1px 0 rgba(208, 215, 222, 0.2), 0 0 0 2px rgba(36, 41, 47, 0.3);
}

.satisfaction-badge {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    display: inline-block;
}

/* Satisfaction Level Colors */
.satisfaction-very-satisfied {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.satisfaction-satisfied {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.satisfaction-neutral {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.satisfaction-dissatisfied {
    background-color: #fed7d7;
    color: #c53030;
    border: 1px solid #fca5a5;
}

.satisfaction-very-dissatisfied {
    background-color: #fecaca;
    color: #991b1b;
    border: 1px solid #f87171;
}

/* Content Quality Colors */
.quality-excellent {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.quality-good {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.quality-average {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.quality-poor {
    background-color: #fecaca;
    color: #991b1b;
    border: 1px solid #f87171;
}

/* Recommendation Colors */
.recommend-definitely {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.recommend-probably {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.recommend-maybe {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.recommend-probably-not {
    background-color: #fed7d7;
    color: #c53030;
    border: 1px solid #fca5a5;
}

.recommend-definitely-not {
    background-color: #fecaca;
    color: #991b1b;
    border: 1px solid #f87171;
}

/* Compact form layout */
.form-sections-grid {
    display: block;
    margin-bottom: 24px;
}

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

.form-groups-row .form-group {
    margin-bottom: 12px;
}

/* Responsive design */
@media (max-width: 1024px) {
    .form-groups-row {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .container, .admin-container {
        padding: 16px;
        padding-top: 88px; /* Maintain sticky header space on mobile */
    }
    
    body:has(.sticky-header) .dashboard-container {
        padding-top: 88px;
    }
    
    .form-sections-grid {
        display: block;
    }
    
    .form-groups-row {
        grid-template-columns: 1fr;
    }
    
    .radio-group {
        grid-template-columns: 1fr;
    }
    
    /* Force single column for custom layout radio groups on mobile */
    .radio-group.custom-layout {
        flex-direction: column;
    }
    
    .radio-group .option-width-full,
    .radio-group .option-width-half,
    .radio-group .option-width-third,
    .radio-group .option-width-quarter,
    .radio-group .option-width-fifth {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .certificate h1 {
        font-size: 24px;
    }
    
    .certificate .participant-name {
        font-size: 20px;
    }
    
    .certificate .completion-text {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    header h1 {
        font-size: 24px;
    }
    
    .certificate {
        padding: 20px;
    }
}

/* Custom Modal Styles */
.modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.8) !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    z-index: 99999 !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: #ffffff !important;
    border: 1px solid #d1d9e0;
    border-radius: 12px;
    padding: 24px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    position: relative !important;
    margin: 0 !important;
}

.modal-wide {
    max-width: 1000px !important;
    width: 95% !important;
    max-height: 90vh !important;
}

/* GitHub-Style Login Modal */
.github-login-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f6f8fa;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10vh;
    z-index: 100000;
}

.github-login-container {
    width: 100%;
    max-width: 340px;
    padding: 0 20px;
}

.github-login-header {
    text-align: center;
    margin-bottom: 24px;
}

.github-login-header h1 {
    font-size: 24px;
    font-weight: 300;
    letter-spacing: -0.5px;
    color: #24292f;
    margin: 0;
}

.github-login-form {
    background: #ffffff;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    padding: 20px;
}

.github-form-group {
    margin-bottom: 16px;
}

.github-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 400;
    color: #24292f;
    margin-bottom: 8px;
}

.github-input {
    width: 100%;
    padding: 5px 12px;
    font-size: 14px;
    line-height: 20px;
    color: #24292f;
    background-color: #ffffff;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    outline: none;
    box-shadow: inset 0 1px 0 rgba(208, 215, 222, 0.2);
    transition: border-color 0.2s;
}

.github-input:focus {
    border-color: #0969da;
    box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.3);
}

.github-error-message {
    background-color: #fff8c5;
    border: 1px solid #d4a72c;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #24292f;
}

.github-login-btn {
    width: 100%;
    padding: 5px 16px;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    color: #ffffff;
    background-color: #2da44e;
    border: 1px solid rgba(27, 31, 36, 0.15);
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.github-login-btn:hover {
    background-color: #2c974b;
}

.github-login-btn:active {
    background-color: #298e46;
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 8px;
}

.strength-bar {
    width: 100%;
    height: 4px;
    background-color: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 4px;
}

.strength-fill {
    height: 100%;
    transition: width 0.3s ease, background-color 0.3s ease;
    width: 0%;
}

.strength-fill.weak {
    background-color: #dc3545;
    width: 33%;
}

.strength-fill.medium {
    background-color: #ffc107;
    width: 66%;
}

.strength-fill.strong {
    background-color: #28a745;
    width: 100%;
}

.password-strength span {
    font-size: 12px;
    color: #656d76;
}

.password-change-form {
    max-width: 600px;
}

/* Enhanced password input styling */
.password-change-form input[type="password"] {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
    line-height: 20px;
}

.password-change-form input[type="password"]:hover {
    border-color: #8c959f;
}

.password-change-form input[type="password"]:disabled {
    background-color: #f6f8fa;
    color: #656d76;
    cursor: not-allowed;
}

.password-change-form .setting-item {
    margin-bottom: 4px;
}

.section-description {
    color: #656d76;
    font-size: 14px;
    margin-bottom: 20px;
    margin-top: -8px;
}

.modal-overlay.show .modal {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #d1d9e0;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2328;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #656d76;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background-color 0.15s ease;
}

.modal-close:hover {
    background-color: #f6f8fa;
}

.modal-body {
    margin-bottom: 20px;
    color: #1f2328;
    line-height: 1.5;
}

/* Modal form styling */
.modal .form-group {
    margin-bottom: 16px;
}

.modal .form-group label {
    display: block;
    font-weight: 600;
    color: #1f2328;
    margin-bottom: 6px;
    font-size: 14px;
}

.modal .form-group input[type="text"],
.modal .form-group select,
.modal .form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d9e0;
    border-radius: 6px;
    font-size: 14px;
    background-color: #ffffff;
    color: #1f2328;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.modal .form-group input[type="text"]:focus,
.modal .form-group select:focus,
.modal .form-group textarea:focus {
    outline: none;
    border-color: #24292f;
    box-shadow: inset 0 1px 0 rgba(208, 215, 222, 0.2), 0 0 0 2px rgba(36, 41, 47, 0.3);
}

.modal .form-group input[type="checkbox"] {
    margin-right: 8px;
    width: auto;
}

.modal .form-group label:has(input[type="checkbox"]) {
    display: flex;
    align-items: center;
    font-weight: 500;
    cursor: pointer;
}

.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.modal-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s ease;
    border: 1px solid;
}

.modal-btn-primary {
    background-color: #24292f;
    color: #ffffff;
    border-color: rgba(36, 41, 47, 0.4);
}

.modal-btn-primary:hover {
    background-color: #1c2128;
}

.modal-btn-danger {
    background-color: #d1242f;
    color: #ffffff;
    border-color: rgba(209, 36, 47, 0.4);
}

.modal-btn-danger:hover {
    background-color: #b91c1c;
}

.modal-btn-secondary {
    background-color: #f6f8fa;
    color: #24292f;
    border-color: #d1d9e0;
}

.modal-btn-secondary:hover {
    background-color: #f3f4f6;
}

/* Collapsible Section Styles */
.collapsible-section {
    border: 1px solid #d1d9e0;
    border-radius: 6px;
    overflow: hidden;
    background: #ffffff;
}

.collapsible-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #ffffff;
    cursor: pointer;
    transition: background-color 0.15s ease;
    user-select: none;
}

.collapsible-header:hover {
    background: #f6f8fa;
}

.collapsible-header.collapsed .collapse-icon {
    transform: rotate(-90deg);
}

.collapse-icon {
    transition: transform 0.2s ease;
    color: #656d76;
    flex-shrink: 0;
}

.collapsible-content {
    border-top: 1px solid #d1d9e0;
}
/* En
sure modal appears above everything */
body.modal-open {
    overflow: hidden;
}

.modal-overlay {
    pointer-events: auto !important;
}

.modal-overlay.show {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Fix any potential positioning conflicts */
.modal-overlay * {
    box-sizing: border-box;
}

/* Ensure proper stacking */
.modal {
    z-index: 100000 !important;
}/* Se
ttings Page Styles */
.settings-nav {
    display: flex;
    gap: 0;
    margin-bottom: 0;
    border-bottom: 1px solid #d1d9e0;
    background: #f6f8fa;
}

.nav-tab {
    background: none;
    border: none;
    padding: 12px 24px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #656d76;
    border-bottom: 2px solid transparent;
    transition: all 0.15s ease;
}

.nav-tab:hover {
    color: #24292f;
    background-color: #f6f8fa;
}

.nav-tab.active {
    color: #24292f;
    border-bottom-color: #24292f;
    background-color: #ffffff;
}

.settings-tab {
    display: none;
    padding: 24px;
}

.settings-tab.active {
    display: block;
}

.question-item {
    background: #f6f8fa;
    border: 1px solid #d1d9e0;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
}

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

.question-header h4 {
    margin: 0;
    color: #1f2328;
    font-size: 16px;
    font-weight: 500;
}

.question-actions {
    display: flex;
    gap: 8px;
}

.question-details {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #656d76;
}

.question-type {
    background: #dbeafe;
    color: #1e40af;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.question-required {
    background: #dcfce7;
    color: #166534;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.question-options {
    background: #f3f4f6;
    color: #374151;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
}

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

.action-buttons .action-btn {
    min-width: 120px;
}

/* Form field improvements */
.setting-item select {
    padding: 8px 12px;
    border: 1px solid #d1d9e0;
    border-radius: 6px;
    font-size: 14px;
    background-color: #ffffff;
    width: 100%;
    cursor: pointer;
}

.setting-item select:focus {
    outline: none;
    border-color: #24292f;
    box-shadow: inset 0 1px 0 rgba(208, 215, 222, 0.2), 0 0 0 2px rgba(36, 41, 47, 0.3);
}

/* ============================================
   Custom Dropdown Component - Global Styles
   ============================================ */

/* Container */
.custom-dropdown-container {
    position: relative;
    width: 100%;
    display: inline-block;
    z-index: 100;
}

.custom-dropdown-container.open {
    z-index: 99999;
}

/* Dropdown Button */
.custom-dropdown-button {
    width: 100%;
    height: 38px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #ffffff;
    border: 1px solid #d1d9e0;
    border-radius: 6px;
    font-size: 14px;
    color: #1f2328;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
    line-height: 20px;
    text-align: left;
}

.custom-dropdown-button:hover {
    background-color: #f6f8fa;
    border-color: #8c959f;
}

.custom-dropdown-button:focus {
    outline: none;
    border-color: #24292f;
    box-shadow: 0 0 0 3px rgba(36, 41, 47, 0.1);
}

.custom-dropdown-button:active {
    background-color: #f3f4f6;
}

.custom-dropdown-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #f6f8fa;
}

.custom-dropdown-button:disabled:hover {
    border-color: #d1d9e0;
    background-color: #f6f8fa;
}

/* Dropdown Label */
.dropdown-label {
    flex: 1;
    text-align: left;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Dropdown Arrow */
.dropdown-arrow {
    color: #656d76;
    transition: transform 0.2s ease;
    flex-shrink: 0;
    margin-left: 8px;
}

.custom-dropdown-button.open .dropdown-arrow {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.custom-dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background-color: #ffffff;
    border: 1px solid #d1d9e0;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(140, 149, 159, 0.2);
    z-index: 999999;
    overflow: hidden;
    max-height: 300px;
    overflow-y: auto;
    animation: dropdownFadeIn 0.15s ease-out;
}

/* When using fixed positioning (set by JS) */
.custom-dropdown-menu[style*="position: fixed"] {
    right: auto;
}

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

/* Dropdown Options */
.dropdown-option {
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #1f2328;
    transition: background-color 0.1s ease;
    border-bottom: 1px solid #f6f8fa;
}

.dropdown-option:last-child {
    border-bottom: none;
}

.dropdown-option:hover {
    background-color: #f6f8fa;
}

.dropdown-option:active {
    background-color: #eaeef2;
}

.dropdown-option.selected {
    background-color: #f6f8fa;
    font-weight: 500;
}

.dropdown-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Option Icon - Lucide Icons */
.dropdown-option-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    stroke-width: 2;
    color: #656d76;
}

/* Status Indicators */
.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-indicator.status-active {
    background-color: #1f883d;
    box-shadow: 0 0 0 2px rgba(31, 136, 61, 0.2);
}

.status-indicator.status-inactive {
    background-color: #cf222e;
    box-shadow: 0 0 0 2px rgba(207, 34, 46, 0.2);
}

.status-indicator.status-pending {
    background-color: #fb8500;
    box-shadow: 0 0 0 2px rgba(251, 133, 0, 0.2);
}

.status-indicator.status-success {
    background-color: #1f883d;
    box-shadow: 0 0 0 2px rgba(31, 136, 61, 0.2);
}

.status-indicator.status-warning {
    background-color: #fb8500;
    box-shadow: 0 0 0 2px rgba(251, 133, 0, 0.2);
}

.status-indicator.status-error {
    background-color: #cf222e;
    box-shadow: 0 0 0 2px rgba(207, 34, 46, 0.2);
}

.status-indicator.status-info {
    background-color: #0969da;
    box-shadow: 0 0 0 2px rgba(9, 105, 218, 0.2);
}

/* Scrollbar styling for dropdown menu */
.custom-dropdown-menu::-webkit-scrollbar {
    width: 8px;
}

.custom-dropdown-menu::-webkit-scrollbar-track {
    background: #f6f8fa;
}

.custom-dropdown-menu::-webkit-scrollbar-thumb {
    background: #d1d9e0;
    border-radius: 4px;
}

.custom-dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: #8c959f;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .custom-dropdown-menu {
        max-height: 250px;
    }
}

/* Match datetime-local input height */
input[type="datetime-local"] {
    height: 38px;
    line-height: 20px;
}

/* Responsive improvements for settings */
@media (max-width: 768px) {
    .settings-nav {
        flex-direction: column;
    }
    
    .nav-tab {
        text-align: left;
        border-bottom: 1px solid #d1d9e0;
        border-right: none;
    }
    
    .nav-tab.active {
        border-bottom-color: #d1d9e0;
        border-left: 3px solid #24292f;
    }
    
    .question-header {
        flex-direction: column;
        gap: 12px;
    }
    
    .question-actions {
        align-self: flex-start;
    }
    
    .action-buttons {
        flex-direction: column;
    }

    /* Search Section Mobile - Static Position */
    .search-section {
        position: static;
        margin-bottom: 20px;
    }

    .search-section input {
        width: 100%;
        margin-bottom: 10px;
    }

    .search-section button {
        width: 100%;
    }

    /* Submit Button Mobile - Static Position */
    .submit-btn {
        width: 100%;
        margin: 20px 0;
        padding: 16px 20px;
        font-size: 16px;
    }

    /* Admin Dashboard Mobile Optimization */
    .admin-container {
        padding: 10px;
        padding-top: 88px; /* Maintain sticky header space */
    }

    /* Admin Header Mobile */
    .admin-header h1 {
        font-size: 20px;
        width: 100%;
    }

    .admin-header p {
        font-size: 14px;
        width: 100%;
    }

    .admin-header > div {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 10px;
    }

    /* Improvement #2: Admin Header Buttons - Full Width and Stacked */
    .admin-header .back-btn {
        width: 100%;
        padding: 12px 16px;
        font-size: 14px;
    }

    .admin-header > div > div {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .admin-header > div > div button {
        width: 100%;
    }

    /* Stats Grid - 2 Column Layout */
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-number {
        font-size: 24px;
    }

    /* Participants Table - Mobile Card View */
    .table-content {
        overflow-x: visible;
        -webkit-overflow-scrolling: touch;
        max-height: none;
    }

    /* Mobile Cards Container */
    #participantsCardsContainer {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .participant-card-mobile {
        background: white;
        border: 1px solid #d1d9e0;
        border-radius: 8px;
        padding: 16px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }

    .participant-card-header {
        margin-bottom: 12px;
        padding-bottom: 12px;
        border-bottom: 1px solid #e5e7eb;
    }

    .participant-card-name {
        font-size: 16px;
        font-weight: 600;
        color: #24292f;
        margin-bottom: 8px;
    }

    .participant-card-contact {
        font-size: 13px;
        color: #57606a;
        line-height: 1.6;
    }

    .participant-card-scores {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
        margin-bottom: 12px;
        padding-bottom: 12px;
        border-bottom: 1px solid #e5e7eb;
    }

    .participant-score-item {
        text-align: center;
    }

    .participant-score-label {
        font-size: 11px;
        color: #57606a;
        margin-bottom: 4px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .participant-score-value {
        font-size: 20px;
    }

    .participant-card-actions {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .participant-card-actions .action-btn {
        width: 100%;
        padding: 10px 16px;
        font-size: 14px;
        text-align: center;
    }

    .participant-card-actions .delete-btn {
        background-color: #dc3545;
        color: white;
    }

    .participant-card-actions .delete-btn:hover {
        background-color: #c82333;
    }

    /* Improvement #3: Clear All Filters Button - Match Settings Button Style */
    .table-controls .action-btn {
        width: 100%;
        padding: 12px 16px;
        font-size: 14px;
    }

    /* Certificate Page Mobile */
    .certificate-container {
        padding: 10px;
    }

    .certificate {
        padding: 20px;
        font-size: 14px;
    }

    /* Certificate Page Buttons - Static Position */
    .certificate-container .download-btn {
        width: 100%;
        margin: 10px 0;
        padding: 16px 20px;
        font-size: 16px;
    }

    .certificate-container .back-btn {
        width: 100%;
        margin: 10px 0;
        padding: 16px 20px;
        font-size: 16px;
    }

    /* Admin Settings Mobile */
    .settings-nav {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

    .nav-tab {
        display: inline-block;
        min-width: 120px;
    }

    /* Improvement #5: Certificate Settings - Form Title and Description Stack Vertically */
    .text-settings-grid {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }

    .text-settings-grid .setting-item {
        width: 100%;
    }

    /* Improvement #5c: Current Questions - Edit/Delete Buttons Inline with Text */
    .question-header {
        flex-direction: row !important;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
    }

    .question-actions {
        align-self: center;
        flex-shrink: 0;
    }

    /* Improvement #6: Data Management - All Buttons Full Width */
    .export-data-container {
        flex-direction: column;
        align-items: stretch;
    }

    .export-data-container .action-buttons {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-top: 10px;
    }

    .export-data-container .action-buttons button {
        width: 100%;
        margin: 0;
    }

    .csv-template .action-btn {
        width: 100%;
        margin: 10px 0 0 0;
    }

    .danger-actions .action-btn {
        width: 100%;
        margin: 10px 0 0 0;
    }

    .danger-action-item {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    /* Improvement #7: System Configuration - Change Password Button Full Width */
    .password-change-form .submit-btn {
        width: 100%;
    }

    /* Improvement #8: Certificate Configuration - 1 Column Layout */
    .settings-grid {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }

    .settings-grid .setting-item {
        width: 100%;
    }
}

/* International Telephone Input Styling */
.iti {
    width: 100%;
    display: block;
    position: relative;
}

.iti__flag-container {
    position: absolute;
    top: 0;
    bottom: 0;
    right: auto;
    left: 0;
    padding: 1px;
}

.iti__selected-flag {
    padding: 0 8px 0 8px;
    display: flex;
    align-items: center;
    height: 100%;
    background-color: #f6f8fa;
    border-right: 1px solid #d1d9e0;
}

/* Make the dial code VERY prominent and always visible */
.iti__selected-dial-code {
    font-weight: 700 !important;
    color: #24292f !important;
    margin-left: 8px !important;
    font-size: 15px !important;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: auto !important;
    height: auto !important;
}

.iti input[type="tel"],
.iti input[type="tel"]:focus {
    padding-left: 95px !important;
    width: 100%;
}

/* Ensure separate dial code mode is active */
.iti--separate-dial-code .iti__selected-flag {
    background-color: #f6f8fa !important;
    border-right: 1px solid #d1d9e0 !important;
}

.iti--separate-dial-code .iti__selected-dial-code {
    margin-left: 8px !important;
    display: inline-block !important;
}

/* Make the dial code more prominent in dropdown */
.iti__country-list {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid #d1d9e0;
    border-radius: 6px;
    max-height: 200px;
    z-index: 1000;
}

.iti__country {
    padding: 8px 12px;
}

.iti__country:hover {
    background-color: #f6f8fa;
}

.iti__country.iti__highlight {
    background-color: #dbeafe;
}

.iti__dial-code {
    color: #24292f;
    font-weight: 600;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .iti input[type="tel"],
    .iti input[type="tel"]:focus {
        padding-left: 90px !important;
    }
    
    .iti__selected-dial-code {
        font-size: 14px !important;
    }
}


/* Style the flag container as a unified element with dial code */
.iti__flag-container {
    background-color: #f6f8fa !important;
    border-right: 1px solid #d1d9e0 !important;
    padding-right: 8px !important;
}

.iti__selected-flag {
    background-color: #f6f8fa !important;
    padding: 0 8px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

/* Style the custom dial code injected into flag container */
.custom-dial-code {
    font-weight: 400 !important;
    color: #24292f !important;
    font-size: 14px !important;
    margin-left: 4px !important;
}

/* Adjust input padding to make room for flag and dial code */
.iti input[type="tel"] {
    padding-left: 95px !important;
}

/* Hide the dropdown arrow */
.iti__arrow {
    display: none !important;
}


/* ===================================
   Email Settings Specific Styles
   =================================== */

.email-settings .settings-section {
    background: #f6f8fa;
    border: 1px solid #d1d9e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.email-settings .section-description {
    color: #656d76;
    font-size: 14px;
    margin-bottom: 16px;
    line-height: 1.6;
}

.email-settings .text-settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

.email-settings .setting-item {
    display: flex;
    flex-direction: column;
}

.email-settings .setting-item.full-width {
    grid-column: 1 / -1;
}

.email-settings .setting-item label {
    font-weight: 600;
    color: #1f2328;
    margin-bottom: 8px;
    font-size: 14px;
}

.email-settings .setting-item input[type="text"],
.email-settings .setting-item input[type="email"],
.email-settings .setting-item input[type="number"],
.email-settings .setting-item input[type="password"],
.email-settings .setting-item textarea,
.email-settings .setting-item select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d9e0;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    background-color: #ffffff;
    transition: border-color 0.2s ease;
}

.email-settings .setting-item input:focus,
.email-settings .setting-item textarea:focus,
.email-settings .setting-item select:focus {
    outline: none;
    border-color: #0969da;
    box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.1);
}

.email-settings .setting-item small {
    display: block;
    margin-top: 4px;
    color: #656d76;
    font-size: 12px;
}

.email-settings .setting-item input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
    cursor: pointer;
}

.email-settings .setting-item label:has(input[type="checkbox"]) {
    display: flex;
    align-items: center;
    font-weight: 500;
    cursor: pointer;
}

.email-settings textarea {
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
}

.email-settings .submit-btn {
    background-color: #24292f;
    color: #ffffff;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.email-settings .submit-btn:hover {
    background-color: #1c2128;
}

.email-settings .submit-btn:disabled {
    background-color: #8c959f;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Email template editor */
.email-template-editor {
    background: #ffffff;
    border: 1px solid #d1d9e0;
    border-radius: 6px;
    padding: 16px;
    margin-top: 12px;
}

.email-template-editor .template-variables {
    background: #f6f8fa;
    border: 1px solid #d1d9e0;
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 12px;
}

.email-template-editor .template-variables h4 {
    font-size: 13px;
    font-weight: 600;
    color: #1f2328;
    margin-bottom: 8px;
}

.email-template-editor .template-variables code {
    background: #ffffff;
    border: 1px solid #d1d9e0;
    border-radius: 3px;
    padding: 2px 6px;
    font-size: 12px;
    color: #cf222e;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
}

.email-template-editor .variable-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.email-template-editor .variable-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #656d76;
}

/* Email preview */
.email-preview {
    background: #ffffff;
    border: 1px solid #d1d9e0;
    border-radius: 6px;
    padding: 20px;
    margin-top: 16px;
    max-height: 400px;
    overflow-y: auto;
}

.email-preview h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1f2328;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #d1d9e0;
}

.email-preview-content {
    font-size: 13px;
    line-height: 1.6;
    color: #1f2328;
}

/* Responsive adjustments for email settings */
@media (max-width: 768px) {
    .email-settings .text-settings-grid {
        grid-template-columns: 1fr;
    }
    
    .email-settings .setting-item.full-width {
        grid-column: 1;
    }
    
    /* Stack two-column email settings on mobile */
    #emailTab > div > div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
}


/* ============================================================================
   MULTI-FORM SYSTEM STYLES
   ============================================================================ */

/* Form Selector Section */
.form-selector-container {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}

#formSelector {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d9e0;
    border-radius: 6px;
    font-size: 14px;
    background-color: #ffffff;
    color: #1f2328;
    transition: border-color 0.15s ease-in-out;
}

#formSelector:focus {
    outline: none;
    border-color: #24292f;
    box-shadow: 0 0 0 2px rgba(36, 41, 47, 0.3);
}

#formSelector:disabled {
    background-color: #f6f8fa;
    color: #656d76;
    cursor: not-allowed;
}

/* Form URL Preview */
#formUrlPreview {
    color: #0969da;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 12px;
}

/* Form Type Select */
#formType {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d9e0;
    border-radius: 6px;
    font-size: 14px;
    background-color: #ffffff;
    color: #1f2328;
}

#formType:focus {
    outline: none;
    border-color: #24292f;
    box-shadow: 0 0 0 2px rgba(36, 41, 47, 0.3);
}

/* Form Active Checkbox */
#formActive {
    margin-right: 8px;
    width: 16px;
    height: 16px;
    border: 1px solid #d1d9e0;
    border-radius: 3px;
    cursor: pointer;
}

/* Close Date Input */
#formCloseDate {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d9e0;
    border-radius: 6px;
    font-size: 14px;
    background-color: #ffffff;
    color: #1f2328;
}

#formCloseDate:focus {
    outline: none;
    border-color: #24292f;
    box-shadow: 0 0 0 2px rgba(36, 41, 47, 0.3);
}

/* Duplicate Form Button */
#duplicateFormBtn {
    background-color: #656d76;
    margin-bottom: 0;
}

#duplicateFormBtn:hover:not(:disabled) {
    background-color: #4f5761;
}

#duplicateFormBtn:disabled {
    background-color: #8c959f;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Delete Form Button */
.action-btn[onclick*="deleteCurrentForm"] {
    background-color: #cf222e;
}

.action-btn[onclick*="deleteCurrentForm"]:hover {
    background-color: #a40e26;
}

/* Field List Styles */
#fieldsList {
    min-height: 100px;
}

#fieldsList.empty {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    border: 2px dashed #d1d9e0;
    border-radius: 6px;
    color: #656d76;
}

#fieldsList.empty::before {
    content: 'No fields yet. Click "Add New Field" to get started.';
}

/* Field Item */
.field-item {
    background: #f6f8fa;
    border: 1px solid #d1d9e0;
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.field-item:hover {
    border-color: #24292f;
    box-shadow: 0 1px 3px rgba(31, 35, 40, 0.12);
}

.field-item.dragging {
    opacity: 0.5;
    cursor: move;
}

.field-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.field-item-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #1f2328;
}

.field-type-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #ddf4ff;
    color: #0969da;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.field-required-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #fff8c5;
    color: #7d4e00;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.field-item-actions {
    display: flex;
    gap: 8px;
}

.field-action-btn {
    padding: 4px 8px;
    background: #ffffff;
    border: 1px solid #d1d9e0;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.field-action-btn:hover {
    background: #f6f8fa;
    border-color: #24292f;
}

.field-action-btn.delete {
    color: #cf222e;
}

.field-action-btn.delete:hover {
    background: #ffebe9;
    border-color: #cf222e;
}

.field-item-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.field-input-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.field-input-group label {
    font-size: 12px;
    font-weight: 500;
    color: #656d76;
}

.field-input-group input,
.field-input-group select,
.field-input-group textarea {
    padding: 6px 10px;
    border: 1px solid #d1d9e0;
    border-radius: 4px;
    font-size: 13px;
    background-color: #ffffff;
}

.field-input-group input:focus,
.field-input-group select:focus,
.field-input-group textarea:focus {
    outline: none;
    border-color: #24292f;
    box-shadow: 0 0 0 2px rgba(36, 41, 47, 0.3);
}

/* Field Options Editor */
.field-options-editor {
    grid-column: 1 / -1;
    margin-top: 8px;
}

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

.field-option-item input {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #d1d9e0;
    border-radius: 4px;
    font-size: 13px;
}

.field-option-item button {
    padding: 6px 10px;
    background: #ffffff;
    border: 1px solid #d1d9e0;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    color: #cf222e;
}

.field-option-item button:hover {
    background: #ffebe9;
    border-color: #cf222e;
}

.add-option-btn {
    padding: 6px 12px;
    background: #ffffff;
    border: 1px solid #d1d9e0;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    color: #0969da;
}

.add-option-btn:hover {
    background: #ddf4ff;
    border-color: #0969da;
}

/* Add Field Button */
#addFieldBtn {
    width: 100%;
    margin-top: 12px;
}

#addFieldBtn:disabled {
    background-color: #8c959f;
    cursor: not-allowed;
}

/* Form Configuration Sections */
#formConfigSection,
#certificateConfigSection,
#genericPdfConfigSection,
#formFieldsSection {
    animation: fadeIn 0.3s ease-in-out;
}

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

/* Loading State */
.form-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #656d76;
}

.form-loading::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #d1d9e0;
    border-top-color: #24292f;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 12px;
}

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

/* Responsive Design for Form Management */
@media (max-width: 768px) {
    .form-selector-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .form-selector-container .setting-item {
        width: 100%;
    }
    
    .form-selector-container button {
        width: 100%;
    }
    
    .field-item-body {
        grid-template-columns: 1fr;
    }
    
    .field-item-actions {
        flex-wrap: wrap;
    }
}


/* Form Badge Styles */
.form-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.form-badge.form-certificate {
    background-color: #ddf4ff;
    color: #0969da;
    border: 1px solid #54aeff;
}

.form-badge.form-generic {
    background-color: #fff8c5;
    color: #7d4e00;
    border: 1px solid #d4a72c;
}

.form-badge.form-unknown {
    background-color: #f6f8fa;
    color: #656d76;
    border: 1px solid #d1d9e0;
}


/* Table cell styling */
#participantsTable td {
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 12px 8px;
    vertical-align: middle;
}

#participantsTable tbody tr {
    height: auto;
}

/* Responsive adjustments */
@media (max-width: 1400px) {
    #participantsTable th:nth-child(4),
    #participantsTable td:nth-child(4),
    #participantsTable th:nth-child(5),
    #participantsTable td:nth-child(5),
    #participantsTable th:nth-child(6),
    #participantsTable td:nth-child(6) {
        font-size: 12px;
    }
    
    .satisfaction-badge {
        font-size: 11px;
        padding: 3px 8px;
    }
}


/* ============================================================================
   DYNAMIC FORM FIELD STYLING (Form Renderer)
   ============================================================================ */

/* Number Input Styling - Match Text Input */
.number-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d9e0;
    border-radius: 6px;
    font-size: 14px;
    background-color: #ffffff;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: textfield;
}

.number-input:focus {
    outline: none;
    border-color: #24292f;
    box-shadow: inset 0 1px 0 rgba(208, 215, 222, 0.2), 0 0 0 2px rgba(36, 41, 47, 0.3);
}

/* Remove number input spinners */
.number-input::-webkit-outer-spin-button,
.number-input::-webkit-inner-spin-button {
    appearance: none;
    -webkit-appearance: none;
    margin: 0;
}




/* Submission View Styles */
.submission-view {
    background: #ffffff;
    border: 1px solid #d1d9e0;
    border-radius: 8px;
    padding: 60px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    max-width: 100%;
    width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    box-sizing: border-box;
}

.submission-header {
    border-bottom: 2px solid #24292f;
    padding-bottom: 15px;
    margin-bottom: 25px;
}

.submission-header h3 {
    color: #24292f;
    font-size: 1.5rem;
    margin: 0 0 8px 0;
}

.submission-date {
    color: #656d76;
    font-size: 0.95rem;
    margin: 0;
}

.submission-fields {
    display: grid;
    gap: 20px;
}

.submission-field {
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 15px;
}

.submission-field:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.field-label {
    font-weight: 600;
    color: #24292f;
    font-size: 0.95rem;
    margin-bottom: 6px;
}

.field-value {
    color: #656d76;
    font-size: 1rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Personal Info Container - 3 Column Layout */
.personal-info-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 25px;
    padding: 20px;
    background: #dbeafe;
    border-radius: 8px;
    border: 1px solid #93c5fd;
}

.personal-info-item {
    display: flex;
    flex-direction: column;
}

.personal-info-label {
    font-weight: 600;
    color: #1e40af;
    font-size: 14px;
    margin-bottom: 8px;
    line-height: 1.4;
}

.personal-info-value {
    color: #1e40af;
    font-size: 14px;
    line-height: 1.4;
    font-weight: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Responsive: Stack on mobile */
@media (max-width: 768px) {
    .personal-info-container {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* Detail Fields Container - Single Column Layout */
.detail-fields-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#remainingFields {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.detail-field-item {
    padding: 15px;
    background: #f6f8fa;
    border-radius: 6px;
    border: 1px solid #e1e4e8;
}

.detail-field-label {
    font-weight: 600;
    color: #24292f;
    font-size: 14px;
    margin-bottom: 8px;
    line-height: 1.4;
}

.detail-field-value {
    color: #656d76;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Load More Button */
.load-more-btn {
    padding: 12px 24px;
    background: #24292f;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
    margin-top: 10px;
}

.load-more-btn:hover {
    background: #1f2328;
}

.load-more-btn:active {
    transform: scale(0.98);
}

/* Submission Table Styles - Force strict wrapping */
.submission-view .submission-table,
.certificate-container .submission-table,
table.submission-table {
    width: 100% !important;
    max-width: 100% !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
    margin-top: 20px;
    border: 1px solid #d1d9e0;
}

.submission-view .submission-table tbody,
.certificate-container .submission-table tbody,
table.submission-table tbody {
    width: 100% !important;
    display: table-row-group !important;
}

.submission-view .submission-table tbody tr,
.certificate-container .submission-table tbody tr,
table.submission-table tbody tr {
    width: 100% !important;
    border-bottom: 1px solid #e1e4e8;
    display: table-row !important;
}

.submission-view .submission-table tbody tr:last-child,
.certificate-container .submission-table tbody tr:last-child,
table.submission-table tbody tr:last-child {
    border-bottom: none;
}

.submission-view .submission-table td,
.certificate-container .submission-table td,
table.submission-table td {
    padding: 10px 12px !important;
    vertical-align: top !important;
    line-height: 1.6 !important;
    font-size: 14px !important;
    box-sizing: border-box !important;
    display: table-cell !important;
}

.submission-view .submission-table td.field-label,
.certificate-container .submission-table td.field-label,
table.submission-table td.field-label {
    width: 50% !important;
    min-width: 0 !important;
    max-width: 50% !important;
    font-weight: 600 !important;
    color: #24292f !important;
    background-color: #f6f8fa !important;
    border-right: 1px solid #d1d9e0 !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
    hyphens: auto !important;
}

.submission-view .submission-table td.field-value,
.certificate-container .submission-table td.field-value,
table.submission-table td.field-value {
    width: 50% !important;
    min-width: 0 !important;
    max-width: 50% !important;
    color: #1f2328 !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
    hyphens: auto !important;
}


/* Forms Landing Page */
.forms-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 0;
    padding: 0;
}

.forms-grid-loading {
    text-align: center;
    padding: 80px 20px;
    margin-top: 0;
}

.forms-grid-loading .spinner {
    border: 3px solid #f6f8fa;
    border-top: 3px solid #24292f;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.forms-grid-loading p {
    color: #656d76;
    font-size: 16px;
}

/* Form card wrapper for copy button */
.form-card-wrapper {
    position: relative;
}

.form-card-copy-btn {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #d1d9e0;
    border-radius: 6px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.form-card-copy-btn:hover {
    background: #0969da;
    border-color: #0969da;
    color: white;
    transform: scale(1.05);
}

.form-card-copy-btn svg {
    width: 16px;
    height: 16px;
}

.form-card {
    background: white;
    border: 1px solid #d1d9e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none !important;
    color: inherit;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.form-card:link,
.form-card:visited,
.form-card:hover,
.form-card:active {
    text-decoration: none !important;
}

.form-card *,
.form-card *:link,
.form-card *:visited,
.form-card *:hover,
.form-card *:active {
    text-decoration: none !important;
}

.form-card:hover {
    border-color: #0969da;
    box-shadow: 0 8px 24px rgba(9, 105, 218, 0.15);
    transform: translateY(-4px);
}

.form-card-badge-top {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: normal;
    z-index: 2;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    min-width: 0 !important;
    max-width: fit-content !important;
    max-height: fit-content !important;
    display: inline-block !important;
    white-space: nowrap !important;
    line-height: 1.2 !important;
    flex: none !important;
    text-decoration: none !important;
    text-decoration-line: none !important;
    text-decoration-style: none !important;
    text-decoration-color: transparent !important;
}

.form-card-badge-top.feedback {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-card-badge-top.generic {
    background: #f3f4f6;
    color: #4b5563;
    border: 1px solid #d1d5db;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Keep certificate badge styles for backward compatibility */
.form-card-badge-top.certificate {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
    text-decoration: none !important;
    text-decoration-line: none !important;
    text-decoration-style: none !important;
    -webkit-text-decoration-line: none !important;
    -webkit-text-decoration-style: none !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-card-image {
    width: 100%;
    height: 0;
    padding-bottom: 60%; /* 5:3 aspect ratio (900/1500 = 0.6 = 60%) */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #f6f8fa;
    position: relative;
}

/* Hide form-card-image if it has no background image */
.form-card-image:not([style*="background-image"]) {
    display: none !important;
}

.form-card-image[style*="background-image: url('')"] {
    display: none !important;
}

.form-card-content {
    padding: 20px;
    flex: 1;
}

.form-card-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2328;
    margin-bottom: 8px;
}

.form-card-description {
    font-size: 14px;
    color: #656d76;
    line-height: 1.5;
    margin-bottom: 16px;
}

.form-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #f6f8fa;
    border-top: 1px solid #d1d9e0;
    font-size: 13px;
    color: #656d76;
    gap: 12px;
}

.form-card-badge {
    display: flex;
    align-items: center;
}

.form-type-badge {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    white-space: nowrap;
    position: relative;
    box-sizing: border-box;
    margin: 0;
    line-height: 1.2;
}

/* Override certificate styles that might conflict */
.form-type-badge::before,
.form-type-badge::after {
    content: none !important;
    display: none !important;
}

.form-card-footer .form-type-badge.certificate {
    background: #dbeafe !important;
    color: #1e40af !important;
    border: 1px solid #93c5fd !important;
    padding: 4px 10px !important;
    min-height: auto !important;
    max-height: none !important;
    height: auto !important;
    border-radius: 12px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    line-height: 1.2 !important;
    font-size: 11px !important;
    font-weight: 600 !important;
}

.form-card-footer .form-type-badge.generic {
    background: #f3f4f6 !important;
    color: #4b5563 !important;
    border: 1px solid #d1d5db !important;
    padding: 4px 10px !important;
    min-height: auto !important;
    max-height: none !important;
    height: auto !important;
    border-radius: 12px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    line-height: 1.2 !important;
    font-size: 11px !important;
    font-weight: 600 !important;
}

.form-card-stats {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.form-card-stat-icon {
    width: 16px;
    height: 16px;
    color: #656d76;
    flex-shrink: 0;
}

.form-card-stat-text {
    color: #1f2328;
}

.form-card-status {
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-card-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2da44e;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.form-card-status-dot.closed {
    background: #cf222e;
    animation: none;
}

.forms-empty {
    text-align: center;
    padding: 60px 20px;
    color: #656d76;
}

.forms-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.forms-empty-title {
    font-size: 20px;
    font-weight: 600;
    color: #1f2328;
    margin-bottom: 8px;
}

.forms-empty-description {
    font-size: 14px;
    margin-bottom: 24px;
}

/* Responsive */
@media (max-width: 1024px) {
    .forms-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .forms-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .form-card-image {
        padding-bottom: 60%; /* Maintain 5:3 aspect ratio on mobile */
    }
    
    .form-card-content {
        padding: 16px;
    }
    
    .form-card-footer {
        padding: 12px 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* Admin Forms Grid - Action Buttons */
.form-card-actions {
    display: flex;
    gap: 8px;
    padding: 12px 20px;
    background: #f6f8fa;
    border-top: 1px solid #d1d9e0;
}

.form-action-btn {
    flex: 1;
    padding: 8px 16px;
    border: 1px solid #d1d9e0;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.form-action-btn.edit-btn {
    background: #f6f8fa;
    color: #24292f;
    border-color: #d1d9e0;
}

.form-action-btn.edit-btn:hover {
    background: #e8eaed;
    border-color: #24292f;
}

.form-action-btn.duplicate-btn {
    background: #24292f;
    color: white;
    border-color: #24292f;
}

.form-action-btn.duplicate-btn:hover {
    background: #1c2128;
    border-color: #1c2128;
}

.form-action-btn.delete-btn {
    background: #cf222e;
    color: white;
    border-color: #cf222e;
}

.form-action-btn.delete-btn:hover {
    background: #a40e26;
    border-color: #a40e26;
}

/* Admin form card - remove hover effect on card itself */
#adminFormsGrid .form-card {
    cursor: default;
}

#adminFormsGrid .form-card:hover {
    transform: none;
}

/* Form card badges for admin view */
.form-card-badges {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
    z-index: 2;
}

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

.status-badge.status-active {
    background: #ddf4e8;
    color: #1a7f37;
    border: 1px solid #a2e8b8;
}

.status-badge.status-inactive {
    background: #f6f8fa;
    color: #656d76;
    border: 1px solid #d1d9e0;
}

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

.type-badge.type-certificate {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.type-badge.type-generic {
    background: #f3f4f6;
    color: #4b5563;
    border: 1px solid #d1d5db;
}

.form-card-meta {
    font-size: 12px;
    color: #656d76;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #d1d9e0;
}

/* Form Editor View */
.form-editor-view {
    animation: fadeIn 0.3s ease;
}

.forms-grid-view {
    animation: fadeIn 0.3s ease;
}

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

/* Responsive for admin forms */
@media (max-width: 768px) {
    .form-card-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .form-action-btn {
        width: 100%;
    }
}

/* Match button sizes in admin header */
.forms-grid-view .submit-btn,
.form-editor-view .back-btn,
#addFieldBtn,
#saveFormBtn {
    padding: 8px 16px;
    font-size: 14px;
    min-width: 160px;
    max-width: 160px;
    width: auto !important;
    display: inline-block !important;
    margin: 0 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Certificate fields in single row */
.cert-fields-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.cert-fields-row .setting-item {
    margin-bottom: 0;
}

/* Responsive certificate fields */
@media (max-width: 1400px) {
    .cert-fields-row {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .cert-fields-row {
        grid-template-columns: 1fr;
    }
}

/* Fix form field item alignment - center text vertically */
#fieldsList .question-item {
    display: flex !important;
    align-items: center !important;
    padding: 16px !important;
    background: #f6f8fa !important;
    border: 1px solid #d1d9e0 !important;
    border-radius: 6px !important;
    margin-bottom: 12px !important;
}

#fieldsList .question-header {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    gap: 12px !important;
    margin-bottom: 0 !important;
}

#fieldsList .question-content {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
}

#fieldsList .question-title {
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #1f2328 !important;
    margin-bottom: 4px !important;
    line-height: 1.4 !important;
}

#fieldsList .question-meta {
    font-size: 12px !important;
    color: #656d76 !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    line-height: 1.4 !important;
}

#fieldsList .question-actions {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

#fieldsList .question-drag-handle {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #656d76 !important;
    font-size: 18px !important;
    cursor: grab !important;
    padding: 4px !important;
    margin: 0 !important;
}

/* Form configuration 4 fields in single row */
.form-config-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.form-config-row .setting-item {
    margin-bottom: 0;
}

/* Responsive form config fields */
@media (max-width: 1200px) {
    .form-config-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .form-config-row {
        grid-template-columns: 1fr;
    }
}

/* Save button - full width */
#saveFormBtn {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    display: block !important;
    margin: 0 !important;
}

/* Image preview in settings grid */
.settings-grid .image-preview {
    min-height: 150px;
    max-height: 150px;
    height: 150px;
    margin-bottom: 8px;
    border: 2px dashed #d1d9e0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f6f8fa;
    overflow: hidden;
}

.settings-grid .image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.settings-grid .image-preview:not(.empty) {
    border: 1px solid #d1d9e0;
    border-style: solid;
}

.settings-grid .image-preview.empty::after {
    content: 'No image uploaded';
    color: #656d76;
    font-size: 13px;
}

/* Image buttons container */
.image-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

/* Choose file button styling */
.choose-file-btn {
    flex: 1 1 50%;
    width: 50%;
    min-width: 0;
    padding: 8px 16px;
    margin: 0;
    background: #f6f8fa;
    color: #24292f;
    border: 1px solid #d1d9e0;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-sizing: border-box;
    text-align: center;
}

.choose-file-btn:hover {
    background: #e8eaed;
    border-color: #24292f;
}

/* Delete image button styling */
.delete-image-btn {
    flex: 1 1 50%;
    width: 50%;
    min-width: 0;
    padding: 8px 16px;
    margin: 0 !important;
    background: #cf222e;
    color: white;
    border: 1px solid #cf222e;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-sizing: border-box;
    text-align: center;
}

.delete-image-btn:hover {
    background: #a40e26;
    border-color: #a40e26;
}

/* Remove outer container styling for forms landing page */
#formsLandingPage #formsGridContainer {
    background: transparent;
    border: none;
    padding: 0;
    margin-top: 0;
}

/* Ensure forms grid has proper spacing */
#formsLandingPage .forms-grid {
    margin-top: 24px;
}

/* Remove outer container for form page */
#formPage .search-section {
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    padding: 20px;
    margin-bottom: 30px;
}

#formPage .feedback-form {
    background: #ffffff;
    border: 1px solid #d1d9e0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}
