:root {
    --theme-primary: #886ab5;
    --theme-primary-rgb: 136, 106, 181;
    --theme-success: #1dc9b7;
    --theme-border: #e7ecf3;
    --theme-bg-light: #f8f9fa;
}



/* Hero Section */
.org-hero-inner {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
    padding: 1.5rem 0;
}

@media (min-width: 992px) {
    .org-hero-inner {
        flex-direction: row;
        align-items: center;
        padding: 2rem 0;
    }
}

.org-logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.org-logo-wrapper {
    position: relative;
    width: 140px;
    height: 140px;
    background: #fff;
    border: 2px solid var(--theme-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: 0 auto;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.org-logo-wrapper:hover {
    border-color: var(--theme-primary);
    box-shadow: 0 4px 12px rgba(var(--theme-primary-rgb), 0.15);
}

.org-logo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.5rem;
}

.org-logo-wrapper .overlay {
    position: absolute;
    inset: 0;
    background: rgba(var(--theme-primary-rgb), 0.9);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
}

.org-logo-wrapper:hover .overlay {
    opacity: 1;
}

.logo-delete-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 0.75rem;
    width: 100%;
}

/* Logo Section Styles */
.logo-section-wrapper {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--theme-border);
}

.form-label-logo {
    display: block;
    margin-bottom: 1rem;
    font-size: 0.9375rem;
    color: #495057;
}

.logo-section-content {
    display: flex;
    align-items: flex-start;
}

.org-logo-container-inline {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
}

.org-logo-wrapper-inline {
    position: relative;
    display: inline-block;
    background: #fff;
    border: 2px solid var(--theme-border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    /* Container sizes to its content (the image) */
    line-height: 0;
}

.org-logo-wrapper-inline:hover {
    border-color: var(--theme-primary);
    box-shadow: 0 4px 20px rgba(var(--theme-primary-rgb), 0.2);
    transform: translateY(-2px);
}

.org-logo-wrapper-inline img {
    display: block;
    width: auto !important;
    height: auto !important;
    max-width: 300px !important;
    max-height: 300px !important;
    /* Image keeps aspect ratio but displays small */
    object-fit: contain !important;
  
    margin: 0;
}

.org-logo-wrapper-inline .overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(var(--theme-primary-rgb), 0.95);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    gap: 0.5rem;
}

.org-logo-wrapper-inline:hover .overlay {
    opacity: 1;
}

.org-logo-wrapper-inline .overlay i {
    font-size: 1rem;
}

.btn-delete-logo {
    background: #fff;
    color: #ef4444;
    border: 1.5px solid #ef4444;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.1);
}

.btn-delete-logo:hover {
    background: #ef4444;
    color: #fff;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
    transform: translateY(-1px);
    border-color: #dc2626;
}

.btn-delete-logo:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
}

.btn-delete-logo i {
    font-size: 0.875rem;
}

/* Navigation Tabs */
/* Nav tabs styling - matching e-learning exactly */
#organismTabs {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    margin-bottom: 0;
}

#organismTabs .nav-item {
    margin-bottom: -1px;
}

#organismTabs .nav-link {
    border: 1px solid transparent;
    border-top-left-radius: 0.25rem;
    border-top-right-radius: 0.25rem;
    color: #495057;
    padding: 0.5rem 1rem;
    transition: all 0.15s ease-in-out;
    background: transparent;
    cursor: pointer;
}

#organismTabs .nav-link:hover {
    border-color: #e9ecef #e9ecef #dee2e6;
    color: #495057;
    background-color: transparent;
}

#organismTabs .nav-link.active {
    color: #495057;
    background-color: #fff;
    border-color: #dee2e6 #dee2e6 #fff;
    border-bottom-color: transparent;
}

/* Form Sections - No card background, content directly in layer */
.org-section {
    margin-bottom: 2rem;
    padding: 0;
}

.org-section-title {
    font-weight: 600;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--theme-border);
    color: #2c3e50;
    display: flex;
    align-items: center;
}


/* Form Inputs */
.org-section .form-group {
    margin-bottom: 1.75rem;
}

.org-section .form-group:last-child {
    margin-bottom: 0;
}

