/* ----------------------- NEW Concept styles ----------------------- */
/* 
 * This file contains the styles for the ScanMe Web Application.
 * It is designed to be responsive and adapt to different screen sizes.
 */
/* Global styles */
body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background-color: #e6e8ed;
    color: #666666;
    font-family: "Roboto", sans-serif;
}

.text-primary {
    color: #666666;
}

.text-blue {
    color: #246dec;
}

.text-red {
    color: #cc3c43;
}

.text-green {
    color: #367952;
}

.text-orange {
    color: #f5b74f;
}

.font-weight-bold {
    font-weight: 600;
}

.grid-container {
    display: grid;
    grid-template-columns: 260px 1fr 1fr 1fr;
    grid-template-rows: 64px minmax(0, 1fr) 28px;
    grid-template-areas:
        "sidebar header header header"
        "sidebar main main main"
        "sidebar footer footer footer";
    height: 100vh;
}

/* -------------------------- HEADER --------------------------------*/
.header {
    grid-area: header;
    height: 64px;
    background: linear-gradient(180deg, #fafbfc 0%, #ffffff 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    box-shadow: 0 1px 0 0 rgba(0, 0, 0, 0.06);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.header-left {
    display: flex;
    align-items: center;
    min-width: 0;
}

.header-branch-name {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a1a2e;
}

.header-branch-icon {
    color: #5c6bc0;
    font-size: 0.9rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* User menu – sleek */
.user-menu-dropdown {
    margin-left: 4px;
    padding-left: 14px;
    border-left: 1px solid rgba(0, 0, 0, 0.06);
}

.user-menu-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px 8px 16px;
    border: none;
    background: transparent;
    color: #1f2937;
    font-size: 13px;
    font-weight: 500;
    border-radius: 10px;
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.user-menu-btn:hover {
    background: rgba(0, 0, 0, 0.04);
    color: #111827;
}

.user-menu-btn:focus {
    outline: none;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.user-menu-btn .user-menu-text {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
    text-align: right;
    line-height: 1.35;
}

.user-menu-company {
    font-weight: 600;
    color: #111827;
    letter-spacing: 0.01em;
}

.user-menu-icon {
    margin-right: 6px;
    opacity: 0.75;
    font-size: 12px;
    color: #4b5563;
}

.user-menu-username {
    font-size: 11px;
    font-weight: 400;
    color: #6b7280;
    letter-spacing: 0.02em;
}

.user-menu-dropdown-menu {
    min-width: 200px;
    padding: 6px 0;
    margin-top: 6px;
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 0 1px rgba(0, 0, 0, 0.06);
    border: none;
    border-radius: 12px;
    overflow: hidden;
}

.user-menu-dropdown-menu .dropdown-item {
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    transition: background 0.15s ease, color 0.15s ease;
}

.user-menu-dropdown-menu .dropdown-item:hover {
    background: rgba(0, 0, 0, 0.04);
    color: #111827;
}

.user-menu-dropdown-menu .dropdown-item.text-danger {
    color: #dc2626;
}

.user-menu-dropdown-menu .dropdown-item.text-danger:hover {
    background: rgba(220, 38, 38, 0.06);
    color: #b91c1c;
}

.user-menu-dropdown-menu .dropdown-divider {
    margin: 4px 0;
    border-color: rgba(0, 0, 0, 0.06);
}

/* -------------------------- NOTIFICATION BELL --------------------------------*/
.notification-dropdown {
    position: relative;
}

.notification-icon-button {
    position: relative;
    border: none;
    background: transparent;
    padding: 8px 12px;
    color: #4b5563;
    cursor: pointer;
    border-radius: 10px;
    transition: background 0.2s ease, color 0.2s ease;
}

.notification-icon-button:hover {
    background: rgba(0, 0, 0, 0.04);
    color: #111827;
}

.notification-icon-wrapper {
    position: relative;
    display: inline-block;
}

.notification-icon-wrapper i {
    font-size: 20px;
}

.notification-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background-color: #dc3545;
    color: #ffffff;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    padding: 0 4px;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.notification-badge:empty {
    display: none;
}

.notification-dropdown-menu {
    width: 350px;
    max-width: 90vw;
    max-height: 500px;
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0;
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    margin: 0;
    font-weight: 600;
    font-size: 14px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e5e7eb;
}

.notification-header #markAllReadButton {
    font-size: 12px;
    color: #0d6efd;
    text-decoration: none;
}

.notification-header #markAllReadButton:hover {
    text-decoration: underline;
}

.notification-list {
    max-height: 350px;
    overflow-y: auto;
}

.notification-empty {
    min-height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.notification-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

.notification-item:hover {
    background-color: #f8f9fa;
}

.notification-item.unread {
    background-color: #f0f7ff;
    border-left: 3px solid #0d6efd;
}

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

.notification-item-content {
    display: flex;
    gap: 12px;
}

.notification-item-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #ffffff;
}

.notification-item-icon.info {
    background-color: #0dcaf0;
}

.notification-item-icon.success {
    background-color: #198754;
}

.notification-item-icon.warning {
    background-color: #ffc107;
    color: #000000;
}

.notification-item-icon.error {
    background-color: #dc3545;
}

.notification-item-details {
    flex: 1;
    min-width: 0;
}

.notification-item-title {
    font-weight: 600;
    font-size: 14px;
    color: #212529;
    margin-bottom: 4px;
}

