     * { margin: 0; padding: 0; box-sizing: border-box; }
        body { font-family: 'Inter', sans-serif; overflow-x: hidden; background-color: var(--body-bg);}

    :root {
            --sidebar-bg: #1e293b;
            --sidebar-hover: #334155;
            --sidebar-active: #3b82f6;
            --sidebar-active-bg: rgba(59, 130, 246, 0.15);
            --sidebar-text: #94a3b8;
            --sidebar-text-active: #f8fafc;
            --header-bg: #ffffff;
            --header-border: #e2e8f0;
            --body-bg: #e8eff9;
            --accent-color: #6366f1;
            --accent-hover: #4f46e5;
            --accent-light: #e0e7ff;
            --success: #22c55e;
            --success-light: #dcfce7;
            --sidebar-width: 210px;
            --sidebar-collapsed: 70px;
            --danger: #ef4444;
            --danger-light: #fee2e2;
            --warning: #f59e0b;
            --warning-light: #fef3c7;
            --info: #3b82f6;
            --info-light: #dbeafe;
            /* Enhanced Product Theme */
            --card-bg: #ffffff;
            --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
            --card-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
            --text-primary: #1e293b;
            --text-secondary: #64748b;
            --text-muted: #94a3b8;
            --border-color: #e2e8f0;
            --border-light: #f1f5f9;
            --input-bg: #f8fafc;
            --input-focus: #e0e7ff;
            --radius-sm: 6px;
            --radius-md: 10px;
            --radius-lg: 14px;
            --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        }
        a{
            text-decoration: none;
        }
        .animate-in{
            animation: fadeIn 0.4s ease-out forwards;
        }
        .field-error {
            display: flex; align-items: center; gap: 6px;
            color: var(--danger); font-size: 0.78rem; margin-top: 6px;
            animation: shake 0.3s ease;
        }
        .field-error i { font-size: 0.7rem; }
        @keyframes shake {
            0%, 100% { transform: translateX(0); }
            25% { transform: translateX(-4px); }
            75% { transform: translateX(4px); }
        }
        .login-page {
            min-height: 100vh;
            display: flex;
        }

        /* ===== ALERT MESSAGES (CI4 Compatible) ===== */
        .alert-container {
            margin-bottom: 20px;
            animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        }
        @keyframes slideDown {
            from { opacity: 0; transform: translateY(-10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .crm-alert {
            display: flex; align-items: flex-start; gap: 12px;
            padding: 14px 16px; border-radius: 12px; border: 1.5px solid;
            font-size: 0.85rem; line-height: 1.5; position: relative;
            margin-bottom: 12px;
        }
        .crm-alert:last-child { margin-bottom: 0; }

        .crm-alert-danger {
            background: var(--danger-light); border-color: #fecaca; color: #991b1b;
        }
        .crm-alert-warning {
            background: var(--warning-light); border-color: #fde68a; color: #92400e;
        }
        .crm-alert-success {
            background: var(--success-light); border-color: #bbf7d0; color: #166534;
        }
        .crm-alert-info {
            background: var(--accent-light); border-color: #c7d2fe; color: #3730a3;
        }

        .crm-alert-icon {
            width: 28px; height: 28px; border-radius: 8px;
            display: flex; align-items: center; justify-content: center;
            font-size: 0.85rem; flex-shrink: 0; margin-top: 1px;
        }
        .crm-alert-danger .crm-alert-icon { background: #fecaca; color: var(--danger); }
        .crm-alert-warning .crm-alert-icon { background: #fde68a; color: var(--warning); }
        .crm-alert-success .crm-alert-icon { background: #bbf7d0; color: var(--success); }
        .crm-alert-info .crm-alert-icon { background: #c7d2fe; color: var(--accent-color); }

        .crm-alert-content { flex: 1; }
        .crm-alert-title { font-weight: 600; margin-bottom: 2px; }
        .crm-alert-text { font-size: 0.82rem; opacity: 0.9; }

        .crm-alert-close {
            width: 24px; height: 24px; border-radius: 6px; border: none;
            background: transparent; color: inherit; cursor: pointer;
            display: flex; align-items: center; justify-content: center;
            font-size: 0.75rem; opacity: 0.6; transition: all 0.2s;
            flex-shrink: 0; margin-top: 2px;
        }
        .crm-alert-close:hover { opacity: 1; background: rgba(0,0,0,0.05); }

        /* Failed Attempts Badge */
        .failed-attempts {
            display: inline-flex; align-items: center; gap: 8px;
            background: var(--warning-light); color: #92400e;
            padding: 8px 14px; border-radius: 10px;
            font-size: 0.82rem; font-weight: 600; margin-bottom: 16px;
        }
        .failed-attempts i { color: var(--warning); }
        .failed-bar {
            width: 80px; height: 6px; background: #fde68a; border-radius: 3px; overflow: hidden;
        }
        .failed-bar-fill {
            height: 100%; border-radius: 3px; background: var(--warning);
            transition: width 0.3s;
        }
        /* ===== LEFT PANEL ===== */
        .login-left {
            flex: 1;
            background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #f1f5f9 100%);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 40px 20px;
            position: relative;
            overflow: hidden;
        }
        .login-left::before {
            content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
            background: radial-gradient(circle at 30% 30%, rgba(99,102,241,0.06) 0%, transparent 50%),
                        radial-gradient(circle at 70% 70%, rgba(139,92,246,0.04) 0%, transparent 50%);
            pointer-events: none;
        }

        .login-brand {
            display: flex; align-items: center; gap: 14px; margin-bottom: 40px; z-index: 1;
        }
        .login-brand-icon {
            width: 56px; height: 56px; border-radius: 16px;
            background: linear-gradient(135deg, var(--accent-color), #8b5cf6);
            display: flex; align-items: center; justify-content: center;
            color: white; font-size: 1.6rem; box-shadow: 0 8px 24px rgba(99,102,241,0.3);
        }
        .login-brand-text { font-size: 1.8rem; font-weight: 800; color: #1e293b; letter-spacing: -1px; }
        .login-brand-text span { color: var(--accent-color); }

        .login-card {
            background: #ffffff; border-radius: 20px; border: 1px solid #e2e8f0;
            box-shadow: 0 20px 60px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);
            padding: 40px; width: 100%; max-width: 420px; z-index: 1;
            position: relative; overflow: hidden;
        }
        .login-card::before {
            content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
            background: linear-gradient(90deg, var(--accent-color), #8b5cf6);
        }

        .login-card-header {
            display: flex; align-items: center; gap: 10px; margin-bottom: 28px;
            padding-bottom: 16px; border-bottom: 1px solid #f1f5f9;
        }
        .login-card-header i { color: var(--accent-color); font-size: 1rem; }
        .login-card-header span { font-size: 0.9rem; color: #475569; font-weight: 500; }

        .form-group { margin-bottom: 20px; }
        .form-label {
            display: block; font-size: 0.82rem; font-weight: 600; color: #334155;
            margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px;
        }
        .input-wrap {
            display: flex; align-items: center; border: 1.5px solid #e2e8f0; border-radius: 12px;
            background: #f8fafc; transition: all 0.2s; overflow: hidden;
        }
        .input-wrap:focus-within {
            border-color: var(--accent-color); background: #fff;
            box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
        }
        .input-icon {
            width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
            color: #94a3b8; font-size: 0.9rem; flex-shrink: 0; border-right: 1px solid #e2e8f0;
            background: #fff;
        }
        .input-wrap input {
            flex: 1; height: 44px; padding: 0 14px; border: none; background: transparent;
            font-size: 0.9rem; color: #1e293b; font-family: 'Inter', sans-serif; outline: none;
        }
        .input-wrap input::placeholder { color: #94a3b8; }
        .input-toggle {
            width: 40px; height: 44px; display: flex; align-items: center; justify-content: center;
            color: #94a3b8; cursor: pointer; font-size: 0.85rem; transition: color 0.2s; background: none; border: none;
        }
        .input-toggle:hover { color: var(--accent-color); }

        .btn-login {
            width: 100%; height: 48px; border-radius: 12px; border: none;
            background: linear-gradient(135deg, var(--accent-color), #8b5cf6); color: white;
            font-size: 0.95rem; font-weight: 600; cursor: pointer;
            transition: all 0.3s; display: flex; align-items: center; justify-content: center; gap: 8px;
            box-shadow: 0 4px 16px rgba(99,102,241,0.3); margin-top: 8px;
        }
        .btn-login:hover {
            background: linear-gradient(135deg, var(--accent-hover), #7c3aed);
            box-shadow: 0 6px 24px rgba(99,102,241,0.4); transform: translateY(-1px);
        }
        .btn-login:active { transform: translateY(0); }

        .login-options {
            display: flex; justify-content: space-between; align-items: center; margin-top: 18px;
        }
        .remember-wrap {
            display: flex; align-items: center; gap: 8px; cursor: pointer;
        }
        .remember-wrap input[type="checkbox"] {
            width: 18px; height: 18px; border: 2px solid #cbd5e1; border-radius: 5px;
            accent-color: var(--accent-color); cursor: pointer;
        }
        .remember-wrap span { font-size: 0.85rem; color: #475569; }
        .forgot-link {
            font-size: 0.85rem; color: var(--accent-color); text-decoration: none;
            font-weight: 500; transition: color 0.2s;
        }
        .forgot-link:hover { color: var(--accent-hover); text-decoration: underline; }

        .login-footer {
            text-align: center; margin-top: 28px; padding-top: 20px; border-top: 1px solid #f1f5f9;
        }
        .login-footer p { font-size: 0.8rem; color: #94a3b8; margin: 0; }
        .login-footer p strong { color: #64748b; }

        /* ===== RIGHT PANEL ===== */
        .login-right {
            flex: 1.2;
            background: linear-gradient(135deg, #1e293b 0%, #0f172a 50%, #1e293b 100%);
            display: flex; flex-direction: column; justify-content: center; padding: 60px;
            position: relative; overflow: hidden;
        }
        .login-right::before {
            content: ''; position: absolute; top: -20%; right: -20%; width: 600px; height: 600px;
            background: radial-gradient(circle, rgba(99,102,241,0.15) 0%, transparent 70%);
            pointer-events: none;
        }
        .login-right::after {
            content: ''; position: absolute; bottom: -10%; left: -10%; width: 400px; height: 400px;
            background: radial-gradient(circle, rgba(139,92,246,0.1) 0%, transparent 70%);
            pointer-events: none;
        }

        .right-content { position: relative; z-index: 1; max-width: 480px; }
        .right-badge {
            display: inline-flex; align-items: center; gap: 8px;
            background: rgba(99,102,241,0.15); color: #a5b4fc;
            padding: 6px 16px; border-radius: 20px; font-size: 0.8rem; font-weight: 500;
            margin-bottom: 24px; border: 1px solid rgba(99,102,241,0.2);
        }
        .right-badge i { color: var(--accent-color); }

        .right-title {
            font-size: 2.4rem; font-weight: 800; color: #f8fafc; line-height: 1.2;
            margin-bottom: 16px; letter-spacing: -0.5px;
        }
        .right-title span { color: var(--accent-color); }

        .right-desc { font-size: 1.05rem; color: #94a3b8; line-height: 1.6; margin-bottom: 40px; }

        .feature-list { list-style: none; padding: 0; margin: 0; }
        .feature-list li {
            display: flex; align-items: flex-start; gap: 14px; margin-bottom: 20px;
            color: #cbd5e1; font-size: 0.95rem; line-height: 1.5;
        }
        .feature-list li i {
            width: 28px; height: 28px; border-radius: 8px;
            background: rgba(99,102,241,0.15); color: var(--accent-color);
            display: flex; align-items: center; justify-content: center;
            font-size: 0.75rem; flex-shrink: 0; margin-top: 2px;
        }

        .btn-trial {
            display: inline-flex; align-items: center; gap: 10px;
            background: linear-gradient(135deg, var(--accent-color), #8b5cf6); color: white;
            padding: 14px 28px; border-radius: 12px; font-size: 0.95rem; font-weight: 600;
            text-decoration: none; margin-top: 20px;
            box-shadow: 0 4px 20px rgba(99,102,241,0.3); transition: all 0.3s; border: none;
        }
        .btn-trial:hover {
            background: linear-gradient(135deg, var(--accent-hover), #7c3aed);
            box-shadow: 0 6px 28px rgba(99,102,241,0.4); transform: translateY(-2px); color: white;
        }

        .right-stats {
            display: flex; gap: 40px; margin-top: 48px; padding-top: 32px;
            border-top: 1px solid rgba(255,255,255,0.06);
        }
        .right-stat { text-align: center; }
        .right-stat-value { font-size: 1.6rem; font-weight: 700; color: #f8fafc; }
        .right-stat-label { font-size: 0.8rem; color: #64748b; margin-top: 4px; }

        /* ===== RESPONSIVE ===== */
        @media (max-width: 991.98px) {
            .login-page { flex-direction: column; }
            .login-right { padding: 40px 24px; min-height: auto; }
            .right-title { font-size: 1.8rem; }
            .right-stats { gap: 24px; }
            .login-left { padding: 40px 20px; }
        }
        @media (max-width: 575.98px) {
            .login-card { padding: 28px 20px; border-radius: 16px; }
            .login-brand-text { font-size: 1.4rem; }
            .right-title { font-size: 1.5rem; }
            .right-desc { font-size: 0.9rem; }
            .feature-list li { font-size: 0.85rem; }
        }

        /* ===== SIDEBAR ===== */
        .sidebar {
            position: fixed;
            top: 0;
            left: 0;
            width: var(--sidebar-width);
            height: 100vh;
            background: var(--sidebar-bg);
            z-index: 1040;
            display: flex;
            flex-direction: column;
            box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
            overflow: visible;
            /* Mobile slide-in */
            transform: translateX(-100%);
            transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1), width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        }

        /* Desktop: sidebar is visible by default */
        @media (min-width: 992px) {
            .sidebar {
                transform: translateX(0) !important;
            }
        }

        .sidebar.mobile-open {
            transform: translateX(0);
        }

        .sidebar.collapsed {
            width: var(--sidebar-collapsed);
        }

        .sidebar-brand {
            padding: 16px 24px;
            display: flex;
            align-items: center;
            gap: 12px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.06);
            min-height: 70px;
            overflow: hidden;
            flex-shrink: 0;
        }

        .sidebar-brand .logo-icon {
            width: 36px;
            height: 36px;
            background: linear-gradient(135deg, #6366f1, #8b5cf6);
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 18px;
            flex-shrink: 0;
        }

        .sidebar-brand .logo-text {
            color: #f8fafc;
            font-size: 1.25rem;
            font-weight: 700;
            letter-spacing: -0.5px;
            white-space: nowrap;
            transition: opacity 0.25s, transform 0.25s;
        }

        .sidebar.collapsed .logo-text {
            opacity: 0;
            transform: translateX(-10px);
            pointer-events: none;
        }

        .sidebar-menu {
            flex: 1;
            padding: 16px 2px;
            overflow-y: auto;
            overflow-x: visible;
            scrollbar-width: thin;
            scrollbar-color: rgba(255,255,255,0.1) transparent;
        }

        .sidebar-menu::-webkit-scrollbar {
            width: 4px;
        }

        .sidebar-menu::-webkit-scrollbar-thumb {
            background: #8b5cf6;
            border-radius: 4px;
        }

        .menu-label {
            padding: 0 12px;
            margin: 16px 0 8px;
            font-size: 0.7rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 1px;
            color: #64748b;
            white-space: nowrap;
            transition: opacity 0.25s, height 0.25s, margin 0.25s;
        }

        .sidebar.collapsed .menu-label {
            opacity: 0;
            height: 0;
            margin: 0;
            overflow: hidden;
        }

        .nav-item {
            margin-bottom: 4px;
            position: relative;
        }

        .nav-link {
            display: flex;
            align-items: center;
            gap: 14px;
            padding: 12px 16px;
            color: var(--sidebar-text);
            text-decoration: none;
            border-radius: 2px;
            transition: all 0.25s ease;
            position: relative;
            white-space: nowrap;
            overflow: visible;
        }

        .nav-link:hover {
            background: var(--sidebar-hover);
            color: var(--sidebar-text-active);
        }

        .nav-link.active {
            background: var(--sidebar-active-bg);
            color: var(--sidebar-active);
            font-weight: 500;
        }

        .nav-link.active::before {
            content: '';
            position: absolute;
            left: 0;
            top: 50%;
            transform: translateY(-50%);
            width: 3px;
            height: 100%;
            background: var(--sidebar-active);
        }

        .nav-link i {
            font-size: 1.1rem;
            width: 22px;
            text-align: center;
            flex-shrink: 0;
        }

        .nav-link span {
            font-size: 0.9rem;
            transition: opacity 0.25s, transform 0.25s;
            display: inline-block;
        }

        .sidebar.collapsed .nav-link span {
            opacity: 0;
            transform: translateX(-8px);
            width: 0;
            overflow: hidden;
        }

        .sidebar.collapsed .nav-link {
            justify-content: center;
            padding: 12px;
        }

        .sidebar.collapsed .nav-link.active::before {
            display: none;
        }

        /* ===== SIDEBAR TOOLTIP ===== */
        .sidebar.collapsed .nav-item {
            position: relative;
        }

        .sidebar .nav-item .nav-tooltip {
          position: fixed;  /* Fixed positioning escapes all parent overflow clipping */
          left: 82px;       /* 70px sidebar + 12px gap */
          background: #1e293b;
          color: #f8fafc;
          padding: 8px 14px;
          border-radius: 8px;
          font-size: 0.82rem;
          font-weight: 500;
          white-space: nowrap;
          box-shadow: 0 4px 16px rgba(0,0,0,0.4);
          z-index: 9999;
          opacity: 0;
          pointer-events: none;
          transition: opacity 0.2s ease, transform 0.2s ease;
          border: 1px solid rgba(255,255,255,0.08);
          transform: translateY(-50%) scale(0.9);
          display: none;
      }

      .sidebar.collapsed .nav-item:hover .nav-tooltip {
          opacity: 1;
          transform: translateY(-50%) scale(1);
          display: block;
      }

        /* ===== SIDEBAR DROPDOWN SUBMENU ===== */
        .nav-submenu {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.3s ease;
            padding-left: 16px;
        }
        .nav-item-dropdown.open .nav-submenu {
            max-height: 300px;
        }
        .nav-arrow {
            font-size: 0.7rem;
            transition: transform 0.3s ease;
            margin-left: auto;
        }
        .nav-item-dropdown.open .nav-arrow {
            transform: rotate(90deg);
        }
        .nav-sublink {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 9px 12px;
            color: var(--sidebar-text);
            text-decoration: none;
            border-radius: 6px;
            font-size: 0.85rem;
            transition: all 0.2s ease;
            margin-bottom: 2px;
        }
        .nav-sublink:hover,
        .nav-sublink.active {
            background: var(--sidebar-hover);
            color: var(--sidebar-active);
        }
        .nav-sublink i {
            width: 16px;
            text-align: center;
            font-size: 0.85rem;
            flex-shrink: 0;
        }
        .sidebar.collapsed .nav-item-dropdown .nav-submenu,
        .sidebar.collapsed .nav-arrow {
            display: none;
        }

        /* ===== SIDEBAR FOOTER with SIGNOUT ===== */
        .sidebar-footer {
            padding: 16px;
            border-top: 1px solid rgba(255, 255, 255, 0.06);
            flex-shrink: 0;
        }

        .sidebar.collapsed .user-mini {
    justify-content: center;
    padding: 10px 8px;
    gap: 6px;
}

.sidebar.collapsed .user-mini-left {
    flex: 0 0 auto;        /* Don't grow/shrink */
    width: auto;
    justify-content: center;
}

        .user-mini {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            padding: 10px;
            border-radius: 10px;
            background: rgba(255,255,255,0.03);
        }

        .user-mini-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
    overflow: hidden;
}

.user-mini img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.1);
    flex-shrink: 0;
}

.sidebar.collapsed .user-mini img {
    width: 32px;
    height: 32px;
}

.user-mini-info {
    transition: opacity 0.25s, width 0.25s;
    overflow: hidden;
    white-space: nowrap;
    min-width: 0;
}

        .sidebar.collapsed .user-mini-info {
            opacity: 0;
            width: 0;
            display: none;
        }

        .user-mini-info .name {
            color: #f8fafc;
            font-size: 0.85rem;
            font-weight: 600;
        }

        .user-mini-info .role {
            color: #64748b;
            font-size: 0.75rem;
        }

        .signout-btn {
           width: 34px;
    height: 34px;
    border-radius: 8px;
    border: none;
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    flex-shrink: 0;
        }

        .signout-btn:hover {
            background: rgba(239, 68, 68, 0.25);
            color: #f87171;
            transform: scale(1.05);
        }

        .sidebar.collapsed .signout-btn {
             width: 28px;
    height: 28px;
    font-size: 0.8rem;
        }

        /* ===== HEADER ===== */
        .main-header {
            position: fixed;
            top: 0;
            right: 0;
            left: var(--sidebar-width);
            height: 70px;
            background: var(--header-bg);
            border-bottom: 1px solid var(--header-border);
            z-index: 1030;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 28px;
            transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: 0 1px 3px rgba(0,0,0,0.04);
        }

        .sidebar.collapsed ~ .main-header {
            left: var(--sidebar-collapsed);
        }

        .header-left {
            display: flex;
            align-items: center;
            gap: 20px;
        }

        .sidebar-toggle {
            width: 38px;
            height: 38px;
            border-radius: 10px;
            border: 1px solid #e2e8f0;
            background: #f8fafc;
            color: #475569;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s;
            font-size: 1rem;
        }

        .sidebar-toggle:hover {
            background: #f1f5f9;
            border-color: #cbd5e1;
            color: #1e293b;
        }

        .breadcrumb-custom {
            display: flex;
            align-items: center;
            gap: 8px;
            margin: 0;
            padding: 0;
            list-style: none;
            font-size: 0.875rem;
        }

        .breadcrumb-custom li {
            color: #94a3b8;
        }

        .breadcrumb-custom li a {
            color: #64748b;
            text-decoration: none;
            transition: color 0.2s;
        }

        .breadcrumb-custom li a:hover {
            color: var(--accent-color);
        }

        .breadcrumb-custom li.active {
            color: #1e293b;
            font-weight: 500;
        }

        .breadcrumb-custom .separator {
            color: #cbd5e1;
            font-size: 0.75rem;
        }

        .header-right {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .rows-btn {
            width: 40px;
            height: 40px;
            border-radius: 10px;
            border: 1px solid #e2e8f0;
            background: #f8fafc;
            color: #64748b;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s;
            position: relative;
            font-size: 1rem;
        }

        .rows-btn-btn:hover {
            background: #f1f5f9;
            border-color: #cbd5e1;
            color: #1e293b;
        }

        .rows-btn .badge-dot {
            position: absolute;
            top: 8px;
            right: 8px;
            width: 8px;
            height: 8px;
            background: #ef4444;
            border-radius: 50%;
            border: 2px solid #f8fafc;
        }

        .rows-btn-primary {
            background: linear-gradient(135deg, #6366f1, #8b5cf6);
            color: white;
            border: none;
            padding: 0 20px;
            width: auto;
            font-size: 0.875rem;
            font-weight: 500;
            gap: 8px;
        }

        .rows-btn-primary:hover {
            background: linear-gradient(135deg, #4f46e5, #7c3aed);
            color: white;
            box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
        }

        /* ===== USER PROFILE DROPDOWN ===== */
        .user-profile-wrap {
            position: relative;
        }

        .user-profile {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 6px 12px 6px 6px;
            border-radius: 10px;
            cursor: pointer;
            transition: background 0.2s;
            border: 1px solid transparent;
            background: none;
            border: none;
            outline: none;
        }

        .user-profile:hover,
        .user-profile.show {
            background: #f8fafc;
            border-color: #e2e8f0;
        }

        .user-profile img {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            object-fit: cover;
        }

        .user-profile-info {
            line-height: 1.2;
            text-align: left;
        }

        .user-profile-info .name {
            font-size: 0.85rem;
            font-weight: 600;
            color: #1e293b;
        }

        .user-profile-info .role {
            font-size: 0.75rem;
            color: #64748b;
        }

        .profile-dropdown {
            position: absolute;
            top: calc(100% + 8px);
            right: 0;
            width: 220px;
            background: #fff;
            border-radius: 14px;
            box-shadow: 0 10px 40px rgba(0,0,0,0.12);
            border: 1px solid #e2e8f0;
            z-index: 1060;
            opacity: 0;
            visibility: hidden;
            transform: translateY(-8px);
            transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
            overflow: hidden;
        }

        .profile-dropdown.show {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
        }

        .profile-dropdown-header {
            padding: 16px;
            background: linear-gradient(135deg, #f8fafc, #f1f5f9);
            border-bottom: 1px solid #e2e8f0;
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .profile-dropdown-header img {
            width: 44px;
            height: 44px;
            border-radius: 50%;
            object-fit: cover;
            border: 2px solid #fff;
            box-shadow: 0 2px 8px rgba(0,0,0,0.08);
        }

        .profile-dropdown-header .info .name {
            font-weight: 600;
            color: #1e293b;
            font-size: 0.9rem;
        }

        .profile-dropdown-header .info .email {
            font-size: 0.78rem;
            color: #64748b;
            margin-top: 2px;
        }

        .profile-dropdown-body {
            padding: 6px;
        }

        .profile-dropdown-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 10px 12px;
            border-radius: 10px;
            color: #475569;
            text-decoration: none;
            font-size: 0.88rem;
            font-weight: 500;
            transition: all 0.2s;
            cursor: pointer;
            border: none;
            background: none;
            width: 100%;
            text-align: left;
        }

        .profile-dropdown-item:hover {
            background: #f8fafc;
            color: var(--accent-color);
        }

        .profile-dropdown-item i {
            width: 20px;
            text-align: center;
            font-size: 0.95rem;
        }

        .profile-dropdown-divider {
            height: 1px;
            background: #e2e8f0;
            margin: 6px 0;
        }

        .profile-dropdown-item.logout {
            color: #dc2626;
        }

        .profile-dropdown-item.logout:hover {
            background: #fef2f2;
            color: #dc2626;
        }

        /* ===== MAIN CONTENT ===== */
        .main-content {
            margin-left: var(--sidebar-width);
            margin-top: 70px;
            padding: 28px;
            min-height: calc(100vh - 70px);
            transition: margin-left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .sidebar.collapsed ~ .main-content {
            margin-left: var(--sidebar-collapsed);
        }

        .page-footer {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin: 10px 0px;
        }

        .page-title {
            font-size: 1.5rem;
            font-weight: 700;
            color: #1e293b;
            margin: 0;
        }

        .page-subtitle {
            color: #64748b;
            font-size: 0.875rem;
            margin-top: 4px;
        }

        /* ===== CARD ===== */
          .card {
          border: none;
          border-radius: 10px;
          background: #ffffff;
          box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
        }
        .content-card {
            background: #ffffff;
            border-radius: 16px;
            border: 1px solid #e2e8f0;
            box-shadow: 0 1px 3px rgba(0,0,0,0.04);
            overflow: hidden;
        }

        
        .status-badge {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 5px 12px;
            border-radius: 20px;
            font-size: 0.8rem;
            font-weight: 500;
        }

        .status-badge.enable {
            background: #dcfce7;
            color: #166534;
        }

        .status-badge.enable::before {
            content: '';
            width: 6px;
            height: 6px;
            background: #22c55e;
            border-radius: 50%;
        }

        .status-badge.disable {
            background: #fee2e2;
            color: #991b1b;
        }

        .status-badge.disable::before {
            content: '';
            width: 6px;
            height: 6px;
            background: #ef4444;
            border-radius: 50%;
        }

        .role-badge {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 5px 12px;
            border-radius: 20px;
            font-size: 0.8rem;
            font-weight: 500;
            background: #eff6ff;
            color: #1e40af;
        }

        .role-badge i {
            font-size: 0.7rem;
        }

        .role-badge.admin {
            background: #fef3c7;
            color: #92400e;
        }

        .role-badge.agent {
            background: #eff6ff;
            color: #1e40af;
        }
        .btn-save {
            background: linear-gradient(135deg, var(--accent-color), #8b5cf6); color: white; border: none;
            padding: 10px 24px; border-radius: 10px; font-size: 0.9rem; font-weight: 600;
            display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
            transition: all 0.2s; box-shadow: 0 2px 8px rgba(99,102,241,0.2);
        }
        .btn-save:hover {
            background: linear-gradient(135deg, var(--accent-hover), #7c3aed);
            box-shadow: 0 4px 16px rgba(99,102,241,0.35); transform: translateY(-1px); color: white;
        }

        /* Action Buttons */
        .btn-action {
            width: 36px; height: 30px; border-radius: 5px; border: 1.5px solid #e2e8f0;
            background: #fff; color: #64748b; display: inline-flex; align-items: center;
            justify-content: center; cursor: pointer; transition: all 0.2s;
            font-size: 0.85rem; margin-right: 4px;
        }
        .btn-action:hover { transform: translateY(-1px); box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
        .btn-action.edit { background: var(--accent-color); color: white; border-color: var(--accent-color); }
        .btn-action.edit:hover { background: var(--accent-hover); }
        .btn-action.delete { background: var(--danger-light); color: var(--danger); border-color: var(--danger-light); }
        .btn-action.delete:hover { background: var(--danger); color: white; }
        .btn-action-text {
            padding: 0 14px; width: auto; gap: 6px; font-size: 0.82rem; font-weight: 500;
        }

        
        /* ===== MOBILE OVERLAY ===== */
        .sidebar-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.5);
            z-index: 1035;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.35s ease, visibility 0.35s ease;
        }

        .sidebar-overlay.active {
            opacity: 1;
            visibility: visible;
        }

        /* ===== RESPONSIVE ===== */
        @media (max-width: 991.98px) {
            .sidebar {
                width: var(--sidebar-width) !important;
                transform: translateX(-100%);
            }

            .sidebar.mobile-open {
                transform: translateX(0);
            }

            .sidebar.collapsed {
                width: var(--sidebar-width) !important;
            }

            .sidebar.collapsed .logo-text,
            .sidebar.collapsed .nav-link span,
            .sidebar.collapsed .menu-label,
            .sidebar.collapsed .user-mini-info {
                opacity: 1;
                transform: none;
                width: auto;
            }

            .sidebar.collapsed .nav-link {
                justify-content: flex-start;
                padding: 12px 16px;
            }

            .sidebar.collapsed .nav-link.active::before {
                display: block;
            }

            
            .main-header {
                left: 0 !important;
            }

            .main-content {
                margin-left: 0 !important;
            }
        }

        @media (max-width: 575.98px) {
            .main-header {
                padding: 0 16px;
            }

            .main-content {
                padding: 16px;
            }

            .page-header {
                flex-direction: column;
                align-items: flex-start;
                gap: 12px;
            }

            .header-right .header-btn:not(.header-btn-primary) {
                display: none;
            }

            .table thead th {
                padding: 10px 12px;
                font-size: 0.75rem;
            }

            .table tbody td {
                padding: 12px;
                font-size: 0.85rem;
            }

            .pagination-custom {
                flex-direction: column;
                gap: 12px;
            }

            .profile-dropdown {
                width: 200px;
                right: -10px;
            }
        }

        .page-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 28px;
            gap: 12px;
            flex-wrap: wrap;
        }

        /* ── Page header action buttons ── */
        .ph-actions {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
        }
        .ph-btn {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 10px 14px;
            border-radius: 8px;
            font-size: 13px;
            font-weight: 600;
            border: 1.5px solid transparent;
            cursor: pointer;
            text-decoration: none;
            transition: all .15s;
            white-space: nowrap;
            line-height: 1;
        }
        .ph-btn span { display: inline; }
        /* Primary — indigo gradient */
        .ph-btn-primary {
            background: linear-gradient(135deg, #6366f1, #818cf8);
            color: #fff;
            border-color: transparent;
            box-shadow: 0 2px 8px rgba(99,102,241,.3);
        }
        .ph-btn-primary:hover {
            background: linear-gradient(135deg, #4f46e5, #6366f1);
            color: #fff;
            box-shadow: 0 4px 14px rgba(99,102,241,.4);
            transform: translateY(-1px);
        }
        /* Ghost — neutral outline */
        .ph-btn-ghost {
            background: #fff;
            color: #475569;
            border-color: #e2e8f0;
        }
        .ph-btn-ghost:hover {
            background: #ede9fe;
            color: #6366f1;
            border-color: #a5b4fc;
        }
        /* Danger — hidden until bulk select */
        .ph-btn-danger {
            background: #fff;
            color: #dc2626;
            border-color: #fecaca;
        }
        .ph-btn-danger:hover {
            background: #dc2626;
            color: #fff;
            border-color: #dc2626;
        }
        .page-title-group {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }
        /* Smooth scrollbar */
        ::-webkit-scrollbar {
            width: 6px;
            height: 6px;
        }

        ::-webkit-scrollbar-track {
            background: transparent;
        }

        ::-webkit-scrollbar-thumb {
            background: #8b5cf6;
            border-radius: 3px;
        }

        ::-webkit-scrollbar-thumb:hover {
            background: #8b5cf6;
        }
    /* ===== FOOTER COMPONENT ===== */
   .crm-footer {
        margin-left: var(--sidebar-width);
        transition: margin-left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .sidebar.collapsed ~ .crm-footer { margin-left: var(--sidebar-collapsed); }

    /* Footer Bottom */
    .footer-bottom {
        background: #0f172a; border-top: 1px solid rgba(255,255,255,0.04);
        padding: 16px 28px;
    }
    .footer-bottom-inner {
        max-width: 1400px; margin: 0 auto;
        display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
    }
    .footer-copyright { font-size: 0.78rem; color: #64748b; }
    .footer-copyright strong { color: #94a3b8; }
    .footer-bottom-links { display: flex; gap: 20px; }
    .footer-bottom-links a { font-size: 0.78rem; color: #64748b; text-decoration: none; transition: color 0.2s; }
    .footer-bottom-links a:hover { color: var(--accent-color); }

    @media (max-width: 575px) {
        .footer-bottom { padding: 14px 20px; }
        .footer-bottom-inner { flex-direction: column; text-align: center; }
        .footer-bottom-links { gap: 14px; }
    }


    /* ===== PROFILE LAYOUT ===== */
        .profile-layout { display: grid; grid-template-columns: 320px 1fr; gap: 24px; }
        @media (max-width: 991px) { .profile-layout { grid-template-columns: 1fr; } }

        /* ===== LEFT SIDEBAR CARD ===== */
        .profile-sidebar {
            background: #ffffff; border-radius: 16px; border: 1px solid #e2e8f0;
            box-shadow: 0 1px 3px rgba(0,0,0,0.04); overflow: hidden; height: fit-content;
        }
        .profile-sidebar-header {
            background: linear-gradient(135deg, var(--accent-color), #8b5cf6);
            padding: 32px 24px; text-align: center; position: relative;
        }
        .profile-sidebar-header::after {
            content: ''; position: absolute; bottom: -20px; left: 0; right: 0;
            height: 40px; background: #fff; border-radius: 20px 20px 0 0;
        }
        .profile-avatar-wrap {
            position: relative; display: inline-block; z-index: 1;
        }
        .profile-avatar {
            width: 100px; height: 100px; border-radius: 50%; object-fit: cover;
            border: 4px solid rgba(255,255,255,0.3); box-shadow: 0 8px 24px rgba(0,0,0,0.15);
        }
        .profile-avatar-edit {
            position: absolute; bottom: 4px; right: 4px; width: 32px; height: 32px;
            border-radius: 50%; background: #fff; color: var(--accent-color);
            display: flex; align-items: center; justify-content: center;
            border: 2px solid var(--accent-light); cursor: pointer; font-size: 0.8rem;
            transition: all 0.2s; box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }
        .profile-avatar-edit:hover { background: var(--accent-color); color: white; transform: scale(1.1); }
        .profile-sidebar-name {
            font-size: 1.1rem; font-weight: 700; color: #1e293b; margin-top: 16px; margin-bottom: 4px;
        }
        .profile-sidebar-role {
            font-size: 0.85rem; color: #64748b; margin-bottom: 16px;
        }
        .profile-sidebar-status {
            display: inline-flex; align-items: center; gap: 6px;
            background: var(--success-light); color: #166534; padding: 4px 12px;
            border-radius: 20px; font-size: 0.78rem; font-weight: 600;
        }
        .profile-sidebar-status::before {
            content: ''; width: 6px; height: 6px; background: var(--success); border-radius: 50%;
        }

        .profile-sidebar-body { padding: 20px 24px; }
        .profile-info-item {
            display: flex; align-items: center; gap: 12px; padding: 12px 0;
            border-bottom: 1px solid #f1f5f9;
        }
        .profile-info-item:last-child { border-bottom: none; }
        .profile-info-icon {
            width: 36px; height: 36px; border-radius: 10px;
            background: var(--accent-light); color: var(--accent-color);
            display: flex; align-items: center; justify-content: center; font-size: 0.85rem; flex-shrink: 0;
        }
        .profile-info-text { flex: 1; min-width: 0; }
        .profile-info-label { font-size: 0.75rem; color: #94a3b8; margin-bottom: 2px; }
        .profile-info-value { font-size: 0.85rem; font-weight: 600; color: #1e293b; word-break: break-all; }

        .profile-sidebar-footer { padding: 16px 24px; border-top: 1px solid #f1f5f9; }
        .btn-logout {
            width: 100%; padding: 10px; border-radius: 10px; border: 1.5px solid var(--danger-light);
            background: var(--danger-light); color: var(--danger); font-size: 0.88rem; font-weight: 600;
            display: flex; align-items: center; justify-content: center; gap: 8px;
            cursor: pointer; transition: all 0.2s; font-family: 'Inter', sans-serif;
        }
        .btn-logout:hover { background: var(--danger); color: white; border-color: var(--danger); }

        /* ===== RIGHT CONTENT ===== */
        .profile-content { display: flex; flex-direction: column; gap: 24px; }

        .content-card {
            background: #ffffff; border-radius: 16px; border: 1px solid #e2e8f0;
            box-shadow: 0 1px 3px rgba(0,0,0,0.04); overflow: hidden;
        }
        .content-card-header {
            padding: 20px 24px; border-bottom: 1px solid #f1f5f9;
            display: flex; justify-content: space-between; align-items: center;
        }
        .content-card-title {
            font-size: 1rem; font-weight: 700; color: #1e293b; margin: 0;
            display: flex; align-items: center; gap: 10px;
        }
        .content-card-title i { color: var(--accent-color); font-size: 0.9rem; }
        .content-card-body { padding: 24px; }

        /* ===== FORM STYLES ===== */
        .form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
        @media (max-width: 767px) { .form-grid { grid-template-columns: 1fr; } }

        .form-group { display: flex; flex-direction: column; gap: 6px; }
        .form-group.full-width { grid-column: 1 / -1; }
        .form-label {
            font-size: 0.78rem; font-weight: 600; color: #475569; text-transform: uppercase; letter-spacing: 0.5px;
        }
        .form-label .required { color: var(--danger); margin-left: 2px; }
        .form-input {
            height: 44px; padding: 0 14px; border: 1.5px solid #e2e8f0; border-radius: 10px;
            font-size: 0.9rem; color: #1e293b; background: var(--input-bg); transition: all 0.2s;
            font-family: 'Inter', sans-serif; width: 100%;
        }
        .form-input:focus { outline: none; border-color: var(--accent-color); box-shadow: 0 0 0 3px rgba(99,102,241,0.1); }
        .form-input::placeholder { color: #94a3b8; }
        .form-input:disabled { background: #f8fafc; color: #94a3b8; cursor: not-allowed; }
        select.form-input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; padding-left: 42px; cursor: pointer; }
        textarea.form-input { height: auto; padding: 12px 14px; min-height: 100px; resize: vertical; }

        .form-hint { font-size: 0.78rem; color: #94a3b8; margin-top: 2px; }

        /* ===== PASSWORD SECTION ===== */
        .password-section { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
        @media (max-width: 767px) { .password-section { grid-template-columns: 1fr; } }

        .password-strength { margin-top: 8px; }
        .strength-label { display: flex; justify-content: space-between; font-size: 0.78rem; margin-bottom: 4px; }
        .strength-label span:first-child { color: #64748b; }
        .strength-label span:last-child { font-weight: 600; }
        .strength-label span.weak { color: var(--danger); }
        .strength-label span.medium { color: var(--warning); }
        .strength-label span.strong { color: var(--success); }
        .strength-bar { height: 4px; background: #e2e8f0; border-radius: 2px; overflow: hidden; }
        .strength-fill { height: 100%; border-radius: 2px; transition: all 0.3s; }
        .strength-fill.weak { width: 33%; background: var(--danger); }
        .strength-fill.medium { width: 66%; background: var(--warning); }
        .strength-fill.strong { width: 100%; background: var(--success); }

        /* ===== ACTIVITY LOG ===== */
        .activity-list { list-style: none; padding: 0; margin: 0; }
        .activity-item {
            display: flex; align-items: flex-start; gap: 14px; padding: 16px 0;
            border-bottom: 1px solid #f1f5f9;
        }
        .activity-item:last-child { border-bottom: none; padding-bottom: 0; }
        .activity-icon {
            width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
            display: flex; align-items: center; justify-content: center; font-size: 0.85rem;
        }
        .activity-icon.login { background: var(--success-light); color: var(--success); }
        .activity-icon.edit { background: var(--accent-light); color: var(--accent-color); }
        .activity-icon.password { background: var(--warning-light); color: var(--warning); }
        .activity-icon.logout { background: var(--danger-light); color: var(--danger); }

        .activity-content { flex: 1; min-width: 0; }
        .activity-title { font-size: 0.88rem; font-weight: 600; color: #1e293b; margin-bottom: 2px; }
        .activity-meta { font-size: 0.78rem; color: #94a3b8; }
        .activity-time { font-size: 0.78rem; color: #94a3b8; white-space: nowrap; }

        /* ===== NOTIFICATION SETTINGS ===== */
        .toggle-list { list-style: none; padding: 0; margin: 0; }
        .toggle-item {
            display: flex; align-items: center; justify-content: space-between;
            padding: 16px 0; border-bottom: 1px solid #f1f5f9;
        }
        .toggle-item:last-child { border-bottom: none; padding-bottom: 0; }
        .toggle-info { display: flex; align-items: center; gap: 12px; }
        .toggle-icon {
            width: 40px; height: 40px; border-radius: 10px;
            display: flex; align-items: center; justify-content: center; font-size: 0.9rem; flex-shrink: 0;
        }
        .toggle-icon.email { background: var(--accent-light); color: var(--accent-color); }
        .toggle-icon.sms { background: var(--success-light); color: var(--success); }
        .toggle-icon.push { background: var(--warning-light); color: var(--warning); }
        .toggle-icon.marketing { background: var(--danger-light); color: var(--danger); }
        .toggle-text { flex: 1; }
        .toggle-title { font-size: 0.9rem; font-weight: 600; color: #1e293b; margin-bottom: 2px; }
        .toggle-desc { font-size: 0.78rem; color: #94a3b8; }

        .toggle-switch {
            position: relative; width: 44px; height: 24px; flex-shrink: 0; cursor: pointer;
        }
        .toggle-switch input { opacity: 0; width: 0; height: 0; }
        .toggle-slider {
            position: absolute; top: 0; left: 0; right: 0; bottom: 0;
            background: #e2e8f0; border-radius: 24px; transition: 0.3s;
        }
        .toggle-slider::before {
            content: ''; position: absolute; height: 18px; width: 18px; left: 3px; bottom: 3px;
            background: white; border-radius: 50%; transition: 0.3s; box-shadow: 0 1px 3px rgba(0,0,0,0.2);
        }
        .toggle-switch input:checked + .toggle-slider { background: var(--accent-color); }
        .toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

    /* ===== SMART DATE PICKER ===== */
        .date-picker-wrap { position: relative; }
        .date-picker-input {
            height: 42px; padding: 0 14px; padding-right: 40px; border: 1.5px solid #e2e8f0; border-radius: 10px;
            font-size: 0.88rem; color: #1e293b; background: #fff; transition: all 0.2s;
            font-family: 'Inter', sans-serif; width: 100%; cursor: pointer;
        }
        .date-picker-input:focus { outline: none; border-color: var(--accent-color); box-shadow: 0 0 0 3px rgba(99,102,241,0.1); }
        .date-picker-icon {
            position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
            color: #94a3b8; pointer-events: none; font-size: 0.9rem;
        }

        .date-dropdown {
            position: absolute; top: calc(100% + 6px); left: 0; width: 320px;
            background: #fff; border-radius: 14px; box-shadow: 0 10px 40px rgba(0,0,0,0.12);
            border: 1px solid #e2e8f0; z-index: 9999; opacity: 0; visibility: hidden;
            transform: translateY(-6px); transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        }
        .date-dropdown.show { opacity: 1; visibility: visible; transform: translateY(0); }

        .date-dropdown-header {
            padding: 14px 16px; background: linear-gradient(135deg, #f8fafc, #f1f5f9);
            border-bottom: 1px solid #e2e8f0; font-weight: 600; color: #1e293b; font-size: 0.85rem;
            display: flex; align-items: center; gap: 8px;
        }

        .date-presets {
            display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; padding: 10px;
        }
        .date-preset-btn {
            padding: 8px 10px; border-radius: 8px; border: 1px solid #e2e8f0; background: #fff;
            color: #475569; font-size: 0.8rem; font-weight: 500; cursor: pointer;
            transition: all 0.15s; text-align: center; font-family: 'Inter', sans-serif;
        }
        .date-preset-btn:hover { background: #f8fafc; border-color: var(--accent-color); color: var(--accent-color); }
        .date-preset-btn.active { background: var(--accent-color); color: white; border-color: var(--accent-color); }

        .date-custom-section { padding: 10px 16px 16px; border-top: 1px solid #f1f5f9; }
        .date-custom-label { font-size: 0.75rem; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
        .date-range-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
        .date-range-input {
            height: 36px; padding: 0 10px; border: 1.5px solid #e2e8f0; border-radius: 8px;
            font-size: 0.82rem; color: #1e293b; font-family: 'Inter', sans-serif; width: 100%;
        }
        .date-range-input:focus { outline: none; border-color: var(--accent-color); }
        .date-range-input::-webkit-calendar-picker-indicator { cursor: pointer; opacity: 0.5; }

        .date-apply-btn {
            width: 100%; margin-top: 10px; padding: 8px; border-radius: 8px; border: none;
            background: var(--accent-color); color: white; font-size: 0.82rem; font-weight: 600;
            cursor: pointer; transition: all 0.2s; font-family: 'Inter', sans-serif;
        }
        .date-apply-btn:hover { background: var(--accent-hover); }

        /* ===== FILTER ACTIONS ===== */
        .filter-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; padding-top: 16px; border-top: 1px solid #f1f5f9; }
        .btn-filter {
            background: linear-gradient(135deg, #1e293b, #334155); color: white; border: none;
            padding: 10px 24px; border-radius: 10px; font-size: 0.88rem; font-weight: 600;
            display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
            transition: all 0.2s;
        }
        .btn-filter:hover { background: linear-gradient(135deg, #0f172a, #1e293b); transform: translateY(-1px); }
        .btn-reset {
            background: #f1f5f9; color: #64748b; border: 1.5px solid #e2e8f0;
            padding: 10px 20px; border-radius: 10px; font-size: 0.88rem; font-weight: 500;
            display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
            transition: all 0.2s; font-family: 'Inter', sans-serif;
        }
        .btn-reset:hover { background: #e2e8f0; color: #475569; }

        /* ===== BULK ACTIONS BAR ===== */
        .bulk-bar {
            background: #ffffff; border-radius: 12px; border: 1px solid #e2e8f0;
            box-shadow: 0 1px 3px rgba(0,0,0,0.04); padding: 14px 20px;
            display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
            margin-bottom: 20px;
        }
        .bulk-left { display: flex; align-items: center; gap: 12px; }
        .bulk-select { height: 40px; padding: 0 36px 0 14px; border: 1.5px solid #e2e8f0; border-radius: 10px;
            font-size: 0.88rem; color: #1e293b; background: #fff; min-width: 180px;
            appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; cursor: pointer; font-family: 'Inter', sans-serif; }
        .bulk-select:focus { outline: none; border-color: var(--accent-color); }
        .btn-assign {
            background: linear-gradient(135deg, var(--accent-color), #8b5cf6); color: white; border: none;
            padding: 10px 20px; border-radius: 10px; font-size: 0.88rem; font-weight: 500;
            display: inline-flex; align-items: center; gap: 8px; cursor: pointer; transition: all 0.2s;
        }
        .btn-assign:hover { background: linear-gradient(135deg, var(--accent-hover), #7c3aed); transform: translateY(-1px); }
        .btn-assign:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
        .selected-count { font-size: 0.85rem; color: #475569; font-weight: 500; }
        .selected-count span { background: #22c55e; color: white; padding: 2px 8px; border-radius: 12px; font-size: 0.75rem; font-weight: 700; }


    /* ===== button  ===== */

        .btn-add {
            background: linear-gradient(135deg, var(--accent-color), #8b5cf6); color: white; border: none;
            padding: 10px 20px; border-radius: 10px; font-size: 0.875rem; font-weight: 500;
            display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
            transition: all 0.2s; box-shadow: 0 2px 8px rgba(99,102,241,0.2);
        }
        .btn-add:hover {
            background: linear-gradient(135deg, var(--accent-hover), #7c3aed);
            box-shadow: 0 4px 16px rgba(99,102,241,0.35); transform: translateY(-1px); color: white;
        }
/*=======modules ========*/
 /* ===== MODULES GRID ===== */
        .modules-container {
            padding: 0px 0px;
        }
        .modules-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 24px;
        }
        /* ===== MODULE CARD ===== */
        .module-card {
            background: #FFFFFF;
            border: 1px solid #E2E8F0;
            border-radius: 12px;
            padding: 24px;
            position: relative;
            transition: all 0.25s ease;
            box-shadow: 0 1px 3px rgba(30, 41, 59, 0.08);
            cursor: pointer;
            text-decoration: none;
            display: block;
            color: inherit;
        }

        .module-card:hover {
            box-shadow: 0 8px 25px rgba(30, 41, 59, 0.12);
            transform: translateY(-3px);
            border-color: #CBD5E1;
        }

        /* Top Accent Bar */
        .module-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 8px;
            right: 8px;
            height: 3px;
            border-radius: 0 0 4px 4px;
            opacity: 0.7;
        }

        /* Accent colors per module */
        .module-card.users::before     { background: #6366F1; }
        .module-card.roles::before     { background: #0EA5E9; }
        .module-card.products::before { background: #10B981; }
        .module-card.api::before       { background: #D97706; }
        .module-card.company::before   { background: #EC4899; }
        .module-card.login::before     { background: #8B5CF6; }
        .module-card.pickup::before    { background: #F59E0B; }
        .module-card.courier::before   { background: #14B8A6; }

        /* Card Header: Title + Arrow */
        .card-header {
          padding: 16px 20px;
          background: #f8fafc;
          border-bottom: 1px solid #e2e8f0;
          border-radius: 10px 10px 0 0;
          font-size: 1rem;
          font-weight: 700;
          color: #1e293b;
          display: flex;
          align-items: center;
          gap: 10px;
        }

        .card-title {
            font-size: 16px;
            font-weight: 700;
            color: #1E293B;
        }

        .card-header .fa-user {
  color: #3b82f6;
  font-size: 1rem;
}

        /* Action Arrow Button */
        .action-arrow {
            width: 40px;
            height: 40px;
            border-radius: 10px;
            background: #EFF6FF;
            color: #2563EB;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 16px;
            transition: all 0.2s ease;
            flex-shrink: 0;
            margin-left: 12px;
        }

        .module-card:hover .action-arrow {
            background: #2563EB;
            color: #FFFFFF;
        }

        /* Status Badge */
        .status-badge {
            display: inline-block;
            padding: 4px 12px;
            background: #10B981;
            color: #FFFFFF;
            font-size: 12px;
            font-weight: 600;
            border-radius: 6px;
            margin-bottom: 16px;
        }

        /* Description */
        .card-description {
            font-size: 13px;
            color: #64748B;
            line-height: 1.6;
        }

        /* ===== RESPONSIVE ===== */
        @media (max-width: 1200px) {
            .modules-grid {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        @media (max-width: 768px) {
            .modules-grid {
                grid-template-columns: 1fr;
            }
            .page-header {
                flex-direction: column;
                align-items: flex-start;
                gap: 12px;
            }
        }

        /* ===== STATS CARDS ===== */
        .stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 28px; }
        @media (max-width: 991px) { .stats-row { grid-template-columns: repeat(2, 1fr); } }
        @media (max-width: 575px) { .stats-row { grid-template-columns: 1fr; } }

        .stat-card {
            background: #ffffff; border-radius: 16px; border: 1px solid #e2e8f0;
            box-shadow: 0 1px 3px rgba(0,0,0,0.04); padding: 20px 24px;
            display: flex; align-items: center; gap: 16px;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }
        .stat-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.06); }

        .stat-icon {
            width: 52px; height: 52px; border-radius: 14px;
            display: flex; align-items: center; justify-content: center;
            font-size: 1.3rem; flex-shrink: 0;
        }
        .stat-icon.purple { background: var(--accent-light); color: var(--accent-color); }
        .stat-icon.green { background: var(--success-light); color: var(--success); }
        .stat-icon.orange { background: var(--warning-light); color: var(--warning); }
        .stat-icon.red { background: var(--danger-light); color: var(--danger); }
        .stat-icon.blue { background: var(--info-light); color: var(--info); }

        .stat-info { flex: 1; }
        .stat-label { font-size: 0.8125rem; color:var(--text-muted); font-weight: 500; margin-bottom: 4px; }
        .stat-value { font-size: 1.5rem; font-weight: 700; color:var(--text-primary); line-height: 1; }

        /* ===== FILTER BAR ===== */
        .filter-bar {
            display: flex; align-items: center; gap: 16px; margin-bottom: 24px; flex-wrap: wrap;
        }

        .search-wrap {
            position: relative; flex: 1; max-width: 320px;
        }
        .search-input {
            width: 100%; height: 44px; padding: 0 16px 0 44px; border: 1.5px solid #e2e8f0;
            border-radius: 12px; font-size: 0.9rem; color: #1e293b; background: #fff;
            transition: all 0.2s; font-family: 'Inter', sans-serif;
        }
        .search-input:focus { outline: none; border-color: var(--accent-color); box-shadow: 0 0 0 3px rgba(99,102,241,0.1); }
        .search-input::placeholder { color: #94a3b8; }
        .search-icon {
            position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
            color: #94a3b8; font-size: 0.9rem; pointer-events: none;
        }

        .filter-select {
            height: 44px; padding: 0 40px 0 16px; border: 1.5px solid #e2e8f0;
            border-radius: 12px; font-size: 0.9rem; color: #1e293b; background: #fff;
            appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
            background-repeat: no-repeat; background-position: right 16px center;
            cursor: pointer; font-family: 'Inter', sans-serif; min-width: 140px;
            transition: all 0.2s;
        }
        .filter-select:focus { outline: none; border-color: var(--accent-color); box-shadow: 0 0 0 3px rgba(99,102,241,0.1); }

        /* ===== TABLE CARD ===== */
        .table-card {
            background: #ffffff; border-radius: 16px; border: 1px solid #e2e8f0;
            box-shadow: 0 1px 3px rgba(0,0,0,0.04); overflow: hidden;
        }
        .table {
            margin: 0;
        }

        .table thead th {
            background: #f8fafc;
            color: #475569;
            font-weight: 600;
            font-size: 0.8rem;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            padding: 14px 20px;
            border-bottom: 2px solid #e2e8f0;
            white-space: nowrap;
        }

        .table tbody td {
            padding: 16px 10px;
            color: #334155;
            font-size: 0.9rem;
            vertical-align: middle;
            border-bottom: 1px solid #f1f5f9;
        }

        .table tbody tr:hover {
            background: #f8fafc;
        }

        .table tbody tr:last-child td {
            border-bottom: none;
        }

         /* User Cell */
        .user-cell { display: flex; align-items: center; gap: 14px; }
        .user-avatar {
            width: 42px; height: 42px; border-radius: 50%; object-fit: cover;
            font-size: 1rem; font-weight: 700; color: white;
            display: flex; align-items: center; justify-content: center;
            flex-shrink: 0; text-transform: uppercase;
        }
        .user-info { display: flex; flex-direction: column; gap: 2px; }
        .user-name { font-weight: 600; color: #1e293b; font-size: 0.92rem; }
        .user-email { color: #94a3b8; font-size: 0.8rem; }

        /* Role Badge */
        .role-badge {
            display: inline-flex; align-items: center; gap: 6px;
            padding: 6px 14px; border-radius: 10px; font-size: 0.82rem;
            font-weight: 500; background: var(--accent-light); color: var(--accent-color);
        }
        .role-badge.empty { background: #f1f5f9; color: #94a3b8; }

        /* Status Badge */
        .status-badge {
            display: inline-flex; align-items: center; gap: 6px;
            padding: 6px 14px; border-radius: 20px; font-size: 0.8rem;
            font-weight: 600;
        }
        .status-badge.active { background: var(--success-light); color: #166534; }
        .status-badge.active::before { content: ''; width: 6px; height: 6px; background: var(--success); border-radius: 50%; }
        .status-badge.inactive { background: #f1f5f9; color: #64748b; }
        .status-badge.inactive::before { content: ''; width: 6px; height: 6px; background: #cbd5e1; border-radius: 50%; }

        /* Pagination */
        .pagination-custom {
            display: flex; justify-content: space-between; align-items: center;
            padding: 16px 20px; border-top: 1px solid #f1f5f9;
        }
        .pagination-custom .info { color: #64748b; font-size: 0.85rem; }
        .pagination-custom .page-btn {
            width: 36px; height: 36px; border-radius: 8px; border: 1px solid #e2e8f0;
            background: #fff; color: #475569; display: inline-flex; align-items: center;
            justify-content: center; cursor: pointer; transition: all 0.2s;
            font-size: 0.875rem; font-weight: 500;
        }
        .pagination-custom .page-btn:hover { background: #f8fafc; border-color: #cbd5e1; }
        .pagination-custom .page-btn.active { background: var(--accent-color); color: white; border-color: var(--accent-color); }
        
.avatar-a { background: #6366F1; }
.avatar-b { background: #0EA5E9; }
.avatar-c { background: #10B981; }
.avatar-d { background: #D97706; }
.avatar-e { background: #EC4899; }
.avatar-f { background: #8B5CF6; }
.avatar-g { background: #F59E0B; }
.avatar-h { background: #14B8A6; }
.avatar-i { background: #6366F1; }
.avatar-j { background: #0EA5E9; }
.avatar-k { background: #10B981; }
.avatar-l { background: #D97706; }
.avatar-m { background: #EC4899; }
.avatar-n { background: #0EA5E9; } 
.avatar-o { background: #8B5CF6; }
.avatar-p { background: #F59E0B; }
.avatar-q { background: #14B8A6; }
.avatar-r { background: #6366F1; }
.avatar-s { background: #0EA5E9; }
.avatar-t { background: #10B981; }
.avatar-u { background: #D97706; }
.avatar-v { background: #EC4899; }
.avatar-w { background: #8B5CF6; }
.avatar-x { background: #F59E0B; }
.avatar-y { background: #14B8A6; }
.avatar-z { background: #6366F1; }

 /* Filters Bar */
        .filters-bar {
            background: var(--card-bg);
            border-radius: var(--radius-lg);
            padding: 16px 20px;
            box-shadow: var(--card-shadow);
            margin-bottom: 24px;
            display: flex;
            align-items: center;
            gap: 16px;
            flex-wrap: wrap;
        }

        .search-box {
            position: relative;
            flex: 1;
            min-width: 280px;
            max-width: 400px;
        }

        .search-box input {
            width: 100%;
            padding: 10px 14px 10px 40px;
            border: 1px solid var(--border-color);
            border-radius: var(--radius-md);
            background: var(--input-bg);
            font-size: 0.875rem;
            color: var(--text-primary);
            transition: var(--transition);
        }

        .search-box input:focus {
            outline: none;
            border-color: var(--accent-color);
            background: var(--card-bg);
            box-shadow: 0 0 0 3px var(--accent-light);
        }

        .search-box input::placeholder {
            color: var(--text-muted);
        }

        .search-box i {
            position: absolute;
            left: 14px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-muted);
            font-size: 0.875rem;
        }

        .filter-dropdown {
            position: relative;
        }
     /* ============== EDIT PRODUCT PAGE ============== */
        .edit-container {
            max-width: 900px;
            margin: 0 auto;
        }

        .form-card {
            background: var(--card-bg);
            border-radius: var(--radius-lg);
            box-shadow: var(--card-shadow);
            overflow: hidden;
            margin-bottom: 24px;
        }

        .form-card-header {
            padding: 24px 28px;
            border-bottom: 1px solid var(--border-light);
            display: flex;
            align-items: center;
            gap: 16px;
        }

        .form-card-title {
            font-size: 1.125rem;
            font-weight: 700;
            color: var(--text-primary);
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .form-card-title i {
            color: var(--accent-color);
            font-size: 1rem;
        }

        .form-card-body {
            padding: 28px;
        }

        .form-group.full-width {
            grid-column: 1 / -1;
        }

        .form-label {
            font-size: 0.875rem;
            font-weight: 600;
            color: var(--text-primary);
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .form-label .required {
            color: var(--danger);
        }

        .form-hint {
            font-size: 0.75rem;
            color: var(--text-muted);
            margin-top: -4px;
        }

        .form-control {
            padding: 11px 14px;
            border: 1px solid var(--border-color);
            border-radius: var(--radius-md);
            background: var(--input-bg);
            font-size: 0.9375rem;
            color: var(--text-primary);
            transition: var(--transition);
            width: 100%;
        }

        .form-control:focus {
            outline: none;
            border-color: var(--accent-color);
            background: var(--card-bg);
            box-shadow: 0 0 0 3px var(--accent-light);
        }

        .form-control::placeholder {
            color: var(--text-muted);
        }

        textarea.form-control {
            resize: vertical;
            min-height: 100px;
        }

        select.form-control {
            cursor: pointer;
            appearance: none;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 14px center;
            padding-right: 36px;
        }

        /* Image Upload */
        .image-upload {
            border: 2px dashed var(--border-color);
            border-radius: var(--radius-lg);
            padding: 40px;
            text-align: center;
            transition: var(--transition);
            cursor: pointer;
            background: var(--input-bg);
        }

        .image-upload:hover {
            border-color: var(--accent-color);
            background: var(--accent-light);
        }

        .image-upload i {
            font-size: 1.1rem;
            color: var(--card-bg);
        }

        .image-upload-text {
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 4px;
        }

        .image-upload-hint {
            font-size: 0.8125rem;
            color: var(--text-muted);
        }
        .image-upload.has-error {
        border-color: var(--danger);
        background: var(--danger-light);
        }
         .btn-success {
            background: linear-gradient(135deg, var(--success), #16a34a);
            color: white;
            box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
        }

        .btn-success:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 16px rgba(34, 197, 94, 0.4);
        }

        .btn-danger {
            background: linear-gradient(135deg, var(--danger), #dc2626);
            color: white;
            box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
        }

        .btn-danger:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4);
        }
        .btn {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 10px 20px;
        border-radius: var(--radius-md);
        font-size: 0.715rem;
        font-weight: 600;
        border: none;
        cursor: pointer;
        transition: var(--transition);
        text-decoration: none;
    }
    .btn-secondary {
        background: var(--card-bg);
        color: var(--text-secondary);
        border: 1px solid var(--border-color);
     }
     .btn-secondary:hover {
        color: var(--text-secondary);
        background: var(--border-light);
        border-color: var(--text-muted);
     }
     .form-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 28px;
    border-top: 1px solid var(--border-light);
    background: var(--border-light);
    }

    /* Pagination Container */
.pagination {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Pagination Items */
.pagination li {
    display: flex;
}

/* Pagination Links */
.pagination li a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* Hover State */
.pagination li:not(.active) a:hover {
    background: var(--accent-light);
    color: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.15);
}

/* Active State */
.pagination li.active a {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    color: white;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
    cursor: default;
    pointer-events: none;
}

/* Focus State for Accessibility */
.pagination li a:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--accent-light);
}

/* Disabled State (if you add later) */
.pagination li.disabled a {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
    background: var(--input-bg);
    color: var(--text-muted);
}

/* Previous/Next Arrows (if you add them later) */
.pagination li a[aria-label="Previous"],
.pagination li a[aria-label="Next"] {
    padding: 0 12px;
    font-size: 0.75rem;
}

/* Responsive */
@media (max-width: 640px) {
    .pagination li a {
        min-width: 36px;
        height: 36px;
        padding: 0 10px;
        font-size: 0.8125rem;
    }
}

.btn-cancel-preview {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--danger);
    color: white;
    border: 2px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3);
    font-size: 0.75rem;
    z-index: 10;
}

.btn-cancel-preview:hover {
    background: #dc2626;
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.4);
}

.btn-cancel-preview:active {
    transform: scale(0.95);
}
/* user profile */
.content-area {
flex: 1;
padding:0px;
}
.form-layout {
            display: grid;
            grid-template-columns: 1fr 380px;
            gap: 24px;
            align-items: start;
        }

        .form-card-icon {
             width: 48px;
            height: 48px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.25rem;
            flex-shrink: 0;
             margin-top: 0;
             align-self: center;
        }

        .form-card-icon.purple { background: var(--accent-light); color: var(--accent-color); }
        .form-card-icon.green { background: var(--success-light); color: var(--success); }
        .form-card-icon.gray { background: var(--border-light); color: var(--text-secondary); }

        .form-card-title-group {
    display: flex;
    flex-direction: column;
    justify-content: center;  /* Ensures vertical centering */
}

        .form-card-title-group h2 {
            font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
        }

        .form-card-title-group p {
             font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 2px;
    line-height: 0;
        }

        .form-card-body {
            padding: 24px 28px;
            border-top: 1px solid var(--border-light);
        }
/* Input with icon */
        .input-icon-wrap {
            position: relative;
        }

        .input-icon-wrap .form-control {
            padding-left: 42px;
        }

        .input-icon-wrap .input-prefix {
            position: absolute;
            left: 14px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-muted);
            font-size: 0.875rem;
        }

        .input-icon-wrap .input-suffix {
            position: absolute;
            right: 14px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-muted);
            cursor: pointer;
            font-size: 0.875rem;
        }

        .input-icon-wrap .input-suffix:hover {
            color: var(--accent-color);
        }
    /* Permissions Card */
        .permissions-card {
            background: var(--card-bg);
            border-radius: var(--radius-lg);
            box-shadow: var(--card-shadow);
            overflow: hidden;
            min-height: 400px;
        }

        .permissions-card .form-card-header {
            border-bottom: 1px solid var(--border-light);
        }

        .permissions-empty {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 60px 28px;
            text-align: center;
            min-height: 300px;
        }

        .permissions-empty i {
            font-size: 2.5rem;
            color: var(--text-muted);
            margin-bottom: 16px;
            opacity: 0.5;
        }

        .permissions-empty p {
            color: var(--text-muted);
            font-size: 0.9375rem;
        }
 /* Toggle Switch */
        .toggle-group {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .toggle-switch {
            position: relative;
            width: 48px;
            height: 26px;
            background: var(--border-color);
            border-radius: 13px;
            cursor: pointer;
            transition: var(--transition);
        }

        .toggle-switch.active {
            background: linear-gradient(135deg, var(--success), #16a34a);
        }

        .toggle-switch::after {
            content: '';
            position: absolute;
            top: 3px;
            left: 3px;
            width: 20px;
            height: 20px;
            background: white;
            border-radius: 50%;
            transition: var(--transition);
            box-shadow: 0 1px 3px rgba(0,0,0,0.2);
        }

        .toggle-switch.active::after {
            left: 25px;
        }

        .toggle-label {
            font-size: 0.875rem;
            font-weight: 600;
            color: var(--text-primary);
        }

.journey-popup{
    position: fixed;
    right: 50px;
    top: 100px;
    width: 420px;
    max-height: 80vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #4cb64c;
    z-index: 9999;
    display: none;
}

.popup-header{
    padding: 15px;
    border-bottom: 1px solid #ddd;
    display:flex;
    justify-content:space-between;
    align-items:center;
    position: sticky;
    top:0;
    background:#fff;
    z-index:10;
}

.popup-body{
    padding:15px;
}
 .assign-lead-wrapper {
  display: flex;
  align-items: center;
  gap: 10px; /* space between button and text */
  font-size: 14px;
  color: #333;
  margin-left: 10px;
}

    /* Filter card */
  .filter-card { background:#fff; border:1.5px solid #e8edf2; border-radius:12px; padding:16px 20px; margin-bottom:20px; }
  .form-label  { font-size:.75rem; font-weight:600; text-transform:uppercase; letter-spacing:.04em; color:#5a6a7e; margin-bottom:5px; }
  .form-control, .form-select { border:1.5px solid #dde3ec; border-radius:8px; font-size:.84rem; padding:8px 12px; font-family:inherit; }
  .form-control:focus, .form-select:focus { border-color:#3b82f6; box-shadow:0 0 0 3px rgba(59,130,246,.1); }
  .btn-filter { background:#3b82f6; border:none; color:#fff; font-weight:600; font-size:.84rem; padding:8px 18px; border-radius:8px; }
  .btn-filter:hover { background:#2563eb; color:#fff; }
  .btn-reset  { background:#f1f5f9; border:1.5px solid #dde3ec; color:#5a6a7e; font-weight:500; font-size:.84rem; padding:8px 14px; border-radius:8px; }
  .btn-reset:hover { background:#e2e8f0; }

  /* Table */
  .table-card { background:#fff; border:1.5px solid #e8edf2; border-radius:12px; overflow:hidden; }
  .table-head { padding:14px 20px; border-bottom:1px solid #f0f3f7; display:flex; align-items:center; justify-content:space-between; background:#fafbfc; }
  .table-head h6 { font-size:.875rem; font-weight:700; color:#1a2332; margin:0; }

     .avatar-sm { width:30px; height:30px; border-radius:50%; background:linear-gradient(135deg,#3b82f6,#6366f1); display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:700; color:#fff; flex-shrink:0; }
  .stat-card { background:#fff; border:1.5px solid #e8edf2; border-radius:12px; padding:18px 20px; }
  .stat-icon { width:42px; height:42px; border-radius:10px; display:flex; align-items:center; justify-content:center; font-size:18px; margin-bottom:10px; }
  .stat-val   { font-size:1.6rem; font-weight:700; color:#1a2332; line-height:1; }
  


  
 /* Login */
.event-badge.event-login {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

/* Logout */
.event-badge.event-logout {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Force Logout */
.event-badge.event-force {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}
.event-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}
.bg-primary-model{
  background-color: var(--accent-color) !important;
}

/* ===== DASHBOARD BADGES & UTILS ===== */
.badge-pos { display:inline-block; font-size:10px; padding:2px 8px; border-radius:99px; font-weight:600; background:#dcfce7; color:#15803d; }
.badge-neg { display:inline-block; font-size:10px; padding:2px 8px; border-radius:99px; font-weight:600; background:#fee2e2; color:#b91c1c; }
.badge-neu { display:inline-block; font-size:10px; padding:2px 8px; border-radius:99px; font-weight:600; background:#dbeafe; color:#1d4ed8; }

.metric-change { font-size:11px; font-weight:500; margin-top:4px; }
.metric-change.up   { color: var(--success); }
.metric-change.down { color: var(--danger); }
.metric-change.neutral { color: var(--text-muted); }

.mini-progress { width:50px; height:6px; background:var(--border-light); border-radius:99px; overflow:hidden; flex-shrink:0; }
.mini-progress-fill { height:100%; background:var(--success); border-radius:99px; }

.td-green  { color:#15803d; font-weight:500; }
.td-red    { color:#b91c1c; }
.td-orange { color:#92400e; }
.td-blue   { color:#1d4ed8; }
/* ===== SHARED FILTER PANEL (logi-filter) ===== */
.logi-filter-panel {
    background: #fff;
    border: 1.5px solid #e8edf5;
    border-radius: 14px;
    margin-bottom: 18px;
    overflow: visible;
    box-shadow: 0 1px 4px rgba(99,102,241,.06);
}
.logi-filter-header {
    background: linear-gradient(90deg, #6366f1 0%, #818cf8 100%);
    border-radius: 12px 12px 0 0;
    padding: 9px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
}
.logi-filter-header:hover { filter: brightness(1.06); }
.logi-filter-title {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    letter-spacing: .05em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 7px;
}
.logi-filter-body {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px 16px;
    padding: 14px 18px 10px;
    align-items: flex-end;
}
.logi-filter-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.logi-filter-field--date { grid-column: span 1; }
@media (max-width: 1200px) { .logi-filter-body { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 768px)  { .logi-filter-body { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .logi-filter-body { grid-template-columns: 1fr; } }
.logi-filter-field label {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #6366f1;
    margin: 0;
}
.logi-input {
    border: 1.5px solid #e0e5f0;
    border-radius: 8px;
    padding: 7px 11px;
    font-size: 13px;
    font-family: inherit;
    color: #1e293b;
    background: #f8faff;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    width: 100%;
}
.logi-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,.12);
    background: #fff;
}
.logi-filter-footer {
    padding: 10px 18px 14px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    border-top: 1px solid #f0f3fa;
}
.logi-btn-apply {
    background: linear-gradient(135deg, #6366f1, #818cf8);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 7px 20px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: opacity .15s, transform .15s;
}
.logi-btn-apply:hover { opacity: .88; transform: translateY(-1px); }
.logi-btn-download {
    background: #ecfdf5;
    color: #065f46;
    border: 1.5px solid #a7f3d0;
    border-radius: 8px;
    padding: 7px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    transition: background .15s;
}
.logi-btn-download:hover { background: #d1fae5; color: #065f46; }
.logi-btn-reset {
    background: #f1f5f9;
    color: #64748b;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 7px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background .15s;
}
.logi-btn-reset:hover { background: #e2e8f0; color: #475569; }
.logi-btn-import {
    background: #f8fafc;
    color: #475569;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 7px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    transition: background .15s, color .15s, border-color .15s;
}
.logi-btn-import:hover { background: #ede9fe; color: #6366f1; border-color: #a5b4fc; }
.logi-btn-download {
    background: #f0fdf4;
    color: #16a34a;
    border: 1.5px solid #bbf7d0;
    border-radius: 8px;
    padding: 7px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    transition: background .15s, color .15s, border-color .15s;
}
.logi-btn-download:hover { background: #16a34a; color: #fff; border-color: #16a34a; }

/* ===== STAT CARDS (orders summary) ===== */
.logi-stat-card {
    background: #fff;
    border: 1px solid #e8edf5;
    border-radius: 10px;
    padding: 11px 14px 10px;
    min-width: 100px;
    cursor: default;
    transition: border-color .15s, box-shadow .15s;
}
.logi-stat-card:hover { border-color: #6366f1; box-shadow: 0 2px 8px rgba(99,102,241,.10); }
.logi-stat-rto { background: #fff5f5; border-color: #fecaca; }
.logi-stat-rto:hover { border-color: #ef4444; box-shadow: 0 2px 8px rgba(239,68,68,.12); }
.logi-stat-label { font-size: 10px; font-weight: 500; color: #94a3b8; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 3px; }
.logi-stat-rto .logi-stat-label { color: #f87171; }
.logi-stat-val { font-size: 22px; font-weight: 500; line-height: 1.1; margin-bottom: 7px; }
.logi-stat-bar-track { height: 2px; background: #f1f5f9; border-radius: 2px; overflow: hidden; }
.logi-stat-rto .logi-stat-bar-track { background: #fecaca; }
.logi-stat-bar-fill { height: 100%; border-radius: 2px; min-width: 2px; transition: width .4s ease; }

/* ===== BULK ACTION BAR ===== */
.bulk-action-btn {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 10px; font-size: 12px; font-weight: 600;
    border-radius: 6px; border: none; cursor: pointer;
    line-height: 1.4; white-space: nowrap; transition: opacity .15s;
}
.bulk-action-btn:hover { opacity: .82; }
.btn-bulk-primary { background: #6366f1; color: #fff; }
.btn-bulk-warning { background: #f59e0b; color: #fff; }
.btn-bulk-success { background: #10b981; color: #fff; }
.btn-bulk-ghost   { background: #e2e8f0; color: #475569; }
.bulk-badge {
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.3); border-radius: 10px;
    min-width: 18px; height: 16px; padding: 0 4px;
    font-size: 10px; font-weight: 700; line-height: 1;
}
.bulk-divider { width: 1px; height: 20px; background: #cbd5e1; margin: 0 2px; flex-shrink: 0; }

/* ===== ROW ACTION BUTTONS ===== */
.row-action-btn { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; font-size: 11px; font-weight: 600; border-radius: 5px; border: none; cursor: pointer; }
.row-btn-book    { background: #6366f1; color: #fff; }
.row-btn-label   { background: #e0e7ff; color: #4338ca; }
.row-btn-invoice { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }

/* ===== COPY CHIP ===== */
.copy-chip { cursor: pointer; position: relative; }
.copy-chip::after { content: 'Copy'; position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); background: #334155; color: #fff; font-size: 10px; padding: 2px 7px; border-radius: 4px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s; }
.copy-chip:hover::after { opacity: 1; }
.copy-chip.copied::after { content: 'Copied ✓'; background: #10b981; opacity: 1; }

/* ===== SORT LINKS ===== */
.sort-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #475569;
    text-decoration: none;
    font-weight: 600;
    font-size: inherit;
    white-space: nowrap;
    transition: color .15s;
}
.sort-link:hover { color: #6366f1; }
.sort-link-active { color: #6366f1; }
.sort-arrows {
    display: inline-flex;
    flex-direction: column;
    line-height: 1;
    gap: 0;
    vertical-align: middle;
}
.sort-arr {
    font-size: 7px;
    line-height: 1;
    color: #cbd5e1;
    display: block;
    transition: color .15s;
}
.sort-arr-on { color: #6366f1; }
.sort-link:hover .sort-arr { color: #a5b4fc; }
.sort-link:hover .sort-arr-on { color: #6366f1; }

/* ===== COPY-VAL — click-to-copy ===== */
.copy-val {
    cursor: pointer;
    position: relative;
    transition: color .15s;
}
.copy-val:hover { color: #6366f1 !important; }
.copy-val::after {
    content: 'Copy';
    position: absolute;
    bottom: calc(100% + 5px);
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 5px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s;
    z-index: 20;
}
.copy-val:hover::after { opacity: 1; }
.copy-val--ok { color: #10b981 !important; }
.copy-val--ok::after { content: 'Copied ✓'; background: #10b981; opacity: 1; }

/* Lead ID cell */
.cell-id {
    font-size: 13px;
    font-weight: 700;
    color: #6366f1;
    display: inline-block;
}

/* Product cell */
.prod-name {
    display: block;
    font-size: 12px;
    color: #1e293b;
    line-height: 1.35;
    max-width: 160px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.prod-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 2px;
}
.prod-qty {
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    background: #6366f1;
    border-radius: 4px;
    padding: 0 5px;
    line-height: 1.7;
}
.prod-more {
    font-size: 10px;
    font-weight: 600;
    color: #6366f1;
    background: #ede9fe;
    border-radius: 4px;
    padding: 0 5px;
    line-height: 1.7;
}
.prod-none { font-size: 13px; color: #cbd5e1; }
.prod-row { display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 1px 0; }
.prod-row + .prod-row { border-top: 1px dashed #f1f5f9; margin-top: 3px; padding-top: 3px; }
.event-dispos {font-size: 10px;
    font-weight: 600;
    /* color: #6366f1; */
    background: #ede9fe;
    border-radius: 4px;
    padding: 0px 4px;
    display: inline-block;
    line-height: 1.7;
    }
/* ===== CRM CARD — shared section card ===== */
.crm-card {
    background: #fff;
    border: 1.5px solid #e8edf2;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(30,41,59,.05);
}
.crm-sticky { position: sticky; top: 20px; }
.crm-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 18px;
    border-bottom: 1.5px solid #f1f5f9;
    background: #fafbff;
}
.crm-card-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}
.crm-card-title {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: .01em;
}
.crm-card-body {
    padding: 18px;
}

/* ===== CRM FORM INPUTS ===== */
.crm-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #6366f1;
    margin-bottom: 5px;
}
.crm-required { color: #ef4444; margin-left: 1px; }
.crm-input {
    display: block;
    width: 100%;
    border: 1.5px solid #e0e5f0;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    font-family: inherit;
    color: #1e293b;
    background: #f8faff;
    outline: none;
    transition: border-color .15s, box-shadow .15s, background .15s;
    resize: vertical;
}
.crm-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,.12);
    background: #fff;
}
.crm-input::placeholder { color: #94a3b8; }
.error-msg {
    display: none;
    color: #ef4444;
    font-size: 11px;
    font-weight: 500;
    margin-top: 4px;
}
.error-border { border-color: #ef4444 !important; box-shadow: 0 0 0 3px rgba(239,68,68,.1) !important; }

/* ===== PRODUCT ADD BUTTON ===== */
.crm-add-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 8px 14px;
    background: #ede9fe;
    color: #6366f1;
    border: 1.5px solid #c7d2fe;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
}
.crm-add-btn:hover {
    background: #6366f1;
    color: #fff;
    border-color: #6366f1;
    box-shadow: 0 3px 10px rgba(99,102,241,.3);
}

/* ===== PRODUCT ROW IN TABLE ===== */
.crm-prod-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.crm-prod-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.crm-prod-name {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.3;
}
.crm-prod-sku {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 500;
}
.crm-prod-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, #6366f1, #818cf8);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    letter-spacing: .02em;
}

/* ===== PRODUCT REMOVE BUTTON ===== */
.crm-remove-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    background: #fef2f2;
    color: #dc2626;
    font-size: 11px;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.crm-remove-btn:hover { background: #dc2626; color: #fff; }

/* ===== PRODUCT TABLE ===== */
.crm-product-table thead th {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #6366f1;
    background: #fafbff;
    border-bottom: 1.5px solid #e8edf2;
    padding: 9px 12px;
}
.crm-product-table tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}
.crm-product-table tbody tr:last-child td { border-bottom: none; }
.crm-product-table tbody tr:hover td { background: #fafbff; }

/* Product summary bar */
.crm-product-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f5f3ff;
    border: 1.5px solid #e0e7ff;
    border-radius: 8px;
    padding: 8px 14px;
    margin-top: 12px;
    font-size: 13px;
    color: #475569;
}

/* ===== ORDER SUMMARY SIDEBAR ===== */
.crm-summary-rows {
    border: 1.5px solid #f1f5f9;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
}
.crm-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 14px;
    font-size: 13px;
    color: #475569;
    border-bottom: 1px solid #f1f5f9;
}
.crm-summary-row:last-child { border-bottom: none; }
.crm-grand-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 11px 14px;
    background: linear-gradient(135deg, #6366f1, #818cf8);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
}
.crm-collectable {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 14px;
    background: #f0fdf4;
    border: 1.5px solid #bbf7d0;
    border-radius: 8px;
    font-size: 13px;
    color: #15803d;
    margin-bottom: 4px;
}

/* ===== LEAD TABLE CELLS ===== */
.lead-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.3;
}
.lead-phone-row {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 2px;
    flex-wrap: wrap;
}
.lead-phone {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}
/* Duplicate badge */
.dup-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    border-radius: 20px;
    padding: 1px 7px;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    line-height: 1.6;
    transition: background .15s, border-color .15s, color .15s;
    white-space: nowrap;
}
.dup-badge:hover {
    background: #dc2626;
    color: #fff;
    border-color: #dc2626;
}
.dup-badge i { font-size: 9px; }

/* Date / time cells */
.cell-date {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    line-height: 1.4;
}
.cell-time {
    display: block;
    font-size: 11px;
    color: #94a3b8;
    font-weight: 400;
}

/* ===== LEADS TABLE TOOLBAR ===== */
.leads-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 4px;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
}
.leads-toolbar-count {
    font-size: 13px;
    color: #64748b;
}
.leads-toolbar-count strong { color: #1e293b; }
.leads-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.ltb-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    border: 1.5px solid transparent;
    transition: all .15s;
    white-space: nowrap;
}
.ltb-btn-download {
    background: #f0fdf4;
    color: #16a34a;
    border-color: #bbf7d0;
}
.ltb-btn-download:hover { background: #16a34a; color: #fff; border-color: #16a34a; }
.ltb-btn-import {
    background: #f8fafc;
    color: #475569;
    border-color: #e2e8f0;
}
.ltb-btn-import:hover { background: #ede9fe; color: #6366f1; border-color: #a5b4fc; }

/* ===== LEAD ACTION BUTTONS ===== */
.lead-actions {
    display: inline-flex;
    gap: 5px;
    align-items: center;
}
.lead-act-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 7px;
    font-size: 12px;
    text-decoration: none;
    border: none;
    outline: none;
    transition: background .15s, color .15s, transform .1s, box-shadow .15s;
    position: relative;
    cursor: pointer;
}
.lead-act-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 5px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s;
    z-index: 10;
}
.lead-act-btn:hover::after { opacity: 1; }
.lead-act-btn:focus { outline: none; box-shadow: none; }
.lead-act-btn:focus-visible { outline: 2px solid #6366f1; outline-offset: 2px; }
.lead-act-view {
    background: #ede9fe;
    color: #6366f1;
}
.lead-act-view:hover {
    background: #6366f1;
    color: #fff;
    box-shadow: 0 3px 10px rgba(99,102,241,.35);
    transform: translateY(-1px);
}
.lead-act-edit {
    background: #fef3c7;
    color: #d97706;
}
.lead-act-edit:hover {
    background: #f59e0b;
    color: #fff;
    box-shadow: 0 3px 10px rgba(245,158,11,.35);
    transform: translateY(-1px);
}

/* ===== LEADS PAGINATION ===== */
.leads-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 20px;
    border-top: 1px solid #f1f5f9;
    background: #fafbff;
    border-radius: 0 0 12px 12px;
}
.lpag-info {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.lpag-count {
    font-size: 13px;
    color: #64748b;
}
.lpag-count strong { color: #1e293b; }
.lpag-perpage-form {
    display: flex;
    align-items: center;
    gap: 6px;
}
.lpag-perpage-label {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}
.lpag-perpage-select {
    border: 1.5px solid #e2e8f0;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    padding: 4px 8px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s;
    outline: none;
}
.lpag-perpage-select:focus { border-color: #6366f1; }

.lpag-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}
.lpag-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    text-decoration: none;
    transition: all .15s;
    cursor: pointer;
}
.lpag-btn:hover:not(.lpag-disabled):not(.lpag-active) {
    background: #ede9fe;
    border-color: #a5b4fc;
    color: #4338ca;
}
.lpag-btn.lpag-active {
    background: linear-gradient(135deg, #6366f1, #818cf8);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 3px 10px rgba(99,102,241,.35);
}
.lpag-btn.lpag-disabled {
    opacity: .4;
    cursor: not-allowed;
    pointer-events: none;
}
.lpag-ellipsis {
    font-size: 13px;
    color: #94a3b8;
    padding: 0 4px;
    line-height: 32px;
}

/* ===== TOM SELECT — CRM INDIGO THEME ===== */
.ts-wrapper.logi-input { padding: 0; border: none; }
.ts-wrapper .ts-control {
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    min-height: 36px;
    padding: 4px 10px;
    font-size: 13px;
    color: #1e293b;
    box-shadow: none;
    transition: border-color .15s, box-shadow .15s;
    cursor: pointer;
}
.ts-wrapper .ts-control:hover { border-color: #a5b4fc; }
.ts-wrapper.focus .ts-control {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,.12);
    outline: none;
}
.ts-wrapper .ts-control input { font-size: 13px; color: #1e293b; }
.ts-wrapper .ts-control .item {
    background: #ede9fe;
    color: #4338ca;
    border-radius: 5px;
    padding: 1px 8px;
    font-size: 12px;
    font-weight: 600;
    border: none;
}
/* Dropdown */
.ts-dropdown {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(99,102,241,.12), 0 2px 8px rgba(0,0,0,.06);
    margin-top: 3px;
    overflow: hidden;
}
.ts-dropdown .ts-dropdown-content { padding: 4px; max-height: 220px; }
.ts-dropdown .option {
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 13px;
    color: #334155;
    transition: background .1s, color .1s;
}
.ts-dropdown .option:hover,
.ts-dropdown .option.option-active {
    background: #ede9fe;
    color: #4338ca;
}
.ts-dropdown .option.selected {
    background: linear-gradient(135deg, #6366f1, #818cf8);
    color: #fff;
    font-weight: 600;
}
/* Search input inside dropdown */
.ts-dropdown .ts-dropdown-header input,
.ts-wrapper .ts-control input[type="text"] { font-size: 13px; }
/* No results */
.ts-dropdown .no-results { color: #94a3b8; font-size: 12px; padding: 8px 10px; }
/* Clear × button */
.ts-wrapper .clear-button { color: #94a3b8; font-size: 14px; }
.ts-wrapper .clear-button:hover { color: #6366f1; }

/* ===== DATERANGEPICKER — CRM INDIGO THEME ===== */
.daterangepicker {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(99,102,241,.12), 0 4px 16px rgba(0,0,0,.08);
    font-family: inherit;
}
/* Arrow pointer */
.daterangepicker:before { border-bottom-color: #e2e8f0; }
.daterangepicker:after  { border-bottom-color: #fff; }

/* Month / year header */
.daterangepicker .calendar-table thead tr:first-child th {
    background: linear-gradient(135deg, #6366f1, #818cf8);
    color: #fff;
    border-radius: 0;
    font-weight: 600;
    font-size: 13px;
    padding: 10px 0;
    border: none;
}
.daterangepicker .calendar-table thead tr:first-child th:first-child {
    border-radius: 10px 0 0 0;
}
.daterangepicker .calendar-table thead tr:first-child th:last-child {
    border-radius: 0 10px 0 0;
}
/* Prev / next nav arrows in header */
.daterangepicker th.prev, .daterangepicker th.next {
    background: transparent;
    color: #fff;
    opacity: .9;
    transition: opacity .15s;
}
.daterangepicker th.prev:hover, .daterangepicker th.next:hover { opacity: 1; background: rgba(255,255,255,.15); }

/* Day-of-week row */
.daterangepicker .calendar-table thead tr:last-child th {
    color: #6366f1;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 8px 0;
    background: #f5f3ff;
    border-top: none;
}
/* Calendar table cells */
.daterangepicker td.available { border-radius: 6px; transition: background .12s, color .12s; }
.daterangepicker td.available:hover {
    background: #ede9fe;
    color: #4338ca;
}
/* In-range highlight */
.daterangepicker td.in-range {
    background: #ede9fe;
    color: #4c1d95;
    border-radius: 0;
}
/* Active start/end date */
.daterangepicker td.active,
.daterangepicker td.active:hover {
    background: linear-gradient(135deg, #6366f1, #818cf8);
    color: #fff;
    border-radius: 6px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(99,102,241,.35);
}
/* Today indicator */
.daterangepicker td.today:not(.active) {
    background: transparent;
    color: #6366f1;
    font-weight: 700;
    outline: 2px solid #6366f1;
    outline-offset: -2px;
    border-radius: 6px;
}
/* Off / disabled */
.daterangepicker td.off { color: #cbd5e1; }
.daterangepicker td.disabled { opacity: .35; }

/* Ranges sidebar */
.daterangepicker .ranges li {
    font-size: 12px;
    font-weight: 500;
    color: #475569;
    border-radius: 6px;
    padding: 6px 14px;
    transition: background .12s, color .12s;
}
.daterangepicker .ranges li:hover { background: #ede9fe; color: #4338ca; }
.daterangepicker .ranges li.active {
    background: linear-gradient(135deg, #6366f1, #818cf8);
    color: #fff;
    font-weight: 600;
}

/* Footer buttons */
.daterangepicker .drp-buttons { border-top: 1px solid #e2e8f0; padding: 10px 14px; }
.daterangepicker .drp-buttons .btn {
    font-size: 12px;
    font-weight: 600;
    border-radius: 7px;
    padding: 6px 16px;
    transition: all .15s;
}
.daterangepicker .drp-buttons .cancelBtn {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}
.daterangepicker .drp-buttons .cancelBtn:hover { background: #e2e8f0; color: #1e293b; }
.daterangepicker .drp-buttons .applyBtn,
.daterangepicker .drp-buttons .btn-primary {
    background: linear-gradient(135deg, #6366f1, #818cf8);
    border: none;
    color: #fff;
    box-shadow: 0 2px 8px rgba(99,102,241,.35);
}
.daterangepicker .drp-buttons .applyBtn:hover,
.daterangepicker .drp-buttons .btn-primary:hover {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    box-shadow: 0 4px 12px rgba(99,102,241,.45);
}
/* Selected range display at top */
.daterangepicker .drp-selected {
    font-size: 11px;
    color: #6366f1;
    font-weight: 600;
}
/* Calendar table border cleanup */
.daterangepicker .calendar-table { border: none; }
.daterangepicker .calendar-table table { border-spacing: 2px; }

/* -- Verification leads ----------------------------------------------- */
.vf-status-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .4px;
    padding: 2px 8px;
    border-radius: 20px;
    margin-top: 3px;
}
.vf-act-approve {
    background: #f0fdf4 !important;
    color: #16a34a !important;
    border: 1.5px solid #bbf7d0 !important;
}
.vf-act-approve:hover {
    background: linear-gradient(135deg, #16a34a, #22c55e) !important;
    color: #fff !important;
    border-color: transparent !important;
    box-shadow: 0 3px 10px rgba(22,163,74,.35) !important;
}
.vf-act-reject {
    background: #fff1f2 !important;
    color: #dc2626 !important;
    border: 1.5px solid #fecaca !important;
}
.vf-act-reject:hover {
    background: linear-gradient(135deg, #dc2626, #ef4444) !important;
    color: #fff !important;
    border-color: transparent !important;
    box-shadow: 0 3px 10px rgba(220,38,38,.35) !important;
}

/* -- Verification reports --------------------------------------------- */
.rp-stat-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 1px 8px rgba(0,0,0,.06);
    padding: 18px 18px 0;
    display: flex;
    align-items: center;
    gap: 14px;
    overflow: hidden;
    position: relative;
    border: 1px solid #f1f5f9;
    transition: box-shadow .2s, transform .2s;
}
.rp-stat-card:hover { box-shadow: 0 4px 20px rgba(99,102,241,.12); transform: translateY(-2px); }
.rp-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.rp-stat-body { flex: 1; padding-bottom: 16px; }
.rp-stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.1;
}
.rp-stat-label {
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .6px;
    margin-top: 2px;
}
.rp-stat-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
}
.rp-table-header {
    padding: 14px 18px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.rp-table-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
}
.rp-table-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}
