
:root {
    --bs-primary: #4949ee;
    --bs-primary-rgb: 73, 73, 238;
    --bs-link-hover-color: #4949ee;
    --bs-warning: #4949ee;
    --bs-warning-rgb: 73, 73, 238;
    --bs-yellow: #4949ee;
}

/* Force theme accent away from default yellow */
.sidebar-menu .sidebar-link.active {
    background: linear-gradient(135deg, #4949ee 0%, #3b3bd4 100%) !important;
}

.gradient-warning,
.gradient-yellow,
.text-warning,
.text-yellow,
.link-warning {
    color: #4949ee !important;
}

.bg-warning,
.bg-yellow,
.bg-hover-warning:hover,
.bg-hover-yellow:hover {
    background-color: #4949ee !important;
    background: #4949ee !important;
}

/* Buttons: override base theme yellow variants */
.btn-primary,
.btn-warning {
    --bs-btn-color: #fff;
    --bs-btn-bg: #4949ee;
    --bs-btn-border-color: #4949ee;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #3b3bd4;
    --bs-btn-hover-border-color: #3b3bd4;
    --bs-btn-focus-shadow-rgb: 73, 73, 238;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #2f2fb9;
    --bs-btn-active-border-color: #2f2fb9;
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: #4949ee;
    --bs-btn-disabled-border-color: #4949ee;
}

.btn-outline-primary,
.btn-outline-warning {
    --bs-btn-color: #4949ee;
    --bs-btn-border-color: #4949ee;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #4949ee;
    --bs-btn-hover-border-color: #4949ee;
    --bs-btn-focus-shadow-rgb: 73, 73, 238;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #3b3bd4;
    --bs-btn-active-border-color: #3b3bd4;
    --bs-btn-disabled-color: #4949ee;
    --bs-btn-disabled-bg: transparent;
    --bs-btn-disabled-border-color: #4949ee;
}

.list-group-item {
    font-size: 12px !important;
}

.error {
    font-size: 0.85rem !important;
}

/* The snackbar - position it at the bottom and in the middle of the screen */
#snackbar {
    visibility: hidden; /* Hidden by default. Visible on click */
    min-width: 250px; /* Set a default minimum width */
    margin-left: -125px; /* Divide value of min-width by 2 */
    background-color: #333; /* Black background color */
    color: #fff; /* White text color */
    text-align: center; /* Centered text */
    border-radius: 2px; /* Rounded borders */
    padding: 16px; /* Padding */
    position: fixed; /* Sit on top of the screen */
    z-index: 10000; /* Add a z-index if needed */
    left: 50%; /* Center the snackbar */
    bottom: 30px; /* 30px from the bottom */
}

/* Show the snackbar when clicking on a button (class added with JavaScript) */
#snackbar.show {
    visibility: visible; /* Show the snackbar */
    /* Add animation: Take 0.5 seconds to fade in and out the snackbar.
    However, delay the fade out process for 2.5 seconds */
    -webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s;
    animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

/* Animations to fade the snackbar in and out */
@-webkit-keyframes fadein {
    from {
        bottom: 0;
        opacity: 0;
    }
    to {
        bottom: 30px;
        opacity: 1;
    }
}

@keyframes fadein {
    from {
        bottom: 0;
        opacity: 0;
    }
    to {
        bottom: 30px;
        opacity: 1;
    }
}

@-webkit-keyframes fadeout {
    from {
        bottom: 30px;
        opacity: 1;
    }
    to {
        bottom: 0;
        opacity: 0;
    }
}

@keyframes fadeout {
    from {
        bottom: 30px;
        opacity: 1;
    }
    to {
        bottom: 0;
        opacity: 0;
    }
}

.alert {
    min-width: 400px;
    position: fixed;
    right: 10px;
    top: 77px;
    z-index: 1000;
}

.img-fluid {
    width: 35px !important;
    height: auto;
    margin-right: 8px;
}

