:root {
    --sidebar-bg: #2f3a4f;
    --sidebar-text: #a6b0cf;
    --sidebar-active: #3b4a63;
    --primary-color: #556ee6;
    --success-color: #34c38f;
    --danger-color: #f46a6a;
    --warning-color: #f1b44c;
    --info-color: #50a5f1;
    --light-bg: #f8f9fa;
    --border-color: #eff2f7;
    --text-muted: #74788d;
    --header-bg: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-bg);
}

.form-builder-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar Styles */
.sidebar {
    width: 250px;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    position: relative;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
    color: white;
}

.logo i {
    font-size: 24px;
    color: var(--primary-color);
}

.phone-number {
    font-size: 14px;
    color: var(--sidebar-text);
}

/* Sidebar Menu */
.menu-section {
    padding: 20px 0;
}

.menu-title {
    font-size: 11px;
    font-weight: 600;
    color: #74788d;
    padding: 0 20px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #a6b0cf;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.menu-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: white;
}

.menu-item.active {
    background-color: rgba(85, 110, 230, 0.15);
    color: white;
    border-left: 3px solid var(--primary-color);
}

.menu-item i:first-child {
    font-size: 18px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
    margin-right: 12px; /* Space between icon and text */
}

.menu-item span {
    flex: 1; /* Take up remaining space, pushing chevron to right */
    font-size: 14px;
    font-weight: 500;
}

.expand-icon {
    font-size: 12px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 8px; /* Small space before chevron */
}

.menu-item.expanded .expand-icon {
    transform: rotate(180deg); /* Rotate when expanded */
}

/* Submenu Styles */
.submenu-items {
 max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: rgba(0, 0, 0, 0.2);
}

.submenu-items.show {
    max-height: 500px;
}

.submenu-items .submenu-items.show {
    max-height: 300px;
}

.submenu-item {
    display: flex;
    align-items: center;
    padding: 10px 20px 10px 52px;
 color: #a6b0cf;
    text-decoration: none;
  cursor: pointer;
    transition: all 0.3s ease;
    font-size: 13px;
}

.submenu-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: white;
}

.submenu-item.active {
    color: var(--primary-color);
    font-weight: 500;
}

.submenu-item i {
    font-size: 14px;
    margin-right: 12px; /* Space between icon and text */
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

/* Nested Submenu Styles */
.menu-item.submenu-parent {
    padding-left: 52px;
    font-size: 13px;
}

.submenu-items .submenu-items {
    background-color: rgba(0, 0, 0, 0.3);
}

.submenu-items .submenu-items .submenu-item {
    padding-left: 84px;
}

.submenu-items .submenu-items .menu-item.submenu-parent {
    padding-left: 52px;
}

/* Sidebar Footer */
.sidebar-footer {
    margin-top: auto;
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.logout-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    background-color: #dc3545;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.logout-btn:hover {
    background-color: #c82333;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.5);
    transform: translateY(-2px);
    color: #ffffff;
}

.logout-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(220, 53, 69, 0.4);
    background-color: #bd2130;
}

.logout-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.3);
}

.logout-btn i {
    font-size: 16px;
    color: #ffffff;
}

.logout-btn span {
    font-size: 15px;
    color: #ffffff;
    font-weight: 600;
}

/* Menu Toggle Button (Burger) */
.menu-toggle {
    display: none;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    width: 40px;
    height: 40px;
    min-width: 40px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    flex-shrink: 0;
    order: -1;
}

.menu-toggle:hover {
    background-color: #4458d4;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: scale(1.05);
}

.menu-toggle:active {
    transform: scale(0.95);
}

.menu-toggle i {
    font-size: 20px;
}

/* Overlay for mobile sidebar */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.overlay.show {
    display: block;
    opacity: 1;
}

/* Main Content */
.main-content {
    flex: 1;
    background-color: #f8f9fa;
    overflow-y: auto;
    width: 100%;
    display: flex;
    flex-direction: column;
}

/* Content Area */
.content-area {
    padding: 30px;
    width: 100%;
    max-width: 100%;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    gap: 15px;
    position: relative; /* Add this for dropdown positioning */
}

.page-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0;
    flex: 1;
}

