.green-btn {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
}

.green-btn:hover {
    background-color: #218838;
}

/* Audit Card for Drafts */
.audit-card.draft {
    background: #f7f7f7; /* Subtle gray background for drafts */
    border: 1px solid #d1d5db; /* Softer border */
    opacity: 0.95; /* Slightly faded to indicate draft status */
}

/* Audit Metrics - Draft and Published Status */
.audit-metrics .draft-badge {
    background: #e5e7eb; /* Light gray for draft badge */
    color: #4b5563; /* Muted text color */
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
}

.audit-metrics .published-badge {
    background: #d1fae5; /* Light green for published badge */
    color: #065f46; /* Dark green text for contrast */
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Companies List */
.companies-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px;
    background: var(--card-bg, #ffffff);
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    animation: slideIn 0.3s ease-out;
}

/* Audit List */
.audits-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    animation: slideIn 0.3s ease-out;
}

/* Audit Header */
.audit-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--card-bg, #eff6ff);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease, box-shadow 0.3s ease;
    gap: 8px;
}

.audit-header:hover {
    background: var(--card-hover, #e6f0fa);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.audit-header h3 {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-grow: 1;
}

.audit-header .audit-date {
    font-size: 12px;
    color: #6b7280;
    white-space: nowrap;
}

/* Audit Delete Button */
.audit-header .btn.small {
    padding: 6px;
    font-size: 0; /* Hide text */
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.audit-header .btn.small.red-btn {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
}

.audit-header .btn.small:hover {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
}

.audit-header .btn.small.red-btn:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
}

.audit-header .btn.small i {
    font-size: 12px;
    color: #ffffff;
}

/* Company Card */
.company-card {
    background: var(--avn-bg, #ffffff);
    border-radius: 8px;
    padding: 6px;
    margin-bottom: 8px;
    border: 1px solid var(--border-color, #e2e8f0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.company-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Company Header */
.company-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--card-bg, #eff6ff);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.company-header:hover {
    background: var(--card-hover, #e6f0fa);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.company-header h3 {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-grow: 1;
}

/* Company Actions */
.company-actions {
    display: flex;
    gap: 8px;
}

.company-actions .btn.small {
    padding: 6px;
    font-size: 0; /* Hide text */
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.company-actions .btn.small.red-btn {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
}

.company-actions .btn.small:hover {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
}

.company-actions .btn.small.red-btn:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
}

.company-actions .btn.small i {
    font-size: 12px;
    color: #ffffff;
}

/* Empty State */
.companies-list .empty-state {
    padding: 16px;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    background: #f9fafb;
    border-radius: 6px;
    border: 1px solid var(--border-color, #e2e8f0);
    animation: popIn 0.4s ease-out;
}

.companies-list .empty-state .empty-icon {
    font-size: 28px;
    color: #d1d5db;
    margin-bottom: 10px;
}

.companies-list .empty-state .empty-text {
    font-size: 14px;
    font-weight: 500;
}

.add-company-for-checklists-btn {
    flex-grow: 1;
    margin: 0;
    padding: 8px;
    background: linear-gradient(135deg, #aee73c 0%, #8ec02b 100%);
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.add-company-for-checklists-btn:hover {
    background: linear-gradient(135deg, #46c02b 0%, #24a51b 100%);
    transform: scale(0.98);
}

.add-checklist-btn {
    flex-grow: 1;
    margin: 0;
    padding: 8px;
    background: linear-gradient(135deg, #aee73c 0%, #8ec02b 100%);
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.add-checklist-btn:hover {
    background: linear-gradient(135deg, #46c02b 0%, #24a51b 100%);
    transform: scale(0.98);
}

.add-question-btn {
    flex-grow: 1;
    margin: 0;
    padding: 8px;
    background: linear-gradient(135deg, #aee73c 0%, #8ec02b 100%);
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.add-question-btn:hover {
    background: linear-gradient(135deg, #46c02b 0%, #24a51b 100%);
    transform: scale(0.98);
}

.new-audit-btn {
    flex-grow: 1;
    margin: 0;
    padding: 8px;
    background: linear-gradient(135deg, #aee73c 0%, #8ec02b 100%);
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.new-audit-btn:hover {
    background: linear-gradient(135deg, #46c02b 0%, #24a51b 100%);
    transform: scale(0.98);
}

.page-header {
    position: sticky;
    top: 0;
    background: var(--card-bg, #ffffff);
    z-index: 10;
    padding: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.profession-name {
    margin-bottom: 12px;
}

.profession-card {
    animation: slideIn 0.3s ease-out;
}

.profession-card.collapsed .profession-companies-list {
    display: none;
    max-height: 0;
    overflow: hidden;
    padding: 0;
}

.profession-companies-list {
    display: block;
    transition: all 0.3s ease;
}

.profession-companies-list.collapsed {
    display: none;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 8px;
    padding: 8px;
    background: var(--card-bg, #ffffff);
    border-radius: 6px;
    margin-bottom: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.tab-btn {
    flex: 1;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-light, #6b7280);
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn.active {
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
}

.tab-btn:hover {
    background: var(--card-hover, #e6f0fa);
    color: #1f2937;
}

.tab-btn.active:hover {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: slideIn 0.3s ease-out;
}

/* Hide Scrollbar */
.audits-list::-webkit-scrollbar,
.tab-content::-webkit-scrollbar {
    display: none;
}

.audits-list,
.tab-content {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* Checklist Card */
.checklist-card {
    background: var(--avn-bg, #ffffff);
    border-radius: 8px;
    padding: 6px;
    margin-bottom: 8px;
    border: 1px solid var(--border-color, #e2e8f0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: slideIn 0.3s ease-out;
}

.checklist-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.checklist-audits-list {
    display: block;
    transition: all 0.3s ease;
    padding-top: 8px; /* Add top padding to create space between checklist header and first audit card */
}

.checklist-card.collapsed .checklist-audits-list {
    display: none;
    max-height: 0;
    overflow: hidden;
    padding: 0;
}

.checklist-audits-list {
    display: block;
    transition: all 0.3s ease;
}

.checklist-audits-list.collapsed {
    display: none;
}

/* Checklist Header */
.checklist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: var(--card-bg, #eff6ff);
    border-radius: 6px;
    cursor: pointer;
}

.checklist-header h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Checklist Details */
.checklist-details {
    padding: 12px 14px;
    font-size: 13px;
    color: #374151;
    background: #f9fafb;
    border-radius: 6px;
    margin-top: 8px;
}

.checklist-details p {
    margin: 0 0 6px 0;
}

.checklist-details strong {
    color: var(--text-light, #6b7280);
}

/* Question Card */
.question-card {
    background: var(--avn-bg, #ffffff);
    border-radius: 8px;
    padding: 6px;
    margin-bottom: 8px;
    border: 1px solid var(--border-color, #e2e8f0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.question-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Question Header */
.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: var(--card-bg, #eff6ff);
    border-radius: 6px;
    cursor: pointer;
}

.question-header h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.coefficient-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    color: #ffffff;
    background: var(--primary-color, #2563eb);
    white-space: nowrap;
    transition: transform 0.2s ease;
}

.coefficient-badge:hover {
    transform: scale(1.05);
}

/* Page Header */
.page-header {
    display: flex;
    flex-direction: column;
    gap: 12px; /* Increased gap for better spacing between button and input */
    padding: 12px; /* Consistent padding */
    background: #f0f4ff;
    border-radius: 8px; /* Smooth corners */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04); /* Subtle shadow */
    margin: 12px 0; /* Balanced margins */
}

/* Search Input */
.page-header #company-search {
    width: 100%; /* Full width of the page-header */
    padding: 12px 16px; /* Comfortable padding */
    border: 1px solid var(--border-color, #d1d5db); /* Softer gray border */
    border-radius: 10px; /* Smooth, modern rounded corners */
    font-size: 15px; /* Readable font size */
    font-weight: 400; /* Lighter weight for elegance */
    color: #111827; /* Dark text for contrast */
    background: #f8fafc; /* Subtle off-white background */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03); /* Very subtle shadow */
    transition: all 0.3s ease; /* Smooth transitions for border, shadow, and transform */
}

.page-header #company-search:focus {
    outline: none;
    border-color: #3b82f6; /* Bright blue focus border */
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); /* Subtle focus ring */
    transform: translateY(-1px); /* Slight lift on focus */
}

.page-header #company-search::placeholder {
    color: #9ca3af; /* Softer placeholder color */
    font-weight: 400;
}

/* Search Input */
.page-header #checklist-search {
    width: 100%; /* Full width of the page-header */
    padding: 12px 16px; /* Comfortable padding */
    border: 1px solid var(--border-color, #d1d5db); /* Softer gray border */
    border-radius: 10px; /* Smooth, modern rounded corners */
    font-size: 15px; /* Readable font size */
    font-weight: 400; /* Lighter weight for elegance */
    color: #111827; /* Dark text for contrast */
    background: #f8fafc; /* Subtle off-white background */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03); /* Very subtle shadow */
    transition: all 0.3s ease; /* Smooth transitions for border, shadow, and transform */
}

.page-header #checklist-search:focus {
    outline: none;
    border-color: #3b82f6; /* Bright blue focus border */
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); /* Subtle focus ring */
    transform: translateY(-1px); /* Slight lift on focus */
}

.page-header #checklist-search::placeholder {
    color: #9ca3af; /* Softer placeholder color */
    font-weight: 400;
}

/* Search Input */
.page-header #question-search {
    width: 100%; /* Full width of the page-header */
    padding: 12px 16px; /* Comfortable padding */
    border: 1px solid var(--border-color, #d1d5db); /* Softer gray border */
    border-radius: 10px; /* Smooth, modern rounded corners */
    font-size: 15px; /* Readable font size */
    font-weight: 400; /* Lighter weight for elegance */
    color: #111827; /* Dark text for contrast */
    background: #f8fafc; /* Subtle off-white background */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03); /* Very subtle shadow */
    transition: all 0.3s ease; /* Smooth transitions for border, shadow, and transform */
}

.page-header #question-search:focus {
    outline: none;
    border-color: #3b82f6; /* Bright blue focus border */
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); /* Subtle focus ring */
    transform: translateY(-1px); /* Slight lift on focus */
}

.page-header #question-search::placeholder {
    color: #9ca3af; /* Softer placeholder color */
    font-weight: 400;
}

/* Add Company Button */
.page-header .add-company-for-checklists-btn {
    padding: 10px 16px; /* Larger button for balance */
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%); /* Modern green gradient */
    border-radius: 6px; /* Smoother corners */
    font-size: 14px;
    font-weight: 500; /* Lighter weight */
    color: #ffffff;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.page-header .add-company-for-checklists-btn:hover {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%); /* Darker hover gradient */
    transform: scale(1.02); /* Subtle scale on hover */
}

/* Add Question Button */
.page-header .add-question-btn {
    padding: 10px 16px; /* Larger button for balance */
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%); /* Modern green gradient */
    border-radius: 6px; /* Smoother corners */
    font-size: 14px;
    font-weight: 500; /* Lighter weight */
    color: #ffffff;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.page-header .add-question-btn:hover {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%); /* Darker hover gradient */
    transform: scale(1.02); /* Subtle scale on hover */
}

/* Add Checklist Button */
.page-header .add-checklist-btn {
    padding: 10px 16px; /* Larger button for balance */
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%); /* Modern green gradient */
    border-radius: 6px; /* Smoother corners */
    font-size: 14px;
    font-weight: 500; /* Lighter weight */
    color: #ffffff;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.page-header .add-checklist-btn:hover {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%); /* Darker hover gradient */
    transform: scale(1.02); /* Subtle scale on hover */
}

/* New Audit Button */
.page-header .new-audit-btn {
    padding: 10px 16px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.page-header .new-audit-btn:hover {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    transform: scale(1.02);
}

/* No Results Message for Audits */
.audits-list .no-results {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid var(--border-color, #e2e8f0);
    animation: popIn 0.4s ease-out;
}

.checklists-list .no-results {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid var(--border-color, #e2e8f0);
    animation: popIn 0.4s ease-out;
}

.questions-list .no-results {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid var(--border-color, #e2e8f0);
    animation: popIn 0.4s ease-out;
}

.audits-list .no-results-text {
    font-size: 18px;
    font-weight: 500;
    color: #4b5563;
    text-align: center;
    padding: 16px;
}

/* Profession Input Group */
.profession-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.profession-input-group .profession-input {
    flex-grow: 1;
    padding: 8px 12px;
    border: 1px solid var(--border-color, #d1d5db);
    border-radius: 6px;
    font-size: 14px;
    color: #111827;
    background: #f8fafc;
    transition: all 0.3s ease;
}

.profession-input-group .profession-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.profession-input-group .remove-profession-btn {
    padding: 6px;
    font-size: 0; /* Hide text */
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

/* Add Profession Button */
.add-profession-btn {
    padding: 10px 16px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    justify-content: center;
    margin-top: 8px;
}

.add-profession-btn:hover {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    transform: scale(1.02);
}

.profession-input-group .remove-profession-btn:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
    transform: scale(1.02);
}

.profession-input-group .remove-profession-btn i {
    font-size: 12px;
    color: #ffffff;
}

/* No Results Message */
.companies-list .no-results {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid var(--border-color, #e2e8f0);
    animation: popIn 0.4s ease-out;
}

.companies-list .no-results-text {
    font-size: 18px;
    font-weight: 500;
    color: #4b5563;
    text-align: center;
    padding: 16px;
}

.checklists-list .no-results-text {
    font-size: 18px;
    font-weight: 500;
    color: #4b5563;
    text-align: center;
    padding: 16px;
}

.questions-list .no-results-text {
    font-size: 18px;
    font-weight: 500;
    color: #4b5563;
    text-align: center;
    padding: 16px;
}

/* Select Input */
.select-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color, #d1d5db);
    border-radius: 10px;
    font-size: 15px;
    font-weight: 400;
    color: #111827;
    background: #f8fafc;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
    appearance: none;
    cursor: pointer;
}

.select-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

/* Question Item */
.question-item {
    position: relative;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 16px;
    background-color: #fff;
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.question-header p {
    margin: 0;
    flex: 1;
    word-break: break-word;
}

.question-item strong {
    color: #1f2937;
}


/* Answer Options */
.answer-options ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.answer-options li {
    margin-bottom: 5px;
}

.answer-options label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 13px;
    color: #4b5563;
    padding: 6px 10px;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.answer-options label:hover {
    background: #eff6ff;
}

.answer-options input[type="radio"] {
    margin-right: 8px;
    accent-color: #2563eb;
}

/* Search Input for Audits */
.page-header #audit-search {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color, #d1d5db);
    border-radius: 10px;
    font-size: 15px;
    font-weight: 400;
    color: #111827;
    background: #f8fafc;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
}

.page-header #audit-search:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

.page-header #audit-search::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

/* In checklist.css */

/* View Audit Button */
.audit-header .btn.small.blue-btn {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
}

.audit-header .btn.small.blue-btn:hover {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
}

/* ========== AUDIT-METRICS — ОКОНЧАТЕЛЬНАЯ ВЕРСИЯ (точно как на ПК + умный перенос на телефоне) ========== */
.audit-metrics {
    display: grid;
    grid-template-columns: repeat(3, max-content) 1fr; /* пытаемся держать 3 слева */
    gap: 9px 12px;
    align-items: center;
    padding: 13px 15px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    font-size: 12.5px;
    line-height: 1.5;
}

.audit-metrics > span {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 11px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    min-width: 0;                     /* обязательно для ellipsis и переноса */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Итого, Статус, Черновик/Опубликован — пытаемся держать в первой строке */
.audit-metrics > span:nth-child(1),
.audit-metrics > span:nth-child(2),
.audit-metrics > span:nth-child(3) {
    grid-row: 1;
}

/* Дата создания — всегда вторая строка, на всю ширину */
.audit-metrics > span:nth-child(4) {
    grid-row: 2;
    grid-column: 1 / -1;
    white-space: normal;
    word-break: break-word;
}

/* Создатель — всегда третья строка, на всю ширину */
.audit-metrics > span:nth-child(5) {
    grid-row: 3;
    grid-column: 1 / -1;
    white-space: normal;
    word-break: break-word;
}


/* ========== УМНЫЙ ПЕРЕНОС НА ТЕЛЕФОНЕ ========== */
/* 1. Если третий не влез — только он уходит вниз и растягивается */
@media (max-width: 520px) {
    .audit-metrics {
        grid-template-columns: max-content max-content 1fr; /* третий жрёт остаток */
    }
    .audit-metrics > span:nth-child(3) {
        grid-column: 1 / -1;
        grid-row: 2;
        white-space: normal;
    }
    .audit-metrics > span:nth-child(4) { grid-row: 3; }
    .audit-metrics > span:nth-child(5) { grid-row: 4; }
}

/* 2. Если и второй не влез — он тоже уходит вниз */
@media (max-width: 380px) {
    .audit-metrics {
        grid-template-columns: max-content 1fr;
    }
    .audit-metrics > span:nth-child(2) {
        grid-column: 1 / -1;
        grid-row: 2;
        white-space: normal;
    }
    .audit-metrics > span:nth-child(3) { grid-row: 3; }
    .audit-metrics > span:nth-child(4) { grid-row: 4; }
    .audit-metrics > span:nth-child(5) { grid-row: 5; }
}

/* 3. Если и Итого не влез — всё по одному */
@media (max-width: 280px) {
    .audit-metrics {
        grid-template-columns: 1fr;
    }
    .audit-metrics > span {
        grid-column: 1 / -1;
    }
    .audit-metrics > span:nth-child(1) { grid-row: 1; }
    .audit-metrics > span:nth-child(2) { grid-row: 2; }
    .audit-metrics > span:nth-child(3) { grid-row: 3; }
    .audit-metrics > span:nth-child(4) { grid-row: 4; }
    .audit-metrics > span:nth-child(5) { grid-row: 5; }
}
/* Audit Details Styles */
.audit-details {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.audit-details p {
    margin: 8px 0;
    font-size: 15px;
    color: #374151;
}

.audit-details strong {
    color: #1f2937;
}

.audit-questions {
    background: #ffffff;
    padding: 20px;
    margin-bottom: 8px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.audit-questions .avn-header {
    margin-bottom: 15px;
    font-size: 16px;
    color: #1f2937;
}

.question-item.editable {
    position: relative;
    margin-bottom: 15px;
    padding: 15px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f9fafb;
    transition: box-shadow 0.3s ease;
}

.question-item.editable:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.edit-question {
    cursor: pointer;
    color: #3b82f6;
    font-size: 16px;
    margin-left: 8px;
    padding: 4px;
    transition: color 0.2s;
}

.edit-question:hover {
    color: #1e40af;
}

.question-coefficient {
    text-align: right;
    font-size: 12px;
    color: #6b7280;
    margin-top: 8px;
}

.question-item p {
    margin: 8px 0;
}

.edit-form {
    margin-top: 12px;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    background-color: #f9fafb;
}

.edit-form ul {
    list-style: none;
    padding: 0;
    margin: 0 0 12px 0;
}

.edit-form li {
    margin-bottom: 8px;
}

.edit-form label {
    display: flex;
    align-items: center;
    font-size: 14px;
}

.edit-form input[type="radio"] {
    margin-right: 8px;
}

.save-question-btn, .cancel-edit-btn, .delete-audit-btn {
    padding: 6px 12px;
    margin-right: 8px;
    border-radius: 4px;
    font-size: 14px;
}

.save-question-btn:hover {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
}

.save-question-btn {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.cancel-edit-btn {
    background: #e2e8f0;
    color: #4b5563;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 8px;
    transition: background 0.3s ease;
}

.cancel-edit-btn:hover {
    background: #d1d5db;
}

/* Drag-and-Drop Styles for Checklist Questions */
.question-option.draggable {
    cursor: grab;
    user-select: none;
    position: relative;
    padding: 12px;
    margin-bottom: 8px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    touch-action: manipulation; /* Prevent default touch scrolling during drag */
}

.question-option.draggable:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.question-option.dragging {
    opacity: 0.7;
    transform: scale(0.98);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1002;
}

.question-option.draggable-placeholder {
    background: #f1f5f9;
    border: 2px dashed #93c5fd;
    opacity: 0.5;
    height: 60px; /* Fixed height for placeholder */
    margin-bottom: 8px;
    border-radius: 6px;
}

.questions-list-container {
    position: relative;
    padding: 12px;
    border: 2px solid transparent;
    transition: border-color 0.2s ease;
}

.questions-list-container.drag-over {
    border-color: #2563eb;
    background: #eff6ff;
}

/* Questions List Container */
.questions-list-container {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--border-color, #d1d5db);
    border-radius: 6px;
    padding: 12px;
    background: #f8fafc;
    margin-bottom: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

/* Question Option */
.question-option {
    display: flex;
    align-items: flex-start;
    margin-bottom: 8px;
    padding: 8px;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.question-option:hover {
    background: #eff6ff;
}

.question-option input[type="checkbox"] {
    margin: 3px 10px 0 0;
    accent-color: #2563eb;
}

.question-option label {
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    flex-grow: 1;
}

.question-option .question-details {
    margin-top: 4px;
    font-size: 13px;
    color: #4b5563;
}

.question-option .question-details p {
    margin: 4px 0;
}

.question-option .audit-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.question-option .audit-metrics span {
    background: #ffffff;
    padding: 4px 8px;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Questions Controls */
.questions-controls {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.questions-controls .btn.small {
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
}

/* Selected Questions List */
#selected-questions-list .questions-list {
    padding: 0;
    margin: 0;
    list-style: none;
}

#selected-questions-list .questions-list .audit-card {
    background: var(--avn-bg, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 6px;
    padding: 6px;
    margin: 0 0 8px 0; /* Remove left/right margins, keep bottom margin */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#selected-questions-list .questions-list .audit-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

#selected-questions-list .questions-list .audit-header {
    background: var(--card-bg, #eff6ff);
    border-radius: 4px;
    padding: 8px 12px;
    margin: 0; /* Ensure no extra margins */
}

#selected-questions-list .questions-list .audit-header h3 {
    font-size: 14px;
    margin: 0;
}

#selected-questions-list .questions-list .audit-header h3 {
    font-size: 14px;
    margin: 0;
}

#selected-questions-list .questions-list .question-coefficient {
    padding: 8px 12px;
    font-size: 12px;
    color: #6b7280;
    text-align: right;
    margin: 0;
}

/* Profession Input Group */
.profession-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.profession-input-group .remove-profession-btn {
    height: 24px;
    width: 24px;
}

.audit-details p,
.audit-details strong,
.free-form-answer textarea,
.question-item p {
    word-wrap: break-word; /* Prevent text overflow */
    overflow-wrap: break-word;
    overflow-x: hidden; /* Ensure no horizontal overflow */
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@media (min-width: 768px) {
    .audit-questions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr)); /* Flexible columns */
        gap: 20px; /* Space between columns */
        overflow-x: hidden; /* Prevent horizontal scrollbar */
    }

    .question-item {
        margin-bottom: 0; /* Remove bottom margin to fit grid layout */
        word-wrap: break-word; /* Ensure text wraps */
        overflow-wrap: break-word;
        overflow-x: hidden; /* Prevent horizontal overflow */
    }

    .question-item p,
    .free-form-answer textarea {
        word-wrap: break-word; /* Ensure long text wraps */
        overflow-wrap: break-word;
        overflow-x: hidden; /* Prevent horizontal overflow */
    }

    .modal-content {
        max-width: 800px; /* Increased width for better visibility on PC */
        padding: 30px; /* Slightly more padding for comfort */
    }
}

/* Убираем странные точки и делаем нормальный handle */
.audit-card {
    background: var(--avn-bg, #ffffff);
    border-radius: 8px;
    padding: 6px;
    margin-bottom: 8px;
    border: 1px solid var(--border-color, #e2e8f0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.audit-card:active {
    cursor: grabbing;
}

.audit-card.dragging {
    opacity: 0.9;
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

/* Нормальный drag handle */
.drag-handle {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 20px;
    cursor: move;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.drag-handle::before,
.drag-handle::after {
    content: '';
    width: 12px;
    height: 2px;
    background: #9e9e9e;
    border-radius: 1px;
}

.audit-card:hover .drag-handle {
    opacity: 0.8;
}

.audit-card.dragging .drag-handle {
    opacity: 1;
}

/* Остальные стили остаются без изменений */
.questions-list {
    min-height: 100px;
    padding: 10px;
    border: 2px dashed #e0e0e0;
    border-radius: 8px;
    background-color: #fafafa;
    transition: all 0.2s ease;
}

.questions-list.drag-over {
    background-color: rgba(33, 150, 243, 0.05);
    border-color: #2196f3;
}

.questions-list.drop-not-allowed {
    background-color: rgba(244, 67, 54, 0.05);
    border-color: #f44336;
}

.drop-indicator {
    height: 4px;
    background: #2196f3;
    margin: 8px 0;
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.drop-indicator.visible {
    opacity: 1;
}

.drop-indicator.drop-not-allowed {
    background: #f44336;
}

.drop-placeholder {
    background: rgba(33, 150, 243, 0.1);
    border: 2px dashed #2196f3;
    border-radius: 8px;
    padding: 15px;
    margin: 8px 0;
    text-align: center;
    color: #2196f3;
    font-weight: 500;
}