.card {
    border-radius: 15px !important;
    padding: 9px;
    box-shadow: 0px 0 30px rgb(1 41 112 / 10%);
}

.border-left-danger {
    border-left: 3px solid var(--bs-danger);
}

.border-right-danger {
    border-right: 3px solid var(--bs-danger);
}

/*.spinner {*/
/*    z-index: 10000;*/
/*    position: fixed;*/
/*    left: 50%;*/
/*    top: 50%;*/
/*    height: 60px;*/
/*    width: 60px;*/
/*    margin: 0px auto;*/
/*    -webkit-animation: rotation .6s infinite linear;*/
/*    -moz-animation: rotation .6s infinite linear;*/
/*    -o-animation: rotation .6s infinite linear;*/
/*    animation: rotation .6s infinite linear;*/
/*    border-left: 6px solid rgba(0, 174, 239, .15);*/
/*    border-right: 6px solid rgba(0, 174, 239, .15);*/
/*    border-bottom: 6px solid rgba(0, 174, 239, .15);*/
/*    border-top: 6px solid rgb(239, 0, 0);;*/
/*    border-radius: 100%;*/
/*}*/

/*@-webkit-keyframes rotation {*/
/*    from {*/
/*        -webkit-transform: rotate(0deg);*/
/*    }*/
/*    to {*/
/*        -webkit-transform: rotate(359deg);*/
/*    }*/
/*}*/

/*@-moz-keyframes rotation {*/
/*    from {*/
/*        -moz-transform: rotate(0deg);*/
/*    }*/
/*    to {*/
/*        -moz-transform: rotate(359deg);*/
/*    }*/
/*}*/

/*@-o-keyframes rotation {*/
/*    from {*/
/*        -o-transform: rotate(0deg);*/
/*    }*/
/*    to {*/
/*        -o-transform: rotate(359deg);*/
/*    }*/
/*}*/

/*@keyframes rotation {*/
/*    from {*/
/*        transform: rotate(0deg);*/
/*    }*/
/*    to {*/
/*        transform: rotate(359deg);*/
/*    }*/
/*}*/
.table {
    font-size: 12px !important;
}

.text11 {
    font-size: 11px !important;
}

.text12 {
    font-size: 12px !important;
}

.text13 {
    font-size: 13px !important;
}

.text14 {
    font-size: 14px !important;
}

.table-header {
    background-color: #1a1a1a;
    color: #4949ee;
    font-weight: bold;
}

.sticky thead.sticky-header {
    background-color: #f5f5f5;
    position: fixed;
    top: 0;
    z-index: 1;
}

.theme-text {
    color: #4949ee !important;
}

.theme-background {
    background-color: #4949ee !important;
}

.state-card {
    background: #f4f4f4;
}

.folder-icon {
    font-size: 20px !important;
}

.page-breadcrumb {
    margin-bottom: 0.25rem !important;
}

.breadcrumb {
    margin-bottom: 0 !important;
}

.page-header {
    margin-bottom: 1.5rem !important;
}

/* App shell: sidebar + main — .page-holder uses width:100% which breaks a flex row */
.app-main-row > .sidebar {
    flex-shrink: 0;
}

.app-main-row > .app-page-main.page-holder {
    flex: 1 1 0%;
    min-width: 0;
    width: auto;
}

.app-main-row {
    min-height: calc(100vh - 72px);
}

/* Font Awesome in sidebar: theme shrink rules target svg; mirror for .fas */
.sidebar.shrink .sidebar-link .sidebar-link-icon,
.sidebar.shrink .sidebar-link i.fas {
    margin-right: 0 !important;
}

@media (max-width: 1199.98px) {
    .sidebar .sidebar-link .sidebar-link-icon,
    .sidebar .sidebar-link i.fas {
        margin-right: 0 !important;
    }
}

/* Sidebar: submenu chevron */
.sidebar-chevron {
    transition: transform 0.3s ease;
    margin-left: auto;
}