.btn-add-new {
    background-color: var(--success-color);
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-add-new:hover {
    background-color: #2ca87f;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(52, 195, 143, 0.3);
}

.btn-add-new i {
    font-size: 12px;
}

/* Filter Section */
.filter-section {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    width: 100%;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: end;
    width: 100%;
}

.filter-row .filter-item {
    flex: 1;
    min-width: 150px;
}

.filter-row .filter-search-btn {
    flex: 0 0 auto;
    margin-left: auto;
}

.filter-item {
    display: flex;
    flex-direction: column;
}

/* Form Controls */
.form-control {
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
    width: 100%;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(85, 110, 230, 0.1);
}

.form-control::placeholder {
    color: #98a6ad;
}

/* Description Textarea - Resizable and Enhanced Format */
.description-textarea {
    resize: both;
    min-height: 100px;
    min-width: 100%;
    max-height: 400px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.description-textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(85, 110, 230, 0.1);
    outline: none;
}

.description-hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-muted);
    font-style: italic;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23495057' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 35px;
}

/* Buttons */
.btn {
    padding: 10px 25px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn-search {
    background-color: #1e3a5f;
    color: white;
    padding: 10px 30px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-search:hover {
    background-color: #152a45;
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover {
    background-color: #2ca87f;
}

.btn-secondary {
    background-color: #74788d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a5e6f;
}

/* Table Styles */
.table-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    overflow-x: auto;
    overflow-y: visible;
    width: 100%;
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.data-table thead {
    background-color: #f8f9fa;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    padding: 15px 20px;
    text-align: left;
    font-weight: 600;
    color: #333;
    font-size: 13px;
}

.data-table td {
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    color: #495057;
    font-size: 14px;
}

.data-table tbody tr {
    transition: background-color 0.2s ease;
}

.data-table tbody tr:hover {
    background-color: #f8f9fa;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* Actions Column */
.actions-column {
    width: 100px;
    text-align: right;
}

.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 4px;
    transition: all 0.3s ease;
    color: #74788d;
    margin-left: 5px;
}

.action-btn i {
    font-size: 14px;
}

.action-btn.delete {
    color: var(--danger-color);
}

.action-btn.delete:hover {
    background-color: rgba(244, 106, 106, 0.1);
}

.action-btn.edit {
    color: var(--primary-color);
}

.action-btn.edit:hover {
    background-color: rgba(85, 110, 230, 0.1);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.modal-content.modal-form {
    max-width: 700px;
}

.modal-content.modal-large {
    max-width: 1400px;
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    color: #495057;
}

.close-btn {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #74788d;
    line-height: 1;
}

.close-btn:hover {
    color: #495057;
}

.modal-body {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 15px 25px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Form Sections */
.form-section {
    margin-bottom: 22px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 7px;
    padding-bottom: 10px;
    /*    border-bottom: 2px solid var(--border-color);*/
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600 !important;
    color: #495057 !important;
    font-size: 14px;
    margin-bottom: 8px;
}

/* Ensure all form labels are bold and consistent - override any other rules */
.modal .form-group label,
.form-section .form-group label {
    font-weight: 600 !important;
    color: #495057 !important;
}

/* Style for small text inside labels - keep it lighter for contrast */
.form-group label small {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 12px;
    margin-left: 4px;
}

/* Specific styling for form fill page */
.form-fill-card .form-group {
    margin-bottom: 25px;
}

/* Service Search Container */
.service-search-container {
    width: 100%;
    margin-bottom: 15px;
    margin-top: 10px;
    padding: 12px;
    background-color: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.service-search-container > div {
    display: flex !important;
    gap: 10px;
    align-items: center;
    width: 100%;
}

.service-search-container .form-control {
    width: 100%;
    flex: 1;
    display: block !important;
    visibility: visible !important;
}

.service-search-container .btn {
    min-width: auto;
    padding: 10px 15px;
    display: inline-flex !important;
    visibility: visible !important;
    white-space: nowrap;
}

.service-search-container .btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.service-search-container .btn-primary:hover {
    background-color: #6b7fe8;
}

/* Services Checkboxes */
.services-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-item label {
    margin: 0;
    font-weight: 400;
    cursor: pointer;
}

/* Properties Panel */
.properties-panel {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    max-height: 500px;
    overflow-y: auto;
    display: block !important;
}

.properties-panel h3 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #495057;
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

.properties-panel.empty {
    display: flex !important;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-muted);
    min-height: 200px;
}

.properties-panel.empty i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.3;
}

.properties-panel.empty p {
    font-size: 14px;
}

#propertiesContent .form-group {
    margin-bottom: 20px;
}

#propertiesContent label {
    display: block;
    font-weight: 600;
    color: #495057;
    font-size: 13px;
    margin-bottom: 8px;
}

.options-editor {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option-item {
    display: flex;
    gap: 8px;
    align-items: center;
}

.option-item input.form-control {
    flex: 1;
}

.btn-icon {
    padding: 6px 10px;
    min-width: auto;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

/* Form Fill Wrapper */
.form-fill-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.form-fill-card {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.form-title {
    margin-bottom: 10px;
    color: #495057;
    font-size: 28px;
    font-weight: 600;
}

.form-description {
    color: var(--text-muted);
    margin-bottom: 30px;
    font-size: 15px;
    line-height: 1.6;
}

.field-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 10px;
    display: block;
    font-size: 15px;
}

.required-mark {
    color: var(--danger-color);
    margin-left: 4px;
}

.form-actions {
    margin-top: 30px;
    padding-top: 20px;
/*    border-top: 1px solid var(--border-color);*/
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Field Preview in Builder */
.field-preview {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.field-preview:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(85, 110, 230, 0.15);
}

.field-preview.selected {
    border-color: var(--primary-color);
    background-color: rgba(85, 110, 230, 0.05);
}

.field-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.field-preview:hover .field-actions {
    opacity: 1;
}

.field-action-btn {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.field-action-btn:hover {
    background-color: var(--light-bg);
}

.field-action-btn.delete:hover {
    color: var(--danger-color);
    border-color: var(--danger-color);
}

/* Form Builder Workspace */
.builder-workspace {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.builder-layout {
    display: grid;
    grid-template-columns: 280px 1fr 320px;
    gap: 25px;
    min-height: 500px;
}

/* Field Toolbox */
.field-toolbox {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    height: fit-content;
}

.field-toolbox h3 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #495057;
    font-weight: 600;
}

.toolbox-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background-color: var(--light-bg);
    border: 2px dashed var(--border-color);
    border-radius: 6px;
    margin-bottom: 10px;
    cursor: grab;
    transition: all 0.3s ease;
    user-select: none;
}

.toolbox-item:active {
    cursor: grabbing;
}

.toolbox-item:hover {
    border-color: var(--primary-color);
    background-color: rgba(85, 110, 230, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(85, 110, 230, 0.15);
}

/* Drop Zone */
.drop-zone {
    background-color: #fafbfe;
    border: 2px dashed #d0d5dd;
    border-radius: 8px;
    padding: 30px;
    min-height: 500px;
    overflow-y: auto;
    transition: all 0.3s ease;
    position: relative;
}

.drop-zone.drag-over {
    border-color: var(--primary-color);
    background-color: rgba(85, 110, 230, 0.05);
    border-style: solid;
}

.drop-zone.has-fields {
    background-color: white;
}

.drop-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 400px;
    color: var(--text-muted);
    text-align: center;
    padding: 40px 20px;
}

.drop-placeholder i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
    color: var(--primary-color);
}

.drop-placeholder p {
    font-size: 16px;
    color: var(--text-muted);
    max-width: 300px;
    line-height: 1.5;
}

/* Properties Panel */
.properties-panel {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    max-height: 500px;
    overflow-y: auto;
    display: block !important;
}

.properties-panel h3 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #495057;
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

.properties-panel.empty {
    display: flex !important;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-muted);
    min-height: 200px;
}

.properties-panel.empty i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.3;
}

.properties-panel.empty p {
    font-size: 14px;
}

/* Form Field Item in Drop Zone */
.form-field-item {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-field-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(85, 110, 230, 0.1);
}

.form-field-item.selected {
    border-color: var(--primary-color);
    background-color: rgba(85, 110, 230, 0.03);
}

.field-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.drag-handle {
    cursor: move;
    color: var(--text-muted);
    padding: 5px;
}

.drag-handle:hover {
    color: var(--primary-color);
}

.field-type-badge {
    background-color: var(--light-bg);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    color: var(--primary-color);
}

.field-actions {
    display: flex;
    gap: 5px;
}

.field-label-display {
    font-weight: 600;
    color: #495057;
    margin-bottom: 12px;
    font-size: 15px;
}

/* Yes/No/Comment Table Layout */
.yesno-table-layout {
    margin-bottom: 15px;
}

.yesno-table-header {
    display: grid;
    grid-template-columns: 2fr 80px 80px 2fr;
    gap: 15px;
 padding: 10px 15px;
    background-color: #f8f9fa;
    border-radius: 4px 4px 0 0;
    font-weight: 600;
    font-size: 13px;
    color: #495057;
    border: 1px solid var(--border-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.yesno-table-row {
    display: grid;
 grid-template-columns: 2fr 80px 80px 2fr;
    gap: 15px;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-top: none;
 align-items: center;
    background-color: white;
    transition: background-color 0.2s ease;
}

.yesno-table-row:hover {
    background-color: #fafbfe;
}

.yesno-table-row:last-child {
    border-radius: 0 0 4px 4px;
}

.yesno-question {
  font-size: 14px;
    color: #495057;
    font-weight: 500;
}

.yesno-checkbox {
    display: flex;
    justify-content: center;
}

.yesno-checkbox input[type="checkbox"] {
    width: 20px;
 height: 20px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.yesno-comment {
    width: 100%;
}

.yesno-comment input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 13px;
  transition: border-color 0.3s ease;
}

.yesno-comment input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(85, 110, 230, 0.1);
}

.yesno-comment input::placeholder {
    color: #98a6ad;
}

/* Multiple Select Grid Layout */
.multiple-select-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.multiple-select-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: white;
    transition: all 0.2s ease;
    cursor: pointer;
}

.multiple-select-item:hover {
    background-color: #fafbfe;
    border-color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(85, 110, 230, 0.1);
}

.multiple-select-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.multiple-select-item label {
    margin: 0;
    font-size: 14px;
    color: #495057;
    cursor: pointer;
    flex: 1;
    font-weight: 500;
}

/* Section Headers */
.section-header {
    font-size: 14px;
    font-weight: 600;
  color: #495057;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border-color);
}

/* Sortable Ghost */
.sortable-ghost {
    opacity: 0.4;
    background-color: rgba(85, 110, 230, 0.1);
}

/* Drag over state */
.drop-zone.drag-over {
    border-color: var(--primary-color);
    background-color: rgba(85, 110, 230, 0.05);
  border-style: solid;
}

@media (max-width: 1400px) {
    .content-area {
        padding: 25px;
    }
}

@media (max-width: 1200px) {
    .filter-row {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .filter-row .filter-item:last-child {
        grid-column: 1 / -1;
    }

 .builder-layout {
        grid-template-columns: 250px 1fr 280px;
        gap: 20px;
    }
    
    .multiple-select-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .filter-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .filter-row .filter-item:last-child {
        grid-column: 1 / -1;
    }
    
    .data-table {
        min-width: 700px;
    }
}

@media (max-width: 968px) {
    .builder-layout {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .field-toolbox,
    .properties-panel {
        max-height: none;
    }
    
    .drop-zone {
        min-height: 300px;
    }
    
    .yesno-table-header,
    .yesno-table-row {
        grid-template-columns: 1.5fr 60px 60px 1.5fr;
        gap: 10px;
        padding: 10px;
        font-size: 12px;
    }
    
    .multiple-select-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -250px;
        z-index: 999;
        height: 100vh;
        transition: left 0.3s ease;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }

    .sidebar.show {
        left: 0;
    }
    
    .menu-toggle {
        display: flex !important;
    }

    .content-area {
        padding: 15px;
    }

    .page-header {
        flex-direction: row;
        align-items: center;
        gap: 12px;
        position: relative;
        flex-wrap: nowrap;
        padding-left: 0;
    }
    
    .page-header .menu-toggle {
        display: flex !important;
        order: -1;
        flex-shrink: 0;
        margin-right: 0;
    }
    
    .page-title {
        font-size: 20px;
        flex: 1;
        min-width: 0;
    }
    
    .btn-add-new {
        width: auto;
        padding: 8px 14px;
        font-size: 12px;
        flex-shrink: 0;
    }

    .filter-section {
        padding: 15px;
    }

    .filter-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .filter-row .filter-item:last-child {
        grid-column: 1;
    }
    
    .btn-search {
        width: 100%;
        justify-content: center;
    }
    
    .data-table {
        min-width: 600px;
        font-size: 13px;
    }
    
    .data-table th,
    .data-table td {
        padding: 12px 15px;
    }
    
    .table-container {
        border-radius: 6px;
    }
}

@media (max-width: 480px) {
    .content-area {
        padding: 12px;
    }
    
    .page-title {
        font-size: 18px;
    }
    
    .filter-section {
        padding: 12px;
    }
    
    .data-table {
        min-width: 550px;
        font-size: 12px;
    }
    
    .data-table th,
    .data-table td {
        padding: 10px 12px;
    }
    
    .action-btn {
        padding: 4px 8px;
    }
}

/* Searchable Dropdown Styles */
.searchable-dropdown {
    position: relative;
    width: 100%;
}

.searchable-dropdown .searchable-input {
    cursor: pointer;
    background-color: #fff;
    padding-right: 30px;
}

.searchable-dropdown .dropdown-arrow {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #74788d;
    cursor: pointer;
    pointer-events: none;
    transition: transform 0.2s ease;
}

.searchable-dropdown.open .dropdown-arrow {
    transform: translateY(-50%) rotate(180deg);
}

.dropdown-menu-custom {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 300px;
    overflow: hidden;
    margin-top: 4px;
}

/* Service dropdown - wider to match form popup style */
.service-dropdown-menu {
    min-width: 400px;
    max-height: 350px;
    right: auto;
}

.searchable-dropdown.open .dropdown-menu-custom {
    display: block;
}

.dropdown-search {
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
    background: #f8f9fa;
}

.dropdown-search input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
}

.dropdown-search input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(85, 110, 230, 0.1);
}

.dropdown-search .btn-sm {
    padding: 8px 12px;
    font-size: 13px;
}

.dropdown-options {
    max-height: 220px;
    overflow-y: auto;
}

/* Services list - matching form popup checkbox style */
.dropdown-options.services-list {
    max-height: 260px;
    padding: 10px;
}

.services-list .service-checkbox-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.services-list .service-checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    flex: 0 0 calc(50% - 4px);
    box-sizing: border-box;
}

