/* Font Import - Assistant */
@import url('https://fonts.googleapis.com/css2?family=Assistant:wght@300;400;500;600;700&display=swap');

:root {
    /* Color Palette - Velvet Theme */
    --primary-color: #556ee6;
    --primary-gradient: linear-gradient(90deg, #667eea 0%, #764ba2 100%);

    --bg-body: #f8f8fb;
    --bg-card: #ffffff;

    /* Sidebar - Dark Navy */
    --bg-sidebar: #2a3042;
    --text-sidebar: #a6b0cf;
    --text-sidebar-active: #ffffff;
    --sidebar-width: 250px;
    --sidebar-collapsed-width: 70px;

    /* Header */
    --header-height: 70px;
    --header-bg: var(--primary-gradient);

    /* Common */
    --text-main: #495057;
    --text-muted: #74788d;
    --border-color: #eff2f7;
    --border-radius: 12px;
    --card-shadow: 0 0.75rem 1.5rem rgba(18, 38, 63, 0.03);

    /* Bootstrap Overrides */
    --bs-primary: var(--primary-color);
    --bs-body-bg: var(--bg-body);
    --bs-body-font-family: 'Assistant', sans-serif;
}



body {
    font-family: 'Assistant', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    overflow-x: hidden;
}

/* --- Layout --- */

/* Sidebar */
/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--bg-sidebar);
    z-index: 1002;
    transition: width 0.3s ease;
    /* overflow-y: auto;  <-- REMOVED to allow internal scrolling */
    overflow: hidden;
    /* Prevent global sidebar scroll */
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    display: flex;
    flex-direction: column;
}

/* ... existing code ... */

/* Make the nav scrollable */
/* Make the nav scrollable */
.sidebar .nav-pills {
    overflow-y: auto;
    overflow-x: hidden;
    flex-grow: 1;
    /* Takes up remaining space */
    flex-direction: column !important;
    /* Force vertical stacking */
    flex-wrap: nowrap !important;
    /* Prevent wrapping */
    display: flex !important;
    width: 100%;
    /* Ensure full width */
    padding-bottom: 20px;

    /* Scrollbar styling for webkit */
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.sidebar .nav-item {
    width: 100%;
    /* Force items to take full width */
}

.sidebar .nav-pills::-webkit-scrollbar {
    width: 4px;
}

.sidebar .nav-pills::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar .nav-pills::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
}

/* ... existing code ... */

/* Sidebar Footer - Modernized & Compact */
.sidebar-footer {
    flex-shrink: 0;
    /* padding: 10px 10px; */
    padding: 4px 10px 4px 10px !important;
    /* Reduced padding */
    /* background: linear-gradient(to bottom, rgba(32, 37, 54, 0.98), #1f2333); */
    /* background: linear-gradient(to bottom, rgba(32, 37, 54, 0.08), rgba(32, 37, 54, 0.08)); */
    background: rgba(51, 180, 68, 0.00) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    position: relative;
    z-index: 10;
    box-shadow: 0 -3px 10px rgba(0, 0, 0, 0.00) !important;
    border-width: 0 !important;
    /* box-shadow: 0 -3px 10px rgba(0, 0, 0, 0.15); */
    /* Softer shadow */
}

/* Modern wrapper for the content */
.sidebar-footer .dev-info-wrapper {
    /* background: rgba(255, 255, 255, 0.04); */
    background: rgb(89, 94, 99);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    /* Slightly smaller radius */
    padding: 8px 6px;
    /* Tighter padding */
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.sidebar-footer:hover .dev-info-wrapper {
    background: rgba(255, 255, 255, 0.07);
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.08);
}

.sidebar-footer .dev-info {
    display: flex;
    flex-direction: row;
    /* Horizontal layout by default for compactness */
    flex-wrap: wrap;
    /* Allow wrapping if needed */
    justify-content: center;
    align-items: center;
    gap: 6px;
    /* Smaller gap */
    position: relative;
    z-index: 2;
    line-height: 0.8;
}

