/* ============================================
   IMS SkillPTP - Unified Master CSS File
   Responsive Design with Bootstrap Integration
   All styles consolidated - Single source of truth
   ============================================ */

/* ============================================
   1. BASE STYLES & RESET
   ============================================ */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(99, 102, 241, 0.5) #f8fafc;
}

/* Mobile Sidebar Toggle Styles */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
        width: 260px;
        /* Slightly narrower on mobile if desired */
    }

    .sidebar-open .sidebar {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.1);
    }

    .content-wrapper {
        margin-left: 0 !important;
        width: 100% !important;
    }

    .sidebar-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(15, 23, 42, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
        backdrop-filter: blur(2px);
    }

    .sidebar-open .sidebar-backdrop {
        opacity: 1;
        visibility: visible;
    }

    /* Adjust header padding for the toggle button */
    .topbar {
        padding-left: 16px;
    }
}

/* Desktop Sidebar Collapse Styles */
@media (min-width: 992px) {
    .sidebar {
        transition: width 0.3s ease-in-out;
        z-index: 1000;
        width: 280px;
        /* Default width */
        overflow-x: hidden;
    }

    .content-wrapper {
        transition: margin-left 0.3s ease-in-out;
        margin-left: 280px;
        /* Default margin */
    }

    /* Collapsed State */
    .sidebar-collapsed .sidebar {
        width: 80px;
    }

    .sidebar-collapsed .content-wrapper {
        margin-left: 80px;
    }

    /* Hide text labels in collapsed state */
    /* Hide text labels in collapsed state */
    .sidebar-collapsed .sidebar .sidebar-link span:not(.sidebar-link-icon),
    .sidebar-collapsed .sidebar .sidebar-section-toggle span span:not(.sidebar-link-icon),
    .sidebar-collapsed .sidebar .sidebar-section-toggle-icon {
        opacity: 0;
        visibility: hidden;
        width: 0;
        display: none;
    }

    /* Logo Toggle Logic */
    /* Hide full logo logic */
    .sidebar-collapsed .sidebar .brand-image-xs.logo-xl {
        display: none;
    }

    /* Show favicon logic */
    .sidebar-collapsed .sidebar .brand-image-xl.logo-xs {
        display: block !important;
        position: static !important;
        /* Override inline absolute */
        transform: none !important;
        /* Override inline transform */
        width: 32px;
        height: auto;
    }

    /* Center icons in collapsed state */
    .sidebar-collapsed .sidebar .sidebar-link,
    .sidebar-collapsed .sidebar .sidebar-section-toggle {
        justify-content: center;
        padding-left: 0;
        padding-right: 0;
    }

    .sidebar-collapsed .sidebar .sidebar-link-icon {
        margin-right: 0;
    }

    .sidebar-collapsed .sidebar .brand-link {
        display: flex;
        justify-content: center;
        height: 60px;
        align-items: center;
    }

    .sidebar-collapsed .sidebar .brand-image-xs {
        left: 50% !important;
        transform: translateX(-50%);
        top: auto !important;
    }

    /* Hover Expansion */
    .sidebar-collapsed .sidebar:hover {
        width: 280px;
    }

    /* Restore text on hover */
    .sidebar-collapsed .sidebar:hover .sidebar-link span:not(.sidebar-link-icon),
    .sidebar-collapsed .sidebar:hover .sidebar-section-toggle span span:not(.sidebar-link-icon),
    .sidebar-collapsed .sidebar:hover .sidebar-section-toggle-icon {
        opacity: 1;
        visibility: visible;
        width: auto;
        display: inline-block;
        transition: opacity 0.2s ease-in-out 0.1s;
    }

    /* Restore logo on hover */
    .sidebar-collapsed .sidebar:hover .brand-image-xs.logo-xl {
        display: block;
    }

    .sidebar-collapsed .sidebar:hover .brand-image-xl.logo-xs {
        display: none !important;
    }

    .sidebar-collapsed .sidebar:hover .brand-link .logo-xl:not(.brand-image-xs) {
        opacity: 1;
        visibility: visible;
        display: block;
    }

    /* Reset justification on hover */
    .sidebar-collapsed .sidebar:hover .sidebar-link,
    .sidebar-collapsed .sidebar:hover .sidebar-section-toggle {
        justify-content: flex-start;
        padding-left: 16px;
        padding-right: 16px;
    }

    .sidebar-collapsed .sidebar:hover .logo-switch {
        display: flex;
    }

    .sidebar-collapsed .sidebar:hover .brand-image-xs {
        left: 18px !important;
        transform: none;
        top: 12px !important;
    }
}



