/* CMS-specific overrides can go here. Currently we use shared /assets/css/style.css */

/* Old CMS nav styles removed - now using sidebar system */

/* CMS: second-level subnav (tabs under main menu) */
#cms-subnav a {
    /* color: #7f1d1d; dark red */
    text-decoration: none;
    padding: 0.5rem 0.25rem;
    border-bottom: 2px solid transparent;
}
#cms-subnav a:hover {
    color: #991b1b; /* darker red on hover */
    border-bottom-color: #991b1b;
}
#cms-subnav a.selected {
    color: #991b1b;
    border-bottom-color: #991b1b;
    background: transparent; /* no black background */
}

/* =============================================
   Upload Pictures Interface
   ============================================= */

/* Pictures Title */
.pictures-title {
    transition: color 0.2s ease;
}

.pictures-title:hover {
    color: #3b82f6;
}

/* Native Modal Styles */
#edit-picture-modal {
    transition: opacity 0.3s ease;
    z-index: 9999 !important;
}

#edit-picture-modal:not(.hidden) {
    opacity: 1;
}

#edit-picture-modal .modal-body {
    max-height: calc(90vh - 120px);
    overflow-y: auto;
}

#edit-picture-modal .modal-header {
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
}

#edit-picture-modal .info-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

#edit-picture-modal .info-item span:first-child {
    font-weight: 500;
    color: #6b7280;
    font-size: 0.875rem;
}

#edit-picture-modal .info-item span:last-child {
    color: #111827;
    font-size: 0.875rem;
}

/* Modal form inputs */
#edit-picture-modal input,
#edit-picture-modal textarea,
#edit-picture-modal select {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#edit-picture-modal input:focus,
#edit-picture-modal textarea:focus,
#edit-picture-modal select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Modal buttons */
#edit-picture-modal button {
    transition: all 0.2s ease;
}

#edit-picture-modal button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#edit-picture-modal button:active {
    transform: translateY(0);
}

/* Modal close button */
#modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

#modal-close:hover {
    background-color: #f3f4f6;
    color: #374151;
}

/* Modal message animations */
#modal-message {
    animation: slideDown 0.3s ease;
}

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

/* Language tabs in modal */
#modal-lang-tabs .lang-tab-btn {
    transition: all 0.2s ease;
    cursor: pointer;
}

#modal-lang-tabs .lang-tab-btn:hover {
    color: #374151;
    border-color: #d1d5db;
}

#modal-lang-tabs .lang-tab-btn.border-blue-500 {
    color: #2563eb;
    border-color: #2563eb;
}

/* Language content */
.lang-content {
    transition: opacity 0.2s ease;
}

.lang-content.hidden {
    display: none;
}

/* Multilingual Form Generator Styles */
.multilingual-form-container {
    margin-bottom: 2rem;
}

.language-header {
    margin: 2rem 0 1rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-left: 4px solid #3b82f6;
    border-radius: 4px;
}

.language-header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.field-wrapper {
    margin-bottom: 1.5rem;
}

.field-wrapper label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-wysiwyg {
    width: 100%;
    min-height: 200px;
}

/* Checkbox field styles */
.active-checkbox {
    width: 24px;
    height: 24px;
    cursor: pointer;
    accent-color: #3b82f6;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.active-checkbox:hover {
    border-color: #3b82f6;
    transform: scale(1.1);
}

.active-checkbox:checked {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

/* Active checkbox in header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.active-checkbox-header {
    width: 24px;
    height: 24px;
    cursor: pointer;
    accent-color: #3b82f6;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    transition: all 0.2s ease;
    margin-left: auto;
    flex-shrink: 0;
}

.active-checkbox-header:hover {
    border-color: #3b82f6;
    transform: scale(1.1);
}

.active-checkbox-header:checked {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Toggle field styles (kept for backward compatibility) */
.toggle-group {
    display: flex;
    gap: 0.5rem;
}

.toggle-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    color: #6b7280;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    font-weight: 500;
}

.toggle-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.toggle-btn.selected {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.toggle-btn.selected:hover {
    background: #2563eb;
    border-color: #2563eb;
}

/* Picture Groups */
.picture-group {
    margin-bottom: 30px;
}

.group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
}

.group-title {
    font-size: 0.85rem !important; /* 0.1rem bigger than links */
    font-weight: 500 !important;
    color: #6b7280 !important;
    margin: 0 !important;
    padding: 0 !important;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    line-height: 1.4 !important;
}

.group-actions {
    display: flex;
    gap: 6px; /* Softer gap */
}

.group-select-link {
    color: #6b7280;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 2px 6px !important;
    border-bottom: none !important;
    line-height: 1.4;
    border-radius: 3px;
    background: #f8f9fa;
    transition: all 0.2s ease;
}

.group-select-link:hover {
    color: #ffffff;
    background: #3b82f6; /* Blue hover */
}

.group-select-link:active {
    color: #ffffff;
    background: #1d4ed8; /* Darker blue when active */
}

/* Upload Progress Bar */
.upload-progress {
    margin-top: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

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

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    text-align: center;
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.upload-pictures-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.upload-section {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.upload-section h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 1.25rem;
    font-weight: 600;
}

.upload-area {
    border: 2px dashed #ccc;
    border-radius: 6px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
    padding: 8px 12px;
    margin-left: 12px;
    display: inline-block;
    min-width: 120px;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: #007bff;
    background: #f8f9ff;
}

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

.upload-area p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

.upload-hint {
    font-size: 0.9rem;
    color: #999;
}

.upload-controls {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

.picture-type-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    font-size: 14px;
    min-width: 150px;
}

.upload-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s ease;
}

.upload-btn:hover:not(:disabled) {
    background: #0056b3;
}

.upload-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.progress-text {
    text-align: center;
    margin-top: 5px;
    font-size: 14px;
    color: #666;
}

.pictures-section {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
}

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

.upload-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.pictures-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.25rem;
    font-weight: 600;
}

.bulk-actions {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    min-width: 200px;
}

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

.bulk-actions-title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.bulk-hide-btn {
    background: none;
    border: none;
    font-size: 18px;
    font-weight: bold;
    color: #6b7280;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    line-height: 1;
}

.bulk-hide-btn:hover {
    background: #f3f4f6;
    color: #374151;
}