.sidebar-footer .dev-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0px;
    color: var(--primary-color);
    font-weight: 700;
    opacity: 0.8;
}

.sidebar-footer .dev-name {
    font-size: 0.75rem;
    /* Smaller name */
    font-weight: 600;
    color: #e9ecef;
    margin: 0;
}

/* Separator between name and email */
.sidebar-footer .dev-separator {
    display: inline-block;
    width: 3px;
    height: 3px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    margin: 0 2px;
}

.sidebar-footer .dev-email {
    color: #8fa0b8;
    text-decoration: none;
    font-size: 0.7rem;
    /* Smaller email */
    font-family: monospace;
    opacity: 0.7;
    width: 100%;
    /* Force email to new line for cleanliness */
    margin-top: 2px;
}

.sidebar-footer .dev-email:hover {
    color: #fff;
    opacity: 1;
}

/* Decoration */
.sidebar-footer .dev-info-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(85, 110, 230, 0.15) 0%, transparent 70%);
    z-index: 1;
    pointer-events: none;
}


.dev-logo-vx {
    max-width: 180px;
    height: auto;
}

/* Collapsed State */
.sidebar.collapsed .sidebar-footer {
    padding: 15px 0;
    background: transparent;
    border-top: none;
    box-shadow: none;
}

.sidebar.collapsed .sidebar-footer .dev-info-wrapper {
    background: transparent;
    padding: 0;
    border: none;
    box-shadow: none;
}

.sidebar.collapsed .sidebar-footer .dev-label,
.sidebar.collapsed .sidebar-footer .dev-name,
.sidebar.collapsed .sidebar-footer .dev-email,
.sidebar.collapsed .sidebar-footer .dev-info-wrapper::before {
    display: none;
}

.sidebar.collapsed .sidebar-footer::before {
    content: '\f121';
    /* Code icon */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: #a6b0cf;
    font-size: 1.2rem;
    opacity: 0.5;
    transition: all 0.3s;
    display: block;
    padding: 10px 0;
}

.sidebar.collapsed .sidebar-footer:hover::before {
    opacity: 1;
    color: var(--primary-color);
    transform: scale(1.1);
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar .brand {
    /* height: var(--header-height)+100px; */
    height: 140px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    background-color: rgba(255, 255, 255, 0.05);
    /* Slight distinction */
    white-space: nowrap;
    overflow: hidden;
    min-height: 140px !important;
    perspective: 1000px;
    /* Enable 3D perspective */
}

.sidebar .brand .logo-text {
    margin-right: 10px;
    transition: opacity 0.3s;
}

.sidebar .brand .logo-img {
    max-height: 120px;
    width: auto;
    /* transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55), filter 0.3s; */
    /* PREVIOUS FLIP TRANSITION */
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.3s;
    /* BOUNCY TILT TRANSITION */
    transform-style: preserve-3d;
    /* filter: drop-shadow(0 0 0 rgba(0, 0, 0, 0)); */
}

/* PREVIOUS FLIP ANIMATION
.sidebar .brand:hover .logo-img {
    transform: rotateY(180deg) rotateZ(10deg) scale(1.15);
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.3));
}
*/

/* NEW PERSPECTIVE TILT EFFECT */
.sidebar .brand:hover .logo-img {
    transform: perspective(500px) rotateX(30deg) rotateY(-30deg) scale(0.95);
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.3));
}

.sidebar.collapsed .brand .logo-text {
    display: none;
    opacity: 0;
}

.sidebar.collapsed .brand .logo-img {
    max-height: 30px;
}

.sidebar .nav-link {
    color: var(--text-sidebar);
    padding: 12px 20px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    transition: all 0.2s;
    white-space: nowrap;
    border-right: 3px solid transparent;
}

.sidebar .nav-link:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.05);
}

.sidebar .nav-link.active {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
    border-right-color: var(--primary-color);
}

.sidebar .nav-link i {
    font-size: 1.1rem;
    min-width: 30px;
    /* Ensure icon alignment */
    text-align: center;
    margin-left: 10px;
}

