html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.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;
}

.navbar-light .navbar-nav .nav-link {
    font-size: 1.3em;
    font-weight: 500;
    color: #000;
    margin: 20px 0 20px 24px;
    padding: 0 15px 0 0;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
}

.header_logo {
    height: 40px;
}

.kpi-card .card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.kpi-card .kpi-value {
    font-size: 2.5rem;
    font-weight: 700;
}

.kpi-card .kpi-label {
    font-size: 1rem;
    font-weight: 500;
    opacity: 0.8;
}

.ripple-background {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 1;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    pointer-events: none;
}

    .ripple-background .ripple-circle {
        position: absolute;
        top: 50%;
        left: 50%;
        width: 10px;
        height: 10px;
        background-color: rgba(255, 255, 255, 0.3);
        border-radius: 50%;
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
        animation: ripple-wave 2.5s ease-out infinite;
    }

        .ripple-background .ripple-circle.delay1 {
            animation-delay: 0.5s;
        }

        .ripple-background .ripple-circle.delay2 {
            animation-delay: 1.0s;
        }

@keyframes ripple-wave {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }

    100% {
        transform: translate(-50%, -50%) scale(15);
        opacity: 0;
    }
}

.kpi-card-link {
    text-decoration: none;
    transition: all 0.2s ease-out;
}

    .kpi-card-link .card:hover {
        filter: brightness(1.1);
        transform: translateY(-3px);
        box-shadow: 0 .5rem 1rem rgba(0,0,0,.15) !important;
    }

/* Height of chart */
#chartTopPages, #chartWorkflows {
    min-height: 400px;
    width: 100%;
}

/* table style */
.details-row td {
    border-top: none !important;
    padding-top: 0 !important;
}

.details-content {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
}

/* Administration sidebar (resizable) */
.admin-sidebar {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: #fff;
    overflow: auto;
    font: inherit;
    /* Wider default width */
    width: 300px;
    flex: 0 0 300px;
    min-width: 220px;
    max-width: 800px;
}

    .admin-sidebar .resizable {
        /* Allow user horizontal resize */
        resize: horizontal;
    }
    /* Ensure internal list-group items don't force expansion when active */
    .admin-sidebar .list-group-item.active {
        background: #0d6efd;
        color: #fff;
        border-color: #0d6efd;
        font-weight: 600;
    }

/* Administration sidebar (normalized for default font & stable width) */
.admin-sidebar {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: #fff;
    overflow: hidden;
}

    .admin-sidebar .list-group-item.active {
        background: #0d6efd;
        color: #fff;
        border-color: #0d6efd;
        font-weight: 600;
    }

    .admin-sidebar .admin-item:not(.active):hover {
        background: #eef3f7;
    }

    .admin-sidebar .admin-heading {
        font-weight: 600;
        background: #f8f9fa;
        padding: .6rem .85rem;
        cursor: pointer;
        border: 0;
        font-size: .875rem;
        letter-spacing: normal;
    }

