body {
    background-color: #404040;
    color: #f08c00;
    background-image: url("../img/texture.png");
}
.navbar {
    padding: 0px !important;
    min-height: 60px !important;
    width: 100%;
    width: calc(100%);
    position: fixed;
    top: 0px;
    left: 0;
    right: 0;
    z-index: 999;
    overflow: visible !important;
}
.bg-dark {
    background-color: #222 !important;
    color: #f08c00;
}

.navbar .container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    min-height: 60px;
    overflow: visible !important;
}

.navbar-toggler {
    margin-right: 0.5rem;
    border-color: #f08c00;
    padding: 0.5rem 0.75rem;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(240, 140, 0, 0.25);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28240, 140, 0, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-brand {
    padding-left: 0;
    margin-left: 0;
    margin-right: 0;
}

/* Desktop layout - horizontal menu */
@media (min-width: 768px) {
    .navbar .container-fluid {
        flex-wrap: nowrap;
    }

    .navbar-brand {
        margin-right: 1.5rem;
        display: flex;
        align-items: center;
        height: 60px;
    }

    .navbar-collapse {
        display: flex !important;
        flex-basis: auto;
        flex-grow: 1;
        height: 60px;
        align-items: center;
    }

    .navbar-nav {
        flex-direction: row;
        align-items: center;
        height: 60px;
        margin: 0;
        padding: 0;
    }

    .navbar-toggler {
        display: none;
    }
}

/* Mobile layout - toggle button visible */
@media (max-width: 767px) {
    .navbar {
        min-height: 45px !important;
    }

    .navbar .container-fluid {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        min-height: 45px;
        padding-top: 0.15rem;
        padding-bottom: 0.15rem;
    }

    .navbar-brand img {
        height: 28px !important;
    }

    .navbar-toggler {
        order: 1;
        flex: 0 0 auto;
        padding: 0.25rem 0.45rem;
        margin-right: 0.35rem;
    }

    .navbar-brand {
        order: 2;
        flex: 0 0 auto;
    }

    .navbar-collapse {
        order: 3;
        width: 100%;
        flex-basis: 100%;
        margin-top: 0.4rem;
    }

    .navbar-nav {
        flex-direction: column;
        width: 100%;
    }

    .nav-item {
        width: 100%;
    }

    a.nav-link {
        width: 100%;
        text-align: left;
        padding: 0.6rem 0.8rem !important;
    }

    .main-page {
        margin-top: 45px !important;
    }
}
.navbar-nav {
    align-items: center !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}
.navbar-nav li {
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
}
.nav-item {
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
}
a.nav-link {
    color: #f08c00 !important;
    min-width: 110px;
    padding: 18px 15px !important;
    line-height: normal !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center;
    margin: 0 !important;
    vertical-align: middle !important;
    box-sizing: border-box !important;
}
a.nav-link:hover, .nav-item.active a {
    color: #222 !important;
    background-color: #f08c00;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.main-page {
    margin-top: 60px;
}

/* ========================================
   EDITOR SIDEBAR - Modern Design
   ======================================== */

#left-dock {
    position: fixed;
    top: 70px;
    bottom: 0;
    left: 0;
    width: 320px;
    background: linear-gradient(180deg, #1a1a1a 0%, #252525 100%);
    border-right: 1px solid rgba(240, 140, 0, 0.15);
    display: flex;
    flex-direction: column;
    z-index: 100;
    padding: 10px 15px !important;
}

.editor-sidebar {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* Navigation Header */
.editor-nav {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 12px 16px;
    margin-top: 20px !important;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(240, 140, 0, 0.1);
    gap: 12px;
}

.nav-btn {
    width: 48px !important;
    min-width: 48px !important;
    height: 48px !important;
    border: 2px solid #f08c00 !important;
    background: transparent !important;
    color: #f08c00 !important;
    border-radius: 10px !important;
    cursor: pointer;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 18px;
    transition: all 0.2s ease;
    flex-shrink: 0;
    padding: 0 !important;
}

.nav-btn:hover {
    background: #f08c00 !important;
    color: #1a1a1a !important;
    transform: scale(1.05);
}

.nav-btn:active {
    transform: scale(0.95);
}

.file-indicator {
    flex: 1 1 auto !important;
    display: flex !important;
    justify-content: center !important;
    min-width: 0;
}

.file-id-display {
    width: 100% !important;
    max-width: 120px !important;
    text-align: center !important;
    background: rgba(240, 140, 0, 0.1) !important;
    border: 1px solid rgba(240, 140, 0, 0.3) !important;
    border-radius: 8px !important;
    color: #f08c00 !important;
    font-weight: 600;
    font-size: 16px;
    padding: 8px 12px !important;
}

.file-id-display::-webkit-inner-spin-button,
.file-id-display::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* File Name Display */
.file-name-display {
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid rgba(240, 140, 0, 0.1);
}

.file-name-display .form-control {
    background: rgba(240, 140, 0, 0.05) !important;
    border-radius: 8px;
    font-size: 13px;
    padding: 10px 14px;
    color: rgba(240, 140, 0, 0.8);
}

/* Editor Form */
.editor-form {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    color: #f08c00;
}

.editor-form::-webkit-scrollbar {
    width: 6px;
}

.editor-form::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.editor-form::-webkit-scrollbar-thumb {
    background: rgba(240, 140, 0, 0.3);
    border-radius: 3px;
}

.editor-form::-webkit-scrollbar-thumb:hover {
    background: rgba(240, 140, 0, 0.5);
}

/* Form Row - Two Column Layout */
.editor-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 12px;
    margin-bottom: 0;
    margin-left: 0;
    margin-right: 0;
}

.editor-row > .form-group-half {
    flex: 1 1 0% !important;
    min-width: 0;
    width: auto !important;
    max-width: none !important;
}

/* Form Groups */
.editor-form .form-group {
    margin-bottom: 16px;
}

.editor-form label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(240, 140, 0, 0.7);
    margin-bottom: 6px;
}