.sidebar.collapsed .nav-link span {
    display: none;
}

.sidebar .text-uppercase {
    padding: 12px 20px;
    font-size: 11px;
    font-weight: 600;
    color: #6a7187;
    text-transform: uppercase;
    margin-top: 10px;
    letter-spacing: 0.05em;
}

.sidebar.collapsed .text-uppercase {
    display: none;
}

/* Top Header - Modern Glassmorphism */
.top-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    height: var(--header-height);
    /* background: rgba(255, 255, 255, 0.85); */
    background: rgba(218, 224, 233, 0.85);
    background-image: linear-gradient(to bottom right, #f3f2f5, #dbdbee);
    /* Slightly more opaque for better contrast */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    padding-right: calc(var(--sidebar-width) + 30px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}

.sidebar.collapsed+.main-content .top-header,
body.sidebar-collapsed .top-header {
    padding-right: calc(var(--sidebar-collapsed-width) + 30px);
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Sidebar Toggle */
#sidebarToggle {
    background: transparent;
    border: none;
    color: var(--text-muted);
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

#sidebarToggle:hover {
    background: rgba(var(--bs-primary-rgb), 0.1);
    color: var(--primary-color);
    transform: scale(1.05);
}

/* Header Action Buttons - Refined Modern */
.header-action-btn {
    position: relative;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    /* Circle shape */
    /* color: var(--text-muted); */
    color: rgb(75, 82, 126);
    background: transparent;
    border: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0 4px;
}

.header-action-btn:hover {
    background: rgba(var(--bs-primary-rgb), 0.08);
    /* Subtle tint */
    color: var(--primary-color);
    transform: translateY(-2px);
}

.header-action-btn i {
    font-size: 1.3rem;
    transition: transform 0.2s ease;
}

.header-action-btn:active {
    transform: scale(0.95);
}

/* Badges on Icons - Floating & Pulsing */
.header-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border: 2px solid #fff;
    z-index: 2;
    animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4);
    }

    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 6px rgba(220, 38, 38, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0);
    }
}

/* "New" Button - Modern Gradient */
.btn-new-glow {
    background: var(--primary-gradient);
    border: none;
    border-radius: 12px;
    height: 42px;
    padding: 0 24px;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: white !important;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 12px rgba(85, 110, 230, 0.25);
    transition: all 0.3s ease;
}

.btn-new-glow:hover {
    transform: translateY(-0px);
    box-shadow: 0 6px 15px rgba(85, 110, 230, 0.35);
    background: var(--primary-gradient) !important;
}

.btn-new-glow:active {
    transform: translateY(1px);
}

/* Main Content */
.main-content {
    margin-right: var(--sidebar-width);
    margin-top: var(--header-height);
    padding: 24px;
    padding-bottom: 60px;
    /* Space for sticky footer */
    min-height: calc(100vh - var(--header-height));
    transition: margin-right 0.3s ease;
}

.main-content.expanded {
    margin-right: var(--sidebar-collapsed-width);
}

/* Cards */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    margin-bottom: 24px;
    background-color: var(--bg-card);
}

.card-header {
    background: white;
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    border-radius: var(--border-radius) var(--border-radius) 0 0 !important;
}

/* User Profile Dropdown */
.user-profile-wrapper {
    margin-right: 15px;
    padding-right: 15px;
    border-right: 1px solid var(--border-color);
}

.top-header .dropdown-toggle {
    color: var(--text-main) !important;
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 50px;
    transition: all 0.2s;
    border: 1px solid #764ba2;
    /* background: rgba(118, 75, 162, 0.05); */
    /* background: rgba(118, 75, 162, 0.10); */
    background: rgb(255, 255, 255, 0.8);
}

.top-header .dropdown-newthing {
    color: var(--text-main) !important;
    text-decoration: none;
    display: flex;
    align-items: center !important;
    padding: 4px 8px;
    padding-left: 18px;
    border-radius: 50px;
    transition: all 0.2s;
    border: 0px solid #764ba2;
    /* background: rgba(118, 75, 162, 0.05); */
}


