
/*--------------------------------------------------------------
    ROOT & GLOBAL
--------------------------------------------------------------*/

html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    margin-bottom: 60px;
}

/* Buttons & focus rings */
.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

/* Logo size */
.logo {
    width: 8rem;
    height: 40px;
    margin-left: 1rem;
    margin-right: 15px;
}

/* Form floating placeholders */
.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

.list-group-item.active {
    z-index: 2;
    color: var(--bs-list-group-active-color);
    background-color: #1b1534;
    border-color: #1b1534;
}

/*--------------------------------------------------------------
    SIDEBAR
--------------------------------------------------------------*/

/* Sidebar header */
.sidebar-header {
    background-color: #1B1534 !important;
    color: white !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Base sidebar */
.sidebar {
    width: 260px;
    min-height: 100vh;
    position: sticky;
    top: 0;
    z-index: 1020;
    background: #fff;
    transition: width 0.3s ease, transform 0.25s ease;
    will-change: transform, width;
}

    /* Hover expand (if collapsed class is used) */
    .sidebar.collapsed:hover {
        width: 200px;
    }

/* Mobile override */
@media (max-width: 767.98px) {
    .sidebar {
        width: 100% !important;
        min-height: auto;
        position: static !important;
        transform: none !important;
    }
}

/* Nav items */
.sidebar .nav-link {
    color: #333;
    border-radius: .375rem;
    padding: .5rem 1rem;
}

    .sidebar .nav-link:hover {
        background-color: #f5f5f5;
    }

    .sidebar .nav-link.active {
        color: #4e00bf;
        font-weight: 600;
    }

/* Section separators */
.sidebar .small {
    text-transform: uppercase;
    letter-spacing: .06em;
    opacity: 0.7;
}


/*--------------------------------------------------------------
    DESKTOP — FULL HIDE SIDEBAR
--------------------------------------------------------------*/

.sidebar-hidden .sidebar {
    width: 0 !important;
    overflow: hidden !important;
    padding: 0 !important;
    border: none !important;
    transform: translateX(-100%);
}

.sidebar-hidden .flex-grow-1 {
    width: 100% !important;
}

/* When sidebar hidden instantly hide menu items too */
.sidebar-hidden #sidebarMenu {
    display: none !important;
}


/*--------------------------------------------------------------
    COLORS & UTILITIES
--------------------------------------------------------------*/

.bg-purple {
    background-color: #1B1534 !important;
    color: white;
}

.custom-purple {
    background-color: #1B1534 !important;
    color: white !important;
}

/* Hide-column utility */
.hide-column {
    display: none !important;
}


/*--------------------------------------------------------------
    ENERGY LOADER
--------------------------------------------------------------*/

.energy-loader {
    position: fixed;
    inset: 0;
    background: rgba(245, 240, 255, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.energy-icon {
    animation: spin 1s linear infinite;
    filter: drop-shadow(0 0 16px #a259e6);
}


/*--------------------------------------------------------------
    EDIT / DELETE BUTTONS
--------------------------------------------------------------*/

button.editor-edit,
button.editor-delete {
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    color: white;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-right: 6px;
}

button.editor-edit {
    background-color: #4CAF50;
}

    button.editor-edit:hover {
        background-color: #45a049;
        transform: scale(1.05);
    }

    button.editor-edit:active {
        transform: scale(0.98);
    }

button.editor-delete {
    background-color: #f44336;
}

    button.editor-delete:hover {
        background-color: #d32f2f;
        transform: scale(1.05);
    }

    button.editor-delete:active {
        transform: scale(0.98);
    }

    /* Icon spacing */
    button.editor-edit i,
    button.editor-delete i {
        margin-right: 4px;
    }


/*--------------------------------------------------------------
    BOOTSTRAP BACKDROP FIX
--------------------------------------------------------------*/

.modal-backdrop.fade.show {
    z-index: -10;
}


/*--------------------------------------------------------------
    DATATABLE & TABLES
--------------------------------------------------------------*/

table.dataTable td,
table.dataTable th {
    padding: 4px 6px !important;
    font-size: 12px !important;
}

.dataTables_wrapper {
    overflow-x: auto !important;
}

table.dataTable td {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* Row highlight (striped + selected) */
table.table.dataTable.table-striped > tbody > tr:nth-of-type(2n+1).selected > * {
    box-shadow: inset 0 0 0 9999px rgba(87, 7, 86, 0.95) !important;
}

table.table.dataTable > tbody > tr.selected > * {
    box-shadow: inset 0 0 0 9999px rgb(119, 7, 102) !important;
}

/*--------------------------------------------------------------
    DRAG & DROP ZONE
--------------------------------------------------------------*/
.drop-zone {
    border: 2px dashed #6c757d;
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    color: #6c757d;
    transition: background-color 0.3s;
}

    .drop-zone.dragover {
        background-color: #e9ecef;
        border-color: #495057;
        color: #495057;
    }
/*--------------------------------------------------------------
    AUTOCOMPLETE
--------------------------------------------------------------*/

.ui-front {
    z-index: 1056;
}

/*--------------------------------------------------------------
    ANIMATIONS
--------------------------------------------------------------*/

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animated-tag {
    animation: fadeIn 0.5s ease-out;
    transition: opacity 0.5s ease-out;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}
