/* here you can put your own css to customize and override the theme */

/* ============================================================
   Tabler-inspired reskin — pilot scope: sidebar + Dashboard only.
   Intentionally NOT importing the actual Tabler CSS bundle: Tabler is
   Bootstrap 5 and this app still runs an older Bootstrap/Metronic theme
   everywhere else (Posts, Categories, forms, modals, ...). Tabler's
   un-namespaced ".card"/".btn"/".nav" etc. rules would collide globally
   and break every other page. Instead this hand-matches Tabler's palette,
   type scale, and card/sidebar visual language using our own class names,
   scoped to the elements below, so the rest of the app is untouched. */
:root {
    --tabler-primary: #206bc4;
    --tabler-body-bg: #f4f6fa;
    --tabler-border: #e6e7e9;
    --tabler-dark: #1a2234;
    --tabler-dark-elevated: #232f43;
    --tabler-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.page-sidebar-closed.page-sidebar-closed-hide-logo .page-header.navbar .menu-toggler.sidebar-toggler {
    margin-right: -32px; 
}

.page-content-wrapper .feedback-content {
    margin-left: 0px !important;
    padding-left: 0 !important;
}

/* Dashboard chart cards: the charts previously sat directly on the white
   page background with no visual grouping. A soft grey canvas + white
   bordered cards gives each chart clear boundaries and breathing room. */
.tabcontent {
    background-color: var(--tabler-body-bg);
    padding: 24px;
    margin: -25px -20px -10px -20px;
    font-family: var(--tabler-font);
}

.dashboard-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 20px;
    width: 100%;
}

.dashboard-row:last-child {
    margin-bottom: 0;
}

.dashboard-card {
    background-color: #fff;
    border-radius: 6px;
    border: 1px solid var(--tabler-border);
    box-shadow: none;
    padding: 20px;
    box-sizing: border-box;
    min-width: 0;
}

.dashboard-card .custom-heading {
    font-size: 15px;
    font-weight: 600;
    color: #1a2234;
    margin: 0;
}

/* Full-bleed header strip (Tabler card-header / card-body split), achieved
   with negative margins so the divider spans the card's full width while
   the rest of the card keeps its normal padding. */
.dashboard-card-header,
.dashboard-card > .custom-heading:first-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: -20px -20px 20px -20px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--tabler-border);
}

.dashboard-card-header .custom-heading {
    margin: 0;
}

.dashboard-card-select {
    border: 1px solid var(--tabler-border);
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 13px;
    font-family: var(--tabler-font);
    color: #1a2234;
    background-color: #fff;
    flex: 0 0 auto;
}

/* Top header ribbon removed — the sidebar now spans the full viewport
   height, with the ACHIEVR logo pinned at the top and a profile/logout
   control pinned at the bottom, so the page content reclaims the space
   the fixed top bar used to take.

   Layout note: the nav menu and profile bar are positioned with explicit
   top/left/right/bottom insets (not flexbox). Bootstrap's collapse plugin
   applies its own ".navbar-collapse.collapse { height: auto !important }"
   rule at runtime once the collapse transition finishes, which always wins
   the flex-sizing fight regardless of our own !important/specificity —
   flexbox never got a chance to shrink the menu. Absolute positioning with
   both top and bottom set sidesteps that fight entirely: the used height is
   solved from the insets by the box model, independent of any competing
   "height" declaration. The profile control's height also never changes
   (toggle bar only, ~50px) — Profile/Log Out render as a small popover
   floating above it instead of expanding it, so the menu's bottom inset
   never needs to move. */