html {
    scroll-behavior: smooth;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    overflow-x: hidden;
    overflow-y: auto;
    transition: opacity 0.3s ease-in-out;
}

/* ============================================
   2. SCROLLBAR STYLES
   ============================================ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.5) 0%, rgba(139, 92, 246, 0.5) 50%, rgba(168, 85, 247, 0.5) 100%);
    border-radius: 10px;
    transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.8) 0%, rgba(139, 92, 246, 0.8) 50%, rgba(168, 85, 247, 0.8) 100%);
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.4) 0%, rgba(139, 92, 246, 0.4) 50%, rgba(168, 85, 247, 0.4) 100%);
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.7) 0%, rgba(139, 92, 246, 0.7) 50%, rgba(168, 85, 247, 0.7) 100%);
}

/* ============================================
   3. APP LAYOUT & STRUCTURE
   ============================================ */
.app-body {
    min-height: 100vh;
    background: #f3f4ff;
}

.app-shell {
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
}

.content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: 100%;
    margin-left: 280px;
    overflow-x: hidden;
    animation: pageFadeIn 0.4s ease-in-out;
    opacity: 1;
}

.content-inner {
    width: 100%;
    padding: 24px 32px 40px;
}

@keyframes pageFadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   4. SIDEBAR STYLES
   ============================================ */
.sidebar {
    width: 280px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-right: 1px solid rgba(226, 232, 240, 0.8);
    display: flex;
    flex-direction: column;
    padding: 24px 0;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.02);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1000;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}

/* .sidebar-logo-circle {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 700;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    line-height: 1;
}

.sidebar-logo-circle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
} */

.sidebar-logo {
    border-bottom: 1px dashed #ececec;
    padding-bottom: 15px;
    margin-bottom: 10px;
}

.brand-link {
    width: 100%;
    text-align: center;
}

.brand-link img {
    width: 80%;
}



.brand-link .brand-image-xl {
    line-height: .8;
    max-height: 40px;
    width: auto;
}

.brand-link .brand-image-xl.single {
    margin-top: -.3rem;
}

.logo-xl {
    opacity: 1;
    position: absolute;
    visibility: visible;
}

.logo-xl.brand-image-xs {
    left: 18px;
    top: 12px;
}

.logo-xl.brand-image-xl {
    left: 12px;
    top: 6px;
}

.sidebar-title {
    font-size: 19px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.01em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 12px;
}

.sidebar-section-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 16px;
    margin-top: 4px;
    border: none;
    background: transparent;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.2s ease;
    position: relative;
}

.sidebar-section-toggle span {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.sidebar-section-toggle:hover {
    background: rgba(99, 102, 241, 0.06);
    color: #4f46e5;
}

.sidebar-section-toggle:active {
    transform: scale(0.98);
}

.sidebar-section-toggle.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(139, 92, 246, 0.08));
    color: #4f46e5;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.15);
}

.sidebar-section-toggle.active .sidebar-link-icon,
.sidebar-section-toggle.active .sidebar-section-toggle-icon {
    color: #6366f1;
}

.sidebar-section-toggle-icon {
    font-size: 12px;
    transition: transform 0.3s ease;
    color: #94a3b8;
}

.sidebar-section-toggle[aria-expanded="true"] .sidebar-section-toggle-icon {
    transform: rotate(180deg);
    color: #6366f1;
}

.sidebar-subnav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-left: 8px;
    margin-top: 4px;
    margin-bottom: 8px;
    padding-left: 8px;
    border-left: 2px solid rgba(226, 232, 240, 0.5);
    transition: all 0.3s ease;
}

.sidebar-subnav.collapsed {
    display: none;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    border-radius: 10px;
    color: #334155;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    position: relative;
    margin-left: 4px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.sidebar-link::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: linear-gradient(180deg, #6366f1, #8b5cf6);
    border-radius: 0 3px 3px 0;
    transition: height 0.2s ease;
}

.sidebar-link:hover {
    background: rgba(99, 102, 241, 0.08);
    color: #4f46e5;
    transform: translateX(2px);
    font-weight: 600;
}

.sidebar-link:hover::before {
    height: 60%;
}

.sidebar-link.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(139, 92, 246, 0.08));
    color: #4f46e5;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.15);
}