.bulk-actions-content {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.bulk-btn {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.bulk-btn:hover {
    background: #f8f9fa;
}

.bulk-btn.delete-btn {
    color: #dc3545;
    border-color: #dc3545;
}

.bulk-btn.delete-btn:hover {
    background: #dc3545;
    color: white;
}

.picture-group {
    margin-bottom: 30px;
}

.group-title {
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 1.1rem;
    font-weight: 600;
    padding-bottom: 8px;
    /* border-bottom: 2px solid #e9ecef; */
}

.picture-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 100px));
    gap: 9px;
}

.picture-item {
    position: relative;
    border: 2px solid #e9ecef;
    border-radius: 3px;
    overflow: hidden;
    background: #fff;
    transition: all 0.3s ease;
    cursor: grab;
}

.picture-item:active {
    cursor: grabbing;
}

/* Remove drag cursor on interactive elements */
.picture-item .action-btn,
.picture-item .picture-checkbox,
.picture-item .picture-select {
    cursor: pointer;
}

.picture-item:hover {
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.15);
}

.picture-item:hover .picture-checkbox {
    opacity: 1;
    visibility: visible;
}

.picture-item.selected {
    border-color: #007bff;
    background: #f8f9ff;
}

/* Always show checkboxes */
.picture-select {
    opacity: 1;
    visibility: visible;
}

/* Keep checked checkboxes and their containers visible */
.picture-item:has(.picture-checkbox:checked) .picture-select {
    opacity: 1 !important;
    visibility: visible !important;
}

.picture-thumbnail {
    position: relative;
    width: 100px;
    height: 100px;
    overflow: hidden;
}

.picture-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.picture-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.picture-item:hover .picture-overlay {
    opacity: 1;
}

.picture-actions {
    display: flex;
    gap: 3px;
}

.action-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 4px;
    margin:2px 0 0 2px;
    padding: 2px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
}

.action-btn:hover {
    background: white;
}

.picture-select {
    position: absolute;
    top: 4px;
    right: 7px;
    z-index: 20;
}

.picture-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    position: relative;
    opacity: 0.7;
}

.picture-checkbox:hover {
    border-color: rgba(255, 255, 255, 1);
    background: rgba(0, 0, 0, 0.5);
    opacity: 1;
}

.picture-checkbox:checked {
    background: #007bff;
    border-color: #007bff;
    opacity: 1;
}

.picture-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.picture-info {
    display: none;
}

.picture-name {
    font-size: 11px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.picture-meta {
    font-size: 10px;
    color: #666;
}

.loading, .no-pictures, .error {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
}

.error {
    color: #dc3545;
}

.upload-message {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-weight: 500;
    transition: opacity 0.3s ease;
}

.upload-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.upload-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.upload-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Sortable drag and drop */
.sortable-ghost {
    opacity: 0.4;
}

/* =============================================
   Upload Downloads Interface
   ============================================= */

.upload-downloads-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.downloads-section {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
}

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

.downloads-title {
    margin: 0;
    color: #333;
    font-size: 1.25rem;
    font-weight: 600;
    transition: color 0.2s ease;
}

.downloads-title:hover {
    color: #3b82f6;
}

.downloads-list {
    margin-top: 20px;
}

.download-group {
    margin-bottom: 20px;
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
}

.download-item {
    position: relative;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    cursor: move;
    transition: all 0.2s ease;
}

.download-item:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.download-item.selected {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
}

.download-item.selection-mode {
    opacity: 0.7;
}

.download-item.selected.selection-mode {
    opacity: 1;
}

.download-thumbnail {
    position: relative;
    width: 100%;
    height: 100px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.download-thumbnail .file-icon {
    font-size: 3rem;
    opacity: 0.7;
}

.download-select {
    position: absolute;
    top: 4px;
    right: 7px;
    z-index: 20;
}

.download-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    position: relative;
    opacity: 0.7;
}

.download-checkbox:hover {
    border-color: rgba(255, 255, 255, 1);
    background: rgba(0, 0, 0, 0.5);
    opacity: 1;
}

.download-checkbox:checked {
    background: #007bff;
    border-color: #007bff;
    opacity: 1;
}

.download-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.download-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.download-item:hover .download-overlay {
    opacity: 1;
}

.download-actions {
    display: flex;
    gap: 10px;
}

.download-info {
    padding: 8px;
    background: #fff;
}

.download-name {
    font-size: 11px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.download-meta {
    font-size: 10px;
    color: #666;
}

.no-downloads {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
}

/* Download Modal Styles */
#edit-download-modal {
    transition: opacity 0.3s ease;
    z-index: 9999 !important;
}

#edit-download-modal:not(.hidden) {
    opacity: 1;
}

#edit-download-modal .modal-body {
    max-height: calc(90vh - 120px);
    overflow-y: auto;
}

#edit-download-modal .modal-header {
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
}

#edit-download-modal .info-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

#edit-download-modal .info-item span:first-child {
    font-weight: 500;
    color: #6b7280;
    font-size: 0.875rem;
}

#edit-download-modal .info-item span:last-child {
    color: #111827;
    font-size: 0.875rem;
}

#edit-download-modal input,
#edit-download-modal textarea,
#edit-download-modal select {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#edit-download-modal input:focus,
#edit-download-modal textarea:focus,
#edit-download-modal select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

#edit-download-modal button {
    transition: all 0.2s ease;
}

#edit-download-modal button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#edit-download-modal button:active {
    transform: translateY(0);
}

#download-modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

#download-modal-close:hover {
    background-color: #f3f4f6;
    color: #374151;
}

#download-modal-message {
    animation: slideDown 0.3s ease;
}

/* Video Styles */
.upload-videos-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.videos-section {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
}

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

.videos-title {
    margin: 0;
    color: #333;
    font-size: 1.25rem;
    font-weight: 600;
    transition: color 0.2s ease;
}

.videos-title:hover {
    color: #3b82f6;
}

.videos-list {
    margin-top: 20px;
}

.video-group {
    margin-bottom: 20px;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
}

.video-item {
    position: relative;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    cursor: move;
    transition: all 0.2s ease;
}

.video-item:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.video-item.selected {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
}

.video-item.selection-mode {
    opacity: 0.7;
}