.top-header .dropdown-toggle:hover {
    background: rgba(118, 75, 162, 0.1);
    box-shadow: 0 4px 12px rgba(118, 75, 162, 0.15);
}

.top-header .user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    box-shadow: 0 2px 5px rgba(118, 75, 162, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.8);
    margin-left: 12px;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.1;
}

.user-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-main);
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Dropdown Menu Animation & Style */
.dropdown-menu {
    border: none;
    border-radius: 0.8rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    padding: 0.5rem;
    animation: dropdownFadeIn 0.2s ease;
    margin-top: 10px !important;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    padding: 0.6rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    transition: all 0.15s ease;
}

.dropdown-item i {
    width: 20px;
    text-align: center;
    margin-left: 10px;
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: color 0.15s;
}

.dropdown-item:hover {
    background-color: #f7f8f9;
    color: var(--primary-color);
}

.dropdown-item:hover i {
    color: var(--primary-color);
}

.dropdown-divider {
    margin: 0.5rem 0;
    border-color: #f0f2f5;
}

/* Buttons */
.btn {
    border-radius: 6px;
    font-weight: 500;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #485ec4;
    /* Darker shade */
    border-color: #485ec4;
}

/* General Styling Updates */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: #495057;
    font-weight: 600;
}

/* Login Page Styles */
body.login-page {
    background-image: url('../img/660108.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

body.login-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 0;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.3;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.5;
    }
}

/* Slow Shaking Animation for Logo */
@keyframes slowShake {

    0%,
    100% {
        transform: translateX(0) rotate(0deg);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-9px) rotate(-3deg);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(9px) rotate(3deg);
    }
}

.login-card {
    max-width: 420px;
    width: 100%;
    margin: 0 auto;
    padding: 2.5rem 2rem;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 1;
}

.login-header {
    text-align: center;
    margin-bottom: 1.8rem;
}

/* Modern Login Form Styles */
.login-page .form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.login-page .input-group-text {
    background-color: #f5f6f8;
    border: 1px solid #f5f6f8;
    color: #a6b0cf;
    padding-right: 1.2rem;
    padding-left: 0.8rem;
    transition: all 0.3s ease;
}

.login-page .form-control {
    background-color: #f5f6f8;
    border: 1px solid #f5f6f8;
    padding: 0.8rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    color: #495057;
    transition: all 0.3s ease;
}

.login-page .form-control:focus {
    background-color: #ffffff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(85, 110, 230, 0.1);
}

.login-page .input-group:focus-within .input-group-text {
    background-color: #ffffff;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.login-page .btn-primary {
    background: var(--primary-gradient);
    border: none;
    border-radius: 12px;
    padding: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(85, 110, 230, 0.3);
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.login-page .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(85, 110, 230, 0.4);
    background: var(--primary-gradient);
}

.logo-img-lg {
    max-width: 180px;
    height: auto;
    /* margin-bottom: 1rem; */
    margin-bottom: 0rem;
    transition: transform 0.3s ease;
    cursor: pointer;
    animation: slowShake 6s ease-in-out infinite;
}

.table th {
    font-weight: 600;
    color: var(--text-muted);
    color: white !important;
    background-color: #8c9bad;
    border-bottom: 1px solid var(--border-color);
    text-align: right !important;
}

/* Action Buttons */
.btn-action-icon {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.03);
    color: var(--text-muted);
    border-radius: 8px;
    transition: all 0.2s ease;
    border: none;
    margin: 0 4px;
}

.btn-action-icon:hover {
    transform: translateY(-2px);
}

.btn-action-icon.edit:hover {
    background-color: rgba(79, 70, 229, 0.1);
    color: var(--primary-color);
}

.btn-action-icon.delete:hover {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.btn-action-icon.view:hover {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--secondary-color);
}

/* Mobile */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-right: 0;
    }

    .top-header {
        padding-right: 24px;
        /* No offset on mobile */
    }
}