.sidebar-link.active::before {
    height: 70%;
    background: linear-gradient(180deg, #6366f1, #8b5cf6);
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.4);
}

.sidebar-link-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    transition: transform 0.2s ease, color 0.2s ease;
}

.sidebar-link:hover .sidebar-link-icon,
.sidebar-link.active .sidebar-link-icon {
    transform: scale(1.1);
    color: #6366f1;
}

/* ============================================
   5. TOPBAR & HEADER
   ============================================ */
.topbar {
    height: 64px;
    background: #ffffff;
    border-bottom: 1px solid rgba(148, 163, 184, 0.35);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

.page-title {
    font-size: 26px;
    font-weight: 600;
    color: #4338ca;
}

.breadcrumb-bar {
    font-size: 12px;
    color: #9ca3af;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.breadcrumb-link {
    color: #6366f1;
    text-decoration: none;
}

.breadcrumb-link:hover {
    text-decoration: underline;
}

.breadcrumb-current {
    color: #6b7280;
}

/* ============================================
   6. LOGIN PAGE STYLES
   ============================================ */
.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6a5af9, #8f73ff, #af7bff);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.login-wrapper {
    width: 100%;
    max-width: 520px;
    padding: 24px;
}

.login-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    max-width: 520px;
    width: 100%;
    padding: 0;
    text-align: center;
    animation: slideUp 0.5s ease-out;
    position: relative;
    z-index: 1;
    color: white;
}

.login-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    padding: 40px 30px 32px;
    text-align: center;
}

.login-icon,
.login-avatar {
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: #6366f1;
}

.login-avatar {
    background: linear-gradient(135deg, rgba(129, 140, 248, 0.15), rgba(236, 72, 153, 0.2));
}

.login-icon svg,
.login-avatar svg {
    width: 34px;
    height: 34px;
    color: #ffffff;
}

.login-title {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
    color: #ffffff;
}

.login-subtitle {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 5px;
    color: #ffffff;
}

.login-body-section {
    padding: 32px 30px 36px;
}

.form-group {
    text-align: left;
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #4b5563;
    margin-bottom: 6px;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}

.form-input {
    width: 100%;
    padding: 11px 14px 11px 40px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background-color: #f9fafb;
    font-size: 14px;
    color: #111827;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.form-input::placeholder {
    color: #9ca3af;
}

.form-input:focus {
    border-color: #6366f1;
    background-color: #ffffff;
    box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.25), 0 10px 25px rgba(15, 23, 42, 0.18);
}

.form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    margin-top: 4px;
}

.remember-me {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #4b5563;
    cursor: pointer;
}

.remember-me input {
    width: 14px;
    height: 14px;
    accent-color: #6366f1;
}

.forgot-link {
    font-size: 13px;
    color: #6366f1;
    text-decoration: none;
}

.forgot-link:hover {
    text-decoration: underline;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    color: #9ca3af;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: #6366f1;
}

.input-group-login .form-control {
    border-radius: 10px;
    border-color: #d1d5db;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.input-group-login .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    z-index: 3;
}

.input-group-login .input-group-text:first-child {
    border-radius: 10px 0 0 10px;
    border-right: 0;
    background-color: #ffffff;
    border-color: #d1d5db;
}

.input-group-login .password-toggle {
    border-radius: 0 10px 10px 0 !important;
    border-left: 0 !important;
    border-color: #d1d5db;
}