.video-item.selected.selection-mode {
    opacity: 1;
}

.video-thumbnail {
    position: relative;
    width: 100%;
    height: 100px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.video-thumbnail-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-thumbnail .video-icon {
    font-size: 3rem;
    opacity: 0.7;
}

.video-select {
    position: absolute;
    top: 4px;
    right: 7px;
    z-index: 20;
}

.video-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    position: relative;
    opacity: 0.7;
}

.video-checkbox:hover {
    border-color: rgba(255, 255, 255, 1);
    background: rgba(0, 0, 0, 0.5);
    opacity: 1;
}

.video-checkbox:checked {
    background: #007bff;
    border-color: #007bff;
    opacity: 1;
}

.video-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.video-item:hover .video-overlay {
    opacity: 1;
}

.video-actions {
    display: flex;
    gap: 10px;
}

.video-info {
    padding: 8px;
    background: #fff;
}

.video-name {
    font-size: 11px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.video-meta {
    font-size: 10px;
    color: #666;
}

.no-videos {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
}

/* Video Modal Styles */
#add-video-modal,
#edit-video-modal {
    transition: opacity 0.3s ease;
    z-index: 9999 !important;
}

#add-video-modal:not(.hidden),
#edit-video-modal:not(.hidden) {
    opacity: 1;
}

#add-video-modal .modal-body,
#edit-video-modal .modal-body {
    max-height: calc(90vh - 120px);
    overflow-y: auto;
}

#add-video-modal .modal-header,
#edit-video-modal .modal-header {
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
}

#add-video-modal input,
#add-video-modal textarea,
#add-video-modal select,
#edit-video-modal input,
#edit-video-modal textarea,
#edit-video-modal select {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#add-video-modal input:focus,
#add-video-modal textarea:focus,
#add-video-modal select:focus,
#edit-video-modal input:focus,
#edit-video-modal textarea:focus,
#edit-video-modal select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

#add-video-modal button,
#edit-video-modal button {
    transition: all 0.2s ease;
}

#add-video-modal button:hover,
#edit-video-modal button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#add-video-modal button:active,
#edit-video-modal button:active {
    transform: translateY(0);
}

#add-video-modal-close,
#video-modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

#add-video-modal-close:hover,
#video-modal-close:hover {
    background-color: #f3f4f6;
    color: #374151;
}

#add-video-modal-message,
#video-modal-message {
    animation: slideDown 0.3s ease;
}

/* Link Styles */
.upload-links-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.links-section {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
}

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

.links-title {
    margin: 0;
    color: #333;
    font-size: 1.25rem;
    font-weight: 600;
    transition: color 0.2s ease;
}

.links-title:hover {
    color: #3b82f6;
}

.links-list {
    margin-top: 20px;
}

.link-group {
    margin-bottom: 20px;
}

.link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
}

.link-item {
    position: relative;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    cursor: move;
    transition: all 0.2s ease;
}

.link-item:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.link-item.selected {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
}

.link-item.selection-mode {
    opacity: 0.7;
}

.link-item.selected.selection-mode {
    opacity: 1;
}

.link-thumbnail {
    position: relative;
    width: 100%;
    height: 100px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.link-thumbnail .link-icon {
    font-size: 3rem;
    opacity: 0.7;
}

.link-select {
    position: absolute;
    top: 4px;
    right: 7px;
    z-index: 20;
}

.link-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    position: relative;
    opacity: 0.7;
}

.link-checkbox:hover {
    border-color: rgba(255, 255, 255, 1);
    background: rgba(0, 0, 0, 0.5);
    opacity: 1;
}

.link-checkbox:checked {
    background: #007bff;
    border-color: #007bff;
    opacity: 1;
}

.link-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.link-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.link-item:hover .link-overlay {
    opacity: 1;
}

.link-actions {
    display: flex;
    gap: 10px;
}

.link-info {
    padding: 8px;
    background: #fff;
}

.link-name {
    font-size: 11px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.link-meta {
    font-size: 10px;
    color: #666;
}

.no-links {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
}

/* Link Modal Styles */
#add-link-modal,
#edit-link-modal {
    transition: opacity 0.3s ease;
    z-index: 9999 !important;
}

#add-link-modal:not(.hidden),
#edit-link-modal:not(.hidden) {
    opacity: 1;
}

#add-link-modal .modal-body,
#edit-link-modal .modal-body {
    max-height: calc(90vh - 120px);
    overflow-y: auto;
}

#add-link-modal .modal-header,
#edit-link-modal .modal-header {
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
}

#add-link-modal input,
#add-link-modal textarea,
#add-link-modal select,
#edit-link-modal input,
#edit-link-modal textarea,
#edit-link-modal select {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#add-link-modal input:focus,
#add-link-modal textarea:focus,
#add-link-modal select:focus,
#edit-link-modal input:focus,
#edit-link-modal textarea:focus,
#edit-link-modal select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

#add-link-modal button,
#edit-link-modal button {
    transition: all 0.2s ease;
}

#add-link-modal button:hover,
#edit-link-modal button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#add-link-modal button:active,
#edit-link-modal button:active {
    transform: translateY(0);
}

#add-link-modal-close,
#link-modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

#add-link-modal-close:hover,
#link-modal-close:hover {
    background-color: #f3f4f6;
    color: #374151;
}

#add-link-modal-message,
#link-modal-message {
    animation: slideDown 0.3s ease;
}

/* Responsive design */
@media (max-width: 1024px) {
    .upload-pictures-container {
        padding: 0 15px;
    }
    
    .upload-section,
    .pictures-section {
        padding: 15px;
    }
    
    .picture-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 12px;
    }
}