.editor-form label i {
    font-size: 11px;
    opacity: 0.7;
}

.label-actions {
    margin-left: auto;
    display: flex;
    gap: 4px;
}

.btn-icon {
    width: 28px;
    height: 28px;
    border: 1px solid rgba(240, 140, 0, 0.4);
    background: transparent;
    color: #f08c00;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: rgba(240, 140, 0, 0.2);
    border-color: #f08c00;
}

/* Form Controls */
.editor-form .form-control {
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(240, 140, 0, 0.25) !important;
    border-radius: 8px;
    color: #f08c00;
    padding: 10px 14px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.editor-form .form-control:focus {
    border-color: #f08c00 !important;
    box-shadow: 0 0 0 3px rgba(240, 140, 0, 0.1);
    background: rgba(0, 0, 0, 0.4) !important;
}

.editor-form .form-control::placeholder {
    color: rgba(240, 140, 0, 0.35);
}

/* Select2 Overrides */
.editor-form .select2-container {
    width: 100% !important;
}

.editor-form .select2-container--default .select2-selection--single {
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(240, 140, 0, 0.25) !important;
    border-radius: 8px !important;
    height: 42px !important;
    padding: 6px 8px;
}

.editor-form .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #f08c00;
    line-height: 28px;
    padding-left: 6px;
}

.editor-form .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 40px;
    right: 8px;
}

.editor-form .select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: #f08c00 transparent transparent transparent;
}

/* Details Toggle */
.details-group {
    margin-top: 8px;
}

.details-toggle {
    cursor: pointer;
    user-select: none;
}

.details-toggle .toggle-icon {
    margin-left: auto;
    transition: transform 0.2s ease;
}

.details-toggle.open .toggle-icon {
    transform: rotate(180deg);
}

.details-group textarea {
    margin-top: 8px;
    resize: vertical;
    min-height: 80px;
}

/* Editor Actions (Bottom Fixed) */
.editor-actions {
    padding: 16px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.6) 100%);
    border-top: 1px solid rgba(240, 140, 0, 0.15);
    flex-shrink: 0;
}

/* Custom Checkbox */
.checkbox-container {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    margin-bottom: 12px;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(240, 140, 0, 0.15);
    transition: all 0.2s ease;
}

.checkbox-container:hover {
    background: rgba(240, 140, 0, 0.08);
    border-color: rgba(240, 140, 0, 0.3);
}

.checkbox-container input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 22px;
    height: 22px;
    border: 2px solid rgba(240, 140, 0, 0.5);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.checkbox-container input[type="checkbox"]:checked + .checkmark {
    background: #f08c00;
    border-color: #f08c00;
}

.checkbox-container input[type="checkbox"]:checked + .checkmark::after {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: #1a1a1a;
    font-size: 12px;
}

.checkbox-label {
    font-size: 13px;
    color: rgba(240, 140, 0, 0.8);
    font-weight: 500;
}

/* Save Button */
.btn-save {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #f08c00 0%, #d67a00 100%);
    border: none;
    border-radius: 10px;
    color: #1a1a1a;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(240, 140, 0, 0.3);
}

.btn-save:hover {
    background: linear-gradient(135deg, #ffA020 0%, #f08c00 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(240, 140, 0, 0.4);
}

.btn-save:active {
    transform: translateY(0);
}

.btn-save i {
    font-size: 16px;
}

/* Container for PDF Viewer */
#container {
    margin-left: 320px;
    margin-top: 70px;
    width: calc(100% - 320px);
    height: calc(100vh - 70px);
    padding: 0;
    background: #1a1a1a;
}

.default-container {
    padding: 1em;
    margin: 0px;
}