.btn-login {
    width: 100%;
    border-radius: 999px;
    padding: 11px 16px;
    font-size: 15px;
    font-weight: 600;
    color: #f9fafb;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    box-shadow: 0 14px 30px rgba(79, 70, 229, 0.55), 0 0 0 1px rgba(129, 140, 248, 0.45);
    border: none;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.btn-login:hover {
    filter: brightness(1.02);
    transform: translateY(-1px);
    box-shadow: 0 18px 42px rgba(79, 70, 229, 0.7), 0 0 0 1px rgba(129, 140, 248, 0.55);
}

.btn-login:active {
    transform: translateY(0);
    box-shadow: 0 10px 24px rgba(79, 70, 229, 0.55), 0 0 0 1px rgba(129, 140, 248, 0.55);
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ============================================
   7. BUTTONS & FORM CONTROLS
   ============================================ */
.btn {
    transition: all 0.2s ease-in-out;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    border-radius: 999px;
    font-weight: 600;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    box-shadow: 0 12px 28px rgba(102, 126, 234, 0.5);
}

.btn-outline-primary.btn-icon,
.btn-outline-danger.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.btn-outline-primary.btn-icon:hover,
.btn-outline-danger.btn-icon:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.form-control,
.form-select {
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

/* ============================================
   8. CARDS & COMPONENTS
   ============================================ */
.card {
    transition: box-shadow 0.2s ease-in-out, transform 0.2s ease-in-out;
}

.card:hover {
    transform: translateY(-2px);
}

.table-card {
    border-radius: 22px;
    overflow: hidden;
}

.stat-row {
    margin-top: 24px;
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 320px));
    gap: 20px;
}

.stat-card {
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
    padding: 18px 22px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
}

.stat-icon-purple {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.stat-icon-pink {
    background: linear-gradient(135deg, #f97373, #ec4899);
}

.stat-label {
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.stat-value {
    font-size: 26px;
    font-weight: 700;
    color: #1f2937;
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
}

.chip-success {
    background: #ecfdf3;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

/* ============================================
   9. TABLES
   ============================================ */
.table tbody tr {
    transition: background-color 0.2s ease-in-out;
}

.table-company {
    --row-hover: #f9fafb;
}

.table-company thead tr {
    background: #f9fafb;
}

.table-company thead th {
    border-bottom: 1px solid #e5e7eb;
    font-weight: 600;
    letter-spacing: 0.06em;
}

.table-company tbody tr:hover {
    background-color: var(--row-hover);
}

.table-company tbody tr:not(:last-child) td {
    border-bottom: 1px solid #f1f5f9;
}

.table-wrapper.smtp-table-wrapper {
    width: 100%;
    position: relative;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
}

.table-wrapper.smtp-table-wrapper table {
    min-width: 1200px;
    margin-bottom: 0;
}

.table-wrapper.smtp-table-wrapper th,
.table-wrapper.smtp-table-wrapper td {
    white-space: nowrap;
}

.table-wrapper.smtp-table-wrapper tbody tr {
    height: auto;
}

.table-wrapper.smtp-table-wrapper tbody td {
    padding: 16px 12px;
    vertical-align: middle;
}

.table-wrapper.smtp-table-wrapper thead th {
    padding: 14px 12px;
}

.table-wrapper.smtp-table-wrapper .sticky-header {
    position: sticky;
    top: 0;
    background: #f8f9fa;
    z-index: 2;
}

.table-wrapper.smtp-table-wrapper .sticky-col-end {
    position: sticky;
    right: 0;
    background: #ffffff;
    z-index: 3;
    box-shadow: -4px 0 6px rgba(0, 0, 0, 0.05);
}

.table-action-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #4b5563;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.table-action-btn svg {
    width: 18px;
    height: 18px;
    stroke-width: 1.8;
}

.table-action-btn:hover {
    border-color: #cfd4dc;
    color: #111827;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.table-action-btn:active {
    transform: translateY(0);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
}

.table-action-btn.disabled,
.table-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

/* ============================================
   10. PAGINATION
   ============================================ */
.pagination {
    margin-bottom: 0;
}

.pagination .page-link {
    border-radius: 999px;
    border: none;
    color: #4b5563;
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 500;
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    box-shadow: 0 6px 18px rgba(102, 126, 234, 0.35);
}

.pagination .page-link:hover {
    background-color: #e5e7eb;
    color: #111827;
}

.pagination .page-item.disabled .page-link {
    background-color: #f9fafb;
    color: #d1d5db;
}

/* ============================================
   11. MODAL STYLES
   ============================================ */
.modal-backdrop {
    z-index: 1040 !important;
    background-color: rgba(0, 0, 0, 0.5) !important;
    opacity: 1 !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: auto !important;
    will-change: auto;
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.modal-backdrop.show {
    opacity: 1 !important;
    will-change: auto;
}

.modal-backdrop:hover {
    opacity: 1 !important;
    transform: translateZ(0) !important;
}

.modal {
    z-index: 1050 !important;
    overflow-x: hidden;
    overflow-y: auto;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    will-change: auto;
    isolation: isolate;
}

.modal.fade {
    transition: none !important;
    opacity: 1 !important;
}

.modal.fade.show {
    opacity: 1 !important;
    transition: none !important;
}

/* .modal.show {
    display: block !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    transition: none !important;
} */

.modal-dialog {
    z-index: 1055 !important;
    position: relative;
    margin: 1.75rem auto;
    pointer-events: none;
    max-width: 500px;
    width: auto;
    transform: translate(0, 0) !important;
    transition: none !important;
    will-change: auto;
    isolation: isolate;
}

.modal.show .modal-dialog {
    pointer-events: auto !important;
    transform: translate(0, 0) !important;
    transition: none !important;
    will-change: auto;
    -webkit-transform: translate(0, 0) !important;
    -moz-transform: translate(0, 0) !important;
    -ms-transform: translate(0, 0) !important;
    -o-transform: translate(0, 0) !important;
}

.modal-content {
    position: relative;
    z-index: 1056 !important;
    pointer-events: auto !important;
    background-color: #fff;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    transform: translateZ(0) !important;
    backface-visibility: hidden !important;
    -webkit-backface-visibility: hidden !important;
    -webkit-transform: translateZ(0) !important;
    -moz-transform: translateZ(0) !important;
    -ms-transform: translateZ(0) !important;
    -o-transform: translateZ(0) !important;
    will-change: auto !important;
    transition: none !important;
    isolation: isolate;
    contain: layout style paint;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeSpeed;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Prevent flickering on hover - disable all transitions but keep hardware acceleration */
.modal-content,
.modal-content *,
.modal-content *::before,
.modal-content *::after {
    transition: none !important;
    -webkit-transition: none !important;
    -moz-transition: none !important;
    -o-transition: none !important;
    animation: none !important;
    -webkit-animation: none !important;
    -moz-animation: none !important;
    -o-animation: none !important;
}

.modal-content *:hover,
.modal-content *:focus,
.modal-content *:active,
.modal-content *:visited {
    transition: none !important;
    -webkit-transition: none !important;
    -moz-transition: none !important;
    -o-transition: none !important;
    transform: none !important;
    -webkit-transform: none !important;
    -moz-transform: none !important;
    -ms-transform: none !important;
    -o-transform: none !important;
    animation: none !important;
    -webkit-animation: none !important;
    -moz-animation: none !important;
    -o-animation: none !important;
}

/* Specific fixes for form elements inside modal */
.modal-content .form-control,
.modal-content .form-select,
.modal-content input,
.modal-content select,
.modal-content textarea,
.modal-content button,
.modal-content .btn {
    transform: none !important;
    transition: none !important;
    -webkit-transition: none !important;
    -moz-transition: none !important;
    -o-transition: none !important;
    will-change: auto !important;
    animation: none !important;
}

.modal-content .form-control:hover,
.modal-content .form-control:focus,
.modal-content .form-select:hover,
.modal-content .form-select:focus,
.modal-content input:hover,
.modal-content input:focus,
.modal-content select:hover,
.modal-content select:focus,
.modal-content textarea:hover,
.modal-content textarea:focus,
.modal-content button:hover,
.modal-content button:focus,
.modal-content button:active,
.modal-content .btn:hover,
.modal-content .btn:focus,
.modal-content .btn:active {
    transform: none !important;
    transition: none !important;
    -webkit-transition: none !important;
    -moz-transition: none !important;
    -o-transition: none !important;
    animation: none !important;
    box-shadow: none !important;
}

/* Override Bootstrap button hover effects inside modal */
.modal-content .btn-primary:hover,
.modal-content .btn-primary:focus,
.modal-content .btn-outline-secondary:hover,
.modal-content .btn-outline-secondary:focus {
    transform: none !important;
    transition: none !important;
    -webkit-transition: none !important;
    -moz-transition: none !important;
    -o-transition: none !important;
}

/* Disable all transitions but allow static box-shadow for focus states */
.modal-content * {
    transition: none !important;
    -webkit-transition: none !important;
    -moz-transition: none !important;
    -o-transition: none !important;
}

/* Allow focus states but without transitions */
.modal-content .form-control:focus,
.modal-content .form-select:focus {
    transition: none !important;
    -webkit-transition: none !important;
    -moz-transition: none !important;
    -o-transition: none !important;
}

.modal-header {
    padding: 1.25rem 1.5rem 0.75rem;
}

.modal-body {
    padding: 0 1.5rem 1.5rem;
}

.modal-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
}

.btn-close {
    opacity: 0.5;
}

.btn-close:hover {
    opacity: 1;
}

body.modal-open {
    overflow: hidden !important;
    padding-right: 0 !important;
}

/* ============================================
   12. FORM VALIDATION
   ============================================ */
.is-invalid {
    border-color: #dc3545 !important;
}

.is-invalid:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

.invalid-feedback {
    display: none;
    width: 100%;
    margin-top: 6px;
    font-size: 0.8125rem;
    color: #dc3545 !important;
    line-height: 1.4;
}

.invalid-feedback.d-block {
    display: block !important;
}

.is-invalid~.invalid-feedback,
.is-invalid+.invalid-feedback {
    display: block;
}

input.is-invalid::-webkit-validation-bubble-icon,
input.is-invalid::-webkit-validation-bubble-arrow,
input.is-invalid::-webkit-validation-bubble-message,
select.is-invalid::-webkit-validation-bubble-icon,
select.is-invalid::-webkit-validation-bubble-arrow,
select.is-invalid::-webkit-validation-bubble-message {
    display: none !important;
}

input.is-invalid::-webkit-validation-bubble,
select.is-invalid::-webkit-validation-bubble {
    display: none !important;
}

input:invalid {
    box-shadow: none !important;
}

input.is-invalid:invalid {
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

.alert-error {
    margin-bottom: 16px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    background-color: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    text-align: left;
}

/* ============================================
   13. CUSTOM MULTISELECT DROPDOWN
   ============================================ */
.custom-multiselect-wrapper {
    position: relative;
}

.custom-multiselect-display {
    min-height: 38px;
    cursor: pointer;
}

.custom-dropdown-menu {
    position: absolute;
    width: 100%;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    margin-top: 0.25rem;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.custom-dropdown-menu .dropdown-item {
    padding: 0.5rem;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.custom-dropdown-menu .dropdown-item:hover {
    background-color: #f8f9fa;
}

.selected-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background-color: #0d6efd;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.875rem;
}

.selected-chip .remove-btn {
    cursor: pointer;
    font-weight: bold;
    padding: 0 4px;
    border: none;
    background: none;
    color: white;
    font-size: 1rem;
    line-height: 1;
}

.selected-chip .remove-btn:hover {
    opacity: 0.8;
}

/* ============================================
   14. CHECKBOXES & FORM CONTROLS
   ============================================ */

/* Standard Checkboxes */
.form-check {
    display: flex;
    align-items: center;
    min-height: 1.5rem;
    padding-left: 1.5em;
    margin-bottom: 0.5rem;
}

.form-check-input {
    width: 1.25em;
    height: 1.25em;
    margin-top: 0.125em;
    margin-left: -1.5em;
    cursor: pointer;
    border: 2px solid #6c757d;
    border-radius: 0.375rem;
    background-color: #fff;
    transition: all 0.2s ease-in-out;
    flex-shrink: 0;
}

.form-check-input:hover:not(:disabled) {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.125rem rgba(13, 110, 253, 0.1);
}

.form-check-input:focus {
    border-color: #0d6efd;
    outline: 0;
    box-shadow: 0 0 0 0.125rem rgba(13, 110, 253, 0.25);
}

.form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 1em 1em;
}

.form-check-input:checked:hover:not(:disabled) {
    background-color: #0b5ed7;
    border-color: #0b5ed7;
}

.form-check-input:indeterminate {
    background-color: #0d6efd;
    border-color: #0d6efd;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10h8'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 1em 1em;
}

.form-check-input:disabled {
    cursor: not-allowed;
    opacity: 0.6;
    background-color: #e9ecef;
    border-color: #ced4da;
}

.form-check-input:disabled~.form-check-label {
    cursor: not-allowed;
    opacity: 0.6;
}

.form-check-label {
    cursor: pointer;
    user-select: none;
    margin-left: 0.5em;
    line-height: 1.5;
    color: black;
}

/* Form Switch (Toggle Switches) */
.form-switch {
    padding-left: 2.5em;
}

.form-switch .form-check-input {
    width: 2em;
    height: 1.25em;
    margin-left: -2.5em;
    background-image: none;
    background-position: left center;
    border-radius: 2em;
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    background-color: #6c757d;
    border-color: #6c757d;
}

.form-switch .form-check-input:checked {
    background-position: right center;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.form-switch .form-check-input:focus {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
}

.form-switch .form-check-input:hover:not(:disabled) {
    box-shadow: 0 0 0 0.125rem rgba(13, 110, 253, 0.15);
}

.form-switch .form-check-input:disabled {
    background-color: #e9ecef;
    border-color: #ced4da;
    opacity: 0.6;
}

/* Inline Checkboxes */
.form-check-inline {
    display: inline-block;
    margin-right: 1rem;
    margin-bottom: 0;
}

/* Checkbox Sizes */
.form-check-input-sm {
    width: 1em;
    height: 1em;
    margin-top: 0.25em;
}

.form-switch .form-check-input-sm {
    width: 1.5em;
    height: 0.875em;
}

.form-check-input-lg {
    width: 1.5em;
    height: 1.5em;
    margin-top: 0;
}

.form-switch .form-check-input-lg {
    width: 2.5em;
    height: 1.5em;
}

/* Checkbox Colors (Custom) */
.form-check-input-success:checked {
    background-color: #198754;
    border-color: #198754;
}

.form-check-input-danger:checked {
    background-color: #dc3545;
    border-color: #dc3545;
}

.form-check-input-warning:checked {
    background-color: #ffc107;
    border-color: #ffc107;
}

.form-check-input-info:checked {
    background-color: #0dcaf0;
    border-color: #0dcaf0;
}

/* Table Checkboxes */
.table .form-check {
    margin-bottom: 0;
    padding-left: 1.5em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.table .form-check-input {
    margin-top: 0;
    vertical-align: middle;
}

.table td .form-check {
    padding-left: 1.5em;
}

.table td .form-switch {
    padding-left: 2.5em;
}

/* Permissions Table Checkboxes - Centered */
.table tbody td .form-check {
    justify-content: center;
}

.table tbody td .form-switch {
    justify-content: center;
}

/* Responsive Checkboxes */
@media (max-width: 576px) {
    .form-check {
        padding-left: 1.25em;
    }

    .form-check-input {
        width: 1.125em;
        height: 1.125em;
        margin-left: -1.25em;
    }

    .form-switch {
        padding-left: 2.25em;
    }

    .form-switch .form-check-input {
        width: 1.875em;
        height: 1.125em;
        margin-left: -2.25em;
    }
}

/* ============================================
   15. DASHBOARD SPECIFIC
   ============================================ */
.dashboard-card {
    text-align: left;
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.dashboard-title-group .login-subtitle {
    margin-bottom: 0;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.dashboard-card-item {
    padding: 14px 16px;
    border-radius: 14px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
}

.dashboard-card-item h2 {
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    margin-bottom: 6px;
}

.dashboard-card-item p {
    font-size: 22px;
    font-weight: 600;
    color: #111827;
}

.btn-logout {
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 500;
    background: #f9fafb;
    color: #374151;
    cursor: pointer;
    transition: background-color 0.12s ease, border-color 0.12s ease;
}

.btn-logout:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.app-footer {
    margin-top: auto;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #e5e7eb;
    font-size: 12px;
    text-align: center;
    padding: 10px 16px;
}

/* ============================================
   16. UTILITY CLASSES (Bootstrap Extensions)
   ============================================ */
.cursor-pointer {
    cursor: pointer;
}

.min-h-38 {
    min-height: 38px;
}

.max-h-200 {
    max-height: 200px;
}

.max-h-200-scroll {
    max-height: 200px;
    overflow-y: auto;
}

.w-auto-min-80 {
    width: auto;
    min-width: 80px;
}

.max-w-160 {
    max-width: 160px;
}

.max-w-200 {
    max-width: 200px;
}

.max-w-220 {
    max-width: 220px;
}

.min-w-200 {
    min-width: 200px;
}

.vertical-align-middle {
    vertical-align: middle;
}

.mr-4 {
    margin-right: 4px;
}

.mr-6 {
    margin-right: 6px;
}

.ml-20 {
    margin-left: 20px;
}

.line-h-20 {
    line-height: 20px;
}

.fs-14 {
    font-size: 14px;
}

.fs-09 {
    font-size: 0.9rem;
}

.cursor-not-allowed {
    cursor: not-allowed;
}

.opacity-75 {
    opacity: 0.75;
}

a:not(.btn):not(.sidebar-link):not(.breadcrumb-link) {
    transition: opacity 0.2s ease-in-out;
}

a:not(.btn):not(.sidebar-link):not(.breadcrumb-link):hover {
    opacity: 0.8;
}

/* ============================================
   17. RESPONSIVE DESIGN
   ============================================ */

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .stat-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .dashboard-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Medium devices (tablets, 768px and up) */
@media (max-width: 992px) {
    .sidebar {
        width: 260px;
    }

    .content-wrapper {
        margin-left: 260px;
    }

    .content-inner {
        padding: 18px 16px 28px;
    }

    .stat-row {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }

    .dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .topbar {
        padding: 12px 16px;
        height: auto;
        flex-wrap: wrap;
        gap: 10px;
    }

    .breadcrumb-bar {
        flex-wrap: wrap;
    }

    .table-wrapper.smtp-table-wrapper {
        max-height: none;
    }

    .page-title {
        font-size: 22px;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (max-width: 768px) {
    .sidebar {
        width: 240px;
    }

    .content-wrapper {
        margin-left: 240px;
    }

    .content-inner {
        padding: 14px 12px 24px;
    }

    .topbar {
        align-items: flex-start;
        padding: 10px 12px;
    }

    .page-title {
        font-size: 20px;
    }

    .stat-row,
    .dashboard-grid {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }

    .login-card {
        padding: 32px 20px 26px;
        border-radius: 16px;
    }

    .login-title {
        font-size: 22px;
    }

    .modal-dialog {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }
}

/* Extra small devices (portrait phones, less than 576px) */
@media (max-width: 480px) {
    .sidebar {
        width: 100%;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

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

    .content-wrapper {
        margin-left: 0;
    }

    .content-inner {
        padding: 12px 10px 20px;
    }

    .topbar {
        padding: 8px 10px;
    }

    .page-title {
        font-size: 18px;
    }

    .login-wrapper {
        padding: 16px;
    }

    .login-card {
        padding: 32px 20px 26px;
        border-radius: 16px;
    }

    .login-title {
        font-size: 20px;
    }

    .stat-card {
        padding: 14px 16px;
    }

    .stat-icon {
        width: 44px;
        height: 44px;
    }

    .stat-value {
        font-size: 22px;
    }

    .table-wrapper.smtp-table-wrapper table {
        min-width: 800px;
    }

    .btn-primary,
    .btn-outline-secondary {
        padding: 8px 16px;
        font-size: 14px;
    }

    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }

    .dashboard-grid {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
}

/* Print styles */
@media print {

    .sidebar,
    .topbar,
    .btn,
    .pagination {
        display: none !important;
    }

    .content-wrapper {
        margin-left: 0;
    }

    .content-inner {
        padding: 0;
    }
}

/* Lead description question template */
.lead-description-template {
    font-size: 14px;
    line-height: 1.7;
    color: #9aa0a6;
    background-color: #fcfcfd;
}

.lead-description-template.is-active {
    color: #212529;
}

.lead-description-template::placeholder {
    color: #c2c6cc;
}

.img-prev {
    height: 80px;
    overflow: hidden;
    object-fit: contain;
    width: 100%;
    border: 1px solid #e5e7eb;
    margin-bottom: 0 !important;
    margin-top: 2px !important;
}

.img-prev img {
    height: 80px;
    overflow: hidden;
    object-fit: contain;
    width: 100%;
    border: 1px solid #e5e7eb;
    margin-bottom: 0 !important;
}

/* ============================================
   10. OPEN ACTIVITY STYLES
   ============================================ */
.filter-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    margin-bottom: 25px;
    padding: 20px;
}

.activity-card {
    transition: all 0.3s ease;
    border-radius: 12px !important;
    overflow: hidden;
}

.activity-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
}

.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-label {
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 120px;
    display: inline-block;
}

.detail-value {
    color: #1e293b;
    font-size: 14px;
    font-weight: 500;
}

.activity-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(var(--bs-primary-rgb), 0.1);
    color: var(--bs-primary);
}

.validation-error {
    display: block;
    margin-top: 5px;
    font-size: 13px;
    color: #ef1a1a;
    /* message color */
}