.admin-heading:focus {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

.admin-heading-text {
    font-weight: 500;
    text-transform: none;
}

.admin-expand-icon {
    transition: .25s transform;
    font-size: 1rem;
    color: #495057;
}

    .admin-expand-icon.rotated {
        transform: rotate(-90deg);
    }

.admin-item {
    font-size: .85rem;
    padding: .55rem .85rem;
    border: 0;
    border-top: 1px solid #f1f3f5;
    transition: .15s background, .15s color;
}

    .admin-item:first-of-type {
        border-top: 1px solid #dee2e6;
    }

    .admin-item:hover {
        background: #eef3f7;
        text-decoration: none;
        color: #212529;
    }

    .admin-item.active {
        background: #0d6efd;
        color: #fff;
        font-weight: 600;
    }

.user-menu-wrapper {
    position: relative;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: 4px 12px;
    border-radius: 24px;
    background: #f5f7fa;
    border: 1px solid #dee2e6;
    font-size: .75rem;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    transition: .15s background;
}

    .user-menu-btn:hover,
    .user-menu-btn:focus {
        background: #e9ecef;
        text-decoration: none;
    }

.user-avatar-trigger {
    background: transparent;
    border: none;
    padding: 0;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

    .user-avatar-trigger:focus {
        outline: 2px solid #0d6efd;
        outline-offset: 2px;
    }

.user-avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg,#0d6efd,#4dabf7);
    color: #fff;
    font-size: .8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .user-avatar-circle.small-avatar {
        width: 28px;
        height: 28px;
        font-size: .65rem;
    }

.user-chevron i {
    font-size: .9rem;
    color: #6c757d;
    transition: .2s;
}

.user-avatar-trigger[aria-expanded="true"] .user-chevron i {
    transform: rotate(180deg);
}

.user-display-name {
    max-width: 140px;
    font-size: .75rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width:991.98px) {
    .user-display-name {
        display: none;
    }
}

/* Disabled button forced gray styles */
.btn:disabled,
.btn.disabled {
    background-color: #adb5bd !important;
    border-color: #adb5bd !important;
    color: #fff !important;
    opacity: 1 !important;
    cursor: not-allowed !important;
}

.btn-outline-danger:disabled,
.btn-outline-danger.disabled {
    background-color: #f1f3f5 !important;
    border-color: #adb5bd !important;
    color: #6c757d !important;
    opacity: 1 !important;
    cursor: not-allowed !important;
}

.btn-outline-secondary:disabled,
.btn-outline-secondary.disabled {
    background-color: #f1f3f5 !important;
    border-color: #adb5bd !important;
    color: #6c757d !important;
    opacity: 1 !important;
    cursor: not-allowed !important;
}

.btn-outline-warning:disabled,
.btn-outline-warning.disabled {
    background-color: #f8f9fa !important;
    border-color: #ced4da !important;
    color: #adb5bd !important;
    opacity: 1 !important;
    cursor: not-allowed !important;
}


body.app-root {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    /* remove old margin-bottom approach for footer spacing */
    margin-bottom: 0;
}

.main-content-wrapper {
    flex: 1 0 auto;
}

.footer {
    flex-shrink: 0;
    min-height: 70px; /* fixed minimum height */
    background-color: #f8f9fa;
}

    .footer .container {
        height: 100%;
    }

.pages-preview .page-item {
    margin-bottom: 2px;
}

.pages-preview .pages-ellipsis {
    margin: 4px 0;
}

.pages-preview .btn-show-pages,
.pages-preview .btn-collapse-pages {
    font-size: 0.8rem;
    padding: 0.15rem 0.4rem;
}

.sort-table {
    /* Sortable header button - visually plain, no underline or color change.
                   Hover gives a subtle surface highlight so users know column is interactive. */
    .sort-btn {
        color: inherit; /* no link color */
        background: transparent; /* no background */
        border: 0; /* remove default button border */
        padding: 0.25rem 0; /* small tappable area */
        margin: 0;
        text-decoration: none; /* no underline */
        display: inline-block;
        width: 100%;
        text-align: left;
        font: inherit;
        vertical-align: middle;
    }

        .sort-btn .sort-label,
        .sort-btn .sort-indicator {
            pointer-events: none; /* clicking the header triggers button only */
        }

        .sort-btn:hover {
            background-color: rgba(0,0,0,0.03); /* subtle hover surface */
            text-decoration: none;
            color: inherit;
            cursor: pointer;
        }

        .sort-btn:focus {
            outline: 3px solid rgba(0,123,255,0.12); /* accessible focus hint */
            outline-offset: 2px;
            border-radius: 4px;
        }
}

.filter-form {
    .filter-row {
        display: flex;
        flex-wrap: wrap;
        align-items: flex-end;
        gap: 0.5rem;
    }


    .fixed-col,
    .fixed-col {
        flex: 1 1 auto;
        white-space: nowrap;
    }

    .search-col {
        min-width: 25rem; /* adjust to your design */
    }

    .fixed-col .quick-filter-select {
        min-width: 20rem;
    }

    .filter-row.custom-date .fixed-col .quick-filter-select {
        min-width: 10rem;
    }

    .filter-row.custom-date .search-col {
        min-width: 20rem;
    }

    .action-col {
        flex: 0 0 auto;
        width: 10rem;
        margin-left: auto
    }

    .form-label {
        font-weight: 700 !important
    }
}