.services-list .service-checkbox-item:hover {
    background: #e9ecef;
    border-color: var(--primary-color);
}

.services-list .service-checkbox-item.selected {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.services-list .service-checkbox-item input[type="radio"] {
    margin: 0;
    cursor: pointer;
}

.services-list .service-checkbox-item label {
    margin: 0;
    cursor: pointer;
    font-size: 13px;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.services-list .service-checkbox-item .service-code {
    font-size: 11px;
    color: #888;
    margin-left: 4px;
}

.services-list .service-checkbox-item.selected .service-code {
    color: rgba(255, 255, 255, 0.8);
}

.dropdown-option {
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    font-size: 14px;
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-option:last-child {
    border-bottom: none;
}

.dropdown-option:hover {
    background-color: #f0f4ff;
}

.dropdown-option.selected {
    background-color: var(--primary-color);
    color: #fff;
}

.dropdown-option.selected:hover {
    background-color: #4559c9;
}

.dropdown-empty {
    padding: 20px 15px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

.dropdown-option .service-code {
    font-size: 12px;
    color: #888;
    margin-left: 8px;
}

.dropdown-option.selected .service-code {
    color: rgba(255, 255, 255, 0.8);
}

/* Clear button for searchable dropdown */
.searchable-dropdown .clear-btn {
    position: absolute;
    right: 28px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    cursor: pointer;
    font-size: 12px;
    display: none;
    padding: 4px;
}

.searchable-dropdown .clear-btn:hover {
    color: #f46a6a;
}

.searchable-dropdown.has-value .clear-btn {
    display: block;
}

.searchable-dropdown.has-value .dropdown-arrow {
    pointer-events: none;
}

/* Filter service item width */
.filter-service-item {
    min-width: 180px;
}