.org-section .form-group label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.75rem;
    display: block;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.org-section .form-control {
    border: 1.5px solid #dee2e6;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
    font-size: 0.9375rem;
    line-height: 1.5;
    background: #fff;
}

.org-section .form-control:hover:not(:focus) {
    border-color: #ced4da;
}

.org-section .form-control:focus {
    border-color: var(--theme-primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--theme-primary-rgb), 0.15);
    outline: 0;
    background: #fff;
}

.org-section .form-control::placeholder {
    color: #adb5bd;
}

/* Map Section */
.organism-map {
    width: 100%;
    height: 400px;
    min-height: 400px;
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    z-index: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    background: #f5f5f5;
}

.organism-map.leaflet-container {
    height: 400px !important;
    min-height: 400px !important;
    border-radius: 8px;
    font-family: inherit;
}

.map-helper-text {
    background: rgba(var(--theme-primary-rgb), 0.05);
    border: 1px solid rgba(var(--theme-primary-rgb), 0.2);
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.map-helper-text small {
    color: #6c757d;
    line-height: 1.6;
}

/* GPS Inputs */
.gps-input .form-control {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.gps-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.gps-tools .btn {
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.gps-tools .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Quill Editor */
.quill-editor-wrapper {
    min-height: 250px;
    border-radius: 6px;
    overflow: hidden;
}

.quill-editor-wrapper .ql-container {
    min-height: 200px;
    font-size: 0.9375rem;
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
}

.quill-editor-wrapper .ql-editor {
    min-height: 200px;
}

.quill-editor-wrapper .ql-toolbar {
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
    border: 1px solid #dee2e6;
    border-bottom: none;
    background: var(--theme-bg-light);
}

.quill-editor-wrapper .ql-container {
    border: 1px solid #dee2e6;
    border-top: none;
}



/* Alerts */
.alert {
    border-radius: 8px;
    border: none;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.alert-success {
    background-color: rgba(29, 201, 183, 0.1);
    color: #0d9488;
    border-left: 4px solid var(--theme-success);
}

.alert-danger {
    background-color: rgba(253, 57, 149, 0.1);
    color: #be185d;
    border-left: 4px solid #fd3995;
}

/* Badges */
.badge {
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.8125rem;
}

/* Tab Content Loading */
.tab-content {
    position: relative;
    min-height: 200px;
}

.tab-content.loading {
    opacity: 0.6;
    pointer-events: none;
}

.tab-content.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid var(--theme-border);
    border-top-color: var(--theme-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Qualiopi Checkboxes */
.qualiopi-checkbox {
    height: 22px;
}

.custom-checkbox-wrapper {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.custom-checkbox-wrapper:hover {
    background-color: #f4f7fa;
}

.form-check-label {
    font-size: 1rem;
    color: #34495e;
    cursor: pointer;
    user-select: none;
    line-height: 1.4;
    margin-left: 0.5rem;
}

/* Qualiopi Checkboxes - Enhanced Design */
.qualiopi-checkboxes-container {
    display: flex;
    flex-direction: column;
}

.qualiopi-checkbox-item {
    width: 100%;
    padding: 1rem;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    background: linear-gradient(to bottom, #ffffff, #fafbfc);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 0;
    display: flex;
    align-items: center;
    flex-direction: row;
}

.qualiopi-checkbox-item:hover {
    border-color: var(--theme-primary);
    box-shadow: 0 2px 8px rgba(136, 106, 181, 0.1);
    transform: translateY(-1px);
}

/* Checkbox styling - E-Learning style */
.qualiopi-checkbox-item .form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    margin: 0;
    margin-right: 0.75rem;
    vertical-align: middle;
    background-color: #fff;
    border: 2px solid #ced4da;
    border-radius: 0.25rem;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
    position: relative;
    align-self: center;
}

.qualiopi-checkbox-item .form-check-input:checked {
    background-color: var(--theme-primary);
    border-color: var(--theme-primary);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100% 100%;
}

.qualiopi-checkbox-item .form-check-input:focus {
    border-color: var(--theme-primary);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(136, 106, 181, 0.25);
}

.qualiopi-checkbox-item .form-check-input:hover:not(:checked) {
    border-color: var(--theme-primary);
    background-color: rgba(136, 106, 181, 0.05);
}

.qualiopi-checkbox-item .form-check-input:checked ~ .form-check-label,
.qualiopi-checkbox-item:has(.form-check-input:checked) .form-check-label {
    color: var(--theme-primary);
    font-weight: 600;
}

.qualiopi-checkbox-item .form-check-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 0;
    flex: 1;
    line-height: 1.5;
}

.qualiopi-checkbox-item .form-check-label i {
    font-size: 1.1rem;
    margin-right: 0.5rem;
}

/* Qualiopi Certificate Section - Enhanced Design */
.qualiopi-certificate-section {
    margin-top: 1rem;
}

.certificate-upload-area {
    width: 100%;
    max-width: 500px;
}

.certificate-upload-box {
    border: 2px dashed #ced4da;
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(to bottom, #ffffff, #f8f9fa);
}

.certificate-upload-box:hover {
    border-color: var(--theme-primary);
    background: linear-gradient(to bottom, #f8f9fa, #ffffff);
    box-shadow: 0 4px 12px rgba(136, 106, 181, 0.15);
    transform: translateY(-2px);
}

.certificate-upload-content h6 {
    color: #333;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.certificate-display-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 500px;
}

.certificate-display-box {
    border: 1.5px solid #e1e8ed;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to bottom, #ffffff, #fafbfc);
    min-height: 200px;
}

.certificate-pdf-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.certificate-pdf-preview i.fa-file-pdf {
    font-size: 5rem !important;
    margin-bottom: 1rem;
}

.certificate-image-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.certificate-image {
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.certificate-filename {
    font-size: 1rem;
    color: #666;
    margin-top: 1rem;
    text-align: center;
    max-width: 100%;
    line-height: 1.5;
    word-break: normal;
    overflow-wrap: break-word;
    font-weight: 500;
}

.certificate-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.certificate-actions .list-btn-edit,
.certificate-actions .list-btn-delete {
    min-width: 120px;
    justify-content: center;
}

/* Edit Button - E-Learning Style (matching list.css) */
.list-btn-edit {
    background: linear-gradient(135deg, rgba(136, 106, 181, 0.1) 0%, rgba(136, 106, 181, 0.15) 100%);
    color: #886ab5;
    border: 1px solid rgba(136, 106, 181, 0.2);
    padding: 0.5rem 0.875rem;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 600;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.list-btn-edit:hover {
    background: #7555a0;
    color: white;
    box-shadow: 0 2px 6px rgba(136, 106, 181, 0.25);
    border-color: #7555a0;
    transform: translateY(-1px);
}

/* Delete Button - E-Learning Style (matching list.css) */
.list-btn-delete {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.15) 100%);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 0.5rem 0.875rem;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 600;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.list-btn-delete:hover {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.35);
    border-color: #ef4444;
    transform: translateY(-1px);
}

/* Trusted Images / Clients - E-Learning Style */
.logo-box {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    margin: 0.75rem;
    padding: 0.5rem;
}

.logo-box-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.upload-box {
    cursor: pointer;
    border: 2px dashed #ced4da;
    color: #6c757d;
    width: 300px;
    height: 100px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.upload-box:hover {
    background: #f8f9fa;
    border-color: var(--theme-primary);
}

.logo-img {
    height: 100px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    border-radius: 8px;
}

/* Delete button for clients - using e-learning style, positioned under image */
.logo-box .list-btn-delete {
    position: static;
    min-width: auto;
    width: auto;
    height: auto;
    padding: 0.5rem 0.875rem;
    border-radius: 6px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.15) 100%);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    font-size: 0.8125rem;
    font-weight: 600;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.logo-box .list-btn-delete:hover {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.35);
    border-color: #ef4444;
    transform: translateY(-1px);
}

.logo-box .list-btn-delete i {
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 767.98px) {
    .organism-map {
        height: 300px;
    }
    
    .organism-map.leaflet-container {
        height: 300px !important;
    }
    
    .org-section .card-body {
        padding: 1.5rem;
    }
    
    .organism-tabs .nav-link {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
}