[aria-expanded="true"] .sidebar-chevron {
    transform: rotate(180deg);
}

/* Sidebar link title: one line with ellipsis */
.sidebar-link-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 1;
}

/* EasyPro style sidebar */
.easypro-sidebar {
    width: 17rem;
    background: #f8f9fa;
    border-right: 1px solid #dfe3e8;
    box-shadow: 6px 0 16px rgba(15, 23, 42, 0.06);
    height: calc(100vh - 72px);
    position: sticky;
    top: 72px;
    overflow-y: auto;
    overflow-x: hidden;
}

.easypro-sidebar .sidebar-menu {
    padding: 1rem 0.75rem;
}

.easypro-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0.25rem 0.4rem 1.1rem;
    padding: 0.75rem 0.65rem;
    border: 1px solid rgba(73, 73, 238, 0.25);
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(73, 73, 238, 0.1), rgba(73, 73, 238, 0.02));
}

.easypro-brand-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1b1b1b;
    background: #4949ee;
    box-shadow: 0 6px 14px rgba(73, 73, 238, 0.28);
}

.easypro-brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.easypro-brand-title {
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.1;
    color: #111827;
    letter-spacing: 0.3px;
}

.easypro-brand-subtitle {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
}

.easypro-sidebar .sidebar-heading {
    padding: 0 0.7rem;
    margin-bottom: 0.45rem;
    font-size: 0.66rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.easypro-sidebar .sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0.22rem 0.4rem;
    border-radius: 10px;
    padding: 0.58rem 0.68rem;
    color: #111827;
    transition: all 0.2s ease;
}

.easypro-sidebar .sidebar-link i.fas {
    color: #111827;
}

.easypro-sidebar .sidebar-link .sidebar-link-title {
    color: inherit;
    font-weight: 500;
    letter-spacing: 0.15px;
}

.easypro-sidebar .sidebar-link:hover {
    color: #111827;
    background-color: rgba(73, 73, 238, 0.14);
    transform: translateX(3px);
}