.notification-item-message {
    font-size: 13px;
    color: #6c757d;
    margin-bottom: 4px;
    word-wrap: break-word;
}

.notification-item-time {
    font-size: 11px;
    color: #adb5bd;
}

/* Scrollbar styling for notification dropdown */
.notification-dropdown-menu::-webkit-scrollbar,
.notification-list::-webkit-scrollbar {
    width: 6px;
}

.notification-dropdown-menu::-webkit-scrollbar-track,
.notification-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.notification-dropdown-menu::-webkit-scrollbar-thumb,
.notification-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.notification-dropdown-menu::-webkit-scrollbar-thumb:hover,
.notification-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* -------------------------- SIDEBAR --------------------------------*/
#sidebar {
    grid-area: sidebar;
    height: 100%;
    background-color: #21232d;
    color: #9799ab;
    overflow-y: auto;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease-in-out;
    -webkit-transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease-in-out;
    transform: translateX(0);
    opacity: 1;
}

#sidebar.collapsed {
    transform: translateX(-100%);
    opacity: 0;
    pointer-events: none;
}

.sidebar-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 20px 20px;
    margin-bottom: 30px;
}

.sidebar-title > span {
    display:none;
}

.sidebar-brand {
    margin-top: 15px;
    font-size: 20px;
    font-weight: 700;
}

.sidebar-list {
    padding: 0;
    margin-top: 15px;
    list-style-type: none;
}

.sidebar-item {
    padding: 0;
}

.sidebar-link {
    display: block;
    padding: 20px 20px 20px 20px;
    color: inherit;
}

.sidebar-link:hover,
.sidebar-link:focus {
    background-color: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    color: inherit;
}

.sidebar-link-content {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.sidebar-responsive {
    display: inline !important;
    position: absolute;
    /*
    the z-index of the ApexCharts is 11
    we want the z-index of the sidebar higher so that
    the charts are not showing over the sidebar 
    on small screens
  */
    z-index: 12 !important;
    transform: translateX(0) !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* -------------------------- MAIN --------------------------------*/
.main-container {
    grid-area: main;
    overflow-y: auto;
    padding: 20px 20px;
}

.app-footer {
    grid-area: footer;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    font-size: 11px;
    color: #6b7280;
    background: #f8f9fb;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.app-footer-motto {
    font-style: italic;
}

.app-footer-right {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.main-title {
    display: flex;
    //justify-content: space-between;
    align-items:baseline;
}
.main-title > button{
    border:none;
    background-color:transparent;
}

.main-title > p {
    font-size: 20px;
}

.main-cards {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

.main-cards2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

.card {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    padding: 25px;
    background-color: #ffffff;
    box-sizing: border-box;
    border: 1px solid #d2d2d3;
    border-radius: 5px;
    box-shadow: 0 6px 7px -4px rgba(0, 0, 0, 0.2);
}

.card:first-child {
    border-left: 7px solid #246dec;
}

.card:nth-child(2) {
    border-left: 7px solid #f5b74f;
}

.card:nth-child(3) {
    border-left: 7px solid #367952;
}

.card:nth-child(4) {
    border-left: 7px solid #cc3c43;
}

.card > span {
    font-size: 20px;
    font-weight: 600;
}

.card-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-inner > p {
    font-size: 18px;
}

.card-inner > span {
    font-size: 35px;
}

.menu-icon{
    display: none;
}

/* -------------------------- HEADER USERNAME DROPDOWN --------------------------------*/
#userNameMenuButton {
    font-size: inherit;
    font-family: inherit;
}

#__UserName {
    font-size: inherit;
    font-family: "Roboto", sans-serif;
    font-weight: 400;
}

a {
    text-decoration: none;
}

.charts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.charts2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.charts-card {
    background-color: #ffffff;
    margin-bottom: 20px;
    padding: 25px;
    box-sizing: border-box;
    -webkit-column-break-inside: avoid;
    border: 1px solid #d2d2d3;
    border-radius: 5px;
    box-shadow: 0 6px 7px -4px rgba(0, 0, 0, 0.2);
}

.chart-title {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 600;
}

/* ---------- SCROLLBARS ---------- */

::-webkit-scrollbar {
    width: 5px;
    height: 6px;
}

::-webkit-scrollbar-track {
    box-shadow: inset 0 0 5px #a5aaad;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background-color: #4f35a1;
    border-radius: 10px;
}

    ::-webkit-scrollbar-thumb:hover {
        background-color: #a5aaad;
    }

/* ---------------------- MEDIA QUERIES ---------------------------*/
@media screen and (max-width: 992px){
    .grid-container {
        grid-template-columns: 1fr;
        grid-template-rows: 64px minmax(0, 1fr) 28px;
        grid-template-areas:
            "header"
            "main"
            "footer";
    }

    #sidebar{
        display: none;
        transform: translateX(-100%);
        opacity: 0;
    }
    
    #sidebar.sidebar-responsive {
        display: inline !important;
        transform: translateX(0) !important;
        opacity: 1 !important;
    }

    .menu-icon{
        display:inline;
    }

    .sidebar-title > span{
        display : inline;
    }
}


@media screen and (max-width: 768px) {
    .main-cards {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-bottom: 0;
    }

    .charts {
        grid-template-columns: 1fr;
        margin-top: 30px;
    }

    .main-cards2 {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-bottom: 0;
    }

    .charts2 {
        grid-template-columns: 1fr;
        margin-top: 30px;
    }
}


@media screen and (max-width: 576px) {

}
