/* Styles untuk Text Editor Sederhana */
.text-editor {
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 5px;
}

.text-editor .toolbar {
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
    padding: 8px;
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.text-editor .toolbar button {
    background: white;
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 12px;
    min-width: 40px;
}

.text-editor .toolbar button:hover {
    background: #e9e9e9;
}

.text-editor .toolbar button:active {
    background: #ddd;
}

.text-editor .rich-text {
    width: 100%;
    min-height: 150px;
    border: none;
    padding: 12px;
    font-family: inherit;
    resize: vertical;
    font-size: 14px;
    line-height: 1.5;
}

/* Styles untuk form */
.form-container {
    background: rgb(255, 255, 255);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    border: 1px solid #e0e0e0;
}

.form-container h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
}

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

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

.form-group input[type="text"],
.form-group select,
.form-group textarea:not(.rich-text) {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input[type="text"]:focus,
.form-group select:focus,
.form-group textarea:not(.rich-text):focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

/* Table styles */
.soal-list {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
}

.soal-list h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #28a745;
    padding-bottom: 10px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 14px;
}

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

.data-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.data-table tr:hover {
    background: #f8f9fa;
}

/* Button styles */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.btn-secondary {
    background: #6c757d;
    color: white;
    margin-left: 10px;
}

.btn-secondary:hover {
    background: #545b62;
}

.btn-edit {
    background: #28a745;
    color: white;
    padding: 6px 12px;
    font-size: 12px;
    margin-right: 5px;
}

.btn-edit:hover {
    background: #1e7e34;
}

.btn-delete {
    background: #dc3545;
    color: white;
    padding: 6px 12px;
    font-size: 12px;
}

.btn-delete:hover {
    background: #c82333;
}

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

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

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

/* Alert styles */
.alert {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid transparent;
}

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

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

/* Character counter */
.char-counter {
    text-align: right;
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

/* Responsive design */
@media (max-width: 768px) {
    .form-container,
    .soal-list {
        padding: 15px;
    }
    
    .data-table {
        font-size: 12px;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px 10px;
    }
    
    .text-editor .toolbar {
        padding: 5px;
    }
    
    .text-editor .toolbar button {
        padding: 4px 8px;
        font-size: 11px;
        min-width: 35px;
    }
}

/* Edit Form Styles */
.edit-form {
    padding: 20px;
}

.form-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid #007bff;
}

.section-title {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 16px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 8px;
}

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

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

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

.form-group input[type="text"],
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group input[type="text"]:focus,
.form-group select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.1);
}