/* Sticky Footer */
.sticky-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    /* padding: 8px 20px; */
    padding: 2px !important;
    margin: 0 auto;
    text-align: center;
    color: var(--text-muted);
    /*background: rgba(255, 255, 255, 0.95);*/
    /*background: rgba(219, 225, 236, 0.95);*/
    background: rgba(149, 159, 179, 0.95);
    color: white !important;
    backdrop-filter: blur(10px);
    font-size: 0.80rem;
    z-index: 1000;
    /* box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05); */
    border-top: 1px solid var(--border-color);
}

/* Modern Blue Background for Forms */
.modal-form-bg {
    /*background-color: #f4f8fb !important;*/
    background-color: #e6eaee !important;
    /* Subtle modern light blue */
}

/* Ensure inputs stand out against the blue bg */
.modal-form-bg .form-control,
.modal-form-bg .form-select {
    background-color: #ffffff;
    border: 1px solid #dee2e6;
}

.modal-form-bg .form-control:focus,
.modal-form-bg .form-select:focus {
    background-color: #ffffff;
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
}

/* Delicate Status Badges - Updated to Stronger Pastels */
.status-badge {
    padding: 6px 12px;
    border-radius: 50px;
    /* Pill shape */
    font-size: 0.8em;
    font-weight: normal;
    /* "Normal not bold" as requested */
    letter-spacing: 0.03em;
    display: inline-block;
    color: inherit;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

/* Variant colors - Stronger Pastels (100 series) */
.status-badge.success {
    background-color: #d1fae5;
    /* Green 100 - Stronger */
    color: #059669;
    /* Green 600 */
    border-color: rgba(5, 150, 105, 0.1);
}

.status-badge.warning {
    background-color: #fef3c7;
    /* Amber 100 - Stronger */
    color: #d97706;
    /* Amber 600 */
    border-color: rgba(217, 119, 6, 0.1);
}

.status-badge.danger {
    background-color: #fee2e2;
    /* Red 100 - Stronger */
    color: #dc2626;
    /* Red 600 */
    border-color: rgba(220, 38, 38, 0.1);
}

.status-badge.info {
    background-color: #dbeafe;
    /* Blue 100 - Stronger */
    color: #2563eb;
    /* Blue 600 */
    border-color: rgba(37, 99, 235, 0.1);
}

.status-badge.secondary {
    background-color: #f3f4f6;
    /* Gray 100 */
    color: #4b5563;
    /* Gray 600 */
    border-color: rgba(75, 85, 99, 0.1);
}

.status-badge.primary {
    background-color: #e0e7ff;
    /* Indigo 100 */
    color: #4338ca;
    /* Indigo 700 */
    border-color: rgba(67, 56, 202, 0.1);
}

/* Modern Payment Badges */
.payment-badge {
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.75em;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.02em;
    transition: all 0.3s ease;
    background: white;
    border: 1px solid;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

.payment-badge::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: currentColor;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
}

.payment-badge.paid {
    border-color: rgba(16, 185, 129, 0.2);
    color: #047857;
    background: linear-gradient(to bottom right, #ecfdf5, #d1fae5);
}

.payment-badge.partially_paid {
    border-color: rgba(245, 158, 11, 0.2);
    color: #b45309;
    background: linear-gradient(to bottom right, #fffbeb, #fef3c7);
}

.payment-badge.pending {
    border-color: rgba(239, 68, 68, 0.2);
    color: #b91c1c;
    background: linear-gradient(to bottom right, #fef2f2, #fee2e2);
}

.payment-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}


.login-bgr-cl {
    /* Resetting overrides to allow new .login-card styles to take precedence */
    background-color: rgba(255, 255, 255, 0.95) !important;
    border: none;
    min-width: auto;
    width: 100%;
}


.eml-ttl-bnr {
    color: white;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 16px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    margin-top: auto;
}

.sidebar-footer .dev-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.sidebar-footer:hover .dev-info {
    opacity: 1;
}

.sidebar-footer .dev-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #a6b0cf;
}

.sidebar-footer .dev-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #e9ecef;
    margin: 2px 0;
}

.sidebar-footer .dev-email {
    color: #74788d;
    text-decoration: none;
    font-size: 0.75rem;
    transition: color 0.2s;
    font-family: monospace;
}

.sidebar-footer .dev-email:hover {
    color: #fff;
}

/* Hide complete info when collapsed and show icon instead */
.sidebar.collapsed .sidebar-footer {
    padding: 15px 0;
}

.sidebar.collapsed .sidebar-footer .dev-label,
.sidebar.collapsed .sidebar-footer .dev-name,
.sidebar.collapsed .sidebar-footer .dev-email {
    display: none;
}

.sidebar.collapsed .sidebar-footer::before {
    content: '\f121';
    /* Code icon from FontAwesome */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: #a6b0cf;
    font-size: 1.2rem;
    opacity: 0.7;
}

.sidebar.collapsed .sidebar-footer:hover::before {
    opacity: 1;
    color: #fff;
}

/* Sidebar Dev Logo Toggling */
/* Sidebar Dev Logo Toggling */
.dev-logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.logo-swap-wrapper {
    position: relative;
    display: inline-block;
    /* Wrap tightly around image */
    transition: transform 0.5s ease-in-out;
    cursor: pointer;
}

.logo-swap-wrapper:hover {
    transform: scale(1.1);
}

.logo-swap-wrapper .logo-primary {
    display: block;
    transition: opacity 0.5s ease-in-out;
    opacity: 1;
}

.logo-swap-wrapper .logo-secondary {
    position: absolute;
    top: 0;
    left: 0;
    width: 110%;
    /* max-width: 280px !important; */
    /* height: 230%; */
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.logo-swap-wrapper:hover .logo-primary {
    opacity: 0;
}

.logo-swap-wrapper:hover .logo-secondary {
    opacity: 1;
    /* transform: translateY(-60px); */
}

.dev-logo-container .logo-collapsed {
    display: none;
}

.sidebar.collapsed .logo-swap-wrapper {
    display: none;
}

.sidebar.collapsed .dev-logo-container .logo-collapsed {
    display: block !important;
    max-width: 100%;
    max-height: 36px;
    /* Ensure it fits */
}

/* Hide the default code icon in collapsed state since we have a custom image now */
.sidebar.collapsed .sidebar-footer::before {
    display: none !important;
}

/* Login Sticky Footer Image */
.login-footer-sticky {
    position: fixed;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    z-index: 1000;
    pointer-events: none;
}

.login-footer-sticky img {
    max-height: 60px;
    width: 190px;
    display: inline-block;
    opacity: 1;
    transition: transform 0.3s ease;
}

.login-footer-sticky img:hover {
    transform: scale(1.05);
}

/* Sidebar Collapsible Styles */
.sidebar .nav-link.group-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* color: var(--text-sidebar); */
    color: white;
    margin-top: 6px;
    margin-bottom: 2px;
    margin-left: 8px;
    /* background-color: rgba(30, 33, 71, 0.4); */
    /* background: linear-gradient(to right, red, blue, 0.4); */
    background: linear-gradient(to right, rgba(86, 96, 112, 0.6), rgba(59, 63, 78, 0.2));
}

.sidebar .nav-link.group-toggle:hover {
    color: white;
}

.sidebar .nav-link.group-toggle[aria-expanded="true"] {
    color: white;
    background-color: rgba(255, 255, 255, 0.05);
}

.sidebar .arrow-icon {
    transition: transform 0.3s ease;
    font-size: 0.8em;
}

.sidebar .nav-link.group-toggle[aria-expanded="true"] .arrow-icon {
    transform: rotate(-90deg);
}

.sidebar .collapse .nav-link {
    padding-right: 35px;
    /* Indent sub-items */
    font-size: 0.9rem;
    padding-top: 8px;
    padding-bottom: 8px;
}

.sidebar .collapse .nav-link i {
    font-size: 1rem;
    min-width: 25px;
}

.sidebar.collapsed .arrow-icon {
    display: none;
}


.wa_mdl_ttl {
    color: white
}


.wa_msg_ereav {
    background-color: #485ec4 !important;
}


.message_inbound {
    background-color: #485ec4 !important;
}


.modal-header {
    background-color: #485ec4 !important;
    color: white !important;
}


.modal-title {
    color: white !important;
}

/* Header New Dropdown Grid */
.dropdown-menu.dropdown-grid {
    width: 600px;
    padding: 15px;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.dropdown-grid-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.dropdown-grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px 10px;
    border-radius: 12px;
    text-decoration: none;
    color: #495057;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    text-align: center;
    height: 100%;
}

.dropdown-grid-item:hover {
    background-color: #f8f9fa;
    border-color: #dee2e6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.dropdown-grid-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    font-size: 1.4rem;
    transition: all 0.2s ease;
}

.dropdown-grid-item:hover .dropdown-grid-icon-wrapper {
    transform: scale(1.1);
}

/* Specific Colors for Icons */
.icon-bg-purple {
    background-color: #f3e8ff;
    color: #9333ea;
}

.icon-bg-blue {
    background-color: #e0f2fe;
    color: #0284c7;
}

.icon-bg-green {
    background-color: #dcfce7;
    color: #16a34a;
}

.icon-bg-orange {
    background-color: #ffedd5;
    color: #ea580c;
}

.icon-bg-red {
    background-color: #fee2e2;
    color: #dc2626;
}

.icon-bg-cyan {
    background-color: #cffafe;
    color: #0891b2;
}

.icon-bg-indigo {
    background-color: #e0e7ff;
    color: #4f46e5;
}

.icon-bg-yellow {
    background-color: #fef9c3;
    color: #ca8a04;
}

.dropdown-grid-label {
    font-size: 0.9rem;
    font-weight: 600;
}

/* Dark mode tweaks if needed */
body.dark-mode .dropdown-menu.dropdown-grid {
    background-color: #2d3748;
    border-color: #4a5568;
}

body.dark-mode .dropdown-grid-item {
    color: #e2e8f0;
}

body.dark-mode .dropdown-grid-item:hover {
    background-color: #4a5568;
    border-color: #718096;
}


.drpd-usr-vt {
    border-color: rebeccapurple !important;
    border-width: 2px !important;
}

/* --- Modern SweetAlert2 Overrides --- */

div.swal2-popup {
    border-radius: 16px !important;
    padding: 1.5rem !important;
    width: 26em !important;
    max-width: 90vw !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
    font-family: 'Assistant', sans-serif !important;
}

h2.swal2-title {
    font-size: 1.3rem !important;
    font-weight: 700 !important;
    color: var(--text-main) !important;
    margin: 0 0 0.4rem 0 !important;
    padding: 0 !important;
}

div.swal2-html-container {
    font-size: 0.95rem !important;
    color: var(--text-muted) !important;
    margin: 0.4rem 0 1.2rem 0 !important;
    line-height: 1.5 !important;
}

div.swal2-actions {
    margin: 0.5rem 0 0 0 !important;
    gap: 12px !important;
    width: 100%;
    justify-content: center !important;
}

button.swal2-styled {
    border-radius: 8px !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    padding: 8px 24px !important;
    margin: 0 !important;
    box-shadow: none !important;
    background-image: none !important;
    transition: all 0.2s ease !important;
}

button.swal2-confirm {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.3) !important;
}

button.swal2-confirm:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4) !important;
}

/* Fix icon size for compact look */
div.swal2-icon {
    width: 3.5em !important;
    height: 3.5em !important;
    margin: 0.5em auto 0.8em auto !important;
    border-width: 3px !important;
}

div.swal2-icon .swal2-icon-content {
    font-size: 2em !important;
}


.btn-aft-scn {
    background-color: #bfdbd7;
    color: #0d1631;
    border-width: 0px;
}

/* Purchase Orders Table - Limit Supplier Column Width */
#purchaseOrdersTable td:nth-child(3),
#purchaseOrdersTable th:nth-child(3) {
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}