@media (max-width: 768px) {
    .upload-pictures-container {
        padding: 0 10px;
    }
    
    .upload-section,
    .pictures-section {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .upload-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .picture-type-select,
    .upload-btn {
        width: 100%;
    }
    
    .bulk-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .bulk-btn {
        width: 100%;
    }
    
    .picture-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 8px;
    }
    
    .pictures-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .upload-area {
        padding: 30px 15px;
    }
    
    .upload-icon {
        font-size: 2.5rem;
    }
    
    .picture-thumbnail {
        height: 60px;
    }
    
    .picture-info {
        padding: 6px;
    }
    
    .picture-name {
        font-size: 11px;
    }
    
    .picture-meta {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .upload-pictures-container {
        padding: 0 5px;
    }
    
    .upload-section,
    .pictures-section {
        padding: 10px;
        margin-bottom: 15px;
    }
    
    .upload-area {
        padding: 20px 10px;
    }
    
    .upload-icon {
        font-size: 2rem;
    }
    
    .upload-area p {
        font-size: 14px;
    }
    
    .upload-hint {
        font-size: 12px;
    }
    
    .picture-grid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
        gap: 6px;
    }
    
    .picture-thumbnail {
        height: 50px;
    }
    
    .picture-overlay {
        opacity: 1; /* Always show on mobile for better usability */
    }
    
    .action-btn {
        padding: 4px;
        font-size: 12px;
    }
    
    .picture-checkbox {
        width: 16px;
        height: 16px;
    }
    
    .group-title {
        font-size: 1rem;
    }
    
    .pictures-header h3 {
        font-size: 1.1rem;
    }
}

/* =============================================
   RESPONSIVE SIDEBAR STYLES
   ============================================= */

/* Sidebar Base Styles */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: #ffffff;
    border-right: 1px solid #e5e7eb;
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sidebar.collapsed {
    width: 70px;
}

/* Sidebar Header */
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    background: #f8f9fa;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.logo-container:hover {
    transform: scale(1.05);
}

.logo {
    object-fit: contain;
    transition: opacity 0.3s ease;
}

.logo-full {
    width: 157px;
    height: auto;
}

.logo-small {
    width: 62px;
    height: auto;
    position: absolute;
    opacity: 0;
}

.sidebar.collapsed .logo-full {
    opacity: 0;
}

.sidebar.collapsed .logo-small {
    opacity: 1;
    height: 48px; /* Match breadcrumb area height */
    width: auto;
}

/* User Info */
.user-info {
    padding: 0.8rem 1rem;
    border-top: 1px solid #e5e7eb;
}

.user-avatar {
    width: 26px;
    height: 26px;
    background: #BDD530;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.875rem;
}