/* Text Editor dalam Edit Mode */
.edit-form .text-editor {
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.edit-form .text-editor .toolbar {
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
    padding: 8px;
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.edit-form .text-editor .toolbar button {
    background: white;
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 12px;
    min-width: 40px;
}

.edit-form .text-editor .rich-text {
    width: 100%;
    min-height: 120px;
    border: none;
    padding: 12px;
    font-family: inherit;
    resize: vertical;
    font-size: 14px;
}

/* Button Styles untuk Edit Mode */
.btn-success {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-success:hover {
    background: #1e7e34;
    transform: translateY(-1px);
}

/* Responsive untuk Edit Mode */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .form-section {
        padding: 15px;
    }
    
    .edit-form {
        padding: 15px;
    }
    
    .edit-form .text-editor .toolbar {
        padding: 6px;
    }
    
    .edit-form .text-editor .toolbar button {
        padding: 4px 8px;
        font-size: 11px;
        min-width: 35px;
    }
}

.sidebar {
    width: 250px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.sidebar-menu {
    list-style: none;
    padding: 1rem 0;

}

.sidebar-menu li {
    margin-bottom: 0.5rem;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: #080808ff;
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: #b2bdecff;
    color: white;
}

.sidebar-menu i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* Styling untuk text editor yang diperbarui */
.text-editor {
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.toolbar {
    background-color: #f5f5f5;
    padding: 5px;
    border-bottom: 1px solid #ddd;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.toolbar button, .toolbar select {
    background: white;
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 5px 8px;
    cursor: pointer;
    font-size: 14px;
}

.toolbar button:hover, .toolbar select:hover {
    background-color: #e9e9e9;
}

.toolbar .font-size-selector {
    width: 70px;
}

.rich-text {
    width: 100%;
    min-height: 150px;
    padding: 10px;
    border: none;
    resize: vertical;
    font-family: Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

/* Modal untuk upload gambar */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 20px;
    border-radius: 5px;
    width: 400px;
    max-width: 90%;
}

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

.close-modal {
    font-size: 24px;
    cursor: pointer;
}

.upload-area {
    border: 2px dashed #ccc;
    border-radius: 5px;
    padding: 20px;
    text-align: center;
    margin-bottom: 15px;
    cursor: pointer;
}

.upload-area:hover {
    border-color: #667eea;
}

.upload-area i {
    font-size: 48px;
    color: #667eea;
    margin-bottom: 10px;
}

.file-input {
    display: none;
}

.upload-preview {
    max-width: 100%;
    max-height: 200px;
    margin-top: 10px;
    display: none;
}

.upload-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px;
}
/* Style untuk text editor dengan upload gambar */
.text-editor {
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.toolbar {
    background-color: #f5f5f5;
    padding: 5px;
    border-bottom: 1px solid #ddd;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.toolbar button, .toolbar select {
    background: white;
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 5px 8px;
    cursor: pointer;
    font-size: 14px;
}

.toolbar button:hover, .toolbar select:hover {
    background-color: #e9e9e9;
}

.rich-text {
    width: 100%;
    min-height: 150px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    resize: vertical;
    font-family: Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    overflow-y: auto;
}

.rich-text:focus {
    border-color: #667eea;
    outline: none;
}

.rich-text img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 10px 0;
}

.char-counter {
    font-size: 12px;
    color: #666;
    text-align: right;
    margin-top: 5px;
}

/* Nomor Registrasi Styles */
.nomor-registrasi-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nomor-registrasi-input {
    background-color: #f8f9fa !important;
    color: #495057 !important;
    border: 2px solid #28a745 !important;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    text-align: center;
    letter-spacing: 1px;
}

.nomor-registrasi-input:focus {
    border-color: #28a745 !important;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1) !important;
}

.nomor-registrasi-info {
    background: #e7f3ff;
    padding: 12px 15px;
    border-radius: 6px;
    border-left: 4px solid #007bff;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.nomor-registrasi-info .fas.fa-info-circle {
    color: #007bff;
    margin-top: 2px;
    flex-shrink: 0;
}

.info-text {
    color: #0056b3;
    font-weight: 500;
    flex: 1;
}

.format-info {
    background: white;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #b3d7ff;
    font-size: 12px;
    line-height: 1.4;
}

.format-info code {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 3px;
    color: #e83e8c;
    font-family: 'Courier New', monospace;
}

/* Auto-generated badge */
.auto-generated-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #28a745;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    margin-left: 10px;
}
/* Sequence Info Styles */
.sequence-info {
    margin-top: 8px;
    padding: 6px 10px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.sequence-info .fas {
    color: #856404;
}

.sequence-info strong {
    color: #856404;
    font-size: 14px;
}

.info-content {
    flex: 1;
}

.info-text {
    display: block;
    color: #0056b3;
    font-weight: 500;
    margin-bottom: 8px;
}
/* Department Select Styles */
.department-select-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.department-select {
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: white;
    color: #495057;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236c757d' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px;
    appearance: none;
    padding-right: 40px;
}

.department-select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
    outline: none;
}

.department-select:hover {
    border-color: #007bff;
}

.department-select:required:invalid {
    color: #6c757d;
}

.department-select option {
    padding: 10px 15px;
    border-bottom: 1px solid #f8f9fa;
}

.department-select option:checked {
    background: #007bff linear-gradient(0deg, #007bff 0%, #007bff 100%);
    color: white;
}

.department-select option:hover {
    background: #f8f9fa;
}

.department-info {
    background: #f8f9fa;
    padding: 10px 15px;
    border-radius: 6px;
    border-left: 3px solid #17a2b8;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #495057;
}

.department-info .fas {
    color: #17a2b8;
    flex-shrink: 0;
}

/* Enhanced select styling */
.select-wrapper {
    position: relative;
}

.select-wrapper::after {
    content: '';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #6c757d;
}

/* Department icons for better visual */
.department-select option[value="Odontologi Forensik"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23007bff' viewBox='0 0 16 16'%3E%3Cpath d='M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16zM7 6.5C7 7.328 6.552 8 6 8s-1-.672-1-1.5S5.448 5 6 5s1 .672 1 1.5zM4.285 9.567a.5.5 0 0 1 .683.183A3.498 3.498 0 0 0 8 11.5a3.498 3.498 0 0 0 3.032-1.75.5.5 0 1 1 .866.5A4.498 4.498 0 0 1 8 12.5a4.498 4.498 0 0 1-3.898-2.25.5.5 0 0 1 .183-.683zM10 8c-.552 0-1-.672-1-1.5S9.448 5 10 5s1 .672 1 1.5S10.552 8 10 8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 10px center;
    padding-left: 30px;
}

.form-container {
    background: rgba(168, 187, 211, 1);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    border: 1px solid #e0e0e0;
}