.page-sidebar-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 235px;
    z-index: 10001;
    background-color: var(--tabler-dark);
    font-family: var(--tabler-font);
    box-shadow: none;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-logo {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    padding: 0 20px;
    background-color: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.sidebar-logo a {
    color: #fff;
    text-decoration: none;
}

.sidebar-logo a span {
    color: var(--tabler-primary);
}

.sidebar-logo a {
    flex: 1;
}

.sidebar-collapse-btn {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
}

.sidebar-collapse-btn:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.sidebar-collapse-btn svg {
    width: 16px;
    height: 16px;
}

/* Sidebar collapse: shrinks to an icon-only rail rather than hiding
   entirely, so every page stays one click away instead of needing a
   reopen tab first. Labels/text fade out; icons stay centered and
   clickable at all times. */
.page-sidebar-wrapper {
    transition: width 0.15s ease;
}

body.sidebar-collapsed .page-sidebar-wrapper {
    width: 64px;
}

@media (min-width: 992px) {
    body.sidebar-collapsed .page-content-wrapper .page-content {
        margin-left: 64px !important;
    }
}

/* Logo: full wordmark by default, single-letter mark when collapsed. */
.sidebar-logo-mark {
    display: none;
}

body.sidebar-collapsed .sidebar-logo {
    padding: 0;
    justify-content: center;
}

body.sidebar-collapsed .sidebar-logo-text {
    display: none;
}

body.sidebar-collapsed .sidebar-logo-mark {
    display: block;
    flex: 0 0 auto;
}

body.sidebar-collapsed .sidebar-collapse-btn {
    position: absolute;
    bottom: -14px;
    right: -11px;
    width: 22px;
    height: 22px;
    background-color: var(--tabler-dark-elevated);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    z-index: 1;
}

/* Nav items: hide labels/badges, center the icon in the narrow rail. */
body.sidebar-collapsed .page-sidebar-menu > li > a {
    justify-content: center;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

body.sidebar-collapsed .page-sidebar-menu .title {
    display: none;
}

body.sidebar-collapsed .page-sidebar-menu .custom-icon {
    margin-right: 0;
}

body.sidebar-collapsed .page-sidebar-menu > li > a.active::before {
    left: 0;
}

/* Profile bar: icon-only toggle; the popover still opens at full label
   width so Profile/Log Out stay readable even though the rail is narrow. */
body.sidebar-collapsed .sidebar-profile-toggle {
    justify-content: center;
    padding: 0;
}

body.sidebar-collapsed .sidebar-profile-toggle .title,
body.sidebar-collapsed .sidebar-profile-caret {
    display: none;
}

body.sidebar-collapsed .sidebar-profile-menu {
    width: 200px;
}

.page-sidebar-wrapper .page-sidebar.navbar-collapse.collapse {
    position: absolute !important;
    top: 56px;
    left: 0;
    right: 0;
    bottom: 50px;
    height: auto !important;
    min-height: 0 !important;
    overflow-y: auto;
    width: 100%;
    margin: 0;
    padding: 8px !important;
}

/* Tabler-style nav items: pill-shaped, subtle hover, blue-accent active
   state instead of the old theme's default link rows. */
.page-sidebar-menu {
    padding: 0 !important;
}

.page-sidebar-menu > li {
    margin-bottom: 2px;
}

.page-sidebar-menu > li > a {
    display: flex !important;
    align-items: center;
    border-top: none !important;
    border-radius: 5px !important;
    padding: 8px 12px !important;
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 13.5px;
    font-weight: 500;
    background: transparent !important;
    transition: background-color 0.12s ease, color 0.12s ease;
}

.page-sidebar-menu > li > a:hover {
    background-color: rgba(255, 255, 255, 0.06) !important;
    color: #fff !important;
}

.page-sidebar-menu > li > a.active {
    background-color: rgba(32, 107, 196, 0.16) !important;
    color: #fff !important;
    position: relative;
}

.page-sidebar-menu > li > a.active::before {
    content: "";
    position: absolute;
    left: -8px;
    top: 6px;
    bottom: 6px;
    width: 3px;
    border-radius: 3px;
    background-color: var(--tabler-primary);
}

/* Dark "-linear" icon PNGs were designed for a light sidebar; invert them
   so they read clearly against this dark theme. */
.page-sidebar-menu .custom-icon {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    filter: brightness(0) invert(1) opacity(0.65);
    transition: filter 0.15s ease;
}

.page-sidebar-menu > li > a:hover .custom-icon,
.page-sidebar-menu > li > a.active .custom-icon {
    filter: brightness(0) invert(1) opacity(1);
}

.sidebar-profile {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 50px;
    box-sizing: border-box;
    background-color: var(--tabler-dark-elevated);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-profile-toggle {
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.85);
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    text-align: left;
    font-size: 13.5px;
    font-family: var(--tabler-font);
    font-weight: 500;
}

.sidebar-profile-toggle .title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-profile-icon {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    color: #d9d9d9;
}

.sidebar-profile-caret {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
    color: #d9d9d9;
    transition: transform 0.15s ease;
    transform: rotate(180deg);
}

.sidebar-profile.open .sidebar-profile-caret {
    transform: rotate(0deg);
}

/* Floats above the fixed-height toggle bar as a popover, so it never
   changes the toggle bar's own height (see layout note above). */
.sidebar-profile-menu {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 50px;
    list-style: none;
    margin: 0;
    padding: 6px 0;
    background-color: var(--tabler-dark-elevated);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.3);
}

.sidebar-profile-menu li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px 10px 20px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-family: var(--tabler-font);
    font-size: 13.5px;
}

.sidebar-profile-menu li a:hover {
    background-color: rgba(255, 255, 255, 0.06);
    color: #fff;
}

@media (max-width: 991px) {
    .page-sidebar-wrapper {
        position: relative;
        width: 100%;
        height: auto;
    }
}