.user-main {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.user-details {
    flex: 1;
}

.user-name-link {
    text-decoration: none;
    color: inherit;
}

.user-name-link:hover .user-name {
    color: #10b981;
}

.user-name {
    font-weight: 600;
    color: #1f2937;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.user-expand-icon {
    color: #6b7280;
    font-size: 0.875rem;
    transition: transform 0.2s ease;
}

.site-name {
    font-weight: 500;
    color: #6b7280;
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
    display: block;
}

.sidebar.collapsed .user-name {
    display: none;
}

/* Search Section */
.search-section {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    color: #6b7280;
    font-size: 0.875rem;
    z-index: 1;
}

.search-input {
    width: 100%;
    padding: 0.5rem 0.75rem 0.5rem 2.25rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    background: white;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.sidebar.collapsed .search-input {
    padding: 0.5rem 0.75rem 0.5rem 2rem;
}

.sidebar.collapsed .search-icon {
    left: 0.5rem;
}

.user-avatar {
    width: 26px;
    height: 26px;
    background: #BDD530;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.user-details {
    display: flex;
    flex-direction: column;
    transition: opacity 0.3s ease;
}

.sidebar.collapsed .user-details {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.user-name {
    font-weight: 500;
    color: #1f2937;
    font-size: 0.875rem;
}

.user-role {
    font-size: 0.75rem;
    color: #6b7280;
}

/* Navigation */
.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 2px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    margin: 0 0;
}

.nav-error {
    color: #dc2626;
    padding: 10px;
    text-align: center;
    font-size: 0.9rem;
}

.nav-arrow {
    margin-left: auto;
    transition: transform 0.3s ease, color 0.3s ease;
    font-size: 0.8rem;
}

.nav-item.has-submenu.active .nav-arrow {
    transform: rotate(90deg);
}


.submenu {
    display: none;
    margin-top: 5px;
    padding-left: 20px;
}

.nav-item.has-submenu.active .submenu {
    display: block;
}

.nav-sublink {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    color: #6b7280;
    text-decoration: none;
    border-radius: 6px;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

li:first-child a.nav-sublink {
    border-top-left-radius: 0;
}


.nav-sublink:hover {
    background: #f3f4f6;
    color: #374151;
}

.nav-sublink.active {
    background: #BDD530;
    color: white;
    font-weight: 500;
}

.nav-sublink i {
    margin-right: 8px;
    width: 16px;
    text-align: center;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #374151;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
}

.has-submenu .nav-link {
    justify-content: space-between;
}

.nav-item:not(.has-submenu) .nav-link {
    justify-content: flex-start;
}

.nav-link:hover {
    background: #f5f5f5;
    color: #1f2937;
}

.nav-item.active .nav-link {
    background: #BDD530;
    color: white;
}

.nav-item.active .nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #9ca3af;
}

.nav-text {
    transition: opacity 0.3s ease;
}

.sidebar.collapsed .nav-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar.collapsed .nav-link i.fas {
    width: 35px;
    text-align: center;
}

.nav-link i {
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

/* Submenu */
.has-submenu {
    position: relative;
}

.submenu-arrow {
    margin-left: auto;
    transition: transform 0.3s ease;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar.collapsed .submenu-arrow {
    opacity: 0;
    width: 0;
    overflow: hidden;
    margin: 0;
    flex-shrink: 0;
}

.sidebar.collapsed .has-submenu .nav-link {
    justify-content: flex-start;
}

.submenu {
    background: white;
    /* border: 1px solid #e5e7eb; */
    /* border-radius: 0.375rem; */
    /* box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); */
    list-style: none;
    margin: 0;
    padding: 0 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

.has-submenu.active .submenu {
    max-height: 200px;
    opacity: 1;
    /* background: #f5f5f5 */
}

.has-submenu.active {background:#f5f5f5;}

.has-submenu.active > a {
    font-weight: 600;
}

.has-submenu.active .submenu li {
    padding-left:32px;
}
.has-submenu.active .submenu li:last-child {
    margin-bottom:10px;
}

/* Theme Toggle Item */
.theme-toggle-item {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.theme-toggle-item .theme-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #374151;
    transition: all 0.2s ease;
}

.theme-toggle-item .theme-toggle:hover {
    background: #f5f5f5;
    color: #1f2937;
}

.sidebar.collapsed .theme-toggle-item {
    display: none;
}

/* Hide dark mode toggle temporarily */
.theme-toggle-item {
    display: none !important;
}

/* Edit Icon Button */
.edit-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    font-size: 14px;
}

.edit-icon-btn:hover {
    background-color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.edit-icon-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(59, 130, 246, 0.2);
}

.edit-icon-btn i {
    margin: 0;
}

/* Pagination Styles */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding: 1rem 0;
    border-top: 1px solid #e5e7eb;
}

.pagination-info {
    color: #6b7280;
    font-size: 0.875rem;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-btn {
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    background: white;
    color: #374151;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
    background: #f3f4f6;
    border-color: #9ca3af;
}

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

.pagination-btn.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.pagination-page-numbers {
    display: flex;
    gap: 0.25rem;
}

.pagination-ellipsis {
    padding: 0.5rem;
    color: #6b7280;
}

.has-submenu.active .submenu-arrow {
    transform: rotate(90deg);
}

.submenu-link {
    display: block;
    padding: 0.5rem 1rem;
    color: #374151;
    text-decoration: none;
    transition: all 0.2s ease;
}

.submenu-link:hover {
    background: #f5f5f5;
    color: #1f2937;
}

/* Logout section in footer */
/* .logout-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
} */

.logout-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #dc2626;
    text-decoration: none;
    transition: all 0.2s ease;
    border-radius: 0.375rem;
}

.logout-link:hover {
    background: #fef2f2;
    color: #b91c1c;
}

.logout-text {
    transition: opacity 0.3s ease;
}

.sidebar.collapsed .logout-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.logout-link i {
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid #e5e7eb;
    background: #f8f9fa;
}


.theme-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toggle-label {
    font-size: 0.875rem;
    color: #374151;
    transition: opacity 0.3s ease;
}

.sidebar.collapsed .toggle-label {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #BDD530;
}

input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

/* Main Content Area - Applied to body when sidebar is present */
body.has-sidebar {
    margin-left: 280px;
    transition: margin-left 0.3s ease;
    min-height: 100vh;
    background: #f8f9fa;
    position: relative;
    z-index: 1;
}

.sidebar.collapsed ~ body.has-sidebar,
body.has-sidebar.sidebar-collapsed {
    margin-left: 70px;
}

/* Top Bar */
.top-bar {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-sidebar-toggle {
    display: none;
    background: none;
    border: none;
    padding: 0.5rem;
    border-radius: 0.375rem;
    color: #6b7280;
    cursor: pointer;
}

.mobile-sidebar-toggle:hover {
    background: #e5e7eb;
    color: #374151;
}

/* Breadcrumbs */
.breadcrumbs {
    display: flex;
    align-items: center;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.breadcrumb-link {
    color: #6b7280;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.breadcrumb-link:hover {
    color: #BDD530;
}

.breadcrumb-current {
    color: #374151;
    font-size: 0.875rem;
    font-weight: 500;
}

.breadcrumb-separator {
    color: #d1d5db;
    font-size: 0.75rem;
}

/* User Info Compact */
.user-info-compact {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.user-email {
    font-size: 0.875rem;
    color: #374151;
    font-weight: 500;
}

.server-info {
    font-size: 0.75rem;
    color: #6b7280;
}

/* Dark Theme */
body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body.dark-theme {
    background: #1f2937;
}

body.dark-theme .sidebar {
    background: #111827;
    border-right-color: #374151;
}

body.dark-theme .sidebar-header {
    background: #1f2937;
    border-bottom-color: #374151;
}

body.dark-theme .logo-text {
    color: #f9fafb;
}

body.dark-theme .user-info {
    border-bottom-color: #374151;
}

body.dark-theme .site-name {
    color: #9ca3af;
}

body.dark-theme .user-name {
    color: #f9fafb;
}


body.dark-theme .nav-link {
    color: #d1d5db;
}

body.dark-theme .nav-link:hover {
    background: #374151;
    color: #f9fafb;
}

body.dark-theme .nav-item.active .nav-link {
    background: #059669;
    color: white;
}

body.dark-theme .submenu {
    background: #1f2937;
    border-color: #374151;
}



body.dark-theme .submenu-link {
    color: #d1d5db;
}

body.dark-theme .submenu-link:hover {
    background: #374151;
    color: #f9fafb;
}

body.dark-theme .nav-sublink {
    color: #9ca3af;
}

body.dark-theme .nav-sublink:hover {
    background: #374151;
    color: #d1d5db;
}

body.dark-theme .nav-sublink.active {
    background: #059669;
    color: white;
}

/* Dark theme scrollbar */
body.dark-theme .sidebar-nav::-webkit-scrollbar-thumb {
    background: #4b5563;
}

body.dark-theme .sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

body.dark-theme .theme-toggle-item {
    border-top-color: #374151;
}

body.dark-theme .theme-toggle-item .theme-toggle {
    color: #d1d5db;
}

body.dark-theme .theme-toggle-item .theme-toggle:hover {
    background: #374151;
    color: #f9fafb;
}

body.dark-theme .search-section {
    border-bottom-color: #374151;
}

body.dark-theme .search-input {
    background: #374151;
    border-color: #4b5563;
    color: #f9fafb;
}

body.dark-theme .search-input:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

body.dark-theme .search-input::placeholder {
    color: #9ca3af;
}

body.dark-theme .search-icon {
    color: #9ca3af;
}

body.dark-theme .user-info {
    border-bottom-color: #374151;
}

body.dark-theme .user-name {
    color: #f9fafb;
}

body.dark-theme .logout-section {
    border-top-color: #374151;
}

body.dark-theme .logout-link {
    color: #f87171;
}

body.dark-theme .logout-link:hover {
    background: #7f1d1d;
    color: #fecaca;
}

body.dark-theme .sidebar-footer {
    background: #1f2937;
    border-top-color: #374151;
}

body.dark-theme .toggle-label {
    color: #d1d5db;
}

body.dark-theme .main-content {
    background: #1f2937;
}

body.dark-theme .top-bar {
    background: #111827;
    border-bottom-color: #374151;
}

body.dark-theme .breadcrumb-link {
    color: #9ca3af;
}

body.dark-theme .breadcrumb-link:hover {
    color: #10b981;
}

body.dark-theme .breadcrumb-current {
    color: #f9fafb;
}

body.dark-theme .user-email {
    color: #f9fafb;
}

body.dark-theme .server-info {
    color: #9ca3af;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    body.has-sidebar {
        margin-left: 0;
    }
    
    .mobile-sidebar-toggle {
        display: block;
    }
    
    .breadcrumbs {
        display: none;
    }
    
    .user-info-compact {
        display: none;
    }
}

/* =============================================
   CONTENT WRAPPER STYLES
   ============================================= */

.content-wrapper {
    padding: 2rem;
    max-width: 1200px;
    margin: 0;
}

/* User Details Page */
.user-details-page {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.info-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.card-header {
    background: #f8f9fa;
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-title i {
    color: #10b981;
}

.card-content {
    padding: 1rem;
}

.info-grid {
    display: grid;
    gap: 0.75rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 500;
    color: #6b7280;
    font-size: 0.875rem;
}

.info-value {
    color: #1f2937;
    font-family: monospace;
    font-size: 0.875rem;
    font-weight: 500;
}

.password-form {
    max-width: 400px;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    transition: border-color 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: #10b981;
    color: white;
}

.btn-primary:hover {
    background: #059669;
}

/* Dark theme for user details page */
body.dark-theme .info-card {
    background: #374151;
    border-color: #4b5563;
}

body.dark-theme .card-header {
    background: #4b5563;
    border-bottom-color: #6b7280;
}

body.dark-theme .card-title {
    color: #d1d5db;
}

body.dark-theme .info-item {
    border-bottom-color: #4b5563;
}

body.dark-theme .info-label {
    color: #9ca3af;
}

body.dark-theme .info-value {
    color: #f9fafb;
}

body.dark-theme .form-group label {
    color: #d1d5db;
}

body.dark-theme .form-group input {
    background: #4b5563;
    border-color: #6b7280;
    color: #f9fafb;
}

body.dark-theme .form-group input:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

body.dark-theme .form-group input::placeholder {
    color: #9ca3af;
}

/* Menu Management Styles */

.menu-management {
    background: white;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e5e7eb;
}

.menu-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #374151;
    margin: 0;
}

.menu-items-container {
    padding: 1.5rem;
    min-height: 200px;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
    font-size: 1.1rem;
    background: #f8fafc;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    margin-bottom: 20px;
}

.loading-state, .error-state, .empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: #6b7280;
    font-style: italic;
}

.menu-items-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.menu-item {
    border: 0;
    border-radius: 0.375rem;
    background: white;
    transition: all 0.2s ease;
}

.menu-item:hover {
    border-color: #10b981;
    box-shadow: 0 1px 3px rgba(16, 185, 129, 0.1);
}

.menu-item-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1rem;
}

.menu-item-info {
    flex: 1;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    gap:0.2rem 1rem;
    flex-wrap: wrap;
}

.menu-item-title {
    width: 100%;
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 0.25rem 0;
}

.menu-item-url {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
    font-family: monospace;
}

.menu-item-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
}

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

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

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.open {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 0.5rem;
    width: 95%;
    max-width: 1200px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal.open .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #374151;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

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

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
    background: #f8f9fa;
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
}

/* Dark theme for menu management */


body.dark-theme .menu-management {
    background: #374151;
    border-color: #4b5563;
}

body.dark-theme .menu-header {
    background: #4b5563;
    border-bottom-color: #6b7280;
}

body.dark-theme .menu-title {
    color: #d1d5db;
}

body.dark-theme .menu-item {
    background: #374151;
    border-color: #4b5563;
}

body.dark-theme .menu-item:hover {
    border-color: #10b981;
}

body.dark-theme .menu-item-title {
    color: #d1d5db;
}

body.dark-theme .menu-item-url {
    color: #9ca3af;
}

body.dark-theme .modal-content {
    background: #374151;
}

body.dark-theme .modal-header {
    border-bottom-color: #4b5563;
}

body.dark-theme .modal-title {
    color: #d1d5db;
}

body.dark-theme .modal-close {
    color: #9ca3af;
}

body.dark-theme .modal-close:hover {
    background: #4b5563;
    color: #d1d5db;
}

body.dark-theme .modal-footer {
    background: #4b5563;
    border-top-color: #6b7280;
}

.content-header {
    margin-bottom: 2rem;
}

.content-title {
    font-size: 2rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 0.5rem 0;
}

.content-subtitle {
    color: #6b7280;
    margin: 0;
}

.content-body {
    /* background: white; */
    border-radius: 0.5rem;
    /* box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1); */
    overflow: hidden;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 2rem;
}

.dashboard-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1.5rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dashboard-card:hover {
    border-color: #BDD530;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.card-icon {
    width: 48px;
    height: 48px;
    background: #BDD530;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.card-content {
    flex: 1;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 0.25rem 0;
}

.card-description {
    color: #6b7280;
    font-size: 0.875rem;
    margin: 0 0 0.75rem 0;
}

.card-link {
    color: #BDD530;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.card-link:hover {
    color: #9ca3af;
}

/* Dark theme content styles */
body.dark-theme .content-title {
    color: #f9fafb;
}

body.dark-theme .content-subtitle {
    color: #9ca3af;
}

body.dark-theme .content-body {
    background: #1f2937;
    border-color: #374151;
}

body.dark-theme .dashboard-card {
    background: #1f2937;
    border-color: #374151;
}

body.dark-theme .dashboard-card:hover {
    border-color: #10b981;
}

body.dark-theme .card-title {
    color: #f9fafb;
}

body.dark-theme .card-description {
    color: #9ca3af;
}

body.dark-theme .card-link {
    color: #10b981;
}

body.dark-theme .card-link:hover {
    color: #34d399;
}

/* Hierarchical Menu Management Styles */
.menu-item {
    border-radius: 0 !important;
    padding: 0;
    margin-bottom: 2px !important;
}

.menu-item[data-level="1"] {
    margin-left: 0;
}

.menu-item[data-level="2"] {
    margin-left: 40px;
    background: #f1f5f9;
}

.menu-item[data-level="3"] {
    margin-left: 80px;
    background: #e2e8f0;
}

.menu-item-expand {
    width: 40px;
    display: flex;
    justify-content: flex-start;
    flex-shrink: 0;
    margin-right: 10px;
}

.expand-btn {
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.expand-btn.has-children {
    background: #10b981;
    color: white;
}

.expand-btn.has-children:hover {
    background: #059669;
    transform: scale(1.1);
}

.expand-btn.no-children {
    background: #9ca3af;
    color: white;
}

.expand-btn.no-children:hover {
    background: #6b7280;
    transform: scale(1.1);
}

.menu-item-path {
    color: #6b7280;
    font-size: 0.9rem;
    margin: 0 0 0 0;
    font-family: monospace;
    background: #f3f4f6;
    padding: 1px 3px;
    border-radius: 3px;
    display: inline-block;
}

.menu-item-meta {
    display: flex;
    gap: 15px;
    font-size: 0.8rem;
    color: #9ca3af;
    flex-wrap: wrap;
}

.active-languages {
    background: #e5e7eb;
    color: #374151;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.article-count {
    background: #dbeafe;
    color: #1e40af;
    padding: 2px 6px;
    border-radius: 3px;
}

.level-indicator {
    background: #f3e8ff;
    color: #7c3aed;
    padding: 2px 6px;
    border-radius: 3px;
}

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

.btn-sm {
    padding: 4px 8px;
    font-size: 0.75rem;
    border-radius: 3px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-info {
    background: #0ea5e9;
    color: white;
}

.btn-info:hover {
    background: #0284c7;
}

.btn-success {
    background: #10b981;
    color: white;
}

.btn-success:hover {
    background: #059669;
}

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

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

.menu-children {
    margin-top: 10px;
    padding-left: 0;padding-bottom: 10px;
}

.add-menu-item-row {
    margin-top: 10px;
    padding-left: 0;
    display: flex;
    align-items: center;
}

.add-menu-item-row::before {
    content: '';
    width: 0px;
    height: 32px;
    margin-right: 10px;
    flex-shrink: 0;
}

.add-menu-item-row[data-level="1"] {
    padding-left: 0;
}

.add-menu-item-row[data-level="2"] {
    padding-left: 40px;
}

.add-menu-item-row[data-level="3"] {
    padding-left: 80px;
}

.add-menu-item-level {
    background: white;
    color: #10b981;
    border: 1px solid #10b981;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.add-menu-item-level:hover {
    background: #10b981;
    color: white;
}

/* Add Menu Form Styles */
.add-menu-form {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin: 10px 0;
    padding: 15px;
}

.add-form-content {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.add-form-fields {
    display: flex;
    gap: 10px;
    flex: 1;
    flex-wrap: wrap;
}

.add-form-field {
    flex: 1;
    min-width: 150px;
}

.add-form-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.add-form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.add-form-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.add-form-submit {
    background: #10b981;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.add-form-submit:hover {
    background: #059669;
}

.add-form-cancel {
    background: #6b7280;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.add-form-cancel:hover {
    background: #4b5563;
}

.menu-item-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.btn-sm {
    padding: 6px 10px;
    font-size: 0.75rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.btn-info {
    background: #0ea5e9;
    color: white;
}

.btn-info:hover {
    background: #0284c7;
}

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

.btn-primary:hover {
    background: #b91c1c;
}

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

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

/* Dark theme overrides for hierarchical menu */
body.dark-theme .menu-item[data-level="2"] {
    background: #2d3748;
}

body.dark-theme .menu-item[data-level="3"] {
    background: #1a202c;
}

body.dark-theme .menu-item-path {
    background: #2d3748;
    color: #a0aec0;
}

body.dark-theme .article-count {
    background: #1e3a8a;
    color: #93c5fd;
}

body.dark-theme .level-indicator {
    background: #581c87;
    color: #c4b5fd;
}

body.dark-theme .active-languages {
    background: #4b5563;
    color: #d1d5db;
}

body.dark-theme .expand-btn.has-children {
    background: #059669;
}

body.dark-theme .expand-btn.has-children:hover {
    background: #047857;
}

body.dark-theme .expand-btn.no-children {
    background: #6b7280;
}

body.dark-theme .expand-btn.no-children:hover {
    background: #4b5563;
}

body.dark-theme .add-menu-item-level {
    background: #1f2937;
    color: #10b981;
    border-color: #10b981;
}

body.dark-theme .add-menu-item-level:hover {
    background: #10b981;
    color: white;
}

/* Dark theme for add form */
body.dark-theme .add-menu-form {
    background: #1f2937;
    border-color: #374151;
}

body.dark-theme .add-form-input {
    background: #374151;
    border-color: #4b5563;
    color: #f9fafb;
}

body.dark-theme .add-form-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

body.dark-theme .empty-state {
    background: #1f2937;
    border-color: #4b5563;
    color: #9ca3af;
}

/* Responsive Design for Small Screens (< 600px) */
@media (max-width: 600px) {
    /* Reduce sidebar padding */
    .sidebar {
        padding: 8px;
    }
    
    .sidebar-header {
        padding: 8px 0;
    }
    
    .sidebar-nav {
        padding: 8px 0;
    }
    
    /* Reduce menu item padding */
    .menu-item {
        padding: 6px 8px;
        margin-bottom: 4px;
    }
    
    .menu-item-content {
        padding: 4px 0;
    }
    
    .menu-item-info {
        padding: 0 8px;
    }
    
    .menu-item-meta {
        gap: 8px;
        font-size: 0.75rem;
    }
    
    .menu-item-actions {
        gap: 4px;
    }
    
    .btn-sm {
        padding: 4px 8px;
        font-size: 0.75rem;
    }
    
    /* Reduce add menu form padding */
    .add-menu-form {
        padding: 8px;
        margin: 6px 0;
    }
    
    .add-form-content {
        gap: 8px;
    }
    
    .add-form-fields {
        gap: 6px;
    }
    
    .add-form-field {
        min-width: 120px;
    }
    
    .add-form-input {
        padding: 6px 8px;
        font-size: 0.8rem;
    }
    
    .add-form-actions {
        gap: 4px;
    }
    
    .add-form-submit,
    .add-form-cancel {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    /* Reduce add menu item button padding */
    .add-menu-item-level {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    /* Reduce modal padding */
    .modal-content {
        padding: 15px;
        margin: 10px;
    }
    
    .modal-body {
        padding: 15px 0;
    }
    
    .form-group {
        margin-bottom: 12px;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 6px 8px;
        font-size: 0.9rem;
    }
    
    /* Reduce breadcrumb padding */
    .breadcrumb {
        padding: 8px 15px;
    }
    
    .breadcrumb-item {
        font-size: 0.85rem;
    }
    
    /* Reduce main content padding */
    .content-wrapper {
        padding: 8px 15px;
    }
    
    /* Reduce menu children padding */
    .menu-children {
        padding-left: 0;
        padding-bottom: 6px;
        margin-top: 6px;
    }
    
    .add-menu-item-row {
        margin-top: 6px;
        padding-left: 0;
    }
    
    /* Reduce expand button size */
    .expand-btn {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
    
    /* Reduce section titles */
    .section-title {
        font-size: 1rem;
        margin-bottom: 8px;
    }
    
    /* Reduce toggle switch size */
    .toggle-label-switch {
        width: 100px;
        height: 28px;
    }
    
    .toggle-slider {
        width: 24px;
        height: 24px;
    }
    
    .toggle-input:checked + .toggle-label-switch .toggle-slider {
        transform: translateX(72px);
    }
    
    .toggle-text {
        font-size: 0.7rem;
    }
    
    /* Reduce active languages badge */
    .active-languages {
        padding: 1px 6px;
        font-size: 0.7rem;
    }
    
    /* Reduce article count and level indicator */
    .article-count,
    .level-indicator {
        padding: 1px 4px;
        font-size: 0.7rem;
    }
    
    /* Stack modal content vertically on small screens */
    .modal-content-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .form-group-section {
        margin-bottom: 15px;
    }
    
    .language-groups {
        gap: 10px;
    }
    
    .language-section {
        margin-bottom: 15px;
    }
    
    /* Make form inputs stack better on small screens */
    .add-form-content {
        flex-direction: column;
        align-items: stretch;
    }
    
    .add-form-fields {
        margin-bottom: 8px;
    }
    
    .add-form-actions {
        justify-content: center;
    }
    
    /* Reduce empty state padding on small screens */
    .empty-state {
        padding: 20px 15px;
        font-size: 1rem;
        margin-bottom: 15px;
    }
    
    main#main-content {
        padding:0;
    }
        .menu-items-container {padding:0.5rem}
}

/* Menu Parameters Modal Layout */
.modal-content-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
    align-items: start;
}

.form-group-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e5e7eb;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #dc2626;
}

.params-section {
    min-width: 300px;
}

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

.language-section {
    background: white;
    border: 1px solid #d1d5db;
}

.language-section .section-title {
    color: #059669;
    border-bottom-color: #059669;
}

.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.875rem;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
}

.form-group textarea:focus {
    outline: none;
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* Responsive design */
@media (max-width: 768px) {
    .modal-content-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .language-groups {
        grid-template-columns: 1fr;
    }
    
    .params-section {
        min-width: auto;
    }
}

/* Dark theme overrides for modal layout */
body.dark-theme .form-group-section {
    background: #374151;
    border-color: #4b5563;
}

body.dark-theme .section-title {
    color: #f9fafb;
}

body.dark-theme .language-section {
    background: #1f2937;
    border-color: #4b5563;
}

body.dark-theme .language-section .section-title {
    color: #10b981;
}

body.dark-theme .form-group textarea {
    background: #374151;
    border-color: #4b5563;
    color: #f9fafb;
}

body.dark-theme .form-group textarea:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* Toggle Switch Styles */
.toggle-label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

.toggle-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toggle-input {
    display: none;
}

.toggle-label-switch {
    position: relative;
    display: flex;
    align-items: center;
    width: 120px;
    height: 32px;
    background: #e5e7eb;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
}

.toggle-text {
    position: absolute;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    transition: all 0.3s ease;
    z-index: 2;
    top: 50%;
    transform: translateY(-50%);
}

.toggle-text:first-child {
    left: 8px;
}

.toggle-text:last-child {
    right: 8px;
}

.toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 28px;
    height: 28px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 3;
}

.toggle-input:checked + .toggle-label-switch {
    background: #10b981;
}

/* Dynamic language color for toggle switches */
.toggle-input:checked + .toggle-label-switch[data-language-color] {
    background: var(--language-color, #10b981);
}

.toggle-input:checked + .toggle-label-switch .toggle-slider {
    transform: translateX(88px);
}

.toggle-input:checked + .toggle-label-switch .toggle-text:first-child {
    color: white;
    opacity: 1;
}

.toggle-input:checked + .toggle-label-switch .toggle-text:last-child {
    opacity: 0;
}

.toggle-input:not(:checked) + .toggle-label-switch .toggle-text:first-child {
    opacity: 0;
}

.toggle-input:not(:checked) + .toggle-label-switch .toggle-text:last-child {
    opacity: 1;
}

/* Dark theme overrides for toggle */
body.dark-theme .toggle-label {
    color: #d1d5db;
}

body.dark-theme .toggle-label-switch {
    background: #4b5563;
}

body.dark-theme .toggle-slider {
    background: #f9fafb;
}

body.dark-theme .toggle-input:checked + .toggle-label-switch {
    background: #059669;
}

/* Dynamic language color for toggle switches in dark theme */
body.dark-theme .toggle-input:checked + .toggle-label-switch[data-language-color] {
    background: var(--language-color, #059669);
}

body.dark-theme .toggle-text:first-child {
    color: #9ca3af;
}

body.dark-theme .toggle-text:last-child {
    color: #9ca3af;
}

body.dark-theme .toggle-input:checked + .toggle-label-switch .toggle-text:first-child {
    color: white;
    opacity: 1;
}

body.dark-theme .toggle-input:checked + .toggle-label-switch .toggle-text:last-child {
    opacity: 0;
}

body.dark-theme .toggle-input:not(:checked) + .toggle-label-switch .toggle-text:first-child {
    opacity: 0;
}

body.dark-theme .toggle-input:not(:checked) + .toggle-label-switch .toggle-text:last-child {
    opacity: 1;
}