/* Responsive Design */
@media (max-width: 992px) {
    #left-dock {
        width: 280px;
    }

    #container {
        margin-left: 280px;
        width: calc(100% - 280px);
    }

    .nav-btn {
        width: 42px !important;
        min-width: 42px !important;
        height: 42px !important;
    }
}

@media (max-width: 768px) {
    #left-dock {
        position: fixed;
        top: 45px;
        left: 0;
        right: 0;
        bottom: auto;
        width: 100%;
        height: auto;
        max-height: 60vh;
        border-right: none;
        border-bottom: 2px solid rgba(240, 140, 0, 0.3);
        z-index: 100;
    }

    .editor-sidebar {
        max-height: 60vh;
    }

    .editor-form {
        max-height: 35vh;
    }

    #container {
        margin-left: 0;
        width: 100%;
        height: 40vh;
        margin-top: 60vh;
    }

    .editor-row {
        flex-direction: column !important;
        gap: 0 !important;
    }

    .editor-row > .form-group-half {
        flex: none !important;
        width: 100% !important;
    }
}

.btn.btn-custom {
    border: 1px solid rgba(240, 140, 0, 1);
    color: #ffffff !important;
}

.btn.btn-custom:hover {
    background-color:rgba(240, 140, 0, 0.3);
    color: #ffffff !important;
}

.btn.btn-custom:focus {
    color: #ffffff !important;
    box-shadow: 0 0 0 0.2rem rgba(240, 140, 0, 0.1);
}

.btn.btn-custom:active {
    color: #ffffff !important;
}

/* Ensure all button variants have white text */
.btn-info,
.btn-danger,
.btn-default,
.btn-success,
.btn {
    color: #ffffff !important;
}

.btn-info:hover,
.btn-info:focus,
.btn-info:active,
.btn-danger:hover,
.btn-danger:focus,
.btn-danger:active,
.btn-default:hover,
.btn-default:focus,
.btn-default:active,
.btn-success:hover,
.btn-success:focus,
.btn-success:active {
    color: #ffffff !important;
}

/* Ensure button text and icons are visible */
.btn i,
.btn-custom i,
.btn-info i,
.btn-danger i,
.btn-default i {
    color: #ffffff !important;
}

/* Container width constraints */
.container {
    max-width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

/* Prevent horizontal overflow */
body {
    overflow-x: hidden;
}

.container,
.container-fluid {
    overflow-x: auto;
}

/* Responsive table wrapper */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.form-control, .select2-container--default {
    background-color: unset;
    border: 1px solid #f08c00 !important;
    color: #f08c00;
}

.form-control:focus {
    background-color: unset;
    border: 1px solid #f08c00;
    color: #f08c00;
    box-shadow: 0 0 0 0.2rem rgba(240, 140, 0, 0.1);
}

.select2-container--default .select2-selection--single{
    color: rgba(240, 140, 0, 1) !important;
    background-color: unset;
    border: unset !important;
}
.select2-results {
    color: rgba(240, 140, 0, 1) !important;
    background-color: #333 !important;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #f08c00;
}

#pdf-loader, #search-result {
    margin: 0px;
    padding: 0px;
    width: 100px;
    min-height: 300px;

    width:calc(100%);
    height:calc(100vh - 64px);
}

.loader-icon {
    position:relative;
    margin:auto;
    left: 0px; right: 0px;
    top: calc(50%);
    width: 150px; height: 150px;
    color: #f08c00 !important;
}

.dock-bottom {
    position: absolute;
    bottom: .4em;
    width: 280px;
}

.file {
    margin: auto;
    height: 140px;
    width: 110px;
    margin: .5em;
    font-size: small;
    border: 1px solid #f08c00;
    overflow:hidden;
    box-shaddow: 1px 0px 1em 5em rgba(0,0,0, 0.5);
    border-radius: 0px 22px  0px 0px;
}
.file:after {
    content: " ";
    width: 20px; height: 20px;
    border-radius: 0px 20px  0px 0px;
    float:right;
    background-color: #f08c00;
    position: relative;
    margin-top:-30px;
}

.file .file-icon {
    position: absolute;
    float: left;
    margin:auto;
    text-align:center;
    width: 110px;
    margin-top: 15px;


}
.file .file-name {
    position:relative;
    bottom: 0px;
    top: 110px;
    height: 30px;
    width: 110px;
    line-height: 30px;
    margin: 0px; padding: 0px;
    background-color:rgba(240, 140, 0,0.8) !important;
    color: #1a1a1a;
    text-align:center;
}



.form-control:disabled, .form-control[readonly] {
    background-color: unset;
}


.table {
    color: #f08c00 !important;
}
.table-bordered th, .table-bordered td {
    border: 1px solid #f08c00;
}

.table-hover tbody tr:hover {
    color: white!important;
    background-color: rgba(0, 0, 0, 0.075);
}