.easypro-sidebar .sidebar-link.active {
    color: #111827;
    background: linear-gradient(130deg, #8f8ff5 0%, #d8d8fd 100%);
    box-shadow: 0 6px 14px rgba(73, 73, 238, 0.2);
}

.easypro-sidebar .sidebar-link.active i.fas {
    color: #111827;
}

.sidebar.shrink.easypro-sidebar {
    width: 5.75rem;
}

.sidebar.shrink.easypro-sidebar .easypro-brand-text,
.sidebar.shrink.easypro-sidebar .sidebar-heading {
    display: none;
}

.sidebar.shrink.easypro-sidebar .easypro-sidebar-brand {
    justify-content: center;
    padding: 0.55rem;
}

.sidebar.shrink.easypro-sidebar .easypro-brand-icon {
    margin: 0;
}

.sidebar.shrink.easypro-sidebar .sidebar-link {
    display: flex;
    justify-content: center;
    gap: 0;
    margin: 0.2rem;
    padding: 0.58rem 0.3rem;
}

.sidebar.shrink.easypro-sidebar .sidebar-link .sidebar-link-title {
    display: none;
}

.sidebar.shrink.easypro-sidebar .sidebar-link i.fas {
    margin-right: 0 !important;
}

@media (max-width: 1199.98px) {
    .easypro-sidebar {
        position: fixed;
        top: 72px;
        left: 0;
        height: calc(100vh - 72px);
        width: 17rem;
        margin-left: 0;
        transform: translateX(-100%);
        transition: transform 0.28s ease;
        z-index: 1045;
        text-align: left;
    }

    .easypro-sidebar.show {
        transform: translateX(0);
    }

    .easypro-sidebar .sidebar-menu {
        height: 100%;
        padding-top: 1rem;
    }

    .easypro-sidebar .sidebar-link {
        margin: 0.22rem 0.4rem;
        padding: 0.58rem 0.68rem;
    }

    .easypro-sidebar .sidebar-link .sidebar-link-title {
        display: inline-block;
        font-size: 0.82rem;
    }

    .easypro-sidebar .easypro-brand-text,
    .easypro-sidebar .sidebar-heading {
        display: block;
        text-align: left;
    }

    .app-main-row > .app-page-main.page-holder {
        width: 100%;
    }
}

@media (max-width: 575.98px) {
    .easypro-sidebar {
        width: 15.5rem;
    }
}

/* Contract Page Animations */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.pulse-animation {
    animation: pulse 2s infinite;
}

.contract-icon {
    transition: all 0.3s ease;
}

.contract-icon:hover {
    transform: rotate(360deg) scale(1.2);
}

.btn-animated {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-animated::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-animated:hover::before {
    width: 300px;
    height: 300px;
}

.table-row-animated {
    transition: all 0.3s ease;
}

.table-row-animated:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(73, 73, 238, 0.2);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #4949ee;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1a1a1a;
}

/* Card Header - Reduced Padding */
.card-header {
    padding: 1rem 1.5rem !important;
}

/* Transparent Card */
.card-transparent {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

.card-transparent .card-header {
    background: transparent !important;
    box-shadow: none !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
}

.card-transparent .card-body {
    background: transparent !important;
}

/* Custom btn-sm - Make buttons smaller */
.btn-sm {
    padding: 0.2rem 0.5rem !important;
    font-size: 0.8rem !important;
    line-height: 2 !important;
    border-radius: 0.25rem !important;
}

.btn-sm i {
    font-size: 0.7rem !important;
    margin-right: 0.2rem;
}

.btn-sm .fa,
.btn-sm .fas,
.btn-sm .far,
.btn-sm .fal {
    font-size: 0.7rem !important;
}

/* Responsive Table Improvements */
.table-responsive {
    position: relative;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
}

.table-responsive table {
    width: 100%;
    margin-bottom: 0;
}

/* Better table responsiveness on mobile */
@media (max-width: 768px) {
    .table-responsive {
        border: 1px solid #dee2e6;
    }
    
    .table-responsive table {
        font-size: 0.8rem;
    }
    
    .table-responsive th,
    .table-responsive td {
        padding: 0.5rem 0.4rem;
        white-space: nowrap;
    }
    
    .table-responsive .btn-group {
        flex-direction: column;
    }
    
    .table-responsive .btn-group .btn {
        margin-bottom: 2px;
    }
}

@media (max-width: 576px) {
    .table-responsive table {
        font-size: 0.75rem;
    }
    
    .table-responsive th,
    .table-responsive td {
        padding: 0.4rem 0.3rem;
    }
    
    .table-responsive .badge {
        font-size: 0.65rem;
        padding: 0.15em 0.35em;
    }
}

/* Notification Styles */
.notification-dropdown {
    max-height: 500px;
    overflow-y: auto;
}

.notification-item {
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

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

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

.notification-item.bg-light {
    background-color: #f8f9fa !important;
}

.notification-badge-count {
    font-size: 0.65rem;
    padding: 0.25em 0.5em;
    min-width: 18px;
    text-align: center;
}

#notificationDropdown {
    position: relative;
}

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

.notification-list::-webkit-scrollbar {
    width: 6px;
}

.notification-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.notification-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

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

/* Floating Filter Button - Common styles for all dashboards */
.floating-filter-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1050;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4949ee 0%, #3b3bd4 100%);
    color: #fff;
    border: none;
    box-shadow: 0 4px 15px rgba(73, 73, 238, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.floating-filter-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(73, 73, 238, 0.7);
    background: linear-gradient(135deg, #3b3bd4 0%, #2f2fb9 100%);
}

.floating-filter-btn:active {
    transform: translateY(-1px) scale(0.98);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .floating-filter-btn {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
        font-size: 18px;
    }
}

/* Cursor utility for attachment cards */
.attachment-card.cursor-pointer {
    cursor: pointer;
}